X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftypes%2Focpp%2F1.6%2FTransaction.ts;h=58f7e96c0f8ce8863bfd5e81f5e9b0a1f05774f7;hb=a807045be19c1ed4996a44d8c2c8774e926dc6dc;hp=13d6df642d365fb2468a6cd97750b9f550f0e4dd;hpb=ef6fa3fb6f4872fc57bae634ac3edb8164a0bc79;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/1.6/Transaction.ts b/src/types/ocpp/1.6/Transaction.ts index 13d6df64..58f7e96c 100644 --- a/src/types/ocpp/1.6/Transaction.ts +++ b/src/types/ocpp/1.6/Transaction.ts @@ -1,8 +1,7 @@ -import { JsonType } from '../../JsonType'; -import { OCPP16MeterValue } from './MeterValues'; +import type { OCPP16MeterValue } from './MeterValues.js' +import type { JsonObject } from '../../JsonType.js' export enum OCPP16StopTransactionReason { - NONE = '', EMERGENCY_STOP = 'EmergencyStop', EV_DISCONNECTED = 'EVDisconnected', HARD_RESET = 'HardReset', @@ -24,42 +23,42 @@ export enum OCPP16AuthorizationStatus { CONCURRENT_TX = 'ConcurrentTx', } -export interface IdTagInfo extends JsonType { - status: OCPP16AuthorizationStatus; - parentIdTag?: string; - expiryDate?: Date; +interface IdTagInfo extends JsonObject { + status: OCPP16AuthorizationStatus + parentIdTag?: string + expiryDate?: Date } -export interface OCPP16AuthorizeRequest extends JsonType { - idTag: string; +export interface OCPP16AuthorizeRequest extends JsonObject { + idTag: string } -export interface OCPP16AuthorizeResponse extends JsonType { - idTagInfo: IdTagInfo; +export interface OCPP16AuthorizeResponse extends JsonObject { + idTagInfo: IdTagInfo } -export interface OCPP16StartTransactionRequest extends JsonType { - connectorId: number; - idTag: string; - meterStart: number; - reservationId?: number; - timestamp: string; +export interface OCPP16StartTransactionRequest extends JsonObject { + connectorId: number + idTag: string + meterStart: number + timestamp: Date + reservationId?: number } -export interface OCPP16StartTransactionResponse extends JsonType { - idTagInfo: IdTagInfo; - transactionId: number; +export interface OCPP16StartTransactionResponse extends JsonObject { + idTagInfo: IdTagInfo + transactionId: number } -export interface OCPP16StopTransactionRequest extends JsonType { - idTag?: string; - meterStop: number; - timestamp: string; - transactionId: number; - reason?: OCPP16StopTransactionReason; - transactionData?: OCPP16MeterValue[]; +export interface OCPP16StopTransactionRequest extends JsonObject { + idTag?: string + meterStop: number + timestamp: Date + transactionId: number + reason?: OCPP16StopTransactionReason + transactionData?: OCPP16MeterValue[] } -export interface OCPP16StopTransactionResponse extends JsonType { - idTagInfo?: IdTagInfo; +export interface OCPP16StopTransactionResponse extends JsonObject { + idTagInfo?: IdTagInfo }