]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor(ocpp): consolidate cross-stack types and harmonize barrel imports
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 19 Mar 2026 14:24:42 +0000 (15:24 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 19 Mar 2026 14:24:42 +0000 (15:24 +0100)
Consolidate OCPP types with common semantics across 1.6 and 2.0 stacks
(AuthorizationStatus, StopTransactionReason, MessageTrigger, DataTransfer,
TriggerMessageStatus, UnlockStatus, AvailabilityStatus, HeartbeatRequest/
Response, StatusNotificationResponse, FirmwareStatusNotificationResponse).

Harmonize all imports across src/ and tests/ to use the barrel
(types/index.ts) instead of direct version-specific type paths, matching
the pattern already established by the OCPP 1.6 handlers.

66 files changed:
eslint.config.js
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/2.0/OCPP20CertificateManager.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
src/charging-station/ocpp/OCPPServiceUtils.ts
src/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.ts
src/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.ts
src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts
src/charging-station/ocpp/auth/interfaces/OCPPAuthService.ts
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts
src/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.ts
src/charging-station/ocpp/auth/types/AuthTypes.ts
src/charging-station/ocpp/index.ts
src/types/index.ts
src/types/ocpp/2.0/index.ts [deleted file]
src/types/ocpp/Requests.ts
src/types/ocpp/Responses.ts
src/types/ocpp/Transaction.ts
tests/charging-station/ocpp/1.6/OCPP16Constants.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-ChangeAvailability.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-Configuration.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-Firmware.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-RemoteStopUnlock.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-Reservation.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-Reset.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-SimpleHandlers.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-SmartCharging.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-ChargingProfiles.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Configuration.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Reservations.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts
tests/charging-station/ocpp/1.6/OCPP16ResponseService-BootAuth.test.ts
tests/charging-station/ocpp/1.6/OCPP16ResponseService-Transactions.test.ts
tests/charging-station/ocpp/1.6/OCPP16ServiceUtils.test.ts
tests/charging-station/ocpp/1.6/OCPP16TestUtils.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GroupIdStop.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-MasterPass.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RemoteStartAuth.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetNetworkProfile.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-BootNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts
tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts
tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts
tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts
tests/charging-station/ocpp/auth/helpers/MockFactories.ts
tests/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.test.ts
tests/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.test.ts
tests/charging-station/ocpp/auth/strategies/CertificateAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy-DisablePostAuthorize.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.test.ts
tests/charging-station/ocpp/auth/types/AuthTypes.test.ts
tests/charging-station/ocpp/auth/utils/AuthHelpers.test.ts
tests/charging-station/ocpp/auth/utils/AuthValidators.test.ts
tests/helpers/OCPPAuthIntegrationTest.ts

index ce1d6d31fc935e03a1bda7e618cc9173a0731139..69be31d7aff4e07fa9be8f40260eba978c295381 100644 (file)
@@ -67,6 +67,7 @@ export default defineConfig([
               'AUTHCTRLR',
               'recloser',
               'deauthorize',
+              'Deauth',
               'DEAUTHORIZE',
               'deauthorized',
               'DEAUTHORIZED',
index 7fd59b9aff8e472e4189f8477d9500e3934c15c7..be7b228b8bbfb6cce59a5a30ebc63f7b6f5dde15 100644 (file)
@@ -9,6 +9,8 @@ import { URL } from 'node:url'
 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 {
@@ -1223,7 +1225,7 @@ export class ChargingStation extends EventEmitter {
     >(this, RequestCommand.STOP_TRANSACTION, {
       meterStop: this.getEnergyActiveImportRegisterByTransactionId(rawTransactionId, true),
       transactionId,
-      ...(reason != null && { reason }),
+      ...(reason != null && { reason: reason as OCPP16StopTransactionReason }),
     })
   }
 
index e255cb2ea0df8ac83d671fab55e7d9a6c695d165..8de4b8836a8b88acd9af770aeaee8c572c8bcabe 100644 (file)
@@ -14,7 +14,7 @@ import {
   GetCertificateIdUseEnumType,
   HashAlgorithmEnumType,
   InstallCertificateUseEnumType,
-} from '../../../types/ocpp/2.0/Common.js'
+} from '../../../types/index.js'
 import { convertToDate, getErrorMessage } from '../../../utils/index.js'
 
 /**
index 99d3c41a1a3463a7c20ea85fcb2fdb2fe3defd30..02fd5234c518c9580b1d83d3fae46852d9606803 100644 (file)
@@ -3,11 +3,6 @@
 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 {
@@ -41,6 +36,11 @@ import {
   type OCPP20CertificateSignedResponse,
   type OCPP20ChangeAvailabilityRequest,
   type OCPP20ChangeAvailabilityResponse,
+  OCPP20ChargingProfileKindEnumType,
+  OCPP20ChargingProfilePurposeEnumType,
+  type OCPP20ChargingProfileType,
+  OCPP20ChargingRateUnitEnumType,
+  type OCPP20ChargingScheduleType,
   type OCPP20ClearCacheResponse,
   OCPP20ComponentName,
   OCPP20ConnectorStatusEnumType,
@@ -66,6 +66,7 @@ import {
   type OCPP20GetVariablesResponse,
   type OCPP20HeartbeatRequest,
   type OCPP20HeartbeatResponse,
+  type OCPP20IdTokenType,
   OCPP20IncomingRequestCommand,
   type OCPP20InstallCertificateRequest,
   type OCPP20InstallCertificateResponse,
@@ -79,6 +80,7 @@ import {
   type OCPP20NotifyReportRequest,
   type OCPP20NotifyReportResponse,
   OCPP20OperationalStatusEnumType,
+  OCPP20ReasonEnumType,
   OCPP20RequestCommand,
   type OCPP20RequestStartTransactionRequest,
   type OCPP20RequestStartTransactionResponse,
@@ -119,12 +121,6 @@ import {
   UpdateFirmwareStatusEnumType,
   UploadLogStatusEnumType,
 } from '../../../types/index.js'
-import {
-  OCPP20ChargingProfileKindEnumType,
-  OCPP20ChargingProfilePurposeEnumType,
-  OCPP20ChargingRateUnitEnumType,
-  OCPP20ReasonEnumType,
-} from '../../../types/ocpp/2.0/Transaction.js'
 import {
   convertToDate,
   generateUUID,
index 9810439b4eaaec213552706d56e5884ccc94a92d..ef07ca6c7278f778c638200baf2a88b0ba7071ca 100644 (file)
@@ -1,15 +1,15 @@
 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,
@@ -18,6 +18,7 @@ import {
   OCPP20RequestCommand,
   type OCPP20SecurityEventNotificationResponse,
   type OCPP20StatusNotificationResponse,
+  OCPP20TransactionEventEnumType,
   type OCPP20TransactionEventRequest,
   type OCPP20TransactionEventResponse,
   OCPPVersion,
@@ -25,10 +26,6 @@ import {
   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'
index 866a36b5bad11ca6a7f83171319ce33c9330b4c7..91d57c8522e5efeca7fda5c2cb956a5c135be34f 100644 (file)
@@ -7,29 +7,25 @@ import {
   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,
index d5b2abcc7430e6839ef6fbc131ecfc93fac501b1..224880b62097133b4305207842df795e68cd895a 100644 (file)
@@ -2075,7 +2075,9 @@ export class OCPPServiceUtils {
     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 (
index 83cd7fe2716d23412bad5b2f4aefc92e4cda7858..678640b741849e8abfd6276559235e8cfcaf0a57 100644 (file)
@@ -11,10 +11,10 @@ import { getConfigurationKey } from '../../../../charging-station/ConfigurationK
 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,
index b805a23ff4db6d40af3ab306d715e6b9afd58f72..22ec843fcd2c5a8975ff1ca870ed60bf3a50b58f 100644 (file)
@@ -1,4 +1,8 @@
-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 {
@@ -10,16 +14,15 @@ 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,
index 27128d716a9c240fd6c1b380c6969a9f5a39c667..026bca555b597b4cc9b4bf5f9da45ff2783f1955 100644 (file)
@@ -9,8 +9,7 @@ import type {
 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'
 
index 6fc794bee1c201a44b7c19970f80257ace89d7a4..d7b54acc9df5b52109fad916a68bda53e5825ea5 100644 (file)
@@ -1,5 +1,4 @@
-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,
index a570d32b7683799928dc68003c24d227b1621f7a..04abcc97bb9a42a1e9b90f2084b866a9ffdc022c 100644 (file)
@@ -1,11 +1,10 @@
-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,
index 6a1fb91b3db872333e12fec73d8acbb7ccba20db..c60a44d1a56734705f6cea67d94e3d99984814a3 100644 (file)
@@ -1,4 +1,4 @@
-import type { OCPPVersion } from '../../../../types/ocpp/OCPPVersion.js'
+import type { OCPPVersion } from '../../../../types/index.js'
 import type {
   AuthCache,
   AuthStrategy,
index 1fba4f6496b4358b44fa5f252c7cf2b41620ef5d..2f7d7bceaebea6718799af9f13454017391eb2ae 100644 (file)
@@ -1,12 +1,11 @@
-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
index 960b0952c095f487ea6b4765ae47ffb2a8a13029..47f32ffc6abc6e680c1207b4ad9053adad1bd9b4 100644 (file)
@@ -1,7 +1,4 @@
-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'
index ed5470e7e364973baf8bdc2a8e5a956633919cf1..e8582e201c58372d04193aa1bb0d785472f2e79d 100644 (file)
@@ -63,6 +63,7 @@ export { OCPP16ChargePointErrorCode } from './ocpp/1.6/ChargePointErrorCode.js'
 export { OCPP16ChargePointStatus } from './ocpp/1.6/ChargePointStatus.js'
 export {
   type OCPP16ChargingProfile,
+  OCPP16ChargingProfileKindType,
   OCPP16ChargingProfilePurposeType,
   OCPP16ChargingRateUnitType,
   type OCPP16ChargingSchedule,
@@ -110,6 +111,7 @@ export {
   type RemoteStartTransactionRequest,
   type RemoteStopTransactionRequest,
   type ResetRequest,
+  ResetType,
   type SetChargingProfileRequest,
   type UnlockConnectorRequest,
 } from './ocpp/1.6/Requests.js'
@@ -117,19 +119,25 @@ export {
   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,
@@ -151,6 +159,7 @@ export {
   type CertificateHashDataType,
   CertificateSigningUseEnumType,
   ChangeAvailabilityStatusEnumType,
+  type ChargingStationType,
   type CustomDataType,
   CustomerInformationStatusEnumType,
   DataEnumType,
@@ -174,6 +183,9 @@ export {
   OCPP20FirmwareStatusEnumType,
   OCPP20OperationalStatusEnumType,
   OCPP20UnitEnumType,
+  OCPPInterfaceEnumType,
+  OCPPTransportEnumType,
+  OCPPVersionEnumType,
   type OCSPRequestDataType,
   ReasonCodeEnumType,
   ReportBaseEnumType,
@@ -266,6 +278,7 @@ export type {
   OCPP20UpdateFirmwareResponse,
 } from './ocpp/2.0/Responses.js'
 export {
+  type AdditionalInfoType,
   type ComponentType,
   OCPP20AuthorizationStatusEnumType,
   OCPP20ChargingProfileKindEnumType,
@@ -274,9 +287,16 @@ export {
   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,
diff --git a/src/types/ocpp/2.0/index.ts b/src/types/ocpp/2.0/index.ts
deleted file mode 100644 (file)
index 0d56994..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-export type { OCPP20MeterValue } from './MeterValues.js'
-export type {
-  OCPP20ChargingStateEnumType,
-  OCPP20EVSEType,
-  OCPP20IdTokenInfoType,
-  OCPP20IdTokenType,
-  OCPP20ReasonEnumType,
-  OCPP20TransactionEventEnumType,
-  OCPP20TransactionEventOptions,
-  OCPP20TransactionEventRequest,
-} from './Transaction.js'
index 566514c4bd7c825228be5021df6f1993a0108e52..3cc1df8b43e0736a9863e4efc579c25cf77cbd36 100644 (file)
@@ -21,10 +21,16 @@ import {
   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,
@@ -39,7 +45,7 @@ export type CachedRequest = [
   JsonType
 ]
 
-export type DataTransferRequest = OCPP16DataTransferRequest
+export type DataTransferRequest = OCPP16DataTransferRequest | OCPP20DataTransferRequest
 
 export type DiagnosticsStatusNotificationRequest = OCPP16DiagnosticsStatusNotificationRequest
 
@@ -49,7 +55,8 @@ export type FirmwareStatusNotificationRequest =
   | 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]
 
@@ -83,9 +90,10 @@ export interface RequestParams {
 
 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
 
index ef7e95eda52948e64e41b4ff89a51f6435e11f78..58ccd5db68d30014f70befefa15445c2708c3838 100644 (file)
@@ -2,7 +2,14 @@ import type { ChargingStation } from '../../charging-station/index.js'
 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'
 
@@ -22,6 +29,12 @@ import {
   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 =
@@ -32,15 +45,18 @@ export type CancelReservationResponse = GenericResponse
 
 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
@@ -53,13 +69,17 @@ export type ResponseHandler = (
   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,
@@ -81,21 +101,24 @@ export type ConfigurationStatus = OCPP16ConfigurationStatus
 
 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,
index 83f16acc4fcc14d086495402e48c3e2cd1b90040..4bf4f778825021b1e5550763b455c11666c2acb9 100644 (file)
@@ -8,12 +8,14 @@ import {
   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
 
@@ -25,9 +27,10 @@ export type StartTransactionResponse = OCPP16StartTransactionResponse
 
 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
 
index bde3b6a4d8b3875b58fcc8149377fe796b80bf49..b4665cc2cd5e6dd55a3d75991a25cbce942d4ac2 100644 (file)
@@ -6,7 +6,7 @@ import assert from 'node:assert/strict'
 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 () => {
index 85449f372d46cf418351d726953a37e06df82ac6..426785aca23f2fa8ac294dcf58a417ad13140f61 100644 (file)
@@ -12,10 +12,10 @@ import type { ChargingStation } from '../../../../src/charging-station/ChargingS
 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'
 
index b9567e79b26632a304f980e3d49855c37032da80..324991c76cb006c0b4a33f743961af513c971d8c 100644 (file)
@@ -12,8 +12,10 @@ import type {
   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,
index d5038ac41eed1009d9d33d9dbaef7036ecd90c91..bc1646c33b10e07848cc7ce666a2720f3c3fe145 100644 (file)
@@ -11,12 +11,12 @@ import type { GetDiagnosticsRequest } from '../../../../src/types/index.js'
 
 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,
index 9a4e4a8da5814bd7a0036473d5c9b64d24022170..56d2e609d3af34f80411b00bc38771c741a06e44 100644 (file)
@@ -10,15 +10,16 @@ import { afterEach, beforeEach, describe, it, mock } from 'node:test'
 
 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,
index 74fb0a7ab595afa3b346da2b5041791d26dd6c45..44b2b04449c8894c8f320f9ec3c7f7395ebf8065 100644 (file)
@@ -17,9 +17,9 @@ import {
   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,
index 91be4938eca9d51a230481043259315d537aa1eb..77f752146e301a6f8cb341f4280dd558a79c2af9 100644 (file)
@@ -8,8 +8,7 @@ import { afterEach, beforeEach, describe, it } from 'node:test'
 
 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,
index c953f7efca7c8540cae5d9c3307e8af0d01d6828..e6b49eac37aaee2447dea11fc2bd537b7457b777 100644 (file)
@@ -6,7 +6,7 @@
 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,
index e2b6c58d250d7b6d8116152fe8dc7216af5d3e43..c69dd972e4533753566a949b491b2435d67025fb 100644 (file)
@@ -13,12 +13,13 @@ import type {
   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,
index 17a602055095a4b273f21eab40719909af77dc20..ad3eef641aa039d1998d836ccee6303ce789a3bd 100644 (file)
@@ -9,22 +9,21 @@ import assert from 'node:assert/strict'
 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,
index dbe1216a99ca66e6b5643aca8b1faa0702208192..6e9a251321b2f7a48f0db618222aba9cbcda11cc 100644 (file)
@@ -13,8 +13,10 @@ import type {
   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,
index 9994f6e6de3d3d95ca7b9ddb76700a21d333c395..19f2952f8b0c854103e18be364434c58dbd8dee6 100644 (file)
@@ -18,9 +18,9 @@ import type {
 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,
index 4d9b8f88291ff202c8901958ad0c1b1e9dd22627..9b9e5d0de7aa14368964f876112dd03e5fbc898e 100644 (file)
@@ -12,16 +12,14 @@ import { afterEach, beforeEach, describe, it } from 'node:test'
 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'
@@ -29,12 +27,12 @@ import { OCPP16ResponseService as OCPP16ResponseServiceClass } from '../../../..
 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,
index 442a02f09c6e5f694873741b6b994c37583913b0..2f734751f2be7e7ddd397d28dd8efbba18d94567 100644 (file)
@@ -16,7 +16,7 @@ import { afterEach, beforeEach, describe, it, mock } from 'node:test'
 import type {
   OCPP16AuthorizeRequest,
   OCPP16AuthorizeResponse,
-} from '../../../../src/types/ocpp/1.6/Transaction.js'
+} from '../../../../src/types/index.js'
 
 import {
   ChargingStationEvents,
index 09fd6caf25886771b1fa713aa68c38c077bac42d..f87d80dde73e609289c35fc028bf67a00b325f00 100644 (file)
@@ -15,11 +15,13 @@ import type {
   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,
index ded3c30a7d22d10fb7a5fd02ffa57cd894d97a5b..45d0a4bed81c9771af47aa5d836aa82ec7f56251 100644 (file)
@@ -13,6 +13,7 @@ import { OCPP16ServiceUtils } from '../../../../src/charging-station/ocpp/1.6/OC
 import { OCPPServiceUtils } from '../../../../src/charging-station/ocpp/OCPPServiceUtils.js'
 import {
   type OCPP16ChargingProfile,
+  OCPP16ChargingProfileKindType,
   OCPP16ChargingProfilePurposeType,
   OCPP16ChargingRateUnitType,
   type OCPP16ChargingSchedule,
@@ -27,7 +28,6 @@ import {
   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'
index ea99cf8b2e0193c18c45f637892f3c949dffc3a4..b456dff699be98d5968852322ce35d9e64b308aa 100644 (file)
@@ -9,14 +9,15 @@ import { mock } from 'node:test'
 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,
@@ -28,13 +29,13 @@ import { OCPP16IncomingRequestService } from '../../../../src/charging-station/o
 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 {
index 22f82e65abe15a0b1bf7efc4168f353a593d24f4..bf6d8c1a3d3d0fc7b69a004804ab540aa35b247c 100644 (file)
@@ -15,10 +15,10 @@ 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'
index c84ae05df4a1cebde619dd292a9f8b80e8a63e6f..29eb13c8122e3180631c47c4be7a700237c3d593 100644 (file)
@@ -29,8 +29,8 @@ import {
   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 {
index 0447013dc0af193b9d9fa1f74cf5aa8c22d112db..db4cd1837356af53a6a352daafbc61ccb615808f 100644 (file)
@@ -12,8 +12,10 @@ import type { OCPP20RequestStartTransactionRequest } from '../../../../src/types
 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'
index 3e0ad1c7fa4b485553b08aec51a7c90d1350576b..cc16925ba8610edc0ac1610603c22663e834443d 100644 (file)
@@ -15,10 +15,10 @@ import { OCPP20VariableManager } from '../../../../src/charging-station/ocpp/2.0
 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'
index ee1e01640cf4b095838e6ef0a0767653d3491f11..97c3f34754a9d3cc4a232ac4f082a25f6af5414f 100644 (file)
@@ -12,17 +12,15 @@ import type { ConnectorStatus } from '../../../../src/types/ConnectorStatus.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 () => {
index 82e065f7745578208a270e875018b239fe4d46be..4a65d95b5f2a96e528c61cf712e8863b3f3e06e8 100644 (file)
@@ -9,19 +9,20 @@ import { afterEach, beforeEach, describe, it } from 'node:test'
 
 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,
@@ -29,11 +30,6 @@ import {
   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'
index 2d5b0a8b7a2788ac761a7efb69ef0940860263c4..85ff25fa581c25fb08dd69988deb0ad99e384e86 100644 (file)
@@ -21,17 +21,15 @@ import { createTestableIncomingRequestService } from '../../../../src/charging-s
 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'
index 0a537e9841ca9c30d0b539781e84ce54fd2a1293..42e034908caa663e9bd340e654e4e001c83a9a19 100644 (file)
@@ -12,15 +12,13 @@ import { createTestableIncomingRequestService } from '../../../../src/charging-s
 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'
index 0d8b324093c7753d1f19d010688e962a9ac70325..96ce6e54610d547077a9cd42a5e134ea5b4d94cb 100644 (file)
@@ -9,10 +9,10 @@ import type { ChargingStation } from '../../../../src/charging-station/index.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,
index a3cd6f2e2257b83602726744b78fa3e9142f7c3c..91ff90579d4271d1100fe338fac7d8ca70f7bd59 100644 (file)
@@ -17,8 +17,7 @@ import {
   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'
 
index d1c581501c77eb4f9fecec57732a198b81a4d88d..2ccc4b041490fb11c6aa6b719a6d256e23af1cb3 100644 (file)
@@ -16,13 +16,13 @@ import type { UUIDv4 } from '../../../../src/types/UUID.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,
index 1f0915c0da13cb60e150479eadfed2378116053f..24f4f97bb39ac1d1246a462150c3eafdc15ee682 100644 (file)
@@ -24,26 +24,20 @@ import { OCPP20VariableManager } from '../../../../src/charging-station/ocpp/2.0
 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'
index bdd112a5a03d0fed4da3a84adbf2a4d0645889f3..4f85642978bc7ede4a45dbc022332a4079a7466c 100644 (file)
@@ -13,10 +13,10 @@ import type {
   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'
@@ -24,10 +24,10 @@ import {
   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 {
index 0958d034557d7d5b19ae6dc0fd42d78373f34900..0b8fb2282557688715a2505f7964578c85d67aeb 100644 (file)
@@ -30,9 +30,9 @@ 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'
index 5dae7cf34b58d1b52e1e71927f09ac488d8c1ff9..ae45818f8caaf6aa9fc836139e06dc335dd71cb5 100644 (file)
@@ -18,7 +18,7 @@ import {
   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 {
index 238b108d6f8e6ac71a0501cf8c488015f343549a..be453597459a577e10b48120d278999351334406 100644 (file)
@@ -6,7 +6,7 @@ import assert from 'node:assert/strict'
 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 {
@@ -16,8 +16,7 @@ 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'
 
index cabe073e56a643e34efbcdea94f234aa22183cb5..1619637c8009ffbc2b7d2f01379af8063ef8b2d9 100644 (file)
@@ -20,8 +20,8 @@ import {
   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'
 
index c84008a2efdb7d36b41a79a493bdbebb0f6e86b3..88f71e7debc1c60ec2cca76b59507912879ad7ad 100644 (file)
@@ -9,7 +9,7 @@ import { afterEach, describe, it } from 'node:test'
 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'
index b303bd9a4c214e7f2f1ca5a63f581698c5196615..1a100b58085ac034637fcea57de9f59f1d0a4899 100644 (file)
@@ -23,7 +23,7 @@ import {
   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
index 1090c4d2c7405c92963f504e19aae288582e8d03..645a7292005bc9a8dc214808c3a381a7534bfa62 100644 (file)
@@ -8,7 +8,7 @@ import { afterEach, beforeEach, describe, it } from 'node:test'
 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'
 
index abbbc7ede2b2cd05bfb5e7fc3ae00d0aa69184e3..5285371be8ca9841598392ce9fc8b5ed10189312 100644 (file)
@@ -17,7 +17,7 @@ import {
   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'
 
index 88c837f9046fc777da1a9a97ccdeba3a0af5f650..40258482639ea7f3ea7b6ed8a7ad18cd6c23cffc 100644 (file)
@@ -15,7 +15,7 @@ import {
   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,
index c383a49f7676e5b5053a3e45747087a9d97371f6..3573265b546edbbb589bf3aae5797e16fb9a6fbe 100644 (file)
@@ -11,7 +11,7 @@ import {
   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,
index f6534e1d1a33b020a6d50a65186d5775ca5b8a87..b684a91bfcdda7dfa0fcf5e964da626d9af807b7 100644 (file)
@@ -18,7 +18,7 @@ import {
   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,
index 9ebbb81f6e330214f95280d91e2cbbda8d4bc1e1..58fa2cef1a53bab6d0273566e7f7839ef5df9955 100644 (file)
@@ -19,7 +19,7 @@ import {
   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,
index 9ff15c616f23817506b84fcb712139d6814491e8..2d934f6d535cd8d279ae79830ac94f181f9a178f 100644 (file)
@@ -22,12 +22,12 @@ import {
   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 () => {
index 653561cd623575c5af32794da98feda37a3e695a..d59523f5cfb4ac45eeb98337b1020a2fdea69f3f 100644 (file)
@@ -14,7 +14,7 @@ import {
   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 () => {
index 80c6b81b65eb696ca9273eaa537d376804f5d5d4..9eceffa428ea332b1d876d0737af3d69e6735e5d 100644 (file)
@@ -11,7 +11,7 @@ import {
   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 () => {
index 18a5b1e8a8ff077ecadf632f81a8d19afdbbdbeb..0f0b38522f352909c7f57411f0b56f752aefb6e9 100644 (file)
@@ -13,7 +13,7 @@ import {
   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 {