diff --git a/genTypeFromJson.js b/genTypeFromJson.js new file mode 100644 index 0000000..d5ca4da --- /dev/null +++ b/genTypeFromJson.js @@ -0,0 +1,45 @@ +const { compile } = require('json-schema-to-typescript'); +const fs = require('fs'); +const ocpp1_6_json = require('./lib/schemas/ocpp1_6.json'); +const ocpp2_0_1json = require('./lib/schemas/ocpp2_0_1.json'); +const jsonArray = [ + { + version: 'v16', + json: ocpp1_6_json + }, + { + version: 'v201', + json: ocpp2_0_1json + } +]; +/** + * + * @param {string} id $if of schema + * @returns {string} The name used for namespace and filename + */ +const compileSchemaId = (id) => { + const [method, type] = id.substring(4).split('.'); + switch (type) { + case 'req': + return method + 'Request'; + case 'conf': + return method + 'Response'; + default: + throw Error('Invalid Schema $id:' + id) + } +} +(async function loop() { + for (const data of jsonArray) { + console.log(data.version); + for (const schema of data.json) { + const name = compileSchemaId(schema.$id); + const ts = await compile(schema, name, { + // The array type will be too large if the maxItem property is too large. + // Ref: https://github.com/bcherny/json-schema-to-typescript/issues/372 + ignoreMinAndMaxItems: true + }) + await fs.writeFileSync(`./lib/types/${data.version}/${name}.d.ts`, ts); + console.log(name); + } + } +})() \ No newline at end of file diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..99ab52f --- /dev/null +++ b/index.d.ts @@ -0,0 +1,452 @@ +declare module 'ocpp-rpc' { + import Ajv, { ValidateFunction } from 'ajv'; + import { WebSocket } from '@types/ws'; + import { ExponentialStrategy } from '@types/backoff'; + import { EventEmitter } from 'events'; + import { URLSearchParams } from 'url'; + import { IncomingMessage, IncomingHttpHeaders, OutgoingHttpHeaders, Server as HttpServer } from 'http'; + import { Duplex } from 'stream'; + import errors from 'ocpp-rpc/lib/errors'; + import symbols from 'ocpp-rpc/lib/symbols'; + import { Ocpp20Types } from 'ocpp-standard-schema'; // WIP + + interface OCPPTypes { + Authorize: { + request: Ocpp20Types.AuthorizeRequest, + response: Ocpp20Types.AuthorizeResponse, + }; + BootNotification: { + request: Ocpp20Types.BootNotificationRequest, + response: Ocpp20Types.BootNotificationResponse, + }; + CancelReservation: { + request: Ocpp20Types.CancelReservationRequest, + response: Ocpp20Types.CancelReservationResponse, + }; + // CertificateSigned: { + // request: Ocpp20Types.CertificateSignedRequest, + // response: Ocpp20Types.CertificateSignedResponse, + // } + ChangeAvailability: { + request: Ocpp20Types.ChangeAvailabilityRequest, + response: Ocpp20Types.ChangeAvailabilityResponse, + }; + ClearCache: { + request: Ocpp20Types.ClearCacheRequest, + response: Ocpp20Types.ClearCacheResponse, + }; + ClearChargingProfile: { + request: Ocpp20Types.ClearChargingProfileRequest, + response: Ocpp20Types.ClearChargingProfileResponse, + }; + ClearDisplayMessage: { + request: Ocpp20Types.ClearDisplayMessageRequest, + response: Ocpp20Types.ClearDisplayMessageResponse, + }; + ClearedChargingLimit: { + request: Ocpp20Types.ClearedChargingLimitRequest, + response: Ocpp20Types.ClearedChargingLimitResponse, + }; + ClearVariableMonitoring: { + request: Ocpp20Types.ClearVariableMonitoringRequest, + response: Ocpp20Types.ClearVariableMonitoringResponse, + }; + CostUpdate: { + request: Ocpp20Types.CostUpdatedRequest, + response: Ocpp20Types.CostUpdatedResponse, + }; + CustomerInformation: { + request: Ocpp20Types.CustomerInformationRequest, + response: Ocpp20Types.CustomerInformationResponse, + }; + DataTransfer: { + request: Ocpp20Types.DataTransferRequest, + response: Ocpp20Types.DataTransferResponse, + }; + DeleteCertificate: { + request: Ocpp20Types.DeleteCertificateRequest, + response: Ocpp20Types.DeleteCertificateResponse, + }; + FirmwareStatusNotification: { + request: Ocpp20Types.FirmwareStatusNotificationRequest, + response: Ocpp20Types.FirmwareStatusNotificationResponse, + }; + Get15118EVCertificate: { + request: Ocpp20Types.Get15118EVCertificateRequest, + response: Ocpp20Types.Get15118EVCertificateResponse, + }; + GetBaseReport: { + request: Ocpp20Types.GetBaseReportRequest, + response: Ocpp20Types.GetBaseReportResponse, + }; + GetCertificateStatus: { + request: Ocpp20Types.GetCertificateStatusRequest, + response: Ocpp20Types.GetCertificateStatusResponse, + }; + GetChargingProfiles: { + request: Ocpp20Types.GetChargingProfilesRequest, + response: Ocpp20Types.GetChargingProfilesResponse, + }; + GetCompositeSchedule: { + request: Ocpp20Types.GetCompositeScheduleRequest, + response: Ocpp20Types.GetCompositeScheduleResponse, + }; + GetDisplayMessages: { + request: Ocpp20Types.GetDisplayMessagesRequest, + response: Ocpp20Types.GetDisplayMessagesResponse, + }; + GetInstalledCertificateIds: { + request: Ocpp20Types.GetInstalledCertificateIdsRequest, + response: Ocpp20Types.GetInstalledCertificateIdsResponse, + }; + GetLocalListVersion: { + request: Ocpp20Types.GetLocalListVersionRequest, + response: Ocpp20Types.GetLocalListVersionResponse, + }; + GetLog: { + request: Ocpp20Types.GetLogRequest, + response: Ocpp20Types.GetLogResponse, + }; + GetMonitoringReport: { + request: Ocpp20Types.GetMonitoringReportRequest, + response: Ocpp20Types.GetMonitoringReportResponse, + }; + GetReport: { + request: Ocpp20Types.GetReportRequest, + response: Ocpp20Types.GetReportResponse, + }; + GetTransactionStatus: { + request: Ocpp20Types.GetTransactionStatusRequest, + response: Ocpp20Types.GetTransactionStatusResponse, + }; + GetVariables: { + request: Ocpp20Types.GetVariablesRequest, + response: Ocpp20Types.GetVariablesResponse, + }; + Heartbeat: { + request: Ocpp20Types.HeartbeatRequest, + response: Ocpp20Types.HeartbeatResponse, + }; + InstallCertificate: { + request: Ocpp20Types.InstallCertificateRequest, + response: Ocpp20Types.InstallCertificateResponse, + }; + LogStatusNotification: { + request: Ocpp20Types.LogStatusNotificationRequest, + response: Ocpp20Types.LogStatusNotificationResponse, + }; + MeterValues: { + request: Ocpp20Types.MeterValuesRequest, + response: Ocpp20Types.MeterValuesResponse, + }; + // NotifyChargingLimit: { + // request: Ocpp20Types.NotifyChargingLimitRequest, + // response: Ocpp20Types.NotifyChargingLimitResponse, + // } + NotifyCustomerInformation: { + request: Ocpp20Types.NotifyCustomerInformationRequest, + response: Ocpp20Types.NotifyCustomerInformationResponse, + }; + NotifyDisplayMessages: { + request: Ocpp20Types.NotifyDisplayMessagesRequest, + response: Ocpp20Types.NotifyDisplayMessagesResponse, + }; + NotifyEVChargingNeeds: { + request: Ocpp20Types.NotifyEVChargingNeedsRequest, + response: Ocpp20Types.NotifyEVChargingNeedsResponse, + }; + // NotifyEVChargingSchedule: { + // request: Ocpp20Types.NotifyEVChargingScheduleRequest, + // response: Ocpp20Types.NotifyEVChargingScheduleResponse, + // } + NotifyEvent: { + request: Ocpp20Types.NotifyEventRequest, + response: Ocpp20Types.NotifyEventResponse, + }; + NotifyMonitoringReport: { + request: Ocpp20Types.NotifyMonitoringReportRequest, + response: Ocpp20Types.NotifyMonitoringReportResponse, + }; + NotifyReport: { + request: Ocpp20Types.NotifyReportRequest, + response: Ocpp20Types.NotifyReportResponse, + }; + PublishFirmware: { + request: Ocpp20Types.PublishFirmwareRequest, + response: Ocpp20Types.PublishFirmwareResponse, + }; + PublishFirmwareStatusNotification: { + request: Ocpp20Types.PublishFirmwareStatusNotificationRequest, + response: Ocpp20Types.PublishFirmwareStatusNotificationResponse, + }; + ReportChargingProfiles: { + request: Ocpp20Types.ReportChargingProfilesRequest, + response: Ocpp20Types.ReportChargingProfilesResponse, + }; + RequestStartTransaction: { + request: Ocpp20Types.RequestStartTransactionRequest, + response: Ocpp20Types.RequestStartTransactionResponse, + }; + RequestStopTransaction: { + request: Ocpp20Types.RequestStopTransactionRequest, + response: Ocpp20Types.RequestStopTransactionResponse, + }; + ReservationStatusUpdate: { + request: Ocpp20Types.ReservationStatusUpdateRequest, + response: Ocpp20Types.ReservationStatusUpdateResponse, + }; + ReserveNow: { + request: Ocpp20Types.ReserveNowRequest, + response: Ocpp20Types.ReserveNowResponse, + }; + Reset: { + request: Ocpp20Types.ResetRequest, + response: Ocpp20Types.ResetResponse, + }; + SecurityEventNotification: { + request: Ocpp20Types.SecurityEventNotificationRequest, + response: Ocpp20Types.SecurityEventNotificationResponse, + }; + SendLocalList: { + request: Ocpp20Types.SendLocalListRequest, + response: Ocpp20Types.SendLocalListResponse, + }; + SetChargingProfile: { + request: Ocpp20Types.SetChargingProfileRequest, + response: Ocpp20Types.SetChargingProfileResponse, + }; + SetDisplayMessage: { + request: Ocpp20Types.SetDisplayMessageRequest, + response: Ocpp20Types.SetDisplayMessageResponse, + }; + SetMonitoringBase: { + request: Ocpp20Types.SetMonitoringBaseRequest, + response: Ocpp20Types.SetMonitoringBaseResponse, + }; + SetMonitoringLevel: { + request: Ocpp20Types.SetMonitoringLevelRequest, + response: Ocpp20Types.SetMonitoringLevelResponse, + }; + SetNetworkProfile: { + request: Ocpp20Types.SetNetworkProfileRequest, + response: Ocpp20Types.SetNetworkProfileResponse, + }; + SetVariableMonitoring: { + request: Ocpp20Types.SetVariableMonitoringRequest, + response: Ocpp20Types.SetVariableMonitoringResponse, + }; + SetVariables: { + request: Ocpp20Types.SetVariablesRequest, + response: Ocpp20Types.SetVariablesResponse, + }; + SignCertificate: { + request: Ocpp20Types.SignCertificateRequest, + response: Ocpp20Types.SignCertificateResponse, + }; + StatusNotification: { + request: Ocpp20Types.StatusNotificationRequest, + response: Ocpp20Types.StatusNotificationResponse, + }; + TransactionEvent: { + request: Ocpp20Types.TransactionEventRequest, + response: Ocpp20Types.TransactionEventResponse, + }; + TriggerMessage: { + request: Ocpp20Types.TriggerMessageRequest, + response: Ocpp20Types.TriggerMessageResponse, + }; + UnlockConnector: { + request: Ocpp20Types.UnlockConnectorRequest, + response: Ocpp20Types.UnlockConnectorResponse, + }; + UnpublishFirmware: { + request: Ocpp20Types.UnpublishFirmwareRequest, + response: Ocpp20Types.UnpublishFirmwareResponse, + }; + UpdateFirmware: { + request: Ocpp20Types.UpdateFirmwareRequest, + response: Ocpp20Types.UpdateFirmwareResponse, + }; + } + + type OCPPProtocols = 'ocpp2.0.1' | 'ocpp1.6'; + + enum CONNECTION_STATE { + CONNECTING = 0, + OPEN = 1, + CLOSING = 2, + CLOSED = 3, + } + + // ref './lib/validator.js' + class Validator { + constructor(subprotocol: string, ajv: Ajv); + get subprotocol(): string; + validate(schemaId: string, params: unknown): ValidateFunction; + } + + type RPCClientConstructorOptions = { + // The RPC server's endpoint (a websocket URL). Required. + endpoint: string, + // The RPC client's identity. Will be automatically encoded. Required. + identity: string, + // Array of subprotocols supported by this server. Can be overridden in an auth callback. Defaults to []. + protocols?: Array, + // Optional password to use in HTTP Basic auth. (The username will always be the identity). + password?: string, + // Additional HTTP headers to send along with the websocket upgrade request. Defaults to {}. + headers: OutgoingHttpHeaders, + // An optional query string or object to append as the query string of the connection URL. Defaults to ''. + query: Record | string, + // Milliseconds to wait before unanswered outbound calls are rejected automatically. Defaults to 60000. + callTimeoutMs?: number, + // Milliseconds between WebSocket pings to connected clients. Defaults to 30000. + pingIntervalMs?: number, + // Enable strict validation of calls & responses. Defaults to false. (See Strict Validation to understand how this works.) + strictMode?: boolean, + // Optional additional validators to be used in conjunction with strictMode. (See Strict Validation to understand how this works.) + strictModeValidators?: Array, + // Specifies whether to send detailed errors (including stack trace) to remote party upon an error being thrown by a handler. Defaults to false. + respondWithDetailedErrors?: boolean, + // The number of concurrent in-flight outbound calls permitted at any one time. Additional calls are queued. (There is no limit on inbound calls.) Defaults to 1. + callConcurrency?: number, + // If true, the client will attempt to reconnect after losing connection to the + reconnect: boolean, + // If reconnect is true, specifies the number of times to try reconnecting before failing and emitting a close event. Defaults to Infinity. + maxReconnects: number, + // If reconnect is true, specifies the options for an ExponentialStrategy backoff strategy, used for reconnects. + backoff: ConstructorParameters, + // he maximum number of non-conforming RPC messages which can be tolerated by the server before the client is automatically closed. Defaults to Infinity. + maxBadMessages?: number, + // Additional WebSocketServer options. + wssOptions?: ConstructorParameters, + } + type ConnectResponse = { response?: IncomingMessage } + + type BaseHandler = (obj: { + // The name of the method being invoked (useful for wildcard handlers). + method: M, + // The parameters of the call. + params: M extends keyof OCPPTypes ? OCPPTypes[M]['request'] : unknown, + // A signal which will abort if the underlying connection is dropped (therefore, the response will never be received by the caller). You may choose whether to ignore the signal or not, but it could save you some time if you use it to abort the call early. + signal: AbortSignal, + // The OCPP Message ID used in the call. + messageId: string, + // A callback function with which to pass a response to the call. Accepts a response value, an Error, or a Promise. + reply: (response: Res | Error) => void + }) => (Promise) | Res | void; + + interface ClientHandler { + // wildcardHandler + (handler: BaseHandler): void; + (method: T, handler: BaseHandler): void; + (method: string, handler: BaseHandler): void; + } + + + export class RPCClient extends EventEmitter { + get identity(): string; + get protocol(): OCPPProtocols; + get state(): CONNECTION_STATE; + reconfigure(options: RPCClientConstructorOptions): void; + connect: () => Promise | undefined>; + close: (options?: { + // The WebSocket close code. Defaults to 1000 + code?: number, + // The reason for closure. Defaults to ''. + reason?: string, + // If true, the connection won't be fully closed until any outstanding in-flight (inbound & outbound) calls are responded to. Additional calls will be rejected in the meantime. Defaults to false. + awaitPending?: boolean, + // If true, terminates the WebSocket connection instantly and uncleanly. Defaults to false. + force?: boolean + }) => Promise>; + // WIP + sendRaw: (message: Array | number | Record | string | ArrayBuffer | Buffer | DataView) => void; // TypedArray? + handle: ClientHandler; + call: ( + method: M, + params: M extends keyof OCPPTypes ? OCPPTypes[M]['request'] : unknown, + options?: { + callTimeoutMs: number; + signal: AbortSignal; + noReply: boolean; + }) => Promise; + } + + + type RPCServerConstructorOptions = { + // Array of subprotocols supported by this server. Can be overridden in an auth callback. Defaults to []. + protocols?: Array, + // Milliseconds to wait before unanswered outbound calls are rejected automatically. Defaults to 60000. + callTimeoutMs?: number, + // Milliseconds between WebSocket pings to connected clients. Defaults to 30000. + pingIntervalMs?: number, + // Specifies whether to send detailed errors (including stack trace) to remote party upon an error being thrown by a handler. Defaults to false. + respondWithDetailedErrors?: boolean, + // The number of concurrent in-flight outbound calls permitted at any one time. Additional calls are queued. (There is no limit on inbound calls.) Defaults to 1. + callConcurrency?: number, + // Enable strict validation of calls & responses. Defaults to false. (See Strict Validation to understand how this works.) + strictMode?: boolean, + // Optional additional validators to be used in conjunction with strictMode. (See Strict Validation to understand how this works.) + strictModeValidators?: Array, + // he maximum number of non-conforming RPC messages which can be tolerated by the server before the client is automatically closed. Defaults to Infinity. + maxBadMessages?: number, + // Additional WebSocketServer options. + wssOptions?: ConstructorParameters, + } + + type accept = (session?: unknown, protocol?: OCPPProtocols) => void; + type reject = (code?: number, message?: string) => void; + type handshake = { + // A set of subprotocols purportedly supported by the client. + protocols: Set, + // The identity portion of the connection URL, decoded. + identity: string, + // If HTTP Basic auth was used in the connection, and the username correctly matches the identity, this field will contain the password (otherwise undefined). Read Security Profile 1 for more details of how this works. + password: string, + // The endpoint path portion of the connection URL. This is the part of the path before the identity. + endpoint: string, + // The query string parsed as URLSearchParams. + query: URLSearchParams, + // The remote IP address of the socket. + remoteAddress: string, + // The HTTP headers sent in the upgrade request. + headers: IncomingHttpHeaders, + // The full HTTP request received by the underlying webserver. + request: IncomingMessage, + }; + type authCb = (accept: accept, reject: reject, handshake: handshake) => void; + + type clientEvent = (event: 'client', handler: (client: RPCClient) => void) => void; + + export class RPCServer extends EventEmitter { + constructor(options?: RPCServerConstructorOptions); + auth: (cb: authCb) => void; + handleUpgrade(): (request: IncomingMessage, socket: Duplex, head: Buffer) => void; + reconfigure: (options: RPCServerConstructorOptions) => void; + close(options?: { + //The WebSocket close code to pass to all connected clients. Defaults to 1000. + code?: number, + //The reason for closure to pass to all connected clients. Defaults to ''. + reason?: string, + //If true, each connected client won't be fully closed until any outstanding in-flight (inbound & outbound) calls are responded to. Additional calls will be rejected in the meantime. Defaults to false. + awaitPending?: boolean, + //If true, terminates all client WebSocket connections instantly and uncleanly. Defaults to false.) + force?: boolean + }): void; + on: InstanceType['on'] | clientEvent; + listen( + port: number, + host?: string, + options?: { + signal: AbortSignal, + } + ): Promise + } + + export const createRPCError: (type: string, message?: string, details?: Record) => Error; + export const createValidator: (subprotocol: any, json: any) => Validator; + export { symbols }; + export { errors }; +} + diff --git a/lib/types/v16/AuthorizeRequest.d.ts b/lib/types/v16/AuthorizeRequest.d.ts new file mode 100644 index 0000000..8c2388b --- /dev/null +++ b/lib/types/v16/AuthorizeRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface AuthorizeRequest { + idTag: string; +} diff --git a/lib/types/v16/AuthorizeResponse.d.ts b/lib/types/v16/AuthorizeResponse.d.ts new file mode 100644 index 0000000..14e1a4a --- /dev/null +++ b/lib/types/v16/AuthorizeResponse.d.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface AuthorizeResponse { + idTagInfo: { + expiryDate?: string; + parentIdTag?: string; + status: "Accepted" | "Blocked" | "Expired" | "Invalid" | "ConcurrentTx"; + }; +} diff --git a/lib/types/v16/BootNotificationRequest.d.ts b/lib/types/v16/BootNotificationRequest.d.ts new file mode 100644 index 0000000..851aa9b --- /dev/null +++ b/lib/types/v16/BootNotificationRequest.d.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface BootNotificationRequest { + chargePointVendor: string; + chargePointModel: string; + chargePointSerialNumber?: string; + chargeBoxSerialNumber?: string; + firmwareVersion?: string; + iccid?: string; + imsi?: string; + meterType?: string; + meterSerialNumber?: string; +} diff --git a/lib/types/v16/BootNotificationResponse.d.ts b/lib/types/v16/BootNotificationResponse.d.ts new file mode 100644 index 0000000..deb11fb --- /dev/null +++ b/lib/types/v16/BootNotificationResponse.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface BootNotificationResponse { + status: "Accepted" | "Pending" | "Rejected"; + currentTime: string; + interval: number; +} diff --git a/lib/types/v16/CancelReservationRequest.d.ts b/lib/types/v16/CancelReservationRequest.d.ts new file mode 100644 index 0000000..1c5a38d --- /dev/null +++ b/lib/types/v16/CancelReservationRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface CancelReservationRequest { + reservationId: number; +} diff --git a/lib/types/v16/CancelReservationResponse.d.ts b/lib/types/v16/CancelReservationResponse.d.ts new file mode 100644 index 0000000..1ed4c40 --- /dev/null +++ b/lib/types/v16/CancelReservationResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface CancelReservationResponse { + status: "Accepted" | "Rejected"; +} diff --git a/lib/types/v16/CertificateSignedRequest.d.ts b/lib/types/v16/CertificateSignedRequest.d.ts new file mode 100644 index 0000000..dd0d528 --- /dev/null +++ b/lib/types/v16/CertificateSignedRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface CertificateSignedRequest { + certificateChain: string; +} diff --git a/lib/types/v16/CertificateSignedResponse.d.ts b/lib/types/v16/CertificateSignedResponse.d.ts new file mode 100644 index 0000000..737e7b3 --- /dev/null +++ b/lib/types/v16/CertificateSignedResponse.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type CertificateSignedStatusEnumType = "Accepted" | "Rejected"; + +export interface CertificateSignedResponse { + status: CertificateSignedStatusEnumType; +} diff --git a/lib/types/v16/ChangeAvailabilityRequest.d.ts b/lib/types/v16/ChangeAvailabilityRequest.d.ts new file mode 100644 index 0000000..aeb7f71 --- /dev/null +++ b/lib/types/v16/ChangeAvailabilityRequest.d.ts @@ -0,0 +1,11 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ChangeAvailabilityRequest { + connectorId: number; + type: "Inoperative" | "Operative"; +} diff --git a/lib/types/v16/ChangeAvailabilityResponse.d.ts b/lib/types/v16/ChangeAvailabilityResponse.d.ts new file mode 100644 index 0000000..a82f994 --- /dev/null +++ b/lib/types/v16/ChangeAvailabilityResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ChangeAvailabilityResponse { + status: "Accepted" | "Rejected" | "Scheduled"; +} diff --git a/lib/types/v16/ChangeConfigurationRequest.d.ts b/lib/types/v16/ChangeConfigurationRequest.d.ts new file mode 100644 index 0000000..e09e797 --- /dev/null +++ b/lib/types/v16/ChangeConfigurationRequest.d.ts @@ -0,0 +1,11 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ChangeConfigurationRequest { + key: string; + value: string; +} diff --git a/lib/types/v16/ChangeConfigurationResponse.d.ts b/lib/types/v16/ChangeConfigurationResponse.d.ts new file mode 100644 index 0000000..249d6db --- /dev/null +++ b/lib/types/v16/ChangeConfigurationResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ChangeConfigurationResponse { + status: "Accepted" | "Rejected" | "RebootRequired" | "NotSupported"; +} diff --git a/lib/types/v16/ClearCacheRequest.d.ts b/lib/types/v16/ClearCacheRequest.d.ts new file mode 100644 index 0000000..c1fd16d --- /dev/null +++ b/lib/types/v16/ClearCacheRequest.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearCacheRequest {} diff --git a/lib/types/v16/ClearCacheResponse.d.ts b/lib/types/v16/ClearCacheResponse.d.ts new file mode 100644 index 0000000..5557457 --- /dev/null +++ b/lib/types/v16/ClearCacheResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearCacheResponse { + status: "Accepted" | "Rejected"; +} diff --git a/lib/types/v16/ClearChargingProfileRequest.d.ts b/lib/types/v16/ClearChargingProfileRequest.d.ts new file mode 100644 index 0000000..c027195 --- /dev/null +++ b/lib/types/v16/ClearChargingProfileRequest.d.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearChargingProfileRequest { + id?: number; + connectorId?: number; + chargingProfilePurpose?: "ChargePointMaxProfile" | "TxDefaultProfile" | "TxProfile"; + stackLevel?: number; +} diff --git a/lib/types/v16/ClearChargingProfileResponse.d.ts b/lib/types/v16/ClearChargingProfileResponse.d.ts new file mode 100644 index 0000000..48fe521 --- /dev/null +++ b/lib/types/v16/ClearChargingProfileResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearChargingProfileResponse { + status: "Accepted" | "Unknown"; +} diff --git a/lib/types/v16/DataTransferRequest.d.ts b/lib/types/v16/DataTransferRequest.d.ts new file mode 100644 index 0000000..968c936 --- /dev/null +++ b/lib/types/v16/DataTransferRequest.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface DataTransferRequest { + vendorId: string; + messageId?: string; + data?: string; +} diff --git a/lib/types/v16/DataTransferResponse.d.ts b/lib/types/v16/DataTransferResponse.d.ts new file mode 100644 index 0000000..f3027ba --- /dev/null +++ b/lib/types/v16/DataTransferResponse.d.ts @@ -0,0 +1,11 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface DataTransferResponse { + status: "Accepted" | "Rejected" | "UnknownMessageId" | "UnknownVendorId"; + data?: string; +} diff --git a/lib/types/v16/DeleteCertificateRequest.d.ts b/lib/types/v16/DeleteCertificateRequest.d.ts new file mode 100644 index 0000000..a4caaa6 --- /dev/null +++ b/lib/types/v16/DeleteCertificateRequest.d.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; + +export interface DeleteCertificateRequest { + certificateHashData: CertificateHashDataType; +} +export interface CertificateHashDataType { + hashAlgorithm: HashAlgorithmEnumType; + issuerNameHash: string; + issuerKeyHash: string; + serialNumber: string; +} diff --git a/lib/types/v16/DeleteCertificateResponse.d.ts b/lib/types/v16/DeleteCertificateResponse.d.ts new file mode 100644 index 0000000..e9e00f9 --- /dev/null +++ b/lib/types/v16/DeleteCertificateResponse.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type DeleteCertificateStatusEnumType = "Accepted" | "Failed" | "NotFound"; + +export interface DeleteCertificateResponse { + status: DeleteCertificateStatusEnumType; +} diff --git a/lib/types/v16/DiagnosticsStatusNotificationRequest.d.ts b/lib/types/v16/DiagnosticsStatusNotificationRequest.d.ts new file mode 100644 index 0000000..dae6c6e --- /dev/null +++ b/lib/types/v16/DiagnosticsStatusNotificationRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface DiagnosticsStatusNotificationRequest { + status: "Idle" | "Uploaded" | "UploadFailed" | "Uploading"; +} diff --git a/lib/types/v16/DiagnosticsStatusNotificationResponse.d.ts b/lib/types/v16/DiagnosticsStatusNotificationResponse.d.ts new file mode 100644 index 0000000..01171ed --- /dev/null +++ b/lib/types/v16/DiagnosticsStatusNotificationResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface DiagnosticsStatusNotificationResponse {} diff --git a/lib/types/v16/ExtendedTriggerMessageRequest.d.ts b/lib/types/v16/ExtendedTriggerMessageRequest.d.ts new file mode 100644 index 0000000..10c7c59 --- /dev/null +++ b/lib/types/v16/ExtendedTriggerMessageRequest.d.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type MessageTriggerEnumType = + | "BootNotification" + | "LogStatusNotification" + | "FirmwareStatusNotification" + | "Heartbeat" + | "MeterValues" + | "SignChargePointCertificate" + | "StatusNotification"; + +export interface ExtendedTriggerMessageRequest { + requestedMessage: MessageTriggerEnumType; + connectorId?: number; +} diff --git a/lib/types/v16/ExtendedTriggerMessageResponse.d.ts b/lib/types/v16/ExtendedTriggerMessageResponse.d.ts new file mode 100644 index 0000000..bed5aa7 --- /dev/null +++ b/lib/types/v16/ExtendedTriggerMessageResponse.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type TriggerMessageStatusEnumType = "Accepted" | "Rejected" | "NotImplemented"; + +export interface ExtendedTriggerMessageResponse { + status: TriggerMessageStatusEnumType; +} diff --git a/lib/types/v16/FirmwareStatusNotificationRequest.d.ts b/lib/types/v16/FirmwareStatusNotificationRequest.d.ts new file mode 100644 index 0000000..6178899 --- /dev/null +++ b/lib/types/v16/FirmwareStatusNotificationRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface FirmwareStatusNotificationRequest { + status: "Downloaded" | "DownloadFailed" | "Downloading" | "Idle" | "InstallationFailed" | "Installing" | "Installed"; +} diff --git a/lib/types/v16/FirmwareStatusNotificationResponse.d.ts b/lib/types/v16/FirmwareStatusNotificationResponse.d.ts new file mode 100644 index 0000000..89db4f9 --- /dev/null +++ b/lib/types/v16/FirmwareStatusNotificationResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface FirmwareStatusNotificationResponse {} diff --git a/lib/types/v16/GetCompositeScheduleRequest.d.ts b/lib/types/v16/GetCompositeScheduleRequest.d.ts new file mode 100644 index 0000000..9971143 --- /dev/null +++ b/lib/types/v16/GetCompositeScheduleRequest.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetCompositeScheduleRequest { + connectorId: number; + duration: number; + chargingRateUnit?: "A" | "W"; +} diff --git a/lib/types/v16/GetCompositeScheduleResponse.d.ts b/lib/types/v16/GetCompositeScheduleResponse.d.ts new file mode 100644 index 0000000..507ad3b --- /dev/null +++ b/lib/types/v16/GetCompositeScheduleResponse.d.ts @@ -0,0 +1,23 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetCompositeScheduleResponse { + status: "Accepted" | "Rejected"; + connectorId?: number; + scheduleStart?: string; + chargingSchedule?: { + duration?: number; + startSchedule?: string; + chargingRateUnit: "A" | "W"; + chargingSchedulePeriod: { + startPeriod: number; + limit: number; + numberPhases?: number; + }[]; + minChargingRate?: number; + }; +} diff --git a/lib/types/v16/GetConfigurationRequest.d.ts b/lib/types/v16/GetConfigurationRequest.d.ts new file mode 100644 index 0000000..3c6d527 --- /dev/null +++ b/lib/types/v16/GetConfigurationRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetConfigurationRequest { + key?: string[]; +} diff --git a/lib/types/v16/GetConfigurationResponse.d.ts b/lib/types/v16/GetConfigurationResponse.d.ts new file mode 100644 index 0000000..82b0655 --- /dev/null +++ b/lib/types/v16/GetConfigurationResponse.d.ts @@ -0,0 +1,15 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetConfigurationResponse { + configurationKey?: { + key: string; + readonly: boolean; + value?: string; + }[]; + unknownKey?: string[]; +} diff --git a/lib/types/v16/GetDiagnosticsRequest.d.ts b/lib/types/v16/GetDiagnosticsRequest.d.ts new file mode 100644 index 0000000..37c53a9 --- /dev/null +++ b/lib/types/v16/GetDiagnosticsRequest.d.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetDiagnosticsRequest { + location: string; + retries?: number; + retryInterval?: number; + startTime?: string; + stopTime?: string; +} diff --git a/lib/types/v16/GetDiagnosticsResponse.d.ts b/lib/types/v16/GetDiagnosticsResponse.d.ts new file mode 100644 index 0000000..427477c --- /dev/null +++ b/lib/types/v16/GetDiagnosticsResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetDiagnosticsResponse { + fileName?: string; +} diff --git a/lib/types/v16/GetInstalledCertificateIdsRequest.d.ts b/lib/types/v16/GetInstalledCertificateIdsRequest.d.ts new file mode 100644 index 0000000..958b64c --- /dev/null +++ b/lib/types/v16/GetInstalledCertificateIdsRequest.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type CertificateUseEnumType = "CentralSystemRootCertificate" | "ManufacturerRootCertificate"; + +export interface GetInstalledCertificateIdsRequest { + certificateType: CertificateUseEnumType; +} diff --git a/lib/types/v16/GetInstalledCertificateIdsResponse.d.ts b/lib/types/v16/GetInstalledCertificateIdsResponse.d.ts new file mode 100644 index 0000000..2a316cc --- /dev/null +++ b/lib/types/v16/GetInstalledCertificateIdsResponse.d.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; +export type GetInstalledCertificateStatusEnumType = "Accepted" | "NotFound"; + +export interface GetInstalledCertificateIdsResponse { + certificateHashData?: CertificateHashDataType[]; + status: GetInstalledCertificateStatusEnumType; +} +export interface CertificateHashDataType { + hashAlgorithm: HashAlgorithmEnumType; + issuerNameHash: string; + issuerKeyHash: string; + serialNumber: string; +} diff --git a/lib/types/v16/GetLocalListVersionRequest.d.ts b/lib/types/v16/GetLocalListVersionRequest.d.ts new file mode 100644 index 0000000..02f1954 --- /dev/null +++ b/lib/types/v16/GetLocalListVersionRequest.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetLocalListVersionRequest {} diff --git a/lib/types/v16/GetLocalListVersionResponse.d.ts b/lib/types/v16/GetLocalListVersionResponse.d.ts new file mode 100644 index 0000000..e129d52 --- /dev/null +++ b/lib/types/v16/GetLocalListVersionResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetLocalListVersionResponse { + listVersion: number; +} diff --git a/lib/types/v16/GetLogRequest.d.ts b/lib/types/v16/GetLogRequest.d.ts new file mode 100644 index 0000000..f91eb1c --- /dev/null +++ b/lib/types/v16/GetLogRequest.d.ts @@ -0,0 +1,21 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type LogEnumType = "DiagnosticsLog" | "SecurityLog"; + +export interface GetLogRequest { + log: LogParametersType; + logType: LogEnumType; + requestId: number; + retries?: number; + retryInterval?: number; +} +export interface LogParametersType { + remoteLocation: string; + oldestTimestamp?: string; + latestTimestamp?: string; +} diff --git a/lib/types/v16/GetLogResponse.d.ts b/lib/types/v16/GetLogResponse.d.ts new file mode 100644 index 0000000..7f36afd --- /dev/null +++ b/lib/types/v16/GetLogResponse.d.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type LogStatusEnumType = "Accepted" | "Rejected" | "AcceptedCanceled"; + +export interface GetLogResponse { + status: LogStatusEnumType; + filename?: string; +} diff --git a/lib/types/v16/HeartbeatRequest.d.ts b/lib/types/v16/HeartbeatRequest.d.ts new file mode 100644 index 0000000..531832e --- /dev/null +++ b/lib/types/v16/HeartbeatRequest.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface HeartbeatRequest {} diff --git a/lib/types/v16/HeartbeatResponse.d.ts b/lib/types/v16/HeartbeatResponse.d.ts new file mode 100644 index 0000000..3081fa6 --- /dev/null +++ b/lib/types/v16/HeartbeatResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface HeartbeatResponse { + currentTime: string; +} diff --git a/lib/types/v16/InstallCertificateRequest.d.ts b/lib/types/v16/InstallCertificateRequest.d.ts new file mode 100644 index 0000000..bf7c0e6 --- /dev/null +++ b/lib/types/v16/InstallCertificateRequest.d.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type CertificateUseEnumType = "CentralSystemRootCertificate" | "ManufacturerRootCertificate"; + +export interface InstallCertificateRequest { + certificateType: CertificateUseEnumType; + certificate: string; +} diff --git a/lib/types/v16/InstallCertificateResponse.d.ts b/lib/types/v16/InstallCertificateResponse.d.ts new file mode 100644 index 0000000..8dda87c --- /dev/null +++ b/lib/types/v16/InstallCertificateResponse.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type InstallCertificateStatusEnumType = "Accepted" | "Failed" | "Rejected"; + +export interface InstallCertificateResponse { + status: InstallCertificateStatusEnumType; +} diff --git a/lib/types/v16/LogStatusNotificationRequest.d.ts b/lib/types/v16/LogStatusNotificationRequest.d.ts new file mode 100644 index 0000000..13529eb --- /dev/null +++ b/lib/types/v16/LogStatusNotificationRequest.d.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type UploadLogStatusEnumType = + | "BadMessage" + | "Idle" + | "NotSupportedOperation" + | "PermissionDenied" + | "Uploaded" + | "UploadFailure" + | "Uploading"; + +export interface LogStatusNotificationRequest { + status: UploadLogStatusEnumType; + requestId?: number; +} diff --git a/lib/types/v16/LogStatusNotificationResponse.d.ts b/lib/types/v16/LogStatusNotificationResponse.d.ts new file mode 100644 index 0000000..02038b4 --- /dev/null +++ b/lib/types/v16/LogStatusNotificationResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface LogStatusNotificationResponse {} diff --git a/lib/types/v16/MeterValuesRequest.d.ts b/lib/types/v16/MeterValuesRequest.d.ts new file mode 100644 index 0000000..2171cc2 --- /dev/null +++ b/lib/types/v16/MeterValuesRequest.d.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface MeterValuesRequest { + connectorId: number; + transactionId?: number; + meterValue: { + timestamp: string; + sampledValue: { + value: string; + context?: + | "Interruption.Begin" + | "Interruption.End" + | "Sample.Clock" + | "Sample.Periodic" + | "Transaction.Begin" + | "Transaction.End" + | "Trigger" + | "Other"; + format?: "Raw" | "SignedData"; + measurand?: + | "Energy.Active.Export.Register" + | "Energy.Active.Import.Register" + | "Energy.Reactive.Export.Register" + | "Energy.Reactive.Import.Register" + | "Energy.Active.Export.Interval" + | "Energy.Active.Import.Interval" + | "Energy.Reactive.Export.Interval" + | "Energy.Reactive.Import.Interval" + | "Power.Active.Export" + | "Power.Active.Import" + | "Power.Offered" + | "Power.Reactive.Export" + | "Power.Reactive.Import" + | "Power.Factor" + | "Current.Import" + | "Current.Export" + | "Current.Offered" + | "Voltage" + | "Frequency" + | "Temperature" + | "SoC" + | "RPM"; + phase?: "L1" | "L2" | "L3" | "N" | "L1-N" | "L2-N" | "L3-N" | "L1-L2" | "L2-L3" | "L3-L1"; + location?: "Cable" | "EV" | "Inlet" | "Outlet" | "Body"; + unit?: + | "Wh" + | "kWh" + | "varh" + | "kvarh" + | "W" + | "kW" + | "VA" + | "kVA" + | "var" + | "kvar" + | "A" + | "V" + | "K" + | "Celcius" + | "Celsius" + | "Fahrenheit" + | "Percent"; + }[]; + }[]; +} diff --git a/lib/types/v16/MeterValuesResponse.d.ts b/lib/types/v16/MeterValuesResponse.d.ts new file mode 100644 index 0000000..87be807 --- /dev/null +++ b/lib/types/v16/MeterValuesResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface MeterValuesResponse {} diff --git a/lib/types/v16/RemoteStartTransactionRequest.d.ts b/lib/types/v16/RemoteStartTransactionRequest.d.ts new file mode 100644 index 0000000..c8be97d --- /dev/null +++ b/lib/types/v16/RemoteStartTransactionRequest.d.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface RemoteStartTransactionRequest { + connectorId?: number; + idTag: string; + chargingProfile?: { + chargingProfileId: number; + transactionId?: number; + stackLevel: number; + chargingProfilePurpose: "ChargePointMaxProfile" | "TxDefaultProfile" | "TxProfile"; + chargingProfileKind: "Absolute" | "Recurring" | "Relative"; + recurrencyKind?: "Daily" | "Weekly"; + validFrom?: string; + validTo?: string; + chargingSchedule: { + duration?: number; + startSchedule?: string; + chargingRateUnit: "A" | "W"; + chargingSchedulePeriod: { + startPeriod: number; + limit: number; + numberPhases?: number; + }[]; + minChargingRate?: number; + }; + }; +} diff --git a/lib/types/v16/RemoteStartTransactionResponse.d.ts b/lib/types/v16/RemoteStartTransactionResponse.d.ts new file mode 100644 index 0000000..1d3c861 --- /dev/null +++ b/lib/types/v16/RemoteStartTransactionResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface RemoteStartTransactionResponse { + status: "Accepted" | "Rejected"; +} diff --git a/lib/types/v16/RemoteStopTransactionRequest.d.ts b/lib/types/v16/RemoteStopTransactionRequest.d.ts new file mode 100644 index 0000000..d255879 --- /dev/null +++ b/lib/types/v16/RemoteStopTransactionRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface RemoteStopTransactionRequest { + transactionId: number; +} diff --git a/lib/types/v16/RemoteStopTransactionResponse.d.ts b/lib/types/v16/RemoteStopTransactionResponse.d.ts new file mode 100644 index 0000000..76cca6c --- /dev/null +++ b/lib/types/v16/RemoteStopTransactionResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface RemoteStopTransactionResponse { + status: "Accepted" | "Rejected"; +} diff --git a/lib/types/v16/ReserveNowRequest.d.ts b/lib/types/v16/ReserveNowRequest.d.ts new file mode 100644 index 0000000..8e9ce6a --- /dev/null +++ b/lib/types/v16/ReserveNowRequest.d.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ReserveNowRequest { + connectorId: number; + expiryDate: string; + idTag: string; + parentIdTag?: string; + reservationId: number; +} diff --git a/lib/types/v16/ReserveNowResponse.d.ts b/lib/types/v16/ReserveNowResponse.d.ts new file mode 100644 index 0000000..70c4f00 --- /dev/null +++ b/lib/types/v16/ReserveNowResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ReserveNowResponse { + status: "Accepted" | "Faulted" | "Occupied" | "Rejected" | "Unavailable"; +} diff --git a/lib/types/v16/ResetRequest.d.ts b/lib/types/v16/ResetRequest.d.ts new file mode 100644 index 0000000..1005bc5 --- /dev/null +++ b/lib/types/v16/ResetRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ResetRequest { + type: "Hard" | "Soft"; +} diff --git a/lib/types/v16/ResetResponse.d.ts b/lib/types/v16/ResetResponse.d.ts new file mode 100644 index 0000000..ecf5ddf --- /dev/null +++ b/lib/types/v16/ResetResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ResetResponse { + status: "Accepted" | "Rejected"; +} diff --git a/lib/types/v16/SecurityEventNotificationRequest.d.ts b/lib/types/v16/SecurityEventNotificationRequest.d.ts new file mode 100644 index 0000000..6b152a5 --- /dev/null +++ b/lib/types/v16/SecurityEventNotificationRequest.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SecurityEventNotificationRequest { + type: string; + timestamp: string; + techInfo?: string; +} diff --git a/lib/types/v16/SecurityEventNotificationResponse.d.ts b/lib/types/v16/SecurityEventNotificationResponse.d.ts new file mode 100644 index 0000000..07f30a8 --- /dev/null +++ b/lib/types/v16/SecurityEventNotificationResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SecurityEventNotificationResponse {} diff --git a/lib/types/v16/SendLocalListRequest.d.ts b/lib/types/v16/SendLocalListRequest.d.ts new file mode 100644 index 0000000..db8329a --- /dev/null +++ b/lib/types/v16/SendLocalListRequest.d.ts @@ -0,0 +1,19 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SendLocalListRequest { + listVersion: number; + localAuthorizationList?: { + idTag: string; + idTagInfo?: { + expiryDate?: string; + parentIdTag?: string; + status: "Accepted" | "Blocked" | "Expired" | "Invalid" | "ConcurrentTx"; + }; + }[]; + updateType: "Differential" | "Full"; +} diff --git a/lib/types/v16/SendLocalListResponse.d.ts b/lib/types/v16/SendLocalListResponse.d.ts new file mode 100644 index 0000000..21d2b80 --- /dev/null +++ b/lib/types/v16/SendLocalListResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SendLocalListResponse { + status: "Accepted" | "Failed" | "NotSupported" | "VersionMismatch"; +} diff --git a/lib/types/v16/SetChargingProfileRequest.d.ts b/lib/types/v16/SetChargingProfileRequest.d.ts new file mode 100644 index 0000000..41e9e7d --- /dev/null +++ b/lib/types/v16/SetChargingProfileRequest.d.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SetChargingProfileRequest { + connectorId: number; + csChargingProfiles: { + chargingProfileId: number; + transactionId?: number; + stackLevel: number; + chargingProfilePurpose: "ChargePointMaxProfile" | "TxDefaultProfile" | "TxProfile"; + chargingProfileKind: "Absolute" | "Recurring" | "Relative"; + recurrencyKind?: "Daily" | "Weekly"; + validFrom?: string; + validTo?: string; + chargingSchedule: { + duration?: number; + startSchedule?: string; + chargingRateUnit: "A" | "W"; + chargingSchedulePeriod: { + startPeriod: number; + limit: number; + numberPhases?: number; + }[]; + minChargingRate?: number; + }; + }; +} diff --git a/lib/types/v16/SetChargingProfileResponse.d.ts b/lib/types/v16/SetChargingProfileResponse.d.ts new file mode 100644 index 0000000..1e43f0f --- /dev/null +++ b/lib/types/v16/SetChargingProfileResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SetChargingProfileResponse { + status: "Accepted" | "Rejected" | "NotSupported"; +} diff --git a/lib/types/v16/SignCertificateRequest.d.ts b/lib/types/v16/SignCertificateRequest.d.ts new file mode 100644 index 0000000..0eb5a76 --- /dev/null +++ b/lib/types/v16/SignCertificateRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SignCertificateRequest { + csr: string; +} diff --git a/lib/types/v16/SignCertificateResponse.d.ts b/lib/types/v16/SignCertificateResponse.d.ts new file mode 100644 index 0000000..6c498fb --- /dev/null +++ b/lib/types/v16/SignCertificateResponse.d.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type GenericStatusEnumType = "Accepted" | "Rejected"; + +export interface SignCertificateResponse { + status: GenericStatusEnumType; +} diff --git a/lib/types/v16/SignedFirmwareStatusNotificationRequest.d.ts b/lib/types/v16/SignedFirmwareStatusNotificationRequest.d.ts new file mode 100644 index 0000000..7308860 --- /dev/null +++ b/lib/types/v16/SignedFirmwareStatusNotificationRequest.d.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type FirmwareStatusEnumType = + | "Downloaded" + | "DownloadFailed" + | "Downloading" + | "DownloadScheduled" + | "DownloadPaused" + | "Idle" + | "InstallationFailed" + | "Installing" + | "Installed" + | "InstallRebooting" + | "InstallScheduled" + | "InstallVerificationFailed" + | "InvalidSignature" + | "SignatureVerified"; + +export interface SignedFirmwareStatusNotificationRequest { + status: FirmwareStatusEnumType; + requestId?: number; +} diff --git a/lib/types/v16/SignedFirmwareStatusNotificationResponse.d.ts b/lib/types/v16/SignedFirmwareStatusNotificationResponse.d.ts new file mode 100644 index 0000000..2331f50 --- /dev/null +++ b/lib/types/v16/SignedFirmwareStatusNotificationResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SignedFirmwareStatusNotificationResponse {} diff --git a/lib/types/v16/SignedUpdateFirmwareRequest.d.ts b/lib/types/v16/SignedUpdateFirmwareRequest.d.ts new file mode 100644 index 0000000..6bbe4b7 --- /dev/null +++ b/lib/types/v16/SignedUpdateFirmwareRequest.d.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SignedUpdateFirmwareRequest { + retries?: number; + retryInterval?: number; + requestId: number; + firmware: FirmwareType; +} +export interface FirmwareType { + location: string; + retrieveDateTime: string; + installDateTime?: string; + signingCertificate: string; + signature: string; +} diff --git a/lib/types/v16/SignedUpdateFirmwareResponse.d.ts b/lib/types/v16/SignedUpdateFirmwareResponse.d.ts new file mode 100644 index 0000000..427bc36 --- /dev/null +++ b/lib/types/v16/SignedUpdateFirmwareResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type UpdateFirmwareStatusEnumType = + | "Accepted" + | "Rejected" + | "AcceptedCanceled" + | "InvalidCertificate" + | "RevokedCertificate"; + +export interface SignedUpdateFirmwareResponse { + status: UpdateFirmwareStatusEnumType; +} diff --git a/lib/types/v16/StartTransactionRequest.d.ts b/lib/types/v16/StartTransactionRequest.d.ts new file mode 100644 index 0000000..0a7e7fe --- /dev/null +++ b/lib/types/v16/StartTransactionRequest.d.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StartTransactionRequest { + connectorId: number; + idTag: string; + meterStart: number; + reservationId?: number; + timestamp: string; +} diff --git a/lib/types/v16/StartTransactionResponse.d.ts b/lib/types/v16/StartTransactionResponse.d.ts new file mode 100644 index 0000000..5401287 --- /dev/null +++ b/lib/types/v16/StartTransactionResponse.d.ts @@ -0,0 +1,15 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StartTransactionResponse { + idTagInfo: { + expiryDate?: string; + parentIdTag?: string; + status: "Accepted" | "Blocked" | "Expired" | "Invalid" | "ConcurrentTx"; + }; + transactionId: number; +} diff --git a/lib/types/v16/StatusNotificationRequest.d.ts b/lib/types/v16/StatusNotificationRequest.d.ts new file mode 100644 index 0000000..745c2b9 --- /dev/null +++ b/lib/types/v16/StatusNotificationRequest.d.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StatusNotificationRequest { + connectorId: number; + errorCode: + | "ConnectorLockFailure" + | "EVCommunicationError" + | "GroundFailure" + | "HighTemperature" + | "InternalError" + | "LocalListConflict" + | "NoError" + | "OtherError" + | "OverCurrentFailure" + | "PowerMeterFailure" + | "PowerSwitchFailure" + | "ReaderFailure" + | "ResetFailure" + | "UnderVoltage" + | "OverVoltage" + | "WeakSignal"; + info?: string; + status: + | "Available" + | "Preparing" + | "Charging" + | "SuspendedEVSE" + | "SuspendedEV" + | "Finishing" + | "Reserved" + | "Unavailable" + | "Faulted"; + timestamp?: string; + vendorId?: string; + vendorErrorCode?: string; +} diff --git a/lib/types/v16/StatusNotificationResponse.d.ts b/lib/types/v16/StatusNotificationResponse.d.ts new file mode 100644 index 0000000..3688a5a --- /dev/null +++ b/lib/types/v16/StatusNotificationResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StatusNotificationResponse {} diff --git a/lib/types/v16/StopTransactionRequest.d.ts b/lib/types/v16/StopTransactionRequest.d.ts new file mode 100644 index 0000000..741d0a0 --- /dev/null +++ b/lib/types/v16/StopTransactionRequest.d.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StopTransactionRequest { + idTag?: string; + meterStop: number; + timestamp: string; + transactionId: number; + reason?: + | "EmergencyStop" + | "EVDisconnected" + | "HardReset" + | "Local" + | "Other" + | "PowerLoss" + | "Reboot" + | "Remote" + | "SoftReset" + | "UnlockCommand" + | "DeAuthorized"; + transactionData?: { + timestamp: string; + sampledValue: { + value: string; + context?: + | "Interruption.Begin" + | "Interruption.End" + | "Sample.Clock" + | "Sample.Periodic" + | "Transaction.Begin" + | "Transaction.End" + | "Trigger" + | "Other"; + format?: "Raw" | "SignedData"; + measurand?: + | "Energy.Active.Export.Register" + | "Energy.Active.Import.Register" + | "Energy.Reactive.Export.Register" + | "Energy.Reactive.Import.Register" + | "Energy.Active.Export.Interval" + | "Energy.Active.Import.Interval" + | "Energy.Reactive.Export.Interval" + | "Energy.Reactive.Import.Interval" + | "Power.Active.Export" + | "Power.Active.Import" + | "Power.Offered" + | "Power.Reactive.Export" + | "Power.Reactive.Import" + | "Power.Factor" + | "Current.Import" + | "Current.Export" + | "Current.Offered" + | "Voltage" + | "Frequency" + | "Temperature" + | "SoC" + | "RPM"; + phase?: "L1" | "L2" | "L3" | "N" | "L1-N" | "L2-N" | "L3-N" | "L1-L2" | "L2-L3" | "L3-L1"; + location?: "Cable" | "EV" | "Inlet" | "Outlet" | "Body"; + unit?: + | "Wh" + | "kWh" + | "varh" + | "kvarh" + | "W" + | "kW" + | "VA" + | "kVA" + | "var" + | "kvar" + | "A" + | "V" + | "K" + | "Celcius" + | "Celsius" + | "Fahrenheit" + | "Percent"; + }[]; + }[]; +} diff --git a/lib/types/v16/StopTransactionResponse.d.ts b/lib/types/v16/StopTransactionResponse.d.ts new file mode 100644 index 0000000..4a3396f --- /dev/null +++ b/lib/types/v16/StopTransactionResponse.d.ts @@ -0,0 +1,14 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StopTransactionResponse { + idTagInfo?: { + expiryDate?: string; + parentIdTag?: string; + status: "Accepted" | "Blocked" | "Expired" | "Invalid" | "ConcurrentTx"; + }; +} diff --git a/lib/types/v16/TriggerMessageRequest.d.ts b/lib/types/v16/TriggerMessageRequest.d.ts new file mode 100644 index 0000000..3c28ce8 --- /dev/null +++ b/lib/types/v16/TriggerMessageRequest.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface TriggerMessageRequest { + requestedMessage: + | "BootNotification" + | "DiagnosticsStatusNotification" + | "FirmwareStatusNotification" + | "Heartbeat" + | "MeterValues" + | "StatusNotification"; + connectorId?: number; +} diff --git a/lib/types/v16/TriggerMessageResponse.d.ts b/lib/types/v16/TriggerMessageResponse.d.ts new file mode 100644 index 0000000..7f93f1c --- /dev/null +++ b/lib/types/v16/TriggerMessageResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface TriggerMessageResponse { + status: "Accepted" | "Rejected" | "NotImplemented"; +} diff --git a/lib/types/v16/UnlockConnectorRequest.d.ts b/lib/types/v16/UnlockConnectorRequest.d.ts new file mode 100644 index 0000000..21adb5e --- /dev/null +++ b/lib/types/v16/UnlockConnectorRequest.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UnlockConnectorRequest { + connectorId: number; +} diff --git a/lib/types/v16/UnlockConnectorResponse.d.ts b/lib/types/v16/UnlockConnectorResponse.d.ts new file mode 100644 index 0000000..7083aa8 --- /dev/null +++ b/lib/types/v16/UnlockConnectorResponse.d.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UnlockConnectorResponse { + status: "Unlocked" | "UnlockFailed" | "NotSupported"; +} diff --git a/lib/types/v16/UpdateFirmwareRequest.d.ts b/lib/types/v16/UpdateFirmwareRequest.d.ts new file mode 100644 index 0000000..d883395 --- /dev/null +++ b/lib/types/v16/UpdateFirmwareRequest.d.ts @@ -0,0 +1,13 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UpdateFirmwareRequest { + location: string; + retries?: number; + retrieveDate: string; + retryInterval?: number; +} diff --git a/lib/types/v16/UpdateFirmwareResponse.d.ts b/lib/types/v16/UpdateFirmwareResponse.d.ts new file mode 100644 index 0000000..80d0404 --- /dev/null +++ b/lib/types/v16/UpdateFirmwareResponse.d.ts @@ -0,0 +1,8 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UpdateFirmwareResponse {} diff --git a/lib/types/v201/AuthorizeRequest.d.ts b/lib/types/v201/AuthorizeRequest.d.ts new file mode 100644 index 0000000..48c47bd --- /dev/null +++ b/lib/types/v201/AuthorizeRequest.d.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; +/** + * Used algorithms for the hashes provided. + * + */ +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; + +export interface AuthorizeRequest { + customData?: CustomDataType; + idToken: IdTokenType; + /** + * The X.509 certificated presented by EV and encoded in PEM format. + * + */ + certificate?: string; + iso15118CertificateHashData?: OCSPRequestDataType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} +export interface OCSPRequestDataType { + customData?: CustomDataType; + hashAlgorithm: HashAlgorithmEnumType; + /** + * Hashed value of the Issuer DN (Distinguished Name). + * + * + */ + issuerNameHash: string; + /** + * Hashed value of the issuers public key + * + */ + issuerKeyHash: string; + /** + * The serial number of the certificate. + * + */ + serialNumber: string; + /** + * This contains the responder URL (Case insensitive). + * + * + */ + responderURL: string; +} diff --git a/lib/types/v201/AuthorizeResponse.d.ts b/lib/types/v201/AuthorizeResponse.d.ts new file mode 100644 index 0000000..282524e --- /dev/null +++ b/lib/types/v201/AuthorizeResponse.d.ts @@ -0,0 +1,174 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * ID_ Token. Status. Authorization_ Status + * urn:x-oca:ocpp:uid:1:569372 + * Current status of the ID Token. + * + */ +export type AuthorizationStatusEnumType = + | "Accepted" + | "Blocked" + | "ConcurrentTx" + | "Expired" + | "Invalid" + | "NoCredit" + | "NotAllowedTypeEVSE" + | "NotAtThisLocation" + | "NotAtThisTime" + | "Unknown"; +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; +/** + * Message_ Content. Format. Message_ Format_ Code + * urn:x-enexis:ecdm:uid:1:570848 + * Format of the message. + * + */ +export type MessageFormatEnumType = "ASCII" | "HTML" | "URI" | "UTF8"; +/** + * Certificate status information. + * - if all certificates are valid: return 'Accepted'. + * - if one of the certificates was revoked, return 'CertificateRevoked'. + * + */ +export type AuthorizeCertificateStatusEnumType = + | "Accepted" + | "SignatureError" + | "CertificateExpired" + | "CertificateRevoked" + | "NoCertificateAvailable" + | "CertChainError" + | "ContractCancelled"; + +export interface AuthorizeResponse { + customData?: CustomDataType; + idTokenInfo: IdTokenInfoType; + certificateStatus?: AuthorizeCertificateStatusEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * ID_ Token + * urn:x-oca:ocpp:uid:2:233247 + * Contains status information about an identifier. + * It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date. + * + */ +export interface IdTokenInfoType { + customData?: CustomDataType; + status: AuthorizationStatusEnumType; + /** + * ID_ Token. Expiry. Date_ Time + * urn:x-oca:ocpp:uid:1:569373 + * Date and Time after which the token must be considered invalid. + * + */ + cacheExpiryDateTime?: string; + /** + * Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in <<transactioneventresponse,TransactionEventResponse>> overrules this one. + * + */ + chargingPriority?: number; + /** + * ID_ Token. Language1. Language_ Code + * urn:x-oca:ocpp:uid:1:569374 + * Preferred user interface language of identifier user. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + * + */ + language1?: string; + /** + * Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station. + * + * + */ + evseId?: number[]; + groupIdToken?: IdTokenType; + /** + * ID_ Token. Language2. Language_ Code + * urn:x-oca:ocpp:uid:1:569375 + * Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language2?: string; + personalMessage?: MessageContentType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} +/** + * Message_ Content + * urn:x-enexis:ecdm:uid:2:234490 + * Contains message details, for a message to be displayed on a Charging Station. + * + * + */ +export interface MessageContentType { + customData?: CustomDataType; + format: MessageFormatEnumType; + /** + * Message_ Content. Language. Language_ Code + * urn:x-enexis:ecdm:uid:1:570849 + * Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language?: string; + /** + * Message_ Content. Content. Message + * urn:x-enexis:ecdm:uid:1:570852 + * Message contents. + * + * + */ + content: string; +} diff --git a/lib/types/v201/BootNotificationRequest.d.ts b/lib/types/v201/BootNotificationRequest.d.ts new file mode 100644 index 0000000..ec4bdfe --- /dev/null +++ b/lib/types/v201/BootNotificationRequest.d.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the reason for sending this message to the CSMS. + * + */ +export type BootReasonEnumType = + | "ApplicationReset" + | "FirmwareUpdate" + | "LocalReset" + | "PowerUp" + | "RemoteReset" + | "ScheduledReset" + | "Triggered" + | "Unknown" + | "Watchdog"; + +export interface BootNotificationRequest { + customData?: CustomDataType; + chargingStation: ChargingStationType; + reason: BootReasonEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charge_ Point + * urn:x-oca:ocpp:uid:2:233122 + * The physical system where an Electrical Vehicle (EV) can be charged. + * + */ +export interface ChargingStationType { + customData?: CustomDataType; + /** + * Device. Serial_ Number. Serial_ Number + * urn:x-oca:ocpp:uid:1:569324 + * Vendor-specific device identifier. + * + */ + serialNumber?: string; + /** + * Device. Model. CI20_ Text + * urn:x-oca:ocpp:uid:1:569325 + * Defines the model of the device. + * + */ + model: string; + modem?: ModemType; + /** + * Identifies the vendor (not necessarily in a unique manner). + * + */ + vendorName: string; + /** + * This contains the firmware version of the Charging Station. + * + * + */ + firmwareVersion?: string; +} +/** + * Wireless_ Communication_ Module + * urn:x-oca:ocpp:uid:2:233306 + * Defines parameters required for initiating and maintaining wireless communication with other devices. + * + */ +export interface ModemType { + customData?: CustomDataType; + /** + * Wireless_ Communication_ Module. ICCID. CI20_ Text + * urn:x-oca:ocpp:uid:1:569327 + * This contains the ICCID of the modem’s SIM card. + * + */ + iccid?: string; + /** + * Wireless_ Communication_ Module. IMSI. CI20_ Text + * urn:x-oca:ocpp:uid:1:569328 + * This contains the IMSI of the modem’s SIM card. + * + */ + imsi?: string; +} diff --git a/lib/types/v201/BootNotificationResponse.d.ts b/lib/types/v201/BootNotificationResponse.d.ts new file mode 100644 index 0000000..4046960 --- /dev/null +++ b/lib/types/v201/BootNotificationResponse.d.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains whether the Charging Station has been registered + * within the CSMS. + * + */ +export type RegistrationStatusEnumType = "Accepted" | "Pending" | "Rejected"; + +export interface BootNotificationResponse { + customData?: CustomDataType; + /** + * This contains the CSMS’s current time. + * + */ + currentTime: string; + /** + * When <<cmn_registrationstatusenumtype,Status>> is Accepted, this contains the heartbeat interval in seconds. If the CSMS returns something other than Accepted, the value of the interval field indicates the minimum wait time before sending a next BootNotification request. + * + */ + interval: number; + status: RegistrationStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/CancelReservationRequest.d.ts b/lib/types/v201/CancelReservationRequest.d.ts new file mode 100644 index 0000000..3c9fcf3 --- /dev/null +++ b/lib/types/v201/CancelReservationRequest.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface CancelReservationRequest { + customData?: CustomDataType; + /** + * Id of the reservation to cancel. + * + */ + reservationId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/CancelReservationResponse.d.ts b/lib/types/v201/CancelReservationResponse.d.ts new file mode 100644 index 0000000..5834408 --- /dev/null +++ b/lib/types/v201/CancelReservationResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates the success or failure of the canceling of a reservation by CSMS. + * + */ +export type CancelReservationStatusEnumType = "Accepted" | "Rejected"; + +export interface CancelReservationResponse { + customData?: CustomDataType; + status: CancelReservationStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/CertificateSignedRequest.d.ts b/lib/types/v201/CertificateSignedRequest.d.ts new file mode 100644 index 0000000..aca6f5e --- /dev/null +++ b/lib/types/v201/CertificateSignedRequest.d.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates the type of the signed certificate that is returned. When omitted the certificate is used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection. This field is required when a typeOfCertificate was included in the <<signcertificaterequest,SignCertificateRequest>> that requested this certificate to be signed AND both the 15118 connection and the Charging Station connection are implemented. + * + * + */ +export type CertificateSigningUseEnumType = "ChargingStationCertificate" | "V2GCertificate"; + +export interface CertificateSignedRequest { + customData?: CustomDataType; + /** + * The signed PEM encoded X.509 certificate. This can also contain the necessary sub CA certificates. In that case, the order of the bundle should follow the certificate chain, starting from the leaf certificate. + * + * The Configuration Variable <<configkey-max-certificate-chain-size,MaxCertificateChainSize>> can be used to limit the maximum size of this field. + * + */ + certificateChain: string; + certificateType?: CertificateSigningUseEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/CertificateSignedResponse.d.ts b/lib/types/v201/CertificateSignedResponse.d.ts new file mode 100644 index 0000000..0f66f28 --- /dev/null +++ b/lib/types/v201/CertificateSignedResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Returns whether certificate signing has been accepted, otherwise rejected. + * + */ +export type CertificateSignedStatusEnumType = "Accepted" | "Rejected"; + +export interface CertificateSignedResponse { + customData?: CustomDataType; + status: CertificateSignedStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ChangeAvailabilityRequest.d.ts b/lib/types/v201/ChangeAvailabilityRequest.d.ts new file mode 100644 index 0000000..88bbf3f --- /dev/null +++ b/lib/types/v201/ChangeAvailabilityRequest.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the type of availability change that the Charging Station should perform. + * + * + */ +export type OperationalStatusEnumType = "Inoperative" | "Operative"; + +export interface ChangeAvailabilityRequest { + customData?: CustomDataType; + evse?: EVSEType; + operationalStatus: OperationalStatusEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} diff --git a/lib/types/v201/ChangeAvailabilityResponse.d.ts b/lib/types/v201/ChangeAvailabilityResponse.d.ts new file mode 100644 index 0000000..4e765b4 --- /dev/null +++ b/lib/types/v201/ChangeAvailabilityResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station is able to perform the availability change. + * + */ +export type ChangeAvailabilityStatusEnumType = "Accepted" | "Rejected" | "Scheduled"; + +export interface ChangeAvailabilityResponse { + customData?: CustomDataType; + status: ChangeAvailabilityStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ClearCacheRequest.d.ts b/lib/types/v201/ClearCacheRequest.d.ts new file mode 100644 index 0000000..db9a765 --- /dev/null +++ b/lib/types/v201/ClearCacheRequest.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearCacheRequest { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ClearCacheResponse.d.ts b/lib/types/v201/ClearCacheResponse.d.ts new file mode 100644 index 0000000..5b6c2c0 --- /dev/null +++ b/lib/types/v201/ClearCacheResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Accepted if the Charging Station has executed the request, otherwise rejected. + * + */ +export type ClearCacheStatusEnumType = "Accepted" | "Rejected"; + +export interface ClearCacheResponse { + customData?: CustomDataType; + status: ClearCacheStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ClearChargingProfileRequest.d.ts b/lib/types/v201/ClearChargingProfileRequest.d.ts new file mode 100644 index 0000000..b84d5e6 --- /dev/null +++ b/lib/types/v201/ClearChargingProfileRequest.d.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code + * urn:x-oca:ocpp:uid:1:569231 + * Specifies to purpose of the charging profiles that will be cleared, if they meet the other criteria in the request. + * + */ +export type ChargingProfilePurposeEnumType = + | "ChargingStationExternalConstraints" + | "ChargingStationMaxProfile" + | "TxDefaultProfile" + | "TxProfile"; + +export interface ClearChargingProfileRequest { + customData?: CustomDataType; + /** + * The Id of the charging profile to clear. + * + */ + chargingProfileId?: number; + chargingProfileCriteria?: ClearChargingProfileType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Profile + * urn:x-oca:ocpp:uid:2:233255 + * A ChargingProfile consists of a ChargingSchedule, describing the amount of power or current that can be delivered per time interval. + * + */ +export interface ClearChargingProfileType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * Specifies the id of the EVSE for which to clear charging profiles. An evseId of zero (0) specifies the charging profile for the overall Charging Station. Absence of this parameter means the clearing applies to all charging profiles that match the other criteria in the request. + * + * + */ + evseId?: number; + chargingProfilePurpose?: ChargingProfilePurposeEnumType; + /** + * Charging_ Profile. Stack_ Level. Counter + * urn:x-oca:ocpp:uid:1:569230 + * Specifies the stackLevel for which charging profiles will be cleared, if they meet the other criteria in the request. + * + */ + stackLevel?: number; +} diff --git a/lib/types/v201/ClearChargingProfileResponse.d.ts b/lib/types/v201/ClearChargingProfileResponse.d.ts new file mode 100644 index 0000000..c542623 --- /dev/null +++ b/lib/types/v201/ClearChargingProfileResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates if the Charging Station was able to execute the request. + * + */ +export type ClearChargingProfileStatusEnumType = "Accepted" | "Unknown"; + +export interface ClearChargingProfileResponse { + customData?: CustomDataType; + status: ClearChargingProfileStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ClearDisplayMessageRequest.d.ts b/lib/types/v201/ClearDisplayMessageRequest.d.ts new file mode 100644 index 0000000..938d391 --- /dev/null +++ b/lib/types/v201/ClearDisplayMessageRequest.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearDisplayMessageRequest { + customData?: CustomDataType; + /** + * Id of the message that SHALL be removed from the Charging Station. + * + */ + id: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ClearDisplayMessageResponse.d.ts b/lib/types/v201/ClearDisplayMessageResponse.d.ts new file mode 100644 index 0000000..2d8734a --- /dev/null +++ b/lib/types/v201/ClearDisplayMessageResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Returns whether the Charging Station has been able to remove the message. + * + */ +export type ClearMessageStatusEnumType = "Accepted" | "Unknown"; + +export interface ClearDisplayMessageResponse { + customData?: CustomDataType; + status: ClearMessageStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ClearVariableMonitoringRequest.d.ts b/lib/types/v201/ClearVariableMonitoringRequest.d.ts new file mode 100644 index 0000000..27d6fbe --- /dev/null +++ b/lib/types/v201/ClearVariableMonitoringRequest.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearVariableMonitoringRequest { + customData?: CustomDataType; + /** + * List of the monitors to be cleared, identified by there Id. + * + */ + id: number[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ClearVariableMonitoringResponse.d.ts b/lib/types/v201/ClearVariableMonitoringResponse.d.ts new file mode 100644 index 0000000..c605176 --- /dev/null +++ b/lib/types/v201/ClearVariableMonitoringResponse.d.ts @@ -0,0 +1,53 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Result of the clear request for this monitor, identified by its Id. + * + * + */ +export type ClearMonitoringStatusEnumType = "Accepted" | "Rejected" | "NotFound"; + +export interface ClearVariableMonitoringResponse { + customData?: CustomDataType; + clearMonitoringResult: ClearMonitoringResultType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +export interface ClearMonitoringResultType { + customData?: CustomDataType; + status: ClearMonitoringStatusEnumType; + /** + * Id of the monitor of which a clear was requested. + * + * + */ + id: number; + statusInfo?: StatusInfoType; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ClearedChargingLimitRequest.d.ts b/lib/types/v201/ClearedChargingLimitRequest.d.ts new file mode 100644 index 0000000..a93cb9d --- /dev/null +++ b/lib/types/v201/ClearedChargingLimitRequest.d.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Source of the charging limit. + * + */ +export type ChargingLimitSourceEnumType = "EMS" | "Other" | "SO" | "CSO"; + +export interface ClearedChargingLimitRequest { + customData?: CustomDataType; + chargingLimitSource: ChargingLimitSourceEnumType; + /** + * EVSE Identifier. + * + */ + evseId?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ClearedChargingLimitResponse.d.ts b/lib/types/v201/ClearedChargingLimitResponse.d.ts new file mode 100644 index 0000000..f0d9d8e --- /dev/null +++ b/lib/types/v201/ClearedChargingLimitResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ClearedChargingLimitResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/CostUpdatedRequest.d.ts b/lib/types/v201/CostUpdatedRequest.d.ts new file mode 100644 index 0000000..e2daa72 --- /dev/null +++ b/lib/types/v201/CostUpdatedRequest.d.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface CostUpdatedRequest { + customData?: CustomDataType; + /** + * Current total cost, based on the information known by the CSMS, of the transaction including taxes. In the currency configured with the configuration Variable: [<<configkey-currency, Currency>>] + * + * + */ + totalCost: number; + /** + * Transaction Id of the transaction the current cost are asked for. + * + * + */ + transactionId: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/CostUpdatedResponse.d.ts b/lib/types/v201/CostUpdatedResponse.d.ts new file mode 100644 index 0000000..a64c67e --- /dev/null +++ b/lib/types/v201/CostUpdatedResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface CostUpdatedResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/CustomerInformationRequest.d.ts b/lib/types/v201/CustomerInformationRequest.d.ts new file mode 100644 index 0000000..e4b1cf7 --- /dev/null +++ b/lib/types/v201/CustomerInformationRequest.d.ts @@ -0,0 +1,111 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Used algorithms for the hashes provided. + * + */ +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; + +export interface CustomerInformationRequest { + customData?: CustomDataType; + customerCertificate?: CertificateHashDataType; + idToken?: IdTokenType; + /** + * The Id of the request. + * + * + */ + requestId: number; + /** + * Flag indicating whether the Charging Station should return NotifyCustomerInformationRequest messages containing information about the customer referred to. + * + */ + report: boolean; + /** + * Flag indicating whether the Charging Station should clear all information about the customer referred to. + * + */ + clear: boolean; + /** + * A (e.g. vendor specific) identifier of the customer this request refers to. This field contains a custom identifier other than IdToken and Certificate. + * One of the possible identifiers (customerIdentifier, customerIdToken or customerCertificate) should be in the request message. + * + */ + customerIdentifier?: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +export interface CertificateHashDataType { + customData?: CustomDataType; + hashAlgorithm: HashAlgorithmEnumType; + /** + * Hashed value of the Issuer DN (Distinguished Name). + * + * + */ + issuerNameHash: string; + /** + * Hashed value of the issuers public key + * + */ + issuerKeyHash: string; + /** + * The serial number of the certificate. + * + */ + serialNumber: string; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} diff --git a/lib/types/v201/CustomerInformationResponse.d.ts b/lib/types/v201/CustomerInformationResponse.d.ts new file mode 100644 index 0000000..0d95808 --- /dev/null +++ b/lib/types/v201/CustomerInformationResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the request was accepted. + * + */ +export type CustomerInformationStatusEnumType = "Accepted" | "Rejected" | "Invalid"; + +export interface CustomerInformationResponse { + customData?: CustomDataType; + status: CustomerInformationStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/DataTransferRequest.d.ts b/lib/types/v201/DataTransferRequest.d.ts new file mode 100644 index 0000000..6db940f --- /dev/null +++ b/lib/types/v201/DataTransferRequest.d.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface DataTransferRequest { + customData?: CustomDataType; + /** + * May be used to indicate a specific message or implementation. + * + */ + messageId?: string; + /** + * Data without specified length or format. This needs to be decided by both parties (Open to implementation). + * + */ + data?: { + [k: string]: unknown; + }; + /** + * This identifies the Vendor specific implementation + * + * + */ + vendorId: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/DataTransferResponse.d.ts b/lib/types/v201/DataTransferResponse.d.ts new file mode 100644 index 0000000..76fd5e6 --- /dev/null +++ b/lib/types/v201/DataTransferResponse.d.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates the success or failure of the data transfer. + * + */ +export type DataTransferStatusEnumType = "Accepted" | "Rejected" | "UnknownMessageId" | "UnknownVendorId"; + +export interface DataTransferResponse { + customData?: CustomDataType; + status: DataTransferStatusEnumType; + statusInfo?: StatusInfoType; + /** + * Data without specified length or format, in response to request. + * + */ + data?: { + [k: string]: unknown; + }; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/DeleteCertificateRequest.d.ts b/lib/types/v201/DeleteCertificateRequest.d.ts new file mode 100644 index 0000000..f724e1f --- /dev/null +++ b/lib/types/v201/DeleteCertificateRequest.d.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Used algorithms for the hashes provided. + * + */ +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; + +export interface DeleteCertificateRequest { + customData?: CustomDataType; + certificateHashData: CertificateHashDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +export interface CertificateHashDataType { + customData?: CustomDataType; + hashAlgorithm: HashAlgorithmEnumType; + /** + * Hashed value of the Issuer DN (Distinguished Name). + * + * + */ + issuerNameHash: string; + /** + * Hashed value of the issuers public key + * + */ + issuerKeyHash: string; + /** + * The serial number of the certificate. + * + */ + serialNumber: string; +} diff --git a/lib/types/v201/DeleteCertificateResponse.d.ts b/lib/types/v201/DeleteCertificateResponse.d.ts new file mode 100644 index 0000000..8c23eaa --- /dev/null +++ b/lib/types/v201/DeleteCertificateResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging Station indicates if it can process the request. + * + */ +export type DeleteCertificateStatusEnumType = "Accepted" | "Failed" | "NotFound"; + +export interface DeleteCertificateResponse { + customData?: CustomDataType; + status: DeleteCertificateStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/FirmwareStatusNotificationRequest.d.ts b/lib/types/v201/FirmwareStatusNotificationRequest.d.ts new file mode 100644 index 0000000..1728653 --- /dev/null +++ b/lib/types/v201/FirmwareStatusNotificationRequest.d.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the progress status of the firmware installation. + * + */ +export type FirmwareStatusEnumType = + | "Downloaded" + | "DownloadFailed" + | "Downloading" + | "DownloadScheduled" + | "DownloadPaused" + | "Idle" + | "InstallationFailed" + | "Installing" + | "Installed" + | "InstallRebooting" + | "InstallScheduled" + | "InstallVerificationFailed" + | "InvalidSignature" + | "SignatureVerified"; + +export interface FirmwareStatusNotificationRequest { + customData?: CustomDataType; + status: FirmwareStatusEnumType; + /** + * The request id that was provided in the + * UpdateFirmwareRequest that started this firmware update. + * This field is mandatory, unless the message was triggered by a TriggerMessageRequest AND there is no firmware update ongoing. + * + */ + requestId?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/FirmwareStatusNotificationResponse.d.ts b/lib/types/v201/FirmwareStatusNotificationResponse.d.ts new file mode 100644 index 0000000..a50f9a2 --- /dev/null +++ b/lib/types/v201/FirmwareStatusNotificationResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface FirmwareStatusNotificationResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/Get15118EVCertificateRequest.d.ts b/lib/types/v201/Get15118EVCertificateRequest.d.ts new file mode 100644 index 0000000..f3b9b4b --- /dev/null +++ b/lib/types/v201/Get15118EVCertificateRequest.d.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Defines whether certificate needs to be installed or updated. + * + */ +export type CertificateActionEnumType = "Install" | "Update"; + +export interface Get15118EVCertificateRequest { + customData?: CustomDataType; + /** + * Schema version currently used for the 15118 session between EV and Charging Station. Needed for parsing of the EXI stream by the CSMS. + * + * + */ + iso15118SchemaVersion: string; + action: CertificateActionEnumType; + /** + * Raw CertificateInstallationReq request from EV, Base64 encoded. + * + */ + exiRequest: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/Get15118EVCertificateResponse.d.ts b/lib/types/v201/Get15118EVCertificateResponse.d.ts new file mode 100644 index 0000000..8685a94 --- /dev/null +++ b/lib/types/v201/Get15118EVCertificateResponse.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the message was processed properly. + * + */ +export type Iso15118EVCertificateStatusEnumType = "Accepted" | "Failed"; + +export interface Get15118EVCertificateResponse { + customData?: CustomDataType; + status: Iso15118EVCertificateStatusEnumType; + statusInfo?: StatusInfoType; + /** + * Raw CertificateInstallationRes response for the EV, Base64 encoded. + * + */ + exiResponse: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetBaseReportRequest.d.ts b/lib/types/v201/GetBaseReportRequest.d.ts new file mode 100644 index 0000000..798fc91 --- /dev/null +++ b/lib/types/v201/GetBaseReportRequest.d.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This field specifies the report base. + * + */ +export type ReportBaseEnumType = "ConfigurationInventory" | "FullInventory" | "SummaryInventory"; + +export interface GetBaseReportRequest { + customData?: CustomDataType; + /** + * The Id of the request. + * + */ + requestId: number; + reportBase: ReportBaseEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetBaseReportResponse.d.ts b/lib/types/v201/GetBaseReportResponse.d.ts new file mode 100644 index 0000000..310e155 --- /dev/null +++ b/lib/types/v201/GetBaseReportResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station is able to accept this request. + * + */ +export type GenericDeviceModelStatusEnumType = "Accepted" | "Rejected" | "NotSupported" | "EmptyResultSet"; + +export interface GetBaseReportResponse { + customData?: CustomDataType; + status: GenericDeviceModelStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetCertificateStatusRequest.d.ts b/lib/types/v201/GetCertificateStatusRequest.d.ts new file mode 100644 index 0000000..2ef5765 --- /dev/null +++ b/lib/types/v201/GetCertificateStatusRequest.d.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Used algorithms for the hashes provided. + * + */ +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; + +export interface GetCertificateStatusRequest { + customData?: CustomDataType; + ocspRequestData: OCSPRequestDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +export interface OCSPRequestDataType { + customData?: CustomDataType; + hashAlgorithm: HashAlgorithmEnumType; + /** + * Hashed value of the Issuer DN (Distinguished Name). + * + * + */ + issuerNameHash: string; + /** + * Hashed value of the issuers public key + * + */ + issuerKeyHash: string; + /** + * The serial number of the certificate. + * + */ + serialNumber: string; + /** + * This contains the responder URL (Case insensitive). + * + * + */ + responderURL: string; +} diff --git a/lib/types/v201/GetCertificateStatusResponse.d.ts b/lib/types/v201/GetCertificateStatusResponse.d.ts new file mode 100644 index 0000000..1c2b187 --- /dev/null +++ b/lib/types/v201/GetCertificateStatusResponse.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the charging station was able to retrieve the OCSP certificate status. + * + */ +export type GetCertificateStatusEnumType = "Accepted" | "Failed"; + +export interface GetCertificateStatusResponse { + customData?: CustomDataType; + status: GetCertificateStatusEnumType; + statusInfo?: StatusInfoType; + /** + * OCSPResponse class as defined in <<ref-ocpp_security_24, IETF RFC 6960>>. DER encoded (as defined in <<ref-ocpp_security_24, IETF RFC 6960>>), and then base64 encoded. MAY only be omitted when status is not Accepted. + * + */ + ocspResult?: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetChargingProfilesRequest.d.ts b/lib/types/v201/GetChargingProfilesRequest.d.ts new file mode 100644 index 0000000..fb0bdd2 --- /dev/null +++ b/lib/types/v201/GetChargingProfilesRequest.d.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code + * urn:x-oca:ocpp:uid:1:569231 + * Defines the purpose of the schedule transferred by this profile + * + */ +export type ChargingProfilePurposeEnumType = + | "ChargingStationExternalConstraints" + | "ChargingStationMaxProfile" + | "TxDefaultProfile" + | "TxProfile"; +export type ChargingLimitSourceEnumType = "EMS" | "Other" | "SO" | "CSO"; + +export interface GetChargingProfilesRequest { + customData?: CustomDataType; + /** + * Reference identification that is to be used by the Charging Station in the <<reportchargingprofilesrequest, ReportChargingProfilesRequest>> when provided. + * + */ + requestId: number; + /** + * For which EVSE installed charging profiles SHALL be reported. If 0, only charging profiles installed on the Charging Station itself (the grid connection) SHALL be reported. If omitted, all installed charging profiles SHALL be reported. + * + */ + evseId?: number; + chargingProfile: ChargingProfileCriterionType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Profile + * urn:x-oca:ocpp:uid:2:233255 + * A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. + * + */ +export interface ChargingProfileCriterionType { + customData?: CustomDataType; + chargingProfilePurpose?: ChargingProfilePurposeEnumType; + /** + * Charging_ Profile. Stack_ Level. Counter + * urn:x-oca:ocpp:uid:1:569230 + * Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. + * + */ + stackLevel?: number; + /** + * List of all the chargingProfileIds requested. Any ChargingProfile that matches one of these profiles will be reported. If omitted, the Charging Station SHALL not filter on chargingProfileId. This field SHALL NOT contain more ids than set in <<configkey-charging-profile-entries,ChargingProfileEntries.maxLimit>> + * + * + */ + chargingProfileId?: number[]; + /** + * For which charging limit sources, charging profiles SHALL be reported. If omitted, the Charging Station SHALL not filter on chargingLimitSource. + * + */ + chargingLimitSource?: ChargingLimitSourceEnumType[]; +} diff --git a/lib/types/v201/GetChargingProfilesResponse.d.ts b/lib/types/v201/GetChargingProfilesResponse.d.ts new file mode 100644 index 0000000..c3f97b8 --- /dev/null +++ b/lib/types/v201/GetChargingProfilesResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station is able to process this request and will send <<reportchargingprofilesrequest, ReportChargingProfilesRequest>> messages. + * + */ +export type GetChargingProfileStatusEnumType = "Accepted" | "NoProfiles"; + +export interface GetChargingProfilesResponse { + customData?: CustomDataType; + status: GetChargingProfileStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetCompositeScheduleRequest.d.ts b/lib/types/v201/GetCompositeScheduleRequest.d.ts new file mode 100644 index 0000000..924a4f5 --- /dev/null +++ b/lib/types/v201/GetCompositeScheduleRequest.d.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Can be used to force a power or current profile. + * + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; + +export interface GetCompositeScheduleRequest { + customData?: CustomDataType; + /** + * Length of the requested schedule in seconds. + * + * + */ + duration: number; + chargingRateUnit?: ChargingRateUnitEnumType; + /** + * The ID of the EVSE for which the schedule is requested. When evseid=0, the Charging Station will calculate the expected consumption for the grid connection. + * + */ + evseId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetCompositeScheduleResponse.d.ts b/lib/types/v201/GetCompositeScheduleResponse.d.ts new file mode 100644 index 0000000..c8cdc5b --- /dev/null +++ b/lib/types/v201/GetCompositeScheduleResponse.d.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * The Charging Station will indicate if it was + * able to process the request + * + */ +export type GenericStatusEnumType = "Accepted" | "Rejected"; +/** + * The unit of measure Limit is + * expressed in. + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; + +export interface GetCompositeScheduleResponse { + customData?: CustomDataType; + status: GenericStatusEnumType; + statusInfo?: StatusInfoType; + schedule?: CompositeScheduleType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} +/** + * Composite_ Schedule + * urn:x-oca:ocpp:uid:2:233362 + * + */ +export interface CompositeScheduleType { + customData?: CustomDataType; + chargingSchedulePeriod: ChargingSchedulePeriodType[]; + /** + * The ID of the EVSE for which the + * schedule is requested. When evseid=0, the + * Charging Station calculated the expected + * consumption for the grid connection. + * + */ + evseId: number; + /** + * Duration of the schedule in seconds. + * + */ + duration: number; + /** + * Composite_ Schedule. Start. Date_ Time + * urn:x-oca:ocpp:uid:1:569456 + * Date and time at which the schedule becomes active. All time measurements within the schedule are relative to this timestamp. + * + */ + scheduleStart: string; + chargingRateUnit: ChargingRateUnitEnumType; +} +/** + * Charging_ Schedule_ Period + * urn:x-oca:ocpp:uid:2:233257 + * Charging schedule period structure defines a time period in a charging schedule. + * + */ +export interface ChargingSchedulePeriodType { + customData?: CustomDataType; + /** + * Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569240 + * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. + * + */ + startPeriod: number; + /** + * Charging_ Schedule_ Period. Limit. Measure + * urn:x-oca:ocpp:uid:1:569241 + * Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). + * + */ + limit: number; + /** + * Charging_ Schedule_ Period. Number_ Phases. Counter + * urn:x-oca:ocpp:uid:1:569242 + * The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. + * + */ + numberPhases?: number; + /** + * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. + * + * + */ + phaseToUse?: number; +} diff --git a/lib/types/v201/GetDisplayMessagesRequest.d.ts b/lib/types/v201/GetDisplayMessagesRequest.d.ts new file mode 100644 index 0000000..f5a8dee --- /dev/null +++ b/lib/types/v201/GetDisplayMessagesRequest.d.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * If provided the Charging Station shall return Display Messages with the given priority only. + * + */ +export type MessagePriorityEnumType = "AlwaysFront" | "InFront" | "NormalCycle"; +/** + * If provided the Charging Station shall return Display Messages with the given state only. + * + */ +export type MessageStateEnumType = "Charging" | "Faulted" | "Idle" | "Unavailable"; + +export interface GetDisplayMessagesRequest { + customData?: CustomDataType; + /** + * If provided the Charging Station shall return Display Messages of the given ids. This field SHALL NOT contain more ids than set in <<configkey-number-of-display-messages,NumberOfDisplayMessages.maxLimit>> + * + * + */ + id?: number[]; + /** + * The Id of this request. + * + */ + requestId: number; + priority?: MessagePriorityEnumType; + state?: MessageStateEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetDisplayMessagesResponse.d.ts b/lib/types/v201/GetDisplayMessagesResponse.d.ts new file mode 100644 index 0000000..bc56af5 --- /dev/null +++ b/lib/types/v201/GetDisplayMessagesResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates if the Charging Station has Display Messages that match the request criteria in the <<getdisplaymessagesrequest,GetDisplayMessagesRequest>> + * + */ +export type GetDisplayMessagesStatusEnumType = "Accepted" | "Unknown"; + +export interface GetDisplayMessagesResponse { + customData?: CustomDataType; + status: GetDisplayMessagesStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetInstalledCertificateIdsRequest.d.ts b/lib/types/v201/GetInstalledCertificateIdsRequest.d.ts new file mode 100644 index 0000000..3e17a4e --- /dev/null +++ b/lib/types/v201/GetInstalledCertificateIdsRequest.d.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type GetCertificateIdUseEnumType = + | "V2GRootCertificate" + | "MORootCertificate" + | "CSMSRootCertificate" + | "V2GCertificateChain" + | "ManufacturerRootCertificate"; + +export interface GetInstalledCertificateIdsRequest { + customData?: CustomDataType; + /** + * Indicates the type of certificates requested. When omitted, all certificate types are requested. + * + */ + certificateType?: GetCertificateIdUseEnumType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetInstalledCertificateIdsResponse.d.ts b/lib/types/v201/GetInstalledCertificateIdsResponse.d.ts new file mode 100644 index 0000000..5ba3fc5 --- /dev/null +++ b/lib/types/v201/GetInstalledCertificateIdsResponse.d.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging Station indicates if it can process the request. + * + */ +export type GetInstalledCertificateStatusEnumType = "Accepted" | "NotFound"; +/** + * Used algorithms for the hashes provided. + * + */ +export type HashAlgorithmEnumType = "SHA256" | "SHA384" | "SHA512"; +/** + * Indicates the type of the requested certificate(s). + * + */ +export type GetCertificateIdUseEnumType = + | "V2GRootCertificate" + | "MORootCertificate" + | "CSMSRootCertificate" + | "V2GCertificateChain" + | "ManufacturerRootCertificate"; + +export interface GetInstalledCertificateIdsResponse { + customData?: CustomDataType; + status: GetInstalledCertificateStatusEnumType; + statusInfo?: StatusInfoType; + certificateHashDataChain?: CertificateHashDataChainType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} +export interface CertificateHashDataChainType { + customData?: CustomDataType; + certificateHashData: CertificateHashDataType; + certificateType: GetCertificateIdUseEnumType; + childCertificateHashData?: CertificateHashDataType[]; +} +export interface CertificateHashDataType { + customData?: CustomDataType; + hashAlgorithm: HashAlgorithmEnumType; + /** + * Hashed value of the Issuer DN (Distinguished Name). + * + * + */ + issuerNameHash: string; + /** + * Hashed value of the issuers public key + * + */ + issuerKeyHash: string; + /** + * The serial number of the certificate. + * + */ + serialNumber: string; +} diff --git a/lib/types/v201/GetLocalListVersionRequest.d.ts b/lib/types/v201/GetLocalListVersionRequest.d.ts new file mode 100644 index 0000000..dda9dd1 --- /dev/null +++ b/lib/types/v201/GetLocalListVersionRequest.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetLocalListVersionRequest { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetLocalListVersionResponse.d.ts b/lib/types/v201/GetLocalListVersionResponse.d.ts new file mode 100644 index 0000000..8a48435 --- /dev/null +++ b/lib/types/v201/GetLocalListVersionResponse.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetLocalListVersionResponse { + customData?: CustomDataType; + /** + * This contains the current version number of the local authorization list in the Charging Station. + * + */ + versionNumber: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetLogRequest.d.ts b/lib/types/v201/GetLogRequest.d.ts new file mode 100644 index 0000000..59e788b --- /dev/null +++ b/lib/types/v201/GetLogRequest.d.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the type of log file that the Charging Station + * should send. + * + */ +export type LogEnumType = "DiagnosticsLog" | "SecurityLog"; + +export interface GetLogRequest { + customData?: CustomDataType; + log: LogParametersType; + logType: LogEnumType; + /** + * The Id of this request + * + */ + requestId: number; + /** + * This specifies how many times the Charging Station must try to upload the log before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry. + * + */ + retries?: number; + /** + * The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts. + * + */ + retryInterval?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Log + * urn:x-enexis:ecdm:uid:2:233373 + * Generic class for the configuration of logging entries. + * + */ +export interface LogParametersType { + customData?: CustomDataType; + /** + * Log. Remote_ Location. URI + * urn:x-enexis:ecdm:uid:1:569484 + * The URL of the location at the remote system where the log should be stored. + * + */ + remoteLocation: string; + /** + * Log. Oldest_ Timestamp. Date_ Time + * urn:x-enexis:ecdm:uid:1:569477 + * This contains the date and time of the oldest logging information to include in the diagnostics. + * + */ + oldestTimestamp?: string; + /** + * Log. Latest_ Timestamp. Date_ Time + * urn:x-enexis:ecdm:uid:1:569482 + * This contains the date and time of the latest logging information to include in the diagnostics. + * + */ + latestTimestamp?: string; +} diff --git a/lib/types/v201/GetLogResponse.d.ts b/lib/types/v201/GetLogResponse.d.ts new file mode 100644 index 0000000..6f54c9d --- /dev/null +++ b/lib/types/v201/GetLogResponse.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This field indicates whether the Charging Station was able to accept the request. + * + */ +export type LogStatusEnumType = "Accepted" | "Rejected" | "AcceptedCanceled"; + +export interface GetLogResponse { + customData?: CustomDataType; + status: LogStatusEnumType; + statusInfo?: StatusInfoType; + /** + * This contains the name of the log file that will be uploaded. This field is not present when no logging information is available. + * + */ + filename?: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetMonitoringReportRequest.d.ts b/lib/types/v201/GetMonitoringReportRequest.d.ts new file mode 100644 index 0000000..7d1e627 --- /dev/null +++ b/lib/types/v201/GetMonitoringReportRequest.d.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type MonitoringCriterionEnumType = "ThresholdMonitoring" | "DeltaMonitoring" | "PeriodicMonitoring"; + +export interface GetMonitoringReportRequest { + customData?: CustomDataType; + componentVariable?: ComponentVariableType[]; + /** + * The Id of the request. + * + */ + requestId: number; + /** + * This field contains criteria for components for which a monitoring report is requested + * + */ + monitoringCriteria?: MonitoringCriterionEnumType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to report components, variables and variable attributes and characteristics. + * + */ +export interface ComponentVariableType { + customData?: CustomDataType; + component: ComponentType; + variable?: VariableType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/GetMonitoringReportResponse.d.ts b/lib/types/v201/GetMonitoringReportResponse.d.ts new file mode 100644 index 0000000..ffcae17 --- /dev/null +++ b/lib/types/v201/GetMonitoringReportResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This field indicates whether the Charging Station was able to accept the request. + * + */ +export type GenericDeviceModelStatusEnumType = "Accepted" | "Rejected" | "NotSupported" | "EmptyResultSet"; + +export interface GetMonitoringReportResponse { + customData?: CustomDataType; + status: GenericDeviceModelStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetReportRequest.d.ts b/lib/types/v201/GetReportRequest.d.ts new file mode 100644 index 0000000..5d934d0 --- /dev/null +++ b/lib/types/v201/GetReportRequest.d.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type ComponentCriterionEnumType = "Active" | "Available" | "Enabled" | "Problem"; + +export interface GetReportRequest { + customData?: CustomDataType; + componentVariable?: ComponentVariableType[]; + /** + * The Id of the request. + * + */ + requestId: number; + /** + * This field contains criteria for components for which a report is requested + * + */ + componentCriteria?: ComponentCriterionEnumType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to report components, variables and variable attributes and characteristics. + * + */ +export interface ComponentVariableType { + customData?: CustomDataType; + component: ComponentType; + variable?: VariableType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/GetReportResponse.d.ts b/lib/types/v201/GetReportResponse.d.ts new file mode 100644 index 0000000..321fb2e --- /dev/null +++ b/lib/types/v201/GetReportResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This field indicates whether the Charging Station was able to accept the request. + * + */ +export type GenericDeviceModelStatusEnumType = "Accepted" | "Rejected" | "NotSupported" | "EmptyResultSet"; + +export interface GetReportResponse { + customData?: CustomDataType; + status: GenericDeviceModelStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/GetTransactionStatusRequest.d.ts b/lib/types/v201/GetTransactionStatusRequest.d.ts new file mode 100644 index 0000000..48d200c --- /dev/null +++ b/lib/types/v201/GetTransactionStatusRequest.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetTransactionStatusRequest { + customData?: CustomDataType; + /** + * The Id of the transaction for which the status is requested. + * + */ + transactionId?: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetTransactionStatusResponse.d.ts b/lib/types/v201/GetTransactionStatusResponse.d.ts new file mode 100644 index 0000000..593afe5 --- /dev/null +++ b/lib/types/v201/GetTransactionStatusResponse.d.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface GetTransactionStatusResponse { + customData?: CustomDataType; + /** + * Whether the transaction is still ongoing. + * + */ + ongoingIndicator?: boolean; + /** + * Whether there are still message to be delivered. + * + */ + messagesInQueue: boolean; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/GetVariablesRequest.d.ts b/lib/types/v201/GetVariablesRequest.d.ts new file mode 100644 index 0000000..107550a --- /dev/null +++ b/lib/types/v201/GetVariablesRequest.d.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Attribute type for which value is requested. When absent, default Actual is assumed. + * + */ +export type AttributeEnumType = "Actual" | "Target" | "MinSet" | "MaxSet"; + +export interface GetVariablesRequest { + customData?: CustomDataType; + getVariableData: GetVariableDataType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to hold parameters for GetVariables request. + * + */ +export interface GetVariableDataType { + customData?: CustomDataType; + attributeType?: AttributeEnumType; + component: ComponentType; + variable: VariableType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/GetVariablesResponse.d.ts b/lib/types/v201/GetVariablesResponse.d.ts new file mode 100644 index 0000000..9b00065 --- /dev/null +++ b/lib/types/v201/GetVariablesResponse.d.ts @@ -0,0 +1,128 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Result status of getting the variable. + * + * + */ +export type GetVariableStatusEnumType = + | "Accepted" + | "Rejected" + | "UnknownComponent" + | "UnknownVariable" + | "NotSupportedAttributeType"; +/** + * Attribute type for which value is requested. When absent, default Actual is assumed. + * + */ +export type AttributeEnumType = "Actual" | "Target" | "MinSet" | "MaxSet"; + +export interface GetVariablesResponse { + customData?: CustomDataType; + getVariableResult: GetVariableResultType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to hold results of GetVariables request. + * + */ +export interface GetVariableResultType { + customData?: CustomDataType; + attributeStatusInfo?: StatusInfoType; + attributeStatus: GetVariableStatusEnumType; + attributeType?: AttributeEnumType; + /** + * Value of requested attribute type of component-variable. This field can only be empty when the given status is NOT accepted. + * + * The Configuration Variable <<configkey-reporting-value-size,ReportingValueSize>> can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal. + * + * + */ + attributeValue?: string; + component: ComponentType; + variable: VariableType; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/HeartbeatRequest.d.ts b/lib/types/v201/HeartbeatRequest.d.ts new file mode 100644 index 0000000..649060c --- /dev/null +++ b/lib/types/v201/HeartbeatRequest.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface HeartbeatRequest { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/HeartbeatResponse.d.ts b/lib/types/v201/HeartbeatResponse.d.ts new file mode 100644 index 0000000..dc0b2e8 --- /dev/null +++ b/lib/types/v201/HeartbeatResponse.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface HeartbeatResponse { + customData?: CustomDataType; + /** + * Contains the current time of the CSMS. + * + */ + currentTime: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/InstallCertificateRequest.d.ts b/lib/types/v201/InstallCertificateRequest.d.ts new file mode 100644 index 0000000..453c4a1 --- /dev/null +++ b/lib/types/v201/InstallCertificateRequest.d.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates the certificate type that is sent. + * + */ +export type InstallCertificateUseEnumType = + | "V2GRootCertificate" + | "MORootCertificate" + | "CSMSRootCertificate" + | "ManufacturerRootCertificate"; + +export interface InstallCertificateRequest { + customData?: CustomDataType; + certificateType: InstallCertificateUseEnumType; + /** + * A PEM encoded X.509 certificate. + * + */ + certificate: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/InstallCertificateResponse.d.ts b/lib/types/v201/InstallCertificateResponse.d.ts new file mode 100644 index 0000000..0d858db --- /dev/null +++ b/lib/types/v201/InstallCertificateResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging Station indicates if installation was successful. + * + */ +export type InstallCertificateStatusEnumType = "Accepted" | "Rejected" | "Failed"; + +export interface InstallCertificateResponse { + customData?: CustomDataType; + status: InstallCertificateStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/LogStatusNotificationRequest.d.ts b/lib/types/v201/LogStatusNotificationRequest.d.ts new file mode 100644 index 0000000..9d93dc7 --- /dev/null +++ b/lib/types/v201/LogStatusNotificationRequest.d.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the status of the log upload. + * + */ +export type UploadLogStatusEnumType = + | "BadMessage" + | "Idle" + | "NotSupportedOperation" + | "PermissionDenied" + | "Uploaded" + | "UploadFailure" + | "Uploading" + | "AcceptedCanceled"; + +export interface LogStatusNotificationRequest { + customData?: CustomDataType; + status: UploadLogStatusEnumType; + /** + * The request id that was provided in GetLogRequest that started this log upload. This field is mandatory, + * unless the message was triggered by a TriggerMessageRequest AND there is no log upload ongoing. + * + */ + requestId?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/LogStatusNotificationResponse.d.ts b/lib/types/v201/LogStatusNotificationResponse.d.ts new file mode 100644 index 0000000..960a6b5 --- /dev/null +++ b/lib/types/v201/LogStatusNotificationResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface LogStatusNotificationResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/MeterValuesRequest.d.ts b/lib/types/v201/MeterValuesRequest.d.ts new file mode 100644 index 0000000..a04ec42 --- /dev/null +++ b/lib/types/v201/MeterValuesRequest.d.ts @@ -0,0 +1,181 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Sampled_ Value. Context. Reading_ Context_ Code + * urn:x-oca:ocpp:uid:1:569261 + * Type of detail value: start, end or sample. Default = "Sample.Periodic" + * + */ +export type ReadingContextEnumType = + | "Interruption.Begin" + | "Interruption.End" + | "Other" + | "Sample.Clock" + | "Sample.Periodic" + | "Transaction.Begin" + | "Transaction.End" + | "Trigger"; +/** + * Sampled_ Value. Measurand. Measurand_ Code + * urn:x-oca:ocpp:uid:1:569263 + * Type of measurement. Default = "Energy.Active.Import.Register" + * + */ +export type MeasurandEnumType = + | "Current.Export" + | "Current.Import" + | "Current.Offered" + | "Energy.Active.Export.Register" + | "Energy.Active.Import.Register" + | "Energy.Reactive.Export.Register" + | "Energy.Reactive.Import.Register" + | "Energy.Active.Export.Interval" + | "Energy.Active.Import.Interval" + | "Energy.Active.Net" + | "Energy.Reactive.Export.Interval" + | "Energy.Reactive.Import.Interval" + | "Energy.Reactive.Net" + | "Energy.Apparent.Net" + | "Energy.Apparent.Import" + | "Energy.Apparent.Export" + | "Frequency" + | "Power.Active.Export" + | "Power.Active.Import" + | "Power.Factor" + | "Power.Offered" + | "Power.Reactive.Export" + | "Power.Reactive.Import" + | "SoC" + | "Voltage"; +/** + * Sampled_ Value. Phase. Phase_ Code + * urn:x-oca:ocpp:uid:1:569264 + * Indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value. + * + */ +export type PhaseEnumType = "L1" | "L2" | "L3" | "N" | "L1-N" | "L2-N" | "L3-N" | "L1-L2" | "L2-L3" | "L3-L1"; +/** + * Sampled_ Value. Location. Location_ Code + * urn:x-oca:ocpp:uid:1:569265 + * Indicates where the measured value has been sampled. Default = "Outlet" + * + * + */ +export type LocationEnumType = "Body" | "Cable" | "EV" | "Inlet" | "Outlet"; + +/** + * Request_ Body + * urn:x-enexis:ecdm:uid:2:234744 + * + */ +export interface MeterValuesRequest { + customData?: CustomDataType; + /** + * Request_ Body. EVSEID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:571101 + * This contains a number (>0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter. + * + */ + evseId: number; + meterValue: MeterValueType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Meter_ Value + * urn:x-oca:ocpp:uid:2:233265 + * Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time. + * + */ +export interface MeterValueType { + customData?: CustomDataType; + sampledValue: SampledValueType[]; + /** + * Meter_ Value. Timestamp. Date_ Time + * urn:x-oca:ocpp:uid:1:569259 + * Timestamp for measured value(s). + * + */ + timestamp: string; +} +/** + * Sampled_ Value + * urn:x-oca:ocpp:uid:2:233266 + * Single sampled value in MeterValues. Each value can be accompanied by optional fields. + * + * To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units. + * + */ +export interface SampledValueType { + customData?: CustomDataType; + /** + * Sampled_ Value. Value. Measure + * urn:x-oca:ocpp:uid:1:569260 + * Indicates the measured value. + * + * + */ + value: number; + context?: ReadingContextEnumType; + measurand?: MeasurandEnumType; + phase?: PhaseEnumType; + location?: LocationEnumType; + signedMeterValue?: SignedMeterValueType; + unitOfMeasure?: UnitOfMeasureType; +} +/** + * Represent a signed version of the meter value. + * + */ +export interface SignedMeterValueType { + customData?: CustomDataType; + /** + * Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc. + * + */ + signedMeterData: string; + /** + * Method used to create the digital signature. + * + */ + signingMethod: string; + /** + * Method used to encode the meter values before applying the digital signature algorithm. + * + */ + encodingMethod: string; + /** + * Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_. + * + */ + publicKey: string; +} +/** + * Represents a UnitOfMeasure with a multiplier + * + */ +export interface UnitOfMeasureType { + customData?: CustomDataType; + /** + * Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type. + * This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices. + * If an applicable unit is available in that list, otherwise a "custom" unit might be used. + * + */ + unit?: string; + /** + * Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0. + * + */ + multiplier?: number; +} diff --git a/lib/types/v201/MeterValuesResponse.d.ts b/lib/types/v201/MeterValuesResponse.d.ts new file mode 100644 index 0000000..59b23b8 --- /dev/null +++ b/lib/types/v201/MeterValuesResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface MeterValuesResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyChargingLimitRequest.d.ts b/lib/types/v201/NotifyChargingLimitRequest.d.ts new file mode 100644 index 0000000..ec9df8b --- /dev/null +++ b/lib/types/v201/NotifyChargingLimitRequest.d.ts @@ -0,0 +1,245 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code + * urn:x-oca:ocpp:uid:1:569238 + * The unit of measure Limit is expressed in. + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; +/** + * Cost. Cost_ Kind. Cost_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569243 + * The kind of cost referred to in the message element amount + * + */ +export type CostKindEnumType = "CarbonDioxideEmission" | "RelativePricePercentage" | "RenewableGenerationPercentage"; +/** + * Charging_ Limit. Charging_ Limit_ Source. Charging_ Limit_ Source_ Code + * urn:x-enexis:ecdm:uid:1:570845 + * Represents the source of the charging limit. + * + */ +export type ChargingLimitSourceEnumType = "EMS" | "Other" | "SO" | "CSO"; + +export interface NotifyChargingLimitRequest { + customData?: CustomDataType; + chargingSchedule?: ChargingScheduleType[]; + /** + * The charging schedule contained in this notification applies to an EVSE. evseId must be > 0. + * + */ + evseId?: number; + chargingLimit: ChargingLimitType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Schedule + * urn:x-oca:ocpp:uid:2:233256 + * Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. + * + */ +export interface ChargingScheduleType { + customData?: CustomDataType; + /** + * Identifies the ChargingSchedule. + * + */ + id: number; + /** + * Charging_ Schedule. Start_ Schedule. Date_ Time + * urn:x-oca:ocpp:uid:1:569237 + * Starting point of an absolute schedule. If absent the schedule will be relative to start of charging. + * + */ + startSchedule?: string; + /** + * Charging_ Schedule. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569236 + * Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. + * + */ + duration?: number; + chargingRateUnit: ChargingRateUnitEnumType; + chargingSchedulePeriod: ChargingSchedulePeriodType[]; + /** + * Charging_ Schedule. Min_ Charging_ Rate. Numeric + * urn:x-oca:ocpp:uid:1:569239 + * Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) + * + */ + minChargingRate?: number; + salesTariff?: SalesTariffType; +} +/** + * Charging_ Schedule_ Period + * urn:x-oca:ocpp:uid:2:233257 + * Charging schedule period structure defines a time period in a charging schedule. + * + */ +export interface ChargingSchedulePeriodType { + customData?: CustomDataType; + /** + * Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569240 + * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. + * + */ + startPeriod: number; + /** + * Charging_ Schedule_ Period. Limit. Measure + * urn:x-oca:ocpp:uid:1:569241 + * Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). + * + */ + limit: number; + /** + * Charging_ Schedule_ Period. Number_ Phases. Counter + * urn:x-oca:ocpp:uid:1:569242 + * The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. + * + */ + numberPhases?: number; + /** + * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. + * + * + */ + phaseToUse?: number; +} +/** + * Sales_ Tariff + * urn:x-oca:ocpp:uid:2:233272 + * NOTE: This dataType is based on dataTypes from <<ref-ISOIEC15118-2,ISO 15118-2>>. + * + */ +export interface SalesTariffType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session. + * + */ + id: number; + /** + * Sales_ Tariff. Sales. Tariff_ Description + * urn:x-oca:ocpp:uid:1:569283 + * A human readable title/short description of the sales tariff e.g. for HMI display purposes. + * + */ + salesTariffDescription?: string; + /** + * Sales_ Tariff. Num_ E_ Price_ Levels. Counter + * urn:x-oca:ocpp:uid:1:569284 + * Defines the overall number of distinct price levels used across all provided SalesTariff elements. + * + */ + numEPriceLevels?: number; + salesTariffEntry: SalesTariffEntryType[]; +} +/** + * Sales_ Tariff_ Entry + * urn:x-oca:ocpp:uid:2:233271 + * + */ +export interface SalesTariffEntryType { + customData?: CustomDataType; + relativeTimeInterval: RelativeTimeIntervalType; + /** + * Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer + * urn:x-oca:ocpp:uid:1:569281 + * Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry. + * + */ + ePriceLevel?: number; + consumptionCost?: ConsumptionCostType[]; +} +/** + * Relative_ Timer_ Interval + * urn:x-oca:ocpp:uid:2:233270 + * + */ +export interface RelativeTimeIntervalType { + customData?: CustomDataType; + /** + * Relative_ Timer_ Interval. Start. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569279 + * Start of the interval, in seconds from NOW. + * + */ + start: number; + /** + * Relative_ Timer_ Interval. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569280 + * Duration of the interval, in seconds. + * + */ + duration?: number; +} +/** + * Consumption_ Cost + * urn:x-oca:ocpp:uid:2:233259 + * + */ +export interface ConsumptionCostType { + customData?: CustomDataType; + /** + * Consumption_ Cost. Start_ Value. Numeric + * urn:x-oca:ocpp:uid:1:569246 + * The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval. + * + */ + startValue: number; + cost: CostType[]; +} +/** + * Cost + * urn:x-oca:ocpp:uid:2:233258 + * + */ +export interface CostType { + customData?: CustomDataType; + costKind: CostKindEnumType; + /** + * Cost. Amount. Amount + * urn:x-oca:ocpp:uid:1:569244 + * The estimated or actual cost per kWh + * + */ + amount: number; + /** + * Cost. Amount_ Multiplier. Integer + * urn:x-oca:ocpp:uid:1:569245 + * Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier + * + */ + amountMultiplier?: number; +} +/** + * Charging_ Limit + * urn:x-enexis:ecdm:uid:2:234489 + * + */ +export interface ChargingLimitType { + customData?: CustomDataType; + chargingLimitSource: ChargingLimitSourceEnumType; + /** + * Charging_ Limit. Is_ Grid_ Critical. Indicator + * urn:x-enexis:ecdm:uid:1:570847 + * Indicates whether the charging limit is critical for the grid. + * + */ + isGridCritical?: boolean; +} diff --git a/lib/types/v201/NotifyChargingLimitResponse.d.ts b/lib/types/v201/NotifyChargingLimitResponse.d.ts new file mode 100644 index 0000000..3a28e37 --- /dev/null +++ b/lib/types/v201/NotifyChargingLimitResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyChargingLimitResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyCustomerInformationRequest.d.ts b/lib/types/v201/NotifyCustomerInformationRequest.d.ts new file mode 100644 index 0000000..31538fe --- /dev/null +++ b/lib/types/v201/NotifyCustomerInformationRequest.d.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyCustomerInformationRequest { + customData?: CustomDataType; + /** + * (Part of) the requested data. No format specified in which the data is returned. Should be human readable. + * + */ + data: string; + /** + * “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false. + * + */ + tbc?: boolean; + /** + * Sequence number of this message. First message starts at 0. + * + */ + seqNo: number; + /** + * Timestamp of the moment this message was generated at the Charging Station. + * + */ + generatedAt: string; + /** + * The Id of the request. + * + * + */ + requestId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyCustomerInformationResponse.d.ts b/lib/types/v201/NotifyCustomerInformationResponse.d.ts new file mode 100644 index 0000000..363cdc5 --- /dev/null +++ b/lib/types/v201/NotifyCustomerInformationResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyCustomerInformationResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyDisplayMessagesRequest.d.ts b/lib/types/v201/NotifyDisplayMessagesRequest.d.ts new file mode 100644 index 0000000..8625ccc --- /dev/null +++ b/lib/types/v201/NotifyDisplayMessagesRequest.d.ts @@ -0,0 +1,156 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Message_ Info. Priority. Message_ Priority_ Code + * urn:x-enexis:ecdm:uid:1:569253 + * With what priority should this message be shown + * + */ +export type MessagePriorityEnumType = "AlwaysFront" | "InFront" | "NormalCycle"; +/** + * Message_ Info. State. Message_ State_ Code + * urn:x-enexis:ecdm:uid:1:569254 + * During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station. + * + */ +export type MessageStateEnumType = "Charging" | "Faulted" | "Idle" | "Unavailable"; +/** + * Message_ Content. Format. Message_ Format_ Code + * urn:x-enexis:ecdm:uid:1:570848 + * Format of the message. + * + */ +export type MessageFormatEnumType = "ASCII" | "HTML" | "URI" | "UTF8"; + +export interface NotifyDisplayMessagesRequest { + customData?: CustomDataType; + messageInfo?: MessageInfoType[]; + /** + * The id of the <<getdisplaymessagesrequest,GetDisplayMessagesRequest>> that requested this message. + * + */ + requestId: number; + /** + * "to be continued" indicator. Indicates whether another part of the report follows in an upcoming NotifyDisplayMessagesRequest message. Default value when omitted is false. + * + */ + tbc?: boolean; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Message_ Info + * urn:x-enexis:ecdm:uid:2:233264 + * Contains message details, for a message to be displayed on a Charging Station. + * + */ +export interface MessageInfoType { + customData?: CustomDataType; + display?: ComponentType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero). + * + */ + id: number; + priority: MessagePriorityEnumType; + state?: MessageStateEnumType; + /** + * Message_ Info. Start. Date_ Time + * urn:x-enexis:ecdm:uid:1:569256 + * From what date-time should this message be shown. If omitted: directly. + * + */ + startDateTime?: string; + /** + * Message_ Info. End. Date_ Time + * urn:x-enexis:ecdm:uid:1:569257 + * Until what date-time should this message be shown, after this date/time this message SHALL be removed. + * + */ + endDateTime?: string; + /** + * During which transaction shall this message be shown. + * Message SHALL be removed by the Charging Station after transaction has + * ended. + * + */ + transactionId?: string; + message: MessageContentType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Message_ Content + * urn:x-enexis:ecdm:uid:2:234490 + * Contains message details, for a message to be displayed on a Charging Station. + * + * + */ +export interface MessageContentType { + customData?: CustomDataType; + format: MessageFormatEnumType; + /** + * Message_ Content. Language. Language_ Code + * urn:x-enexis:ecdm:uid:1:570849 + * Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language?: string; + /** + * Message_ Content. Content. Message + * urn:x-enexis:ecdm:uid:1:570852 + * Message contents. + * + * + */ + content: string; +} diff --git a/lib/types/v201/NotifyDisplayMessagesResponse.d.ts b/lib/types/v201/NotifyDisplayMessagesResponse.d.ts new file mode 100644 index 0000000..a8a4e6c --- /dev/null +++ b/lib/types/v201/NotifyDisplayMessagesResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyDisplayMessagesResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyEVChargingNeedsRequest.d.ts b/lib/types/v201/NotifyEVChargingNeedsRequest.d.ts new file mode 100644 index 0000000..6cfb3bc --- /dev/null +++ b/lib/types/v201/NotifyEVChargingNeedsRequest.d.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging_ Needs. Requested. Energy_ Transfer_ Mode_ Code + * urn:x-oca:ocpp:uid:1:569209 + * Mode of energy transfer requested by the EV. + * + */ +export type EnergyTransferModeEnumType = "DC" | "AC_single_phase" | "AC_two_phase" | "AC_three_phase"; + +export interface NotifyEVChargingNeedsRequest { + customData?: CustomDataType; + /** + * Contains the maximum schedule tuples the car supports per schedule. + * + */ + maxScheduleTuples?: number; + chargingNeeds: ChargingNeedsType; + /** + * Defines the EVSE and connector to which the EV is connected. EvseId may not be 0. + * + */ + evseId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Needs + * urn:x-oca:ocpp:uid:2:233249 + * + */ +export interface ChargingNeedsType { + customData?: CustomDataType; + acChargingParameters?: ACChargingParametersType; + dcChargingParameters?: DCChargingParametersType; + requestedEnergyTransfer: EnergyTransferModeEnumType; + /** + * Charging_ Needs. Departure_ Time. Date_ Time + * urn:x-oca:ocpp:uid:1:569223 + * Estimated departure time of the EV. + * + */ + departureTime?: string; +} +/** + * AC_ Charging_ Parameters + * urn:x-oca:ocpp:uid:2:233250 + * EV AC charging parameters. + * + * + */ +export interface ACChargingParametersType { + customData?: CustomDataType; + /** + * AC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount + * urn:x-oca:ocpp:uid:1:569211 + * Amount of energy requested (in Wh). This includes energy required for preconditioning. + * + */ + energyAmount: number; + /** + * AC_ Charging_ Parameters. EV_ Min. Current + * urn:x-oca:ocpp:uid:1:569212 + * Minimum current (amps) supported by the electric vehicle (per phase). + * + */ + evMinCurrent: number; + /** + * AC_ Charging_ Parameters. EV_ Max. Current + * urn:x-oca:ocpp:uid:1:569213 + * Maximum current (amps) supported by the electric vehicle (per phase). Includes cable capacity. + * + */ + evMaxCurrent: number; + /** + * AC_ Charging_ Parameters. EV_ Max. Voltage + * urn:x-oca:ocpp:uid:1:569214 + * Maximum voltage supported by the electric vehicle + * + */ + evMaxVoltage: number; +} +/** + * DC_ Charging_ Parameters + * urn:x-oca:ocpp:uid:2:233251 + * EV DC charging parameters + * + * + * + */ +export interface DCChargingParametersType { + customData?: CustomDataType; + /** + * DC_ Charging_ Parameters. EV_ Max. Current + * urn:x-oca:ocpp:uid:1:569215 + * Maximum current (amps) supported by the electric vehicle. Includes cable capacity. + * + */ + evMaxCurrent: number; + /** + * DC_ Charging_ Parameters. EV_ Max. Voltage + * urn:x-oca:ocpp:uid:1:569216 + * Maximum voltage supported by the electric vehicle + * + */ + evMaxVoltage: number; + /** + * DC_ Charging_ Parameters. Energy_ Amount. Energy_ Amount + * urn:x-oca:ocpp:uid:1:569217 + * Amount of energy requested (in Wh). This inludes energy required for preconditioning. + * + */ + energyAmount?: number; + /** + * DC_ Charging_ Parameters. EV_ Max. Power + * urn:x-oca:ocpp:uid:1:569218 + * Maximum power (in W) supported by the electric vehicle. Required for DC charging. + * + */ + evMaxPower?: number; + /** + * DC_ Charging_ Parameters. State_ Of_ Charge. Numeric + * urn:x-oca:ocpp:uid:1:569219 + * Energy available in the battery (in percent of the battery capacity) + * + */ + stateOfCharge?: number; + /** + * DC_ Charging_ Parameters. EV_ Energy_ Capacity. Numeric + * urn:x-oca:ocpp:uid:1:569220 + * Capacity of the electric vehicle battery (in Wh) + * + */ + evEnergyCapacity?: number; + /** + * DC_ Charging_ Parameters. Full_ SOC. Percentage + * urn:x-oca:ocpp:uid:1:569221 + * Percentage of SoC at which the EV considers the battery fully charged. (possible values: 0 - 100) + * + */ + fullSoC?: number; + /** + * DC_ Charging_ Parameters. Bulk_ SOC. Percentage + * urn:x-oca:ocpp:uid:1:569222 + * Percentage of SoC at which the EV considers a fast charging process to end. (possible values: 0 - 100) + * + */ + bulkSoC?: number; +} diff --git a/lib/types/v201/NotifyEVChargingNeedsResponse.d.ts b/lib/types/v201/NotifyEVChargingNeedsResponse.d.ts new file mode 100644 index 0000000..a99de95 --- /dev/null +++ b/lib/types/v201/NotifyEVChargingNeedsResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Returns whether the CSMS has been able to process the message successfully. It does not imply that the evChargingNeeds can be met with the current charging profile. + * + */ +export type NotifyEVChargingNeedsStatusEnumType = "Accepted" | "Rejected" | "Processing"; + +export interface NotifyEVChargingNeedsResponse { + customData?: CustomDataType; + status: NotifyEVChargingNeedsStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/NotifyEVChargingScheduleRequest.d.ts b/lib/types/v201/NotifyEVChargingScheduleRequest.d.ts new file mode 100644 index 0000000..042698f --- /dev/null +++ b/lib/types/v201/NotifyEVChargingScheduleRequest.d.ts @@ -0,0 +1,226 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code + * urn:x-oca:ocpp:uid:1:569238 + * The unit of measure Limit is expressed in. + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; +/** + * Cost. Cost_ Kind. Cost_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569243 + * The kind of cost referred to in the message element amount + * + */ +export type CostKindEnumType = "CarbonDioxideEmission" | "RelativePricePercentage" | "RenewableGenerationPercentage"; + +export interface NotifyEVChargingScheduleRequest { + customData?: CustomDataType; + /** + * Periods contained in the charging profile are relative to this point in time. + * + */ + timeBase: string; + chargingSchedule: ChargingScheduleType; + /** + * The charging schedule contained in this notification applies to an EVSE. EvseId must be > 0. + * + */ + evseId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Schedule + * urn:x-oca:ocpp:uid:2:233256 + * Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. + * + */ +export interface ChargingScheduleType { + customData?: CustomDataType; + /** + * Identifies the ChargingSchedule. + * + */ + id: number; + /** + * Charging_ Schedule. Start_ Schedule. Date_ Time + * urn:x-oca:ocpp:uid:1:569237 + * Starting point of an absolute schedule. If absent the schedule will be relative to start of charging. + * + */ + startSchedule?: string; + /** + * Charging_ Schedule. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569236 + * Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. + * + */ + duration?: number; + chargingRateUnit: ChargingRateUnitEnumType; + chargingSchedulePeriod: ChargingSchedulePeriodType[]; + /** + * Charging_ Schedule. Min_ Charging_ Rate. Numeric + * urn:x-oca:ocpp:uid:1:569239 + * Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) + * + */ + minChargingRate?: number; + salesTariff?: SalesTariffType; +} +/** + * Charging_ Schedule_ Period + * urn:x-oca:ocpp:uid:2:233257 + * Charging schedule period structure defines a time period in a charging schedule. + * + */ +export interface ChargingSchedulePeriodType { + customData?: CustomDataType; + /** + * Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569240 + * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. + * + */ + startPeriod: number; + /** + * Charging_ Schedule_ Period. Limit. Measure + * urn:x-oca:ocpp:uid:1:569241 + * Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). + * + */ + limit: number; + /** + * Charging_ Schedule_ Period. Number_ Phases. Counter + * urn:x-oca:ocpp:uid:1:569242 + * The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. + * + */ + numberPhases?: number; + /** + * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. + * + * + */ + phaseToUse?: number; +} +/** + * Sales_ Tariff + * urn:x-oca:ocpp:uid:2:233272 + * NOTE: This dataType is based on dataTypes from <<ref-ISOIEC15118-2,ISO 15118-2>>. + * + */ +export interface SalesTariffType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session. + * + */ + id: number; + /** + * Sales_ Tariff. Sales. Tariff_ Description + * urn:x-oca:ocpp:uid:1:569283 + * A human readable title/short description of the sales tariff e.g. for HMI display purposes. + * + */ + salesTariffDescription?: string; + /** + * Sales_ Tariff. Num_ E_ Price_ Levels. Counter + * urn:x-oca:ocpp:uid:1:569284 + * Defines the overall number of distinct price levels used across all provided SalesTariff elements. + * + */ + numEPriceLevels?: number; + salesTariffEntry: SalesTariffEntryType[]; +} +/** + * Sales_ Tariff_ Entry + * urn:x-oca:ocpp:uid:2:233271 + * + */ +export interface SalesTariffEntryType { + customData?: CustomDataType; + relativeTimeInterval: RelativeTimeIntervalType; + /** + * Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer + * urn:x-oca:ocpp:uid:1:569281 + * Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry. + * + */ + ePriceLevel?: number; + consumptionCost?: ConsumptionCostType[]; +} +/** + * Relative_ Timer_ Interval + * urn:x-oca:ocpp:uid:2:233270 + * + */ +export interface RelativeTimeIntervalType { + customData?: CustomDataType; + /** + * Relative_ Timer_ Interval. Start. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569279 + * Start of the interval, in seconds from NOW. + * + */ + start: number; + /** + * Relative_ Timer_ Interval. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569280 + * Duration of the interval, in seconds. + * + */ + duration?: number; +} +/** + * Consumption_ Cost + * urn:x-oca:ocpp:uid:2:233259 + * + */ +export interface ConsumptionCostType { + customData?: CustomDataType; + /** + * Consumption_ Cost. Start_ Value. Numeric + * urn:x-oca:ocpp:uid:1:569246 + * The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval. + * + */ + startValue: number; + cost: CostType[]; +} +/** + * Cost + * urn:x-oca:ocpp:uid:2:233258 + * + */ +export interface CostType { + customData?: CustomDataType; + costKind: CostKindEnumType; + /** + * Cost. Amount. Amount + * urn:x-oca:ocpp:uid:1:569244 + * The estimated or actual cost per kWh + * + */ + amount: number; + /** + * Cost. Amount_ Multiplier. Integer + * urn:x-oca:ocpp:uid:1:569245 + * Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier + * + */ + amountMultiplier?: number; +} diff --git a/lib/types/v201/NotifyEVChargingScheduleResponse.d.ts b/lib/types/v201/NotifyEVChargingScheduleResponse.d.ts new file mode 100644 index 0000000..a58c40b --- /dev/null +++ b/lib/types/v201/NotifyEVChargingScheduleResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Returns whether the CSMS has been able to process the message successfully. It does not imply any approval of the charging schedule. + * + */ +export type GenericStatusEnumType = "Accepted" | "Rejected"; + +export interface NotifyEVChargingScheduleResponse { + customData?: CustomDataType; + status: GenericStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/NotifyEventRequest.d.ts b/lib/types/v201/NotifyEventRequest.d.ts new file mode 100644 index 0000000..4bc21cc --- /dev/null +++ b/lib/types/v201/NotifyEventRequest.d.ts @@ -0,0 +1,168 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Type of monitor that triggered this event, e.g. exceeding a threshold value. + * + * + */ +export type EventTriggerEnumType = "Alerting" | "Delta" | "Periodic"; +/** + * Specifies the event notification type of the message. + * + * + */ +export type EventNotificationEnumType = + | "HardWiredNotification" + | "HardWiredMonitor" + | "PreconfiguredMonitor" + | "CustomMonitor"; + +export interface NotifyEventRequest { + customData?: CustomDataType; + /** + * Timestamp of the moment this message was generated at the Charging Station. + * + */ + generatedAt: string; + /** + * “to be continued” indicator. Indicates whether another part of the report follows in an upcoming notifyEventRequest message. Default value when omitted is false. + * + */ + tbc?: boolean; + /** + * Sequence number of this message. First message starts at 0. + * + */ + seqNo: number; + eventData: EventDataType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to report an event notification for a component-variable. + * + */ +export interface EventDataType { + customData?: CustomDataType; + /** + * Identifies the event. This field can be referred to as a cause by other events. + * + * + */ + eventId: number; + /** + * Timestamp of the moment the report was generated. + * + */ + timestamp: string; + trigger: EventTriggerEnumType; + /** + * Refers to the Id of an event that is considered to be the cause for this event. + * + * + */ + cause?: number; + /** + * Actual value (_attributeType_ Actual) of the variable. + * + * The Configuration Variable <<configkey-reporting-value-size,ReportingValueSize>> can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal. + * + * + */ + actualValue: string; + /** + * Technical (error) code as reported by component. + * + */ + techCode?: string; + /** + * Technical detail information as reported by component. + * + */ + techInfo?: string; + /** + * _Cleared_ is set to true to report the clearing of a monitored situation, i.e. a 'return to normal'. + * + * + */ + cleared?: boolean; + /** + * If an event notification is linked to a specific transaction, this field can be used to specify its transactionId. + * + */ + transactionId?: string; + component: ComponentType; + /** + * Identifies the VariableMonitoring which triggered the event. + * + */ + variableMonitoringId?: number; + eventNotificationType: EventNotificationEnumType; + variable: VariableType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/NotifyEventResponse.d.ts b/lib/types/v201/NotifyEventResponse.d.ts new file mode 100644 index 0000000..b325e8c --- /dev/null +++ b/lib/types/v201/NotifyEventResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyEventResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyMonitoringReportRequest.d.ts b/lib/types/v201/NotifyMonitoringReportRequest.d.ts new file mode 100644 index 0000000..514c3fa --- /dev/null +++ b/lib/types/v201/NotifyMonitoringReportRequest.d.ts @@ -0,0 +1,162 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * The type of this monitor, e.g. a threshold, delta or periodic monitor. + * + */ +export type MonitorEnumType = "UpperThreshold" | "LowerThreshold" | "Delta" | "Periodic" | "PeriodicClockAligned"; + +export interface NotifyMonitoringReportRequest { + customData?: CustomDataType; + monitor?: MonitoringDataType[]; + /** + * The id of the GetMonitoringRequest that requested this report. + * + * + */ + requestId: number; + /** + * “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false. + * + */ + tbc?: boolean; + /** + * Sequence number of this message. First message starts at 0. + * + */ + seqNo: number; + /** + * Timestamp of the moment this message was generated at the Charging Station. + * + */ + generatedAt: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to hold parameters of SetVariableMonitoring request. + * + */ +export interface MonitoringDataType { + customData?: CustomDataType; + component: ComponentType; + variable: VariableType; + variableMonitoring: VariableMonitoringType[]; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * A monitoring setting for a variable. + * + */ +export interface VariableMonitoringType { + customData?: CustomDataType; + /** + * Identifies the monitor. + * + */ + id: number; + /** + * Monitor only active when a transaction is ongoing on a component relevant to this transaction. + * + */ + transaction: boolean; + /** + * Value for threshold or delta monitoring. + * For Periodic or PeriodicClockAligned this is the interval in seconds. + * + */ + value: number; + type: MonitorEnumType; + /** + * The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. + * + * The severity levels have the following meaning: + + * *0-Danger* + + * Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. + + * *1-Hardware Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. + + * *2-System Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. + + * *3-Critical* + + * Indicates a critical error. Action is required. + + * *4-Error* + + * Indicates a non-urgent error. Action is required. + + * *5-Alert* + + * Indicates an alert event. Default severity for any type of monitoring event. + + * *6-Warning* + + * Indicates a warning event. Action may be required. + + * *7-Notice* + + * Indicates an unusual event. No immediate action is required. + + * *8-Informational* + + * Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. + + * *9-Debug* + + * Indicates information useful to developers for debugging, not useful during operations. + * + */ + severity: number; +} diff --git a/lib/types/v201/NotifyMonitoringReportResponse.d.ts b/lib/types/v201/NotifyMonitoringReportResponse.d.ts new file mode 100644 index 0000000..dde8e52 --- /dev/null +++ b/lib/types/v201/NotifyMonitoringReportResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyMonitoringReportResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/NotifyReportRequest.d.ts b/lib/types/v201/NotifyReportRequest.d.ts new file mode 100644 index 0000000..d4219d2 --- /dev/null +++ b/lib/types/v201/NotifyReportRequest.d.ts @@ -0,0 +1,201 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Attribute: Actual, MinSet, MaxSet, etc. + * Defaults to Actual if absent. + * + */ +export type AttributeEnumType = "Actual" | "Target" | "MinSet" | "MaxSet"; +/** + * Defines the mutability of this attribute. Default is ReadWrite when omitted. + * + */ +export type MutabilityEnumType = "ReadOnly" | "WriteOnly" | "ReadWrite"; +/** + * Data type of this variable. + * + */ +export type DataEnumType = + | "string" + | "decimal" + | "integer" + | "dateTime" + | "boolean" + | "OptionList" + | "SequenceList" + | "MemberList"; + +export interface NotifyReportRequest { + customData?: CustomDataType; + /** + * The id of the GetReportRequest or GetBaseReportRequest that requested this report + * + */ + requestId: number; + /** + * Timestamp of the moment this message was generated at the Charging Station. + * + */ + generatedAt: string; + reportData?: ReportDataType[]; + /** + * “to be continued” indicator. Indicates whether another part of the report follows in an upcoming notifyReportRequest message. Default value when omitted is false. + * + * + */ + tbc?: boolean; + /** + * Sequence number of this message. First message starts at 0. + * + */ + seqNo: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to report components, variables and variable attributes and characteristics. + * + */ +export interface ReportDataType { + customData?: CustomDataType; + component: ComponentType; + variable: VariableType; + variableAttribute: VariableAttributeType[]; + variableCharacteristics?: VariableCharacteristicsType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * Attribute data of a variable. + * + */ +export interface VariableAttributeType { + customData?: CustomDataType; + type?: AttributeEnumType; + /** + * Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'. + * + * The Configuration Variable <<configkey-reporting-value-size,ReportingValueSize>> can be used to limit GetVariableResult.attributeValue, VariableAttribute.value and EventData.actualValue. The max size of these values will always remain equal. + * + */ + value?: string; + mutability?: MutabilityEnumType; + /** + * If true, value will be persistent across system reboots or power down. Default when omitted is false. + * + */ + persistent?: boolean; + /** + * If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false. + * + */ + constant?: boolean; +} +/** + * Fixed read-only parameters of a variable. + * + */ +export interface VariableCharacteristicsType { + customData?: CustomDataType; + /** + * Unit of the variable. When the transmitted value has a unit, this field SHALL be included. + * + */ + unit?: string; + dataType: DataEnumType; + /** + * Minimum possible value of this variable. + * + */ + minLimit?: number; + /** + * Maximum possible value of this variable. When the datatype of this Variable is String, OptionList, SequenceList or MemberList, this field defines the maximum length of the (CSV) string. + * + */ + maxLimit?: number; + /** + * Allowed values when variable is Option/Member/SequenceList. + * + * * OptionList: The (Actual) Variable value must be a single value from the reported (CSV) enumeration list. + * + * * MemberList: The (Actual) Variable value may be an (unordered) (sub-)set of the reported (CSV) valid values list. + * + * * SequenceList: The (Actual) Variable value may be an ordered (priority, etc) (sub-)set of the reported (CSV) valid values. + * + * This is a comma separated list. + * + * The Configuration Variable <<configkey-configuration-value-size,ConfigurationValueSize>> can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal. + * + * + */ + valuesList?: string; + /** + * Flag indicating if this variable supports monitoring. + * + */ + supportsMonitoring: boolean; +} diff --git a/lib/types/v201/NotifyReportResponse.d.ts b/lib/types/v201/NotifyReportResponse.d.ts new file mode 100644 index 0000000..cdb1e1a --- /dev/null +++ b/lib/types/v201/NotifyReportResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface NotifyReportResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/PublishFirmwareRequest.d.ts b/lib/types/v201/PublishFirmwareRequest.d.ts new file mode 100644 index 0000000..2371568 --- /dev/null +++ b/lib/types/v201/PublishFirmwareRequest.d.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface PublishFirmwareRequest { + customData?: CustomDataType; + /** + * This contains a string containing a URI pointing to a + * location from which to retrieve the firmware. + * + */ + location: string; + /** + * This specifies how many times Charging Station must try + * to download the firmware before giving up. If this field is not + * present, it is left to Charging Station to decide how many times it wants to retry. + * + */ + retries?: number; + /** + * The MD5 checksum over the entire firmware file as a hexadecimal string of length 32. + * + */ + checksum: string; + /** + * The Id of the request. + * + */ + requestId: number; + /** + * The interval in seconds + * after which a retry may be + * attempted. If this field is not + * present, it is left to Charging + * Station to decide how long to wait + * between attempts. + * + */ + retryInterval?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/PublishFirmwareResponse.d.ts b/lib/types/v201/PublishFirmwareResponse.d.ts new file mode 100644 index 0000000..8578e6a --- /dev/null +++ b/lib/types/v201/PublishFirmwareResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the request was accepted. + * + */ +export type GenericStatusEnumType = "Accepted" | "Rejected"; + +export interface PublishFirmwareResponse { + customData?: CustomDataType; + status: GenericStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/PublishFirmwareStatusNotificationRequest.d.ts b/lib/types/v201/PublishFirmwareStatusNotificationRequest.d.ts new file mode 100644 index 0000000..0b60926 --- /dev/null +++ b/lib/types/v201/PublishFirmwareStatusNotificationRequest.d.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the progress status of the publishfirmware + * installation. + * + */ +export type PublishFirmwareStatusEnumType = + | "Idle" + | "DownloadScheduled" + | "Downloading" + | "Downloaded" + | "Published" + | "DownloadFailed" + | "DownloadPaused" + | "InvalidChecksum" + | "ChecksumVerified" + | "PublishFailed"; + +export interface PublishFirmwareStatusNotificationRequest { + customData?: CustomDataType; + status: PublishFirmwareStatusEnumType; + /** + * Required if status is Published. Can be multiple URI’s, if the Local Controller supports e.g. HTTP, HTTPS, and FTP. + * + */ + location?: string[]; + /** + * The request id that was + * provided in the + * PublishFirmwareRequest which + * triggered this action. + * + */ + requestId?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/PublishFirmwareStatusNotificationResponse.d.ts b/lib/types/v201/PublishFirmwareStatusNotificationResponse.d.ts new file mode 100644 index 0000000..2197662 --- /dev/null +++ b/lib/types/v201/PublishFirmwareStatusNotificationResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface PublishFirmwareStatusNotificationResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ReportChargingProfilesRequest.d.ts b/lib/types/v201/ReportChargingProfilesRequest.d.ts new file mode 100644 index 0000000..dead291 --- /dev/null +++ b/lib/types/v201/ReportChargingProfilesRequest.d.ts @@ -0,0 +1,308 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Source that has installed this charging profile. + * + */ +export type ChargingLimitSourceEnumType = "EMS" | "Other" | "SO" | "CSO"; +/** + * Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code + * urn:x-oca:ocpp:uid:1:569231 + * Defines the purpose of the schedule transferred by this profile + * + */ +export type ChargingProfilePurposeEnumType = + | "ChargingStationExternalConstraints" + | "ChargingStationMaxProfile" + | "TxDefaultProfile" + | "TxProfile"; +/** + * Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569232 + * Indicates the kind of schedule. + * + */ +export type ChargingProfileKindEnumType = "Absolute" | "Recurring" | "Relative"; +/** + * Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569233 + * Indicates the start point of a recurrence. + * + */ +export type RecurrencyKindEnumType = "Daily" | "Weekly"; +/** + * Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code + * urn:x-oca:ocpp:uid:1:569238 + * The unit of measure Limit is expressed in. + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; +/** + * Cost. Cost_ Kind. Cost_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569243 + * The kind of cost referred to in the message element amount + * + */ +export type CostKindEnumType = "CarbonDioxideEmission" | "RelativePricePercentage" | "RenewableGenerationPercentage"; + +export interface ReportChargingProfilesRequest { + customData?: CustomDataType; + /** + * Id used to match the <<getchargingprofilesrequest, GetChargingProfilesRequest>> message with the resulting ReportChargingProfilesRequest messages. When the CSMS provided a requestId in the <<getchargingprofilesrequest, GetChargingProfilesRequest>>, this field SHALL contain the same value. + * + */ + requestId: number; + chargingLimitSource: ChargingLimitSourceEnumType; + chargingProfile: ChargingProfileType[]; + /** + * To Be Continued. Default value when omitted: false. false indicates that there are no further messages as part of this report. + * + */ + tbc?: boolean; + /** + * The evse to which the charging profile applies. If evseId = 0, the message contains an overall limit for the Charging Station. + * + */ + evseId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Profile + * urn:x-oca:ocpp:uid:2:233255 + * A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. + * + */ +export interface ChargingProfileType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * Id of ChargingProfile. + * + */ + id: number; + /** + * Charging_ Profile. Stack_ Level. Counter + * urn:x-oca:ocpp:uid:1:569230 + * Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. + * + */ + stackLevel: number; + chargingProfilePurpose: ChargingProfilePurposeEnumType; + chargingProfileKind: ChargingProfileKindEnumType; + recurrencyKind?: RecurrencyKindEnumType; + /** + * Charging_ Profile. Valid_ From. Date_ Time + * urn:x-oca:ocpp:uid:1:569234 + * Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station. + * + */ + validFrom?: string; + /** + * Charging_ Profile. Valid_ To. Date_ Time + * urn:x-oca:ocpp:uid:1:569235 + * Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile. + * + */ + validTo?: string; + chargingSchedule: ChargingScheduleType[]; + /** + * SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction. + * + */ + transactionId?: string; +} +/** + * Charging_ Schedule + * urn:x-oca:ocpp:uid:2:233256 + * Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. + * + */ +export interface ChargingScheduleType { + customData?: CustomDataType; + /** + * Identifies the ChargingSchedule. + * + */ + id: number; + /** + * Charging_ Schedule. Start_ Schedule. Date_ Time + * urn:x-oca:ocpp:uid:1:569237 + * Starting point of an absolute schedule. If absent the schedule will be relative to start of charging. + * + */ + startSchedule?: string; + /** + * Charging_ Schedule. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569236 + * Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. + * + */ + duration?: number; + chargingRateUnit: ChargingRateUnitEnumType; + chargingSchedulePeriod: ChargingSchedulePeriodType[]; + /** + * Charging_ Schedule. Min_ Charging_ Rate. Numeric + * urn:x-oca:ocpp:uid:1:569239 + * Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) + * + */ + minChargingRate?: number; + salesTariff?: SalesTariffType; +} +/** + * Charging_ Schedule_ Period + * urn:x-oca:ocpp:uid:2:233257 + * Charging schedule period structure defines a time period in a charging schedule. + * + */ +export interface ChargingSchedulePeriodType { + customData?: CustomDataType; + /** + * Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569240 + * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. + * + */ + startPeriod: number; + /** + * Charging_ Schedule_ Period. Limit. Measure + * urn:x-oca:ocpp:uid:1:569241 + * Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). + * + */ + limit: number; + /** + * Charging_ Schedule_ Period. Number_ Phases. Counter + * urn:x-oca:ocpp:uid:1:569242 + * The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. + * + */ + numberPhases?: number; + /** + * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. + * + * + */ + phaseToUse?: number; +} +/** + * Sales_ Tariff + * urn:x-oca:ocpp:uid:2:233272 + * NOTE: This dataType is based on dataTypes from <<ref-ISOIEC15118-2,ISO 15118-2>>. + * + */ +export interface SalesTariffType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session. + * + */ + id: number; + /** + * Sales_ Tariff. Sales. Tariff_ Description + * urn:x-oca:ocpp:uid:1:569283 + * A human readable title/short description of the sales tariff e.g. for HMI display purposes. + * + */ + salesTariffDescription?: string; + /** + * Sales_ Tariff. Num_ E_ Price_ Levels. Counter + * urn:x-oca:ocpp:uid:1:569284 + * Defines the overall number of distinct price levels used across all provided SalesTariff elements. + * + */ + numEPriceLevels?: number; + salesTariffEntry: SalesTariffEntryType[]; +} +/** + * Sales_ Tariff_ Entry + * urn:x-oca:ocpp:uid:2:233271 + * + */ +export interface SalesTariffEntryType { + customData?: CustomDataType; + relativeTimeInterval: RelativeTimeIntervalType; + /** + * Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer + * urn:x-oca:ocpp:uid:1:569281 + * Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry. + * + */ + ePriceLevel?: number; + consumptionCost?: ConsumptionCostType[]; +} +/** + * Relative_ Timer_ Interval + * urn:x-oca:ocpp:uid:2:233270 + * + */ +export interface RelativeTimeIntervalType { + customData?: CustomDataType; + /** + * Relative_ Timer_ Interval. Start. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569279 + * Start of the interval, in seconds from NOW. + * + */ + start: number; + /** + * Relative_ Timer_ Interval. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569280 + * Duration of the interval, in seconds. + * + */ + duration?: number; +} +/** + * Consumption_ Cost + * urn:x-oca:ocpp:uid:2:233259 + * + */ +export interface ConsumptionCostType { + customData?: CustomDataType; + /** + * Consumption_ Cost. Start_ Value. Numeric + * urn:x-oca:ocpp:uid:1:569246 + * The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval. + * + */ + startValue: number; + cost: CostType[]; +} +/** + * Cost + * urn:x-oca:ocpp:uid:2:233258 + * + */ +export interface CostType { + customData?: CustomDataType; + costKind: CostKindEnumType; + /** + * Cost. Amount. Amount + * urn:x-oca:ocpp:uid:1:569244 + * The estimated or actual cost per kWh + * + */ + amount: number; + /** + * Cost. Amount_ Multiplier. Integer + * urn:x-oca:ocpp:uid:1:569245 + * Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier + * + */ + amountMultiplier?: number; +} diff --git a/lib/types/v201/ReportChargingProfilesResponse.d.ts b/lib/types/v201/ReportChargingProfilesResponse.d.ts new file mode 100644 index 0000000..019c40a --- /dev/null +++ b/lib/types/v201/ReportChargingProfilesResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ReportChargingProfilesResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/RequestStartTransactionRequest.d.ts b/lib/types/v201/RequestStartTransactionRequest.d.ts new file mode 100644 index 0000000..5a59d50 --- /dev/null +++ b/lib/types/v201/RequestStartTransactionRequest.d.ts @@ -0,0 +1,343 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; +/** + * Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code + * urn:x-oca:ocpp:uid:1:569231 + * Defines the purpose of the schedule transferred by this profile + * + */ +export type ChargingProfilePurposeEnumType = + | "ChargingStationExternalConstraints" + | "ChargingStationMaxProfile" + | "TxDefaultProfile" + | "TxProfile"; +/** + * Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569232 + * Indicates the kind of schedule. + * + */ +export type ChargingProfileKindEnumType = "Absolute" | "Recurring" | "Relative"; +/** + * Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569233 + * Indicates the start point of a recurrence. + * + */ +export type RecurrencyKindEnumType = "Daily" | "Weekly"; +/** + * Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code + * urn:x-oca:ocpp:uid:1:569238 + * The unit of measure Limit is expressed in. + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; +/** + * Cost. Cost_ Kind. Cost_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569243 + * The kind of cost referred to in the message element amount + * + */ +export type CostKindEnumType = "CarbonDioxideEmission" | "RelativePricePercentage" | "RenewableGenerationPercentage"; + +export interface RequestStartTransactionRequest { + customData?: CustomDataType; + /** + * Number of the EVSE on which to start the transaction. EvseId SHALL be > 0 + * + */ + evseId?: number; + groupIdToken?: IdTokenType; + idToken: IdTokenType; + /** + * Id given by the server to this start request. The Charging Station might return this in the <<transactioneventrequest, TransactionEventRequest>>, letting the server know which transaction was started for this request. Use to start a transaction. + * + */ + remoteStartId: number; + chargingProfile?: ChargingProfileType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} +/** + * Charging_ Profile + * urn:x-oca:ocpp:uid:2:233255 + * A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. + * + */ +export interface ChargingProfileType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * Id of ChargingProfile. + * + */ + id: number; + /** + * Charging_ Profile. Stack_ Level. Counter + * urn:x-oca:ocpp:uid:1:569230 + * Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. + * + */ + stackLevel: number; + chargingProfilePurpose: ChargingProfilePurposeEnumType; + chargingProfileKind: ChargingProfileKindEnumType; + recurrencyKind?: RecurrencyKindEnumType; + /** + * Charging_ Profile. Valid_ From. Date_ Time + * urn:x-oca:ocpp:uid:1:569234 + * Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station. + * + */ + validFrom?: string; + /** + * Charging_ Profile. Valid_ To. Date_ Time + * urn:x-oca:ocpp:uid:1:569235 + * Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile. + * + */ + validTo?: string; + chargingSchedule: ChargingScheduleType[]; + /** + * SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction. + * + */ + transactionId?: string; +} +/** + * Charging_ Schedule + * urn:x-oca:ocpp:uid:2:233256 + * Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. + * + */ +export interface ChargingScheduleType { + customData?: CustomDataType; + /** + * Identifies the ChargingSchedule. + * + */ + id: number; + /** + * Charging_ Schedule. Start_ Schedule. Date_ Time + * urn:x-oca:ocpp:uid:1:569237 + * Starting point of an absolute schedule. If absent the schedule will be relative to start of charging. + * + */ + startSchedule?: string; + /** + * Charging_ Schedule. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569236 + * Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. + * + */ + duration?: number; + chargingRateUnit: ChargingRateUnitEnumType; + chargingSchedulePeriod: ChargingSchedulePeriodType[]; + /** + * Charging_ Schedule. Min_ Charging_ Rate. Numeric + * urn:x-oca:ocpp:uid:1:569239 + * Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) + * + */ + minChargingRate?: number; + salesTariff?: SalesTariffType; +} +/** + * Charging_ Schedule_ Period + * urn:x-oca:ocpp:uid:2:233257 + * Charging schedule period structure defines a time period in a charging schedule. + * + */ +export interface ChargingSchedulePeriodType { + customData?: CustomDataType; + /** + * Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569240 + * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. + * + */ + startPeriod: number; + /** + * Charging_ Schedule_ Period. Limit. Measure + * urn:x-oca:ocpp:uid:1:569241 + * Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). + * + */ + limit: number; + /** + * Charging_ Schedule_ Period. Number_ Phases. Counter + * urn:x-oca:ocpp:uid:1:569242 + * The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. + * + */ + numberPhases?: number; + /** + * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. + * + * + */ + phaseToUse?: number; +} +/** + * Sales_ Tariff + * urn:x-oca:ocpp:uid:2:233272 + * NOTE: This dataType is based on dataTypes from <<ref-ISOIEC15118-2,ISO 15118-2>>. + * + */ +export interface SalesTariffType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session. + * + */ + id: number; + /** + * Sales_ Tariff. Sales. Tariff_ Description + * urn:x-oca:ocpp:uid:1:569283 + * A human readable title/short description of the sales tariff e.g. for HMI display purposes. + * + */ + salesTariffDescription?: string; + /** + * Sales_ Tariff. Num_ E_ Price_ Levels. Counter + * urn:x-oca:ocpp:uid:1:569284 + * Defines the overall number of distinct price levels used across all provided SalesTariff elements. + * + */ + numEPriceLevels?: number; + salesTariffEntry: SalesTariffEntryType[]; +} +/** + * Sales_ Tariff_ Entry + * urn:x-oca:ocpp:uid:2:233271 + * + */ +export interface SalesTariffEntryType { + customData?: CustomDataType; + relativeTimeInterval: RelativeTimeIntervalType; + /** + * Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer + * urn:x-oca:ocpp:uid:1:569281 + * Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry. + * + */ + ePriceLevel?: number; + consumptionCost?: ConsumptionCostType[]; +} +/** + * Relative_ Timer_ Interval + * urn:x-oca:ocpp:uid:2:233270 + * + */ +export interface RelativeTimeIntervalType { + customData?: CustomDataType; + /** + * Relative_ Timer_ Interval. Start. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569279 + * Start of the interval, in seconds from NOW. + * + */ + start: number; + /** + * Relative_ Timer_ Interval. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569280 + * Duration of the interval, in seconds. + * + */ + duration?: number; +} +/** + * Consumption_ Cost + * urn:x-oca:ocpp:uid:2:233259 + * + */ +export interface ConsumptionCostType { + customData?: CustomDataType; + /** + * Consumption_ Cost. Start_ Value. Numeric + * urn:x-oca:ocpp:uid:1:569246 + * The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval. + * + */ + startValue: number; + cost: CostType[]; +} +/** + * Cost + * urn:x-oca:ocpp:uid:2:233258 + * + */ +export interface CostType { + customData?: CustomDataType; + costKind: CostKindEnumType; + /** + * Cost. Amount. Amount + * urn:x-oca:ocpp:uid:1:569244 + * The estimated or actual cost per kWh + * + */ + amount: number; + /** + * Cost. Amount_ Multiplier. Integer + * urn:x-oca:ocpp:uid:1:569245 + * Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier + * + */ + amountMultiplier?: number; +} diff --git a/lib/types/v201/RequestStartTransactionResponse.d.ts b/lib/types/v201/RequestStartTransactionResponse.d.ts new file mode 100644 index 0000000..8a3c3ff --- /dev/null +++ b/lib/types/v201/RequestStartTransactionResponse.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Status indicating whether the Charging Station accepts the request to start a transaction. + * + */ +export type RequestStartStopStatusEnumType = "Accepted" | "Rejected"; + +export interface RequestStartTransactionResponse { + customData?: CustomDataType; + status: RequestStartStopStatusEnumType; + statusInfo?: StatusInfoType; + /** + * When the transaction was already started by the Charging Station before the RequestStartTransactionRequest was received, for example: cable plugged in first. This contains the transactionId of the already started transaction. + * + */ + transactionId?: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/RequestStopTransactionRequest.d.ts b/lib/types/v201/RequestStopTransactionRequest.d.ts new file mode 100644 index 0000000..a7beb54 --- /dev/null +++ b/lib/types/v201/RequestStopTransactionRequest.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface RequestStopTransactionRequest { + customData?: CustomDataType; + /** + * The identifier of the transaction which the Charging Station is requested to stop. + * + */ + transactionId: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/RequestStopTransactionResponse.d.ts b/lib/types/v201/RequestStopTransactionResponse.d.ts new file mode 100644 index 0000000..45bff14 --- /dev/null +++ b/lib/types/v201/RequestStopTransactionResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Status indicating whether Charging Station accepts the request to stop a transaction. + * + */ +export type RequestStartStopStatusEnumType = "Accepted" | "Rejected"; + +export interface RequestStopTransactionResponse { + customData?: CustomDataType; + status: RequestStartStopStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ReservationStatusUpdateRequest.d.ts b/lib/types/v201/ReservationStatusUpdateRequest.d.ts new file mode 100644 index 0000000..31f0bb2 --- /dev/null +++ b/lib/types/v201/ReservationStatusUpdateRequest.d.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * The updated reservation status. + * + */ +export type ReservationUpdateStatusEnumType = "Expired" | "Removed"; + +export interface ReservationStatusUpdateRequest { + customData?: CustomDataType; + /** + * The ID of the reservation. + * + */ + reservationId: number; + reservationUpdateStatus: ReservationUpdateStatusEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ReservationStatusUpdateResponse.d.ts b/lib/types/v201/ReservationStatusUpdateResponse.d.ts new file mode 100644 index 0000000..268a295 --- /dev/null +++ b/lib/types/v201/ReservationStatusUpdateResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface ReservationStatusUpdateResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ReserveNowRequest.d.ts b/lib/types/v201/ReserveNowRequest.d.ts new file mode 100644 index 0000000..a91706e --- /dev/null +++ b/lib/types/v201/ReserveNowRequest.d.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This field specifies the connector type. + * + */ +export type ConnectorEnumType = + | "cCCS1" + | "cCCS2" + | "cG105" + | "cTesla" + | "cType1" + | "cType2" + | "s309-1P-16A" + | "s309-1P-32A" + | "s309-3P-16A" + | "s309-3P-32A" + | "sBS1361" + | "sCEE-7-7" + | "sType2" + | "sType3" + | "Other1PhMax16A" + | "Other1PhOver16A" + | "Other3Ph" + | "Pan" + | "wInductive" + | "wResonant" + | "Undetermined" + | "Unknown"; +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; + +export interface ReserveNowRequest { + customData?: CustomDataType; + /** + * Id of reservation. + * + */ + id: number; + /** + * Date and time at which the reservation expires. + * + */ + expiryDateTime: string; + connectorType?: ConnectorEnumType; + idToken: IdTokenType; + /** + * This contains ID of the evse to be reserved. + * + */ + evseId?: number; + groupIdToken?: IdTokenType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} diff --git a/lib/types/v201/ReserveNowResponse.d.ts b/lib/types/v201/ReserveNowResponse.d.ts new file mode 100644 index 0000000..dd6669e --- /dev/null +++ b/lib/types/v201/ReserveNowResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates the success or failure of the reservation. + * + */ +export type ReserveNowStatusEnumType = "Accepted" | "Faulted" | "Occupied" | "Rejected" | "Unavailable"; + +export interface ReserveNowResponse { + customData?: CustomDataType; + status: ReserveNowStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/ResetRequest.d.ts b/lib/types/v201/ResetRequest.d.ts new file mode 100644 index 0000000..f7564a9 --- /dev/null +++ b/lib/types/v201/ResetRequest.d.ts @@ -0,0 +1,29 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the type of reset that the Charging Station or EVSE should perform. + * + */ +export type ResetEnumType = "Immediate" | "OnIdle"; + +export interface ResetRequest { + customData?: CustomDataType; + type: ResetEnumType; + /** + * This contains the ID of a specific EVSE that needs to be reset, instead of the entire Charging Station. + * + */ + evseId?: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/ResetResponse.d.ts b/lib/types/v201/ResetResponse.d.ts new file mode 100644 index 0000000..8be6f56 --- /dev/null +++ b/lib/types/v201/ResetResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station is able to perform the reset. + * + */ +export type ResetStatusEnumType = "Accepted" | "Rejected" | "Scheduled"; + +export interface ResetResponse { + customData?: CustomDataType; + status: ResetStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SecurityEventNotificationRequest.d.ts b/lib/types/v201/SecurityEventNotificationRequest.d.ts new file mode 100644 index 0000000..2f72937 --- /dev/null +++ b/lib/types/v201/SecurityEventNotificationRequest.d.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SecurityEventNotificationRequest { + customData?: CustomDataType; + /** + * Type of the security event. This value should be taken from the Security events list. + * + */ + type: string; + /** + * Date and time at which the event occurred. + * + */ + timestamp: string; + /** + * Additional information about the occurred security event. + * + */ + techInfo?: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/SecurityEventNotificationResponse.d.ts b/lib/types/v201/SecurityEventNotificationResponse.d.ts new file mode 100644 index 0000000..9e113d4 --- /dev/null +++ b/lib/types/v201/SecurityEventNotificationResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SecurityEventNotificationResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/SendLocalListRequest.d.ts b/lib/types/v201/SendLocalListRequest.d.ts new file mode 100644 index 0000000..3e0745f --- /dev/null +++ b/lib/types/v201/SendLocalListRequest.d.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; +/** + * ID_ Token. Status. Authorization_ Status + * urn:x-oca:ocpp:uid:1:569372 + * Current status of the ID Token. + * + */ +export type AuthorizationStatusEnumType = + | "Accepted" + | "Blocked" + | "ConcurrentTx" + | "Expired" + | "Invalid" + | "NoCredit" + | "NotAllowedTypeEVSE" + | "NotAtThisLocation" + | "NotAtThisTime" + | "Unknown"; +/** + * Message_ Content. Format. Message_ Format_ Code + * urn:x-enexis:ecdm:uid:1:570848 + * Format of the message. + * + */ +export type MessageFormatEnumType = "ASCII" | "HTML" | "URI" | "UTF8"; +/** + * This contains the type of update (full or differential) of this request. + * + */ +export type UpdateEnumType = "Differential" | "Full"; + +export interface SendLocalListRequest { + customData?: CustomDataType; + localAuthorizationList?: AuthorizationData[]; + /** + * In case of a full update this is the version number of the full list. In case of a differential update it is the version number of the list after the update has been applied. + * + */ + versionNumber: number; + updateType: UpdateEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Contains the identifier to use for authorization. + * + */ +export interface AuthorizationData { + customData?: CustomDataType; + idToken: IdTokenType; + idTokenInfo?: IdTokenInfoType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} +/** + * ID_ Token + * urn:x-oca:ocpp:uid:2:233247 + * Contains status information about an identifier. + * It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date. + * + */ +export interface IdTokenInfoType { + customData?: CustomDataType; + status: AuthorizationStatusEnumType; + /** + * ID_ Token. Expiry. Date_ Time + * urn:x-oca:ocpp:uid:1:569373 + * Date and Time after which the token must be considered invalid. + * + */ + cacheExpiryDateTime?: string; + /** + * Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in <<transactioneventresponse,TransactionEventResponse>> overrules this one. + * + */ + chargingPriority?: number; + /** + * ID_ Token. Language1. Language_ Code + * urn:x-oca:ocpp:uid:1:569374 + * Preferred user interface language of identifier user. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + * + */ + language1?: string; + /** + * Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station. + * + * + */ + evseId?: number[]; + groupIdToken?: IdTokenType; + /** + * ID_ Token. Language2. Language_ Code + * urn:x-oca:ocpp:uid:1:569375 + * Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language2?: string; + personalMessage?: MessageContentType; +} +/** + * Message_ Content + * urn:x-enexis:ecdm:uid:2:234490 + * Contains message details, for a message to be displayed on a Charging Station. + * + * + */ +export interface MessageContentType { + customData?: CustomDataType; + format: MessageFormatEnumType; + /** + * Message_ Content. Language. Language_ Code + * urn:x-enexis:ecdm:uid:1:570849 + * Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language?: string; + /** + * Message_ Content. Content. Message + * urn:x-enexis:ecdm:uid:1:570852 + * Message contents. + * + * + */ + content: string; +} diff --git a/lib/types/v201/SendLocalListResponse.d.ts b/lib/types/v201/SendLocalListResponse.d.ts new file mode 100644 index 0000000..cff9cc1 --- /dev/null +++ b/lib/types/v201/SendLocalListResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List. + * + */ +export type SendLocalListStatusEnumType = "Accepted" | "Failed" | "VersionMismatch"; + +export interface SendLocalListResponse { + customData?: CustomDataType; + status: SendLocalListStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SetChargingProfileRequest.d.ts b/lib/types/v201/SetChargingProfileRequest.d.ts new file mode 100644 index 0000000..e98c876 --- /dev/null +++ b/lib/types/v201/SetChargingProfileRequest.d.ts @@ -0,0 +1,292 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Charging_ Profile. Charging_ Profile_ Purpose. Charging_ Profile_ Purpose_ Code + * urn:x-oca:ocpp:uid:1:569231 + * Defines the purpose of the schedule transferred by this profile + * + */ +export type ChargingProfilePurposeEnumType = + | "ChargingStationExternalConstraints" + | "ChargingStationMaxProfile" + | "TxDefaultProfile" + | "TxProfile"; +/** + * Charging_ Profile. Charging_ Profile_ Kind. Charging_ Profile_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569232 + * Indicates the kind of schedule. + * + */ +export type ChargingProfileKindEnumType = "Absolute" | "Recurring" | "Relative"; +/** + * Charging_ Profile. Recurrency_ Kind. Recurrency_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569233 + * Indicates the start point of a recurrence. + * + */ +export type RecurrencyKindEnumType = "Daily" | "Weekly"; +/** + * Charging_ Schedule. Charging_ Rate_ Unit. Charging_ Rate_ Unit_ Code + * urn:x-oca:ocpp:uid:1:569238 + * The unit of measure Limit is expressed in. + * + */ +export type ChargingRateUnitEnumType = "W" | "A"; +/** + * Cost. Cost_ Kind. Cost_ Kind_ Code + * urn:x-oca:ocpp:uid:1:569243 + * The kind of cost referred to in the message element amount + * + */ +export type CostKindEnumType = "CarbonDioxideEmission" | "RelativePricePercentage" | "RenewableGenerationPercentage"; + +export interface SetChargingProfileRequest { + customData?: CustomDataType; + /** + * For TxDefaultProfile an evseId=0 applies the profile to each individual evse. For ChargingStationMaxProfile and ChargingStationExternalConstraints an evseId=0 contains an overal limit for the whole Charging Station. + * + */ + evseId: number; + chargingProfile: ChargingProfileType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Charging_ Profile + * urn:x-oca:ocpp:uid:2:233255 + * A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. + * + */ +export interface ChargingProfileType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * Id of ChargingProfile. + * + */ + id: number; + /** + * Charging_ Profile. Stack_ Level. Counter + * urn:x-oca:ocpp:uid:1:569230 + * Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. + * + */ + stackLevel: number; + chargingProfilePurpose: ChargingProfilePurposeEnumType; + chargingProfileKind: ChargingProfileKindEnumType; + recurrencyKind?: RecurrencyKindEnumType; + /** + * Charging_ Profile. Valid_ From. Date_ Time + * urn:x-oca:ocpp:uid:1:569234 + * Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station. + * + */ + validFrom?: string; + /** + * Charging_ Profile. Valid_ To. Date_ Time + * urn:x-oca:ocpp:uid:1:569235 + * Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile. + * + */ + validTo?: string; + chargingSchedule: ChargingScheduleType[]; + /** + * SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction. + * + */ + transactionId?: string; +} +/** + * Charging_ Schedule + * urn:x-oca:ocpp:uid:2:233256 + * Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. + * + */ +export interface ChargingScheduleType { + customData?: CustomDataType; + /** + * Identifies the ChargingSchedule. + * + */ + id: number; + /** + * Charging_ Schedule. Start_ Schedule. Date_ Time + * urn:x-oca:ocpp:uid:1:569237 + * Starting point of an absolute schedule. If absent the schedule will be relative to start of charging. + * + */ + startSchedule?: string; + /** + * Charging_ Schedule. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569236 + * Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. + * + */ + duration?: number; + chargingRateUnit: ChargingRateUnitEnumType; + chargingSchedulePeriod: ChargingSchedulePeriodType[]; + /** + * Charging_ Schedule. Min_ Charging_ Rate. Numeric + * urn:x-oca:ocpp:uid:1:569239 + * Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) + * + */ + minChargingRate?: number; + salesTariff?: SalesTariffType; +} +/** + * Charging_ Schedule_ Period + * urn:x-oca:ocpp:uid:2:233257 + * Charging schedule period structure defines a time period in a charging schedule. + * + */ +export interface ChargingSchedulePeriodType { + customData?: CustomDataType; + /** + * Charging_ Schedule_ Period. Start_ Period. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569240 + * Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. + * + */ + startPeriod: number; + /** + * Charging_ Schedule_ Period. Limit. Measure + * urn:x-oca:ocpp:uid:1:569241 + * Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). + * + */ + limit: number; + /** + * Charging_ Schedule_ Period. Number_ Phases. Counter + * urn:x-oca:ocpp:uid:1:569242 + * The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. + * + */ + numberPhases?: number; + /** + * Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. + * + * + */ + phaseToUse?: number; +} +/** + * Sales_ Tariff + * urn:x-oca:ocpp:uid:2:233272 + * NOTE: This dataType is based on dataTypes from <<ref-ISOIEC15118-2,ISO 15118-2>>. + * + */ +export interface SalesTariffType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * SalesTariff identifier used to identify one sales tariff. An SAID remains a unique identifier for one schedule throughout a charging session. + * + */ + id: number; + /** + * Sales_ Tariff. Sales. Tariff_ Description + * urn:x-oca:ocpp:uid:1:569283 + * A human readable title/short description of the sales tariff e.g. for HMI display purposes. + * + */ + salesTariffDescription?: string; + /** + * Sales_ Tariff. Num_ E_ Price_ Levels. Counter + * urn:x-oca:ocpp:uid:1:569284 + * Defines the overall number of distinct price levels used across all provided SalesTariff elements. + * + */ + numEPriceLevels?: number; + salesTariffEntry: SalesTariffEntryType[]; +} +/** + * Sales_ Tariff_ Entry + * urn:x-oca:ocpp:uid:2:233271 + * + */ +export interface SalesTariffEntryType { + customData?: CustomDataType; + relativeTimeInterval: RelativeTimeIntervalType; + /** + * Sales_ Tariff_ Entry. E_ Price_ Level. Unsigned_ Integer + * urn:x-oca:ocpp:uid:1:569281 + * Defines the price level of this SalesTariffEntry (referring to NumEPriceLevels). Small values for the EPriceLevel represent a cheaper TariffEntry. Large values for the EPriceLevel represent a more expensive TariffEntry. + * + */ + ePriceLevel?: number; + consumptionCost?: ConsumptionCostType[]; +} +/** + * Relative_ Timer_ Interval + * urn:x-oca:ocpp:uid:2:233270 + * + */ +export interface RelativeTimeIntervalType { + customData?: CustomDataType; + /** + * Relative_ Timer_ Interval. Start. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569279 + * Start of the interval, in seconds from NOW. + * + */ + start: number; + /** + * Relative_ Timer_ Interval. Duration. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569280 + * Duration of the interval, in seconds. + * + */ + duration?: number; +} +/** + * Consumption_ Cost + * urn:x-oca:ocpp:uid:2:233259 + * + */ +export interface ConsumptionCostType { + customData?: CustomDataType; + /** + * Consumption_ Cost. Start_ Value. Numeric + * urn:x-oca:ocpp:uid:1:569246 + * The lowest level of consumption that defines the starting point of this consumption block. The block interval extends to the start of the next interval. + * + */ + startValue: number; + cost: CostType[]; +} +/** + * Cost + * urn:x-oca:ocpp:uid:2:233258 + * + */ +export interface CostType { + customData?: CustomDataType; + costKind: CostKindEnumType; + /** + * Cost. Amount. Amount + * urn:x-oca:ocpp:uid:1:569244 + * The estimated or actual cost per kWh + * + */ + amount: number; + /** + * Cost. Amount_ Multiplier. Integer + * urn:x-oca:ocpp:uid:1:569245 + * Values: -3..3, The amountMultiplier defines the exponent to base 10 (dec). The final value is determined by: amount * 10 ^ amountMultiplier + * + */ + amountMultiplier?: number; +} diff --git a/lib/types/v201/SetChargingProfileResponse.d.ts b/lib/types/v201/SetChargingProfileResponse.d.ts new file mode 100644 index 0000000..94f6872 --- /dev/null +++ b/lib/types/v201/SetChargingProfileResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Returns whether the Charging Station has been able to process the message successfully. This does not guarantee the schedule will be followed to the letter. There might be other constraints the Charging Station may need to take into account. + * + */ +export type ChargingProfileStatusEnumType = "Accepted" | "Rejected"; + +export interface SetChargingProfileResponse { + customData?: CustomDataType; + status: ChargingProfileStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SetDisplayMessageRequest.d.ts b/lib/types/v201/SetDisplayMessageRequest.d.ts new file mode 100644 index 0000000..f058493 --- /dev/null +++ b/lib/types/v201/SetDisplayMessageRequest.d.ts @@ -0,0 +1,146 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Message_ Info. Priority. Message_ Priority_ Code + * urn:x-enexis:ecdm:uid:1:569253 + * With what priority should this message be shown + * + */ +export type MessagePriorityEnumType = "AlwaysFront" | "InFront" | "NormalCycle"; +/** + * Message_ Info. State. Message_ State_ Code + * urn:x-enexis:ecdm:uid:1:569254 + * During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station. + * + */ +export type MessageStateEnumType = "Charging" | "Faulted" | "Idle" | "Unavailable"; +/** + * Message_ Content. Format. Message_ Format_ Code + * urn:x-enexis:ecdm:uid:1:570848 + * Format of the message. + * + */ +export type MessageFormatEnumType = "ASCII" | "HTML" | "URI" | "UTF8"; + +export interface SetDisplayMessageRequest { + customData?: CustomDataType; + message: MessageInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Message_ Info + * urn:x-enexis:ecdm:uid:2:233264 + * Contains message details, for a message to be displayed on a Charging Station. + * + */ +export interface MessageInfoType { + customData?: CustomDataType; + display?: ComponentType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * Master resource identifier, unique within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero). + * + */ + id: number; + priority: MessagePriorityEnumType; + state?: MessageStateEnumType; + /** + * Message_ Info. Start. Date_ Time + * urn:x-enexis:ecdm:uid:1:569256 + * From what date-time should this message be shown. If omitted: directly. + * + */ + startDateTime?: string; + /** + * Message_ Info. End. Date_ Time + * urn:x-enexis:ecdm:uid:1:569257 + * Until what date-time should this message be shown, after this date/time this message SHALL be removed. + * + */ + endDateTime?: string; + /** + * During which transaction shall this message be shown. + * Message SHALL be removed by the Charging Station after transaction has + * ended. + * + */ + transactionId?: string; + message: MessageContentType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Message_ Content + * urn:x-enexis:ecdm:uid:2:234490 + * Contains message details, for a message to be displayed on a Charging Station. + * + * + */ +export interface MessageContentType { + customData?: CustomDataType; + format: MessageFormatEnumType; + /** + * Message_ Content. Language. Language_ Code + * urn:x-enexis:ecdm:uid:1:570849 + * Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language?: string; + /** + * Message_ Content. Content. Message + * urn:x-enexis:ecdm:uid:1:570852 + * Message contents. + * + * + */ + content: string; +} diff --git a/lib/types/v201/SetDisplayMessageResponse.d.ts b/lib/types/v201/SetDisplayMessageResponse.d.ts new file mode 100644 index 0000000..0eacb43 --- /dev/null +++ b/lib/types/v201/SetDisplayMessageResponse.d.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station is able to display the message. + * + */ +export type DisplayMessageStatusEnumType = + | "Accepted" + | "NotSupportedMessageFormat" + | "Rejected" + | "NotSupportedPriority" + | "NotSupportedState" + | "UnknownTransaction"; + +export interface SetDisplayMessageResponse { + customData?: CustomDataType; + status: DisplayMessageStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SetMonitoringBaseRequest.d.ts b/lib/types/v201/SetMonitoringBaseRequest.d.ts new file mode 100644 index 0000000..4a7661e --- /dev/null +++ b/lib/types/v201/SetMonitoringBaseRequest.d.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Specify which monitoring base will be set + * + */ +export type MonitoringBaseEnumType = "All" | "FactoryDefault" | "HardWiredOnly"; + +export interface SetMonitoringBaseRequest { + customData?: CustomDataType; + monitoringBase: MonitoringBaseEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/SetMonitoringBaseResponse.d.ts b/lib/types/v201/SetMonitoringBaseResponse.d.ts new file mode 100644 index 0000000..32b98b4 --- /dev/null +++ b/lib/types/v201/SetMonitoringBaseResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the Charging Station was able to accept the request. + * + */ +export type GenericDeviceModelStatusEnumType = "Accepted" | "Rejected" | "NotSupported" | "EmptyResultSet"; + +export interface SetMonitoringBaseResponse { + customData?: CustomDataType; + status: GenericDeviceModelStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SetMonitoringLevelRequest.d.ts b/lib/types/v201/SetMonitoringLevelRequest.d.ts new file mode 100644 index 0000000..1fd5b38 --- /dev/null +++ b/lib/types/v201/SetMonitoringLevelRequest.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface SetMonitoringLevelRequest { + customData?: CustomDataType; + /** + * The Charging Station SHALL only report events with a severity number lower than or equal to this severity. + * The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. + * + * The severity levels have the following meaning: + + * *0-Danger* + + * Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. + + * *1-Hardware Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. + + * *2-System Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. + + * *3-Critical* + + * Indicates a critical error. Action is required. + + * *4-Error* + + * Indicates a non-urgent error. Action is required. + + * *5-Alert* + + * Indicates an alert event. Default severity for any type of monitoring event. + + * *6-Warning* + + * Indicates a warning event. Action may be required. + + * *7-Notice* + + * Indicates an unusual event. No immediate action is required. + + * *8-Informational* + + * Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. + + * *9-Debug* + + * Indicates information useful to developers for debugging, not useful during operations. + * + * + * + */ + severity: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/SetMonitoringLevelResponse.d.ts b/lib/types/v201/SetMonitoringLevelResponse.d.ts new file mode 100644 index 0000000..96643a6 --- /dev/null +++ b/lib/types/v201/SetMonitoringLevelResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the Charging Station was able to accept the request. + * + */ +export type GenericStatusEnumType = "Accepted" | "Rejected"; + +export interface SetMonitoringLevelResponse { + customData?: CustomDataType; + status: GenericStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SetNetworkProfileRequest.d.ts b/lib/types/v201/SetNetworkProfileRequest.d.ts new file mode 100644 index 0000000..bb97953 --- /dev/null +++ b/lib/types/v201/SetNetworkProfileRequest.d.ts @@ -0,0 +1,198 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * APN. APN_ Authentication. APN_ Authentication_ Code + * urn:x-oca:ocpp:uid:1:568828 + * Authentication method. + * + */ +export type APNAuthenticationEnumType = "CHAP" | "NONE" | "PAP" | "AUTO"; +/** + * Communication_ Function. OCPP_ Version. OCPP_ Version_ Code + * urn:x-oca:ocpp:uid:1:569355 + * Defines the OCPP version used for this communication function. + * + */ +export type OCPPVersionEnumType = "OCPP12" | "OCPP15" | "OCPP16" | "OCPP20"; +/** + * Communication_ Function. OCPP_ Transport. OCPP_ Transport_ Code + * urn:x-oca:ocpp:uid:1:569356 + * Defines the transport protocol (e.g. SOAP or JSON). Note: SOAP is not supported in OCPP 2.0, but is supported by other versions of OCPP. + * + */ +export type OCPPTransportEnumType = "JSON" | "SOAP"; +/** + * Applicable Network Interface. + * + */ +export type OCPPInterfaceEnumType = + | "Wired0" + | "Wired1" + | "Wired2" + | "Wired3" + | "Wireless0" + | "Wireless1" + | "Wireless2" + | "Wireless3"; +/** + * VPN. Type. VPN_ Code + * urn:x-oca:ocpp:uid:1:569277 + * Type of VPN + * + */ +export type VPNEnumType = "IKEv2" | "IPSec" | "L2TP" | "PPTP"; + +export interface SetNetworkProfileRequest { + customData?: CustomDataType; + /** + * Slot in which the configuration should be stored. + * + */ + configurationSlot: number; + connectionData: NetworkConnectionProfileType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Communication_ Function + * urn:x-oca:ocpp:uid:2:233304 + * The NetworkConnectionProfile defines the functional and technical parameters of a communication link. + * + */ +export interface NetworkConnectionProfileType { + customData?: CustomDataType; + apn?: APNType; + ocppVersion: OCPPVersionEnumType; + ocppTransport: OCPPTransportEnumType; + /** + * Communication_ Function. OCPP_ Central_ System_ URL. URI + * urn:x-oca:ocpp:uid:1:569357 + * URL of the CSMS(s) that this Charging Station communicates with. + * + */ + ocppCsmsUrl: string; + /** + * Duration in seconds before a message send by the Charging Station via this network connection times-out. + * The best setting depends on the underlying network and response times of the CSMS. + * If you are looking for a some guideline: use 30 seconds as a starting point. + * + */ + messageTimeout: number; + /** + * This field specifies the security profile used when connecting to the CSMS with this NetworkConnectionProfile. + * + */ + securityProfile: number; + ocppInterface: OCPPInterfaceEnumType; + vpn?: VPNType; +} +/** + * APN + * urn:x-oca:ocpp:uid:2:233134 + * Collection of configuration data needed to make a data-connection over a cellular network. + * + * NOTE: When asking a GSM modem to dial in, it is possible to specify which mobile operator should be used. This can be done with the mobile country code (MCC) in combination with a mobile network code (MNC). Example: If your preferred network is Vodafone Netherlands, the MCC=204 and the MNC=04 which means the key PreferredNetwork = 20404 Some modems allows to specify a preferred network, which means, if this network is not available, a different network is used. If you specify UseOnlyPreferredNetwork and this network is not available, the modem will not dial in. + * + */ +export interface APNType { + customData?: CustomDataType; + /** + * APN. APN. URI + * urn:x-oca:ocpp:uid:1:568814 + * The Access Point Name as an URL. + * + */ + apn: string; + /** + * APN. APN. User_ Name + * urn:x-oca:ocpp:uid:1:568818 + * APN username. + * + */ + apnUserName?: string; + /** + * APN. APN. Password + * urn:x-oca:ocpp:uid:1:568819 + * APN Password. + * + */ + apnPassword?: string; + /** + * APN. SIMPIN. PIN_ Code + * urn:x-oca:ocpp:uid:1:568821 + * SIM card pin code. + * + */ + simPin?: number; + /** + * APN. Preferred_ Network. Mobile_ Network_ ID + * urn:x-oca:ocpp:uid:1:568822 + * Preferred network, written as MCC and MNC concatenated. See note. + * + */ + preferredNetwork?: string; + /** + * APN. Use_ Only_ Preferred_ Network. Indicator + * urn:x-oca:ocpp:uid:1:568824 + * Default: false. Use only the preferred Network, do + * not dial in when not available. See Note. + * + */ + useOnlyPreferredNetwork?: boolean; + apnAuthentication: APNAuthenticationEnumType; +} +/** + * VPN + * urn:x-oca:ocpp:uid:2:233268 + * VPN Configuration settings + * + */ +export interface VPNType { + customData?: CustomDataType; + /** + * VPN. Server. URI + * urn:x-oca:ocpp:uid:1:569272 + * VPN Server Address + * + */ + server: string; + /** + * VPN. User. User_ Name + * urn:x-oca:ocpp:uid:1:569273 + * VPN User + * + */ + user: string; + /** + * VPN. Group. Group_ Name + * urn:x-oca:ocpp:uid:1:569274 + * VPN group. + * + */ + group?: string; + /** + * VPN. Password. Password + * urn:x-oca:ocpp:uid:1:569275 + * VPN Password. + * + */ + password: string; + /** + * VPN. Key. VPN_ Key + * urn:x-oca:ocpp:uid:1:569276 + * VPN shared secret. + * + */ + key: string; + type: VPNEnumType; +} diff --git a/lib/types/v201/SetNetworkProfileResponse.d.ts b/lib/types/v201/SetNetworkProfileResponse.d.ts new file mode 100644 index 0000000..1c284d7 --- /dev/null +++ b/lib/types/v201/SetNetworkProfileResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Result of operation. + * + */ +export type SetNetworkProfileStatusEnumType = "Accepted" | "Rejected" | "Failed"; + +export interface SetNetworkProfileResponse { + customData?: CustomDataType; + status: SetNetworkProfileStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/SetVariableMonitoringRequest.d.ts b/lib/types/v201/SetVariableMonitoringRequest.d.ts new file mode 100644 index 0000000..3740541 --- /dev/null +++ b/lib/types/v201/SetVariableMonitoringRequest.d.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * The type of this monitor, e.g. a threshold, delta or periodic monitor. + * + * + */ +export type MonitorEnumType = "UpperThreshold" | "LowerThreshold" | "Delta" | "Periodic" | "PeriodicClockAligned"; + +export interface SetVariableMonitoringRequest { + customData?: CustomDataType; + setMonitoringData: SetMonitoringDataType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to hold parameters of SetVariableMonitoring request. + * + */ +export interface SetMonitoringDataType { + customData?: CustomDataType; + /** + * An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id's for new monitors. + * + * + */ + id?: number; + /** + * Monitor only active when a transaction is ongoing on a component relevant to this transaction. Default = false. + * + * + */ + transaction?: boolean; + /** + * Value for threshold or delta monitoring. + * For Periodic or PeriodicClockAligned this is the interval in seconds. + * + * + */ + value: number; + type: MonitorEnumType; + /** + * The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. + * + * The severity levels have the following meaning: + + * *0-Danger* + + * Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. + + * *1-Hardware Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. + + * *2-System Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. + + * *3-Critical* + + * Indicates a critical error. Action is required. + + * *4-Error* + + * Indicates a non-urgent error. Action is required. + + * *5-Alert* + + * Indicates an alert event. Default severity for any type of monitoring event. + + * *6-Warning* + + * Indicates a warning event. Action may be required. + + * *7-Notice* + + * Indicates an unusual event. No immediate action is required. + + * *8-Informational* + + * Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. + + * *9-Debug* + + * Indicates information useful to developers for debugging, not useful during operations. + * + * + */ + severity: number; + component: ComponentType; + variable: VariableType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/SetVariableMonitoringResponse.d.ts b/lib/types/v201/SetVariableMonitoringResponse.d.ts new file mode 100644 index 0000000..7394eb3 --- /dev/null +++ b/lib/types/v201/SetVariableMonitoringResponse.d.ts @@ -0,0 +1,154 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned. + * + */ +export type SetMonitoringStatusEnumType = + | "Accepted" + | "UnknownComponent" + | "UnknownVariable" + | "UnsupportedMonitorType" + | "Rejected" + | "Duplicate"; +/** + * The type of this monitor, e.g. a threshold, delta or periodic monitor. + * + * + */ +export type MonitorEnumType = "UpperThreshold" | "LowerThreshold" | "Delta" | "Periodic" | "PeriodicClockAligned"; + +export interface SetVariableMonitoringResponse { + customData?: CustomDataType; + setMonitoringResult: SetMonitoringResultType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Class to hold result of SetVariableMonitoring request. + * + */ +export interface SetMonitoringResultType { + customData?: CustomDataType; + /** + * Id given to the VariableMonitor by the Charging Station. The Id is only returned when status is accepted. Installed VariableMonitors should have unique id's but the id's of removed Installed monitors should have unique id's but the id's of removed monitors MAY be reused. + * + */ + id?: number; + statusInfo?: StatusInfoType; + status: SetMonitoringStatusEnumType; + type: MonitorEnumType; + component: ComponentType; + variable: VariableType; + /** + * The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level. + * + * The severity levels have the following meaning: + + * *0-Danger* + + * Indicates lives are potentially in danger. Urgent attention is needed and action should be taken immediately. + + * *1-Hardware Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to Hardware issues. Action is required. + + * *2-System Failure* + + * Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware issues. Action is required. + + * *3-Critical* + + * Indicates a critical error. Action is required. + + * *4-Error* + + * Indicates a non-urgent error. Action is required. + + * *5-Alert* + + * Indicates an alert event. Default severity for any type of monitoring event. + + * *6-Warning* + + * Indicates a warning event. Action may be required. + + * *7-Notice* + + * Indicates an unusual event. No immediate action is required. + + * *8-Informational* + + * Indicates a regular operational event. May be used for reporting, measuring throughput, etc. No action is required. + + * *9-Debug* + + * Indicates information useful to developers for debugging, not useful during operations. + * + * + */ + severity: number; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/SetVariablesRequest.d.ts b/lib/types/v201/SetVariablesRequest.d.ts new file mode 100644 index 0000000..bc64c17 --- /dev/null +++ b/lib/types/v201/SetVariablesRequest.d.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted. + * + */ +export type AttributeEnumType = "Actual" | "Target" | "MinSet" | "MaxSet"; + +export interface SetVariablesRequest { + customData?: CustomDataType; + setVariableData: SetVariableDataType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +export interface SetVariableDataType { + customData?: CustomDataType; + attributeType?: AttributeEnumType; + /** + * Value to be assigned to attribute of variable. + * + * The Configuration Variable <<configkey-configuration-value-size,ConfigurationValueSize>> can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal. + * + */ + attributeValue: string; + component: ComponentType; + variable: VariableType; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/SetVariablesResponse.d.ts b/lib/types/v201/SetVariablesResponse.d.ts new file mode 100644 index 0000000..d40a422 --- /dev/null +++ b/lib/types/v201/SetVariablesResponse.d.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted. + * + */ +export type AttributeEnumType = "Actual" | "Target" | "MinSet" | "MaxSet"; +/** + * Result status of setting the variable. + * + */ +export type SetVariableStatusEnumType = + | "Accepted" + | "Rejected" + | "UnknownComponent" + | "UnknownVariable" + | "NotSupportedAttributeType" + | "RebootRequired"; + +export interface SetVariablesResponse { + customData?: CustomDataType; + setVariableResult: SetVariableResultType[]; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +export interface SetVariableResultType { + customData?: CustomDataType; + attributeType?: AttributeEnumType; + attributeStatus: SetVariableStatusEnumType; + attributeStatusInfo?: StatusInfoType; + component: ComponentType; + variable: VariableType; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} +/** + * A physical or logical component + * + */ +export interface ComponentType { + customData?: CustomDataType; + evse?: EVSEType; + /** + * Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Reference key to a component-variable. + * + */ +export interface VariableType { + customData?: CustomDataType; + /** + * Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case. + * + */ + name: string; + /** + * Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case. + * + */ + instance?: string; +} diff --git a/lib/types/v201/SignCertificateRequest.d.ts b/lib/types/v201/SignCertificateRequest.d.ts new file mode 100644 index 0000000..8e232c7 --- /dev/null +++ b/lib/types/v201/SignCertificateRequest.d.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates the type of certificate that is to be signed. When omitted the certificate is to be used for both the 15118 connection (if implemented) and the Charging Station to CSMS connection. + * + * + */ +export type CertificateSigningUseEnumType = "ChargingStationCertificate" | "V2GCertificate"; + +export interface SignCertificateRequest { + customData?: CustomDataType; + /** + * The Charging Station SHALL send the public key in form of a Certificate Signing Request (CSR) as described in RFC 2986 [22] and then PEM encoded, using the <<signcertificaterequest,SignCertificateRequest>> message. + * + */ + csr: string; + certificateType?: CertificateSigningUseEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/SignCertificateResponse.d.ts b/lib/types/v201/SignCertificateResponse.d.ts new file mode 100644 index 0000000..a119317 --- /dev/null +++ b/lib/types/v201/SignCertificateResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Specifies whether the CSMS can process the request. + * + */ +export type GenericStatusEnumType = "Accepted" | "Rejected"; + +export interface SignCertificateResponse { + customData?: CustomDataType; + status: GenericStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/StatusNotificationRequest.d.ts b/lib/types/v201/StatusNotificationRequest.d.ts new file mode 100644 index 0000000..52f2499 --- /dev/null +++ b/lib/types/v201/StatusNotificationRequest.d.ts @@ -0,0 +1,39 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the current status of the Connector. + * + */ +export type ConnectorStatusEnumType = "Available" | "Occupied" | "Reserved" | "Unavailable" | "Faulted"; + +export interface StatusNotificationRequest { + customData?: CustomDataType; + /** + * The time for which the status is reported. If absent time of receipt of the message will be assumed. + * + */ + timestamp: string; + connectorStatus: ConnectorStatusEnumType; + /** + * The id of the EVSE to which the connector belongs for which the the status is reported. + * + */ + evseId: number; + /** + * The id of the connector within the EVSE for which the status is reported. + * + */ + connectorId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/StatusNotificationResponse.d.ts b/lib/types/v201/StatusNotificationResponse.d.ts new file mode 100644 index 0000000..176a5bf --- /dev/null +++ b/lib/types/v201/StatusNotificationResponse.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface StatusNotificationResponse { + customData?: CustomDataType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/TransactionEventRequest.d.ts b/lib/types/v201/TransactionEventRequest.d.ts new file mode 100644 index 0000000..cea6be1 --- /dev/null +++ b/lib/types/v201/TransactionEventRequest.d.ts @@ -0,0 +1,362 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This contains the type of this event. + * The first TransactionEvent of a transaction SHALL contain: "Started" The last TransactionEvent of a transaction SHALL contain: "Ended" All others SHALL contain: "Updated" + * + */ +export type TransactionEventEnumType = "Ended" | "Started" | "Updated"; +/** + * Sampled_ Value. Context. Reading_ Context_ Code + * urn:x-oca:ocpp:uid:1:569261 + * Type of detail value: start, end or sample. Default = "Sample.Periodic" + * + */ +export type ReadingContextEnumType = + | "Interruption.Begin" + | "Interruption.End" + | "Other" + | "Sample.Clock" + | "Sample.Periodic" + | "Transaction.Begin" + | "Transaction.End" + | "Trigger"; +/** + * Sampled_ Value. Measurand. Measurand_ Code + * urn:x-oca:ocpp:uid:1:569263 + * Type of measurement. Default = "Energy.Active.Import.Register" + * + */ +export type MeasurandEnumType = + | "Current.Export" + | "Current.Import" + | "Current.Offered" + | "Energy.Active.Export.Register" + | "Energy.Active.Import.Register" + | "Energy.Reactive.Export.Register" + | "Energy.Reactive.Import.Register" + | "Energy.Active.Export.Interval" + | "Energy.Active.Import.Interval" + | "Energy.Active.Net" + | "Energy.Reactive.Export.Interval" + | "Energy.Reactive.Import.Interval" + | "Energy.Reactive.Net" + | "Energy.Apparent.Net" + | "Energy.Apparent.Import" + | "Energy.Apparent.Export" + | "Frequency" + | "Power.Active.Export" + | "Power.Active.Import" + | "Power.Factor" + | "Power.Offered" + | "Power.Reactive.Export" + | "Power.Reactive.Import" + | "SoC" + | "Voltage"; +/** + * Sampled_ Value. Phase. Phase_ Code + * urn:x-oca:ocpp:uid:1:569264 + * Indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value. + * + */ +export type PhaseEnumType = "L1" | "L2" | "L3" | "N" | "L1-N" | "L2-N" | "L3-N" | "L1-L2" | "L2-L3" | "L3-L1"; +/** + * Sampled_ Value. Location. Location_ Code + * urn:x-oca:ocpp:uid:1:569265 + * Indicates where the measured value has been sampled. Default = "Outlet" + * + * + */ +export type LocationEnumType = "Body" | "Cable" | "EV" | "Inlet" | "Outlet"; +/** + * Reason the Charging Station sends this message to the CSMS + * + */ +export type TriggerReasonEnumType = + | "Authorized" + | "CablePluggedIn" + | "ChargingRateChanged" + | "ChargingStateChanged" + | "Deauthorized" + | "EnergyLimitReached" + | "EVCommunicationLost" + | "EVConnectTimeout" + | "MeterValueClock" + | "MeterValuePeriodic" + | "TimeLimitReached" + | "Trigger" + | "UnlockCommand" + | "StopAuthorized" + | "EVDeparted" + | "EVDetected" + | "RemoteStop" + | "RemoteStart" + | "AbnormalCondition" + | "SignedDataReceived" + | "ResetCommand"; +/** + * Transaction. State. Transaction_ State_ Code + * urn:x-oca:ocpp:uid:1:569419 + * Current charging state, is required when state + * has changed. + * + */ +export type ChargingStateEnumType = "Charging" | "EVConnected" | "SuspendedEV" | "SuspendedEVSE" | "Idle"; +/** + * Transaction. Stopped_ Reason. EOT_ Reason_ Code + * urn:x-oca:ocpp:uid:1:569413 + * This contains the reason why the transaction was stopped. MAY only be omitted when Reason is "Local". + * + */ +export type ReasonEnumType = + | "DeAuthorized" + | "EmergencyStop" + | "EnergyLimitReached" + | "EVDisconnected" + | "GroundFault" + | "ImmediateReset" + | "Local" + | "LocalOutOfCredit" + | "MasterPass" + | "Other" + | "OvercurrentFault" + | "PowerLoss" + | "PowerQuality" + | "Reboot" + | "Remote" + | "SOCLimitReached" + | "StoppedByEV" + | "TimeLimitReached" + | "Timeout"; +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; + +export interface TransactionEventRequest { + customData?: CustomDataType; + eventType: TransactionEventEnumType; + meterValue?: MeterValueType[]; + /** + * The date and time at which this transaction event occurred. + * + */ + timestamp: string; + triggerReason: TriggerReasonEnumType; + /** + * Incremental sequence number, helps with determining if all messages of a transaction have been received. + * + */ + seqNo: number; + /** + * Indication that this transaction event happened when the Charging Station was offline. Default = false, meaning: the event occurred when the Charging Station was online. + * + */ + offline?: boolean; + /** + * If the Charging Station is able to report the number of phases used, then it SHALL provide it. When omitted the CSMS may be able to determine the number of phases used via device management. + * + */ + numberOfPhasesUsed?: number; + /** + * The maximum current of the connected cable in Ampere (A). + * + */ + cableMaxCurrent?: number; + /** + * This contains the Id of the reservation that terminates as a result of this transaction. + * + */ + reservationId?: number; + transactionInfo: TransactionType; + evse?: EVSEType; + idToken?: IdTokenType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Meter_ Value + * urn:x-oca:ocpp:uid:2:233265 + * Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time. + * + */ +export interface MeterValueType { + customData?: CustomDataType; + sampledValue: SampledValueType[]; + /** + * Meter_ Value. Timestamp. Date_ Time + * urn:x-oca:ocpp:uid:1:569259 + * Timestamp for measured value(s). + * + */ + timestamp: string; +} +/** + * Sampled_ Value + * urn:x-oca:ocpp:uid:2:233266 + * Single sampled value in MeterValues. Each value can be accompanied by optional fields. + * + * To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units. + * + */ +export interface SampledValueType { + customData?: CustomDataType; + /** + * Sampled_ Value. Value. Measure + * urn:x-oca:ocpp:uid:1:569260 + * Indicates the measured value. + * + * + */ + value: number; + context?: ReadingContextEnumType; + measurand?: MeasurandEnumType; + phase?: PhaseEnumType; + location?: LocationEnumType; + signedMeterValue?: SignedMeterValueType; + unitOfMeasure?: UnitOfMeasureType; +} +/** + * Represent a signed version of the meter value. + * + */ +export interface SignedMeterValueType { + customData?: CustomDataType; + /** + * Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc. + * + */ + signedMeterData: string; + /** + * Method used to create the digital signature. + * + */ + signingMethod: string; + /** + * Method used to encode the meter values before applying the digital signature algorithm. + * + */ + encodingMethod: string; + /** + * Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_. + * + */ + publicKey: string; +} +/** + * Represents a UnitOfMeasure with a multiplier + * + */ +export interface UnitOfMeasureType { + customData?: CustomDataType; + /** + * Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type. + * This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices. + * If an applicable unit is available in that list, otherwise a "custom" unit might be used. + * + */ + unit?: string; + /** + * Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0. + * + */ + multiplier?: number; +} +/** + * Transaction + * urn:x-oca:ocpp:uid:2:233318 + * + */ +export interface TransactionType { + customData?: CustomDataType; + /** + * This contains the Id of the transaction. + * + */ + transactionId: string; + chargingState?: ChargingStateEnumType; + /** + * Transaction. Time_ Spent_ Charging. Elapsed_ Time + * urn:x-oca:ocpp:uid:1:569415 + * Contains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction. + * + */ + timeSpentCharging?: number; + stoppedReason?: ReasonEnumType; + /** + * The ID given to remote start request (<<requeststarttransactionrequest, RequestStartTransactionRequest>>. This enables to CSMS to match the started transaction to the given start request. + * + */ + remoteStartId?: number; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} diff --git a/lib/types/v201/TransactionEventResponse.d.ts b/lib/types/v201/TransactionEventResponse.d.ts new file mode 100644 index 0000000..c2633c4 --- /dev/null +++ b/lib/types/v201/TransactionEventResponse.d.ts @@ -0,0 +1,171 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * ID_ Token. Status. Authorization_ Status + * urn:x-oca:ocpp:uid:1:569372 + * Current status of the ID Token. + * + */ +export type AuthorizationStatusEnumType = + | "Accepted" + | "Blocked" + | "ConcurrentTx" + | "Expired" + | "Invalid" + | "NoCredit" + | "NotAllowedTypeEVSE" + | "NotAtThisLocation" + | "NotAtThisTime" + | "Unknown"; +/** + * Enumeration of possible idToken types. + * + */ +export type IdTokenEnumType = + | "Central" + | "eMAID" + | "ISO14443" + | "ISO15693" + | "KeyCode" + | "Local" + | "MacAddress" + | "NoAuthorization"; +/** + * Message_ Content. Format. Message_ Format_ Code + * urn:x-enexis:ecdm:uid:1:570848 + * Format of the message. + * + */ +export type MessageFormatEnumType = "ASCII" | "HTML" | "URI" | "UTF8"; + +export interface TransactionEventResponse { + customData?: CustomDataType; + /** + * SHALL only be sent when charging has ended. Final total cost of this transaction, including taxes. In the currency configured with the Configuration Variable: <<configkey-currency,`Currency`>>. When omitted, the transaction was NOT free. To indicate a free transaction, the CSMS SHALL send 0.00. + * + * + */ + totalCost?: number; + /** + * Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in <<transactioneventresponse,TransactionEventResponse>> is temporarily, so it may not be set in the <<cmn_idtokeninfotype,IdTokenInfoType>> afterwards. Also the chargingPriority in <<transactioneventresponse,TransactionEventResponse>> overrules the one in <<cmn_idtokeninfotype,IdTokenInfoType>>. + * + */ + chargingPriority?: number; + idTokenInfo?: IdTokenInfoType; + updatedPersonalMessage?: MessageContentType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * ID_ Token + * urn:x-oca:ocpp:uid:2:233247 + * Contains status information about an identifier. + * It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date. + * + */ +export interface IdTokenInfoType { + customData?: CustomDataType; + status: AuthorizationStatusEnumType; + /** + * ID_ Token. Expiry. Date_ Time + * urn:x-oca:ocpp:uid:1:569373 + * Date and Time after which the token must be considered invalid. + * + */ + cacheExpiryDateTime?: string; + /** + * Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in <<transactioneventresponse,TransactionEventResponse>> overrules this one. + * + */ + chargingPriority?: number; + /** + * ID_ Token. Language1. Language_ Code + * urn:x-oca:ocpp:uid:1:569374 + * Preferred user interface language of identifier user. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + * + */ + language1?: string; + /** + * Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station. + * + * + */ + evseId?: number[]; + groupIdToken?: IdTokenType; + /** + * ID_ Token. Language2. Language_ Code + * urn:x-oca:ocpp:uid:1:569375 + * Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language2?: string; + personalMessage?: MessageContentType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface IdTokenType { + customData?: CustomDataType; + additionalInfo?: AdditionalInfoType[]; + /** + * IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. + * + */ + idToken: string; + type: IdTokenEnumType; +} +/** + * Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers. + * + */ +export interface AdditionalInfoType { + customData?: CustomDataType; + /** + * This field specifies the additional IdToken. + * + */ + additionalIdToken: string; + /** + * This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties. + * + */ + type: string; +} +/** + * Message_ Content + * urn:x-enexis:ecdm:uid:2:234490 + * Contains message details, for a message to be displayed on a Charging Station. + * + * + */ +export interface MessageContentType { + customData?: CustomDataType; + format: MessageFormatEnumType; + /** + * Message_ Content. Language. Language_ Code + * urn:x-enexis:ecdm:uid:1:570849 + * Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>. + * + */ + language?: string; + /** + * Message_ Content. Content. Message + * urn:x-enexis:ecdm:uid:1:570852 + * Message contents. + * + * + */ + content: string; +} diff --git a/lib/types/v201/TriggerMessageRequest.d.ts b/lib/types/v201/TriggerMessageRequest.d.ts new file mode 100644 index 0000000..e9c4131 --- /dev/null +++ b/lib/types/v201/TriggerMessageRequest.d.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Type of message to be triggered. + * + */ +export type MessageTriggerEnumType = + | "BootNotification" + | "LogStatusNotification" + | "FirmwareStatusNotification" + | "Heartbeat" + | "MeterValues" + | "SignChargingStationCertificate" + | "SignV2GCertificate" + | "StatusNotification" + | "TransactionEvent" + | "SignCombinedCertificate" + | "PublishFirmwareStatusNotification"; + +export interface TriggerMessageRequest { + customData?: CustomDataType; + evse?: EVSEType; + requestedMessage: MessageTriggerEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * EVSE + * urn:x-oca:ocpp:uid:2:233123 + * Electric Vehicle Supply Equipment + * + */ +export interface EVSEType { + customData?: CustomDataType; + /** + * Identified_ Object. MRID. Numeric_ Identifier + * urn:x-enexis:ecdm:uid:1:569198 + * EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station. + * + */ + id: number; + /** + * An id to designate a specific connector (on an EVSE) by connector index number. + * + */ + connectorId?: number; +} diff --git a/lib/types/v201/TriggerMessageResponse.d.ts b/lib/types/v201/TriggerMessageResponse.d.ts new file mode 100644 index 0000000..729c67c --- /dev/null +++ b/lib/types/v201/TriggerMessageResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the Charging Station will send the requested notification or not. + * + */ +export type TriggerMessageStatusEnumType = "Accepted" | "Rejected" | "NotImplemented"; + +export interface TriggerMessageResponse { + customData?: CustomDataType; + status: TriggerMessageStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/UnlockConnectorRequest.d.ts b/lib/types/v201/UnlockConnectorRequest.d.ts new file mode 100644 index 0000000..acafa2f --- /dev/null +++ b/lib/types/v201/UnlockConnectorRequest.d.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UnlockConnectorRequest { + customData?: CustomDataType; + /** + * This contains the identifier of the EVSE for which a connector needs to be unlocked. + * + */ + evseId: number; + /** + * This contains the identifier of the connector that needs to be unlocked. + * + */ + connectorId: number; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/UnlockConnectorResponse.d.ts b/lib/types/v201/UnlockConnectorResponse.d.ts new file mode 100644 index 0000000..cc3b25c --- /dev/null +++ b/lib/types/v201/UnlockConnectorResponse.d.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This indicates whether the Charging Station has unlocked the connector. + * + */ +export type UnlockStatusEnumType = "Unlocked" | "UnlockFailed" | "OngoingAuthorizedTransaction" | "UnknownConnector"; + +export interface UnlockConnectorResponse { + customData?: CustomDataType; + status: UnlockStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/lib/types/v201/UnpublishFirmwareRequest.d.ts b/lib/types/v201/UnpublishFirmwareRequest.d.ts new file mode 100644 index 0000000..9695aca --- /dev/null +++ b/lib/types/v201/UnpublishFirmwareRequest.d.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UnpublishFirmwareRequest { + customData?: CustomDataType; + /** + * The MD5 checksum over the entire firmware file as a hexadecimal string of length 32. + * + */ + checksum: string; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/UnpublishFirmwareResponse.d.ts b/lib/types/v201/UnpublishFirmwareResponse.d.ts new file mode 100644 index 0000000..e16919a --- /dev/null +++ b/lib/types/v201/UnpublishFirmwareResponse.d.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * Indicates whether the Local Controller succeeded in unpublishing the firmware. + * + */ +export type UnpublishFirmwareStatusEnumType = "DownloadOngoing" | "NoFirmware" | "Unpublished"; + +export interface UnpublishFirmwareResponse { + customData?: CustomDataType; + status: UnpublishFirmwareStatusEnumType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} diff --git a/lib/types/v201/UpdateFirmwareRequest.d.ts b/lib/types/v201/UpdateFirmwareRequest.d.ts new file mode 100644 index 0000000..e2d97af --- /dev/null +++ b/lib/types/v201/UpdateFirmwareRequest.d.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export interface UpdateFirmwareRequest { + customData?: CustomDataType; + /** + * This specifies how many times Charging Station must try to download the firmware before giving up. If this field is not present, it is left to Charging Station to decide how many times it wants to retry. + * + */ + retries?: number; + /** + * The interval in seconds after which a retry may be attempted. If this field is not present, it is left to Charging Station to decide how long to wait between attempts. + * + */ + retryInterval?: number; + /** + * The Id of this request + * + */ + requestId: number; + firmware: FirmwareType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Firmware + * urn:x-enexis:ecdm:uid:2:233291 + * Represents a copy of the firmware that can be loaded/updated on the Charging Station. + * + */ +export interface FirmwareType { + customData?: CustomDataType; + /** + * Firmware. Location. URI + * urn:x-enexis:ecdm:uid:1:569460 + * URI defining the origin of the firmware. + * + */ + location: string; + /** + * Firmware. Retrieve. Date_ Time + * urn:x-enexis:ecdm:uid:1:569461 + * Date and time at which the firmware shall be retrieved. + * + */ + retrieveDateTime: string; + /** + * Firmware. Install. Date_ Time + * urn:x-enexis:ecdm:uid:1:569462 + * Date and time at which the firmware shall be installed. + * + */ + installDateTime?: string; + /** + * Certificate with which the firmware was signed. + * PEM encoded X.509 certificate. + * + */ + signingCertificate?: string; + /** + * Firmware. Signature. Signature + * urn:x-enexis:ecdm:uid:1:569464 + * Base64 encoded firmware signature. + * + */ + signature?: string; +} diff --git a/lib/types/v201/UpdateFirmwareResponse.d.ts b/lib/types/v201/UpdateFirmwareResponse.d.ts new file mode 100644 index 0000000..e73ffcb --- /dev/null +++ b/lib/types/v201/UpdateFirmwareResponse.d.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +/** + * This field indicates whether the Charging Station was able to accept the request. + * + * + */ +export type UpdateFirmwareStatusEnumType = + | "Accepted" + | "Rejected" + | "AcceptedCanceled" + | "InvalidCertificate" + | "RevokedCertificate"; + +export interface UpdateFirmwareResponse { + customData?: CustomDataType; + status: UpdateFirmwareStatusEnumType; + statusInfo?: StatusInfoType; +} +/** + * This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data. + */ +export interface CustomDataType { + vendorId: string; + [k: string]: unknown; +} +/** + * Element providing more information about the status. + * + */ +export interface StatusInfoType { + customData?: CustomDataType; + /** + * A predefined code for the reason why the status is returned in this response. The string is case-insensitive. + * + */ + reasonCode: string; + /** + * Additional text to provide detailed information. + * + */ + additionalInfo?: string; +} diff --git a/package-lock.json b/package-lock.json index b13e938..096eda4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "ws": "^8.5.0" }, "devDependencies": { + "json-schema-to-typescript": "^10.1.5", "mocha": "^10.0.0", "nyc": "^15.1.0" }, @@ -35,6 +36,18 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -547,6 +560,52 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/lodash": { + "version": "4.14.182", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz", + "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "17.0.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.40.tgz", + "integrity": "sha512-UXdBxNGqTMtm7hCwh9HtncFVLrXoqA3oJW30j6XWp5BH/wu3mVeaxo7cq5benFdBw34HB3XDT2TRPI7rXZ+mDg==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", + "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", + "dev": true + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -630,6 +689,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "node_modules/anymatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", @@ -765,6 +830,12 @@ "node": ">=8" } }, + "node_modules/call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==", + "dev": true + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -854,6 +925,22 @@ "node": ">=6" } }, + "node_modules/cli-color": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.2.tgz", + "integrity": "sha512-g4JYjrTW9MGtCziFNjkqp3IMpGhnJyeB0lOtRPjQkYhXzKYr6tYnXKyEVnMzITxhpbahsEW9KsxOYIDKwcsIBw==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.59", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -918,6 +1005,16 @@ "node": ">= 8" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -983,12 +1080,60 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/es5-ext": { + "version": "0.10.61", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz", + "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1023,6 +1168,31 @@ "node": ">=4" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/ext": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", + "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", + "dev": true, + "dependencies": { + "type": "^2.5.0" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==", + "dev": true + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1162,6 +1332,18 @@ "node": ">=8.0.0" } }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -1194,6 +1376,21 @@ "node": ">= 6" } }, + "node_modules/glob-promise": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-3.4.0.tgz", + "integrity": "sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==", + "dev": true, + "dependencies": { + "@types/glob": "*" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "glob": "*" + } + }, "node_modules/glob/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1355,6 +1552,12 @@ "node": ">=8" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -1537,11 +1740,58 @@ "node": ">=4" } }, + "node_modules/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "9.0.9" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/json-schema-to-typescript": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz", + "integrity": "sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.6", + "@types/lodash": "^4.14.168", + "@types/prettier": "^2.1.5", + "cli-color": "^2.0.0", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^3.4.0", + "is-glob": "^4.0.1", + "json-schema-ref-parser": "^9.0.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.20", + "minimist": "^1.2.5", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.2.0" + }, + "bin": { + "json2ts": "dist/src/cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "node_modules/json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -1569,6 +1819,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -1591,6 +1847,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -1606,6 +1871,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -1627,6 +1908,24 @@ "balanced-match": "^1.0.0" } }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", @@ -1674,6 +1973,17 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", @@ -1686,6 +1996,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -1872,6 +2188,15 @@ "node": ">=6" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2064,6 +2389,21 @@ "node": ">= 0.6" } }, + "node_modules/prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -2341,6 +2681,37 @@ "node": "*" } }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -2362,6 +2733,12 @@ "node": ">=8.0" } }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -2579,6 +2956,18 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, + "@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "dev": true, + "requires": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -2976,6 +3365,52 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true + }, + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/lodash": { + "version": "4.14.182", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz", + "integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "@types/node": { + "version": "17.0.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.40.tgz", + "integrity": "sha512-UXdBxNGqTMtm7hCwh9HtncFVLrXoqA3oJW30j6XWp5BH/wu3mVeaxo7cq5benFdBw34HB3XDT2TRPI7rXZ+mDg==", + "dev": true + }, + "@types/prettier": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.6.3.tgz", + "integrity": "sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==", + "dev": true + }, "@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -3032,6 +3467,12 @@ "color-convert": "^2.0.1" } }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, "anymatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", @@ -3133,6 +3574,12 @@ "write-file-atomic": "^3.0.0" } }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw==", + "dev": true + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -3188,6 +3635,19 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-color": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.2.tgz", + "integrity": "sha512-g4JYjrTW9MGtCziFNjkqp3IMpGhnJyeB0lOtRPjQkYhXzKYr6tYnXKyEVnMzITxhpbahsEW9KsxOYIDKwcsIBw==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.59", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -3246,6 +3706,16 @@ "which": "^2.0.1" } }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3296,12 +3766,56 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "es5-ext": { + "version": "0.10.61", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz", + "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3320,6 +3834,33 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "ext": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", + "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", + "dev": true, + "requires": { + "type": "^2.5.0" + }, + "dependencies": { + "type": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==", + "dev": true + } + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3408,6 +3949,12 @@ "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -3442,6 +3989,15 @@ "is-glob": "^4.0.1" } }, + "glob-promise": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-3.4.0.tgz", + "integrity": "sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw==", + "dev": true, + "requires": { + "@types/glob": "*" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -3552,6 +4108,12 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3688,11 +4250,49 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==", + "dev": true, + "requires": { + "@apidevtools/json-schema-ref-parser": "9.0.9" + } + }, + "json-schema-to-typescript": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz", + "integrity": "sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "@types/lodash": "^4.14.168", + "@types/prettier": "^2.1.5", + "cli-color": "^2.0.0", + "get-stdin": "^8.0.0", + "glob": "^7.1.6", + "glob-promise": "^3.4.0", + "is-glob": "^4.0.1", + "json-schema-ref-parser": "^9.0.6", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.20", + "minimist": "^1.2.5", + "mkdirp": "^1.0.4", + "mz": "^2.7.0", + "prettier": "^2.2.0" + } + }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, "json5": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", @@ -3708,6 +4308,12 @@ "p-locate": "^5.0.0" } }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -3724,6 +4330,15 @@ "is-unicode-supported": "^0.1.0" } }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -3733,6 +4348,22 @@ "semver": "^6.0.0" } }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -3753,6 +4384,18 @@ } } }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, "mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", @@ -3789,12 +4432,29 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "nanoid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -3947,6 +4607,12 @@ } } }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4084,6 +4750,12 @@ "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" }, + "prettier": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", + "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "dev": true + }, "process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -4294,6 +4966,34 @@ } } }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -4309,6 +5009,12 @@ "is-number": "^7.0.0" } }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", diff --git a/package.json b/package.json index 50735bc..1ec6ee9 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.5.1", "description": "A client & server implementation of the WAMP-like RPC-over-websocket system defined in the OCPP protcols (e.g. OCPP1.6-J and OCPP2.0.1).", "main": "index.js", + "types": "index.d.ts", "scripts": { "test": "mocha", "coverage": "nyc --reporter=lcov --reporter=text mocha" @@ -43,6 +44,7 @@ "ws": "^8.5.0" }, "devDependencies": { + "json-schema-to-typescript": "^10.1.5", "mocha": "^10.0.0", "nyc": "^15.1.0" }