-import { OCPP16MeterValue } from './MeterValues';
+import type { OCPP16MeterValue } from './MeterValues';
+import type { JsonObject } from '../../JsonType';
export enum OCPP16StopTransactionReason {
NONE = '',
REMOTE = 'Remote',
SOFT_RESET = 'SoftReset',
UNLOCK_COMMAND = 'UnlockCommand',
- DE_AUTHORIZED = 'DeAuthorized'
+ DE_AUTHORIZED = 'DeAuthorized',
}
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?: OCPP16MeterValue[];
}
-export interface OCPP16StopTransactionResponse {
+export interface OCPP16StopTransactionResponse extends JsonObject {
idTagInfo?: IdTagInfo;
}