'AUTHCTRLR',
'recloser',
'deauthorize',
+ 'Deauth',
'DEAUTHORIZE',
'deauthorized',
'DEAUTHORIZED',
import { parentPort } from 'node:worker_threads'
import { type RawData, WebSocket } from 'ws'
+import type { OCPP16StopTransactionReason } from '../types/index.js'
+
import { BaseError, OCPPError } from '../exception/index.js'
import { PerformanceStatistics } from '../performance/index.js'
import {
>(this, RequestCommand.STOP_TRANSACTION, {
meterStop: this.getEnergyActiveImportRegisterByTransactionId(rawTransactionId, true),
transactionId,
- ...(reason != null && { reason }),
+ ...(reason != null && { reason: reason as OCPP16StopTransactionReason }),
})
}
GetCertificateIdUseEnumType,
HashAlgorithmEnumType,
InstallCertificateUseEnumType,
-} from '../../../types/ocpp/2.0/Common.js'
+} from '../../../types/index.js'
import { convertToDate, getErrorMessage } from '../../../utils/index.js'
/**
import type { ValidateFunction } from 'ajv'
import type { ChargingStation } from '../../../charging-station/index.js'
-import type {
- OCPP20ChargingProfileType,
- OCPP20ChargingScheduleType,
- OCPP20IdTokenType,
-} from '../../../types/ocpp/2.0/Transaction.js'
import { OCPPError } from '../../../exception/index.js'
import {
type OCPP20CertificateSignedResponse,
type OCPP20ChangeAvailabilityRequest,
type OCPP20ChangeAvailabilityResponse,
+ OCPP20ChargingProfileKindEnumType,
+ OCPP20ChargingProfilePurposeEnumType,
+ type OCPP20ChargingProfileType,
+ OCPP20ChargingRateUnitEnumType,
+ type OCPP20ChargingScheduleType,
type OCPP20ClearCacheResponse,
OCPP20ComponentName,
OCPP20ConnectorStatusEnumType,
type OCPP20GetVariablesResponse,
type OCPP20HeartbeatRequest,
type OCPP20HeartbeatResponse,
+ type OCPP20IdTokenType,
OCPP20IncomingRequestCommand,
type OCPP20InstallCertificateRequest,
type OCPP20InstallCertificateResponse,
type OCPP20NotifyReportRequest,
type OCPP20NotifyReportResponse,
OCPP20OperationalStatusEnumType,
+ OCPP20ReasonEnumType,
OCPP20RequestCommand,
type OCPP20RequestStartTransactionRequest,
type OCPP20RequestStartTransactionResponse,
UpdateFirmwareStatusEnumType,
UploadLogStatusEnumType,
} from '../../../types/index.js'
-import {
- OCPP20ChargingProfileKindEnumType,
- OCPP20ChargingProfilePurposeEnumType,
- OCPP20ChargingRateUnitEnumType,
- OCPP20ReasonEnumType,
-} from '../../../types/ocpp/2.0/Transaction.js'
import {
convertToDate,
generateUUID,
import type { ValidateFunction } from 'ajv'
-import type { OCPP20IncomingRequestCommand } from '../../../types/index.js'
-
import { addConfigurationKey, type ChargingStation } from '../../../charging-station/index.js'
import {
ChargingStationEvents,
ConnectorStatusEnum,
type JsonType,
+ OCPP20AuthorizationStatusEnumType,
type OCPP20BootNotificationResponse,
type OCPP20FirmwareStatusNotificationResponse,
type OCPP20HeartbeatResponse,
+ type OCPP20IncomingRequestCommand,
type OCPP20LogStatusNotificationResponse,
type OCPP20MeterValuesResponse,
type OCPP20NotifyCustomerInformationResponse,
OCPP20RequestCommand,
type OCPP20SecurityEventNotificationResponse,
type OCPP20StatusNotificationResponse,
+ OCPP20TransactionEventEnumType,
type OCPP20TransactionEventRequest,
type OCPP20TransactionEventResponse,
OCPPVersion,
type RequestCommand,
type ResponseHandler,
} from '../../../types/index.js'
-import {
- OCPP20AuthorizationStatusEnumType,
- OCPP20TransactionEventEnumType,
-} from '../../../types/ocpp/2.0/Transaction.js'
import { convertToDate, logger } from '../../../utils/index.js'
import { mapOCPP20TokenType, OCPPAuthServiceFactory } from '../auth/index.js'
import { OCPPResponseService } from '../OCPPResponseService.js'
ConnectorStatusEnum,
ErrorType,
type JsonObject,
+ OCPP20ChargingStateEnumType,
OCPP20ComponentName,
+ type OCPP20EVSEType,
OCPP20IncomingRequestCommand,
+ OCPP20MeasurandEnumType,
+ type OCPP20MeterValue,
+ OCPP20ReadingContextEnumType,
+ OCPP20ReasonEnumType,
OCPP20RequestCommand,
+ OCPP20RequiredVariableName,
OCPP20TransactionEventEnumType,
+ type OCPP20TransactionEventOptions,
type OCPP20TransactionEventRequest,
type OCPP20TransactionEventResponse,
+ type OCPP20TransactionType,
OCPP20TriggerReasonEnumType,
OCPPVersion,
type UUIDv4,
} from '../../../types/index.js'
-import { OCPP20RequiredVariableName } from '../../../types/index.js'
-import {
- OCPP20MeasurandEnumType,
- type OCPP20MeterValue,
- OCPP20ReadingContextEnumType,
-} from '../../../types/ocpp/2.0/MeterValues.js'
-import {
- OCPP20ChargingStateEnumType,
- type OCPP20EVSEType,
- OCPP20ReasonEnumType,
- type OCPP20TransactionEventOptions,
- type OCPP20TransactionType,
-} from '../../../types/ocpp/2.0/Transaction.js'
import {
Constants,
convertToIntOrNaN,
chargingStation: ChargingStation,
messageTrigger: MessageTrigger
): boolean {
- const isMessageTrigger = Object.values(MessageTrigger).includes(messageTrigger)
+ const isMessageTrigger = (Object.values(MessageTrigger) as MessageTrigger[]).includes(
+ messageTrigger
+ )
if (isMessageTrigger && chargingStation.stationInfo?.messageTriggerSupport == null) {
return true
} else if (
import {
type OCPP16AuthorizeRequest,
type OCPP16AuthorizeResponse,
+ OCPPVersion,
RequestCommand,
StandardParametersKey,
} from '../../../../types/index.js'
-import { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
import { logger, truncateId } from '../../../../utils/index.js'
import {
AuthContext,
-import type { RequestStartStopStatusEnumType } from '../../../../types/index.js'
+import type {
+ AdditionalInfoType,
+ OCPP20TransactionEventResponse,
+ RequestStartStopStatusEnumType,
+} from '../../../../types/index.js'
import type { ChargingStation } from '../../../index.js'
import type { OCPPAuthAdapter } from '../interfaces/OCPPAuthService.js'
import type {
import { OCPP20ServiceUtils } from '../../2.0/OCPP20ServiceUtils.js'
import { OCPP20VariableManager } from '../../2.0/OCPP20VariableManager.js'
-import { GetVariableStatusEnumType, type OCPP20IdTokenType } from '../../../../types/index.js'
import {
- type AdditionalInfoType,
+ GetVariableStatusEnumType,
OCPP20AuthorizationStatusEnumType,
OCPP20IdTokenEnumType,
+ type OCPP20IdTokenType,
OCPP20TransactionEventEnumType,
- type OCPP20TransactionEventResponse,
OCPP20TriggerReasonEnumType,
-} from '../../../../types/ocpp/2.0/Transaction.js'
-import { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+ OCPPVersion,
+} from '../../../../types/index.js'
import { generateUUID, logger, truncateId } from '../../../../utils/index.js'
import {
AuthContext,
import type { AuthConfiguration } from '../types/AuthTypes.js'
import { OCPPError } from '../../../../exception/OCPPError.js'
-import { ErrorType } from '../../../../types/index.js'
-import { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+import { ErrorType, OCPPVersion } from '../../../../types/index.js'
import { InMemoryAuthCache } from '../cache/InMemoryAuthCache.js'
import { AuthConfigValidator } from '../utils/ConfigValidator.js'
-import type { OCPP20IdTokenInfoType } from '../../../../types/ocpp/2.0/Transaction.js'
-import type { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+import type { OCPP20IdTokenInfoType, OCPPVersion } from '../../../../types/index.js'
import type {
AuthConfiguration,
AuthorizationResult,
-import type { OCPP20IdTokenInfoType } from '../../../../types/ocpp/2.0/Transaction.js'
+import type { OCPP20IdTokenInfoType } from '../../../../types/index.js'
import type { OCPP16AuthAdapter } from '../adapters/OCPP16AuthAdapter.js'
import type { OCPP20AuthAdapter } from '../adapters/OCPP20AuthAdapter.js'
import type { LocalAuthStrategy } from '../strategies/LocalAuthStrategy.js'
import { OCPPError } from '../../../../exception/OCPPError.js'
-import { ErrorType } from '../../../../types/index.js'
-import { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+import { ErrorType, OCPPVersion } from '../../../../types/index.js'
import {
convertToDate,
ensureError,
-import type { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+import type { OCPPVersion } from '../../../../types/index.js'
import type {
AuthCache,
AuthStrategy,
-import type { JsonObject } from '../../../../types/JsonType.js'
-import type { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+import type { JsonObject, OCPPVersion } from '../../../../types/index.js'
-import { OCPP16AuthorizationStatus } from '../../../../types/ocpp/1.6/Transaction.js'
import {
+ OCPP16AuthorizationStatus,
OCPP20AuthorizationStatusEnumType,
OCPP20IdTokenEnumType,
RequestStartStopStatusEnumType,
-} from '../../../../types/ocpp/2.0/Transaction.js'
+} from '../../../../types/index.js'
/**
* Authentication context for strategy selection
-export {
- OCPP20TransactionEventEnumType,
- OCPP20TriggerReasonEnumType,
-} from '../../types/ocpp/2.0/Transaction.js'
+export { OCPP20TransactionEventEnumType, OCPP20TriggerReasonEnumType } from '../../types/index.js'
export { OCPP16IncomingRequestService } from './1.6/OCPP16IncomingRequestService.js'
export { OCPP16RequestService } from './1.6/OCPP16RequestService.js'
export { OCPP16ResponseService } from './1.6/OCPP16ResponseService.js'
export { OCPP16ChargePointStatus } from './ocpp/1.6/ChargePointStatus.js'
export {
type OCPP16ChargingProfile,
+ OCPP16ChargingProfileKindType,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
type OCPP16ChargingSchedule,
type RemoteStartTransactionRequest,
type RemoteStopTransactionRequest,
type ResetRequest,
+ ResetType,
type SetChargingProfileRequest,
type UnlockConnectorRequest,
} from './ocpp/1.6/Requests.js'
type ChangeConfigurationResponse,
type GetConfigurationResponse,
type GetDiagnosticsResponse,
+ OCPP16AvailabilityStatus,
type OCPP16BootNotificationResponse,
type OCPP16ChangeAvailabilityResponse,
+ OCPP16ChargingProfileStatus,
type OCPP16ClearChargingProfileResponse,
+ OCPP16ClearChargingProfileStatus,
+ OCPP16ConfigurationStatus,
type OCPP16DataTransferResponse,
OCPP16DataTransferStatus,
type OCPP16DiagnosticsStatusNotificationResponse,
type OCPP16FirmwareStatusNotificationResponse,
type OCPP16GetCompositeScheduleResponse,
type OCPP16HeartbeatResponse,
+ OCPP16ReservationStatus,
type OCPP16ReserveNowResponse,
type OCPP16StatusNotificationResponse,
type OCPP16TriggerMessageResponse,
OCPP16TriggerMessageStatus,
+ OCPP16UnlockStatus,
type OCPP16UpdateFirmwareResponse,
type SetChargingProfileResponse,
type UnlockConnectorResponse,
type CertificateHashDataType,
CertificateSigningUseEnumType,
ChangeAvailabilityStatusEnumType,
+ type ChargingStationType,
type CustomDataType,
CustomerInformationStatusEnumType,
DataEnumType,
OCPP20FirmwareStatusEnumType,
OCPP20OperationalStatusEnumType,
OCPP20UnitEnumType,
+ OCPPInterfaceEnumType,
+ OCPPTransportEnumType,
+ OCPPVersionEnumType,
type OCSPRequestDataType,
ReasonCodeEnumType,
ReportBaseEnumType,
OCPP20UpdateFirmwareResponse,
} from './ocpp/2.0/Responses.js'
export {
+ type AdditionalInfoType,
type ComponentType,
OCPP20AuthorizationStatusEnumType,
OCPP20ChargingProfileKindEnumType,
OCPP20ChargingRateUnitEnumType,
type OCPP20ChargingSchedulePeriodType,
type OCPP20ChargingScheduleType,
+ OCPP20ChargingStateEnumType,
OCPP20ConnectorStatusEnumType,
+ type OCPP20EVSEType,
+ OCPP20IdTokenEnumType,
+ type OCPP20IdTokenInfoType,
type OCPP20IdTokenType,
+ OCPP20MessageFormatEnumType,
+ OCPP20ReasonEnumType,
OCPP20TransactionEventEnumType,
+ type OCPP20TransactionEventOptions,
type OCPP20TransactionEventRequest,
type OCPP20TransactionEventResponse,
type OCPP20TransactionType,
+++ /dev/null
-export type { OCPP20MeterValue } from './MeterValues.js'
-export type {
- OCPP20ChargingStateEnumType,
- OCPP20EVSEType,
- OCPP20IdTokenInfoType,
- OCPP20IdTokenType,
- OCPP20ReasonEnumType,
- OCPP20TransactionEventEnumType,
- OCPP20TransactionEventOptions,
- OCPP20TransactionEventRequest,
-} from './Transaction.js'
type OCPP16ReserveNowRequest,
type OCPP16StatusNotificationRequest,
} from './1.6/Requests.js'
-import { OCPP20FirmwareStatusEnumType, OCPP20OperationalStatusEnumType } from './2.0/Common.js'
+import {
+ MessageTriggerEnumType,
+ OCPP20FirmwareStatusEnumType,
+ OCPP20OperationalStatusEnumType,
+} from './2.0/Common.js'
import {
type OCPP20BootNotificationRequest,
+ type OCPP20DataTransferRequest,
type OCPP20FirmwareStatusNotificationRequest,
+ type OCPP20HeartbeatRequest,
OCPP20IncomingRequestCommand,
OCPP20RequestCommand,
type OCPP20StatusNotificationRequest,
JsonType
]
-export type DataTransferRequest = OCPP16DataTransferRequest
+export type DataTransferRequest = OCPP16DataTransferRequest | OCPP20DataTransferRequest
export type DiagnosticsStatusNotificationRequest = OCPP16DiagnosticsStatusNotificationRequest
| OCPP16FirmwareStatusNotificationRequest
| OCPP20FirmwareStatusNotificationRequest
-export type HeartbeatRequest = OCPP16HeartbeatRequest
+// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
+export type HeartbeatRequest = OCPP16HeartbeatRequest | OCPP20HeartbeatRequest
export type IncomingRequest = [MessageType.CALL_MESSAGE, string, IncomingRequestCommand, JsonType]
export const MessageTrigger = {
...OCPP16MessageTrigger,
+ ...MessageTriggerEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type MessageTrigger = OCPP16MessageTrigger
+export type MessageTrigger = MessageTriggerEnumType | OCPP16MessageTrigger
export type MeterValuesRequest = OCPP16MeterValuesRequest | OCPP20MeterValuesRequest
import type { JsonType } from '../JsonType.js'
import type { OCPP16MeterValuesResponse } from './1.6/MeterValues.js'
import type { OCPP20MeterValuesResponse } from './2.0/MeterValues.js'
-import type { OCPP20BootNotificationResponse, OCPP20ClearCacheResponse } from './2.0/Responses.js'
+import type {
+ OCPP20BootNotificationResponse,
+ OCPP20ClearCacheResponse,
+ OCPP20DataTransferResponse,
+ OCPP20FirmwareStatusNotificationResponse,
+ OCPP20HeartbeatResponse,
+ OCPP20StatusNotificationResponse,
+} from './2.0/Responses.js'
import type { ErrorType } from './ErrorType.js'
import type { MessageType } from './MessageType.js'
OCPP16TriggerMessageStatus,
OCPP16UnlockStatus,
} from './1.6/Responses.js'
+import {
+ ChangeAvailabilityStatusEnumType,
+ DataTransferStatusEnumType,
+ TriggerMessageStatusEnumType,
+ UnlockStatusEnumType,
+} from './2.0/Common.js'
import { type GenericResponse, GenericStatus } from './Common.js'
export type BootNotificationResponse =
export type ClearCacheResponse = GenericResponse | OCPP20ClearCacheResponse
-export type DataTransferResponse = OCPP16DataTransferResponse
+export type DataTransferResponse = OCPP16DataTransferResponse | OCPP20DataTransferResponse
export type DiagnosticsStatusNotificationResponse = OCPP16DiagnosticsStatusNotificationResponse
export type ErrorResponse = [MessageType.CALL_ERROR_MESSAGE, string, ErrorType, string, JsonType]
-export type FirmwareStatusNotificationResponse = OCPP16FirmwareStatusNotificationResponse
+export type FirmwareStatusNotificationResponse =
+ | OCPP16FirmwareStatusNotificationResponse
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
+ | OCPP20FirmwareStatusNotificationResponse
-export type HeartbeatResponse = OCPP16HeartbeatResponse
+export type HeartbeatResponse = OCPP16HeartbeatResponse | OCPP20HeartbeatResponse
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
export type MeterValuesResponse = OCPP16MeterValuesResponse | OCPP20MeterValuesResponse
requestPayload?: JsonType
) => Promise<void> | void
-export type StatusNotificationResponse = OCPP16StatusNotificationResponse
+export type StatusNotificationResponse =
+ | OCPP16StatusNotificationResponse
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
+ | OCPP20StatusNotificationResponse
export const AvailabilityStatus = {
...OCPP16AvailabilityStatus,
+ ...ChangeAvailabilityStatusEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type AvailabilityStatus = OCPP16AvailabilityStatus
+export type AvailabilityStatus = ChangeAvailabilityStatusEnumType | OCPP16AvailabilityStatus
export const ChargingProfileStatus = {
...OCPP16ChargingProfileStatus,
export const UnlockStatus = {
...OCPP16UnlockStatus,
+ ...UnlockStatusEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type UnlockStatus = OCPP16UnlockStatus
+export type UnlockStatus = OCPP16UnlockStatus | UnlockStatusEnumType
export const TriggerMessageStatus = {
...OCPP16TriggerMessageStatus,
+ ...TriggerMessageStatusEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type TriggerMessageStatus = OCPP16TriggerMessageStatus
+export type TriggerMessageStatus = OCPP16TriggerMessageStatus | TriggerMessageStatusEnumType
export const DataTransferStatus = {
...OCPP16DataTransferStatus,
+ ...DataTransferStatusEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type DataTransferStatus = OCPP16DataTransferStatus
+export type DataTransferStatus = DataTransferStatusEnumType | OCPP16DataTransferStatus
export const ReservationStatus = {
...OCPP16ReservationStatus,
type OCPP16StopTransactionRequest,
type OCPP16StopTransactionResponse,
} from './1.6/Transaction.js'
+import { OCPP20AuthorizationStatusEnumType, OCPP20ReasonEnumType } from './2.0/Transaction.js'
export const AuthorizationStatus = {
...OCPP16AuthorizationStatus,
+ ...OCPP20AuthorizationStatusEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type AuthorizationStatus = OCPP16AuthorizationStatus
+export type AuthorizationStatus = OCPP16AuthorizationStatus | OCPP20AuthorizationStatusEnumType
export type AuthorizeRequest = OCPP16AuthorizeRequest
export const StopTransactionReason = {
...OCPP16StopTransactionReason,
+ ...OCPP20ReasonEnumType,
} as const
// eslint-disable-next-line @typescript-eslint/no-redeclare
-export type StopTransactionReason = OCPP16StopTransactionReason
+export type StopTransactionReason = OCPP16StopTransactionReason | OCPP20ReasonEnumType
export type StopTransactionRequest = OCPP16StopTransactionRequest
import { afterEach, describe, it } from 'node:test'
import { OCPP16Constants } from '../../../../src/charging-station/ocpp/1.6/OCPP16Constants.js'
-import { OCPP16ChargePointStatus } from '../../../../src/types/ocpp/1.6/ChargePointStatus.js'
+import { OCPP16ChargePointStatus } from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
await describe('OCPP16Constants', async () => {
import type { TestableOCPP16IncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/__testable__/index.js'
import {
+ OCPP16AvailabilityStatus,
OCPP16AvailabilityType,
type OCPP16ChangeAvailabilityRequest,
} from '../../../../src/types/index.js'
-import { OCPP16AvailabilityStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { createOCPP16IncomingRequestTestContext, setMockRequestHandler } from './OCPP16TestUtils.js'
GetConfigurationRequest,
} from '../../../../src/types/index.js'
-import { OCPP16StandardParametersKey } from '../../../../src/types/index.js'
-import { OCPP16ConfigurationStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
+import {
+ OCPP16ConfigurationStatus,
+ OCPP16StandardParametersKey,
+} from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
createOCPP16IncomingRequestTestContext,
import { OCPP16IncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.js'
import {
+ OCPP16FirmwareStatus,
OCPP16IncomingRequestCommand,
OCPP16StandardParametersKey,
type OCPP16UpdateFirmwareRequest,
type OCPP16UpdateFirmwareResponse,
} from '../../../../src/types/index.js'
-import { OCPP16FirmwareStatus } from '../../../../src/types/ocpp/1.6/Requests.js'
import {
flushMicrotasks,
standardCleanup,
import type { ChargingStation } from '../../../../src/charging-station/ChargingStation.js'
import type { TestableOCPP16IncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/__testable__/index.js'
-import type { RemoteStopTransactionRequest } from '../../../../src/types/ocpp/1.6/Requests.js'
-import type { GenericResponse } from '../../../../src/types/ocpp/Common.js'
+import type { GenericResponse, RemoteStopTransactionRequest } from '../../../../src/types/index.js'
import { OCPP16IncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.js'
import { OCPP16ServiceUtils } from '../../../../src/charging-station/ocpp/1.6/OCPP16ServiceUtils.js'
-import { OCPP16IncomingRequestCommand } from '../../../../src/types/ocpp/1.6/Requests.js'
-import { OCPP16UnlockStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
-import { OCPP16AuthorizationStatus } from '../../../../src/types/ocpp/1.6/Transaction.js'
-import { GenericStatus } from '../../../../src/types/ocpp/Common.js'
+import {
+ GenericStatus,
+ OCPP16AuthorizationStatus,
+ OCPP16IncomingRequestCommand,
+ OCPP16UnlockStatus,
+} from '../../../../src/types/index.js'
import {
flushMicrotasks,
setupConnectorWithTransaction,
GenericStatus,
OCPP16AuthorizationStatus,
OCPP16ChargePointStatus,
+ OCPP16ReservationStatus,
OCPP16StandardParametersKey,
} from '../../../../src/types/index.js'
-import { OCPP16ReservationStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
createOCPP16IncomingRequestTestContext,
import type { ResetRequest } from '../../../../src/types/index.js'
-import { GenericStatus } from '../../../../src/types/index.js'
-import { ResetType } from '../../../../src/types/ocpp/1.6/Requests.js'
+import { GenericStatus, ResetType } from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
createOCPP16IncomingRequestTestContext,
import assert from 'node:assert/strict'
import { afterEach, beforeEach, describe, it } from 'node:test'
-import { OCPP16DataTransferStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
+import { OCPP16DataTransferStatus } from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
createOCPP16IncomingRequestTestContext,
SetChargingProfileRequest,
} from '../../../../src/types/index.js'
-import { GenericStatus, OCPP16StandardParametersKey } from '../../../../src/types/index.js'
-import { OCPP16ChargingProfilePurposeType } from '../../../../src/types/ocpp/1.6/ChargingProfile.js'
import {
+ GenericStatus,
+ OCPP16ChargingProfilePurposeType,
OCPP16ChargingProfileStatus,
OCPP16ClearChargingProfileStatus,
-} from '../../../../src/types/ocpp/1.6/Responses.js'
+ OCPP16StandardParametersKey,
+} from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
ChargingProfileFixtures,
import { afterEach, beforeEach, describe, it } from 'node:test'
import type {
+ OCPP16ChargingProfile,
OCPP16ClearChargingProfileRequest,
OCPP16GetCompositeScheduleRequest,
SetChargingProfileRequest,
} from '../../../../src/types/index.js'
-import type { OCPP16ChargingProfile } from '../../../../src/types/ocpp/1.6/ChargingProfile.js'
-import { GenericStatus, OCPP16StandardParametersKey } from '../../../../src/types/index.js'
import {
+ GenericStatus,
OCPP16ChargingProfileKindType,
OCPP16ChargingProfilePurposeType,
- OCPP16ChargingRateUnitType,
-} from '../../../../src/types/ocpp/1.6/ChargingProfile.js'
-import {
OCPP16ChargingProfileStatus,
+ OCPP16ChargingRateUnitType,
OCPP16ClearChargingProfileStatus,
-} from '../../../../src/types/ocpp/1.6/Responses.js'
+ OCPP16StandardParametersKey,
+} from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
ChargingProfileFixtures,
GetConfigurationRequest,
} from '../../../../src/types/index.js'
-import { OCPP16StandardParametersKey } from '../../../../src/types/index.js'
-import { OCPP16ConfigurationStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
+import {
+ OCPP16ConfigurationStatus,
+ OCPP16StandardParametersKey,
+} from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
createOCPP16IncomingRequestTestContext,
import {
GenericStatus,
OCPP16AuthorizationStatus,
+ OCPP16ReservationStatus,
OCPP16StandardParametersKey,
} from '../../../../src/types/index.js'
-import { OCPP16ReservationStatus } from '../../../../src/types/ocpp/1.6/Responses.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
createOCPP16IncomingRequestTestContext,
import type { ChargingStation } from '../../../../src/charging-station/ChargingStation.js'
import type { TestableOCPP16IncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/__testable__/index.js'
import type { OCPP16ResponseService } from '../../../../src/charging-station/ocpp/1.6/OCPP16ResponseService.js'
-import type {
- RemoteStartTransactionRequest,
- RemoteStopTransactionRequest,
-} from '../../../../src/types/ocpp/1.6/Requests.js'
import type {
OCPP16StartTransactionRequest,
OCPP16StartTransactionResponse,
OCPP16StopTransactionRequest,
OCPP16StopTransactionResponse,
-} from '../../../../src/types/ocpp/1.6/Transaction.js'
+ RemoteStartTransactionRequest,
+ RemoteStopTransactionRequest,
+} from '../../../../src/types/index.js'
import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/__testable__/index.js'
import { OCPP16IncomingRequestService } from '../../../../src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.js'
import {
AvailabilityType,
GenericStatus,
+ OCPP16AuthorizationStatus,
OCPP16ChargePointStatus,
OCPP16MeterValueUnit,
+ OCPP16RequestCommand,
OCPPVersion,
} from '../../../../src/types/index.js'
-import { OCPP16RequestCommand } from '../../../../src/types/ocpp/1.6/Requests.js'
-import { OCPP16AuthorizationStatus } from '../../../../src/types/ocpp/1.6/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
import {
setupConnectorWithTransaction,
import type {
OCPP16AuthorizeRequest,
OCPP16AuthorizeResponse,
-} from '../../../../src/types/ocpp/1.6/Transaction.js'
+} from '../../../../src/types/index.js'
import {
ChargingStationEvents,
OCPP16StartTransactionResponse,
OCPP16StopTransactionRequest,
OCPP16StopTransactionResponse,
-} from '../../../../src/types/ocpp/1.6/Transaction.js'
+} from '../../../../src/types/index.js'
-import { OCPP16MeterValueUnit } from '../../../../src/types/index.js'
-import { OCPP16RequestCommand } from '../../../../src/types/ocpp/1.6/Requests.js'
-import { OCPP16AuthorizationStatus } from '../../../../src/types/ocpp/1.6/Transaction.js'
+import {
+ OCPP16AuthorizationStatus,
+ OCPP16MeterValueUnit,
+ OCPP16RequestCommand,
+} from '../../../../src/types/index.js'
import {
setupConnectorWithTransaction,
standardCleanup,
import { OCPPServiceUtils } from '../../../../src/charging-station/ocpp/OCPPServiceUtils.js'
import {
type OCPP16ChargingProfile,
+ OCPP16ChargingProfileKindType,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
type OCPP16ChargingSchedule,
OCPP16SupportedFeatureProfiles,
OCPPVersion,
} from '../../../../src/types/index.js'
-import { OCPP16ChargingProfileKindType } from '../../../../src/types/ocpp/1.6/ChargingProfile.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { createMockChargingStation } from '../../helpers/StationHelpers.js'
import { createCommandsSupport, createMeterValuesTemplate } from './OCPP16TestUtils.js'
import type { ChargingStation } from '../../../../src/charging-station/ChargingStation.js'
import type { ChargingStationInfo } from '../../../../src/types/ChargingStationInfo.js'
import type { ConfigurationKey } from '../../../../src/types/ChargingStationOcppConfiguration.js'
-import type { JsonObject } from '../../../../src/types/JsonType.js'
-import type { SampledValueTemplate } from '../../../../src/types/MeasurandPerPhaseSampledValueTemplates.js'
import type {
+ IncomingRequestCommand,
OCPP16ChargingProfile,
OCPP16ChargingSchedulePeriod,
-} from '../../../../src/types/ocpp/1.6/ChargingProfile.js'
-import type { OCPP16SampledValue } from '../../../../src/types/ocpp/1.6/MeterValues.js'
-import type { IncomingRequestCommand, RequestCommand } from '../../../../src/types/ocpp/Requests.js'
+ OCPP16SampledValue,
+ RequestCommand,
+} from '../../../../src/types/index.js'
+import type { JsonObject } from '../../../../src/types/JsonType.js'
+import type { SampledValueTemplate } from '../../../../src/types/MeasurandPerPhaseSampledValueTemplates.js'
import {
createTestableIncomingRequestService,
import { OCPP16RequestService } from '../../../../src/charging-station/ocpp/1.6/OCPP16RequestService.js'
import { OCPP16ResponseService } from '../../../../src/charging-station/ocpp/1.6/OCPP16ResponseService.js'
import {
+ OCPP16ChargingProfileKindType,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
type OCPP16RequestCommand,
OCPP16StandardParametersKey,
OCPPVersion,
} from '../../../../src/types/index.js'
-import { OCPP16ChargingProfileKindType } from '../../../../src/types/ocpp/1.6/ChargingProfile.js'
import { Constants } from '../../../../src/utils/index.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import {
HashAlgorithmEnumType,
type OCPP20CustomerInformationRequest,
type OCPP20CustomerInformationResponse,
+ OCPP20IdTokenEnumType,
OCPP20IncomingRequestCommand,
OCPPVersion,
} from '../../../../src/types/index.js'
-import { OCPP20IdTokenEnumType } from '../../../../src/types/ocpp/2.0/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
OCPPVersion,
ReportBaseEnumType,
type ReportDataType,
+ StandardParametersKey,
} from '../../../../src/types/index.js'
-import { StandardParametersKey } from '../../../../src/types/ocpp/Configuration.js'
import { Constants } from '../../../../src/utils/index.js'
import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js'
import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js'
import { OCPPAuthServiceFactory } from '../../../../src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.js'
-import { RequestStartStopStatusEnumType } from '../../../../src/types/index.js'
-import { OCPP20IdTokenEnumType } from '../../../../src/types/ocpp/2.0/Transaction.js'
+import {
+ OCPP20IdTokenEnumType,
+ RequestStartStopStatusEnumType,
+} from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import { createMockAuthService } from '../auth/helpers/MockFactories.js'
import { OCPPAuthServiceFactory } from '../../../../src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.js'
import {
GetVariableStatusEnumType,
+ OCPP20IdTokenEnumType,
OCPPVersion,
RequestStartStopStatusEnumType,
} from '../../../../src/types/index.js'
-import { OCPP20IdTokenEnumType } from '../../../../src/types/ocpp/2.0/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js'
import {
ConnectorStatusEnum,
- type OCPP20RequestStartTransactionRequest,
- RequestStartStopStatusEnumType,
-} from '../../../../src/types/index.js'
-import { OCPP20OperationalStatusEnumType } from '../../../../src/types/ocpp/2.0/Common.js'
-import {
OCPP20ChargingProfileKindEnumType,
OCPP20ChargingProfilePurposeEnumType,
OCPP20IdTokenEnumType,
type OCPP20IdTokenType,
-} from '../../../../src/types/ocpp/2.0/Transaction.js'
-import { OCPPVersion } from '../../../../src/types/ocpp/OCPPVersion.js'
+ OCPP20OperationalStatusEnumType,
+ type OCPP20RequestStartTransactionRequest,
+ OCPPVersion,
+ RequestStartStopStatusEnumType,
+} from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
await describe('G03 - Remote Start Pre-Authorization', async () => {
import type { ChargingStation } from '../../../../src/charging-station/index.js'
import type {
+ OCPP20ChargingProfileType,
+ OCPP20ChargingRateUnitEnumType,
OCPP20RequestStartTransactionRequest,
OCPP20RequestStartTransactionResponse,
OCPP20TransactionEventRequest,
} from '../../../../src/types/index.js'
-import type {
- OCPP20ChargingProfileType,
- OCPP20ChargingRateUnitEnumType,
-} from '../../../../src/types/ocpp/2.0/Transaction.js'
import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js'
import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js'
import { OCPPAuthServiceFactory } from '../../../../src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.js'
import {
+ OCPP20ChargingProfileKindEnumType,
+ OCPP20ChargingProfilePurposeEnumType,
+ OCPP20IdTokenEnumType,
OCPP20IncomingRequestCommand,
OCPP20RequestCommand,
OCPP20TransactionEventEnumType,
OCPPVersion,
RequestStartStopStatusEnumType,
} from '../../../../src/types/index.js'
-import {
- OCPP20ChargingProfileKindEnumType,
- OCPP20ChargingProfilePurposeEnumType,
- OCPP20IdTokenEnumType,
-} from '../../../../src/types/ocpp/2.0/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js'
import { OCPPAuthServiceFactory } from '../../../../src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.js'
import {
+ OCPP20IdTokenEnumType,
OCPP20IncomingRequestCommand,
+ OCPP20ReasonEnumType,
OCPP20RequestCommand,
OCPP20TransactionEventEnumType,
OCPP20TriggerReasonEnumType,
OCPPVersion,
RequestStartStopStatusEnumType,
} from '../../../../src/types/index.js'
-import {
- OCPP20IdTokenEnumType,
- OCPP20ReasonEnumType,
-} from '../../../../src/types/ocpp/2.0/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js'
import {
type OCPP20SetNetworkProfileRequest,
+ OCPPInterfaceEnumType,
+ OCPPTransportEnumType,
OCPPVersion,
+ OCPPVersionEnumType,
ReasonCodeEnumType,
SetNetworkProfileStatusEnumType,
} from '../../../../src/types/index.js'
-import {
- OCPPInterfaceEnumType,
- OCPPTransportEnumType,
- OCPPVersionEnumType,
-} from '../../../../src/types/ocpp/2.0/Common.js'
import { Constants } from '../../../../src/utils/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import {
BootReasonEnumType,
+ type ChargingStationType,
type OCPP20BootNotificationRequest,
OCPP20RequestCommand,
} from '../../../../src/types/index.js'
-import { type ChargingStationType } from '../../../../src/types/ocpp/2.0/Common.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import {
TEST_CHARGE_POINT_MODEL,
AuthorizationStatus,
IdentifierType,
} from '../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPP20AuthorizationStatusEnumType } from '../../../../src/types/ocpp/2.0/Transaction.js'
-import { OCPPVersion } from '../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPP20AuthorizationStatusEnumType, OCPPVersion } from '../../../../src/types/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
import { OCPP20ResponseService } from '../../../../src/charging-station/ocpp/2.0/OCPP20ResponseService.js'
import { OCPP20ServiceUtils } from '../../../../src/charging-station/ocpp/2.0/OCPP20ServiceUtils.js'
-import { OCPPVersion } from '../../../../src/types/index.js'
import {
OCPP20AuthorizationStatusEnumType,
OCPP20MessageFormatEnumType,
OCPP20TransactionEventEnumType,
OCPP20TriggerReasonEnumType,
-} from '../../../../src/types/ocpp/2.0/Transaction.js'
+ OCPPVersion,
+} from '../../../../src/types/index.js'
import { Constants } from '../../../../src/utils/index.js'
import {
setupConnectorWithTransaction,
import { OCPPError } from '../../../../src/exception/OCPPError.js'
import {
AttributeEnumType,
- OCPP20ComponentName,
- OCPP20RequiredVariableName,
-} from '../../../../src/types/index.js'
-import {
ConnectorStatusEnum,
- OCPP20TransactionEventEnumType,
- OCPP20TriggerReasonEnumType,
- OCPPVersion,
-} from '../../../../src/types/index.js'
-import {
- OCPP20MeasurandEnumType,
- OCPP20ReadingContextEnumType,
-} from '../../../../src/types/ocpp/2.0/MeterValues.js'
-import {
OCPP20ChargingStateEnumType,
+ OCPP20ComponentName,
OCPP20IdTokenEnumType,
type OCPP20IdTokenType,
+ OCPP20MeasurandEnumType,
+ OCPP20ReadingContextEnumType,
OCPP20ReasonEnumType,
+ OCPP20RequiredVariableName,
+ OCPP20TransactionEventEnumType,
type OCPP20TransactionType,
-} from '../../../../src/types/ocpp/2.0/Transaction.js'
+ OCPP20TriggerReasonEnumType,
+ OCPPVersion,
+} from '../../../../src/types/index.js'
import { Constants, generateUUID } from '../../../../src/utils/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
CertificateHashDataType,
GetCertificateIdUseEnumType,
JsonType,
+ OCPP20IdTokenType,
OCPP20RequestCommand,
OCSPRequestDataType,
} from '../../../../src/types/index.js'
-import type { OCPP20IdTokenType } from '../../../../src/types/ocpp/2.0/Transaction.js'
import { OCPP20RequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20RequestService.js'
import { OCPP20ResponseService } from '../../../../src/charging-station/ocpp/2.0/OCPP20ResponseService.js'
ConnectorStatusEnum,
DeleteCertificateStatusEnumType,
HashAlgorithmEnumType,
+ OCPP20IdTokenEnumType,
OCPP20RequiredVariableName,
OCPPVersion,
} from '../../../../src/types/index.js'
-import { OCPP20IdTokenEnumType } from '../../../../src/types/ocpp/2.0/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
import {
OCPPVersion,
ReasonCodeEnumType,
SetVariableStatusEnumType,
+ StandardParametersKey,
type VariableType,
} from '../../../../src/types/index.js'
-import { StandardParametersKey } from '../../../../src/types/ocpp/Configuration.js'
import { Constants } from '../../../../src/utils/index.js'
import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
AuthorizationStatus,
IdentifierType,
} from '../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../src/types/index.js'
import { sleep, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
import {
import { afterEach, beforeEach, describe, it } from 'node:test'
import type { ChargingStation } from '../../../../../src/charging-station/ChargingStation.js'
-import type { OCPP16AuthorizeResponse } from '../../../../../src/types/ocpp/1.6/Transaction.js'
+import type { OCPP16AuthorizeResponse } from '../../../../../src/types/index.js'
import { OCPP16AuthAdapter } from '../../../../../src/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.js'
import {
AuthorizationStatus,
IdentifierType,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPP16AuthorizationStatus } from '../../../../../src/types/ocpp/1.6/Transaction.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPP16AuthorizationStatus, OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import { createMockAuthorizationResult, createMockIdentifier } from '../helpers/MockFactories.js'
OCPP20AuthorizationStatusEnumType,
OCPP20IdTokenEnumType,
RequestStartStopStatusEnumType,
-} from '../../../../../src/types/ocpp/2.0/Transaction.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+} from '../../../../../src/types/index.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import { createMockAuthorizationResult, createMockIdentifier } from '../helpers/MockFactories.js'
import type { AuthConfiguration } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
import { AuthComponentFactory } from '../../../../../src/charging-station/ocpp/auth/factories/AuthComponentFactory.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import { TEST_AUTHORIZATION_TIMEOUT_MS } from '../../../ChargingStationTestConstants.js'
import { createMockChargingStation } from '../../../ChargingStationTestUtils.js'
IdentifierType,
type UnifiedIdentifier,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
/**
* Factory functions for creating test mocks and fixtures
import type { ChargingStation } from '../../../../../src/charging-station/ChargingStation.js'
import { OCPPAuthServiceFactory } from '../../../../../src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import { createMockAuthServiceTestStation } from '../helpers/MockFactories.js'
IdentifierType,
type UnifiedIdentifier,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import { createMockAuthServiceTestStation } from '../helpers/MockFactories.js'
AuthorizationStatus,
IdentifierType,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import {
createMockAuthorizationResult,
AuthorizationStatus,
IdentifierType,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import {
createMockAuthCache,
AuthorizationStatus,
IdentifierType,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import {
createMockAuthCache,
AuthorizationStatus,
IdentifierType,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
import {
createMockAuthCache,
requiresAdditionalInfo,
type UnifiedIdentifier,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPP16AuthorizationStatus } from '../../../../../src/types/ocpp/1.6/Transaction.js'
import {
+ OCPP16AuthorizationStatus,
OCPP20IdTokenEnumType,
+ OCPPVersion,
RequestStartStopStatusEnumType,
-} from '../../../../../src/types/ocpp/2.0/Transaction.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+} from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
await describe('AuthTypes', async () => {
type UnifiedIdentifier,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
import { AuthHelpers } from '../../../../../src/charging-station/ocpp/auth/utils/AuthHelpers.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
await describe('AuthHelpers', async () => {
type UnifiedIdentifier,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
import { AuthValidators } from '../../../../../src/charging-station/ocpp/auth/utils/AuthValidators.js'
-import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../../../../src/types/index.js'
import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
await describe('AuthValidators', async () => {
AuthorizationStatus,
IdentifierType,
} from '../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { OCPPVersion } from '../../src/types/ocpp/OCPPVersion.js'
+import { OCPPVersion } from '../../src/types/index.js'
import { logger } from '../../src/utils/Logger.js'
export class OCPPAuthIntegrationTest {