UNPKG

@citrineos/base

Version:

The base module for OCPP v2.0.1 including all interfaces. This module is not intended to be used directly, but rather as a dependency for other modules.

549 lines (548 loc) 26.5 kB
import { z } from 'zod'; export declare const StopTransactionSchema: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodNumber>; tenant: z.ZodOptional<z.ZodObject<{ id: z.ZodOptional<z.ZodNumber>; name: z.ZodString; url: z.ZodOptional<z.ZodNullable<z.ZodString>>; countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>; partyId: z.ZodOptional<z.ZodNullable<z.ZodString>>; serverProfileOCPI: z.ZodOptional<z.ZodNullable<z.ZodObject<{ credentialsRole: z.ZodObject<{ role: z.ZodEnum<{ CPO: "CPO"; EMSP: "EMSP"; HUB: "HUB"; NAP: "NAP"; NSP: "NSP"; SCSP: "SCSP"; }>; businessDetails: z.ZodObject<{ name: z.ZodString; website: z.ZodOptional<z.ZodString>; logo: z.ZodOptional<z.ZodObject<{ url: z.ZodString; type: z.ZodString; category: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; versionDetails: z.ZodArray<z.ZodObject<{ version: z.ZodEnum<{ "2.2.1": "2.2.1"; }>; versionDetailsUrl: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; versionEndpoints: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ identifier: z.ZodString; url: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>>; isUserTenant: z.ZodDefault<z.ZodBoolean>; maxChargingStations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; }, z.core.$strip>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; id: z.ZodOptional<z.ZodNumber>; ocppConnectionName: z.ZodString; transactionDatabaseId: z.ZodNumber; meterStop: z.ZodNumber; timestamp: z.ZodISODateTime; reason: z.ZodOptional<z.ZodString>; meterValues: z.ZodOptional<z.ZodArray<z.ZodObject<{ tenantId: z.ZodOptional<z.ZodNumber>; tenant: z.ZodOptional<z.ZodObject<{ id: z.ZodOptional<z.ZodNumber>; name: z.ZodString; url: z.ZodOptional<z.ZodNullable<z.ZodString>>; countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>; partyId: z.ZodOptional<z.ZodNullable<z.ZodString>>; serverProfileOCPI: z.ZodOptional<z.ZodNullable<z.ZodObject<{ credentialsRole: z.ZodObject<{ role: z.ZodEnum<{ CPO: "CPO"; EMSP: "EMSP"; HUB: "HUB"; NAP: "NAP"; NSP: "NSP"; SCSP: "SCSP"; }>; businessDetails: z.ZodObject<{ name: z.ZodString; website: z.ZodOptional<z.ZodString>; logo: z.ZodOptional<z.ZodObject<{ url: z.ZodString; type: z.ZodString; category: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; versionDetails: z.ZodArray<z.ZodObject<{ version: z.ZodEnum<{ "2.2.1": "2.2.1"; }>; versionDetailsUrl: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; versionEndpoints: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ identifier: z.ZodString; url: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>>; isUserTenant: z.ZodDefault<z.ZodBoolean>; maxChargingStations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; }, z.core.$strip>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; id: z.ZodOptional<z.ZodNumber>; transactionEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; transactionDatabaseId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; sampledValue: z.ZodTuple<[z.ZodObject<{ value: z.ZodNumber; context: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Other: "Other"; "Interruption.Begin": "Interruption.Begin"; "Interruption.End": "Interruption.End"; "Sample.Clock": "Sample.Clock"; "Sample.Periodic": "Sample.Periodic"; "Transaction.Begin": "Transaction.Begin"; "Transaction.End": "Transaction.End"; Trigger: "Trigger"; }>>>; measurand: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ "Current.Export": "Current.Export"; "Current.Import": "Current.Import"; "Current.Offered": "Current.Offered"; "Energy.Active.Export.Register": "Energy.Active.Export.Register"; "Energy.Active.Import.Register": "Energy.Active.Import.Register"; "Energy.Reactive.Export.Register": "Energy.Reactive.Export.Register"; "Energy.Reactive.Import.Register": "Energy.Reactive.Import.Register"; "Energy.Active.Export.Interval": "Energy.Active.Export.Interval"; "Energy.Active.Import.Interval": "Energy.Active.Import.Interval"; "Energy.Active.Net": "Energy.Active.Net"; "Energy.Reactive.Export.Interval": "Energy.Reactive.Export.Interval"; "Energy.Reactive.Import.Interval": "Energy.Reactive.Import.Interval"; "Energy.Reactive.Net": "Energy.Reactive.Net"; "Energy.Apparent.Net": "Energy.Apparent.Net"; "Energy.Apparent.Import": "Energy.Apparent.Import"; "Energy.Apparent.Export": "Energy.Apparent.Export"; Frequency: "Frequency"; "Power.Active.Export": "Power.Active.Export"; "Power.Active.Import": "Power.Active.Import"; "Power.Factor": "Power.Factor"; "Power.Offered": "Power.Offered"; "Power.Reactive.Export": "Power.Reactive.Export"; "Power.Reactive.Import": "Power.Reactive.Import"; RPM: "RPM"; SoC: "SoC"; Temperature: "Temperature"; Voltage: "Voltage"; }>>>; phase: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ L1: "L1"; L2: "L2"; L3: "L3"; N: "N"; "L1-N": "L1-N"; "L2-N": "L2-N"; "L3-N": "L3-N"; "L1-L2": "L1-L2"; "L2-L3": "L2-L3"; "L3-L1": "L3-L1"; }>>>; location: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Cable: "Cable"; Body: "Body"; EV: "EV"; Inlet: "Inlet"; Outlet: "Outlet"; }>>>; signedMeterValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{ signedMeterData: z.ZodString; signingMethod: z.ZodString; encodingMethod: z.ZodString; publicKey: z.ZodString; }, z.core.$strip>>>; unitOfMeasure: z.ZodOptional<z.ZodNullable<z.ZodObject<{ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>; multiplier: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, z.core.$strip>>>; }, z.core.$strip>], z.ZodObject<{ value: z.ZodNumber; context: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Other: "Other"; "Interruption.Begin": "Interruption.Begin"; "Interruption.End": "Interruption.End"; "Sample.Clock": "Sample.Clock"; "Sample.Periodic": "Sample.Periodic"; "Transaction.Begin": "Transaction.Begin"; "Transaction.End": "Transaction.End"; Trigger: "Trigger"; }>>>; measurand: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ "Current.Export": "Current.Export"; "Current.Import": "Current.Import"; "Current.Offered": "Current.Offered"; "Energy.Active.Export.Register": "Energy.Active.Export.Register"; "Energy.Active.Import.Register": "Energy.Active.Import.Register"; "Energy.Reactive.Export.Register": "Energy.Reactive.Export.Register"; "Energy.Reactive.Import.Register": "Energy.Reactive.Import.Register"; "Energy.Active.Export.Interval": "Energy.Active.Export.Interval"; "Energy.Active.Import.Interval": "Energy.Active.Import.Interval"; "Energy.Active.Net": "Energy.Active.Net"; "Energy.Reactive.Export.Interval": "Energy.Reactive.Export.Interval"; "Energy.Reactive.Import.Interval": "Energy.Reactive.Import.Interval"; "Energy.Reactive.Net": "Energy.Reactive.Net"; "Energy.Apparent.Net": "Energy.Apparent.Net"; "Energy.Apparent.Import": "Energy.Apparent.Import"; "Energy.Apparent.Export": "Energy.Apparent.Export"; Frequency: "Frequency"; "Power.Active.Export": "Power.Active.Export"; "Power.Active.Import": "Power.Active.Import"; "Power.Factor": "Power.Factor"; "Power.Offered": "Power.Offered"; "Power.Reactive.Export": "Power.Reactive.Export"; "Power.Reactive.Import": "Power.Reactive.Import"; RPM: "RPM"; SoC: "SoC"; Temperature: "Temperature"; Voltage: "Voltage"; }>>>; phase: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ L1: "L1"; L2: "L2"; L3: "L3"; N: "N"; "L1-N": "L1-N"; "L2-N": "L2-N"; "L3-N": "L3-N"; "L1-L2": "L1-L2"; "L2-L3": "L2-L3"; "L3-L1": "L3-L1"; }>>>; location: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Cable: "Cable"; Body: "Body"; EV: "EV"; Inlet: "Inlet"; Outlet: "Outlet"; }>>>; signedMeterValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{ signedMeterData: z.ZodString; signingMethod: z.ZodString; encodingMethod: z.ZodString; publicKey: z.ZodString; }, z.core.$strip>>>; unitOfMeasure: z.ZodOptional<z.ZodNullable<z.ZodObject<{ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>; multiplier: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, z.core.$strip>>>; }, z.core.$strip>>; timestamp: z.ZodISODateTime; connectorId: z.ZodOptional<z.ZodNumber>; tariffId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strip>>>; idTokenValue: z.ZodOptional<z.ZodString>; idTokenType: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export declare const StopTransactionProps: { id: "id"; ocppConnectionName: "ocppConnectionName"; tenant: "tenant"; timestamp: "timestamp"; meterStop: "meterStop"; reason: "reason"; tenantId: "tenantId"; updatedAt: "updatedAt"; createdAt: "createdAt"; idTokenType: "idTokenType"; transactionDatabaseId: "transactionDatabaseId"; meterValues: "meterValues"; idTokenValue: "idTokenValue"; }; export type StopTransactionDto = z.infer<typeof StopTransactionSchema>; export declare const StopTransactionCreateSchema: z.ZodObject<{ ocppConnectionName: z.ZodString; timestamp: z.ZodISODateTime; meterStop: z.ZodNumber; reason: z.ZodOptional<z.ZodString>; tenantId: z.ZodOptional<z.ZodNumber>; idTokenType: z.ZodOptional<z.ZodString>; transactionDatabaseId: z.ZodNumber; idTokenValue: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export type StopTransactionCreate = z.infer<typeof StopTransactionCreateSchema>; export declare const stopTransactionSchemas: { StopTransaction: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodNumber>; tenant: z.ZodOptional<z.ZodObject<{ id: z.ZodOptional<z.ZodNumber>; name: z.ZodString; url: z.ZodOptional<z.ZodNullable<z.ZodString>>; countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>; partyId: z.ZodOptional<z.ZodNullable<z.ZodString>>; serverProfileOCPI: z.ZodOptional<z.ZodNullable<z.ZodObject<{ credentialsRole: z.ZodObject<{ role: z.ZodEnum<{ CPO: "CPO"; EMSP: "EMSP"; HUB: "HUB"; NAP: "NAP"; NSP: "NSP"; SCSP: "SCSP"; }>; businessDetails: z.ZodObject<{ name: z.ZodString; website: z.ZodOptional<z.ZodString>; logo: z.ZodOptional<z.ZodObject<{ url: z.ZodString; type: z.ZodString; category: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; versionDetails: z.ZodArray<z.ZodObject<{ version: z.ZodEnum<{ "2.2.1": "2.2.1"; }>; versionDetailsUrl: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; versionEndpoints: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ identifier: z.ZodString; url: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>>; isUserTenant: z.ZodDefault<z.ZodBoolean>; maxChargingStations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; }, z.core.$strip>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; id: z.ZodOptional<z.ZodNumber>; ocppConnectionName: z.ZodString; transactionDatabaseId: z.ZodNumber; meterStop: z.ZodNumber; timestamp: z.ZodISODateTime; reason: z.ZodOptional<z.ZodString>; meterValues: z.ZodOptional<z.ZodArray<z.ZodObject<{ tenantId: z.ZodOptional<z.ZodNumber>; tenant: z.ZodOptional<z.ZodObject<{ id: z.ZodOptional<z.ZodNumber>; name: z.ZodString; url: z.ZodOptional<z.ZodNullable<z.ZodString>>; countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>; partyId: z.ZodOptional<z.ZodNullable<z.ZodString>>; serverProfileOCPI: z.ZodOptional<z.ZodNullable<z.ZodObject<{ credentialsRole: z.ZodObject<{ role: z.ZodEnum<{ CPO: "CPO"; EMSP: "EMSP"; HUB: "HUB"; NAP: "NAP"; NSP: "NSP"; SCSP: "SCSP"; }>; businessDetails: z.ZodObject<{ name: z.ZodString; website: z.ZodOptional<z.ZodString>; logo: z.ZodOptional<z.ZodObject<{ url: z.ZodString; type: z.ZodString; category: z.ZodString; width: z.ZodOptional<z.ZodNumber>; height: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>; }, z.core.$strip>; versionDetails: z.ZodArray<z.ZodObject<{ version: z.ZodEnum<{ "2.2.1": "2.2.1"; }>; versionDetailsUrl: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; versionEndpoints: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ identifier: z.ZodString; url: z.ZodString; }, z.core.$strip>>>; }, z.core.$strip>>>; isUserTenant: z.ZodDefault<z.ZodBoolean>; maxChargingStations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; }, z.core.$strip>>; updatedAt: z.ZodOptional<z.ZodDate>; createdAt: z.ZodOptional<z.ZodDate>; id: z.ZodOptional<z.ZodNumber>; transactionEventId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; transactionDatabaseId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; sampledValue: z.ZodTuple<[z.ZodObject<{ value: z.ZodNumber; context: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Other: "Other"; "Interruption.Begin": "Interruption.Begin"; "Interruption.End": "Interruption.End"; "Sample.Clock": "Sample.Clock"; "Sample.Periodic": "Sample.Periodic"; "Transaction.Begin": "Transaction.Begin"; "Transaction.End": "Transaction.End"; Trigger: "Trigger"; }>>>; measurand: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ "Current.Export": "Current.Export"; "Current.Import": "Current.Import"; "Current.Offered": "Current.Offered"; "Energy.Active.Export.Register": "Energy.Active.Export.Register"; "Energy.Active.Import.Register": "Energy.Active.Import.Register"; "Energy.Reactive.Export.Register": "Energy.Reactive.Export.Register"; "Energy.Reactive.Import.Register": "Energy.Reactive.Import.Register"; "Energy.Active.Export.Interval": "Energy.Active.Export.Interval"; "Energy.Active.Import.Interval": "Energy.Active.Import.Interval"; "Energy.Active.Net": "Energy.Active.Net"; "Energy.Reactive.Export.Interval": "Energy.Reactive.Export.Interval"; "Energy.Reactive.Import.Interval": "Energy.Reactive.Import.Interval"; "Energy.Reactive.Net": "Energy.Reactive.Net"; "Energy.Apparent.Net": "Energy.Apparent.Net"; "Energy.Apparent.Import": "Energy.Apparent.Import"; "Energy.Apparent.Export": "Energy.Apparent.Export"; Frequency: "Frequency"; "Power.Active.Export": "Power.Active.Export"; "Power.Active.Import": "Power.Active.Import"; "Power.Factor": "Power.Factor"; "Power.Offered": "Power.Offered"; "Power.Reactive.Export": "Power.Reactive.Export"; "Power.Reactive.Import": "Power.Reactive.Import"; RPM: "RPM"; SoC: "SoC"; Temperature: "Temperature"; Voltage: "Voltage"; }>>>; phase: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ L1: "L1"; L2: "L2"; L3: "L3"; N: "N"; "L1-N": "L1-N"; "L2-N": "L2-N"; "L3-N": "L3-N"; "L1-L2": "L1-L2"; "L2-L3": "L2-L3"; "L3-L1": "L3-L1"; }>>>; location: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Cable: "Cable"; Body: "Body"; EV: "EV"; Inlet: "Inlet"; Outlet: "Outlet"; }>>>; signedMeterValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{ signedMeterData: z.ZodString; signingMethod: z.ZodString; encodingMethod: z.ZodString; publicKey: z.ZodString; }, z.core.$strip>>>; unitOfMeasure: z.ZodOptional<z.ZodNullable<z.ZodObject<{ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>; multiplier: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, z.core.$strip>>>; }, z.core.$strip>], z.ZodObject<{ value: z.ZodNumber; context: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Other: "Other"; "Interruption.Begin": "Interruption.Begin"; "Interruption.End": "Interruption.End"; "Sample.Clock": "Sample.Clock"; "Sample.Periodic": "Sample.Periodic"; "Transaction.Begin": "Transaction.Begin"; "Transaction.End": "Transaction.End"; Trigger: "Trigger"; }>>>; measurand: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ "Current.Export": "Current.Export"; "Current.Import": "Current.Import"; "Current.Offered": "Current.Offered"; "Energy.Active.Export.Register": "Energy.Active.Export.Register"; "Energy.Active.Import.Register": "Energy.Active.Import.Register"; "Energy.Reactive.Export.Register": "Energy.Reactive.Export.Register"; "Energy.Reactive.Import.Register": "Energy.Reactive.Import.Register"; "Energy.Active.Export.Interval": "Energy.Active.Export.Interval"; "Energy.Active.Import.Interval": "Energy.Active.Import.Interval"; "Energy.Active.Net": "Energy.Active.Net"; "Energy.Reactive.Export.Interval": "Energy.Reactive.Export.Interval"; "Energy.Reactive.Import.Interval": "Energy.Reactive.Import.Interval"; "Energy.Reactive.Net": "Energy.Reactive.Net"; "Energy.Apparent.Net": "Energy.Apparent.Net"; "Energy.Apparent.Import": "Energy.Apparent.Import"; "Energy.Apparent.Export": "Energy.Apparent.Export"; Frequency: "Frequency"; "Power.Active.Export": "Power.Active.Export"; "Power.Active.Import": "Power.Active.Import"; "Power.Factor": "Power.Factor"; "Power.Offered": "Power.Offered"; "Power.Reactive.Export": "Power.Reactive.Export"; "Power.Reactive.Import": "Power.Reactive.Import"; RPM: "RPM"; SoC: "SoC"; Temperature: "Temperature"; Voltage: "Voltage"; }>>>; phase: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ L1: "L1"; L2: "L2"; L3: "L3"; N: "N"; "L1-N": "L1-N"; "L2-N": "L2-N"; "L3-N": "L3-N"; "L1-L2": "L1-L2"; "L2-L3": "L2-L3"; "L3-L1": "L3-L1"; }>>>; location: z.ZodOptional<z.ZodNullable<z.ZodEnum<{ Cable: "Cable"; Body: "Body"; EV: "EV"; Inlet: "Inlet"; Outlet: "Outlet"; }>>>; signedMeterValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{ signedMeterData: z.ZodString; signingMethod: z.ZodString; encodingMethod: z.ZodString; publicKey: z.ZodString; }, z.core.$strip>>>; unitOfMeasure: z.ZodOptional<z.ZodNullable<z.ZodObject<{ unit: z.ZodOptional<z.ZodNullable<z.ZodString>>; multiplier: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; }, z.core.$strip>>>; }, z.core.$strip>>; timestamp: z.ZodISODateTime; connectorId: z.ZodOptional<z.ZodNumber>; tariffId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strip>>>; idTokenValue: z.ZodOptional<z.ZodString>; idTokenType: z.ZodOptional<z.ZodString>; }, z.core.$strip>; StopTransactionCreate: z.ZodObject<{ ocppConnectionName: z.ZodString; timestamp: z.ZodISODateTime; meterStop: z.ZodNumber; reason: z.ZodOptional<z.ZodString>; tenantId: z.ZodOptional<z.ZodNumber>; idTokenType: z.ZodOptional<z.ZodString>; transactionDatabaseId: z.ZodNumber; idTokenValue: z.ZodOptional<z.ZodString>; }, z.core.$strip>; };