X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FTransaction.ts;h=8824d1bc07499c7d0d52258c9ba8b0ab09d493fc;hb=28f1c5749ad4ee138c34c345a7bd812b40ccbcfa;hp=13d6df642d365fb2468a6cd97750b9f550f0e4dd;hpb=794aea9d3e6b713d55bf5adb06faa211206cfa77;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..8824d1bc 100644 --- a/src/types/ocpp/1.6/Transaction.ts +++ b/src/types/ocpp/1.6/Transaction.ts @@ -1,5 +1,4 @@ -import { JsonType } from '../../JsonType'; -import { OCPP16MeterValue } from './MeterValues'; +import type { JsonObject, OCPP16MeterValue } from '../../internal'; export enum OCPP16StopTransactionReason { NONE = '', @@ -24,42 +23,42 @@ export enum OCPP16AuthorizationStatus { CONCURRENT_TX = 'ConcurrentTx', } -export interface IdTagInfo extends JsonType { +export interface IdTagInfo extends JsonObject { status: OCPP16AuthorizationStatus; parentIdTag?: string; expiryDate?: Date; } -export interface OCPP16AuthorizeRequest extends JsonType { +export interface OCPP16AuthorizeRequest extends JsonObject { idTag: string; } -export interface OCPP16AuthorizeResponse extends JsonType { +export interface OCPP16AuthorizeResponse extends JsonObject { idTagInfo: IdTagInfo; } -export interface OCPP16StartTransactionRequest extends JsonType { +export interface OCPP16StartTransactionRequest extends JsonObject { connectorId: number; idTag: string; meterStart: number; + timestamp: Date; reservationId?: number; - timestamp: string; } -export interface OCPP16StartTransactionResponse extends JsonType { +export interface OCPP16StartTransactionResponse extends JsonObject { idTagInfo: IdTagInfo; transactionId: number; } -export interface OCPP16StopTransactionRequest extends JsonType { +export interface OCPP16StopTransactionRequest extends JsonObject { idTag?: string; meterStop: number; - timestamp: string; + timestamp: Date; transactionId: number; reason?: OCPP16StopTransactionReason; transactionData?: OCPP16MeterValue[]; } -export interface OCPP16StopTransactionResponse extends JsonType { +export interface OCPP16StopTransactionResponse extends JsonObject { idTagInfo?: IdTagInfo; }