Commit | Line | Data |
---|---|---|
f738a0e9 JB |
1 | import { MeterValue } from './MeterValues'; |
2 | ||
9ac86a7e JB |
3 | export enum StopTransactionReason { |
4 | NONE = '', | |
5 | EMERGENCY_STOP = 'EmergencyStop', | |
6 | EV_DISCONNECTED = 'EVDisconnected', | |
7 | HARD_RESET = 'HardReset', | |
8 | LOCAL = 'Local', | |
9 | OTHER = 'Other', | |
10 | POWER_LOSS = 'PowerLoss', | |
11 | REBOOT = 'Reboot', | |
12 | REMOTE = 'Remote', | |
13 | SOFT_RESET = 'SoftReset', | |
14 | UNLOCK_COMMAND = 'UnlockCommand', | |
15 | DE_AUTHORIZED = 'DeAuthorized' | |
16 | } | |
17 | ||
18 | export enum AuthorizationStatus { | |
19 | ACCEPTED = 'Accepted', | |
20 | BLOCKED = 'Blocked', | |
21 | EXPIRED = 'Expired', | |
22 | INVALID = 'Invalid', | |
6ad94506 | 23 | CONCURRENT_TX = 'ConcurrentTx' |
9ac86a7e JB |
24 | } |
25 | ||
26 | export interface IdTagInfo { | |
27 | status: AuthorizationStatus; | |
28 | parentIdTag?: string; | |
29 | expiryDate?: Date; | |
30 | } | |
31 | ||
ef6076c1 J |
32 | export interface AuthorizeRequest { |
33 | idTag: string; | |
34 | ||
35 | } | |
36 | export interface AuthorizeResponse { | |
37 | idTagInfo: IdTagInfo; | |
38 | } | |
39 | ||
f738a0e9 JB |
40 | export interface StartTransactionRequest { |
41 | connectorId: number; | |
42 | idTag: string; | |
43 | meterStart: number; | |
44 | reservationId?: number; | |
45 | timestamp: string; | |
46 | } | |
47 | ||
9ac86a7e JB |
48 | export interface StartTransactionResponse { |
49 | idTagInfo: IdTagInfo; | |
50 | transactionId: number; | |
51 | } | |
52 | ||
f738a0e9 JB |
53 | export interface StopTransactionRequest { |
54 | idTag?: string; | |
55 | meterStop: number; | |
56 | timestamp: string; | |
57 | transactionId: number; | |
58 | reason?: StopTransactionReason; | |
59 | transactionData?: MeterValue[]; | |
60 | } | |
61 | ||
9ac86a7e JB |
62 | export interface StopTransactionResponse { |
63 | idTagInfo?: IdTagInfo; | |
64 | } |