Remove string literal from log messages
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Transaction.ts
CommitLineData
c3ee95af 1import { JsonType } from '../../JsonType';
fd0c36fa 2import { OCPP16MeterValue } from './MeterValues';
f738a0e9 3
c0560973 4export enum OCPP16StopTransactionReason {
9ac86a7e
JB
5 NONE = '',
6 EMERGENCY_STOP = 'EmergencyStop',
7 EV_DISCONNECTED = 'EVDisconnected',
8 HARD_RESET = 'HardReset',
9 LOCAL = 'Local',
10 OTHER = 'Other',
11 POWER_LOSS = 'PowerLoss',
12 REBOOT = 'Reboot',
13 REMOTE = 'Remote',
14 SOFT_RESET = 'SoftReset',
15 UNLOCK_COMMAND = 'UnlockCommand',
16 DE_AUTHORIZED = 'DeAuthorized'
17}
18
c0560973 19export enum OCPP16AuthorizationStatus {
9ac86a7e
JB
20 ACCEPTED = 'Accepted',
21 BLOCKED = 'Blocked',
22 EXPIRED = 'Expired',
23 INVALID = 'Invalid',
6ad94506 24 CONCURRENT_TX = 'ConcurrentTx'
9ac86a7e
JB
25}
26
c3ee95af 27export interface IdTagInfo extends JsonType {
c0560973 28 status: OCPP16AuthorizationStatus;
9ac86a7e
JB
29 parentIdTag?: string;
30 expiryDate?: Date;
31}
32
c3ee95af 33export interface AuthorizeRequest extends JsonType {
ef6076c1 34 idTag: string;
ef6076c1 35}
163547b1 36
c3ee95af 37export interface OCPP16AuthorizeResponse extends JsonType {
ef6076c1
J
38 idTagInfo: IdTagInfo;
39}
40
c3ee95af 41export interface StartTransactionRequest extends JsonType {
f738a0e9
JB
42 connectorId: number;
43 idTag: string;
44 meterStart: number;
45 reservationId?: number;
46 timestamp: string;
47}
48
c3ee95af 49export interface OCPP16StartTransactionResponse extends JsonType {
9ac86a7e
JB
50 idTagInfo: IdTagInfo;
51 transactionId: number;
52}
53
c3ee95af 54export interface StopTransactionRequest extends JsonType {
f738a0e9
JB
55 idTag?: string;
56 meterStop: number;
57 timestamp: string;
58 transactionId: number;
c0560973 59 reason?: OCPP16StopTransactionReason;
fd0c36fa 60 transactionData?: OCPP16MeterValue[];
f738a0e9
JB
61}
62
c3ee95af 63export interface OCPP16StopTransactionResponse extends JsonType {
9ac86a7e
JB
64 idTagInfo?: IdTagInfo;
65}