| 1 | import { MeterValue } from './MeterValues'; |
| 2 | |
| 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', |
| 23 | CONCURRENT_TX = 'ConcurrentTx' |
| 24 | } |
| 25 | |
| 26 | export interface IdTagInfo { |
| 27 | status: AuthorizationStatus; |
| 28 | parentIdTag?: string; |
| 29 | expiryDate?: Date; |
| 30 | } |
| 31 | |
| 32 | export interface StartTransactionRequest { |
| 33 | connectorId: number; |
| 34 | idTag: string; |
| 35 | meterStart: number; |
| 36 | reservationId?: number; |
| 37 | timestamp: string; |
| 38 | } |
| 39 | |
| 40 | export interface StartTransactionResponse { |
| 41 | idTagInfo: IdTagInfo; |
| 42 | transactionId: number; |
| 43 | } |
| 44 | |
| 45 | export interface StopTransactionRequest { |
| 46 | idTag?: string; |
| 47 | meterStop: number; |
| 48 | timestamp: string; |
| 49 | transactionId: number; |
| 50 | reason?: StopTransactionReason; |
| 51 | transactionData?: MeterValue[]; |
| 52 | } |
| 53 | |
| 54 | export interface StopTransactionResponse { |
| 55 | idTagInfo?: IdTagInfo; |
| 56 | } |