X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FTransaction.ts;h=215628f79a650aeaf7069aeb4d2a971f79efe7cf;hb=411894569d4a0333a4e38e911a178520a69448cd;hp=69aff0e0115b3849bbf9e8b1a8ced5fe6536a8f3;hpb=c0560973d259dbce64a24d10bab46246596fa1d5;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 69aff0e0..215628f7 100644 --- a/src/types/ocpp/1.6/Transaction.ts +++ b/src/types/ocpp/1.6/Transaction.ts @@ -1,4 +1,4 @@ -import { MeterValue } from './MeterValues'; +import type { JsonObject, OCPP16MeterValue } from '../../internal'; export enum OCPP16StopTransactionReason { NONE = '', @@ -12,7 +12,7 @@ export enum OCPP16StopTransactionReason { REMOTE = 'Remote', SOFT_RESET = 'SoftReset', UNLOCK_COMMAND = 'UnlockCommand', - DE_AUTHORIZED = 'DeAuthorized' + DE_AUTHORIZED = 'DeAuthorized', } export enum OCPP16AuthorizationStatus { @@ -20,45 +20,45 @@ export enum OCPP16AuthorizationStatus { BLOCKED = 'Blocked', EXPIRED = 'Expired', INVALID = 'Invalid', - CONCURRENT_TX = 'ConcurrentTx' + CONCURRENT_TX = 'ConcurrentTx', } -export interface IdTagInfo { +interface IdTagInfo extends JsonObject { status: OCPP16AuthorizationStatus; parentIdTag?: string; expiryDate?: Date; } -export interface AuthorizeRequest { +export interface OCPP16AuthorizeRequest extends JsonObject { idTag: string; - } -export interface OCPP16AuthorizeResponse { + +export interface OCPP16AuthorizeResponse extends JsonObject { idTagInfo: IdTagInfo; } -export interface StartTransactionRequest { +export interface OCPP16StartTransactionRequest extends JsonObject { connectorId: number; idTag: string; meterStart: number; + timestamp: Date; reservationId?: number; - timestamp: string; } -export interface OCPP16StartTransactionResponse { +export interface OCPP16StartTransactionResponse extends JsonObject { idTagInfo: IdTagInfo; transactionId: number; } -export interface StopTransactionRequest { +export interface OCPP16StopTransactionRequest extends JsonObject { idTag?: string; meterStop: number; - timestamp: string; + timestamp: Date; transactionId: number; reason?: OCPP16StopTransactionReason; - transactionData?: MeterValue[]; + transactionData?: OCPP16MeterValue[]; } -export interface OCPP16StopTransactionResponse { +export interface OCPP16StopTransactionResponse extends JsonObject { idTagInfo?: IdTagInfo; }