@ampeco/public-api-mcp 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -318
- package/dist/build/optimizer.d.ts.map +1 -1
- package/dist/build/optimizer.js +82 -21
- package/dist/build/optimizer.js.map +1 -1
- package/dist/build/parser.d.ts.map +1 -1
- package/dist/build/parser.js +74 -1
- package/dist/build/parser.js.map +1 -1
- package/dist/cli/index.js +25 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/generated/build-stats.json +5 -5
- package/dist/generated/endpoints.json +29214 -20896
- package/dist/generated/schemas.d.ts +7530 -2789
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +1443 -590
- package/dist/generated/schemas.js.map +1 -1
- package/dist/generated/schemas.ts +1447 -596
- package/dist/server/factory.d.ts +2 -1
- package/dist/server/factory.d.ts.map +1 -1
- package/dist/server/factory.js +17 -206
- package/dist/server/factory.js.map +1 -1
- package/dist/server/factory.test.js +62 -4
- package/dist/server/factory.test.js.map +1 -1
- package/dist/server/http.d.ts +2 -1
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +8 -2
- package/dist/server/http.js.map +1 -1
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +9 -1388
- package/dist/server/index.js.map +1 -1
- package/dist/server/instructions.d.ts +13 -0
- package/dist/server/instructions.d.ts.map +1 -0
- package/dist/server/instructions.js +146 -0
- package/dist/server/instructions.js.map +1 -0
- package/dist/server/resources/handlers.d.ts +31 -0
- package/dist/server/resources/handlers.d.ts.map +1 -0
- package/dist/server/resources/handlers.js +113 -0
- package/dist/server/resources/handlers.js.map +1 -0
- package/dist/server/resources/handlers.test.d.ts +6 -0
- package/dist/server/resources/handlers.test.d.ts.map +1 -0
- package/dist/server/resources/handlers.test.js +203 -0
- package/dist/server/resources/handlers.test.js.map +1 -0
- package/dist/server/resources/native.d.ts +11 -0
- package/dist/server/resources/native.d.ts.map +1 -0
- package/dist/server/resources/native.js +31 -0
- package/dist/server/resources/native.js.map +1 -0
- package/dist/server/resources/tools.d.ts +11 -0
- package/dist/server/resources/tools.d.ts.map +1 -0
- package/dist/server/resources/tools.js +41 -0
- package/dist/server/resources/tools.js.map +1 -0
- package/dist/server/stdio.d.ts +2 -1
- package/dist/server/stdio.d.ts.map +1 -1
- package/dist/server/stdio.js +8 -2
- package/dist/server/stdio.js.map +1 -1
- package/dist/server/types.d.ts +36 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +6 -0
- package/dist/server/types.js.map +1 -0
- package/package.json +3 -2
|
@@ -81,15 +81,46 @@ export const chargePointStartChargingSessionWithoutEvseBody = z.object({
|
|
|
81
81
|
bookingId: z.number().int().optional()
|
|
82
82
|
});
|
|
83
83
|
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/start/{evse}
|
|
84
|
+
export const chargePointStartChargingSessionBody = z.object({
|
|
85
|
+
userId: z.number().int().optional(),
|
|
86
|
+
paymentMethodId: z.string().optional(),
|
|
87
|
+
externalSessionId: z.string().optional(),
|
|
88
|
+
connectorId: z.number().int().optional(),
|
|
89
|
+
bookingId: z.number().int().optional(),
|
|
90
|
+
chargingProfile: z.object({
|
|
91
|
+
transactionId: z.number().int().optional(),
|
|
92
|
+
stackLevel: z.number().int(),
|
|
93
|
+
chargingProfilePurpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]),
|
|
94
|
+
chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]),
|
|
95
|
+
recurrencyKind: z.enum(["Daily", "Weekly"]).optional(),
|
|
96
|
+
validFrom: z.string().datetime().optional(),
|
|
97
|
+
validTo: z.string().datetime().optional(),
|
|
98
|
+
chargingSchedule: z.object({
|
|
99
|
+
id: z.number().optional(),
|
|
100
|
+
duration: z.number().int().optional(),
|
|
101
|
+
startSchedule: z.string().datetime().optional(),
|
|
102
|
+
chargingRateUnit: z.enum(["A", "W"]),
|
|
103
|
+
chargingSchedulePeriod: z.array(z.object({
|
|
104
|
+
startPeriod: z.number().int(),
|
|
105
|
+
limit: z.number(),
|
|
106
|
+
numberPhases: z.number().int().optional()
|
|
107
|
+
})),
|
|
108
|
+
minChargingRate: z.number().optional()
|
|
109
|
+
})
|
|
110
|
+
}).optional()
|
|
111
|
+
});
|
|
84
112
|
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/stop/{session}
|
|
85
113
|
export const chargePointStopChargingSessionBody = z.object({
|
|
86
114
|
force: z.boolean().optional()
|
|
87
115
|
});
|
|
88
116
|
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/sync-configuration
|
|
89
117
|
export const chargePointSyncConfigurationBody = z.object({
|
|
90
|
-
keys: z.array(z.union([z.
|
|
118
|
+
keys: z.array(z.union([z.enum(["AllowOfflineTxForUnknownId", "AuthorizationCacheEnabled", "AuthorizeRemoteTxRequests", "BlinkRepeat", "ClockAlignedDataInterval", "ConnectionTimeOut", "ConnectorPhaseRotation", "ConnectorPhaseRotationMaxLength", "GetConfigurationMaxKeys", "HeartbeatInterval", "LightIntensity", "LocalAuthorizeOffline", "LocalPreAuthorize", "MaxEnergyOnInvalidId", "MeterValuesAlignedData", "MeterValuesAlignedDataMaxLength", "MeterValuesSampledData", "MeterValuesSampledDataMaxLength", "MeterValueSampleInterval", "MinimumStatusDuration", "NumberOfConnectors", "ResetRetries", "StopTransactionOnEVSideDisconnect", "StopTransactionOnInvalidId", "StopTxnAlignedData", "StopTxnAlignedDataMaxLength", "StopTxnSampledData", "StopTxnSampledDataMaxLength", "SupportedFeatureProfiles", "SupportedFeatureProfilesMaxLength", "TransactionMessageAttempts", "TransactionMessageRetryInterval", "UnlockConnectorOnEVSideDisconnect", "WebSocketPingInterval", "LocalAuthListEnabled", "LocalAuthListMaxLength", "SendLocalListMaxLength", "ReserveConnectorZeroSupported", "ChargeProfileMaxStackLevel", "ChargingScheduleAllowedChargingRateUnit", "ChargingScheduleMaxPeriods", "ConnectorSwitch3to1PhaseSupported", "MaxChargingProfilesInstalled", "AuthorizationEnabled"]), z.string()])).optional()
|
|
91
119
|
});
|
|
92
120
|
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/trigger-message
|
|
121
|
+
export const chargePointTriggerMessageChargePointBody = z.object({
|
|
122
|
+
type: z.enum(["BootNotification", "DiagnosticsStatusNotification", "LogStatusNotification", "FirmwareStatusNotification", "PublishFirmwareStatusNotification", "Heartbeat", "MeterValues", "StatusNotification", "SignV2GCertificate", "SignChargingStationCertificate", "SignCombinedCertificate", "TransactionEvent"])
|
|
123
|
+
});
|
|
93
124
|
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/unlock/{evse}
|
|
94
125
|
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/change-sharing-code
|
|
95
126
|
export const chargePointChangeSharingCodeBody = z.object({
|
|
@@ -134,13 +165,17 @@ export const circuitAttachChargePointBody = z.object({
|
|
|
134
165
|
});
|
|
135
166
|
// POST /public-api/actions/circuit/v2.0/{circuit}/detach-charge-point/{chargePoint}
|
|
136
167
|
// POST /public-api/actions/circuit/v2.0/{circuit}/set-charge-point-priority/{chargePoint}
|
|
137
|
-
export const circuitSetChargePointPriorityBody = z.
|
|
168
|
+
export const circuitSetChargePointPriorityBody = z.object({
|
|
169
|
+
priority: z.number().min(0)
|
|
170
|
+
});
|
|
138
171
|
// POST /public-api/actions/circuit/v2.0/{circuit}/set-charge-point-priority/{chargePoint}/evse/{evse}
|
|
139
|
-
export const circuitSetChargePointEvsePriorityBody = z.
|
|
172
|
+
export const circuitSetChargePointEvsePriorityBody = z.object({
|
|
173
|
+
priority: z.number().min(0)
|
|
174
|
+
});
|
|
140
175
|
// POST /public-api/actions/circuit/v2.0/{circuit}/set-circuit-soc-priorities
|
|
141
176
|
export const circuitSetCircuitSocPriorityBody = z.object({
|
|
142
177
|
upperThresholdPercent: z.number().min(5).max(95).optional(),
|
|
143
|
-
highSoCPriority: z.
|
|
178
|
+
highSoCPriority: z.number().min(0).optional(),
|
|
144
179
|
lowerThresholdPercent: z.number().min(5).max(95).optional(),
|
|
145
180
|
lowSoCPriority: z.number().min(0).optional()
|
|
146
181
|
});
|
|
@@ -154,10 +189,23 @@ export const configurationTemplateApplyToChargePointsBody = z.object({
|
|
|
154
189
|
shouldPersist: z.boolean().optional()
|
|
155
190
|
});
|
|
156
191
|
// POST /public-api/actions/configuration-template/v1.0/{template}/insert-bulk-variables
|
|
157
|
-
export const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
192
|
+
export const configurationTemplateBulkCreateVariablesBody = z.array(z.union([z.object({
|
|
193
|
+
id: z.number().int().optional(),
|
|
194
|
+
keyName: z.string(),
|
|
195
|
+
value: z.string(),
|
|
196
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
197
|
+
}).strict(), z.object({
|
|
198
|
+
id: z.number().int().optional(),
|
|
199
|
+
value: z.string(),
|
|
200
|
+
variableName: z.string(),
|
|
201
|
+
variableType: z.enum(["Actual", "Target", "MinSet", "MaxSet"]).optional(),
|
|
202
|
+
variableInstance: z.string().optional(),
|
|
203
|
+
component: z.string(),
|
|
204
|
+
componentInstance: z.string().optional(),
|
|
205
|
+
evseId: z.number().int().optional(),
|
|
206
|
+
connectorId: z.number().int().optional(),
|
|
207
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
208
|
+
})]));
|
|
161
209
|
// POST /public-api/actions/electricity-meter/v1.0/{electricityMeter}/report-consumption
|
|
162
210
|
export const electricityMeterReportConsumptionBody = z.object({
|
|
163
211
|
timestamp: z.string().datetime().optional(),
|
|
@@ -167,24 +215,43 @@ export const electricityMeterReportConsumptionBody = z.object({
|
|
|
167
215
|
});
|
|
168
216
|
// POST /public-api/actions/evse/v1.0/{evse}/start
|
|
169
217
|
export const evseStartChargingWithEvseIdBody = z.object({
|
|
170
|
-
|
|
218
|
+
userId: z.number().int().optional(),
|
|
219
|
+
paymentMethodId: z.string().optional(),
|
|
220
|
+
externalSessionId: z.string().optional(),
|
|
221
|
+
connectorId: z.number().int().optional(),
|
|
222
|
+
bookingId: z.number().int().optional(),
|
|
223
|
+
chargingProfile: z.object({
|
|
224
|
+
transactionId: z.number().int().optional(),
|
|
225
|
+
stackLevel: z.number().int(),
|
|
226
|
+
chargingProfilePurpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]),
|
|
227
|
+
chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]),
|
|
228
|
+
recurrencyKind: z.enum(["Daily", "Weekly"]).optional(),
|
|
229
|
+
validFrom: z.string().datetime().optional(),
|
|
230
|
+
validTo: z.string().datetime().optional(),
|
|
231
|
+
chargingSchedule: z.object({
|
|
232
|
+
id: z.number().optional(),
|
|
233
|
+
duration: z.number().int().optional(),
|
|
234
|
+
startSchedule: z.string().datetime().optional(),
|
|
235
|
+
chargingRateUnit: z.enum(["A", "W"]),
|
|
236
|
+
chargingSchedulePeriod: z.array(z.object({
|
|
237
|
+
startPeriod: z.number().int(),
|
|
238
|
+
limit: z.number(),
|
|
239
|
+
numberPhases: z.number().int().optional()
|
|
240
|
+
})),
|
|
241
|
+
minChargingRate: z.number().optional()
|
|
242
|
+
})
|
|
243
|
+
}).optional()
|
|
171
244
|
});
|
|
172
245
|
// POST /public-api/actions/evse/v1.0/{evse}/trigger-message
|
|
173
246
|
export const evseTriggerMessageBody = z.object({
|
|
174
247
|
type: z.enum(["BootNotification", "DiagnosticsStatusNotification", "LogStatusNotification", "FirmwareStatusNotification", "PublishFirmwareStatusNotification", "Heartbeat", "MeterValues", "StatusNotification", "SignV2GCertificate", "SignChargingStationCertificate", "SignCombinedCertificate", "TransactionEvent"])
|
|
175
248
|
});
|
|
176
249
|
// POST /public-api/actions/flexibility-asset/v1.0/{flexibilityAsset}/change-status
|
|
177
|
-
export const changeFlexibilityAssetStatusPathParams = z.object({
|
|
178
|
-
flexibilityAsset: z.string()
|
|
179
|
-
});
|
|
180
250
|
export const changeFlexibilityAssetStatusBody = z.object({
|
|
181
251
|
status: z.enum(["enabled", "disabled"]),
|
|
182
252
|
endsAt: z.string().datetime().optional()
|
|
183
253
|
});
|
|
184
254
|
// POST /public-api/actions/flexibility-asset/v1.0/{flexibilityAsset}/create-activation-request
|
|
185
|
-
export const flexibilityAssetCreateActivationRequestPathParams = z.object({
|
|
186
|
-
flexibilityAsset: z.string()
|
|
187
|
-
});
|
|
188
255
|
export const flexibilityAssetCreateActivationRequestBody = z.object({
|
|
189
256
|
periods: z.array(z.object({
|
|
190
257
|
startTime: z.string().datetime(),
|
|
@@ -194,17 +261,6 @@ export const flexibilityAssetCreateActivationRequestBody = z.object({
|
|
|
194
261
|
})).optional()
|
|
195
262
|
});
|
|
196
263
|
// POST /public-api/actions/id-tag/v1.0/{idTag}/reissue-emaid
|
|
197
|
-
// POST /public-api/actions/installer-job/v1.0/{installerJob}/assign-charge-points
|
|
198
|
-
export const assignInstallerJobChargePointsBody = z.object({
|
|
199
|
-
chargePointIds: z.array(z.number().int()).optional(),
|
|
200
|
-
chargingZoneId: z.number().int().optional(),
|
|
201
|
-
locationId: z.number().int().optional()
|
|
202
|
-
});
|
|
203
|
-
// POST /public-api/actions/installer-job/v1.0/{installerJob}/change-status
|
|
204
|
-
export const changeInstallerJobStatusBody = z.object({
|
|
205
|
-
status: z.enum(["new", "in_progress", "completed", "failed"]),
|
|
206
|
-
outcomeDetails: z.string().optional()
|
|
207
|
-
});
|
|
208
264
|
// POST /public-api/actions/locations/v2.0/{location}/check-booking-availability
|
|
209
265
|
export const locationCheckBookingAvailabilityBody = z.object({
|
|
210
266
|
startAfter: z.string().datetime(),
|
|
@@ -212,7 +268,7 @@ export const locationCheckBookingAvailabilityBody = z.object({
|
|
|
212
268
|
});
|
|
213
269
|
// POST /public-api/actions/notifications/v1.0/{notification}/resend
|
|
214
270
|
export const notificationsResendFailedBody = z.object({
|
|
215
|
-
notifications: z.array(z.
|
|
271
|
+
notifications: z.array(z.enum(["AuthorizationNotification", "authorization.changed", "BootNotification", "ChargePointChangedNotification", "chargePoint.changed", "evse.changed", "ChargePointSyncConfigurationNotification", "CircuitConsumptionNotification", "circuit.changed", "DiagnosticsStatusNotification", "HardwareStatusNotification", "LocationChangedNotification", "NetworkStatusNotification", "SecurityEventNotification", "SessionMeterValuesNotification", "SessionStartStopNotification", "session.start.stop.notification", "SessionUpdateNotification", "UserChangedNotification", "SubOperatorChangedNotification", "TariffChangedNotification", "user.subscriptionChanged", "user.subscription.changed", "ReservationChangedNotification", "PaymentMethodChangedNotification", "PartnerInviteChangedNotification", "reservation.changed", "user.paymentMethod.changed", "userBalance.changed", "partnerInvite.changed", "roamingPlatform.changed", "parkingSpace.occupancyStatus.changed", "partner.changed", "transaction.changed", "settlementReport.created", "idTag.changed", "chargePoint.dataTransferReceived", "subscriptionPlan.changed", "user.invoiceDetails.changed", "cdr.received", "chargingProfile.applied", "installerJob.changed"])),
|
|
216
272
|
startTime: z.string().optional(),
|
|
217
273
|
endTime: z.string().optional()
|
|
218
274
|
});
|
|
@@ -245,7 +301,10 @@ export const updateCustomTariffFilterTariffBody = z.object({
|
|
|
245
301
|
excl_vat: z.number().min(0).optional(),
|
|
246
302
|
incl_vat: z.number().min(0).optional()
|
|
247
303
|
}).optional(),
|
|
248
|
-
max_price: z.
|
|
304
|
+
max_price: z.object({
|
|
305
|
+
excl_vat: z.number().min(0).optional(),
|
|
306
|
+
incl_vat: z.number().min(0).optional()
|
|
307
|
+
}).optional(),
|
|
249
308
|
elements: z.array(z.object({
|
|
250
309
|
price_components: z.array(z.object({
|
|
251
310
|
type: z.enum(["ENERGY", "FLAT", "PARKING_TIME", "TIME"]),
|
|
@@ -374,7 +433,7 @@ export const notificationsSubscribeDeprecatedBody = z.object({
|
|
|
374
433
|
// GET /public-api/notifications/v1.0/{notification}
|
|
375
434
|
// PUT /public-api/notifications/v1.0/{notification}
|
|
376
435
|
export const notificationsUpdateDeprecatedBody = z.object({
|
|
377
|
-
notifications: z.array(z.
|
|
436
|
+
notifications: z.array(z.enum(["AuthorizationNotification", "authorization.changed", "BootNotification", "ChargePointChangedNotification", "chargePoint.changed", "evse.changed", "ChargePointSyncConfigurationNotification", "CircuitConsumptionNotification", "circuit.changed", "DiagnosticsStatusNotification", "HardwareStatusNotification", "LocationChangedNotification", "NetworkStatusNotification", "SecurityEventNotification", "SessionMeterValuesNotification", "SessionStartStopNotification", "session.start.stop.notification", "SessionUpdateNotification", "UserChangedNotification", "SubOperatorChangedNotification", "TariffChangedNotification", "user.subscriptionChanged", "user.subscription.changed", "ReservationChangedNotification", "PaymentMethodChangedNotification", "PartnerInviteChangedNotification", "reservation.changed", "user.paymentMethod.changed", "userBalance.changed", "partnerInvite.changed", "roamingPlatform.changed", "parkingSpace.occupancyStatus.changed", "partner.changed", "transaction.changed", "settlementReport.created", "idTag.changed", "chargePoint.dataTransferReceived", "subscriptionPlan.changed", "user.invoiceDetails.changed", "cdr.received", "chargingProfile.applied", "installerJob.changed"])),
|
|
378
437
|
callbackUrl: z.string().url().max(500)
|
|
379
438
|
});
|
|
380
439
|
// DELETE /public-api/notifications/v1.0/{notification}
|
|
@@ -383,7 +442,7 @@ export const notificationsUpdateDeprecatedBody = z.object({
|
|
|
383
442
|
export const notificationsSubscribeBody = z.object({
|
|
384
443
|
id: z.number(),
|
|
385
444
|
via: z.enum(["webhook", "kafka"]),
|
|
386
|
-
notifications: z.array(z.
|
|
445
|
+
notifications: z.array(z.enum(["AuthorizationNotification", "authorization.changed", "BootNotification", "ChargePointChangedNotification", "chargePoint.changed", "evse.changed", "ChargePointSyncConfigurationNotification", "CircuitConsumptionNotification", "circuit.changed", "DiagnosticsStatusNotification", "HardwareStatusNotification", "LocationChangedNotification", "NetworkStatusNotification", "SecurityEventNotification", "SessionMeterValuesNotification", "SessionStartStopNotification", "session.start.stop.notification", "SessionUpdateNotification", "UserChangedNotification", "SubOperatorChangedNotification", "TariffChangedNotification", "user.subscriptionChanged", "user.subscription.changed", "ReservationChangedNotification", "PaymentMethodChangedNotification", "PartnerInviteChangedNotification", "reservation.changed", "user.paymentMethod.changed", "userBalance.changed", "partnerInvite.changed", "roamingPlatform.changed", "parkingSpace.occupancyStatus.changed", "partner.changed", "transaction.changed", "settlementReport.created", "idTag.changed", "chargePoint.dataTransferReceived", "subscriptionPlan.changed", "user.invoiceDetails.changed", "cdr.received", "chargingProfile.applied", "installerJob.changed"])),
|
|
387
446
|
webhook: z.object({
|
|
388
447
|
callbackUrl: z.string().url().max(500)
|
|
389
448
|
}).optional(),
|
|
@@ -399,17 +458,27 @@ export const notificationsSubscribeBody = z.object({
|
|
|
399
458
|
});
|
|
400
459
|
// GET /public-api/notifications/v2.0/{notification}
|
|
401
460
|
// PUT /public-api/notifications/v2.0/{notification}
|
|
402
|
-
export const notificationsCreateBody = z.
|
|
461
|
+
export const notificationsCreateBody = z.object({
|
|
462
|
+
id: z.number(),
|
|
463
|
+
via: z.enum(["webhook", "kafka"]),
|
|
464
|
+
notifications: z.array(z.enum(["AuthorizationNotification", "authorization.changed", "BootNotification", "ChargePointChangedNotification", "chargePoint.changed", "evse.changed", "ChargePointSyncConfigurationNotification", "CircuitConsumptionNotification", "circuit.changed", "DiagnosticsStatusNotification", "HardwareStatusNotification", "LocationChangedNotification", "NetworkStatusNotification", "SecurityEventNotification", "SessionMeterValuesNotification", "SessionStartStopNotification", "session.start.stop.notification", "SessionUpdateNotification", "UserChangedNotification", "SubOperatorChangedNotification", "TariffChangedNotification", "user.subscriptionChanged", "user.subscription.changed", "ReservationChangedNotification", "PaymentMethodChangedNotification", "PartnerInviteChangedNotification", "reservation.changed", "user.paymentMethod.changed", "userBalance.changed", "partnerInvite.changed", "roamingPlatform.changed", "parkingSpace.occupancyStatus.changed", "partner.changed", "transaction.changed", "settlementReport.created", "idTag.changed", "chargePoint.dataTransferReceived", "subscriptionPlan.changed", "user.invoiceDetails.changed", "cdr.received", "chargingProfile.applied", "installerJob.changed"])),
|
|
465
|
+
webhook: z.object({
|
|
466
|
+
callbackUrl: z.string().url().max(500)
|
|
467
|
+
}).optional(),
|
|
468
|
+
kafka: z.object({
|
|
469
|
+
topic: z.string(),
|
|
470
|
+
brokers: z.array(z.string()),
|
|
471
|
+
compressionCodec: z.enum(["none", "gzip", "snappy", "lz4"]).optional(),
|
|
472
|
+
securityProtocol: z.enum(["PLAINTEXT", "SASL_SSL"]).optional(),
|
|
473
|
+
saslMechanism: z.enum(["PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512"]).optional(),
|
|
474
|
+
saslUsername: z.string().optional(),
|
|
475
|
+
saslPassword: z.string().optional()
|
|
476
|
+
}).optional()
|
|
477
|
+
});
|
|
403
478
|
// DELETE /public-api/notifications/v2.0/{notification}
|
|
404
479
|
// GET /public-api/resources/authorizations/v1.0/{authorization}
|
|
405
|
-
export const authorizationReadDeprecatedPathParams = z.object({
|
|
406
|
-
authorization: z.string()
|
|
407
|
-
});
|
|
408
480
|
// GET /public-api/resources/authorizations/v2.0
|
|
409
481
|
// GET /public-api/resources/authorizations/v2.0/{authorization}
|
|
410
|
-
export const authorizationReadPathParams = z.object({
|
|
411
|
-
authorization: z.string()
|
|
412
|
-
});
|
|
413
482
|
// GET /public-api/resources/booking-requests/v1.0
|
|
414
483
|
// POST /public-api/resources/booking-requests/v1.0
|
|
415
484
|
export const bookingRequestCreateBody = z.union([z.object({
|
|
@@ -423,72 +492,105 @@ export const bookingRequestCreateBody = z.union([z.object({
|
|
|
423
492
|
locationId: z.number().int(),
|
|
424
493
|
evseId: z.number().int().optional(),
|
|
425
494
|
evseCriteria: z.object({
|
|
426
|
-
currentType: z.
|
|
495
|
+
currentType: z.enum(["ac", "dc"]).optional(),
|
|
427
496
|
minPower: z.number().optional(),
|
|
428
497
|
maxPower: z.number().optional(),
|
|
429
|
-
connectorType: z.
|
|
498
|
+
connectorType: z.enum(["type1", "type2", "type3", "chademo", "ccs1", "ccs2", "schuko", "nacs", "cee16", "cee32", "j1772", "inductive", "nema-5-20", "type-e-french", "type-g-british", "type-j-swiss", "avcon", "gb-t-ac", "gb-t-dc", "chaoji", "nema-6-30", "nema-6-50"]).optional()
|
|
430
499
|
}).optional(),
|
|
431
500
|
startAt: z.string().datetime(),
|
|
432
501
|
endAt: z.string().datetime()
|
|
433
502
|
}), z.object({
|
|
503
|
+
id: z.number().int().optional(),
|
|
434
504
|
type: z.enum(["update"]),
|
|
505
|
+
status: z.enum(["pending", "approved", "rejected"]).optional(),
|
|
506
|
+
rejectionReason: z.string().optional(),
|
|
507
|
+
createdAt: z.string().datetime().optional(),
|
|
508
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
435
509
|
bookingId: z.number().int(),
|
|
436
510
|
userId: z.number().int().optional(),
|
|
437
511
|
startAt: z.string().datetime().optional(),
|
|
438
512
|
endAt: z.string().datetime().optional()
|
|
439
513
|
}), z.object({
|
|
514
|
+
id: z.number().int().optional(),
|
|
440
515
|
type: z.enum(["cancel"]),
|
|
516
|
+
status: z.enum(["pending", "approved", "rejected"]).optional(),
|
|
517
|
+
rejectionReason: z.string().optional(),
|
|
518
|
+
createdAt: z.string().datetime().optional(),
|
|
519
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
441
520
|
bookingId: z.number().int()
|
|
442
521
|
})]);
|
|
443
522
|
// GET /public-api/resources/booking-requests/v1.0/{bookingRequest}
|
|
444
523
|
// GET /public-api/resources/bookings/v1.0
|
|
445
524
|
// GET /public-api/resources/bookings/v1.0/{booking}
|
|
446
525
|
// GET /public-api/resources/cdrs/v2.0
|
|
447
|
-
export const cdrsListingQueryParams = z.object({
|
|
448
|
-
per_page: z.number().int().min(1).max(100).optional(),
|
|
449
|
-
cursor: z.string().optional(),
|
|
450
|
-
include: z.array(z.enum(["externalAppData"])).optional()
|
|
451
|
-
});
|
|
452
526
|
// GET /public-api/resources/cdrs/v2.0/{cdr}
|
|
453
|
-
export const cdrReadPathParams = z.object({
|
|
454
|
-
cdr: z.number().int()
|
|
455
|
-
});
|
|
456
527
|
// GET /public-api/resources/charge-point-downtime-periods/v1.0
|
|
457
|
-
export const chargePointDowntimePeriodsListingQueryParams = z.object({
|
|
458
|
-
filter: z.object({
|
|
459
|
-
chargePointId: z.number().int().optional(),
|
|
460
|
-
$ref: z.unknown().optional()
|
|
461
|
-
}).optional()
|
|
462
|
-
});
|
|
463
528
|
// POST /public-api/resources/charge-point-downtime-periods/v1.0
|
|
464
529
|
export const chargePointDowntimePeriodCreateBody = z.object({
|
|
465
|
-
|
|
466
|
-
|
|
530
|
+
evseId: z.number().int().optional(),
|
|
531
|
+
noticeId: z.number().int(),
|
|
532
|
+
startedAt: z.string().datetime(),
|
|
533
|
+
endedAt: z.string().datetime()
|
|
467
534
|
});
|
|
468
535
|
// GET /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
|
|
469
536
|
// DELETE /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
|
|
470
537
|
// PATCH /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
|
|
471
|
-
export const chargePointDowntimePeriodUpdateBody = z.
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
538
|
+
export const chargePointDowntimePeriodUpdateBody = z.object({
|
|
539
|
+
noticeId: z.number().int().optional(),
|
|
540
|
+
startedAt: z.string().datetime().optional(),
|
|
541
|
+
endedAt: z.string().datetime().optional()
|
|
475
542
|
});
|
|
543
|
+
// GET /public-api/resources/charge-point-models/v1.0
|
|
476
544
|
// POST /public-api/resources/charge-point-models/v1.0
|
|
477
|
-
export const chargePointModelCreateBody = z.
|
|
545
|
+
export const chargePointModelCreateBody = z.object({
|
|
546
|
+
name: z.string(),
|
|
547
|
+
vendorId: z.number().int(),
|
|
548
|
+
userManual: z.string().url().optional(),
|
|
549
|
+
installerManual: z.string().url().optional()
|
|
550
|
+
});
|
|
478
551
|
// GET /public-api/resources/charge-point-models/v1.0/{modelId}
|
|
479
552
|
// DELETE /public-api/resources/charge-point-models/v1.0/{modelId}
|
|
480
553
|
// PATCH /public-api/resources/charge-point-models/v1.0/{modelId}
|
|
481
|
-
export const chargePointModelUpdateBody = z.
|
|
554
|
+
export const chargePointModelUpdateBody = z.object({
|
|
555
|
+
name: z.string().optional(),
|
|
556
|
+
vendorId: z.number().int().optional(),
|
|
557
|
+
userManual: z.string().url().optional(),
|
|
558
|
+
installerManual: z.string().url().optional()
|
|
559
|
+
});
|
|
482
560
|
// GET /public-api/resources/charge-point-vendors/v1.0
|
|
483
561
|
// POST /public-api/resources/charge-point-vendors/v1.0
|
|
484
|
-
export const chargePointVendorCreateBody = z.
|
|
562
|
+
export const chargePointVendorCreateBody = z.object({
|
|
563
|
+
id: z.number().int(),
|
|
564
|
+
name: z.string()
|
|
565
|
+
});
|
|
485
566
|
// GET /public-api/resources/charge-point-vendors/v1.0/{vendorId}
|
|
486
567
|
// DELETE /public-api/resources/charge-point-vendors/v1.0/{vendorId}
|
|
487
568
|
// PATCH /public-api/resources/charge-point-vendors/v1.0/{vendorId}
|
|
488
|
-
export const chargePointVendorUpdateBody = z.
|
|
569
|
+
export const chargePointVendorUpdateBody = z.object({
|
|
570
|
+
name: z.string().optional()
|
|
571
|
+
});
|
|
489
572
|
// GET /public-api/resources/charge-points/v1.0
|
|
490
573
|
// POST /public-api/resources/charge-points/v1.0
|
|
491
574
|
export const chargePointCreateDeprecatedBody = z.object({
|
|
575
|
+
name: z.string(),
|
|
576
|
+
networkId: z.string(),
|
|
577
|
+
networkProtocol: z.enum(["ocpp 1.5", "ocpp 1.6", "ocpp 1.6 soap", "ocpp 2.0.1"]).optional(),
|
|
578
|
+
networkPassword: z.string().optional(),
|
|
579
|
+
networkIp: z.string().optional(),
|
|
580
|
+
networkPort: z.string().optional(),
|
|
581
|
+
status: z.enum(["active", "disabled", "out of order", "demo"]),
|
|
582
|
+
plugAndCharge: z.boolean().optional(),
|
|
583
|
+
locationId: z.number().int().optional(),
|
|
584
|
+
pin: z.string().optional(),
|
|
585
|
+
accessType: z.enum(["private", "public", "personal"]).optional(),
|
|
586
|
+
desiredSecurityProfile: z.number().int().min(0).max(2).optional(),
|
|
587
|
+
ownerPartnerId: z.number().int().optional(),
|
|
588
|
+
ownerPartnerContractId: z.number().int().optional(),
|
|
589
|
+
partnerCorporateBillingAsDefault: z.boolean().optional(),
|
|
590
|
+
partnerAccessType: z.enum(["privateViewPrivateUse", "privateViewPublicUse", "publicViewPrivateUse"]).optional(),
|
|
591
|
+
capabilities: z.array(z.enum(["REMOTE_START_STOP_CAPABLE", "METER_VALUES", "STOP_TRANSACTION_ON_EV_DISCONNECT"])).optional(),
|
|
592
|
+
managedByOperator: z.boolean().optional(),
|
|
593
|
+
tags: z.array(z.string()).optional(),
|
|
492
594
|
templateId: z.number().int(),
|
|
493
595
|
evses: z.record(z.object({
|
|
494
596
|
tariffGroupId: z.number().int().optional(),
|
|
@@ -502,7 +604,31 @@ export const chargePointCreateDeprecatedBody = z.object({
|
|
|
502
604
|
// DELETE /public-api/resources/charge-points/v1.0/{chargePoint}
|
|
503
605
|
// PATCH /public-api/resources/charge-points/v1.0/{chargePoint}
|
|
504
606
|
export const chargePointUpdateDeprecatedBody = z.object({
|
|
505
|
-
|
|
607
|
+
name: z.string().optional(),
|
|
608
|
+
networkId: z.string().optional(),
|
|
609
|
+
networkProtocol: z.enum(["ocpp 1.5", "ocpp 1.6", "ocpp 1.6 soap", "ocpp 2.0.1"]).optional(),
|
|
610
|
+
networkPassword: z.string().optional(),
|
|
611
|
+
networkIp: z.string().optional(),
|
|
612
|
+
networkPort: z.string().optional(),
|
|
613
|
+
status: z.enum(["active", "disabled", "out of order", "demo"]).optional(),
|
|
614
|
+
plugAndCharge: z.boolean().optional(),
|
|
615
|
+
locationId: z.number().int().optional(),
|
|
616
|
+
pin: z.string().optional(),
|
|
617
|
+
accessType: z.enum(["private", "public", "personal"]).optional(),
|
|
618
|
+
desiredSecurityProfile: z.number().int().min(0).max(2).optional(),
|
|
619
|
+
ownerPartnerId: z.number().int().optional(),
|
|
620
|
+
ownerPartnerContractId: z.number().int().optional(),
|
|
621
|
+
partnerCorporateBillingAsDefault: z.boolean().optional(),
|
|
622
|
+
partnerAccessType: z.enum(["privateViewPrivateUse", "privateViewPublicUse", "publicViewPrivateUse"]).optional(),
|
|
623
|
+
capabilities: z.array(z.enum(["REMOTE_START_STOP_CAPABLE", "METER_VALUES", "STOP_TRANSACTION_ON_EV_DISCONNECT"])).optional(),
|
|
624
|
+
managedByOperator: z.boolean().optional(),
|
|
625
|
+
tags: z.array(z.string()).optional(),
|
|
626
|
+
evses: z.record(z.object({
|
|
627
|
+
tariffGroupId: z.number().int().optional(),
|
|
628
|
+
physicalReference: z.string().optional(),
|
|
629
|
+
maxAmperage: z.number().optional(),
|
|
630
|
+
status: z.enum(["active", "disabled", "out of order"]).optional()
|
|
631
|
+
})).optional(),
|
|
506
632
|
externalId: z.string().optional()
|
|
507
633
|
});
|
|
508
634
|
// GET /public-api/resources/charge-points/v1.0/{chargePoint}/configurations
|
|
@@ -513,32 +639,6 @@ export const chargePointConfigurationUpdateDeprecatedBody = z.object({
|
|
|
513
639
|
});
|
|
514
640
|
// GET /public-api/resources/charge-points/v1.0/{chargePoint}/status
|
|
515
641
|
// GET /public-api/resources/charge-points/v2.0
|
|
516
|
-
export const chargePointsListingQueryParams = z.object({
|
|
517
|
-
filter: z.object({
|
|
518
|
-
desiredSecurityProfileStatus: z.enum(["applied", "pending", "rejected"]).optional(),
|
|
519
|
-
evsePhysicalReference: z.string().optional(),
|
|
520
|
-
networkId: z.string().optional(),
|
|
521
|
-
bootNotificationSerialNumber: z.string().optional(),
|
|
522
|
-
modelId: z.string().optional(),
|
|
523
|
-
vendorId: z.string().optional(),
|
|
524
|
-
userId: z.string().optional(),
|
|
525
|
-
partnerId: z.string().optional(),
|
|
526
|
-
type: z.enum(["public", "private", "personal"]).optional(),
|
|
527
|
-
subOperatorId: z.string().optional(),
|
|
528
|
-
roaming: z.string().optional(),
|
|
529
|
-
name: z.string().optional(),
|
|
530
|
-
locationId: z.string().optional(),
|
|
531
|
-
circuitId: z.number().int().optional(),
|
|
532
|
-
chargingZoneId: z.string().optional(),
|
|
533
|
-
managedByOperator: z.string().optional(),
|
|
534
|
-
externalId: z.string().optional(),
|
|
535
|
-
utilityId: z.number().int().optional(),
|
|
536
|
-
tag: z.string().optional(),
|
|
537
|
-
sharingCode: z.string().optional(),
|
|
538
|
-
lastUpdatedAfter: z.string().datetime().optional(),
|
|
539
|
-
lastUpdatedBefore: z.string().datetime().optional()
|
|
540
|
-
}).optional()
|
|
541
|
-
});
|
|
542
642
|
// POST /public-api/resources/charge-points/v2.0
|
|
543
643
|
export const chargePointCreateBody = z.object({
|
|
544
644
|
id: z.number().int().optional(),
|
|
@@ -574,20 +674,44 @@ export const chargePointCreateBody = z.object({
|
|
|
574
674
|
}).optional(),
|
|
575
675
|
modelId: z.number().int().optional(),
|
|
576
676
|
enableAutoFaultRecovery: z.boolean().optional(),
|
|
577
|
-
user: z.
|
|
677
|
+
user: z.object({
|
|
678
|
+
id: z.number().int().optional(),
|
|
679
|
+
automaticFirmwareUpdatesEnabled: z.boolean().optional()
|
|
680
|
+
}).optional(),
|
|
578
681
|
partner: z.object({
|
|
579
682
|
id: z.number().int().optional(),
|
|
580
683
|
contractId: z.number().int().optional(),
|
|
581
684
|
contactId: z.number().int().optional(),
|
|
582
685
|
corporateBillingAsDefault: z.boolean().optional(),
|
|
583
686
|
accessType: z.enum(["private_view_private_use", "private_view_public_use", "public_view_private_use"]).optional(),
|
|
584
|
-
notice: z.
|
|
687
|
+
notice: z.array(z.object({
|
|
688
|
+
locale: z.string().optional(),
|
|
689
|
+
translation: z.string().optional()
|
|
690
|
+
})).optional()
|
|
585
691
|
}).optional(),
|
|
586
692
|
utilityId: z.number().int().optional(),
|
|
587
693
|
createdAt: z.string().datetime().optional(),
|
|
588
694
|
firstContactAt: z.string().optional(),
|
|
589
695
|
roamingOperatorId: z.number().int().optional(),
|
|
590
|
-
chargingProfile: z.
|
|
696
|
+
chargingProfile: z.object({
|
|
697
|
+
id: z.number().int().optional(),
|
|
698
|
+
minChargingRate: z.number().optional(),
|
|
699
|
+
schedulePeriods: z.array(z.object({
|
|
700
|
+
startPeriod: z.number().int().optional(),
|
|
701
|
+
limit: z.number().optional(),
|
|
702
|
+
numberPhases: z.number().int().optional()
|
|
703
|
+
})).optional(),
|
|
704
|
+
scheduleStart: z.string().optional(),
|
|
705
|
+
chargingRateUnit: z.enum(["A", "W"]).optional(),
|
|
706
|
+
stackLevel: z.number().int().optional(),
|
|
707
|
+
chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]).optional(),
|
|
708
|
+
recurrencyKind: z.enum(["daily", "weekly"]).optional(),
|
|
709
|
+
chargingCompleteAt: z.string().optional(),
|
|
710
|
+
purpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]).optional(),
|
|
711
|
+
validTo: z.string().optional(),
|
|
712
|
+
validFrom: z.string().optional(),
|
|
713
|
+
duration: z.number().int().optional()
|
|
714
|
+
}).optional(),
|
|
591
715
|
displayTariffAndCosts: z.boolean().optional(),
|
|
592
716
|
lastBootNotification: z.object({
|
|
593
717
|
model: z.string().optional(),
|
|
@@ -603,14 +727,14 @@ export const chargePointCreateBody = z.object({
|
|
|
603
727
|
networkStatus: z.enum(["never_connected", "available", "temporarily_unavailable", "long-term_unavailable"]).optional(),
|
|
604
728
|
hardwareStatus: z.enum(["available", "unavailable", "faulted"]).optional(),
|
|
605
729
|
vendorErrorCode: z.string().optional(),
|
|
606
|
-
tags: z.
|
|
730
|
+
tags: z.array(z.string()).optional(),
|
|
607
731
|
sharingCode: z.string().optional(),
|
|
608
732
|
enabledRandomisedDelay: z.boolean().optional(),
|
|
609
|
-
noticeId: z.
|
|
610
|
-
usesRenewableEnergy: z.
|
|
611
|
-
integratedAt: z.
|
|
612
|
-
manufacturedAt: z.
|
|
613
|
-
lastUpdatedAt: z.
|
|
733
|
+
noticeId: z.number().int().optional(),
|
|
734
|
+
usesRenewableEnergy: z.boolean().optional(),
|
|
735
|
+
integratedAt: z.string().datetime().optional(),
|
|
736
|
+
manufacturedAt: z.string().datetime().optional(),
|
|
737
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
614
738
|
ocppConnectedChargePointId: z.number().int().optional(),
|
|
615
739
|
communicationMode: z.enum(["none", "direct_ocpp", "via_ocpp_connected_charge_point"]).optional()
|
|
616
740
|
});
|
|
@@ -661,7 +785,10 @@ export const chargePointUpdateBody = z.object({
|
|
|
661
785
|
contactId: z.number().int().optional(),
|
|
662
786
|
corporateBillingAsDefault: z.boolean().optional(),
|
|
663
787
|
accessType: z.enum(["private_view_private_use", "private_view_public_use", "public_view_private_use"]).optional(),
|
|
664
|
-
notice: z.
|
|
788
|
+
notice: z.array(z.object({
|
|
789
|
+
locale: z.string().optional(),
|
|
790
|
+
translation: z.string().optional()
|
|
791
|
+
})).optional()
|
|
665
792
|
}).optional(),
|
|
666
793
|
utilityId: z.number().int().optional(),
|
|
667
794
|
tags: z.array(z.string()).optional(),
|
|
@@ -673,14 +800,6 @@ export const chargePointUpdateBody = z.object({
|
|
|
673
800
|
});
|
|
674
801
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/available-personal-smart-charging-modes
|
|
675
802
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/configurations
|
|
676
|
-
export const chargePointConfigurationsListingQueryParams = z.object({
|
|
677
|
-
filter: z.object({
|
|
678
|
-
name: z.string().optional(),
|
|
679
|
-
instance: z.string().optional(),
|
|
680
|
-
componentName: z.string().optional(),
|
|
681
|
-
evseId: z.number().int().optional()
|
|
682
|
-
}).optional()
|
|
683
|
-
});
|
|
684
803
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/configurations/{key}
|
|
685
804
|
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/configurations/{key}
|
|
686
805
|
export const chargePointConfigurationUpdateBody = z.object({
|
|
@@ -690,7 +809,7 @@ export const chargePointConfigurationUpdateBody = z.object({
|
|
|
690
809
|
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/evses
|
|
691
810
|
export const chargePointEvseCreateBody = z.object({
|
|
692
811
|
physicalReference: z.string(),
|
|
693
|
-
currentType: z.
|
|
812
|
+
currentType: z.enum(["ac", "dc"]),
|
|
694
813
|
label: z.string().optional(),
|
|
695
814
|
networkId: z.string(),
|
|
696
815
|
status: z.enum(["enabled", "disabled", "out of order"]),
|
|
@@ -698,7 +817,14 @@ export const chargePointEvseCreateBody = z.object({
|
|
|
698
817
|
tariffGroupId: z.number().int().optional(),
|
|
699
818
|
allowsReservation: z.boolean().optional(),
|
|
700
819
|
bookingEnabled: z.boolean().optional(),
|
|
701
|
-
powerOptions: z.
|
|
820
|
+
powerOptions: z.object({
|
|
821
|
+
maxPower: z.number().int().optional(),
|
|
822
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
|
|
823
|
+
maxAmperage: z.number().optional(),
|
|
824
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
|
|
825
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
826
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
827
|
+
}).optional(),
|
|
702
828
|
externalId: z.string().optional()
|
|
703
829
|
});
|
|
704
830
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}
|
|
@@ -706,7 +832,7 @@ export const chargePointEvseCreateBody = z.object({
|
|
|
706
832
|
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}
|
|
707
833
|
export const chargePointEvseUpdateBody = z.object({
|
|
708
834
|
physicalReference: z.string().optional(),
|
|
709
|
-
currentType: z.
|
|
835
|
+
currentType: z.enum(["ac", "dc"]).optional(),
|
|
710
836
|
label: z.string().optional(),
|
|
711
837
|
networkId: z.string().optional(),
|
|
712
838
|
status: z.enum(["enabled", "disabled", "out of order"]).optional(),
|
|
@@ -714,13 +840,20 @@ export const chargePointEvseUpdateBody = z.object({
|
|
|
714
840
|
tariffGroupId: z.number().int().optional(),
|
|
715
841
|
allowsReservation: z.boolean().optional(),
|
|
716
842
|
bookingEnabled: z.boolean().optional(),
|
|
717
|
-
powerOptions: z.
|
|
843
|
+
powerOptions: z.object({
|
|
844
|
+
maxPower: z.number().int().optional(),
|
|
845
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
|
|
846
|
+
maxAmperage: z.number().optional(),
|
|
847
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
|
|
848
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
849
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
850
|
+
}).optional(),
|
|
718
851
|
externalId: z.string().optional()
|
|
719
852
|
});
|
|
720
853
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors
|
|
721
854
|
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors
|
|
722
855
|
export const chargePointEvseConnectorCreateBody = z.object({
|
|
723
|
-
type: z.
|
|
856
|
+
type: z.enum(["type1", "type2", "type3", "chademo", "ccs1", "ccs2", "schuko", "nacs", "cee16", "cee32", "j1772", "inductive", "nema-5-20", "type-e-french", "type-g-british", "type-j-swiss", "avcon", "gb-t-ac", "gb-t-dc", "chaoji", "nema-6-30", "nema-6-50"]),
|
|
724
857
|
format: z.enum(["socket", "cable"]).optional(),
|
|
725
858
|
status: z.enum(["enabled", "disabled"]).optional()
|
|
726
859
|
});
|
|
@@ -728,7 +861,7 @@ export const chargePointEvseConnectorCreateBody = z.object({
|
|
|
728
861
|
// DELETE /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors/{connector}
|
|
729
862
|
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors/{connector}
|
|
730
863
|
export const chargePointEvseConnectorUpdateBody = z.object({
|
|
731
|
-
type: z.
|
|
864
|
+
type: z.enum(["type1", "type2", "type3", "chademo", "ccs1", "ccs2", "schuko", "nacs", "cee16", "cee32", "j1772", "inductive", "nema-5-20", "type-e-french", "type-g-british", "type-j-swiss", "avcon", "gb-t-ac", "gb-t-dc", "chaoji", "nema-6-30", "nema-6-50"]).optional(),
|
|
732
865
|
format: z.enum(["socket", "cable"]).optional(),
|
|
733
866
|
status: z.enum(["enabled", "disabled"]).optional()
|
|
734
867
|
});
|
|
@@ -738,7 +871,107 @@ export const chargePointEvseConnectorUpdateBody = z.object({
|
|
|
738
871
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/network-status-logs
|
|
739
872
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/personal-smart-charging-preferences
|
|
740
873
|
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/personal-smart-charging-preferences
|
|
741
|
-
export const personalSmartChargingPreferencesUpdateBody = z.union([z.
|
|
874
|
+
export const personalSmartChargingPreferencesUpdateBody = z.union([z.object({
|
|
875
|
+
enabled: z.boolean().optional(),
|
|
876
|
+
type: z.enum(["user_controlled_schedule"]),
|
|
877
|
+
preferences: z.object({
|
|
878
|
+
startTime: z.string(),
|
|
879
|
+
endTime: z.string(),
|
|
880
|
+
targetCharge: z.object({
|
|
881
|
+
minTargetChargeKwh: z.number().optional(),
|
|
882
|
+
maxTargetChargeKwh: z.number().optional()
|
|
883
|
+
}).optional(),
|
|
884
|
+
trackElectricityCosts: z.object({
|
|
885
|
+
priceOffPeak: z.number().optional(),
|
|
886
|
+
pricePeak: z.number().optional()
|
|
887
|
+
}).optional(),
|
|
888
|
+
weekDays: z.array(z.object({
|
|
889
|
+
days: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
|
|
890
|
+
startTime: z.string(),
|
|
891
|
+
endTime: z.string()
|
|
892
|
+
})).optional()
|
|
893
|
+
})
|
|
894
|
+
}), z.object({
|
|
895
|
+
enabled: z.boolean().optional(),
|
|
896
|
+
type: z.enum(["solar"]),
|
|
897
|
+
preferences: z.object({
|
|
898
|
+
maxCurrentFromGrid: z.number(),
|
|
899
|
+
solarStableTime: z.number()
|
|
900
|
+
})
|
|
901
|
+
}), z.object({
|
|
902
|
+
enabled: z.boolean().optional(),
|
|
903
|
+
type: z.enum(["octopus_agile"]),
|
|
904
|
+
integrationId: z.number().int(),
|
|
905
|
+
preferences: z.object({
|
|
906
|
+
applicableTaxId: z.number().int(),
|
|
907
|
+
targetCharge: z.object({
|
|
908
|
+
departureTime: z.string().optional(),
|
|
909
|
+
preconditioningTime: z.number().int().optional(),
|
|
910
|
+
minTargetChargeKwh: z.number().optional(),
|
|
911
|
+
maxTargetChargeKwh: z.number().optional()
|
|
912
|
+
}).optional(),
|
|
913
|
+
postCode: z.string(),
|
|
914
|
+
priceThreshold: z.number()
|
|
915
|
+
})
|
|
916
|
+
}), z.object({
|
|
917
|
+
enabled: z.boolean().optional(),
|
|
918
|
+
type: z.enum(["octopus_go"]),
|
|
919
|
+
integrationId: z.number().int(),
|
|
920
|
+
preferences: z.object({
|
|
921
|
+
applicableTaxId: z.number().int(),
|
|
922
|
+
targetCharge: z.object({
|
|
923
|
+
departureTime: z.string().optional(),
|
|
924
|
+
preconditioningTime: z.number().int().optional(),
|
|
925
|
+
minTargetChargeKwh: z.number().optional(),
|
|
926
|
+
maxTargetChargeKwh: z.number().optional()
|
|
927
|
+
}).optional(),
|
|
928
|
+
postCode: z.string(),
|
|
929
|
+
priceThreshold: z.number().optional()
|
|
930
|
+
})
|
|
931
|
+
}), z.object({
|
|
932
|
+
enabled: z.boolean().optional(),
|
|
933
|
+
type: z.enum(["energi_elspot"]),
|
|
934
|
+
integrationId: z.number().int().optional(),
|
|
935
|
+
preferences: z.object({
|
|
936
|
+
location: z.enum(["GB1"]),
|
|
937
|
+
targetCharge: z.object({
|
|
938
|
+
departureTime: z.string(),
|
|
939
|
+
preconditioningTime: z.number().int().optional(),
|
|
940
|
+
targetChargeKwh: z.number()
|
|
941
|
+
})
|
|
942
|
+
}).optional()
|
|
943
|
+
}), z.object({
|
|
944
|
+
enabled: z.boolean().optional(),
|
|
945
|
+
type: z.enum(["nordpool"]),
|
|
946
|
+
integrationId: z.number().int().optional(),
|
|
947
|
+
preferences: z.object({
|
|
948
|
+
location: z.enum(["GB1"]),
|
|
949
|
+
targetCharge: z.object({
|
|
950
|
+
departureTime: z.string(),
|
|
951
|
+
preconditioningTime: z.number().int().optional(),
|
|
952
|
+
targetChargeKwh: z.number()
|
|
953
|
+
})
|
|
954
|
+
}).optional()
|
|
955
|
+
}), z.object({
|
|
956
|
+
enabled: z.boolean().optional(),
|
|
957
|
+
type: z.enum(["charger_electricity_rate"]),
|
|
958
|
+
electricityRateId: z.number().int(),
|
|
959
|
+
preferences: z.object({
|
|
960
|
+
solar: z.boolean().optional(),
|
|
961
|
+
startTime: z.string(),
|
|
962
|
+
endTime: z.string(),
|
|
963
|
+
targetCharge: z.object({
|
|
964
|
+
departureTime: z.string(),
|
|
965
|
+
preconditioningTime: z.number().int().optional(),
|
|
966
|
+
targetChargeKwh: z.number()
|
|
967
|
+
}),
|
|
968
|
+
weekDays: z.array(z.object({
|
|
969
|
+
days: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
|
|
970
|
+
startTime: z.string(),
|
|
971
|
+
endTime: z.string()
|
|
972
|
+
})).optional()
|
|
973
|
+
})
|
|
974
|
+
}), z.object({
|
|
742
975
|
enabled: z.boolean()
|
|
743
976
|
})]);
|
|
744
977
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/shared-partners
|
|
@@ -754,7 +987,55 @@ export const chargePointShareCreateBody = z.object({
|
|
|
754
987
|
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/shares/{share}
|
|
755
988
|
// DELETE /public-api/resources/charge-points/v2.0/{chargePoint}/shares/{share}
|
|
756
989
|
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/smart-charging
|
|
757
|
-
export const chargePointSmartChargingUpdateBody = z.union([z.
|
|
990
|
+
export const chargePointSmartChargingUpdateBody = z.union([z.object({
|
|
991
|
+
mode: z.enum(["tod"]),
|
|
992
|
+
defaultChargePointMaxCurrent: z.number(),
|
|
993
|
+
circuitId: z.number().int().optional(),
|
|
994
|
+
periods: z.array(z.object({
|
|
995
|
+
weekDay: z.enum(["all", "mon", "tue", "wed", "thu", "fri", "sat", "sun"]),
|
|
996
|
+
elements: z.array(z.object({
|
|
997
|
+
startAt: z.string(),
|
|
998
|
+
endAt: z.string(),
|
|
999
|
+
maxCurrent: z.number().optional()
|
|
1000
|
+
}))
|
|
1001
|
+
})).optional(),
|
|
1002
|
+
preconditioningTime: z.number().int().optional(),
|
|
1003
|
+
minCurrent: z.number().optional(),
|
|
1004
|
+
enableKeepAwake: z.boolean().optional(),
|
|
1005
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]),
|
|
1006
|
+
electricalConfiguration: z.enum(["star", "delta"]).optional(),
|
|
1007
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]),
|
|
1008
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]),
|
|
1009
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
1010
|
+
}), z.object({
|
|
1011
|
+
mode: z.enum(["dynamic"]),
|
|
1012
|
+
defaultChargePointMaxCurrent: z.number(),
|
|
1013
|
+
preconditioningTime: z.number().int().optional(),
|
|
1014
|
+
circuitId: z.number().int().optional(),
|
|
1015
|
+
minCurrent: z.number().optional(),
|
|
1016
|
+
enableKeepAwake: z.boolean().optional(),
|
|
1017
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]),
|
|
1018
|
+
electricalConfiguration: z.enum(["star", "delta"]).optional(),
|
|
1019
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]),
|
|
1020
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]),
|
|
1021
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
1022
|
+
}), z.object({
|
|
1023
|
+
mode: z.enum(["user_schedule"]),
|
|
1024
|
+
defaultChargePointMaxCurrent: z.number(),
|
|
1025
|
+
preconditioningTime: z.number().int().optional(),
|
|
1026
|
+
circuitId: z.number().int().optional(),
|
|
1027
|
+
minCurrent: z.number(),
|
|
1028
|
+
enableKeepAwake: z.boolean(),
|
|
1029
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]),
|
|
1030
|
+
electricalConfiguration: z.enum(["star", "delta"]).optional(),
|
|
1031
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]),
|
|
1032
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]),
|
|
1033
|
+
allowDynamicLoadManagement: z.boolean().optional(),
|
|
1034
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
1035
|
+
}), z.object({
|
|
1036
|
+
mode: z.enum(["disabled"]),
|
|
1037
|
+
preconditioningTime: z.number().int().optional()
|
|
1038
|
+
})]);
|
|
758
1039
|
// GET /public-api/resources/circuits/v1.0
|
|
759
1040
|
// POST /public-api/resources/circuits/v1.0
|
|
760
1041
|
export const circuitCreateDeprecatedBody = z.object({
|
|
@@ -771,7 +1052,7 @@ export const circuitCreateDeprecatedBody = z.object({
|
|
|
771
1052
|
inputVoltage: z.enum(["110-130", "220-240", "380", "400"]),
|
|
772
1053
|
phaseRotation: z.enum(["L1", "L2", "L3", "RST", "RTS", "SRT", "STR", "TRS", "TSR"])
|
|
773
1054
|
})),
|
|
774
|
-
lastUpdatedAt: z.
|
|
1055
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
775
1056
|
});
|
|
776
1057
|
// GET /public-api/resources/circuits/v1.0/{dlmCircuit}
|
|
777
1058
|
// DELETE /public-api/resources/circuits/v1.0/{dlmCircuit}
|
|
@@ -790,21 +1071,11 @@ export const circuitUpdateDeprecatedBody = z.object({
|
|
|
790
1071
|
inputVoltage: z.enum(["110-130", "220-240", "380", "400"]),
|
|
791
1072
|
phaseRotation: z.enum(["L1", "L2", "L3", "RST", "RTS", "SRT", "STR", "TRS", "TSR"])
|
|
792
1073
|
})).optional(),
|
|
793
|
-
lastUpdatedAt: z.
|
|
1074
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
794
1075
|
});
|
|
795
1076
|
// GET /public-api/resources/circuits/v1.0/{dlmCircuit}/consumption
|
|
796
|
-
export const circuitConsumptionAllPhasesDeprecatedPathParams = z.object({
|
|
797
|
-
dlmCircuit: z.number().int()
|
|
798
|
-
});
|
|
799
1077
|
// GET /public-api/resources/circuits/v1.0/{dlmCircuit}/consumption/{phase}
|
|
800
|
-
export const circuitConsumptionPhaseDeprecatedPathParams = z.object({
|
|
801
|
-
dlmCircuit: z.number().int(),
|
|
802
|
-
phase: z.enum(["L1", "L2", "L3"])
|
|
803
|
-
});
|
|
804
1078
|
// GET /public-api/resources/circuits/v2.0
|
|
805
|
-
export const circuitsListingQueryParams = z.object({
|
|
806
|
-
include: z.array(z.enum(["chargePointPriorities", "userPriorities", "socPriorities", "consumption", "unmanagedLoad"])).optional()
|
|
807
|
-
});
|
|
808
1079
|
// POST /public-api/resources/circuits/v2.0
|
|
809
1080
|
export const circuitCreateBody = z.object({
|
|
810
1081
|
id: z.number().int().optional(),
|
|
@@ -813,8 +1084,8 @@ export const circuitCreateBody = z.object({
|
|
|
813
1084
|
phases: z.enum(["single_phase", "three_phase", "split_phase"]),
|
|
814
1085
|
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
815
1086
|
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional(),
|
|
816
|
-
electricalConfiguration: z.
|
|
817
|
-
maxVoltage: z.
|
|
1087
|
+
electricalConfiguration: z.enum(["star", "delta"]).optional(),
|
|
1088
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
|
|
818
1089
|
maxCurrent: z.number(),
|
|
819
1090
|
minChargePointCurrent: z.number().optional(),
|
|
820
1091
|
setSessionLimitToZeroOnIdle: z.boolean().optional(),
|
|
@@ -839,8 +1110,8 @@ export const circuitUpdateBody = z.object({
|
|
|
839
1110
|
phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
|
|
840
1111
|
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
841
1112
|
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional(),
|
|
842
|
-
electricalConfiguration: z.
|
|
843
|
-
maxVoltage: z.
|
|
1113
|
+
electricalConfiguration: z.enum(["star", "delta"]).optional(),
|
|
1114
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
|
|
844
1115
|
maxCurrent: z.number().optional(),
|
|
845
1116
|
minChargePointCurrent: z.number().optional(),
|
|
846
1117
|
setSessionLimitToZeroOnIdle: z.boolean().optional(),
|
|
@@ -857,9 +1128,6 @@ export const circuitUpdateBody = z.object({
|
|
|
857
1128
|
});
|
|
858
1129
|
// GET /public-api/resources/circuits/v2.0/{circuit}/charge-point-priorities
|
|
859
1130
|
// GET /public-api/resources/circuits/v2.0/{circuit}/consumption
|
|
860
|
-
export const circuitConsumptionPathParams = z.object({
|
|
861
|
-
circuit: z.number().int()
|
|
862
|
-
});
|
|
863
1131
|
// GET /public-api/resources/circuits/v2.0/{circuit}/soc-priorities
|
|
864
1132
|
// GET /public-api/resources/circuits/v2.0/{circuit}/unmanaged-load
|
|
865
1133
|
// GET /public-api/resources/circuits/v2.0/{circuit}/user-priorities
|
|
@@ -880,17 +1148,12 @@ export const circuitUserPriorityUpdateBody = z.object({
|
|
|
880
1148
|
priority: z.number().min(0).optional()
|
|
881
1149
|
});
|
|
882
1150
|
// GET /public-api/resources/configuration-templates/v1.0
|
|
883
|
-
export const listConfigurationTemplatesQueryParams = z.object({
|
|
884
|
-
filter: z.object({
|
|
885
|
-
ocppVersion: z.enum(["ocpp1.6", "ocpp2.0.1"]).optional()
|
|
886
|
-
}).optional()
|
|
887
|
-
});
|
|
888
1151
|
// POST /public-api/resources/configuration-templates/v1.0
|
|
889
1152
|
export const createConfigurationTemplateBody = z.object({
|
|
890
1153
|
id: z.number().int().optional(),
|
|
891
1154
|
name: z.string(),
|
|
892
1155
|
ocppVersion: z.enum(["ocpp 1.6", "ocpp 2.0.1"]),
|
|
893
|
-
lastUpdatedAt: z.
|
|
1156
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
894
1157
|
});
|
|
895
1158
|
// GET /public-api/resources/configuration-templates/v1.0/{template}
|
|
896
1159
|
// DELETE /public-api/resources/configuration-templates/v1.0/{template}
|
|
@@ -899,18 +1162,12 @@ export const updateConfigurationTemplateBody = z.object({
|
|
|
899
1162
|
name: z.string().optional()
|
|
900
1163
|
});
|
|
901
1164
|
// GET /public-api/resources/configuration-templates/v1.0/{template}/variables
|
|
902
|
-
export const configurationTemplateVariableListingPathParams = z.object({
|
|
903
|
-
template: z.number().int()
|
|
904
|
-
});
|
|
905
1165
|
// POST /public-api/resources/configuration-templates/v1.0/{template}/variables
|
|
906
|
-
export const configurationTemplateVariableCreatePathParams = z.object({
|
|
907
|
-
template: z.number().int()
|
|
908
|
-
});
|
|
909
1166
|
export const configurationTemplateVariableCreateBody = z.union([z.object({
|
|
910
1167
|
id: z.number().int().optional(),
|
|
911
1168
|
keyName: z.string(),
|
|
912
1169
|
value: z.string(),
|
|
913
|
-
lastUpdatedAt: z.
|
|
1170
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
914
1171
|
}).strict(), z.object({
|
|
915
1172
|
id: z.number().int().optional(),
|
|
916
1173
|
value: z.string(),
|
|
@@ -921,7 +1178,7 @@ export const configurationTemplateVariableCreateBody = z.union([z.object({
|
|
|
921
1178
|
componentInstance: z.string().optional(),
|
|
922
1179
|
evseId: z.number().int().optional(),
|
|
923
1180
|
connectorId: z.number().int().optional(),
|
|
924
|
-
lastUpdatedAt: z.
|
|
1181
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
925
1182
|
})]);
|
|
926
1183
|
// DELETE /public-api/resources/configuration-templates/v1.0/{template}/variables/{variable}
|
|
927
1184
|
// PATCH /public-api/resources/configuration-templates/v1.0/{template}/variables/{variable}
|
|
@@ -929,7 +1186,7 @@ export const configurationTemplateVariableUpdateBody = z.union([z.object({
|
|
|
929
1186
|
id: z.number().int().optional(),
|
|
930
1187
|
keyName: z.string().optional(),
|
|
931
1188
|
value: z.string().optional(),
|
|
932
|
-
lastUpdatedAt: z.
|
|
1189
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
933
1190
|
}).strict(), z.object({
|
|
934
1191
|
id: z.number().int().optional(),
|
|
935
1192
|
value: z.string().optional(),
|
|
@@ -940,22 +1197,17 @@ export const configurationTemplateVariableUpdateBody = z.union([z.object({
|
|
|
940
1197
|
componentInstance: z.string().optional(),
|
|
941
1198
|
evseId: z.number().int().optional(),
|
|
942
1199
|
connectorId: z.number().int().optional(),
|
|
943
|
-
lastUpdatedAt: z.
|
|
1200
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
944
1201
|
})]);
|
|
945
1202
|
// GET /public-api/resources/contact-details/v2.0
|
|
946
1203
|
// PUT /public-api/resources/contact-details/v2.0
|
|
947
1204
|
export const contactDetailsUpdateBody = z.object({
|
|
948
1205
|
email: z.string(),
|
|
949
1206
|
phone: z.string().optional(),
|
|
950
|
-
lastUpdatedAt: z.
|
|
1207
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
951
1208
|
});
|
|
952
1209
|
// DELETE /public-api/resources/contact-details/v2.0
|
|
953
1210
|
// GET /public-api/resources/cp-models/v1.0
|
|
954
|
-
export const chargePointModelsListingDeprecatedQueryParams = z.object({
|
|
955
|
-
filter: z.object({
|
|
956
|
-
vendorId: z.string().optional()
|
|
957
|
-
}).optional()
|
|
958
|
-
});
|
|
959
1211
|
// POST /public-api/resources/cp-models/v1.0
|
|
960
1212
|
export const chargePointModelCreateDeprecatedBody = z.object({
|
|
961
1213
|
name: z.string(),
|
|
@@ -998,16 +1250,16 @@ export const currencyCreateBody = z.object({
|
|
|
998
1250
|
// GET /public-api/resources/currencies/v2.0/{currency}
|
|
999
1251
|
// DELETE /public-api/resources/currencies/v2.0/{currency}
|
|
1000
1252
|
// PATCH /public-api/resources/currencies/v2.0/{currency}
|
|
1001
|
-
export const currencyUpdateBody = z.
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}).optional()
|
|
1253
|
+
export const currencyUpdateBody = z.object({
|
|
1254
|
+
alphabeticCode: z.enum(["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL"]),
|
|
1255
|
+
prefix: z.string().optional(),
|
|
1256
|
+
suffix: z.string().optional(),
|
|
1257
|
+
decimal: z.number().int().optional(),
|
|
1258
|
+
unitPriceAndCalculationsDecimal: z.number().int().optional(),
|
|
1259
|
+
enableUseOfMinorCurrencyUnit: z.boolean().optional(),
|
|
1260
|
+
minorUnitSign: z.string().optional()
|
|
1010
1261
|
});
|
|
1262
|
+
// GET /public-api/resources/currency-rates/v1.0
|
|
1011
1263
|
// POST /public-api/resources/currency-rates/v1.0
|
|
1012
1264
|
export const createCurrencyRateBody = z.object({
|
|
1013
1265
|
base: z.string(),
|
|
@@ -1023,14 +1275,11 @@ export const updateCurrencyRateBody = z.object({
|
|
|
1023
1275
|
// GET /public-api/resources/custom-fees/v2.0
|
|
1024
1276
|
// GET /public-api/resources/custom-fees/v2.0/{customFee}
|
|
1025
1277
|
// GET /public-api/resources/downtime-period-notices/v1.0
|
|
1026
|
-
export const getDowntimePeriodNoticesQueryParams = z.object({
|
|
1027
|
-
filter: z.object({
|
|
1028
|
-
type: z.enum(["downtime", "exempt"]).optional()
|
|
1029
|
-
}).optional()
|
|
1030
|
-
});
|
|
1031
1278
|
// POST /public-api/resources/downtime-period-notices/v1.0
|
|
1032
1279
|
export const postDowntimePeriodNoticeBody = z.object({
|
|
1033
|
-
|
|
1280
|
+
type: z.enum(["downtime", "exempt"]),
|
|
1281
|
+
notice: z.string(),
|
|
1282
|
+
description: z.string().optional()
|
|
1034
1283
|
});
|
|
1035
1284
|
// GET /public-api/resources/downtime-period-notices/v1.0/{notice}
|
|
1036
1285
|
// DELETE /public-api/resources/downtime-period-notices/v1.0/{notice}
|
|
@@ -1043,7 +1292,10 @@ export const patchDowntimePeriodNoticeBody = z.object({
|
|
|
1043
1292
|
// GET /public-api/resources/electricity-meters/v1.0
|
|
1044
1293
|
// POST /public-api/resources/electricity-meters/v1.0
|
|
1045
1294
|
export const electricityMeterCreateBody = z.object({
|
|
1046
|
-
id: z.number().optional()
|
|
1295
|
+
id: z.number().optional(),
|
|
1296
|
+
name: z.string(),
|
|
1297
|
+
integrationId: z.number().int(),
|
|
1298
|
+
integrationParameters: z.record(z.string()).optional()
|
|
1047
1299
|
});
|
|
1048
1300
|
// GET /public-api/resources/electricity-meters/v1.0/{electricityMeter}
|
|
1049
1301
|
// DELETE /public-api/resources/electricity-meters/v1.0/{electricityMeter}
|
|
@@ -1083,15 +1335,34 @@ export const electricityRateCreateDeprecatedBody = z.object({
|
|
|
1083
1335
|
});
|
|
1084
1336
|
// GET /public-api/resources/electricity-rates/v1.0/{electricityRate}
|
|
1085
1337
|
// PUT /public-api/resources/electricity-rates/v1.0/{electricityRate}
|
|
1086
|
-
export const electricityRateUpdateDeprecatedBody = z.
|
|
1338
|
+
export const electricityRateUpdateDeprecatedBody = z.object({
|
|
1339
|
+
id: z.number().int().optional(),
|
|
1340
|
+
name: z.string(),
|
|
1341
|
+
utilityId: z.number().int().optional(),
|
|
1342
|
+
pricingGranularityInMinutes: z.union([z.literal(60), z.literal(30), z.literal(15)]),
|
|
1343
|
+
defaultPricePerKwh: z.number(),
|
|
1344
|
+
taxId: z.number().int().optional(),
|
|
1345
|
+
taxPercentage: z.number().min(0).max(100).optional(),
|
|
1346
|
+
intervalPricing: z.array(z.object({
|
|
1347
|
+
weekDays: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
|
|
1348
|
+
elements: z.array(z.object({
|
|
1349
|
+
startAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1350
|
+
endAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1351
|
+
price: z.number().optional()
|
|
1352
|
+
})).optional()
|
|
1353
|
+
})).optional(),
|
|
1354
|
+
intervalSpecialPricing: z.array(z.object({
|
|
1355
|
+
specialPricingName: z.string(),
|
|
1356
|
+
validOn: z.array(z.string()),
|
|
1357
|
+
elements: z.array(z.object({
|
|
1358
|
+
startAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1359
|
+
endAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1360
|
+
price: z.number().optional()
|
|
1361
|
+
})).optional()
|
|
1362
|
+
})).optional()
|
|
1363
|
+
});
|
|
1087
1364
|
// DELETE /public-api/resources/electricity-rates/v1.0/{electricityRate}
|
|
1088
1365
|
// GET /public-api/resources/electricity-rates/v2.0
|
|
1089
|
-
export const electricityRatesListingQueryParams = z.object({
|
|
1090
|
-
filter: z.object({
|
|
1091
|
-
utilityId: z.number().int().optional(),
|
|
1092
|
-
type: z.unknown().optional()
|
|
1093
|
-
}).optional()
|
|
1094
|
-
});
|
|
1095
1366
|
// POST /public-api/resources/electricity-rates/v2.0
|
|
1096
1367
|
export const electricityRateCreateBody = z.object({
|
|
1097
1368
|
id: z.number().int().optional(),
|
|
@@ -1125,9 +1396,6 @@ export const electricityRateEnergyMixUpdateBody = z.object({
|
|
|
1125
1396
|
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods
|
|
1126
1397
|
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date
|
|
1127
1398
|
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
|
|
1128
|
-
export const electricityRatePricePeriodsDateReadPathParams = z.object({
|
|
1129
|
-
date: z.string()
|
|
1130
|
-
});
|
|
1131
1399
|
// PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
|
|
1132
1400
|
export const electricityRatePricePeriodsDateCreateOrUpdateBody = z.object({
|
|
1133
1401
|
periods: z.array(z.object({
|
|
@@ -1139,28 +1407,16 @@ export const electricityRatePricePeriodsDateCreateOrUpdateBody = z.object({
|
|
|
1139
1407
|
// DELETE /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
|
|
1140
1408
|
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day
|
|
1141
1409
|
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
|
|
1142
|
-
export const electricityRatePricePeriodsWeekDayReadPathParams = z.object({
|
|
1143
|
-
weekDay: z.enum(["mon", "tue", "wed", "thu", "fri", "sat", "sun", "any"])
|
|
1144
|
-
});
|
|
1145
1410
|
// PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
|
|
1146
|
-
export const electricityRatePricePeriodsWeekDayCreateaOrUpdateBody = z.
|
|
1411
|
+
export const electricityRatePricePeriodsWeekDayCreateaOrUpdateBody = z.object({
|
|
1412
|
+
periods: z.array(z.object({
|
|
1413
|
+
startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
1414
|
+
endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
1415
|
+
price: z.number()
|
|
1416
|
+
}))
|
|
1417
|
+
});
|
|
1147
1418
|
// DELETE /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
|
|
1148
1419
|
// GET /public-api/resources/evse-downtime-periods/v1.0
|
|
1149
|
-
export const evseDowntimePeriodsListingQueryParams = z.object({
|
|
1150
|
-
filter: z.object({
|
|
1151
|
-
evseId: z.number().int().optional(),
|
|
1152
|
-
chargePointId: z.number().int().optional(),
|
|
1153
|
-
locationId: z.number().int().optional(),
|
|
1154
|
-
entryMode: z.enum(["manual", "automatic"]).optional(),
|
|
1155
|
-
type: z.enum(["downtime", "exempt"]).optional(),
|
|
1156
|
-
startedAfter: z.string().datetime().optional(),
|
|
1157
|
-
stoppedBefore: z.string().datetime().optional(),
|
|
1158
|
-
durationLessThan: z.number().int().optional(),
|
|
1159
|
-
durationGreaterThan: z.number().int().optional(),
|
|
1160
|
-
lastUpdatedAfter: z.string().datetime().optional(),
|
|
1161
|
-
lastUpdatedBefore: z.string().datetime().optional()
|
|
1162
|
-
}).optional()
|
|
1163
|
-
});
|
|
1164
1420
|
// POST /public-api/resources/evse-downtime-periods/v1.0
|
|
1165
1421
|
export const evseDowntimePeriodCreateBody = z.object({
|
|
1166
1422
|
evseId: z.number().int(),
|
|
@@ -1177,17 +1433,30 @@ export const evseDowntimePeriodUpdateBody = z.object({
|
|
|
1177
1433
|
endedAt: z.string().datetime().optional()
|
|
1178
1434
|
});
|
|
1179
1435
|
// GET /public-api/resources/evses/v2.0
|
|
1180
|
-
export const evsesListingDeprecatedQueryParams = z.object({
|
|
1181
|
-
page: z.number().int().optional(),
|
|
1182
|
-
per_page: z.number().int().min(1).max(100).optional(),
|
|
1183
|
-
cursor: z.string().optional()
|
|
1184
|
-
});
|
|
1185
1436
|
// GET /public-api/resources/evses/v2.0/{evse}
|
|
1186
1437
|
// PUT /public-api/resources/evses/v2.0/{evse}
|
|
1187
1438
|
export const evseUpdateDeprecatedBody = z.object({
|
|
1188
1439
|
id: z.number().int().optional(),
|
|
1189
1440
|
chargePointId: z.number().int().optional(),
|
|
1190
|
-
chargingProfile: z.
|
|
1441
|
+
chargingProfile: z.object({
|
|
1442
|
+
id: z.number().int().optional(),
|
|
1443
|
+
minChargingRate: z.number().optional(),
|
|
1444
|
+
schedulePeriods: z.array(z.object({
|
|
1445
|
+
startPeriod: z.number().int().optional(),
|
|
1446
|
+
limit: z.number().optional(),
|
|
1447
|
+
numberPhases: z.number().int().optional()
|
|
1448
|
+
})).optional(),
|
|
1449
|
+
scheduleStart: z.string().optional(),
|
|
1450
|
+
chargingRateUnit: z.enum(["A", "W"]).optional(),
|
|
1451
|
+
stackLevel: z.number().int().optional(),
|
|
1452
|
+
chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]).optional(),
|
|
1453
|
+
recurrencyKind: z.enum(["daily", "weekly"]).optional(),
|
|
1454
|
+
chargingCompleteAt: z.string().optional(),
|
|
1455
|
+
purpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]).optional(),
|
|
1456
|
+
validTo: z.string().optional(),
|
|
1457
|
+
validFrom: z.string().optional(),
|
|
1458
|
+
duration: z.number().int().optional()
|
|
1459
|
+
}).optional(),
|
|
1191
1460
|
roaming: z.object({
|
|
1192
1461
|
evseId: z.string().optional(),
|
|
1193
1462
|
status: z.enum(["available", "blocked", "charging", "inoperative", "outoforder", "planned", "removed", "reserved", "unknown"]).optional(),
|
|
@@ -1206,45 +1475,69 @@ export const evseUpdateDeprecatedBody = z.object({
|
|
|
1206
1475
|
tariffGroupId: z.number().int().optional(),
|
|
1207
1476
|
allowsReservation: z.boolean(),
|
|
1208
1477
|
maxPowerKw: z.number().optional(),
|
|
1209
|
-
maxVoltage: z.intersection(z.
|
|
1478
|
+
maxVoltage: z.intersection(z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]), z.unknown()),
|
|
1210
1479
|
maxAmperage: z.number().optional(),
|
|
1211
1480
|
phases: z.enum(["single_phase", "three_phase"]),
|
|
1212
1481
|
phaseRotation: z.enum(["rst", "rts", "srt", "str", "trs", "tsr"]).optional(),
|
|
1213
1482
|
midMeterCertificationEndYear: z.number().int().optional(),
|
|
1214
1483
|
externalId: z.string().optional(),
|
|
1215
|
-
hardwareStatus: z.
|
|
1484
|
+
hardwareStatus: z.enum(["available", "preparing", "charging", "suspendedEV", "suspendedEVSE", "finishing", "reserved", "unavailable", "faulted"]).optional()
|
|
1216
1485
|
});
|
|
1217
1486
|
// GET /public-api/resources/evses/v2.0/{evse}/hardware-status-logs
|
|
1218
|
-
export const listEvseHardwareStatusLogsQueryParams = z.object({
|
|
1219
|
-
filter: z.object({
|
|
1220
|
-
createdAfter: z.string().datetime().optional(),
|
|
1221
|
-
createdBefore: z.unknown().optional()
|
|
1222
|
-
}).optional()
|
|
1223
|
-
});
|
|
1224
1487
|
// GET /public-api/resources/evses/v2.0/{evse}/latest-hardware-status-log
|
|
1225
1488
|
// GET /public-api/resources/evses/v2.1
|
|
1226
|
-
export const evsesListingQueryParams = z.object({
|
|
1227
|
-
filter: z.object({
|
|
1228
|
-
chargePointId: z.string().optional(),
|
|
1229
|
-
physicalReference: z.string().optional(),
|
|
1230
|
-
externalId: z.string().optional(),
|
|
1231
|
-
roaming: z.boolean().optional(),
|
|
1232
|
-
lastUpdatedAfter: z.string().datetime().optional(),
|
|
1233
|
-
lastUpdatedBefore: z.string().datetime().optional()
|
|
1234
|
-
}).optional()
|
|
1235
|
-
});
|
|
1236
1489
|
// POST /public-api/resources/evses/v2.1
|
|
1237
1490
|
export const evseCreateBody = z.object({
|
|
1238
|
-
chargePointId: z.number().int()
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1491
|
+
chargePointId: z.number().int(),
|
|
1492
|
+
physicalReference: z.string(),
|
|
1493
|
+
currentType: z.enum(["ac", "dc"]),
|
|
1494
|
+
label: z.string().optional(),
|
|
1495
|
+
networkId: z.string(),
|
|
1496
|
+
status: z.enum(["enabled", "disabled", "out of order"]),
|
|
1497
|
+
midMeterCertificationEndYear: z.number().int().optional(),
|
|
1498
|
+
tariffGroupId: z.number().int().optional(),
|
|
1499
|
+
allowsReservation: z.boolean().optional(),
|
|
1500
|
+
bookingEnabled: z.boolean().optional(),
|
|
1501
|
+
powerOptions: z.object({
|
|
1502
|
+
maxPower: z.number().int().optional(),
|
|
1503
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
|
|
1504
|
+
maxAmperage: z.number().optional(),
|
|
1505
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
|
|
1506
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
1507
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
1508
|
+
}).optional(),
|
|
1509
|
+
externalId: z.string().optional()
|
|
1510
|
+
});
|
|
1511
|
+
// GET /public-api/resources/evses/v2.1/{evse}
|
|
1512
|
+
// DELETE /public-api/resources/evses/v2.1/{evse}
|
|
1513
|
+
// PATCH /public-api/resources/evses/v2.1/{evse}
|
|
1514
|
+
export const evseUpdateBody = z.object({
|
|
1515
|
+
physicalReference: z.string().optional(),
|
|
1516
|
+
currentType: z.enum(["ac", "dc"]).optional(),
|
|
1517
|
+
label: z.string().optional(),
|
|
1518
|
+
networkId: z.string().optional(),
|
|
1519
|
+
status: z.enum(["enabled", "disabled", "out of order"]).optional(),
|
|
1520
|
+
midMeterCertificationEndYear: z.number().int().optional(),
|
|
1521
|
+
tariffGroupId: z.number().int().optional(),
|
|
1522
|
+
allowsReservation: z.boolean().optional(),
|
|
1523
|
+
bookingEnabled: z.boolean().optional(),
|
|
1524
|
+
powerOptions: z.object({
|
|
1525
|
+
maxPower: z.number().int().optional(),
|
|
1526
|
+
maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
|
|
1527
|
+
maxAmperage: z.number().optional(),
|
|
1528
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
|
|
1529
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
1530
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
|
|
1531
|
+
}).optional(),
|
|
1532
|
+
externalId: z.string().optional()
|
|
1533
|
+
});
|
|
1534
|
+
// GET /public-api/resources/faqs/v2.0
|
|
1245
1535
|
// POST /public-api/resources/faqs/v2.0
|
|
1246
1536
|
export const faqCreateBody = z.object({
|
|
1247
|
-
question: z.
|
|
1537
|
+
question: z.array(z.object({
|
|
1538
|
+
locale: z.string().optional(),
|
|
1539
|
+
translation: z.string().optional()
|
|
1540
|
+
})),
|
|
1248
1541
|
answer: z.array(z.object({
|
|
1249
1542
|
locale: z.string().optional(),
|
|
1250
1543
|
translation: z.string().optional()
|
|
@@ -1254,39 +1547,32 @@ export const faqCreateBody = z.object({
|
|
|
1254
1547
|
// DELETE /public-api/resources/faqs/v2.0/{faq}
|
|
1255
1548
|
// PATCH /public-api/resources/faqs/v2.0/{faq}
|
|
1256
1549
|
export const faqUpdateBody = z.object({
|
|
1257
|
-
question: z.
|
|
1258
|
-
|
|
1550
|
+
question: z.array(z.object({
|
|
1551
|
+
locale: z.string().optional(),
|
|
1552
|
+
translation: z.string().optional()
|
|
1553
|
+
})).optional(),
|
|
1554
|
+
answer: z.array(z.object({
|
|
1555
|
+
locale: z.string().optional(),
|
|
1556
|
+
translation: z.string().optional()
|
|
1557
|
+
})).optional()
|
|
1259
1558
|
});
|
|
1260
1559
|
// GET /public-api/resources/firmware-versions/v1.0
|
|
1261
|
-
export const firmwareVersionsListingQueryParams = z.object({
|
|
1262
|
-
filter: z.object({
|
|
1263
|
-
vendorId: z.array(z.number().int()).optional(),
|
|
1264
|
-
modelId: z.array(z.number().int()).optional(),
|
|
1265
|
-
firmwareVersion: z.string().optional()
|
|
1266
|
-
}).optional(),
|
|
1267
|
-
include: z.array(z.enum(["models"])).optional()
|
|
1268
|
-
});
|
|
1269
1560
|
// GET /public-api/resources/firmware-versions/v1.0/{firmwareVersion}
|
|
1270
1561
|
// GET /public-api/resources/firmware-versions/v1.0/{firmwareVersion}/attached-models
|
|
1271
1562
|
// GET /public-api/resources/flexibility-activation-requests/v1.0
|
|
1272
|
-
export const listFlexibilityActivationRequestsQueryParams = z.object({
|
|
1273
|
-
filter: z.object({
|
|
1274
|
-
assetId: z.string().optional()
|
|
1275
|
-
}).optional()
|
|
1276
|
-
});
|
|
1277
1563
|
// GET /public-api/resources/flexibility-activation-requests/v1.0/{flexibilityActivationRequest}
|
|
1278
1564
|
// GET /public-api/resources/flexibility-assets/v1.0
|
|
1279
|
-
export const listFlexibilityAssetsQueryParams = z.object({
|
|
1280
|
-
filter: z.object({
|
|
1281
|
-
updatedSince: z.string().datetime().optional()
|
|
1282
|
-
}).optional()
|
|
1283
|
-
});
|
|
1284
1565
|
// POST /public-api/resources/flexibility-assets/v1.0
|
|
1285
1566
|
export const createFlexibilityAssetBody = z.object({
|
|
1286
1567
|
id: z.number().optional(),
|
|
1287
1568
|
dlmCircuitId: z.number(),
|
|
1288
1569
|
chargePointId: z.number(),
|
|
1289
1570
|
evseId: z.number(),
|
|
1571
|
+
description: z.string().optional(),
|
|
1572
|
+
downwardRegulationLimit: z.number().int().optional(),
|
|
1573
|
+
upwardRegulationLimit: z.number().int().optional(),
|
|
1574
|
+
integrationId: z.number(),
|
|
1575
|
+
integrationParameters: z.record(z.string()).optional(),
|
|
1290
1576
|
status: z.enum(["enabled", "disabled"]),
|
|
1291
1577
|
endsAt: z.string().datetime().optional()
|
|
1292
1578
|
});
|
|
@@ -1302,15 +1588,6 @@ export const updateFlexibilityAssetBody = z.object({
|
|
|
1302
1588
|
});
|
|
1303
1589
|
// GET /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}/historical-time-series
|
|
1304
1590
|
// GET /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}/time-series-forecast
|
|
1305
|
-
export const getTimeSeriesForecastPathParams = z.object({
|
|
1306
|
-
flexibilityAsset: z.number().int()
|
|
1307
|
-
});
|
|
1308
|
-
export const getTimeSeriesForecastQueryParams = z.object({
|
|
1309
|
-
filter: z.object({
|
|
1310
|
-
startTime: z.string().datetime().optional(),
|
|
1311
|
-
endTime: z.string().datetime().optional()
|
|
1312
|
-
}).optional()
|
|
1313
|
-
});
|
|
1314
1591
|
// GET /public-api/resources/id-tags/v2.0
|
|
1315
1592
|
// POST /public-api/resources/id-tags/v2.0
|
|
1316
1593
|
export const idTagCreateBody = z.object({
|
|
@@ -1326,7 +1603,7 @@ export const idTagCreateBody = z.object({
|
|
|
1326
1603
|
userId: z.number().int().optional(),
|
|
1327
1604
|
externalId: z.string().optional(),
|
|
1328
1605
|
partnerId: z.number().int().optional(),
|
|
1329
|
-
lastUpdatedAt: z.
|
|
1606
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1330
1607
|
});
|
|
1331
1608
|
// GET /public-api/resources/id-tags/v2.0/{idTag}
|
|
1332
1609
|
// DELETE /public-api/resources/id-tags/v2.0/{idTag}
|
|
@@ -1344,17 +1621,17 @@ export const idTagUpdateBody = z.object({
|
|
|
1344
1621
|
userId: z.number().int().optional(),
|
|
1345
1622
|
externalId: z.string().optional(),
|
|
1346
1623
|
partnerId: z.number().int().optional(),
|
|
1347
|
-
lastUpdatedAt: z.
|
|
1624
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1348
1625
|
});
|
|
1349
1626
|
// GET /public-api/resources/installer-jobs/v1.0
|
|
1350
1627
|
// POST /public-api/resources/installer-jobs/v1.0
|
|
1351
1628
|
export const createInstallerJobBody = z.object({
|
|
1352
|
-
installationAndMaintenanceCompanyId: z.number().int()
|
|
1629
|
+
installationAndMaintenanceCompanyId: z.number().int(),
|
|
1630
|
+
installerAdminId: z.number().int().optional(),
|
|
1631
|
+
pin: z.string().min(4).max(12).optional(),
|
|
1632
|
+
description: z.string()
|
|
1353
1633
|
});
|
|
1354
1634
|
// GET /public-api/resources/installer-jobs/v1.0/{installerJob}
|
|
1355
|
-
export const getInstallerJobQueryParams = z.object({
|
|
1356
|
-
include: z.array(z.enum(["chargePoints"])).optional()
|
|
1357
|
-
});
|
|
1358
1635
|
// DELETE /public-api/resources/installer-jobs/v1.0/{installerJob}
|
|
1359
1636
|
// PATCH /public-api/resources/installer-jobs/v1.0/{installerJob}
|
|
1360
1637
|
export const updateInstallerJobBody = z.object({
|
|
@@ -1363,77 +1640,250 @@ export const updateInstallerJobBody = z.object({
|
|
|
1363
1640
|
description: z.string().optional()
|
|
1364
1641
|
});
|
|
1365
1642
|
// GET /public-api/resources/invoices/v1.0
|
|
1366
|
-
export const invoicesListingQueryParams = z.object({
|
|
1367
|
-
filter: z.object({
|
|
1368
|
-
issuedFrom: z.string().optional(),
|
|
1369
|
-
issuedTo: z.string().optional()
|
|
1370
|
-
}).optional()
|
|
1371
|
-
});
|
|
1372
1643
|
// GET /public-api/resources/invoices/v1.0/{invoice}
|
|
1373
|
-
export const invoiceReadPathParams = z.object({
|
|
1374
|
-
invoice: z.string()
|
|
1375
|
-
});
|
|
1376
1644
|
// GET /public-api/resources/locations/v1.0
|
|
1377
1645
|
// POST /public-api/resources/locations/v1.0
|
|
1378
|
-
export const locationCreateDeprecatedBody = z.object({
|
|
1646
|
+
export const locationCreateDeprecatedBody = z.object({
|
|
1647
|
+
id: z.number().int().optional(),
|
|
1648
|
+
public_charge_points: z.number().int().optional(),
|
|
1649
|
+
public_charge_points_ids: z.array(z.number().int()).optional(),
|
|
1650
|
+
name: z.record(z.string()),
|
|
1651
|
+
status: z.enum(["active", "disabled"]).optional(),
|
|
1652
|
+
description: z.record(z.string()).optional(),
|
|
1653
|
+
detailed_description: z.record(z.string()).optional(),
|
|
1654
|
+
additional_description: z.record(z.string()).optional(),
|
|
1655
|
+
geoposition: z.object({
|
|
1656
|
+
latitude: z.number().min(-90).max(90),
|
|
1657
|
+
longitude: z.number().min(-180).max(180)
|
|
1658
|
+
}),
|
|
1659
|
+
address: z.record(z.string()).optional(),
|
|
1660
|
+
post_code: z.string(),
|
|
1661
|
+
region: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.string()]),
|
|
1662
|
+
city: z.string(),
|
|
1663
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]),
|
|
1664
|
+
external_id: z.string().optional(),
|
|
1665
|
+
timezone: z.string().optional(),
|
|
1666
|
+
location_image: z.object({
|
|
1667
|
+
original: z.string(),
|
|
1668
|
+
thumbnail: z.string().optional(),
|
|
1669
|
+
mimeType: z.string()
|
|
1670
|
+
}).optional(),
|
|
1671
|
+
images: z.array(z.object({
|
|
1672
|
+
original: z.string(),
|
|
1673
|
+
thumbnail: z.string().optional(),
|
|
1674
|
+
mimeType: z.string()
|
|
1675
|
+
})).optional(),
|
|
1676
|
+
working_hours: z.object({
|
|
1677
|
+
is_always_open: z.boolean(),
|
|
1678
|
+
stop_session_outside_working_hours: z.boolean().optional(),
|
|
1679
|
+
hours: z.object({
|
|
1680
|
+
monday: z.array(z.object({
|
|
1681
|
+
start: z.string(),
|
|
1682
|
+
end: z.string()
|
|
1683
|
+
})).optional(),
|
|
1684
|
+
tuesday: z.array(z.object({
|
|
1685
|
+
start: z.string(),
|
|
1686
|
+
end: z.string()
|
|
1687
|
+
})).optional(),
|
|
1688
|
+
wednesday: z.array(z.object({
|
|
1689
|
+
start: z.string(),
|
|
1690
|
+
end: z.string()
|
|
1691
|
+
})).optional(),
|
|
1692
|
+
thursday: z.array(z.object({
|
|
1693
|
+
start: z.string(),
|
|
1694
|
+
end: z.string()
|
|
1695
|
+
})).optional(),
|
|
1696
|
+
friday: z.array(z.object({
|
|
1697
|
+
start: z.string(),
|
|
1698
|
+
end: z.string()
|
|
1699
|
+
})).optional(),
|
|
1700
|
+
saturday: z.array(z.object({
|
|
1701
|
+
start: z.string(),
|
|
1702
|
+
end: z.string()
|
|
1703
|
+
})).optional(),
|
|
1704
|
+
sunday: z.array(z.object({
|
|
1705
|
+
start: z.string(),
|
|
1706
|
+
end: z.string()
|
|
1707
|
+
})).optional()
|
|
1708
|
+
}).optional(),
|
|
1709
|
+
always_open_for_user_group_ids: z.array(z.number()).optional()
|
|
1710
|
+
}).optional(),
|
|
1711
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1712
|
+
});
|
|
1379
1713
|
// GET /public-api/resources/locations/v1.0/{location}
|
|
1380
1714
|
// DELETE /public-api/resources/locations/v1.0/{location}
|
|
1381
1715
|
// PATCH /public-api/resources/locations/v1.0/{location}
|
|
1382
|
-
export const locationUpdateDeprecatedBody = z.
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1716
|
+
export const locationUpdateDeprecatedBody = z.object({
|
|
1717
|
+
id: z.number().int().optional(),
|
|
1718
|
+
public_charge_points: z.number().int().optional(),
|
|
1719
|
+
public_charge_points_ids: z.array(z.number().int()).optional(),
|
|
1720
|
+
name: z.record(z.string()).optional(),
|
|
1721
|
+
status: z.enum(["active", "disabled"]).optional(),
|
|
1722
|
+
description: z.record(z.string()).optional(),
|
|
1723
|
+
detailed_description: z.record(z.string()).optional(),
|
|
1724
|
+
additional_description: z.record(z.string()).optional(),
|
|
1725
|
+
geoposition: z.object({
|
|
1726
|
+
latitude: z.number().min(-90).max(90),
|
|
1727
|
+
longitude: z.number().min(-180).max(180)
|
|
1728
|
+
}).optional(),
|
|
1729
|
+
address: z.record(z.string()).optional(),
|
|
1730
|
+
post_code: z.string().optional(),
|
|
1731
|
+
region: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.string()]).optional(),
|
|
1732
|
+
city: z.string().optional(),
|
|
1733
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
1734
|
+
external_id: z.string().optional(),
|
|
1735
|
+
timezone: z.string().optional(),
|
|
1736
|
+
location_image: z.object({
|
|
1737
|
+
original: z.string(),
|
|
1738
|
+
thumbnail: z.string().optional(),
|
|
1739
|
+
mimeType: z.string()
|
|
1740
|
+
}).optional(),
|
|
1741
|
+
images: z.array(z.object({
|
|
1742
|
+
original: z.string(),
|
|
1743
|
+
thumbnail: z.string().optional(),
|
|
1744
|
+
mimeType: z.string()
|
|
1745
|
+
})).optional(),
|
|
1746
|
+
working_hours: z.object({
|
|
1747
|
+
is_always_open: z.boolean(),
|
|
1748
|
+
stop_session_outside_working_hours: z.boolean().optional(),
|
|
1749
|
+
hours: z.object({
|
|
1750
|
+
monday: z.array(z.object({
|
|
1751
|
+
start: z.string(),
|
|
1752
|
+
end: z.string()
|
|
1753
|
+
})).optional(),
|
|
1754
|
+
tuesday: z.array(z.object({
|
|
1755
|
+
start: z.string(),
|
|
1756
|
+
end: z.string()
|
|
1757
|
+
})).optional(),
|
|
1758
|
+
wednesday: z.array(z.object({
|
|
1759
|
+
start: z.string(),
|
|
1760
|
+
end: z.string()
|
|
1761
|
+
})).optional(),
|
|
1762
|
+
thursday: z.array(z.object({
|
|
1763
|
+
start: z.string(),
|
|
1764
|
+
end: z.string()
|
|
1765
|
+
})).optional(),
|
|
1766
|
+
friday: z.array(z.object({
|
|
1767
|
+
start: z.string(),
|
|
1768
|
+
end: z.string()
|
|
1769
|
+
})).optional(),
|
|
1770
|
+
saturday: z.array(z.object({
|
|
1771
|
+
start: z.string(),
|
|
1772
|
+
end: z.string()
|
|
1773
|
+
})).optional(),
|
|
1774
|
+
sunday: z.array(z.object({
|
|
1775
|
+
start: z.string(),
|
|
1776
|
+
end: z.string()
|
|
1777
|
+
})).optional()
|
|
1778
|
+
}).optional(),
|
|
1779
|
+
always_open_for_user_group_ids: z.array(z.number()).optional()
|
|
1780
|
+
}).optional(),
|
|
1781
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1396
1782
|
});
|
|
1783
|
+
// GET /public-api/resources/locations/v2.0
|
|
1397
1784
|
// POST /public-api/resources/locations/v2.0
|
|
1398
1785
|
export const locationCreateBody = z.object({
|
|
1399
1786
|
id: z.number().int().optional(),
|
|
1400
|
-
name: z.
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1787
|
+
name: z.array(z.object({
|
|
1788
|
+
locale: z.string().optional(),
|
|
1789
|
+
translation: z.string().optional()
|
|
1790
|
+
})),
|
|
1791
|
+
shortDescription: z.array(z.object({
|
|
1792
|
+
locale: z.string().optional(),
|
|
1793
|
+
translation: z.string().optional()
|
|
1794
|
+
})).optional(),
|
|
1795
|
+
description: z.array(z.object({
|
|
1796
|
+
locale: z.string().optional(),
|
|
1797
|
+
translation: z.string().optional()
|
|
1798
|
+
})).optional(),
|
|
1799
|
+
additionalDescription: z.array(z.object({
|
|
1800
|
+
locale: z.string().optional(),
|
|
1801
|
+
translation: z.string().optional()
|
|
1802
|
+
})).optional(),
|
|
1803
|
+
locationImage: z.object({
|
|
1804
|
+
original: z.string(),
|
|
1805
|
+
thumbnail: z.string().optional(),
|
|
1806
|
+
mimeType: z.string()
|
|
1807
|
+
}).optional(),
|
|
1808
|
+
images: z.array(z.object({
|
|
1809
|
+
original: z.string(),
|
|
1810
|
+
thumbnail: z.string().optional(),
|
|
1811
|
+
mimeType: z.string()
|
|
1812
|
+
})).optional(),
|
|
1406
1813
|
geoposition: z.object({
|
|
1407
1814
|
latitude: z.number().min(-90).max(90),
|
|
1408
1815
|
longitude: z.number().min(-180).max(180)
|
|
1409
1816
|
}),
|
|
1410
|
-
address: z.
|
|
1411
|
-
|
|
1817
|
+
address: z.array(z.object({
|
|
1818
|
+
locale: z.string().optional(),
|
|
1819
|
+
translation: z.string().optional()
|
|
1820
|
+
})),
|
|
1821
|
+
streetAddress: z.array(z.object({
|
|
1822
|
+
locale: z.string().optional(),
|
|
1823
|
+
translation: z.string().optional()
|
|
1824
|
+
})).optional(),
|
|
1412
1825
|
city: z.string().optional(),
|
|
1413
|
-
region: z.
|
|
1414
|
-
state: z.
|
|
1415
|
-
country: z.
|
|
1826
|
+
region: z.string().optional(),
|
|
1827
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.enum(["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"]), z.enum(["81", "84", "85", "67", "89", "71", "76", "95", "79"]), z.enum(["AB", "AR", "AG", "BC", "BH", "BN", "BT", "BV", "BR", "B", "BZ", "CL", "CS", "CT", "CV", "DB", "DJ", "GL", "GR", "GJ", "HR", "HD", "IL", "IS", "IF", "MM", "MH", "MS", "NT", "OT", "PH", "SM", "SJ", "SB", "SV", "TR", "TM", "TL", "VS", "VL", "VN"])]).optional(),
|
|
1828
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]),
|
|
1416
1829
|
postCode: z.string().optional(),
|
|
1417
1830
|
workingHours: z.object({
|
|
1418
1831
|
isAlwaysOpen: z.boolean().optional(),
|
|
1419
1832
|
stopSessionOutsideWorkingHours: z.boolean().optional(),
|
|
1420
1833
|
alwaysOpenForUserGroupIds: z.array(z.number()).optional(),
|
|
1421
1834
|
hours: z.object({
|
|
1422
|
-
monday: z.
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1835
|
+
monday: z.array(z.object({
|
|
1836
|
+
start: z.string(),
|
|
1837
|
+
end: z.string()
|
|
1838
|
+
})).optional(),
|
|
1839
|
+
tuesday: z.array(z.object({
|
|
1840
|
+
start: z.string(),
|
|
1841
|
+
end: z.string()
|
|
1842
|
+
})).optional(),
|
|
1843
|
+
wednesday: z.array(z.object({
|
|
1844
|
+
start: z.string(),
|
|
1845
|
+
end: z.string()
|
|
1846
|
+
})).optional(),
|
|
1847
|
+
thursday: z.array(z.object({
|
|
1848
|
+
start: z.string(),
|
|
1849
|
+
end: z.string()
|
|
1850
|
+
})).optional(),
|
|
1851
|
+
friday: z.array(z.object({
|
|
1852
|
+
start: z.string(),
|
|
1853
|
+
end: z.string()
|
|
1854
|
+
})).optional(),
|
|
1855
|
+
saturday: z.array(z.object({
|
|
1856
|
+
start: z.string(),
|
|
1857
|
+
end: z.string()
|
|
1858
|
+
})).optional(),
|
|
1859
|
+
sunday: z.array(z.object({
|
|
1860
|
+
start: z.string(),
|
|
1861
|
+
end: z.string()
|
|
1862
|
+
})).optional()
|
|
1429
1863
|
}).optional()
|
|
1430
1864
|
}).optional(),
|
|
1431
1865
|
timezone: z.string().optional(),
|
|
1432
1866
|
externalId: z.string().optional(),
|
|
1433
1867
|
roamingOperatorId: z.number().int().optional(),
|
|
1434
1868
|
lastUpdatedAt: z.string().datetime().optional(),
|
|
1435
|
-
chargingZones: z.array(z.
|
|
1436
|
-
|
|
1869
|
+
chargingZones: z.array(z.object({
|
|
1870
|
+
id: z.number().int().optional(),
|
|
1871
|
+
name: z.string().optional(),
|
|
1872
|
+
locationId: z.number().int().optional(),
|
|
1873
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
1874
|
+
additionalInfo: z.object({
|
|
1875
|
+
enabled: z.boolean().optional(),
|
|
1876
|
+
title: z.array(z.object({
|
|
1877
|
+
locale: z.string().optional(),
|
|
1878
|
+
translation: z.string().optional()
|
|
1879
|
+
})).optional(),
|
|
1880
|
+
description: z.array(z.object({
|
|
1881
|
+
locale: z.string().optional(),
|
|
1882
|
+
translation: z.string().optional()
|
|
1883
|
+
})).optional()
|
|
1884
|
+
}).optional()
|
|
1885
|
+
})).optional(),
|
|
1886
|
+
externalAppData: z.record(z.unknown()).optional(),
|
|
1437
1887
|
roaming: z.object({
|
|
1438
1888
|
owner: z.object({
|
|
1439
1889
|
name: z.string().optional()
|
|
@@ -1452,43 +1902,106 @@ export const locationCreateBody = z.object({
|
|
|
1452
1902
|
// PATCH /public-api/resources/locations/v2.0/{location}
|
|
1453
1903
|
export const locationUpdateBody = z.object({
|
|
1454
1904
|
id: z.number().int().optional(),
|
|
1455
|
-
name: z.
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1905
|
+
name: z.array(z.object({
|
|
1906
|
+
locale: z.string().optional(),
|
|
1907
|
+
translation: z.string().optional()
|
|
1908
|
+
})).optional(),
|
|
1909
|
+
shortDescription: z.array(z.object({
|
|
1910
|
+
locale: z.string().optional(),
|
|
1911
|
+
translation: z.string().optional()
|
|
1912
|
+
})).optional(),
|
|
1913
|
+
description: z.array(z.object({
|
|
1914
|
+
locale: z.string().optional(),
|
|
1915
|
+
translation: z.string().optional()
|
|
1916
|
+
})).optional(),
|
|
1917
|
+
additionalDescription: z.array(z.object({
|
|
1918
|
+
locale: z.string().optional(),
|
|
1919
|
+
translation: z.string().optional()
|
|
1920
|
+
})).optional(),
|
|
1921
|
+
locationImage: z.object({
|
|
1922
|
+
original: z.string(),
|
|
1923
|
+
thumbnail: z.string().optional(),
|
|
1924
|
+
mimeType: z.string()
|
|
1925
|
+
}).optional(),
|
|
1926
|
+
images: z.array(z.object({
|
|
1927
|
+
original: z.string(),
|
|
1928
|
+
thumbnail: z.string().optional(),
|
|
1929
|
+
mimeType: z.string()
|
|
1930
|
+
})).optional(),
|
|
1461
1931
|
geoposition: z.object({
|
|
1462
1932
|
latitude: z.number().min(-90).max(90),
|
|
1463
1933
|
longitude: z.number().min(-180).max(180)
|
|
1464
1934
|
}).optional(),
|
|
1465
|
-
address: z.
|
|
1466
|
-
|
|
1935
|
+
address: z.array(z.object({
|
|
1936
|
+
locale: z.string().optional(),
|
|
1937
|
+
translation: z.string().optional()
|
|
1938
|
+
})).optional(),
|
|
1939
|
+
streetAddress: z.array(z.object({
|
|
1940
|
+
locale: z.string().optional(),
|
|
1941
|
+
translation: z.string().optional()
|
|
1942
|
+
})).optional(),
|
|
1467
1943
|
city: z.string().optional(),
|
|
1468
|
-
region: z.
|
|
1469
|
-
state: z.
|
|
1470
|
-
country: z.
|
|
1944
|
+
region: z.string().optional(),
|
|
1945
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.enum(["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"]), z.enum(["81", "84", "85", "67", "89", "71", "76", "95", "79"]), z.enum(["AB", "AR", "AG", "BC", "BH", "BN", "BT", "BV", "BR", "B", "BZ", "CL", "CS", "CT", "CV", "DB", "DJ", "GL", "GR", "GJ", "HR", "HD", "IL", "IS", "IF", "MM", "MH", "MS", "NT", "OT", "PH", "SM", "SJ", "SB", "SV", "TR", "TM", "TL", "VS", "VL", "VN"])]).optional(),
|
|
1946
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
1471
1947
|
postCode: z.string().optional(),
|
|
1472
1948
|
workingHours: z.object({
|
|
1473
1949
|
isAlwaysOpen: z.boolean().optional(),
|
|
1474
1950
|
stopSessionOutsideWorkingHours: z.boolean().optional(),
|
|
1475
1951
|
alwaysOpenForUserGroupIds: z.array(z.number()).optional(),
|
|
1476
1952
|
hours: z.object({
|
|
1477
|
-
monday: z.
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1953
|
+
monday: z.array(z.object({
|
|
1954
|
+
start: z.string(),
|
|
1955
|
+
end: z.string()
|
|
1956
|
+
})).optional(),
|
|
1957
|
+
tuesday: z.array(z.object({
|
|
1958
|
+
start: z.string(),
|
|
1959
|
+
end: z.string()
|
|
1960
|
+
})).optional(),
|
|
1961
|
+
wednesday: z.array(z.object({
|
|
1962
|
+
start: z.string(),
|
|
1963
|
+
end: z.string()
|
|
1964
|
+
})).optional(),
|
|
1965
|
+
thursday: z.array(z.object({
|
|
1966
|
+
start: z.string(),
|
|
1967
|
+
end: z.string()
|
|
1968
|
+
})).optional(),
|
|
1969
|
+
friday: z.array(z.object({
|
|
1970
|
+
start: z.string(),
|
|
1971
|
+
end: z.string()
|
|
1972
|
+
})).optional(),
|
|
1973
|
+
saturday: z.array(z.object({
|
|
1974
|
+
start: z.string(),
|
|
1975
|
+
end: z.string()
|
|
1976
|
+
})).optional(),
|
|
1977
|
+
sunday: z.array(z.object({
|
|
1978
|
+
start: z.string(),
|
|
1979
|
+
end: z.string()
|
|
1980
|
+
})).optional()
|
|
1484
1981
|
}).optional()
|
|
1485
1982
|
}).optional(),
|
|
1486
1983
|
timezone: z.string().optional(),
|
|
1487
1984
|
externalId: z.string().optional(),
|
|
1488
1985
|
roamingOperatorId: z.number().int().optional(),
|
|
1489
1986
|
lastUpdatedAt: z.string().datetime().optional(),
|
|
1490
|
-
chargingZones: z.array(z.
|
|
1491
|
-
|
|
1987
|
+
chargingZones: z.array(z.object({
|
|
1988
|
+
id: z.number().int().optional(),
|
|
1989
|
+
name: z.string().optional(),
|
|
1990
|
+
locationId: z.number().int().optional(),
|
|
1991
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
1992
|
+
additionalInfo: z.object({
|
|
1993
|
+
enabled: z.boolean().optional(),
|
|
1994
|
+
title: z.array(z.object({
|
|
1995
|
+
locale: z.string().optional(),
|
|
1996
|
+
translation: z.string().optional()
|
|
1997
|
+
})).optional(),
|
|
1998
|
+
description: z.array(z.object({
|
|
1999
|
+
locale: z.string().optional(),
|
|
2000
|
+
translation: z.string().optional()
|
|
2001
|
+
})).optional()
|
|
2002
|
+
}).optional()
|
|
2003
|
+
})).optional(),
|
|
2004
|
+
externalAppData: z.record(z.unknown()).optional(),
|
|
1492
2005
|
roaming: z.object({
|
|
1493
2006
|
owner: z.object({
|
|
1494
2007
|
name: z.string().optional()
|
|
@@ -1511,8 +2024,14 @@ export const locationChargingZoneCreateBody = z.object({
|
|
|
1511
2024
|
status: z.enum(["enabled", "disabled"]),
|
|
1512
2025
|
additionalInfo: z.object({
|
|
1513
2026
|
enabled: z.boolean().optional(),
|
|
1514
|
-
title: z.
|
|
1515
|
-
|
|
2027
|
+
title: z.array(z.object({
|
|
2028
|
+
locale: z.string().optional(),
|
|
2029
|
+
translation: z.string().optional()
|
|
2030
|
+
})).optional(),
|
|
2031
|
+
description: z.array(z.object({
|
|
2032
|
+
locale: z.string().optional(),
|
|
2033
|
+
translation: z.string().optional()
|
|
2034
|
+
})).optional()
|
|
1516
2035
|
}).optional()
|
|
1517
2036
|
});
|
|
1518
2037
|
// GET /public-api/resources/locations/v2.0/{location}/charging-zones/{chargingZone}
|
|
@@ -1525,18 +2044,17 @@ export const locationChargingZoneUpdateBody = z.object({
|
|
|
1525
2044
|
status: z.enum(["enabled", "disabled"]).optional(),
|
|
1526
2045
|
additionalInfo: z.object({
|
|
1527
2046
|
enabled: z.boolean().optional(),
|
|
1528
|
-
title: z.
|
|
1529
|
-
|
|
2047
|
+
title: z.array(z.object({
|
|
2048
|
+
locale: z.string().optional(),
|
|
2049
|
+
translation: z.string().optional()
|
|
2050
|
+
})).optional(),
|
|
2051
|
+
description: z.array(z.object({
|
|
2052
|
+
locale: z.string().optional(),
|
|
2053
|
+
translation: z.string().optional()
|
|
2054
|
+
})).optional()
|
|
1530
2055
|
}).optional()
|
|
1531
2056
|
});
|
|
1532
2057
|
// GET /public-api/resources/parking-spaces/v1.0
|
|
1533
|
-
export const listParkingSpaceQueryParams = z.object({
|
|
1534
|
-
filter: z.object({
|
|
1535
|
-
externalId: z.string().optional(),
|
|
1536
|
-
evseId: z.string().optional()
|
|
1537
|
-
}).optional(),
|
|
1538
|
-
include: z.array(z.enum(["evses"])).optional()
|
|
1539
|
-
});
|
|
1540
2058
|
// POST /public-api/resources/parking-spaces/v1.0
|
|
1541
2059
|
export const createParkingSpaceBody = z.object({
|
|
1542
2060
|
label: z.string(),
|
|
@@ -1592,44 +2110,47 @@ export const partnerContractCreateBody = z.object({
|
|
|
1592
2110
|
perAcEvse: z.number().optional(),
|
|
1593
2111
|
perDcEvse: z.number().optional()
|
|
1594
2112
|
}).optional(),
|
|
1595
|
-
lastUpdatedAt: z.
|
|
2113
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1596
2114
|
});
|
|
1597
2115
|
// GET /public-api/resources/partner-contracts/v1.0/{partnerContract}
|
|
1598
2116
|
// PUT /public-api/resources/partner-contracts/v1.0/{partnerContract}
|
|
1599
|
-
export const partnerContractUpdateBody = z.
|
|
2117
|
+
export const partnerContractUpdateBody = z.object({
|
|
2118
|
+
id: z.number().int().optional(),
|
|
2119
|
+
title: z.string(),
|
|
2120
|
+
partnerId: z.number().int(),
|
|
2121
|
+
startDate: z.string().datetime(),
|
|
2122
|
+
endDate: z.string().datetime().optional(),
|
|
2123
|
+
autoRenewal: z.boolean().optional(),
|
|
2124
|
+
accessAndPermissions: z.object({
|
|
2125
|
+
sessionsRemoteControl: z.boolean().optional(),
|
|
2126
|
+
startReservation: z.boolean().optional(),
|
|
2127
|
+
stopReservation: z.boolean().optional(),
|
|
2128
|
+
resetChargePoint: z.boolean().optional(),
|
|
2129
|
+
firmwareUpdate: z.boolean().optional()
|
|
2130
|
+
}).optional(),
|
|
2131
|
+
revenueSharing: z.object({
|
|
2132
|
+
partnerSharePercentageAcEvse: z.number().min(0).max(100).optional(),
|
|
2133
|
+
partnerSharePercentageDcEvse: z.number().min(0).max(100).optional(),
|
|
2134
|
+
excludeConnectionFee: z.boolean().optional(),
|
|
2135
|
+
deductElectricityCost: z.boolean().optional(),
|
|
2136
|
+
reimburseForElectricityCost: z.boolean().optional(),
|
|
2137
|
+
fixedFeePerSessionAc: z.number().optional(),
|
|
2138
|
+
fixedFeePerSessionDc: z.number().optional(),
|
|
2139
|
+
feePerKwhAc: z.number().optional(),
|
|
2140
|
+
feePerKwhDc: z.number().optional(),
|
|
2141
|
+
handlingFee: z.number().min(0).max(100).optional()
|
|
2142
|
+
}).optional(),
|
|
2143
|
+
monthlyPlatformFees: z.object({
|
|
2144
|
+
perChargePoint: z.number().optional(),
|
|
2145
|
+
perAcEvse: z.number().optional(),
|
|
2146
|
+
perDcEvse: z.number().optional()
|
|
2147
|
+
}).optional(),
|
|
2148
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2149
|
+
});
|
|
1600
2150
|
// DELETE /public-api/resources/partner-contracts/v1.0/{partnerContract}
|
|
1601
2151
|
// GET /public-api/resources/partner-expenses/v1.0
|
|
1602
|
-
export const expensesListingDeprecatedQueryParams = z.object({
|
|
1603
|
-
filter: z.object({
|
|
1604
|
-
partnerId: z.string().optional(),
|
|
1605
|
-
dateFrom: z.string().datetime().optional(),
|
|
1606
|
-
dateTo: z.string().datetime().optional(),
|
|
1607
|
-
origin: z.enum(["platform-fee-emsp", "platform-fee-cpo", "user-custom-fee", "session-emsp"]).optional(),
|
|
1608
|
-
currency: z.string().min(3).max(3).optional()
|
|
1609
|
-
}).optional()
|
|
1610
|
-
});
|
|
1611
2152
|
// GET /public-api/resources/partner-expenses/v1.1
|
|
1612
|
-
export const expensesListingQueryParams = z.object({
|
|
1613
|
-
filter: z.object({
|
|
1614
|
-
partnerId: z.string().optional(),
|
|
1615
|
-
settlementReportId: z.string().optional(),
|
|
1616
|
-
dateBefore: z.string().datetime().optional(),
|
|
1617
|
-
dateAfter: z.string().datetime().optional(),
|
|
1618
|
-
origin: z.enum(["platform-fee-emsp", "platform-fee-cpo", "user-custom-fee", "session-emsp"]).optional(),
|
|
1619
|
-
currencyCode: z.string().min(3).max(3).optional()
|
|
1620
|
-
}).optional()
|
|
1621
|
-
});
|
|
1622
2153
|
// GET /public-api/resources/partner-invites/v1.0
|
|
1623
|
-
export const partnerInvitesListingQueryParams = z.object({
|
|
1624
|
-
filter: z.object({
|
|
1625
|
-
partnerId: z.string().optional(),
|
|
1626
|
-
status: z.enum(["pending", "sent", "accepted"]).optional(),
|
|
1627
|
-
createdFrom: z.string().datetime().optional(),
|
|
1628
|
-
createdTo: z.string().datetime().optional(),
|
|
1629
|
-
userId: z.string().optional(),
|
|
1630
|
-
inviteEmail: z.string().email().optional()
|
|
1631
|
-
}).optional()
|
|
1632
|
-
});
|
|
1633
2154
|
// POST /public-api/resources/partner-invites/v1.0
|
|
1634
2155
|
export const partnerInviteCreateBody = z.object({
|
|
1635
2156
|
partnerId: z.number().int(),
|
|
@@ -1644,9 +2165,6 @@ export const partnerInviteCreateBody = z.object({
|
|
|
1644
2165
|
}).optional()
|
|
1645
2166
|
});
|
|
1646
2167
|
// GET /public-api/resources/partner-invites/v1.0/{partnerInvite}
|
|
1647
|
-
export const partnerInviteReadPathParams = z.object({
|
|
1648
|
-
partnerInvite: z.number().int()
|
|
1649
|
-
});
|
|
1650
2168
|
// DELETE /public-api/resources/partner-invites/v1.0/{partnerInvite}
|
|
1651
2169
|
// PATCH /public-api/resources/partner-invites/v1.0/{partnerInvite}
|
|
1652
2170
|
export const partnerInviteUpdateBody = z.object({
|
|
@@ -1662,38 +2180,9 @@ export const partnerInviteUpdateBody = z.object({
|
|
|
1662
2180
|
}).optional()
|
|
1663
2181
|
});
|
|
1664
2182
|
// GET /public-api/resources/partner-revenues/v1.0
|
|
1665
|
-
export const revenuesListingDeprecatedQueryParams = z.object({
|
|
1666
|
-
filter: z.object({
|
|
1667
|
-
partnerId: z.string().optional(),
|
|
1668
|
-
dateFrom: z.string().datetime().optional(),
|
|
1669
|
-
dateTo: z.string().datetime().optional(),
|
|
1670
|
-
origin: z.enum(["electricity-tax-reimbursement", "session-cpo"]).optional(),
|
|
1671
|
-
currency: z.string().min(3).max(3).optional()
|
|
1672
|
-
}).optional()
|
|
1673
|
-
});
|
|
1674
2183
|
// GET /public-api/resources/partner-revenues/v1.1
|
|
1675
|
-
export const revenuesListingQueryParams = z.object({
|
|
1676
|
-
filter: z.object({
|
|
1677
|
-
partnerId: z.string().optional(),
|
|
1678
|
-
settlementReportId: z.string().optional(),
|
|
1679
|
-
dateBefore: z.string().datetime().optional(),
|
|
1680
|
-
dateAfter: z.string().datetime().optional(),
|
|
1681
|
-
origin: z.enum(["electricity-tax-reimbursement", "session-cpo"]).optional(),
|
|
1682
|
-
currencyCode: z.string().min(3).max(3).optional()
|
|
1683
|
-
}).optional()
|
|
1684
|
-
});
|
|
1685
2184
|
// GET /public-api/resources/partner-settlement-reports/v1.0
|
|
1686
|
-
export const partnerSettlementReportsListingQueryParams = z.object({
|
|
1687
|
-
filter: z.object({
|
|
1688
|
-
partnerId: z.number().int().optional(),
|
|
1689
|
-
periodAfter: z.string().optional(),
|
|
1690
|
-
periodBefore: z.string().optional()
|
|
1691
|
-
}).optional()
|
|
1692
|
-
});
|
|
1693
2185
|
// GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}
|
|
1694
|
-
export const partnerSettlementReportReadPathParams = z.object({
|
|
1695
|
-
partnerSettlementReport: z.number().int()
|
|
1696
|
-
});
|
|
1697
2186
|
// GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records
|
|
1698
2187
|
// POST /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records
|
|
1699
2188
|
export const partnerSettlementReportPartnerSettlementRecordCreateBody = z.object({
|
|
@@ -1702,20 +2191,14 @@ export const partnerSettlementReportPartnerSettlementRecordCreateBody = z.object
|
|
|
1702
2191
|
note: z.string()
|
|
1703
2192
|
});
|
|
1704
2193
|
// GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
|
|
1705
|
-
export const partnertSettlementReportPartnerSettlementRecordReadPathParams = z.object({
|
|
1706
|
-
PartnerSettlementRecord: z.number().int()
|
|
1707
|
-
});
|
|
1708
2194
|
// PUT /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
|
|
1709
|
-
export const partnerSettlementReportPartnerSettlementRecordUpdateBody = z.
|
|
2195
|
+
export const partnerSettlementReportPartnerSettlementRecordUpdateBody = z.object({
|
|
2196
|
+
date: z.string(),
|
|
2197
|
+
paidAmount: z.number(),
|
|
2198
|
+
note: z.string()
|
|
2199
|
+
});
|
|
1710
2200
|
// DELETE /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
|
|
1711
2201
|
// GET /public-api/resources/partners/v1.0
|
|
1712
|
-
export const partnersListingDeprecatedQueryParams = z.object({
|
|
1713
|
-
filter: z.object({
|
|
1714
|
-
country: z.unknown().optional(),
|
|
1715
|
-
regNo: z.string().optional(),
|
|
1716
|
-
externalId: z.string().optional()
|
|
1717
|
-
}).optional()
|
|
1718
|
-
});
|
|
1719
2202
|
// POST /public-api/resources/partners/v1.0
|
|
1720
2203
|
export const partnerCreateDeprecatedBody = z.object({
|
|
1721
2204
|
id: z.number().int().optional(),
|
|
@@ -1744,15 +2227,40 @@ export const partnerCreateDeprecatedBody = z.object({
|
|
|
1744
2227
|
discount: z.number().optional()
|
|
1745
2228
|
}).optional(),
|
|
1746
2229
|
externalId: z.string().optional(),
|
|
1747
|
-
lastUpdatedAt: z.
|
|
2230
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1748
2231
|
});
|
|
1749
2232
|
// GET /public-api/resources/partners/v1.0/{partner}
|
|
1750
|
-
export const partnerReadDeprecatedPathParams = z.object({
|
|
1751
|
-
partner: z.number().int()
|
|
1752
|
-
});
|
|
1753
2233
|
// DELETE /public-api/resources/partners/v1.0/{partner}
|
|
1754
2234
|
// PATCH /public-api/resources/partners/v1.0/{partner}
|
|
1755
|
-
export const partnerUpdateDeprecatedBody = z.
|
|
2235
|
+
export const partnerUpdateDeprecatedBody = z.object({
|
|
2236
|
+
id: z.number().int().optional(),
|
|
2237
|
+
name: z.string(),
|
|
2238
|
+
regNo: z.string().optional(),
|
|
2239
|
+
vatNo: z.string().optional(),
|
|
2240
|
+
country: z.union([z.literal("AF"), z.literal("AX"), z.literal("AL"), z.literal("DZ"), z.literal("AS"), z.literal("AD"), z.literal("AO"), z.literal("AI"), z.literal("AQ"), z.literal("AG"), z.literal("AR"), z.literal("AM"), z.literal("AW"), z.literal("AU"), z.literal("AT"), z.literal("AZ"), z.literal("BS"), z.literal("BH"), z.literal("BD"), z.literal("BB"), z.literal("BY"), z.literal("BE"), z.literal("BZ"), z.literal("BJ"), z.literal("BM"), z.literal("BT"), z.literal("BO"), z.literal("BQ"), z.literal("BA"), z.literal("BW"), z.literal("BV"), z.literal("BR"), z.literal("IO"), z.literal("BN"), z.literal("BG"), z.literal("BF"), z.literal("BI"), z.literal("KH"), z.literal("CM"), z.literal("CA"), z.literal("CV"), z.literal("KY"), z.literal("CF"), z.literal("TD"), z.literal("CL"), z.literal("CN"), z.literal("CX"), z.literal("CC"), z.literal("CO"), z.literal("KM"), z.literal("CG"), z.literal("CD"), z.literal("CK"), z.literal("CR"), z.literal("CI"), z.literal("HR"), z.literal("CU"), z.literal("CW"), z.literal("CY"), z.literal("CZ"), z.literal("DK"), z.literal("DJ"), z.literal("DM"), z.literal("DO"), z.literal("EC"), z.literal("EG"), z.literal("SV"), z.literal("GQ"), z.literal("ER"), z.literal("EE"), z.literal("ET"), z.literal("FK"), z.literal("FO"), z.literal("FJ"), z.literal("FI"), z.literal("FR"), z.literal("GF"), z.literal("PF"), z.literal("TF"), z.literal("GA"), z.literal("GM"), z.literal("GE"), z.literal("DE"), z.literal("GH"), z.literal("GI"), z.literal("GR"), z.literal("GL"), z.literal("GD"), z.literal("GP"), z.literal("GU"), z.literal("GT"), z.literal("GG"), z.literal("GN"), z.literal("GW"), z.literal("GY"), z.literal("HT"), z.literal("HM"), z.literal("VA"), z.literal("HN"), z.literal("HK"), z.literal("HU"), z.literal("IS"), z.literal("IN"), z.literal("ID"), z.literal("IR"), z.literal("IQ"), z.literal("IE"), z.literal("IM"), z.literal("IL"), z.literal("IT"), z.literal("JM"), z.literal("JP"), z.literal("JE"), z.literal("JO"), z.literal("KZ"), z.literal("KE"), z.literal("KI"), z.literal("KP"), z.literal("KR"), z.literal("XK"), z.literal("KW"), z.literal("KG"), z.literal("LA"), z.literal("LV"), z.literal("LB"), z.literal("LS"), z.literal("LR"), z.literal("LY"), z.literal("LI"), z.literal("LT"), z.literal("LU"), z.literal("MO"), z.literal("MK"), z.literal("MG"), z.literal("MW"), z.literal("MY"), z.literal("MV"), z.literal("ML"), z.literal("MT"), z.literal("MH"), z.literal("MQ"), z.literal("MR"), z.literal("MU"), z.literal("YT"), z.literal("MX"), z.literal("FM"), z.literal("MD"), z.literal("MC"), z.literal("MN"), z.literal("ME"), z.literal("MS"), z.literal("MA"), z.literal("MZ"), z.literal("MM"), z.literal("NA"), z.literal("NR"), z.literal("NP"), z.literal("NL"), z.literal("NC"), z.literal("NZ"), z.literal("NI"), z.literal("NE"), z.literal("NG"), z.literal("NU"), z.literal("NF"), z.literal("MP"), z.literal("NO"), z.literal("OM"), z.literal("PK"), z.literal("PW"), z.literal("PS"), z.literal("PA"), z.literal("PG"), z.literal("PY"), z.literal("PE"), z.literal("PH"), z.literal("PN"), z.literal("PL"), z.literal("PT"), z.literal("PR"), z.literal("QA"), z.literal("RE"), z.literal("RO"), z.literal("RU"), z.literal("RW"), z.literal("BL"), z.literal("SH"), z.literal("KN"), z.literal("LC"), z.literal("MF"), z.literal("PM"), z.literal("VC"), z.literal("WS"), z.literal("SM"), z.literal("ST"), z.literal("SA"), z.literal("SN"), z.literal("RS"), z.literal("SC"), z.literal("SL"), z.literal("SG"), z.literal("SX"), z.literal("SK"), z.literal("SI"), z.literal("SB"), z.literal("SO"), z.literal("ZA"), z.literal("GS"), z.literal("SS"), z.literal("ES"), z.literal("LK"), z.literal("SD"), z.literal("SR"), z.literal("SJ"), z.literal("SZ"), z.literal("SE"), z.literal("CH"), z.literal("SY"), z.literal("TW"), z.literal("TJ"), z.literal("TZ"), z.literal("TH"), z.literal("TL"), z.literal("TG"), z.literal("TK"), z.literal("TO"), z.literal("TT"), z.literal("TN"), z.literal("TR"), z.literal("TM"), z.literal("TC"), z.literal("TV"), z.literal("UG"), z.literal("UA"), z.literal("AE"), z.literal("GB"), z.literal("US"), z.literal("UM"), z.literal("UY"), z.literal("UZ"), z.literal("VU"), z.literal("VE"), z.literal("VN"), z.literal("VG"), z.literal("VI"), z.literal("WF"), z.literal("EH"), z.literal("YE"), z.literal("ZM"), z.literal("ZW"), z.null()]).optional(),
|
|
2241
|
+
city: z.string().optional(),
|
|
2242
|
+
postcode: z.string().optional(),
|
|
2243
|
+
address: z.string().optional(),
|
|
2244
|
+
contactPerson: z.string().optional(),
|
|
2245
|
+
email: z.string().email().optional(),
|
|
2246
|
+
phone: z.string().optional(),
|
|
2247
|
+
faultNotificationsEmail: z.string().email().optional(),
|
|
2248
|
+
monthlyPlatformFee: z.number().optional(),
|
|
2249
|
+
options: z.object({
|
|
2250
|
+
createUsers: z.boolean().optional(),
|
|
2251
|
+
addUserBalance: z.boolean().optional(),
|
|
2252
|
+
supplierOnReceipts: z.boolean().optional(),
|
|
2253
|
+
allowToControlTariffs: z.boolean().optional(),
|
|
2254
|
+
allowToControlTariffGroups: z.boolean().optional()
|
|
2255
|
+
}).optional(),
|
|
2256
|
+
corporateBilling: z.object({
|
|
2257
|
+
enabled: z.boolean().optional(),
|
|
2258
|
+
monthlyLimit: z.number().optional(),
|
|
2259
|
+
discount: z.number().optional()
|
|
2260
|
+
}).optional(),
|
|
2261
|
+
externalId: z.string().optional(),
|
|
2262
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2263
|
+
});
|
|
1756
2264
|
// GET /public-api/resources/partners/v2.0
|
|
1757
2265
|
// POST /public-api/resources/partners/v2.0
|
|
1758
2266
|
export const partnerCreateBody = z.object({
|
|
@@ -1764,9 +2272,9 @@ export const partnerCreateBody = z.object({
|
|
|
1764
2272
|
address: z.string().optional(),
|
|
1765
2273
|
postcode: z.string().optional(),
|
|
1766
2274
|
city: z.string().optional(),
|
|
1767
|
-
country: z.
|
|
1768
|
-
region: z.
|
|
1769
|
-
state: z.
|
|
2275
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
2276
|
+
region: z.string().optional(),
|
|
2277
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.enum(["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"]), z.enum(["81", "84", "85", "67", "89", "71", "76", "95", "79"]), z.enum(["AB", "AR", "AG", "BC", "BH", "BN", "BT", "BV", "BR", "B", "BZ", "CL", "CS", "CT", "CV", "DB", "DJ", "GL", "GR", "GJ", "HR", "HD", "IL", "IS", "IF", "MM", "MH", "MS", "NT", "OT", "PH", "SM", "SJ", "SB", "SV", "TR", "TM", "TL", "VS", "VL", "VN"])]).optional(),
|
|
1770
2278
|
contactDetails: z.object({
|
|
1771
2279
|
administrative: z.object({
|
|
1772
2280
|
contactPerson: z.string().optional(),
|
|
@@ -1806,21 +2314,81 @@ export const partnerCreateBody = z.object({
|
|
|
1806
2314
|
discount: z.number().optional()
|
|
1807
2315
|
}).optional(),
|
|
1808
2316
|
externalId: z.string().optional(),
|
|
1809
|
-
bankDetails: z.
|
|
1810
|
-
|
|
2317
|
+
bankDetails: z.object({
|
|
2318
|
+
bankIban: z.string().optional(),
|
|
2319
|
+
bankName: z.string().optional(),
|
|
2320
|
+
bankAddress: z.string().optional(),
|
|
2321
|
+
bankCode: z.string().optional(),
|
|
2322
|
+
bankAccountNumber: z.string().optional(),
|
|
2323
|
+
bankAccountType: z.string().optional()
|
|
2324
|
+
}).optional(),
|
|
2325
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1811
2326
|
});
|
|
1812
2327
|
// GET /public-api/resources/partners/v2.0/{partner}
|
|
1813
2328
|
// DELETE /public-api/resources/partners/v2.0/{partner}
|
|
1814
2329
|
// PATCH /public-api/resources/partners/v2.0/{partner}
|
|
1815
2330
|
export const partnerUpdateBody = z.object({
|
|
1816
|
-
businessName: z.string().optional()
|
|
2331
|
+
businessName: z.string().optional(),
|
|
2332
|
+
id: z.number().int().optional(),
|
|
2333
|
+
name: z.string().optional(),
|
|
2334
|
+
regNo: z.string().optional(),
|
|
2335
|
+
vatNo: z.string().optional(),
|
|
2336
|
+
address: z.string().optional(),
|
|
2337
|
+
postcode: z.string().optional(),
|
|
2338
|
+
city: z.string().optional(),
|
|
2339
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
2340
|
+
region: z.string().optional(),
|
|
2341
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.enum(["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"]), z.enum(["81", "84", "85", "67", "89", "71", "76", "95", "79"]), z.enum(["AB", "AR", "AG", "BC", "BH", "BN", "BT", "BV", "BR", "B", "BZ", "CL", "CS", "CT", "CV", "DB", "DJ", "GL", "GR", "GJ", "HR", "HD", "IL", "IS", "IF", "MM", "MH", "MS", "NT", "OT", "PH", "SM", "SJ", "SB", "SV", "TR", "TM", "TL", "VS", "VL", "VN"])]).optional(),
|
|
2342
|
+
contactDetails: z.object({
|
|
2343
|
+
administrative: z.object({
|
|
2344
|
+
contactPerson: z.string().optional(),
|
|
2345
|
+
email: z.string().email().optional(),
|
|
2346
|
+
phone: z.string().optional()
|
|
2347
|
+
}).optional(),
|
|
2348
|
+
technical: z.object({
|
|
2349
|
+
contactPerson: z.string().optional(),
|
|
2350
|
+
email: z.string().email().optional(),
|
|
2351
|
+
phone: z.string().optional()
|
|
2352
|
+
}).optional(),
|
|
2353
|
+
billing: z.object({
|
|
2354
|
+
contactPerson: z.string().optional(),
|
|
2355
|
+
email: z.string().email().optional(),
|
|
2356
|
+
phone: z.string().optional()
|
|
2357
|
+
}).optional()
|
|
2358
|
+
}).optional(),
|
|
2359
|
+
notifications: z.object({
|
|
2360
|
+
technical: z.object({
|
|
2361
|
+
chargePointFaults: z.boolean().optional()
|
|
2362
|
+
}).optional(),
|
|
2363
|
+
billing: z.object({
|
|
2364
|
+
settlementReports: z.boolean().optional()
|
|
2365
|
+
}).optional()
|
|
2366
|
+
}).optional(),
|
|
2367
|
+
monthlyPlatformFee: z.number().optional(),
|
|
2368
|
+
options: z.object({
|
|
2369
|
+
createUsers: z.boolean().optional(),
|
|
2370
|
+
addUserBalance: z.boolean().optional(),
|
|
2371
|
+
supplierOnReceipts: z.boolean().optional(),
|
|
2372
|
+
allowToControlTariffs: z.boolean().optional(),
|
|
2373
|
+
allowToControlTariffGroups: z.boolean().optional()
|
|
2374
|
+
}).optional(),
|
|
2375
|
+
corporateBilling: z.object({
|
|
2376
|
+
enabled: z.boolean().optional(),
|
|
2377
|
+
monthlyLimit: z.number().optional(),
|
|
2378
|
+
discount: z.number().optional()
|
|
2379
|
+
}).optional(),
|
|
2380
|
+
externalId: z.string().optional(),
|
|
2381
|
+
bankDetails: z.object({
|
|
2382
|
+
bankIban: z.string().optional(),
|
|
2383
|
+
bankName: z.string().optional(),
|
|
2384
|
+
bankAddress: z.string().optional(),
|
|
2385
|
+
bankCode: z.string().optional(),
|
|
2386
|
+
bankAccountNumber: z.string().optional(),
|
|
2387
|
+
bankAccountType: z.string().optional()
|
|
2388
|
+
}).optional(),
|
|
2389
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
1817
2390
|
});
|
|
1818
2391
|
// GET /public-api/resources/payment-terminals/v1.0
|
|
1819
|
-
export const getPaymentTerminalsQueryParams = z.object({
|
|
1820
|
-
filter: z.object({
|
|
1821
|
-
serialNumber: z.string().optional()
|
|
1822
|
-
}).optional()
|
|
1823
|
-
});
|
|
1824
2392
|
// POST /public-api/resources/payment-terminals/v1.0
|
|
1825
2393
|
export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
1826
2394
|
preauthorizeAmount: z.number(),
|
|
@@ -1832,7 +2400,7 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
|
1832
2400
|
id: z.number().int().optional(),
|
|
1833
2401
|
name: z.string(),
|
|
1834
2402
|
integrationId: z.number().int(),
|
|
1835
|
-
terminalType: z.
|
|
2403
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
1836
2404
|
operatorId: z.number().int(),
|
|
1837
2405
|
chargingZoneId: z.number().int().optional(),
|
|
1838
2406
|
chargePointId: z.number().int().optional(),
|
|
@@ -1842,7 +2410,10 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
|
1842
2410
|
phone: z.string(),
|
|
1843
2411
|
defaultLanguage: z.string(),
|
|
1844
2412
|
presentCardOnStopSession: z.boolean().optional(),
|
|
1845
|
-
info: z.
|
|
2413
|
+
info: z.array(z.object({
|
|
2414
|
+
locale: z.string().optional(),
|
|
2415
|
+
translation: z.string().optional()
|
|
2416
|
+
})),
|
|
1846
2417
|
currencyCode: z.string().optional(),
|
|
1847
2418
|
serialNumber: z.string().optional(),
|
|
1848
2419
|
externalId: z.string().optional(),
|
|
@@ -1853,35 +2424,80 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
|
1853
2424
|
}),
|
|
1854
2425
|
networkStatusMonitoringEnabled: z.boolean().optional()
|
|
1855
2426
|
}), z.object({
|
|
2427
|
+
id: z.number().int().optional(),
|
|
2428
|
+
name: z.string(),
|
|
2429
|
+
integrationId: z.number().int(),
|
|
2430
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2431
|
+
operatorId: z.number().int(),
|
|
2432
|
+
chargingZoneId: z.number().int().optional(),
|
|
2433
|
+
chargePointId: z.number().int().optional(),
|
|
1856
2434
|
serialNumber: z.string(),
|
|
1857
2435
|
externalId: z.string().optional()
|
|
1858
2436
|
}), z.object({
|
|
1859
|
-
|
|
2437
|
+
id: z.number().int().optional(),
|
|
2438
|
+
name: z.string(),
|
|
2439
|
+
integrationId: z.number().int(),
|
|
2440
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2441
|
+
operatorId: z.number().int(),
|
|
2442
|
+
chargingZoneId: z.number().int().optional(),
|
|
2443
|
+
chargePointId: z.number().int().optional(),
|
|
2444
|
+
adminToken: z.string().optional(),
|
|
1860
2445
|
webhookUrl: z.string().optional(),
|
|
1861
2446
|
serialNumber: z.string().optional(),
|
|
1862
2447
|
externalId: z.string().optional()
|
|
1863
2448
|
}), z.object({
|
|
2449
|
+
id: z.number().int().optional(),
|
|
2450
|
+
name: z.string(),
|
|
2451
|
+
integrationId: z.number().int(),
|
|
2452
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2453
|
+
operatorId: z.number().int(),
|
|
2454
|
+
chargingZoneId: z.number().int().optional(),
|
|
2455
|
+
chargePointId: z.number().int().optional(),
|
|
1864
2456
|
terminalId: z.string(),
|
|
1865
2457
|
serialNumber: z.string().optional(),
|
|
1866
2458
|
externalId: z.string().optional()
|
|
1867
2459
|
}), z.object({
|
|
2460
|
+
id: z.number().int().optional(),
|
|
2461
|
+
name: z.string(),
|
|
2462
|
+
integrationId: z.number().int(),
|
|
2463
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2464
|
+
operatorId: z.number().int(),
|
|
2465
|
+
chargingZoneId: z.number().int().optional(),
|
|
2466
|
+
chargePointId: z.number().int().optional(),
|
|
1868
2467
|
serialNumber: z.string().optional(),
|
|
1869
2468
|
externalId: z.string().optional()
|
|
1870
2469
|
}), z.object({
|
|
2470
|
+
id: z.number().int().optional(),
|
|
2471
|
+
name: z.string(),
|
|
2472
|
+
integrationId: z.number().int(),
|
|
2473
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2474
|
+
operatorId: z.number().int(),
|
|
2475
|
+
chargingZoneId: z.number().int().optional(),
|
|
2476
|
+
chargePointId: z.number().int().optional(),
|
|
1871
2477
|
verificationCode: z.string(),
|
|
1872
2478
|
defaultLanguage: z.string(),
|
|
1873
2479
|
presentCardOnStopSession: z.boolean().optional(),
|
|
1874
|
-
info: z.
|
|
2480
|
+
info: z.array(z.object({
|
|
2481
|
+
locale: z.string().optional(),
|
|
2482
|
+
translation: z.string().optional()
|
|
2483
|
+
})),
|
|
1875
2484
|
serialNumber: z.string().optional(),
|
|
1876
2485
|
externalId: z.string().optional()
|
|
1877
2486
|
}), z.object({
|
|
2487
|
+
id: z.number().int().optional(),
|
|
2488
|
+
name: z.string(),
|
|
2489
|
+
integrationId: z.number().int(),
|
|
2490
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2491
|
+
operatorId: z.number().int(),
|
|
2492
|
+
chargingZoneId: z.number().int().optional(),
|
|
2493
|
+
chargePointId: z.number().int().optional(),
|
|
1878
2494
|
serialNumber: z.string().optional(),
|
|
1879
2495
|
externalId: z.string().optional()
|
|
1880
2496
|
}), z.object({
|
|
1881
2497
|
id: z.number().int().optional(),
|
|
1882
2498
|
name: z.string(),
|
|
1883
2499
|
integrationId: z.number().int(),
|
|
1884
|
-
terminalType: z.
|
|
2500
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
1885
2501
|
operatorId: z.number().int(),
|
|
1886
2502
|
invoiceFields: z.array(z.object({
|
|
1887
2503
|
field: z.string(),
|
|
@@ -1889,12 +2505,22 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
|
1889
2505
|
type: z.enum(["individual", "company"])
|
|
1890
2506
|
})).optional()
|
|
1891
2507
|
}), z.object({
|
|
1892
|
-
|
|
2508
|
+
id: z.number().int().optional(),
|
|
2509
|
+
name: z.string(),
|
|
2510
|
+
integrationId: z.number().int(),
|
|
2511
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
|
|
2512
|
+
operatorId: z.number().int(),
|
|
2513
|
+
chargingZoneId: z.number().int().optional(),
|
|
2514
|
+
chargePointId: z.number().int().optional(),
|
|
2515
|
+
adminToken: z.string().optional(),
|
|
1893
2516
|
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
1894
2517
|
phone: z.string(),
|
|
1895
2518
|
defaultLanguage: z.string(),
|
|
1896
2519
|
presentCardOnStopSession: z.boolean().optional(),
|
|
1897
|
-
info: z.
|
|
2520
|
+
info: z.array(z.object({
|
|
2521
|
+
locale: z.string().optional(),
|
|
2522
|
+
translation: z.string().optional()
|
|
2523
|
+
})),
|
|
1898
2524
|
currencyCode: z.string().optional(),
|
|
1899
2525
|
serialNumber: z.string().optional(),
|
|
1900
2526
|
externalId: z.string().optional(),
|
|
@@ -1902,23 +2528,6 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
|
1902
2528
|
adyenApiKey: z.string(),
|
|
1903
2529
|
supportedLanguages: z.array(z.string()).optional(),
|
|
1904
2530
|
networkStatusMonitoringEnabled: z.boolean().optional()
|
|
1905
|
-
}), z.object({
|
|
1906
|
-
adminToken: z.unknown().optional(),
|
|
1907
|
-
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
1908
|
-
phone: z.string(),
|
|
1909
|
-
defaultLanguage: z.string(),
|
|
1910
|
-
presentCardOnStopSession: z.boolean().optional(),
|
|
1911
|
-
info: z.unknown(),
|
|
1912
|
-
currencyCode: z.string().optional(),
|
|
1913
|
-
countryCode: z.string().optional(),
|
|
1914
|
-
serialNumber: z.string().optional(),
|
|
1915
|
-
externalId: z.string().optional(),
|
|
1916
|
-
supportedLanguages: z.array(z.string()).optional(),
|
|
1917
|
-
bundle: z.object({
|
|
1918
|
-
version: z.string().optional(),
|
|
1919
|
-
downloadUrl: z.string().optional()
|
|
1920
|
-
}),
|
|
1921
|
-
networkStatusMonitoringEnabled: z.boolean().optional()
|
|
1922
2531
|
})]);
|
|
1923
2532
|
// GET /public-api/resources/payment-terminals/v1.0/{paymentTerminal}
|
|
1924
2533
|
// DELETE /public-api/resources/payment-terminals/v1.0/{paymentTerminal}
|
|
@@ -1930,71 +2539,125 @@ export const updatePaymentTerminalBody = z.union([z.union([z.object({
|
|
|
1930
2539
|
}), z.object({
|
|
1931
2540
|
transactionTimeout: z.number().int().optional()
|
|
1932
2541
|
})]), z.object({
|
|
1933
|
-
|
|
2542
|
+
id: z.number().int().optional(),
|
|
2543
|
+
name: z.string().optional(),
|
|
2544
|
+
integrationId: z.number().int().optional(),
|
|
2545
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2546
|
+
operatorId: z.number().int().optional(),
|
|
2547
|
+
chargingZoneId: z.number().int().optional(),
|
|
2548
|
+
chargePointId: z.number().int().optional(),
|
|
2549
|
+
adminToken: z.string().optional(),
|
|
1934
2550
|
isOnline: z.boolean().optional(),
|
|
1935
2551
|
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
1936
2552
|
phone: z.string().optional(),
|
|
1937
2553
|
defaultLanguage: z.string().optional(),
|
|
1938
2554
|
presentCardOnStopSession: z.boolean().optional(),
|
|
1939
|
-
info: z.
|
|
2555
|
+
info: z.array(z.object({
|
|
2556
|
+
locale: z.string().optional(),
|
|
2557
|
+
translation: z.string().optional()
|
|
2558
|
+
})).optional(),
|
|
1940
2559
|
serialNumber: z.string().optional(),
|
|
1941
2560
|
externalId: z.string().optional(),
|
|
1942
2561
|
supportedLanguages: z.array(z.string()).optional()
|
|
1943
2562
|
}), z.object({
|
|
2563
|
+
id: z.number().int().optional(),
|
|
2564
|
+
name: z.string().optional(),
|
|
2565
|
+
integrationId: z.number().int().optional(),
|
|
2566
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2567
|
+
operatorId: z.number().int().optional(),
|
|
2568
|
+
chargingZoneId: z.number().int().optional(),
|
|
2569
|
+
chargePointId: z.number().int().optional(),
|
|
1944
2570
|
serialNumber: z.string().optional(),
|
|
1945
2571
|
externalId: z.string().optional()
|
|
1946
2572
|
}), z.object({
|
|
1947
|
-
|
|
2573
|
+
id: z.number().int().optional(),
|
|
2574
|
+
name: z.string().optional(),
|
|
2575
|
+
integrationId: z.number().int().optional(),
|
|
2576
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2577
|
+
operatorId: z.number().int().optional(),
|
|
2578
|
+
chargingZoneId: z.number().int().optional(),
|
|
2579
|
+
chargePointId: z.number().int().optional(),
|
|
2580
|
+
adminToken: z.string().optional(),
|
|
1948
2581
|
webhookUrl: z.string().optional(),
|
|
1949
2582
|
serialNumber: z.string().optional(),
|
|
1950
2583
|
externalId: z.string().optional()
|
|
1951
2584
|
}), z.object({
|
|
1952
|
-
|
|
2585
|
+
id: z.number().int().optional(),
|
|
2586
|
+
name: z.string().optional(),
|
|
2587
|
+
integrationId: z.number().int().optional(),
|
|
2588
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2589
|
+
operatorId: z.number().int().optional(),
|
|
2590
|
+
chargingZoneId: z.number().int().optional(),
|
|
2591
|
+
chargePointId: z.number().int().optional(),
|
|
2592
|
+
terminalId: z.string().optional(),
|
|
1953
2593
|
serialNumber: z.string().optional(),
|
|
1954
2594
|
externalId: z.string().optional()
|
|
1955
2595
|
}), z.object({
|
|
2596
|
+
id: z.number().int().optional(),
|
|
2597
|
+
name: z.string().optional(),
|
|
2598
|
+
integrationId: z.number().int().optional(),
|
|
2599
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2600
|
+
operatorId: z.number().int().optional(),
|
|
2601
|
+
chargingZoneId: z.number().int().optional(),
|
|
2602
|
+
chargePointId: z.number().int().optional(),
|
|
1956
2603
|
serialNumber: z.string().optional(),
|
|
1957
2604
|
externalId: z.string().optional()
|
|
1958
2605
|
}), z.object({
|
|
2606
|
+
id: z.number().int().optional(),
|
|
2607
|
+
name: z.string().optional(),
|
|
2608
|
+
integrationId: z.number().int().optional(),
|
|
2609
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2610
|
+
operatorId: z.number().int().optional(),
|
|
2611
|
+
chargingZoneId: z.number().int().optional(),
|
|
2612
|
+
chargePointId: z.number().int().optional(),
|
|
1959
2613
|
verificationCode: z.string().optional(),
|
|
1960
2614
|
defaultLanguage: z.string().optional(),
|
|
1961
2615
|
presentCardOnStopSession: z.boolean().optional(),
|
|
1962
|
-
info: z.
|
|
2616
|
+
info: z.array(z.object({
|
|
2617
|
+
locale: z.string().optional(),
|
|
2618
|
+
translation: z.string().optional()
|
|
2619
|
+
})).optional(),
|
|
1963
2620
|
serialNumber: z.string().optional(),
|
|
1964
2621
|
externalId: z.string().optional()
|
|
1965
2622
|
}), z.object({
|
|
2623
|
+
id: z.number().int().optional(),
|
|
2624
|
+
name: z.string().optional(),
|
|
2625
|
+
integrationId: z.number().int().optional(),
|
|
2626
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2627
|
+
operatorId: z.number().int().optional(),
|
|
2628
|
+
chargingZoneId: z.number().int().optional(),
|
|
2629
|
+
chargePointId: z.number().int().optional(),
|
|
1966
2630
|
serialNumber: z.string().optional(),
|
|
1967
2631
|
externalId: z.string().optional()
|
|
1968
2632
|
}), z.object({
|
|
1969
2633
|
id: z.number().int().optional(),
|
|
1970
2634
|
name: z.string().optional(),
|
|
1971
2635
|
integrationId: z.number().int().optional(),
|
|
1972
|
-
terminalType: z.
|
|
2636
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
1973
2637
|
operatorId: z.number().int().optional()
|
|
1974
2638
|
}), z.object({
|
|
1975
|
-
|
|
2639
|
+
id: z.number().int().optional(),
|
|
2640
|
+
name: z.string().optional(),
|
|
2641
|
+
integrationId: z.number().int().optional(),
|
|
2642
|
+
terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
|
|
2643
|
+
operatorId: z.number().int().optional(),
|
|
2644
|
+
chargingZoneId: z.number().int().optional(),
|
|
2645
|
+
chargePointId: z.number().int().optional(),
|
|
2646
|
+
adminToken: z.string().optional(),
|
|
1976
2647
|
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
1977
2648
|
phone: z.string().optional(),
|
|
1978
2649
|
defaultLanguage: z.string().optional(),
|
|
1979
2650
|
presentCardOnStopSession: z.boolean().optional(),
|
|
1980
|
-
info: z.
|
|
2651
|
+
info: z.array(z.object({
|
|
2652
|
+
locale: z.string().optional(),
|
|
2653
|
+
translation: z.string().optional()
|
|
2654
|
+
})).optional(),
|
|
1981
2655
|
serialNumber: z.string().optional(),
|
|
1982
2656
|
externalId: z.string().optional(),
|
|
1983
2657
|
merchantAccount: z.string().optional(),
|
|
1984
2658
|
adyenApiKey: z.string().optional(),
|
|
1985
2659
|
supportedLanguages: z.array(z.string()).optional(),
|
|
1986
2660
|
networkStatusMonitoringEnabled: z.boolean().optional()
|
|
1987
|
-
}), z.object({
|
|
1988
|
-
adminToken: z.unknown().optional(),
|
|
1989
|
-
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
1990
|
-
phone: z.string().optional(),
|
|
1991
|
-
defaultLanguage: z.string().optional(),
|
|
1992
|
-
presentCardOnStopSession: z.boolean().optional(),
|
|
1993
|
-
info: z.unknown().optional(),
|
|
1994
|
-
serialNumber: z.string().optional(),
|
|
1995
|
-
externalId: z.string().optional(),
|
|
1996
|
-
supportedLanguages: z.array(z.string()).optional(),
|
|
1997
|
-
networkStatusMonitoringEnabled: z.boolean().optional()
|
|
1998
2661
|
})]);
|
|
1999
2662
|
// GET /public-api/resources/provisioning-certificates/v2.0
|
|
2000
2663
|
// POST /public-api/resources/provisioning-certificates/v2.0
|
|
@@ -2034,15 +2697,6 @@ export const updatePcIdBody = z.object({
|
|
|
2034
2697
|
// GET /public-api/resources/receipts/v2.0
|
|
2035
2698
|
// GET /public-api/resources/receipts/v2.0/{receipt}
|
|
2036
2699
|
// GET /public-api/resources/reservations/v1.0
|
|
2037
|
-
export const reservationsListingQueryParams = z.object({
|
|
2038
|
-
filter: z.object({
|
|
2039
|
-
evseId: z.string().optional(),
|
|
2040
|
-
userId: z.string().optional(),
|
|
2041
|
-
status: z.enum(["active", "expired", "canceled", "done"]).optional(),
|
|
2042
|
-
reservedFrom: z.string().datetime().optional(),
|
|
2043
|
-
reservedTo: z.string().datetime().optional()
|
|
2044
|
-
}).optional()
|
|
2045
|
-
});
|
|
2046
2700
|
// GET /public-api/resources/reservations/v1.0/{reservation}
|
|
2047
2701
|
// GET /public-api/resources/rfid-tags/v1.0
|
|
2048
2702
|
// POST /public-api/resources/rfid-tags/v1.0
|
|
@@ -2054,37 +2708,41 @@ export const rfidTagCreateDeprecatedBody = z.object({
|
|
|
2054
2708
|
createdAt: z.string().optional(),
|
|
2055
2709
|
status: z.enum(["enabled", "disabled", "suspended"]),
|
|
2056
2710
|
userId: z.number().int().optional(),
|
|
2057
|
-
lastUpdatedAt: z.
|
|
2711
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2712
|
+
});
|
|
2713
|
+
// GET /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2714
|
+
// DELETE /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2715
|
+
// PATCH /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2716
|
+
export const rfidTagUpdateDeprecatedBody = z.object({
|
|
2717
|
+
id: z.number().int().optional(),
|
|
2718
|
+
rfidTagUid: z.string(),
|
|
2719
|
+
rfidLabel: z.string().optional(),
|
|
2720
|
+
expireAt: z.string().optional(),
|
|
2721
|
+
createdAt: z.string().optional(),
|
|
2722
|
+
status: z.enum(["enabled", "disabled", "suspended"]),
|
|
2723
|
+
userId: z.number().int().optional(),
|
|
2724
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2058
2725
|
});
|
|
2059
|
-
// GET /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2060
|
-
// DELETE /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2061
|
-
// PATCH /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2062
|
-
export const rfidTagUpdateDeprecatedBody = z.unknown();
|
|
2063
2726
|
// GET /public-api/resources/roaming-connections/v2.0
|
|
2064
2727
|
// GET /public-api/resources/roaming-connections/v2.0/{roamingConnection}
|
|
2065
|
-
export const getRoamingConnectionPathParams = z.object({
|
|
2066
|
-
roamingConnection: z.number().int()
|
|
2067
|
-
});
|
|
2068
2728
|
// GET /public-api/resources/roaming-operators/v2.0
|
|
2069
2729
|
// GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}
|
|
2070
|
-
export const roamingOperatorReadPathParams = z.object({
|
|
2071
|
-
roamingOperator: z.number().int()
|
|
2072
|
-
});
|
|
2073
2730
|
// PATCH /public-api/resources/roaming-operators/v2.0/{roamingOperator}
|
|
2074
2731
|
export const roamingOperatorUpdateBody = z.object({
|
|
2075
2732
|
businessName: z.string().optional(),
|
|
2076
2733
|
partnerId: z.number().int().optional(),
|
|
2077
2734
|
enabled: z.boolean().optional(),
|
|
2078
|
-
cpoSettings: z.object({
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2735
|
+
cpoSettings: z.object({
|
|
2736
|
+
cpoQrcodePrefix: z.string().optional(),
|
|
2737
|
+
manualEvseManagement: z.boolean().optional(),
|
|
2738
|
+
applyCustomTariffsToEvsesWithRoamingTariff: z.boolean().optional(),
|
|
2739
|
+
sendsPeriodicMeterUpdates: z.boolean().optional(),
|
|
2740
|
+
externalTariffIntegration: z.string().optional(),
|
|
2741
|
+
threatEvseStatusUnknownAs: z.enum(["available", "unavailable"]).optional(),
|
|
2742
|
+
phaseAcPowerFormula: z.enum(["amperage_voltage_3", "amperage_voltage_sqr3"]).optional()
|
|
2086
2743
|
}).optional()
|
|
2087
2744
|
});
|
|
2745
|
+
// GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters
|
|
2088
2746
|
// POST /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters
|
|
2089
2747
|
export const createRoamingCustomTariffFilterBody = z.object({
|
|
2090
2748
|
id: z.number().int().optional(),
|
|
@@ -2095,8 +2753,8 @@ export const createRoamingCustomTariffFilterBody = z.object({
|
|
|
2095
2753
|
powerBelowKw: z.number().min(0).optional(),
|
|
2096
2754
|
evseIdPrefix: z.string().max(1000).optional(),
|
|
2097
2755
|
order: z.number().int().optional(),
|
|
2098
|
-
createdAt: z.
|
|
2099
|
-
updatedAt: z.
|
|
2756
|
+
createdAt: z.string().datetime().optional(),
|
|
2757
|
+
updatedAt: z.string().datetime().optional()
|
|
2100
2758
|
});
|
|
2101
2759
|
// PUT /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters/reorder
|
|
2102
2760
|
export const reorderRoamingCustomTariffFiltersBody = z.object({
|
|
@@ -2119,17 +2777,7 @@ export const updateRoamingCustomTariffFilterBody = z.object({
|
|
|
2119
2777
|
});
|
|
2120
2778
|
// GET /public-api/resources/roaming-platforms/v1.0
|
|
2121
2779
|
// GET /public-api/resources/roaming-platforms/v1.0/{roamingPlatform}
|
|
2122
|
-
export const roamingPlatformReadDeprecatedPathParams = z.object({
|
|
2123
|
-
roamingPlatform: z.number().int()
|
|
2124
|
-
});
|
|
2125
2780
|
// GET /public-api/resources/roaming-providers/v2.0
|
|
2126
|
-
export const roamingProvidersListingQueryParams = z.object({
|
|
2127
|
-
filter: z.object({
|
|
2128
|
-
platformId: z.number().int().optional(),
|
|
2129
|
-
countryCode: z.string().optional(),
|
|
2130
|
-
partyId: z.string().optional()
|
|
2131
|
-
}).optional()
|
|
2132
|
-
});
|
|
2133
2781
|
// POST /public-api/resources/roaming-providers/v2.0
|
|
2134
2782
|
export const roamingProviderCreateBody = z.union([z.object({
|
|
2135
2783
|
businessName: z.string().optional(),
|
|
@@ -2137,21 +2785,29 @@ export const roamingProviderCreateBody = z.union([z.object({
|
|
|
2137
2785
|
partnerId: z.number().int().optional(),
|
|
2138
2786
|
hubjectId: z.string().optional()
|
|
2139
2787
|
}), z.object({
|
|
2788
|
+
businessName: z.string().optional(),
|
|
2789
|
+
platformId: z.number().int(),
|
|
2790
|
+
partnerId: z.number().int().optional(),
|
|
2140
2791
|
countryCode: z.string().optional(),
|
|
2141
2792
|
partyId: z.string().optional()
|
|
2142
2793
|
})]);
|
|
2143
2794
|
// GET /public-api/resources/roaming-providers/v2.0/{roamingProvider}
|
|
2144
|
-
export const roamingProviderReadPathParams = z.object({
|
|
2145
|
-
roamingProvider: z.number().int()
|
|
2146
|
-
});
|
|
2147
2795
|
// DELETE /public-api/resources/roaming-providers/v2.0/{roamingProvider}
|
|
2148
2796
|
// PATCH /public-api/resources/roaming-providers/v2.0/{roamingProvider}
|
|
2149
|
-
export const roamingProviderUpdateBody = z.union([z.
|
|
2797
|
+
export const roamingProviderUpdateBody = z.union([z.object({
|
|
2798
|
+
businessName: z.string().optional(),
|
|
2799
|
+
platformId: z.number().int().optional(),
|
|
2800
|
+
partnerId: z.number().int().optional(),
|
|
2801
|
+
hubjectId: z.string().optional()
|
|
2802
|
+
}), z.object({
|
|
2803
|
+
businessName: z.string().optional(),
|
|
2804
|
+
platformId: z.number().int().optional(),
|
|
2805
|
+
partnerId: z.number().int().optional(),
|
|
2806
|
+
countryCode: z.string().optional(),
|
|
2807
|
+
partyId: z.string().optional()
|
|
2808
|
+
})]);
|
|
2150
2809
|
// GET /public-api/resources/roaming-tariffs/v2.0
|
|
2151
2810
|
// GET /public-api/resources/roaming-tariffs/v2.0/{roamingTariff}
|
|
2152
|
-
export const roamingTariffReadPathParams = z.object({
|
|
2153
|
-
roamingTariff: z.number().int()
|
|
2154
|
-
});
|
|
2155
2811
|
// PATCH /public-api/resources/roaming-tariffs/v2.0/{roamingTariff}
|
|
2156
2812
|
export const roamingTariffUpdateBody = z.object({
|
|
2157
2813
|
id: z.number().int().optional(),
|
|
@@ -2164,20 +2820,8 @@ export const roamingTariffUpdateBody = z.object({
|
|
|
2164
2820
|
// GET /public-api/resources/security-events-log/v2.0
|
|
2165
2821
|
// GET /public-api/resources/security-events-log/v2.0/{securityEventLog}
|
|
2166
2822
|
// GET /public-api/resources/security-events/v2.0
|
|
2167
|
-
export const securityEventsListingQueryParams = z.object({
|
|
2168
|
-
filter: z.object({
|
|
2169
|
-
type: z.enum(["FirmwareUpdated", "SettingSystemTime", "StartupOfTheDevice", "ResetOrReboot", "SecurityLogWasCleared", "MemoryExhaustion", "TamperDetectionActivated"]).optional(),
|
|
2170
|
-
chargePoint: z.string().optional(),
|
|
2171
|
-
timestampFrom: z.string().optional(),
|
|
2172
|
-
timestampTo: z.string().optional()
|
|
2173
|
-
}).optional()
|
|
2174
|
-
});
|
|
2175
2823
|
// GET /public-api/resources/security-events/v2.0/{securityEvent}
|
|
2176
2824
|
// GET /public-api/resources/sessions/v1.0
|
|
2177
|
-
export const sessionsListingQueryParams = z.object({
|
|
2178
|
-
withChargingPeriodsPriceBreakdown: z.boolean().optional(),
|
|
2179
|
-
include: z.array(z.enum(["externalAppData"])).optional()
|
|
2180
|
-
});
|
|
2181
2825
|
// GET /public-api/resources/sessions/v1.0/{session}
|
|
2182
2826
|
// GET /public-api/resources/sessions/v1.0/{session}/consumption-stats
|
|
2183
2827
|
// GET /public-api/resources/settings/v1.0
|
|
@@ -2187,8 +2831,14 @@ export const sessionsListingQueryParams = z.object({
|
|
|
2187
2831
|
// GET /public-api/resources/subscription-plans/v2.0
|
|
2188
2832
|
// POST /public-api/resources/subscription-plans/v2.0
|
|
2189
2833
|
export const subscriptionPlanCreateBody = z.object({
|
|
2190
|
-
name: z.
|
|
2191
|
-
|
|
2834
|
+
name: z.array(z.object({
|
|
2835
|
+
locale: z.string().optional(),
|
|
2836
|
+
translation: z.string().optional()
|
|
2837
|
+
})),
|
|
2838
|
+
description: z.array(z.object({
|
|
2839
|
+
locale: z.string().optional(),
|
|
2840
|
+
translation: z.string().optional()
|
|
2841
|
+
})),
|
|
2192
2842
|
renewalCycle: z.enum(["monthly", "annually"]),
|
|
2193
2843
|
freeRenewalPeriods: z.number().int().optional(),
|
|
2194
2844
|
type: z.enum(["pre-paid", "post-paid"]),
|
|
@@ -2207,9 +2857,9 @@ export const subscriptionPlanCreateBody = z.object({
|
|
|
2207
2857
|
excludeRoaming: z.boolean().optional(),
|
|
2208
2858
|
includedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2209
2859
|
excludedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2210
|
-
combined: z.
|
|
2860
|
+
combined: z.number().int().min(0).max(4000000).optional(),
|
|
2211
2861
|
ac: z.number().int().min(0).max(4000000).optional(),
|
|
2212
|
-
dc: z.
|
|
2862
|
+
dc: z.number().int().min(0).max(4000000).optional()
|
|
2213
2863
|
}).optional(),
|
|
2214
2864
|
visibilityRestrictions: z.object({
|
|
2215
2865
|
includedPartnerUsers: z.array(z.number().int()).optional(),
|
|
@@ -2217,14 +2867,20 @@ export const subscriptionPlanCreateBody = z.object({
|
|
|
2217
2867
|
includedUserGroups: z.array(z.number().int()).optional(),
|
|
2218
2868
|
excludedUserGroups: z.array(z.number().int()).optional()
|
|
2219
2869
|
}).optional(),
|
|
2220
|
-
lastUpdatedAt: z.
|
|
2870
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2221
2871
|
});
|
|
2222
2872
|
// GET /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
|
|
2223
2873
|
// DELETE /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
|
|
2224
2874
|
// PATCH /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
|
|
2225
2875
|
export const subscriptionPlanUpdateBody = z.object({
|
|
2226
|
-
name: z.
|
|
2227
|
-
|
|
2876
|
+
name: z.array(z.object({
|
|
2877
|
+
locale: z.string().optional(),
|
|
2878
|
+
translation: z.string().optional()
|
|
2879
|
+
})).optional(),
|
|
2880
|
+
description: z.array(z.object({
|
|
2881
|
+
locale: z.string().optional(),
|
|
2882
|
+
translation: z.string().optional()
|
|
2883
|
+
})).optional(),
|
|
2228
2884
|
renewalCycle: z.enum(["monthly", "annually"]).optional(),
|
|
2229
2885
|
freeRenewalPeriods: z.number().int().optional(),
|
|
2230
2886
|
type: z.enum(["pre-paid", "post-paid"]).optional(),
|
|
@@ -2232,18 +2888,20 @@ export const subscriptionPlanUpdateBody = z.object({
|
|
|
2232
2888
|
feePerEachPersonalChargePoint: z.number().optional(),
|
|
2233
2889
|
postPaidChargingSessionsAccumulation: z.enum(["none", "personal", "personal_commercial"]).optional(),
|
|
2234
2890
|
billingUsageThreshold: z.number().int().optional(),
|
|
2235
|
-
billingType: z.
|
|
2891
|
+
billingType: z.enum(["default", "internal", "external"]).optional(),
|
|
2236
2892
|
status: z.enum(["enabled", "disabled"]).optional(),
|
|
2237
2893
|
allowance: z.object({
|
|
2238
2894
|
resetCycle: z.enum(["as_renewal_cycle", "after_each_session", "after_24_hours", "after_each_week", "after_each_month", "after_each_year"]).optional(),
|
|
2239
2895
|
type: z.enum(["none", "combined", "separate"]).optional(),
|
|
2240
|
-
$ref: z.unknown().optional(),
|
|
2241
2896
|
homeChargersOnly: z.boolean().optional(),
|
|
2242
2897
|
includedCountries: z.array(z.unknown()).optional(),
|
|
2243
2898
|
excludedCountries: z.array(z.unknown()).optional(),
|
|
2244
2899
|
excludeRoaming: z.boolean().optional(),
|
|
2245
2900
|
includedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2246
|
-
excludedPartnerChargePoints: z.array(z.number().int()).optional()
|
|
2901
|
+
excludedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2902
|
+
combined: z.number().int().min(0).max(4000000).optional(),
|
|
2903
|
+
ac: z.number().int().min(0).max(4000000).optional(),
|
|
2904
|
+
dc: z.number().int().min(0).max(4000000).optional()
|
|
2247
2905
|
}).optional(),
|
|
2248
2906
|
visibilityRestrictions: z.object({
|
|
2249
2907
|
includedPartnerUsers: z.array(z.number().int()).optional(),
|
|
@@ -2251,16 +2909,26 @@ export const subscriptionPlanUpdateBody = z.object({
|
|
|
2251
2909
|
includedUserGroups: z.array(z.number().int()).optional(),
|
|
2252
2910
|
excludedUserGroups: z.array(z.number().int()).optional()
|
|
2253
2911
|
}).optional(),
|
|
2254
|
-
lastUpdatedAt: z.
|
|
2912
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2255
2913
|
});
|
|
2256
2914
|
// GET /public-api/resources/subscriptions/v1.0
|
|
2257
2915
|
// GET /public-api/resources/subscriptions/v1.0/{subscription}
|
|
2258
2916
|
// GET /public-api/resources/tariff-groups/v1.0
|
|
2259
2917
|
// POST /public-api/resources/tariff-groups/v1.0
|
|
2260
|
-
export const tariffGroupCreateBody = z.
|
|
2918
|
+
export const tariffGroupCreateBody = z.object({
|
|
2919
|
+
name: z.string(),
|
|
2920
|
+
tariffIds: z.array(z.number().int()).optional(),
|
|
2921
|
+
partnerId: z.number().int().optional(),
|
|
2922
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2923
|
+
});
|
|
2261
2924
|
// GET /public-api/resources/tariff-groups/v1.0/{tariffGroup}
|
|
2262
2925
|
// PUT /public-api/resources/tariff-groups/v1.0/{tariffGroup}
|
|
2263
|
-
export const tariffGroupUpdateBody = z.
|
|
2926
|
+
export const tariffGroupUpdateBody = z.object({
|
|
2927
|
+
name: z.string(),
|
|
2928
|
+
tariffIds: z.array(z.number().int()).optional(),
|
|
2929
|
+
partnerId: z.number().int().optional(),
|
|
2930
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2931
|
+
});
|
|
2264
2932
|
// DELETE /public-api/resources/tariff-groups/v1.0/{tariffGroup}
|
|
2265
2933
|
// GET /public-api/resources/tariff-snapshots/v1.0/{tariffSnapshot}
|
|
2266
2934
|
// GET /public-api/resources/tariffs/v1.0
|
|
@@ -2269,9 +2937,9 @@ export const tariffCreateBody = z.object({
|
|
|
2269
2937
|
id: z.number().int(),
|
|
2270
2938
|
name: z.string(),
|
|
2271
2939
|
type: z.enum(["free", "flat rate", "duration+energy", "duration+energy time of day", "energy tou", "standard", "charging not allowed", "average power levels", "peak power levels", "standard_tod", "optimised dynamic pricing"]),
|
|
2272
|
-
description: z.
|
|
2273
|
-
additionalInformation: z.
|
|
2274
|
-
learnMoreUrl: z.
|
|
2940
|
+
description: z.record(z.string()).optional(),
|
|
2941
|
+
additionalInformation: z.record(z.string()).optional(),
|
|
2942
|
+
learnMoreUrl: z.record(z.string()).optional(),
|
|
2275
2943
|
dayTariffStart: z.string().optional(),
|
|
2276
2944
|
nightTariffStart: z.string().optional(),
|
|
2277
2945
|
pricing: z.object({
|
|
@@ -2305,7 +2973,11 @@ export const tariffCreateBody = z.object({
|
|
|
2305
2973
|
markupFixedFeePerKwh: z.number().optional(),
|
|
2306
2974
|
flexibleMarkUpAsFixedPerKwh: z.object({
|
|
2307
2975
|
defaultPrice: z.number().optional(),
|
|
2308
|
-
intervalPricing: z.array(z.
|
|
2976
|
+
intervalPricing: z.array(z.object({
|
|
2977
|
+
startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
2978
|
+
endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
2979
|
+
price: z.number()
|
|
2980
|
+
})).optional()
|
|
2309
2981
|
}).optional(),
|
|
2310
2982
|
multiPricePerKwh: z.array(z.object({
|
|
2311
2983
|
firstKwh: z.number(),
|
|
@@ -2412,7 +3084,7 @@ export const tariffCreateBody = z.object({
|
|
|
2412
3084
|
partner: z.object({
|
|
2413
3085
|
id: z.number().int().optional()
|
|
2414
3086
|
}).optional(),
|
|
2415
|
-
lastUpdatedAt: z.
|
|
3087
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
2416
3088
|
display: z.object({
|
|
2417
3089
|
defaultPriceInformation: z.string().max(150).optional(),
|
|
2418
3090
|
defaultPriceInformationOffline: z.string().max(150).optional(),
|
|
@@ -2423,7 +3095,166 @@ export const tariffCreateBody = z.object({
|
|
|
2423
3095
|
});
|
|
2424
3096
|
// GET /public-api/resources/tariffs/v1.0/{tariff}
|
|
2425
3097
|
// PUT /public-api/resources/tariffs/v1.0/{tariff}
|
|
2426
|
-
export const tariffUpdateBody = z.
|
|
3098
|
+
export const tariffUpdateBody = z.object({
|
|
3099
|
+
id: z.number().int(),
|
|
3100
|
+
name: z.string(),
|
|
3101
|
+
type: z.enum(["free", "flat rate", "duration+energy", "duration+energy time of day", "energy tou", "standard", "charging not allowed", "average power levels", "peak power levels", "standard_tod", "optimised dynamic pricing"]),
|
|
3102
|
+
description: z.record(z.string()).optional(),
|
|
3103
|
+
additionalInformation: z.record(z.string()).optional(),
|
|
3104
|
+
learnMoreUrl: z.record(z.string()).optional(),
|
|
3105
|
+
dayTariffStart: z.string().optional(),
|
|
3106
|
+
nightTariffStart: z.string().optional(),
|
|
3107
|
+
pricing: z.object({
|
|
3108
|
+
pricePerSession: z.number().optional(),
|
|
3109
|
+
connectionFee: z.number().optional(),
|
|
3110
|
+
pricePerKwh: z.number().optional(),
|
|
3111
|
+
dayPricePerKwh: z.number().optional(),
|
|
3112
|
+
nightPricePerKwh: z.number().optional(),
|
|
3113
|
+
pricePeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
3114
|
+
pricePerPeriod: z.number().optional(),
|
|
3115
|
+
durationFeeLimit: z.number().optional(),
|
|
3116
|
+
dayPricePerPeriod: z.number().optional(),
|
|
3117
|
+
nightPricePerPeriod: z.number().optional(),
|
|
3118
|
+
dayIdleFeePerMinute: z.number().optional(),
|
|
3119
|
+
nightIdleFeePerMinute: z.number().optional(),
|
|
3120
|
+
idleFeePerMinute: z.number().optional(),
|
|
3121
|
+
idleFeeGracePeriodMinutes: z.number().optional(),
|
|
3122
|
+
idlePricingPeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
3123
|
+
idleFeePeriodStart: z.string().optional(),
|
|
3124
|
+
idleFeePeriodEnd: z.string().optional(),
|
|
3125
|
+
idleFeeLimit: z.number().optional(),
|
|
3126
|
+
connectionFeeMinimumSessionDuration: z.number().int().optional(),
|
|
3127
|
+
connectionFeeMinimumSessionEnergy: z.number().optional(),
|
|
3128
|
+
durationFeeGracePeriod: z.number().int().optional(),
|
|
3129
|
+
minPrice: z.number().optional(),
|
|
3130
|
+
preAuthorizeAmount: z.number().optional(),
|
|
3131
|
+
taxID: z.number().int().optional(),
|
|
3132
|
+
chargePointElectricityRate: z.boolean().optional(),
|
|
3133
|
+
fallbackElectricityRateId: z.number().int().optional(),
|
|
3134
|
+
markupPercentagePerKwh: z.number().optional(),
|
|
3135
|
+
markupFixedFeePerKwh: z.number().optional(),
|
|
3136
|
+
flexibleMarkUpAsFixedPerKwh: z.object({
|
|
3137
|
+
defaultPrice: z.number().optional(),
|
|
3138
|
+
intervalPricing: z.array(z.object({
|
|
3139
|
+
startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
3140
|
+
endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
3141
|
+
price: z.number()
|
|
3142
|
+
})).optional()
|
|
3143
|
+
}).optional(),
|
|
3144
|
+
multiPricePerKwh: z.array(z.object({
|
|
3145
|
+
firstKwh: z.number(),
|
|
3146
|
+
lastKwh: z.number().optional(),
|
|
3147
|
+
feePerKwh: z.number().optional(),
|
|
3148
|
+
flatFee: z.number().optional()
|
|
3149
|
+
})).optional(),
|
|
3150
|
+
multiPricePerDuration: z.array(z.object({
|
|
3151
|
+
firstUnit: z.number().int(),
|
|
3152
|
+
lastUnit: z.number().int().optional(),
|
|
3153
|
+
feePerUnit: z.number().optional(),
|
|
3154
|
+
flatFee: z.number().optional()
|
|
3155
|
+
})).optional(),
|
|
3156
|
+
multiIdleFee: z.array(z.object({
|
|
3157
|
+
firstUnit: z.number().int(),
|
|
3158
|
+
lastUnit: z.number().int().optional(),
|
|
3159
|
+
feePerUnit: z.number().optional(),
|
|
3160
|
+
flatFee: z.number().optional()
|
|
3161
|
+
})).optional(),
|
|
3162
|
+
regularUsePeriod: z.number().optional(),
|
|
3163
|
+
averagePowerLevels: z.array(z.object({
|
|
3164
|
+
averagePowerUpToKw: z.number(),
|
|
3165
|
+
pricePerMinute: z.number()
|
|
3166
|
+
})).optional(),
|
|
3167
|
+
peakPowerLevels: z.array(z.object({
|
|
3168
|
+
peakPowerUpToKw: z.number(),
|
|
3169
|
+
regularPricePerMinute: z.number(),
|
|
3170
|
+
excessUsePricePerMin: z.number()
|
|
3171
|
+
})).optional(),
|
|
3172
|
+
timePeriods: z.array(z.object({
|
|
3173
|
+
startTime: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
3174
|
+
endTime: z.string().regex(new RegExp("^\\d{2}:\\d{2}$"))
|
|
3175
|
+
})).optional(),
|
|
3176
|
+
pricePeriods: z.object({
|
|
3177
|
+
connectionFeePeriods: z.object({
|
|
3178
|
+
fee: z.array(z.number()).optional()
|
|
3179
|
+
}).optional(),
|
|
3180
|
+
energyFeePeriods: z.object({
|
|
3181
|
+
fee: z.array(z.number()).optional()
|
|
3182
|
+
}).optional(),
|
|
3183
|
+
durationFeePeriods: z.object({
|
|
3184
|
+
fee: z.array(z.number()).optional()
|
|
3185
|
+
}).optional(),
|
|
3186
|
+
idleFeePeriods: z.object({
|
|
3187
|
+
fee: z.array(z.number()).optional()
|
|
3188
|
+
}).optional()
|
|
3189
|
+
}).optional(),
|
|
3190
|
+
daysWhenApplied: z.array(z.object({
|
|
3191
|
+
name: z.string().optional(),
|
|
3192
|
+
specialDates: z.array(z.string()).optional(),
|
|
3193
|
+
idleFeeGracePeriodMinutes: z.number().optional(),
|
|
3194
|
+
idlePricingPeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
3195
|
+
connectionFeeMinimumSessionDuration: z.number().int().optional(),
|
|
3196
|
+
connectionFeeMinimumSessionEnergy: z.number().optional(),
|
|
3197
|
+
durationFeeGracePeriod: z.number().int().optional(),
|
|
3198
|
+
pricePeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
3199
|
+
pricePeriods: z.object({
|
|
3200
|
+
connectionFeePeriods: z.object({
|
|
3201
|
+
fee: z.array(z.number()).optional()
|
|
3202
|
+
}).optional(),
|
|
3203
|
+
energyFeePeriods: z.object({
|
|
3204
|
+
fee: z.array(z.number()).optional()
|
|
3205
|
+
}).optional(),
|
|
3206
|
+
durationFeePeriods: z.object({
|
|
3207
|
+
fee: z.array(z.number()).optional()
|
|
3208
|
+
}).optional(),
|
|
3209
|
+
idleFeePeriods: z.object({
|
|
3210
|
+
fee: z.array(z.number()).optional()
|
|
3211
|
+
}).optional()
|
|
3212
|
+
}).optional()
|
|
3213
|
+
})).optional(),
|
|
3214
|
+
thresholdPriceForEnergy: z.number().optional(),
|
|
3215
|
+
priceForEnergyWhenOptimized: z.number().optional(),
|
|
3216
|
+
optimisedLabel: z.string().optional(),
|
|
3217
|
+
durationFeeFrom: z.string().optional(),
|
|
3218
|
+
durationFeeTo: z.string().optional(),
|
|
3219
|
+
subsidyIntegrationId: z.number().int().optional(),
|
|
3220
|
+
lockPriceOnSessionStart: z.boolean().optional(),
|
|
3221
|
+
lockEnergyPriceOnSessionStart: z.boolean().optional(),
|
|
3222
|
+
lockDurationPriceOnSessionStart: z.boolean().optional(),
|
|
3223
|
+
lockIdlePriceOnSessionStart: z.boolean().optional(),
|
|
3224
|
+
stateOfChargeIdleThreshold: z.union([z.literal(75), z.literal(80), z.literal(85), z.literal(90), z.literal(95), z.literal(100)]).optional(),
|
|
3225
|
+
averagePowerIdleThreshold: z.number().min(0).max(999999.99).optional()
|
|
3226
|
+
}).optional(),
|
|
3227
|
+
currency: z.string().optional(),
|
|
3228
|
+
stopSession: z.object({
|
|
3229
|
+
timeLimitMinutes: z.number().optional(),
|
|
3230
|
+
stopWhenEnergyExceedsKwh: z.number().optional()
|
|
3231
|
+
}).optional(),
|
|
3232
|
+
restrictions: z.object({
|
|
3233
|
+
applyToUsersOfChargePointOwner: z.boolean().optional(),
|
|
3234
|
+
applyToUsersOfChargePointPartner: z.boolean().optional(),
|
|
3235
|
+
applyToUsersOfAllRoamingEmsps: z.boolean().optional(),
|
|
3236
|
+
applyToAdHocUsers: z.boolean().optional(),
|
|
3237
|
+
adHocPreAuthorizeAmount: z.number().min(0).optional(),
|
|
3238
|
+
adHocStopWhenPreAuthorizedAmountFallsBelow: z.number().optional(),
|
|
3239
|
+
applyToUsersOfPartners: z.array(z.number()).optional(),
|
|
3240
|
+
applyToUsersWithGroups: z.array(z.string()).optional(),
|
|
3241
|
+
applyToUserGroupIds: z.array(z.number()).optional(),
|
|
3242
|
+
applyToUsersWithSubscriptions: z.array(z.number()).optional(),
|
|
3243
|
+
startDate: z.string().optional(),
|
|
3244
|
+
endDate: z.string().optional()
|
|
3245
|
+
}).optional(),
|
|
3246
|
+
partner: z.object({
|
|
3247
|
+
id: z.number().int().optional()
|
|
3248
|
+
}).optional(),
|
|
3249
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
3250
|
+
display: z.object({
|
|
3251
|
+
defaultPriceInformation: z.string().max(150).optional(),
|
|
3252
|
+
defaultPriceInformationOffline: z.string().max(150).optional(),
|
|
3253
|
+
priceInformation: z.string().optional(),
|
|
3254
|
+
totalCostInformation: z.string().optional()
|
|
3255
|
+
}).optional(),
|
|
3256
|
+
integrationId: z.number().int().optional()
|
|
3257
|
+
});
|
|
2427
3258
|
// DELETE /public-api/resources/tariffs/v1.0/{tariff}
|
|
2428
3259
|
// GET /public-api/resources/tax-identification-numbers/v2.0
|
|
2429
3260
|
// POST /public-api/resources/tax-identification-numbers/v2.0
|
|
@@ -2440,7 +3271,10 @@ export const taxIdentificationNumberUpdateBody = z.object({
|
|
|
2440
3271
|
// POST /public-api/resources/taxes/v2.0
|
|
2441
3272
|
export const taxCreateBody = z.object({
|
|
2442
3273
|
name: z.string(),
|
|
2443
|
-
displayName: z.
|
|
3274
|
+
displayName: z.array(z.object({
|
|
3275
|
+
locale: z.string().optional(),
|
|
3276
|
+
translation: z.string().optional()
|
|
3277
|
+
})).optional(),
|
|
2444
3278
|
percentage: z.number(),
|
|
2445
3279
|
taxIdentificationNumberId: z.number().int().optional()
|
|
2446
3280
|
});
|
|
@@ -2449,7 +3283,10 @@ export const taxCreateBody = z.object({
|
|
|
2449
3283
|
// PATCH /public-api/resources/taxes/v2.0/{tax}
|
|
2450
3284
|
export const taxUpdateBody = z.object({
|
|
2451
3285
|
name: z.string().optional(),
|
|
2452
|
-
displayName: z.
|
|
3286
|
+
displayName: z.array(z.object({
|
|
3287
|
+
locale: z.string().optional(),
|
|
3288
|
+
translation: z.string().optional()
|
|
3289
|
+
})).optional(),
|
|
2453
3290
|
percentage: z.number().optional(),
|
|
2454
3291
|
taxIdentificationNumberId: z.number().int().optional()
|
|
2455
3292
|
});
|
|
@@ -2489,7 +3326,7 @@ export const transactionsCreateBody = z.object({
|
|
|
2489
3326
|
status: z.enum(["pending", "finalized", "failed", "reversed", "refunded", "authorized", "initialized"]),
|
|
2490
3327
|
ref: z.string().optional(),
|
|
2491
3328
|
failureReason: z.string().optional(),
|
|
2492
|
-
lastUpdatedAt: z.
|
|
3329
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2493
3330
|
});
|
|
2494
3331
|
// GET /public-api/resources/transactions/v1.0/{transaction}
|
|
2495
3332
|
// PATCH /public-api/resources/transactions/v1.0/{transaction}
|
|
@@ -2507,26 +3344,25 @@ export const transactionUpdateBody = z.object({
|
|
|
2507
3344
|
totalAmount: z.number(),
|
|
2508
3345
|
ref: z.string().optional(),
|
|
2509
3346
|
failureReason: z.string().optional(),
|
|
2510
|
-
lastUpdatedAt: z.
|
|
3347
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2511
3348
|
});
|
|
2512
3349
|
// GET /public-api/resources/user-groups/v1.0
|
|
2513
|
-
export const userGroupsListingQueryParams = z.object({
|
|
2514
|
-
filter: z.object({
|
|
2515
|
-
noPartner: z.string().optional(),
|
|
2516
|
-
partnerId: z.string().optional()
|
|
2517
|
-
}).optional()
|
|
2518
|
-
});
|
|
2519
3350
|
// POST /public-api/resources/user-groups/v1.0
|
|
2520
3351
|
export const userGroupCreateBody = z.object({
|
|
2521
3352
|
name: z.string(),
|
|
2522
3353
|
partnerId: z.number().int().optional(),
|
|
2523
3354
|
description: z.string().max(2000).optional(),
|
|
2524
|
-
lastUpdatedAt: z.
|
|
3355
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
2525
3356
|
});
|
|
2526
3357
|
// GET /public-api/resources/user-groups/v1.0/{userGroup}
|
|
2527
3358
|
// DELETE /public-api/resources/user-groups/v1.0/{userGroup}
|
|
2528
3359
|
// PATCH /public-api/resources/user-groups/v1.0/{userGroup}
|
|
2529
|
-
export const userGroupUpdateBody = z.
|
|
3360
|
+
export const userGroupUpdateBody = z.object({
|
|
3361
|
+
name: z.string(),
|
|
3362
|
+
partnerId: z.number().int().optional(),
|
|
3363
|
+
description: z.string().max(2000).optional(),
|
|
3364
|
+
lastUpdatedAt: z.string().datetime().optional()
|
|
3365
|
+
});
|
|
2530
3366
|
// GET /public-api/resources/users/v1.0
|
|
2531
3367
|
// POST /public-api/resources/users/v1.0
|
|
2532
3368
|
export const userCreateBody = z.object({
|
|
@@ -2538,8 +3374,8 @@ export const userCreateBody = z.object({
|
|
|
2538
3374
|
middle_name: z.string().optional(),
|
|
2539
3375
|
last_name: z.string().optional(),
|
|
2540
3376
|
phone: z.string().optional(),
|
|
2541
|
-
country: z.
|
|
2542
|
-
state: z.union([z.
|
|
3377
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
3378
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"])]).optional(),
|
|
2543
3379
|
city: z.string().optional(),
|
|
2544
3380
|
post_code: z.string().optional(),
|
|
2545
3381
|
address: z.string().optional(),
|
|
@@ -2551,7 +3387,7 @@ export const userCreateBody = z.object({
|
|
|
2551
3387
|
options: z.object({
|
|
2552
3388
|
sessionsAllowed: z.enum(["single_session", "multiple_simultaneous_sessions_per_idtag", "simultaneous_use_of_idtags", "multiple_simultaneous_sessions_remotely_and_idtags"]).optional()
|
|
2553
3389
|
}).optional(),
|
|
2554
|
-
lastUpdatedAt: z.
|
|
3390
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
2555
3391
|
receiveNewsAndPromotions: z.boolean().optional(),
|
|
2556
3392
|
bankDetails: z.object({
|
|
2557
3393
|
bankIban: z.string().optional(),
|
|
@@ -2561,13 +3397,10 @@ export const userCreateBody = z.object({
|
|
|
2561
3397
|
bankAccountNumber: z.string().optional(),
|
|
2562
3398
|
bankAccountType: z.string().optional()
|
|
2563
3399
|
}).optional(),
|
|
2564
|
-
externalAppData: z.unknown().optional(),
|
|
3400
|
+
externalAppData: z.record(z.unknown()).optional(),
|
|
2565
3401
|
nonce: z.string().optional()
|
|
2566
3402
|
});
|
|
2567
3403
|
// GET /public-api/resources/users/v1.0/{user}
|
|
2568
|
-
export const userReadQueryParams = z.object({
|
|
2569
|
-
withAmountDue: z.boolean().optional()
|
|
2570
|
-
});
|
|
2571
3404
|
// DELETE /public-api/resources/users/v1.0/{user}
|
|
2572
3405
|
// PATCH /public-api/resources/users/v1.0/{user}
|
|
2573
3406
|
export const userUpdateBody = z.object({
|
|
@@ -2579,19 +3412,28 @@ export const userUpdateBody = z.object({
|
|
|
2579
3412
|
middle_name: z.string().optional(),
|
|
2580
3413
|
last_name: z.string().optional(),
|
|
2581
3414
|
phone: z.string().optional(),
|
|
2582
|
-
country: z.
|
|
2583
|
-
state: z.union([z.
|
|
3415
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
3416
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"])]).optional(),
|
|
2584
3417
|
city: z.string().optional(),
|
|
2585
3418
|
post_code: z.string().optional(),
|
|
2586
3419
|
address: z.string().optional(),
|
|
2587
3420
|
vehicle_no: z.string().optional(),
|
|
2588
3421
|
userGroupIds: z.array(z.number().int()).optional(),
|
|
2589
3422
|
externalId: z.string().optional(),
|
|
2590
|
-
options: z.
|
|
2591
|
-
|
|
3423
|
+
options: z.object({
|
|
3424
|
+
sessionsAllowed: z.enum(["single_session", "multiple_simultaneous_sessions_per_idtag", "simultaneous_use_of_idtags", "multiple_simultaneous_sessions_remotely_and_idtags"]).optional()
|
|
3425
|
+
}).optional(),
|
|
3426
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
2592
3427
|
receiveNewsAndPromotions: z.boolean().optional(),
|
|
2593
|
-
bankDetails: z.
|
|
2594
|
-
|
|
3428
|
+
bankDetails: z.object({
|
|
3429
|
+
bankIban: z.string().optional(),
|
|
3430
|
+
bankName: z.string().optional(),
|
|
3431
|
+
bankAddress: z.string().optional(),
|
|
3432
|
+
bankCode: z.string().optional(),
|
|
3433
|
+
bankAccountNumber: z.string().optional(),
|
|
3434
|
+
bankAccountType: z.string().optional()
|
|
3435
|
+
}).optional(),
|
|
3436
|
+
externalAppData: z.record(z.unknown()).optional()
|
|
2595
3437
|
});
|
|
2596
3438
|
// GET /public-api/resources/users/v1.0/{user}/invoice-details
|
|
2597
3439
|
// POST /public-api/resources/users/v1.0/{user}/invoice-details
|
|
@@ -2605,9 +3447,9 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
|
|
|
2605
3447
|
companyRegNo: z.string().optional(),
|
|
2606
3448
|
companyTaxId: z.string().optional(),
|
|
2607
3449
|
companyTaxAdministrationOfficeName: z.string().optional(),
|
|
2608
|
-
country: z.
|
|
3450
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
2609
3451
|
region: z.string().optional(),
|
|
2610
|
-
state: z.union([z.
|
|
3452
|
+
state: z.union([z.enum(["AL", "AK", "AS", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FM", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MH", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "MP", "OH", "OK", "OR", "PW", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY"]), z.enum(["NSW", "VIC", "QLD", "WA", "SA", "TAS", "ACT", "NT", "JBT", "CX", "NF", "CC", "AQ", "CSI", "ACI", "HM"]), z.enum(["AB", "BC", "MB", "NB", "NL", "NT", "NS", "NU", "ON", "PE", "QC", "SK", "YT"]), z.enum(["81", "84", "85", "67", "89", "71", "76", "95", "79"]), z.enum(["AB", "AR", "AG", "BC", "BH", "BN", "BT", "BV", "BR", "B", "BZ", "CL", "CS", "CT", "CV", "DB", "DJ", "GL", "GR", "GJ", "HR", "HD", "IL", "IS", "IF", "MM", "MH", "MS", "NT", "OT", "PH", "SM", "SJ", "SB", "SV", "TR", "TM", "TL", "VS", "VL", "VN"])]).optional(),
|
|
2611
3453
|
city: z.string().optional(),
|
|
2612
3454
|
postCode: z.string().optional(),
|
|
2613
3455
|
address: z.string().optional()
|
|
@@ -2619,7 +3461,7 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
|
|
|
2619
3461
|
mobilePhoneNumber: z.string().optional(),
|
|
2620
3462
|
landlinePhoneNumber: z.string().optional(),
|
|
2621
3463
|
taxId: z.string().optional(),
|
|
2622
|
-
country: z.
|
|
3464
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
2623
3465
|
city: z.string().optional(),
|
|
2624
3466
|
postcode: z.string().optional(),
|
|
2625
3467
|
address: z.string().optional()
|
|
@@ -2628,7 +3470,7 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
|
|
|
2628
3470
|
lastName: z.string(),
|
|
2629
3471
|
email: z.string(),
|
|
2630
3472
|
phone: z.string().optional(),
|
|
2631
|
-
country: z.
|
|
3473
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
2632
3474
|
city: z.string().optional(),
|
|
2633
3475
|
postcode: z.string().optional(),
|
|
2634
3476
|
address: z.string().optional()
|
|
@@ -2642,7 +3484,7 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
|
|
|
2642
3484
|
name: z.string(),
|
|
2643
3485
|
email: z.string(),
|
|
2644
3486
|
phone: z.string(),
|
|
2645
|
-
country: z.
|
|
3487
|
+
country: z.enum(["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]).optional(),
|
|
2646
3488
|
city: z.string().optional(),
|
|
2647
3489
|
postcode: z.string().optional(),
|
|
2648
3490
|
address: z.string().optional()
|
|
@@ -2667,7 +3509,9 @@ export const createUtilityBody = z.object({
|
|
|
2667
3509
|
});
|
|
2668
3510
|
// GET /public-api/resources/utilities/v1.0/{utility}
|
|
2669
3511
|
// PUT /public-api/resources/utilities/v1.0/{utility}
|
|
2670
|
-
export const updateUtilityBody = z.
|
|
3512
|
+
export const updateUtilityBody = z.object({
|
|
3513
|
+
name: z.string().min(1).max(255)
|
|
3514
|
+
});
|
|
2671
3515
|
// DELETE /public-api/resources/utilities/v1.0/{utility}
|
|
2672
3516
|
// GET /public-api/resources/vendor-error-codes/v2.0
|
|
2673
3517
|
// POST /public-api/resources/vendor-error-codes/v2.0
|
|
@@ -2681,7 +3525,13 @@ export const vendorErrorCodeCreateBody = z.object({
|
|
|
2681
3525
|
// GET /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
|
|
2682
3526
|
// DELETE /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
|
|
2683
3527
|
// PATCH /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
|
|
2684
|
-
export const vendorErrorCodeUpdateBody = z.
|
|
3528
|
+
export const vendorErrorCodeUpdateBody = z.object({
|
|
3529
|
+
id: z.number().int().optional(),
|
|
3530
|
+
vendorId: z.string(),
|
|
3531
|
+
errorCode: z.string(),
|
|
3532
|
+
errorCodeDescription: z.string().optional(),
|
|
3533
|
+
errorCodeCustomerAction: z.string().optional()
|
|
3534
|
+
});
|
|
2685
3535
|
// GET /public-api/resources/vouchers/v2.0
|
|
2686
3536
|
// POST /public-api/resources/vouchers/v2.0
|
|
2687
3537
|
export const voucherCreateDeprecatedBody = z.object({
|
|
@@ -2716,11 +3566,14 @@ export const voucherCreateBody = z.object({
|
|
|
2716
3566
|
// PATCH /public-api/resources/vouchers/v2.1/{voucher}
|
|
2717
3567
|
export const voucherUpdateBody = z.object({
|
|
2718
3568
|
status: z.enum(["enabled", "disabled"]).optional(),
|
|
2719
|
-
expireDate: z.
|
|
2720
|
-
validityPeriod: z.
|
|
3569
|
+
expireDate: z.string().optional(),
|
|
3570
|
+
validityPeriod: z.enum(["1 month", "3 months", "6 months", "1 year", "2 years", "3 years", "5 years"]).optional(),
|
|
2721
3571
|
assignBeforeDate: z.string().optional(),
|
|
2722
3572
|
amount: z.number(),
|
|
2723
3573
|
prefix: z.string().min(3).max(3).optional(),
|
|
2724
|
-
title: z.
|
|
3574
|
+
title: z.array(z.object({
|
|
3575
|
+
locale: z.string().optional(),
|
|
3576
|
+
translation: z.string().optional()
|
|
3577
|
+
})).optional()
|
|
2725
3578
|
});
|
|
2726
3579
|
//# sourceMappingURL=schemas.js.map
|