@ampeco/public-api-mcp 0.2.2 → 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.
Files changed (59) hide show
  1. package/README.md +235 -4
  2. package/dist/build/optimizer.d.ts.map +1 -1
  3. package/dist/build/optimizer.js +82 -21
  4. package/dist/build/optimizer.js.map +1 -1
  5. package/dist/build/parser.d.ts.map +1 -1
  6. package/dist/build/parser.js +74 -1
  7. package/dist/build/parser.js.map +1 -1
  8. package/dist/cli/index.js +25 -11
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/generated/build-stats.json +5 -5
  11. package/dist/generated/endpoints.json +29214 -20896
  12. package/dist/generated/schemas.d.ts +7530 -2789
  13. package/dist/generated/schemas.d.ts.map +1 -1
  14. package/dist/generated/schemas.js +1443 -590
  15. package/dist/generated/schemas.js.map +1 -1
  16. package/dist/generated/schemas.ts +1447 -596
  17. package/dist/server/factory.d.ts +2 -1
  18. package/dist/server/factory.d.ts.map +1 -1
  19. package/dist/server/factory.js +17 -206
  20. package/dist/server/factory.js.map +1 -1
  21. package/dist/server/factory.test.js +62 -4
  22. package/dist/server/factory.test.js.map +1 -1
  23. package/dist/server/http.d.ts +2 -1
  24. package/dist/server/http.d.ts.map +1 -1
  25. package/dist/server/http.js +8 -2
  26. package/dist/server/http.js.map +1 -1
  27. package/dist/server/index.d.ts +2 -0
  28. package/dist/server/index.d.ts.map +1 -1
  29. package/dist/server/index.js +9 -1388
  30. package/dist/server/index.js.map +1 -1
  31. package/dist/server/instructions.d.ts +13 -0
  32. package/dist/server/instructions.d.ts.map +1 -0
  33. package/dist/server/instructions.js +146 -0
  34. package/dist/server/instructions.js.map +1 -0
  35. package/dist/server/resources/handlers.d.ts +31 -0
  36. package/dist/server/resources/handlers.d.ts.map +1 -0
  37. package/dist/server/resources/handlers.js +113 -0
  38. package/dist/server/resources/handlers.js.map +1 -0
  39. package/dist/server/resources/handlers.test.d.ts +6 -0
  40. package/dist/server/resources/handlers.test.d.ts.map +1 -0
  41. package/dist/server/resources/handlers.test.js +203 -0
  42. package/dist/server/resources/handlers.test.js.map +1 -0
  43. package/dist/server/resources/native.d.ts +11 -0
  44. package/dist/server/resources/native.d.ts.map +1 -0
  45. package/dist/server/resources/native.js +31 -0
  46. package/dist/server/resources/native.js.map +1 -0
  47. package/dist/server/resources/tools.d.ts +11 -0
  48. package/dist/server/resources/tools.d.ts.map +1 -0
  49. package/dist/server/resources/tools.js +41 -0
  50. package/dist/server/resources/tools.js.map +1 -0
  51. package/dist/server/stdio.d.ts +2 -1
  52. package/dist/server/stdio.d.ts.map +1 -1
  53. package/dist/server/stdio.js +8 -2
  54. package/dist/server/stdio.js.map +1 -1
  55. package/dist/server/types.d.ts +36 -0
  56. package/dist/server/types.d.ts.map +1 -0
  57. package/dist/server/types.js +6 -0
  58. package/dist/server/types.js.map +1 -0
  59. package/package.json +3 -2
@@ -95,6 +95,34 @@ export const chargePointStartChargingSessionWithoutEvseBody = z.object({
95
95
  });
96
96
 
97
97
  // POST /public-api/actions/charge-point/v1.0/{chargePoint}/start/{evse}
98
+ export const chargePointStartChargingSessionBody = z.object({
99
+ userId: z.number().int().optional(),
100
+ paymentMethodId: z.string().optional(),
101
+ externalSessionId: z.string().optional(),
102
+ connectorId: z.number().int().optional(),
103
+ bookingId: z.number().int().optional(),
104
+ chargingProfile: z.object({
105
+ transactionId: z.number().int().optional(),
106
+ stackLevel: z.number().int(),
107
+ chargingProfilePurpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]),
108
+ chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]),
109
+ recurrencyKind: z.enum(["Daily", "Weekly"]).optional(),
110
+ validFrom: z.string().datetime().optional(),
111
+ validTo: z.string().datetime().optional(),
112
+ chargingSchedule: z.object({
113
+ id: z.number().optional(),
114
+ duration: z.number().int().optional(),
115
+ startSchedule: z.string().datetime().optional(),
116
+ chargingRateUnit: z.enum(["A", "W"]),
117
+ chargingSchedulePeriod: z.array(z.object({
118
+ startPeriod: z.number().int(),
119
+ limit: z.number(),
120
+ numberPhases: z.number().int().optional()
121
+ })),
122
+ minChargingRate: z.number().optional()
123
+ })
124
+ }).optional()
125
+ });
98
126
 
99
127
  // POST /public-api/actions/charge-point/v1.0/{chargePoint}/stop/{session}
100
128
  export const chargePointStopChargingSessionBody = z.object({
@@ -103,10 +131,13 @@ export const chargePointStopChargingSessionBody = z.object({
103
131
 
104
132
  // POST /public-api/actions/charge-point/v1.0/{chargePoint}/sync-configuration
105
133
  export const chargePointSyncConfigurationBody = z.object({
106
- keys: z.array(z.union([z.unknown(), z.string()])).optional()
134
+ 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()
107
135
  });
108
136
 
109
137
  // POST /public-api/actions/charge-point/v1.0/{chargePoint}/trigger-message
138
+ export const chargePointTriggerMessageChargePointBody = z.object({
139
+ type: z.enum(["BootNotification", "DiagnosticsStatusNotification", "LogStatusNotification", "FirmwareStatusNotification", "PublishFirmwareStatusNotification", "Heartbeat", "MeterValues", "StatusNotification", "SignV2GCertificate", "SignChargingStationCertificate", "SignCombinedCertificate", "TransactionEvent"])
140
+ });
110
141
 
111
142
  // POST /public-api/actions/charge-point/v1.0/{chargePoint}/unlock/{evse}
112
143
 
@@ -161,15 +192,19 @@ export const circuitAttachChargePointBody = z.object({
161
192
  // POST /public-api/actions/circuit/v2.0/{circuit}/detach-charge-point/{chargePoint}
162
193
 
163
194
  // POST /public-api/actions/circuit/v2.0/{circuit}/set-charge-point-priority/{chargePoint}
164
- export const circuitSetChargePointPriorityBody = z.unknown();
195
+ export const circuitSetChargePointPriorityBody = z.object({
196
+ priority: z.number().min(0)
197
+ });
165
198
 
166
199
  // POST /public-api/actions/circuit/v2.0/{circuit}/set-charge-point-priority/{chargePoint}/evse/{evse}
167
- export const circuitSetChargePointEvsePriorityBody = z.unknown();
200
+ export const circuitSetChargePointEvsePriorityBody = z.object({
201
+ priority: z.number().min(0)
202
+ });
168
203
 
169
204
  // POST /public-api/actions/circuit/v2.0/{circuit}/set-circuit-soc-priorities
170
205
  export const circuitSetCircuitSocPriorityBody = z.object({
171
206
  upperThresholdPercent: z.number().min(5).max(95).optional(),
172
- highSoCPriority: z.unknown().optional(),
207
+ highSoCPriority: z.number().min(0).optional(),
173
208
  lowerThresholdPercent: z.number().min(5).max(95).optional(),
174
209
  lowSoCPriority: z.number().min(0).optional()
175
210
  });
@@ -186,10 +221,23 @@ export const configurationTemplateApplyToChargePointsBody = z.object({
186
221
  });
187
222
 
188
223
  // POST /public-api/actions/configuration-template/v1.0/{template}/insert-bulk-variables
189
- export const configurationTemplateBulkCreateVariablesPathParams = z.object({
190
- template: z.number().int()
191
- });
192
- export const configurationTemplateBulkCreateVariablesBody = z.array(z.union([z.unknown(), z.unknown()]));
224
+ export const configurationTemplateBulkCreateVariablesBody = z.array(z.union([z.object({
225
+ id: z.number().int().optional(),
226
+ keyName: z.string(),
227
+ value: z.string(),
228
+ lastUpdatedAt: z.string().datetime().optional()
229
+ }).strict(), z.object({
230
+ id: z.number().int().optional(),
231
+ value: z.string(),
232
+ variableName: z.string(),
233
+ variableType: z.enum(["Actual", "Target", "MinSet", "MaxSet"]).optional(),
234
+ variableInstance: z.string().optional(),
235
+ component: z.string(),
236
+ componentInstance: z.string().optional(),
237
+ evseId: z.number().int().optional(),
238
+ connectorId: z.number().int().optional(),
239
+ lastUpdatedAt: z.string().datetime().optional()
240
+ })]));
193
241
 
194
242
  // POST /public-api/actions/electricity-meter/v1.0/{electricityMeter}/report-consumption
195
243
  export const electricityMeterReportConsumptionBody = z.object({
@@ -201,7 +249,32 @@ export const electricityMeterReportConsumptionBody = z.object({
201
249
 
202
250
  // POST /public-api/actions/evse/v1.0/{evse}/start
203
251
  export const evseStartChargingWithEvseIdBody = z.object({
204
- chargingProfile: z.unknown().optional()
252
+ userId: z.number().int().optional(),
253
+ paymentMethodId: z.string().optional(),
254
+ externalSessionId: z.string().optional(),
255
+ connectorId: z.number().int().optional(),
256
+ bookingId: z.number().int().optional(),
257
+ chargingProfile: z.object({
258
+ transactionId: z.number().int().optional(),
259
+ stackLevel: z.number().int(),
260
+ chargingProfilePurpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]),
261
+ chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]),
262
+ recurrencyKind: z.enum(["Daily", "Weekly"]).optional(),
263
+ validFrom: z.string().datetime().optional(),
264
+ validTo: z.string().datetime().optional(),
265
+ chargingSchedule: z.object({
266
+ id: z.number().optional(),
267
+ duration: z.number().int().optional(),
268
+ startSchedule: z.string().datetime().optional(),
269
+ chargingRateUnit: z.enum(["A", "W"]),
270
+ chargingSchedulePeriod: z.array(z.object({
271
+ startPeriod: z.number().int(),
272
+ limit: z.number(),
273
+ numberPhases: z.number().int().optional()
274
+ })),
275
+ minChargingRate: z.number().optional()
276
+ })
277
+ }).optional()
205
278
  });
206
279
 
207
280
  // POST /public-api/actions/evse/v1.0/{evse}/trigger-message
@@ -210,18 +283,12 @@ export const evseTriggerMessageBody = z.object({
210
283
  });
211
284
 
212
285
  // POST /public-api/actions/flexibility-asset/v1.0/{flexibilityAsset}/change-status
213
- export const changeFlexibilityAssetStatusPathParams = z.object({
214
- flexibilityAsset: z.string()
215
- });
216
286
  export const changeFlexibilityAssetStatusBody = z.object({
217
287
  status: z.enum(["enabled", "disabled"]),
218
288
  endsAt: z.string().datetime().optional()
219
289
  });
220
290
 
221
291
  // POST /public-api/actions/flexibility-asset/v1.0/{flexibilityAsset}/create-activation-request
222
- export const flexibilityAssetCreateActivationRequestPathParams = z.object({
223
- flexibilityAsset: z.string()
224
- });
225
292
  export const flexibilityAssetCreateActivationRequestBody = z.object({
226
293
  periods: z.array(z.object({
227
294
  startTime: z.string().datetime(),
@@ -233,19 +300,6 @@ export const flexibilityAssetCreateActivationRequestBody = z.object({
233
300
 
234
301
  // POST /public-api/actions/id-tag/v1.0/{idTag}/reissue-emaid
235
302
 
236
- // POST /public-api/actions/installer-job/v1.0/{installerJob}/assign-charge-points
237
- export const assignInstallerJobChargePointsBody = z.object({
238
- chargePointIds: z.array(z.number().int()).optional(),
239
- chargingZoneId: z.number().int().optional(),
240
- locationId: z.number().int().optional()
241
- });
242
-
243
- // POST /public-api/actions/installer-job/v1.0/{installerJob}/change-status
244
- export const changeInstallerJobStatusBody = z.object({
245
- status: z.enum(["new", "in_progress", "completed", "failed"]),
246
- outcomeDetails: z.string().optional()
247
- });
248
-
249
303
  // POST /public-api/actions/locations/v2.0/{location}/check-booking-availability
250
304
  export const locationCheckBookingAvailabilityBody = z.object({
251
305
  startAfter: z.string().datetime(),
@@ -254,7 +308,7 @@ export const locationCheckBookingAvailabilityBody = z.object({
254
308
 
255
309
  // POST /public-api/actions/notifications/v1.0/{notification}/resend
256
310
  export const notificationsResendFailedBody = z.object({
257
- notifications: z.array(z.unknown()),
311
+ 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"])),
258
312
  startTime: z.string().optional(),
259
313
  endTime: z.string().optional()
260
314
  });
@@ -291,7 +345,10 @@ export const updateCustomTariffFilterTariffBody = z.object({
291
345
  excl_vat: z.number().min(0).optional(),
292
346
  incl_vat: z.number().min(0).optional()
293
347
  }).optional(),
294
- max_price: z.unknown().optional(),
348
+ max_price: z.object({
349
+ excl_vat: z.number().min(0).optional(),
350
+ incl_vat: z.number().min(0).optional()
351
+ }).optional(),
295
352
  elements: z.array(z.object({
296
353
  price_components: z.array(z.object({
297
354
  type: z.enum(["ENERGY", "FLAT", "PARKING_TIME", "TIME"]),
@@ -439,7 +496,7 @@ export const notificationsSubscribeDeprecatedBody = z.object({
439
496
 
440
497
  // PUT /public-api/notifications/v1.0/{notification}
441
498
  export const notificationsUpdateDeprecatedBody = z.object({
442
- notifications: z.array(z.unknown()),
499
+ 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"])),
443
500
  callbackUrl: z.string().url().max(500)
444
501
  });
445
502
 
@@ -451,7 +508,7 @@ export const notificationsUpdateDeprecatedBody = z.object({
451
508
  export const notificationsSubscribeBody = z.object({
452
509
  id: z.number(),
453
510
  via: z.enum(["webhook", "kafka"]),
454
- notifications: z.array(z.unknown()),
511
+ 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"])),
455
512
  webhook: z.object({
456
513
  callbackUrl: z.string().url().max(500)
457
514
  }).optional(),
@@ -469,21 +526,31 @@ export const notificationsSubscribeBody = z.object({
469
526
  // GET /public-api/notifications/v2.0/{notification}
470
527
 
471
528
  // PUT /public-api/notifications/v2.0/{notification}
472
- export const notificationsCreateBody = z.unknown();
529
+ export const notificationsCreateBody = z.object({
530
+ id: z.number(),
531
+ via: z.enum(["webhook", "kafka"]),
532
+ 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"])),
533
+ webhook: z.object({
534
+ callbackUrl: z.string().url().max(500)
535
+ }).optional(),
536
+ kafka: z.object({
537
+ topic: z.string(),
538
+ brokers: z.array(z.string()),
539
+ compressionCodec: z.enum(["none", "gzip", "snappy", "lz4"]).optional(),
540
+ securityProtocol: z.enum(["PLAINTEXT", "SASL_SSL"]).optional(),
541
+ saslMechanism: z.enum(["PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512"]).optional(),
542
+ saslUsername: z.string().optional(),
543
+ saslPassword: z.string().optional()
544
+ }).optional()
545
+ });
473
546
 
474
547
  // DELETE /public-api/notifications/v2.0/{notification}
475
548
 
476
549
  // GET /public-api/resources/authorizations/v1.0/{authorization}
477
- export const authorizationReadDeprecatedPathParams = z.object({
478
- authorization: z.string()
479
- });
480
550
 
481
551
  // GET /public-api/resources/authorizations/v2.0
482
552
 
483
553
  // GET /public-api/resources/authorizations/v2.0/{authorization}
484
- export const authorizationReadPathParams = z.object({
485
- authorization: z.string()
486
- });
487
554
 
488
555
  // GET /public-api/resources/booking-requests/v1.0
489
556
 
@@ -499,21 +566,31 @@ export const bookingRequestCreateBody = z.union([z.object({
499
566
  locationId: z.number().int(),
500
567
  evseId: z.number().int().optional(),
501
568
  evseCriteria: z.object({
502
- currentType: z.unknown().optional(),
569
+ currentType: z.enum(["ac", "dc"]).optional(),
503
570
  minPower: z.number().optional(),
504
571
  maxPower: z.number().optional(),
505
- connectorType: z.unknown().optional()
572
+ 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()
506
573
  }).optional(),
507
574
  startAt: z.string().datetime(),
508
575
  endAt: z.string().datetime()
509
576
  }), z.object({
577
+ id: z.number().int().optional(),
510
578
  type: z.enum(["update"]),
579
+ status: z.enum(["pending", "approved", "rejected"]).optional(),
580
+ rejectionReason: z.string().optional(),
581
+ createdAt: z.string().datetime().optional(),
582
+ lastUpdatedAt: z.string().datetime().optional(),
511
583
  bookingId: z.number().int(),
512
584
  userId: z.number().int().optional(),
513
585
  startAt: z.string().datetime().optional(),
514
586
  endAt: z.string().datetime().optional()
515
587
  }), z.object({
588
+ id: z.number().int().optional(),
516
589
  type: z.enum(["cancel"]),
590
+ status: z.enum(["pending", "approved", "rejected"]).optional(),
591
+ rejectionReason: z.string().optional(),
592
+ createdAt: z.string().datetime().optional(),
593
+ lastUpdatedAt: z.string().datetime().optional(),
517
594
  bookingId: z.number().int()
518
595
  })]);
519
596
 
@@ -524,29 +601,17 @@ export const bookingRequestCreateBody = z.union([z.object({
524
601
  // GET /public-api/resources/bookings/v1.0/{booking}
525
602
 
526
603
  // GET /public-api/resources/cdrs/v2.0
527
- export const cdrsListingQueryParams = z.object({
528
- per_page: z.number().int().min(1).max(100).optional(),
529
- cursor: z.string().optional(),
530
- include: z.array(z.enum(["externalAppData"])).optional()
531
- });
532
604
 
533
605
  // GET /public-api/resources/cdrs/v2.0/{cdr}
534
- export const cdrReadPathParams = z.object({
535
- cdr: z.number().int()
536
- });
537
606
 
538
607
  // GET /public-api/resources/charge-point-downtime-periods/v1.0
539
- export const chargePointDowntimePeriodsListingQueryParams = z.object({
540
- filter: z.object({
541
- chargePointId: z.number().int().optional(),
542
- $ref: z.unknown().optional()
543
- }).optional()
544
- });
545
608
 
546
609
  // POST /public-api/resources/charge-point-downtime-periods/v1.0
547
610
  export const chargePointDowntimePeriodCreateBody = z.object({
548
- $ref: z.unknown().optional(),
549
- chargePointId: z.number().int()
611
+ evseId: z.number().int().optional(),
612
+ noticeId: z.number().int(),
613
+ startedAt: z.string().datetime(),
614
+ endedAt: z.string().datetime()
550
615
  });
551
616
 
552
617
  // GET /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
@@ -554,39 +619,74 @@ export const chargePointDowntimePeriodCreateBody = z.object({
554
619
  // DELETE /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
555
620
 
556
621
  // PATCH /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
557
- export const chargePointDowntimePeriodUpdateBody = z.unknown();
622
+ export const chargePointDowntimePeriodUpdateBody = z.object({
623
+ noticeId: z.number().int().optional(),
624
+ startedAt: z.string().datetime().optional(),
625
+ endedAt: z.string().datetime().optional()
626
+ });
558
627
 
559
628
  // GET /public-api/resources/charge-point-models/v1.0
560
- export const chargePointModelsListingQueryParams = z.object({
561
- filter: z.unknown().optional()
562
- });
563
629
 
564
630
  // POST /public-api/resources/charge-point-models/v1.0
565
- export const chargePointModelCreateBody = z.unknown();
631
+ export const chargePointModelCreateBody = z.object({
632
+ name: z.string(),
633
+ vendorId: z.number().int(),
634
+ userManual: z.string().url().optional(),
635
+ installerManual: z.string().url().optional()
636
+ });
566
637
 
567
638
  // GET /public-api/resources/charge-point-models/v1.0/{modelId}
568
639
 
569
640
  // DELETE /public-api/resources/charge-point-models/v1.0/{modelId}
570
641
 
571
642
  // PATCH /public-api/resources/charge-point-models/v1.0/{modelId}
572
- export const chargePointModelUpdateBody = z.unknown();
643
+ export const chargePointModelUpdateBody = z.object({
644
+ name: z.string().optional(),
645
+ vendorId: z.number().int().optional(),
646
+ userManual: z.string().url().optional(),
647
+ installerManual: z.string().url().optional()
648
+ });
573
649
 
574
650
  // GET /public-api/resources/charge-point-vendors/v1.0
575
651
 
576
652
  // POST /public-api/resources/charge-point-vendors/v1.0
577
- export const chargePointVendorCreateBody = z.unknown();
653
+ export const chargePointVendorCreateBody = z.object({
654
+ id: z.number().int(),
655
+ name: z.string()
656
+ });
578
657
 
579
658
  // GET /public-api/resources/charge-point-vendors/v1.0/{vendorId}
580
659
 
581
660
  // DELETE /public-api/resources/charge-point-vendors/v1.0/{vendorId}
582
661
 
583
662
  // PATCH /public-api/resources/charge-point-vendors/v1.0/{vendorId}
584
- export const chargePointVendorUpdateBody = z.unknown();
663
+ export const chargePointVendorUpdateBody = z.object({
664
+ name: z.string().optional()
665
+ });
585
666
 
586
667
  // GET /public-api/resources/charge-points/v1.0
587
668
 
588
669
  // POST /public-api/resources/charge-points/v1.0
589
670
  export const chargePointCreateDeprecatedBody = z.object({
671
+ name: z.string(),
672
+ networkId: z.string(),
673
+ networkProtocol: z.enum(["ocpp 1.5", "ocpp 1.6", "ocpp 1.6 soap", "ocpp 2.0.1"]).optional(),
674
+ networkPassword: z.string().optional(),
675
+ networkIp: z.string().optional(),
676
+ networkPort: z.string().optional(),
677
+ status: z.enum(["active", "disabled", "out of order", "demo"]),
678
+ plugAndCharge: z.boolean().optional(),
679
+ locationId: z.number().int().optional(),
680
+ pin: z.string().optional(),
681
+ accessType: z.enum(["private", "public", "personal"]).optional(),
682
+ desiredSecurityProfile: z.number().int().min(0).max(2).optional(),
683
+ ownerPartnerId: z.number().int().optional(),
684
+ ownerPartnerContractId: z.number().int().optional(),
685
+ partnerCorporateBillingAsDefault: z.boolean().optional(),
686
+ partnerAccessType: z.enum(["privateViewPrivateUse", "privateViewPublicUse", "publicViewPrivateUse"]).optional(),
687
+ capabilities: z.array(z.enum(["REMOTE_START_STOP_CAPABLE", "METER_VALUES", "STOP_TRANSACTION_ON_EV_DISCONNECT"])).optional(),
688
+ managedByOperator: z.boolean().optional(),
689
+ tags: z.array(z.string()).optional(),
590
690
  templateId: z.number().int(),
591
691
  evses: z.record(z.object({
592
692
  tariffGroupId: z.number().int().optional(),
@@ -603,7 +703,31 @@ export const chargePointCreateDeprecatedBody = z.object({
603
703
 
604
704
  // PATCH /public-api/resources/charge-points/v1.0/{chargePoint}
605
705
  export const chargePointUpdateDeprecatedBody = z.object({
606
- evses: z.unknown().optional(),
706
+ name: z.string().optional(),
707
+ networkId: z.string().optional(),
708
+ networkProtocol: z.enum(["ocpp 1.5", "ocpp 1.6", "ocpp 1.6 soap", "ocpp 2.0.1"]).optional(),
709
+ networkPassword: z.string().optional(),
710
+ networkIp: z.string().optional(),
711
+ networkPort: z.string().optional(),
712
+ status: z.enum(["active", "disabled", "out of order", "demo"]).optional(),
713
+ plugAndCharge: z.boolean().optional(),
714
+ locationId: z.number().int().optional(),
715
+ pin: z.string().optional(),
716
+ accessType: z.enum(["private", "public", "personal"]).optional(),
717
+ desiredSecurityProfile: z.number().int().min(0).max(2).optional(),
718
+ ownerPartnerId: z.number().int().optional(),
719
+ ownerPartnerContractId: z.number().int().optional(),
720
+ partnerCorporateBillingAsDefault: z.boolean().optional(),
721
+ partnerAccessType: z.enum(["privateViewPrivateUse", "privateViewPublicUse", "publicViewPrivateUse"]).optional(),
722
+ capabilities: z.array(z.enum(["REMOTE_START_STOP_CAPABLE", "METER_VALUES", "STOP_TRANSACTION_ON_EV_DISCONNECT"])).optional(),
723
+ managedByOperator: z.boolean().optional(),
724
+ tags: z.array(z.string()).optional(),
725
+ evses: z.record(z.object({
726
+ tariffGroupId: z.number().int().optional(),
727
+ physicalReference: z.string().optional(),
728
+ maxAmperage: z.number().optional(),
729
+ status: z.enum(["active", "disabled", "out of order"]).optional()
730
+ })).optional(),
607
731
  externalId: z.string().optional()
608
732
  });
609
733
 
@@ -619,32 +743,6 @@ export const chargePointConfigurationUpdateDeprecatedBody = z.object({
619
743
  // GET /public-api/resources/charge-points/v1.0/{chargePoint}/status
620
744
 
621
745
  // GET /public-api/resources/charge-points/v2.0
622
- export const chargePointsListingQueryParams = z.object({
623
- filter: z.object({
624
- desiredSecurityProfileStatus: z.enum(["applied", "pending", "rejected"]).optional(),
625
- evsePhysicalReference: z.string().optional(),
626
- networkId: z.string().optional(),
627
- bootNotificationSerialNumber: z.string().optional(),
628
- modelId: z.string().optional(),
629
- vendorId: z.string().optional(),
630
- userId: z.string().optional(),
631
- partnerId: z.string().optional(),
632
- type: z.enum(["public", "private", "personal"]).optional(),
633
- subOperatorId: z.string().optional(),
634
- roaming: z.string().optional(),
635
- name: z.string().optional(),
636
- locationId: z.string().optional(),
637
- circuitId: z.number().int().optional(),
638
- chargingZoneId: z.string().optional(),
639
- managedByOperator: z.string().optional(),
640
- externalId: z.string().optional(),
641
- utilityId: z.number().int().optional(),
642
- tag: z.string().optional(),
643
- sharingCode: z.string().optional(),
644
- lastUpdatedAfter: z.string().datetime().optional(),
645
- lastUpdatedBefore: z.string().datetime().optional()
646
- }).optional()
647
- });
648
746
 
649
747
  // POST /public-api/resources/charge-points/v2.0
650
748
  export const chargePointCreateBody = z.object({
@@ -681,20 +779,44 @@ export const chargePointCreateBody = z.object({
681
779
  }).optional(),
682
780
  modelId: z.number().int().optional(),
683
781
  enableAutoFaultRecovery: z.boolean().optional(),
684
- user: z.unknown().optional(),
782
+ user: z.object({
783
+ id: z.number().int().optional(),
784
+ automaticFirmwareUpdatesEnabled: z.boolean().optional()
785
+ }).optional(),
685
786
  partner: z.object({
686
787
  id: z.number().int().optional(),
687
788
  contractId: z.number().int().optional(),
688
789
  contactId: z.number().int().optional(),
689
790
  corporateBillingAsDefault: z.boolean().optional(),
690
791
  accessType: z.enum(["private_view_private_use", "private_view_public_use", "public_view_private_use"]).optional(),
691
- notice: z.unknown().optional()
792
+ notice: z.array(z.object({
793
+ locale: z.string().optional(),
794
+ translation: z.string().optional()
795
+ })).optional()
692
796
  }).optional(),
693
797
  utilityId: z.number().int().optional(),
694
798
  createdAt: z.string().datetime().optional(),
695
799
  firstContactAt: z.string().optional(),
696
800
  roamingOperatorId: z.number().int().optional(),
697
- chargingProfile: z.unknown().optional(),
801
+ chargingProfile: z.object({
802
+ id: z.number().int().optional(),
803
+ minChargingRate: z.number().optional(),
804
+ schedulePeriods: z.array(z.object({
805
+ startPeriod: z.number().int().optional(),
806
+ limit: z.number().optional(),
807
+ numberPhases: z.number().int().optional()
808
+ })).optional(),
809
+ scheduleStart: z.string().optional(),
810
+ chargingRateUnit: z.enum(["A", "W"]).optional(),
811
+ stackLevel: z.number().int().optional(),
812
+ chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]).optional(),
813
+ recurrencyKind: z.enum(["daily", "weekly"]).optional(),
814
+ chargingCompleteAt: z.string().optional(),
815
+ purpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]).optional(),
816
+ validTo: z.string().optional(),
817
+ validFrom: z.string().optional(),
818
+ duration: z.number().int().optional()
819
+ }).optional(),
698
820
  displayTariffAndCosts: z.boolean().optional(),
699
821
  lastBootNotification: z.object({
700
822
  model: z.string().optional(),
@@ -710,14 +832,14 @@ export const chargePointCreateBody = z.object({
710
832
  networkStatus: z.enum(["never_connected", "available", "temporarily_unavailable", "long-term_unavailable"]).optional(),
711
833
  hardwareStatus: z.enum(["available", "unavailable", "faulted"]).optional(),
712
834
  vendorErrorCode: z.string().optional(),
713
- tags: z.unknown().optional(),
835
+ tags: z.array(z.string()).optional(),
714
836
  sharingCode: z.string().optional(),
715
837
  enabledRandomisedDelay: z.boolean().optional(),
716
- noticeId: z.unknown().optional(),
717
- usesRenewableEnergy: z.unknown().optional(),
718
- integratedAt: z.unknown().optional(),
719
- manufacturedAt: z.unknown().optional(),
720
- lastUpdatedAt: z.unknown().optional(),
838
+ noticeId: z.number().int().optional(),
839
+ usesRenewableEnergy: z.boolean().optional(),
840
+ integratedAt: z.string().datetime().optional(),
841
+ manufacturedAt: z.string().datetime().optional(),
842
+ lastUpdatedAt: z.string().datetime().optional(),
721
843
  ocppConnectedChargePointId: z.number().int().optional(),
722
844
  communicationMode: z.enum(["none", "direct_ocpp", "via_ocpp_connected_charge_point"]).optional()
723
845
  });
@@ -771,7 +893,10 @@ export const chargePointUpdateBody = z.object({
771
893
  contactId: z.number().int().optional(),
772
894
  corporateBillingAsDefault: z.boolean().optional(),
773
895
  accessType: z.enum(["private_view_private_use", "private_view_public_use", "public_view_private_use"]).optional(),
774
- notice: z.unknown().optional()
896
+ notice: z.array(z.object({
897
+ locale: z.string().optional(),
898
+ translation: z.string().optional()
899
+ })).optional()
775
900
  }).optional(),
776
901
  utilityId: z.number().int().optional(),
777
902
  tags: z.array(z.string()).optional(),
@@ -785,14 +910,6 @@ export const chargePointUpdateBody = z.object({
785
910
  // GET /public-api/resources/charge-points/v2.0/{chargePoint}/available-personal-smart-charging-modes
786
911
 
787
912
  // GET /public-api/resources/charge-points/v2.0/{chargePoint}/configurations
788
- export const chargePointConfigurationsListingQueryParams = z.object({
789
- filter: z.object({
790
- name: z.string().optional(),
791
- instance: z.string().optional(),
792
- componentName: z.string().optional(),
793
- evseId: z.number().int().optional()
794
- }).optional()
795
- });
796
913
 
797
914
  // GET /public-api/resources/charge-points/v2.0/{chargePoint}/configurations/{key}
798
915
 
@@ -806,7 +923,7 @@ export const chargePointConfigurationUpdateBody = z.object({
806
923
  // POST /public-api/resources/charge-points/v2.0/{chargePoint}/evses
807
924
  export const chargePointEvseCreateBody = z.object({
808
925
  physicalReference: z.string(),
809
- currentType: z.unknown(),
926
+ currentType: z.enum(["ac", "dc"]),
810
927
  label: z.string().optional(),
811
928
  networkId: z.string(),
812
929
  status: z.enum(["enabled", "disabled", "out of order"]),
@@ -814,7 +931,14 @@ export const chargePointEvseCreateBody = z.object({
814
931
  tariffGroupId: z.number().int().optional(),
815
932
  allowsReservation: z.boolean().optional(),
816
933
  bookingEnabled: z.boolean().optional(),
817
- powerOptions: z.unknown().optional(),
934
+ powerOptions: z.object({
935
+ maxPower: z.number().int().optional(),
936
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
937
+ maxAmperage: z.number().optional(),
938
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
939
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
940
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
941
+ }).optional(),
818
942
  externalId: z.string().optional()
819
943
  });
820
944
 
@@ -825,7 +949,7 @@ export const chargePointEvseCreateBody = z.object({
825
949
  // PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}
826
950
  export const chargePointEvseUpdateBody = z.object({
827
951
  physicalReference: z.string().optional(),
828
- currentType: z.unknown().optional(),
952
+ currentType: z.enum(["ac", "dc"]).optional(),
829
953
  label: z.string().optional(),
830
954
  networkId: z.string().optional(),
831
955
  status: z.enum(["enabled", "disabled", "out of order"]).optional(),
@@ -833,7 +957,14 @@ export const chargePointEvseUpdateBody = z.object({
833
957
  tariffGroupId: z.number().int().optional(),
834
958
  allowsReservation: z.boolean().optional(),
835
959
  bookingEnabled: z.boolean().optional(),
836
- powerOptions: z.unknown().optional(),
960
+ powerOptions: z.object({
961
+ maxPower: z.number().int().optional(),
962
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
963
+ maxAmperage: z.number().optional(),
964
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
965
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
966
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
967
+ }).optional(),
837
968
  externalId: z.string().optional()
838
969
  });
839
970
 
@@ -841,7 +972,7 @@ export const chargePointEvseUpdateBody = z.object({
841
972
 
842
973
  // POST /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors
843
974
  export const chargePointEvseConnectorCreateBody = z.object({
844
- type: z.unknown(),
975
+ 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"]),
845
976
  format: z.enum(["socket", "cable"]).optional(),
846
977
  status: z.enum(["enabled", "disabled"]).optional()
847
978
  });
@@ -852,7 +983,7 @@ export const chargePointEvseConnectorCreateBody = z.object({
852
983
 
853
984
  // PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors/{connector}
854
985
  export const chargePointEvseConnectorUpdateBody = z.object({
855
- type: z.unknown().optional(),
986
+ 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(),
856
987
  format: z.enum(["socket", "cable"]).optional(),
857
988
  status: z.enum(["enabled", "disabled"]).optional()
858
989
  });
@@ -868,7 +999,107 @@ export const chargePointEvseConnectorUpdateBody = z.object({
868
999
  // GET /public-api/resources/charge-points/v2.0/{chargePoint}/personal-smart-charging-preferences
869
1000
 
870
1001
  // POST /public-api/resources/charge-points/v2.0/{chargePoint}/personal-smart-charging-preferences
871
- export const personalSmartChargingPreferencesUpdateBody = z.union([z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.unknown(), z.object({
1002
+ export const personalSmartChargingPreferencesUpdateBody = z.union([z.object({
1003
+ enabled: z.boolean().optional(),
1004
+ type: z.enum(["user_controlled_schedule"]),
1005
+ preferences: z.object({
1006
+ startTime: z.string(),
1007
+ endTime: z.string(),
1008
+ targetCharge: z.object({
1009
+ minTargetChargeKwh: z.number().optional(),
1010
+ maxTargetChargeKwh: z.number().optional()
1011
+ }).optional(),
1012
+ trackElectricityCosts: z.object({
1013
+ priceOffPeak: z.number().optional(),
1014
+ pricePeak: z.number().optional()
1015
+ }).optional(),
1016
+ weekDays: z.array(z.object({
1017
+ days: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
1018
+ startTime: z.string(),
1019
+ endTime: z.string()
1020
+ })).optional()
1021
+ })
1022
+ }), z.object({
1023
+ enabled: z.boolean().optional(),
1024
+ type: z.enum(["solar"]),
1025
+ preferences: z.object({
1026
+ maxCurrentFromGrid: z.number(),
1027
+ solarStableTime: z.number()
1028
+ })
1029
+ }), z.object({
1030
+ enabled: z.boolean().optional(),
1031
+ type: z.enum(["octopus_agile"]),
1032
+ integrationId: z.number().int(),
1033
+ preferences: z.object({
1034
+ applicableTaxId: z.number().int(),
1035
+ targetCharge: z.object({
1036
+ departureTime: z.string().optional(),
1037
+ preconditioningTime: z.number().int().optional(),
1038
+ minTargetChargeKwh: z.number().optional(),
1039
+ maxTargetChargeKwh: z.number().optional()
1040
+ }).optional(),
1041
+ postCode: z.string(),
1042
+ priceThreshold: z.number()
1043
+ })
1044
+ }), z.object({
1045
+ enabled: z.boolean().optional(),
1046
+ type: z.enum(["octopus_go"]),
1047
+ integrationId: z.number().int(),
1048
+ preferences: z.object({
1049
+ applicableTaxId: z.number().int(),
1050
+ targetCharge: z.object({
1051
+ departureTime: z.string().optional(),
1052
+ preconditioningTime: z.number().int().optional(),
1053
+ minTargetChargeKwh: z.number().optional(),
1054
+ maxTargetChargeKwh: z.number().optional()
1055
+ }).optional(),
1056
+ postCode: z.string(),
1057
+ priceThreshold: z.number().optional()
1058
+ })
1059
+ }), z.object({
1060
+ enabled: z.boolean().optional(),
1061
+ type: z.enum(["energi_elspot"]),
1062
+ integrationId: z.number().int().optional(),
1063
+ preferences: z.object({
1064
+ location: z.enum(["GB1"]),
1065
+ targetCharge: z.object({
1066
+ departureTime: z.string(),
1067
+ preconditioningTime: z.number().int().optional(),
1068
+ targetChargeKwh: z.number()
1069
+ })
1070
+ }).optional()
1071
+ }), z.object({
1072
+ enabled: z.boolean().optional(),
1073
+ type: z.enum(["nordpool"]),
1074
+ integrationId: z.number().int().optional(),
1075
+ preferences: z.object({
1076
+ location: z.enum(["GB1"]),
1077
+ targetCharge: z.object({
1078
+ departureTime: z.string(),
1079
+ preconditioningTime: z.number().int().optional(),
1080
+ targetChargeKwh: z.number()
1081
+ })
1082
+ }).optional()
1083
+ }), z.object({
1084
+ enabled: z.boolean().optional(),
1085
+ type: z.enum(["charger_electricity_rate"]),
1086
+ electricityRateId: z.number().int(),
1087
+ preferences: z.object({
1088
+ solar: z.boolean().optional(),
1089
+ startTime: z.string(),
1090
+ endTime: z.string(),
1091
+ targetCharge: z.object({
1092
+ departureTime: z.string(),
1093
+ preconditioningTime: z.number().int().optional(),
1094
+ targetChargeKwh: z.number()
1095
+ }),
1096
+ weekDays: z.array(z.object({
1097
+ days: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
1098
+ startTime: z.string(),
1099
+ endTime: z.string()
1100
+ })).optional()
1101
+ })
1102
+ }), z.object({
872
1103
  enabled: z.boolean()
873
1104
  })]);
874
1105
 
@@ -891,7 +1122,55 @@ export const chargePointShareCreateBody = z.object({
891
1122
  // DELETE /public-api/resources/charge-points/v2.0/{chargePoint}/shares/{share}
892
1123
 
893
1124
  // POST /public-api/resources/charge-points/v2.0/{chargePoint}/smart-charging
894
- export const chargePointSmartChargingUpdateBody = z.union([z.unknown(), z.unknown(), z.unknown(), z.unknown()]);
1125
+ export const chargePointSmartChargingUpdateBody = z.union([z.object({
1126
+ mode: z.enum(["tod"]),
1127
+ defaultChargePointMaxCurrent: z.number(),
1128
+ circuitId: z.number().int().optional(),
1129
+ periods: z.array(z.object({
1130
+ weekDay: z.enum(["all", "mon", "tue", "wed", "thu", "fri", "sat", "sun"]),
1131
+ elements: z.array(z.object({
1132
+ startAt: z.string(),
1133
+ endAt: z.string(),
1134
+ maxCurrent: z.number().optional()
1135
+ }))
1136
+ })).optional(),
1137
+ preconditioningTime: z.number().int().optional(),
1138
+ minCurrent: z.number().optional(),
1139
+ enableKeepAwake: z.boolean().optional(),
1140
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]),
1141
+ electricalConfiguration: z.enum(["star", "delta"]).optional(),
1142
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]),
1143
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]),
1144
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
1145
+ }), z.object({
1146
+ mode: z.enum(["dynamic"]),
1147
+ defaultChargePointMaxCurrent: z.number(),
1148
+ preconditioningTime: z.number().int().optional(),
1149
+ circuitId: z.number().int().optional(),
1150
+ minCurrent: z.number().optional(),
1151
+ enableKeepAwake: z.boolean().optional(),
1152
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]),
1153
+ electricalConfiguration: z.enum(["star", "delta"]).optional(),
1154
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]),
1155
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]),
1156
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
1157
+ }), z.object({
1158
+ mode: z.enum(["user_schedule"]),
1159
+ defaultChargePointMaxCurrent: z.number(),
1160
+ preconditioningTime: z.number().int().optional(),
1161
+ circuitId: z.number().int().optional(),
1162
+ minCurrent: z.number(),
1163
+ enableKeepAwake: z.boolean(),
1164
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]),
1165
+ electricalConfiguration: z.enum(["star", "delta"]).optional(),
1166
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]),
1167
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]),
1168
+ allowDynamicLoadManagement: z.boolean().optional(),
1169
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
1170
+ }), z.object({
1171
+ mode: z.enum(["disabled"]),
1172
+ preconditioningTime: z.number().int().optional()
1173
+ })]);
895
1174
 
896
1175
  // GET /public-api/resources/circuits/v1.0
897
1176
 
@@ -910,7 +1189,7 @@ export const circuitCreateDeprecatedBody = z.object({
910
1189
  inputVoltage: z.enum(["110-130", "220-240", "380", "400"]),
911
1190
  phaseRotation: z.enum(["L1", "L2", "L3", "RST", "RTS", "SRT", "STR", "TRS", "TSR"])
912
1191
  })),
913
- lastUpdatedAt: z.unknown().optional()
1192
+ lastUpdatedAt: z.string().datetime().optional()
914
1193
  });
915
1194
 
916
1195
  // GET /public-api/resources/circuits/v1.0/{dlmCircuit}
@@ -932,24 +1211,14 @@ export const circuitUpdateDeprecatedBody = z.object({
932
1211
  inputVoltage: z.enum(["110-130", "220-240", "380", "400"]),
933
1212
  phaseRotation: z.enum(["L1", "L2", "L3", "RST", "RTS", "SRT", "STR", "TRS", "TSR"])
934
1213
  })).optional(),
935
- lastUpdatedAt: z.unknown().optional()
1214
+ lastUpdatedAt: z.string().datetime().optional()
936
1215
  });
937
1216
 
938
1217
  // GET /public-api/resources/circuits/v1.0/{dlmCircuit}/consumption
939
- export const circuitConsumptionAllPhasesDeprecatedPathParams = z.object({
940
- dlmCircuit: z.number().int()
941
- });
942
1218
 
943
1219
  // GET /public-api/resources/circuits/v1.0/{dlmCircuit}/consumption/{phase}
944
- export const circuitConsumptionPhaseDeprecatedPathParams = z.object({
945
- dlmCircuit: z.number().int(),
946
- phase: z.enum(["L1", "L2", "L3"])
947
- });
948
1220
 
949
1221
  // GET /public-api/resources/circuits/v2.0
950
- export const circuitsListingQueryParams = z.object({
951
- include: z.array(z.enum(["chargePointPriorities", "userPriorities", "socPriorities", "consumption", "unmanagedLoad"])).optional()
952
- });
953
1222
 
954
1223
  // POST /public-api/resources/circuits/v2.0
955
1224
  export const circuitCreateBody = z.object({
@@ -959,8 +1228,8 @@ export const circuitCreateBody = z.object({
959
1228
  phases: z.enum(["single_phase", "three_phase", "split_phase"]),
960
1229
  phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
961
1230
  connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional(),
962
- electricalConfiguration: z.unknown().optional(),
963
- maxVoltage: z.unknown().optional(),
1231
+ electricalConfiguration: z.enum(["star", "delta"]).optional(),
1232
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
964
1233
  maxCurrent: z.number(),
965
1234
  minChargePointCurrent: z.number().optional(),
966
1235
  setSessionLimitToZeroOnIdle: z.boolean().optional(),
@@ -988,8 +1257,8 @@ export const circuitUpdateBody = z.object({
988
1257
  phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
989
1258
  phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
990
1259
  connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional(),
991
- electricalConfiguration: z.unknown().optional(),
992
- maxVoltage: z.unknown().optional(),
1260
+ electricalConfiguration: z.enum(["star", "delta"]).optional(),
1261
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
993
1262
  maxCurrent: z.number().optional(),
994
1263
  minChargePointCurrent: z.number().optional(),
995
1264
  setSessionLimitToZeroOnIdle: z.boolean().optional(),
@@ -1008,9 +1277,6 @@ export const circuitUpdateBody = z.object({
1008
1277
  // GET /public-api/resources/circuits/v2.0/{circuit}/charge-point-priorities
1009
1278
 
1010
1279
  // GET /public-api/resources/circuits/v2.0/{circuit}/consumption
1011
- export const circuitConsumptionPathParams = z.object({
1012
- circuit: z.number().int()
1013
- });
1014
1280
 
1015
1281
  // GET /public-api/resources/circuits/v2.0/{circuit}/soc-priorities
1016
1282
 
@@ -1039,18 +1305,13 @@ export const circuitUserPriorityUpdateBody = z.object({
1039
1305
  });
1040
1306
 
1041
1307
  // GET /public-api/resources/configuration-templates/v1.0
1042
- export const listConfigurationTemplatesQueryParams = z.object({
1043
- filter: z.object({
1044
- ocppVersion: z.enum(["ocpp1.6", "ocpp2.0.1"]).optional()
1045
- }).optional()
1046
- });
1047
1308
 
1048
1309
  // POST /public-api/resources/configuration-templates/v1.0
1049
1310
  export const createConfigurationTemplateBody = z.object({
1050
1311
  id: z.number().int().optional(),
1051
1312
  name: z.string(),
1052
1313
  ocppVersion: z.enum(["ocpp 1.6", "ocpp 2.0.1"]),
1053
- lastUpdatedAt: z.unknown().optional()
1314
+ lastUpdatedAt: z.string().datetime().optional()
1054
1315
  });
1055
1316
 
1056
1317
  // GET /public-api/resources/configuration-templates/v1.0/{template}
@@ -1063,19 +1324,13 @@ export const updateConfigurationTemplateBody = z.object({
1063
1324
  });
1064
1325
 
1065
1326
  // GET /public-api/resources/configuration-templates/v1.0/{template}/variables
1066
- export const configurationTemplateVariableListingPathParams = z.object({
1067
- template: z.number().int()
1068
- });
1069
1327
 
1070
1328
  // POST /public-api/resources/configuration-templates/v1.0/{template}/variables
1071
- export const configurationTemplateVariableCreatePathParams = z.object({
1072
- template: z.number().int()
1073
- });
1074
1329
  export const configurationTemplateVariableCreateBody = z.union([z.object({
1075
1330
  id: z.number().int().optional(),
1076
1331
  keyName: z.string(),
1077
1332
  value: z.string(),
1078
- lastUpdatedAt: z.unknown().optional()
1333
+ lastUpdatedAt: z.string().datetime().optional()
1079
1334
  }).strict(), z.object({
1080
1335
  id: z.number().int().optional(),
1081
1336
  value: z.string(),
@@ -1086,7 +1341,7 @@ export const configurationTemplateVariableCreateBody = z.union([z.object({
1086
1341
  componentInstance: z.string().optional(),
1087
1342
  evseId: z.number().int().optional(),
1088
1343
  connectorId: z.number().int().optional(),
1089
- lastUpdatedAt: z.unknown().optional()
1344
+ lastUpdatedAt: z.string().datetime().optional()
1090
1345
  })]);
1091
1346
 
1092
1347
  // DELETE /public-api/resources/configuration-templates/v1.0/{template}/variables/{variable}
@@ -1096,7 +1351,7 @@ export const configurationTemplateVariableUpdateBody = z.union([z.object({
1096
1351
  id: z.number().int().optional(),
1097
1352
  keyName: z.string().optional(),
1098
1353
  value: z.string().optional(),
1099
- lastUpdatedAt: z.unknown().optional()
1354
+ lastUpdatedAt: z.string().datetime().optional()
1100
1355
  }).strict(), z.object({
1101
1356
  id: z.number().int().optional(),
1102
1357
  value: z.string().optional(),
@@ -1107,7 +1362,7 @@ export const configurationTemplateVariableUpdateBody = z.union([z.object({
1107
1362
  componentInstance: z.string().optional(),
1108
1363
  evseId: z.number().int().optional(),
1109
1364
  connectorId: z.number().int().optional(),
1110
- lastUpdatedAt: z.unknown().optional()
1365
+ lastUpdatedAt: z.string().datetime().optional()
1111
1366
  })]);
1112
1367
 
1113
1368
  // GET /public-api/resources/contact-details/v2.0
@@ -1116,17 +1371,12 @@ export const configurationTemplateVariableUpdateBody = z.union([z.object({
1116
1371
  export const contactDetailsUpdateBody = z.object({
1117
1372
  email: z.string(),
1118
1373
  phone: z.string().optional(),
1119
- lastUpdatedAt: z.unknown().optional()
1374
+ lastUpdatedAt: z.string().datetime().optional()
1120
1375
  });
1121
1376
 
1122
1377
  // DELETE /public-api/resources/contact-details/v2.0
1123
1378
 
1124
1379
  // GET /public-api/resources/cp-models/v1.0
1125
- export const chargePointModelsListingDeprecatedQueryParams = z.object({
1126
- filter: z.object({
1127
- vendorId: z.string().optional()
1128
- }).optional()
1129
- });
1130
1380
 
1131
1381
  // POST /public-api/resources/cp-models/v1.0
1132
1382
  export const chargePointModelCreateDeprecatedBody = z.object({
@@ -1183,18 +1433,18 @@ export const currencyCreateBody = z.object({
1183
1433
  // DELETE /public-api/resources/currencies/v2.0/{currency}
1184
1434
 
1185
1435
  // PATCH /public-api/resources/currencies/v2.0/{currency}
1186
- export const currencyUpdateBody = z.unknown();
1187
-
1188
- // GET /public-api/resources/currency-rates/v1.0
1189
- export const listCurrencyRatesQueryParams = z.object({
1190
- filter: z.object({
1191
- base: z.string().optional(),
1192
- target: z.string().optional(),
1193
- updatedBefore: z.string().datetime().optional(),
1194
- updatedAfter: z.string().datetime().optional()
1195
- }).optional()
1436
+ export const currencyUpdateBody = z.object({
1437
+ 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"]),
1438
+ prefix: z.string().optional(),
1439
+ suffix: z.string().optional(),
1440
+ decimal: z.number().int().optional(),
1441
+ unitPriceAndCalculationsDecimal: z.number().int().optional(),
1442
+ enableUseOfMinorCurrencyUnit: z.boolean().optional(),
1443
+ minorUnitSign: z.string().optional()
1196
1444
  });
1197
1445
 
1446
+ // GET /public-api/resources/currency-rates/v1.0
1447
+
1198
1448
  // POST /public-api/resources/currency-rates/v1.0
1199
1449
  export const createCurrencyRateBody = z.object({
1200
1450
  base: z.string(),
@@ -1216,15 +1466,12 @@ export const updateCurrencyRateBody = z.object({
1216
1466
  // GET /public-api/resources/custom-fees/v2.0/{customFee}
1217
1467
 
1218
1468
  // GET /public-api/resources/downtime-period-notices/v1.0
1219
- export const getDowntimePeriodNoticesQueryParams = z.object({
1220
- filter: z.object({
1221
- type: z.enum(["downtime", "exempt"]).optional()
1222
- }).optional()
1223
- });
1224
1469
 
1225
1470
  // POST /public-api/resources/downtime-period-notices/v1.0
1226
1471
  export const postDowntimePeriodNoticeBody = z.object({
1227
- $ref: z.unknown().optional()
1472
+ type: z.enum(["downtime", "exempt"]),
1473
+ notice: z.string(),
1474
+ description: z.string().optional()
1228
1475
  });
1229
1476
 
1230
1477
  // GET /public-api/resources/downtime-period-notices/v1.0/{notice}
@@ -1242,7 +1489,10 @@ export const patchDowntimePeriodNoticeBody = z.object({
1242
1489
 
1243
1490
  // POST /public-api/resources/electricity-meters/v1.0
1244
1491
  export const electricityMeterCreateBody = z.object({
1245
- id: z.number().optional()
1492
+ id: z.number().optional(),
1493
+ name: z.string(),
1494
+ integrationId: z.number().int(),
1495
+ integrationParameters: z.record(z.string()).optional()
1246
1496
  });
1247
1497
 
1248
1498
  // GET /public-api/resources/electricity-meters/v1.0/{electricityMeter}
@@ -1289,17 +1539,36 @@ export const electricityRateCreateDeprecatedBody = z.object({
1289
1539
  // GET /public-api/resources/electricity-rates/v1.0/{electricityRate}
1290
1540
 
1291
1541
  // PUT /public-api/resources/electricity-rates/v1.0/{electricityRate}
1292
- export const electricityRateUpdateDeprecatedBody = z.unknown();
1542
+ export const electricityRateUpdateDeprecatedBody = z.object({
1543
+ id: z.number().int().optional(),
1544
+ name: z.string(),
1545
+ utilityId: z.number().int().optional(),
1546
+ pricingGranularityInMinutes: z.union([z.literal(60), z.literal(30), z.literal(15)]),
1547
+ defaultPricePerKwh: z.number(),
1548
+ taxId: z.number().int().optional(),
1549
+ taxPercentage: z.number().min(0).max(100).optional(),
1550
+ intervalPricing: z.array(z.object({
1551
+ weekDays: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
1552
+ elements: z.array(z.object({
1553
+ startAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
1554
+ endAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
1555
+ price: z.number().optional()
1556
+ })).optional()
1557
+ })).optional(),
1558
+ intervalSpecialPricing: z.array(z.object({
1559
+ specialPricingName: z.string(),
1560
+ validOn: z.array(z.string()),
1561
+ elements: z.array(z.object({
1562
+ startAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
1563
+ endAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
1564
+ price: z.number().optional()
1565
+ })).optional()
1566
+ })).optional()
1567
+ });
1293
1568
 
1294
1569
  // DELETE /public-api/resources/electricity-rates/v1.0/{electricityRate}
1295
1570
 
1296
1571
  // GET /public-api/resources/electricity-rates/v2.0
1297
- export const electricityRatesListingQueryParams = z.object({
1298
- filter: z.object({
1299
- utilityId: z.number().int().optional(),
1300
- type: z.unknown().optional()
1301
- }).optional()
1302
- });
1303
1572
 
1304
1573
  // POST /public-api/resources/electricity-rates/v2.0
1305
1574
  export const electricityRateCreateBody = z.object({
@@ -1342,9 +1611,6 @@ export const electricityRateEnergyMixUpdateBody = z.object({
1342
1611
  // GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date
1343
1612
 
1344
1613
  // GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
1345
- export const electricityRatePricePeriodsDateReadPathParams = z.object({
1346
- date: z.string()
1347
- });
1348
1614
 
1349
1615
  // PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
1350
1616
  export const electricityRatePricePeriodsDateCreateOrUpdateBody = z.object({
@@ -1360,31 +1626,19 @@ export const electricityRatePricePeriodsDateCreateOrUpdateBody = z.object({
1360
1626
  // GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day
1361
1627
 
1362
1628
  // GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
1363
- export const electricityRatePricePeriodsWeekDayReadPathParams = z.object({
1364
- weekDay: z.enum(["mon", "tue", "wed", "thu", "fri", "sat", "sun", "any"])
1365
- });
1366
1629
 
1367
1630
  // PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
1368
- export const electricityRatePricePeriodsWeekDayCreateaOrUpdateBody = z.unknown();
1631
+ export const electricityRatePricePeriodsWeekDayCreateaOrUpdateBody = z.object({
1632
+ periods: z.array(z.object({
1633
+ startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
1634
+ endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
1635
+ price: z.number()
1636
+ }))
1637
+ });
1369
1638
 
1370
1639
  // DELETE /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
1371
1640
 
1372
1641
  // GET /public-api/resources/evse-downtime-periods/v1.0
1373
- export const evseDowntimePeriodsListingQueryParams = z.object({
1374
- filter: z.object({
1375
- evseId: z.number().int().optional(),
1376
- chargePointId: z.number().int().optional(),
1377
- locationId: z.number().int().optional(),
1378
- entryMode: z.enum(["manual", "automatic"]).optional(),
1379
- type: z.enum(["downtime", "exempt"]).optional(),
1380
- startedAfter: z.string().datetime().optional(),
1381
- stoppedBefore: z.string().datetime().optional(),
1382
- durationLessThan: z.number().int().optional(),
1383
- durationGreaterThan: z.number().int().optional(),
1384
- lastUpdatedAfter: z.string().datetime().optional(),
1385
- lastUpdatedBefore: z.string().datetime().optional()
1386
- }).optional()
1387
- });
1388
1642
 
1389
1643
  // POST /public-api/resources/evse-downtime-periods/v1.0
1390
1644
  export const evseDowntimePeriodCreateBody = z.object({
@@ -1406,11 +1660,6 @@ export const evseDowntimePeriodUpdateBody = z.object({
1406
1660
  });
1407
1661
 
1408
1662
  // GET /public-api/resources/evses/v2.0
1409
- export const evsesListingDeprecatedQueryParams = z.object({
1410
- page: z.number().int().optional(),
1411
- per_page: z.number().int().min(1).max(100).optional(),
1412
- cursor: z.string().optional()
1413
- });
1414
1663
 
1415
1664
  // GET /public-api/resources/evses/v2.0/{evse}
1416
1665
 
@@ -1418,7 +1667,25 @@ export const evsesListingDeprecatedQueryParams = z.object({
1418
1667
  export const evseUpdateDeprecatedBody = z.object({
1419
1668
  id: z.number().int().optional(),
1420
1669
  chargePointId: z.number().int().optional(),
1421
- chargingProfile: z.unknown().optional(),
1670
+ chargingProfile: z.object({
1671
+ id: z.number().int().optional(),
1672
+ minChargingRate: z.number().optional(),
1673
+ schedulePeriods: z.array(z.object({
1674
+ startPeriod: z.number().int().optional(),
1675
+ limit: z.number().optional(),
1676
+ numberPhases: z.number().int().optional()
1677
+ })).optional(),
1678
+ scheduleStart: z.string().optional(),
1679
+ chargingRateUnit: z.enum(["A", "W"]).optional(),
1680
+ stackLevel: z.number().int().optional(),
1681
+ chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]).optional(),
1682
+ recurrencyKind: z.enum(["daily", "weekly"]).optional(),
1683
+ chargingCompleteAt: z.string().optional(),
1684
+ purpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]).optional(),
1685
+ validTo: z.string().optional(),
1686
+ validFrom: z.string().optional(),
1687
+ duration: z.number().int().optional()
1688
+ }).optional(),
1422
1689
  roaming: z.object({
1423
1690
  evseId: z.string().optional(),
1424
1691
  status: z.enum(["available", "blocked", "charging", "inoperative", "outoforder", "planned", "removed", "reserved", "unknown"]).optional(),
@@ -1437,40 +1704,42 @@ export const evseUpdateDeprecatedBody = z.object({
1437
1704
  tariffGroupId: z.number().int().optional(),
1438
1705
  allowsReservation: z.boolean(),
1439
1706
  maxPowerKw: z.number().optional(),
1440
- maxVoltage: z.intersection(z.unknown(), z.unknown()),
1707
+ maxVoltage: z.intersection(z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]), z.unknown()),
1441
1708
  maxAmperage: z.number().optional(),
1442
1709
  phases: z.enum(["single_phase", "three_phase"]),
1443
1710
  phaseRotation: z.enum(["rst", "rts", "srt", "str", "trs", "tsr"]).optional(),
1444
1711
  midMeterCertificationEndYear: z.number().int().optional(),
1445
1712
  externalId: z.string().optional(),
1446
- hardwareStatus: z.unknown().optional()
1713
+ hardwareStatus: z.enum(["available", "preparing", "charging", "suspendedEV", "suspendedEVSE", "finishing", "reserved", "unavailable", "faulted"]).optional()
1447
1714
  });
1448
1715
 
1449
1716
  // GET /public-api/resources/evses/v2.0/{evse}/hardware-status-logs
1450
- export const listEvseHardwareStatusLogsQueryParams = z.object({
1451
- filter: z.object({
1452
- createdAfter: z.string().datetime().optional(),
1453
- createdBefore: z.unknown().optional()
1454
- }).optional()
1455
- });
1456
1717
 
1457
1718
  // GET /public-api/resources/evses/v2.0/{evse}/latest-hardware-status-log
1458
1719
 
1459
1720
  // GET /public-api/resources/evses/v2.1
1460
- export const evsesListingQueryParams = z.object({
1461
- filter: z.object({
1462
- chargePointId: z.string().optional(),
1463
- physicalReference: z.string().optional(),
1464
- externalId: z.string().optional(),
1465
- roaming: z.boolean().optional(),
1466
- lastUpdatedAfter: z.string().datetime().optional(),
1467
- lastUpdatedBefore: z.string().datetime().optional()
1468
- }).optional()
1469
- });
1470
1721
 
1471
1722
  // POST /public-api/resources/evses/v2.1
1472
1723
  export const evseCreateBody = z.object({
1473
- chargePointId: z.number().int()
1724
+ chargePointId: z.number().int(),
1725
+ physicalReference: z.string(),
1726
+ currentType: z.enum(["ac", "dc"]),
1727
+ label: z.string().optional(),
1728
+ networkId: z.string(),
1729
+ status: z.enum(["enabled", "disabled", "out of order"]),
1730
+ midMeterCertificationEndYear: z.number().int().optional(),
1731
+ tariffGroupId: z.number().int().optional(),
1732
+ allowsReservation: z.boolean().optional(),
1733
+ bookingEnabled: z.boolean().optional(),
1734
+ powerOptions: z.object({
1735
+ maxPower: z.number().int().optional(),
1736
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
1737
+ maxAmperage: z.number().optional(),
1738
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
1739
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
1740
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
1741
+ }).optional(),
1742
+ externalId: z.string().optional()
1474
1743
  });
1475
1744
 
1476
1745
  // GET /public-api/resources/evses/v2.1/{evse}
@@ -1478,13 +1747,35 @@ export const evseCreateBody = z.object({
1478
1747
  // DELETE /public-api/resources/evses/v2.1/{evse}
1479
1748
 
1480
1749
  // PATCH /public-api/resources/evses/v2.1/{evse}
1481
- export const evseUpdateBody = z.unknown();
1750
+ export const evseUpdateBody = z.object({
1751
+ physicalReference: z.string().optional(),
1752
+ currentType: z.enum(["ac", "dc"]).optional(),
1753
+ label: z.string().optional(),
1754
+ networkId: z.string().optional(),
1755
+ status: z.enum(["enabled", "disabled", "out of order"]).optional(),
1756
+ midMeterCertificationEndYear: z.number().int().optional(),
1757
+ tariffGroupId: z.number().int().optional(),
1758
+ allowsReservation: z.boolean().optional(),
1759
+ bookingEnabled: z.boolean().optional(),
1760
+ powerOptions: z.object({
1761
+ maxPower: z.number().int().optional(),
1762
+ maxVoltage: z.enum(["230", "380", "400", "480", "120", "208", "240", "110-130", "220-240"]).optional(),
1763
+ maxAmperage: z.number().optional(),
1764
+ phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
1765
+ phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
1766
+ connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional()
1767
+ }).optional(),
1768
+ externalId: z.string().optional()
1769
+ });
1482
1770
 
1483
1771
  // GET /public-api/resources/faqs/v2.0
1484
1772
 
1485
1773
  // POST /public-api/resources/faqs/v2.0
1486
1774
  export const faqCreateBody = z.object({
1487
- question: z.unknown(),
1775
+ question: z.array(z.object({
1776
+ locale: z.string().optional(),
1777
+ translation: z.string().optional()
1778
+ })),
1488
1779
  answer: z.array(z.object({
1489
1780
  locale: z.string().optional(),
1490
1781
  translation: z.string().optional()
@@ -1497,39 +1788,27 @@ export const faqCreateBody = z.object({
1497
1788
 
1498
1789
  // PATCH /public-api/resources/faqs/v2.0/{faq}
1499
1790
  export const faqUpdateBody = z.object({
1500
- question: z.unknown().optional(),
1501
- answer: z.unknown().optional()
1791
+ question: z.array(z.object({
1792
+ locale: z.string().optional(),
1793
+ translation: z.string().optional()
1794
+ })).optional(),
1795
+ answer: z.array(z.object({
1796
+ locale: z.string().optional(),
1797
+ translation: z.string().optional()
1798
+ })).optional()
1502
1799
  });
1503
1800
 
1504
1801
  // GET /public-api/resources/firmware-versions/v1.0
1505
- export const firmwareVersionsListingQueryParams = z.object({
1506
- filter: z.object({
1507
- vendorId: z.array(z.number().int()).optional(),
1508
- modelId: z.array(z.number().int()).optional(),
1509
- firmwareVersion: z.string().optional()
1510
- }).optional(),
1511
- include: z.array(z.enum(["models"])).optional()
1512
- });
1513
1802
 
1514
1803
  // GET /public-api/resources/firmware-versions/v1.0/{firmwareVersion}
1515
1804
 
1516
1805
  // GET /public-api/resources/firmware-versions/v1.0/{firmwareVersion}/attached-models
1517
1806
 
1518
1807
  // GET /public-api/resources/flexibility-activation-requests/v1.0
1519
- export const listFlexibilityActivationRequestsQueryParams = z.object({
1520
- filter: z.object({
1521
- assetId: z.string().optional()
1522
- }).optional()
1523
- });
1524
1808
 
1525
1809
  // GET /public-api/resources/flexibility-activation-requests/v1.0/{flexibilityActivationRequest}
1526
1810
 
1527
1811
  // GET /public-api/resources/flexibility-assets/v1.0
1528
- export const listFlexibilityAssetsQueryParams = z.object({
1529
- filter: z.object({
1530
- updatedSince: z.string().datetime().optional()
1531
- }).optional()
1532
- });
1533
1812
 
1534
1813
  // POST /public-api/resources/flexibility-assets/v1.0
1535
1814
  export const createFlexibilityAssetBody = z.object({
@@ -1537,6 +1816,11 @@ export const createFlexibilityAssetBody = z.object({
1537
1816
  dlmCircuitId: z.number(),
1538
1817
  chargePointId: z.number(),
1539
1818
  evseId: z.number(),
1819
+ description: z.string().optional(),
1820
+ downwardRegulationLimit: z.number().int().optional(),
1821
+ upwardRegulationLimit: z.number().int().optional(),
1822
+ integrationId: z.number(),
1823
+ integrationParameters: z.record(z.string()).optional(),
1540
1824
  status: z.enum(["enabled", "disabled"]),
1541
1825
  endsAt: z.string().datetime().optional()
1542
1826
  });
@@ -1557,15 +1841,6 @@ export const updateFlexibilityAssetBody = z.object({
1557
1841
  // GET /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}/historical-time-series
1558
1842
 
1559
1843
  // GET /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}/time-series-forecast
1560
- export const getTimeSeriesForecastPathParams = z.object({
1561
- flexibilityAsset: z.number().int()
1562
- });
1563
- export const getTimeSeriesForecastQueryParams = z.object({
1564
- filter: z.object({
1565
- startTime: z.string().datetime().optional(),
1566
- endTime: z.string().datetime().optional()
1567
- }).optional()
1568
- });
1569
1844
 
1570
1845
  // GET /public-api/resources/id-tags/v2.0
1571
1846
 
@@ -1583,7 +1858,7 @@ export const idTagCreateBody = z.object({
1583
1858
  userId: z.number().int().optional(),
1584
1859
  externalId: z.string().optional(),
1585
1860
  partnerId: z.number().int().optional(),
1586
- lastUpdatedAt: z.unknown().optional()
1861
+ lastUpdatedAt: z.string().datetime().optional()
1587
1862
  });
1588
1863
 
1589
1864
  // GET /public-api/resources/id-tags/v2.0/{idTag}
@@ -1604,20 +1879,20 @@ export const idTagUpdateBody = z.object({
1604
1879
  userId: z.number().int().optional(),
1605
1880
  externalId: z.string().optional(),
1606
1881
  partnerId: z.number().int().optional(),
1607
- lastUpdatedAt: z.unknown().optional()
1882
+ lastUpdatedAt: z.string().datetime().optional()
1608
1883
  });
1609
1884
 
1610
1885
  // GET /public-api/resources/installer-jobs/v1.0
1611
1886
 
1612
1887
  // POST /public-api/resources/installer-jobs/v1.0
1613
1888
  export const createInstallerJobBody = z.object({
1614
- installationAndMaintenanceCompanyId: z.number().int()
1889
+ installationAndMaintenanceCompanyId: z.number().int(),
1890
+ installerAdminId: z.number().int().optional(),
1891
+ pin: z.string().min(4).max(12).optional(),
1892
+ description: z.string()
1615
1893
  });
1616
1894
 
1617
1895
  // GET /public-api/resources/installer-jobs/v1.0/{installerJob}
1618
- export const getInstallerJobQueryParams = z.object({
1619
- include: z.array(z.enum(["chargePoints"])).optional()
1620
- });
1621
1896
 
1622
1897
  // DELETE /public-api/resources/installer-jobs/v1.0/{installerJob}
1623
1898
 
@@ -1629,85 +1904,258 @@ export const updateInstallerJobBody = z.object({
1629
1904
  });
1630
1905
 
1631
1906
  // GET /public-api/resources/invoices/v1.0
1632
- export const invoicesListingQueryParams = z.object({
1633
- filter: z.object({
1634
- issuedFrom: z.string().optional(),
1635
- issuedTo: z.string().optional()
1636
- }).optional()
1637
- });
1638
1907
 
1639
1908
  // GET /public-api/resources/invoices/v1.0/{invoice}
1640
- export const invoiceReadPathParams = z.object({
1641
- invoice: z.string()
1642
- });
1643
1909
 
1644
1910
  // GET /public-api/resources/locations/v1.0
1645
1911
 
1646
1912
  // POST /public-api/resources/locations/v1.0
1647
- export const locationCreateDeprecatedBody = z.object({});
1913
+ export const locationCreateDeprecatedBody = z.object({
1914
+ id: z.number().int().optional(),
1915
+ public_charge_points: z.number().int().optional(),
1916
+ public_charge_points_ids: z.array(z.number().int()).optional(),
1917
+ name: z.record(z.string()),
1918
+ status: z.enum(["active", "disabled"]).optional(),
1919
+ description: z.record(z.string()).optional(),
1920
+ detailed_description: z.record(z.string()).optional(),
1921
+ additional_description: z.record(z.string()).optional(),
1922
+ geoposition: z.object({
1923
+ latitude: z.number().min(-90).max(90),
1924
+ longitude: z.number().min(-180).max(180)
1925
+ }),
1926
+ address: z.record(z.string()).optional(),
1927
+ post_code: z.string(),
1928
+ 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()]),
1929
+ city: z.string(),
1930
+ 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"]),
1931
+ external_id: z.string().optional(),
1932
+ timezone: z.string().optional(),
1933
+ location_image: z.object({
1934
+ original: z.string(),
1935
+ thumbnail: z.string().optional(),
1936
+ mimeType: z.string()
1937
+ }).optional(),
1938
+ images: z.array(z.object({
1939
+ original: z.string(),
1940
+ thumbnail: z.string().optional(),
1941
+ mimeType: z.string()
1942
+ })).optional(),
1943
+ working_hours: z.object({
1944
+ is_always_open: z.boolean(),
1945
+ stop_session_outside_working_hours: z.boolean().optional(),
1946
+ hours: z.object({
1947
+ monday: z.array(z.object({
1948
+ start: z.string(),
1949
+ end: z.string()
1950
+ })).optional(),
1951
+ tuesday: z.array(z.object({
1952
+ start: z.string(),
1953
+ end: z.string()
1954
+ })).optional(),
1955
+ wednesday: z.array(z.object({
1956
+ start: z.string(),
1957
+ end: z.string()
1958
+ })).optional(),
1959
+ thursday: z.array(z.object({
1960
+ start: z.string(),
1961
+ end: z.string()
1962
+ })).optional(),
1963
+ friday: z.array(z.object({
1964
+ start: z.string(),
1965
+ end: z.string()
1966
+ })).optional(),
1967
+ saturday: z.array(z.object({
1968
+ start: z.string(),
1969
+ end: z.string()
1970
+ })).optional(),
1971
+ sunday: z.array(z.object({
1972
+ start: z.string(),
1973
+ end: z.string()
1974
+ })).optional()
1975
+ }).optional(),
1976
+ always_open_for_user_group_ids: z.array(z.number()).optional()
1977
+ }).optional(),
1978
+ lastUpdatedAt: z.string().datetime().optional()
1979
+ });
1648
1980
 
1649
1981
  // GET /public-api/resources/locations/v1.0/{location}
1650
1982
 
1651
1983
  // DELETE /public-api/resources/locations/v1.0/{location}
1652
1984
 
1653
1985
  // PATCH /public-api/resources/locations/v1.0/{location}
1654
- export const locationUpdateDeprecatedBody = z.unknown();
1655
-
1656
- // GET /public-api/resources/locations/v2.0
1657
- export const locationsListingQueryParams = z.object({
1658
- filter: z.object({
1659
- country: z.unknown().optional(),
1660
- state: z.union([z.unknown(), z.unknown(), 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"])]).optional(),
1661
- region: z.string().optional(),
1986
+ export const locationUpdateDeprecatedBody = z.object({
1987
+ id: z.number().int().optional(),
1988
+ public_charge_points: z.number().int().optional(),
1989
+ public_charge_points_ids: z.array(z.number().int()).optional(),
1990
+ name: z.record(z.string()).optional(),
1991
+ status: z.enum(["active", "disabled"]).optional(),
1992
+ description: z.record(z.string()).optional(),
1993
+ detailed_description: z.record(z.string()).optional(),
1994
+ additional_description: z.record(z.string()).optional(),
1995
+ geoposition: z.object({
1996
+ latitude: z.number().min(-90).max(90),
1997
+ longitude: z.number().min(-180).max(180)
1998
+ }).optional(),
1999
+ address: z.record(z.string()).optional(),
2000
+ post_code: z.string().optional(),
2001
+ 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(),
1662
2002
  city: z.string().optional(),
1663
- partnerId: z.number().int().optional(),
1664
- externalId: z.string().optional(),
1665
- tag: z.string().optional(),
1666
- lastUpdatedAfter: z.unknown().optional(),
1667
- lastUpdatedBefore: z.unknown().optional()
1668
- }).optional()
2003
+ 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(),
2004
+ external_id: z.string().optional(),
2005
+ timezone: z.string().optional(),
2006
+ location_image: z.object({
2007
+ original: z.string(),
2008
+ thumbnail: z.string().optional(),
2009
+ mimeType: z.string()
2010
+ }).optional(),
2011
+ images: z.array(z.object({
2012
+ original: z.string(),
2013
+ thumbnail: z.string().optional(),
2014
+ mimeType: z.string()
2015
+ })).optional(),
2016
+ working_hours: z.object({
2017
+ is_always_open: z.boolean(),
2018
+ stop_session_outside_working_hours: z.boolean().optional(),
2019
+ hours: z.object({
2020
+ monday: z.array(z.object({
2021
+ start: z.string(),
2022
+ end: z.string()
2023
+ })).optional(),
2024
+ tuesday: z.array(z.object({
2025
+ start: z.string(),
2026
+ end: z.string()
2027
+ })).optional(),
2028
+ wednesday: z.array(z.object({
2029
+ start: z.string(),
2030
+ end: z.string()
2031
+ })).optional(),
2032
+ thursday: z.array(z.object({
2033
+ start: z.string(),
2034
+ end: z.string()
2035
+ })).optional(),
2036
+ friday: z.array(z.object({
2037
+ start: z.string(),
2038
+ end: z.string()
2039
+ })).optional(),
2040
+ saturday: z.array(z.object({
2041
+ start: z.string(),
2042
+ end: z.string()
2043
+ })).optional(),
2044
+ sunday: z.array(z.object({
2045
+ start: z.string(),
2046
+ end: z.string()
2047
+ })).optional()
2048
+ }).optional(),
2049
+ always_open_for_user_group_ids: z.array(z.number()).optional()
2050
+ }).optional(),
2051
+ lastUpdatedAt: z.string().datetime().optional()
1669
2052
  });
1670
2053
 
2054
+ // GET /public-api/resources/locations/v2.0
2055
+
1671
2056
  // POST /public-api/resources/locations/v2.0
1672
2057
  export const locationCreateBody = z.object({
1673
2058
  id: z.number().int().optional(),
1674
- name: z.unknown(),
1675
- shortDescription: z.unknown().optional(),
1676
- description: z.unknown().optional(),
1677
- additionalDescription: z.unknown().optional(),
1678
- locationImage: z.unknown().optional(),
1679
- images: z.array(z.unknown()).optional(),
2059
+ name: z.array(z.object({
2060
+ locale: z.string().optional(),
2061
+ translation: z.string().optional()
2062
+ })),
2063
+ shortDescription: z.array(z.object({
2064
+ locale: z.string().optional(),
2065
+ translation: z.string().optional()
2066
+ })).optional(),
2067
+ description: z.array(z.object({
2068
+ locale: z.string().optional(),
2069
+ translation: z.string().optional()
2070
+ })).optional(),
2071
+ additionalDescription: z.array(z.object({
2072
+ locale: z.string().optional(),
2073
+ translation: z.string().optional()
2074
+ })).optional(),
2075
+ locationImage: z.object({
2076
+ original: z.string(),
2077
+ thumbnail: z.string().optional(),
2078
+ mimeType: z.string()
2079
+ }).optional(),
2080
+ images: z.array(z.object({
2081
+ original: z.string(),
2082
+ thumbnail: z.string().optional(),
2083
+ mimeType: z.string()
2084
+ })).optional(),
1680
2085
  geoposition: z.object({
1681
2086
  latitude: z.number().min(-90).max(90),
1682
2087
  longitude: z.number().min(-180).max(180)
1683
2088
  }),
1684
- address: z.unknown(),
1685
- streetAddress: z.unknown().optional(),
2089
+ address: z.array(z.object({
2090
+ locale: z.string().optional(),
2091
+ translation: z.string().optional()
2092
+ })),
2093
+ streetAddress: z.array(z.object({
2094
+ locale: z.string().optional(),
2095
+ translation: z.string().optional()
2096
+ })).optional(),
1686
2097
  city: z.string().optional(),
1687
- region: z.unknown().optional(),
1688
- state: z.unknown().optional(),
1689
- country: z.unknown(),
2098
+ region: z.string().optional(),
2099
+ 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(),
2100
+ 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"]),
1690
2101
  postCode: z.string().optional(),
1691
2102
  workingHours: z.object({
1692
2103
  isAlwaysOpen: z.boolean().optional(),
1693
2104
  stopSessionOutsideWorkingHours: z.boolean().optional(),
1694
2105
  alwaysOpenForUserGroupIds: z.array(z.number()).optional(),
1695
2106
  hours: z.object({
1696
- monday: z.unknown().optional(),
1697
- tuesday: z.unknown().optional(),
1698
- wednesday: z.unknown().optional(),
1699
- thursday: z.unknown().optional(),
1700
- friday: z.unknown().optional(),
1701
- saturday: z.unknown().optional(),
1702
- sunday: z.unknown().optional()
2107
+ monday: z.array(z.object({
2108
+ start: z.string(),
2109
+ end: z.string()
2110
+ })).optional(),
2111
+ tuesday: z.array(z.object({
2112
+ start: z.string(),
2113
+ end: z.string()
2114
+ })).optional(),
2115
+ wednesday: z.array(z.object({
2116
+ start: z.string(),
2117
+ end: z.string()
2118
+ })).optional(),
2119
+ thursday: z.array(z.object({
2120
+ start: z.string(),
2121
+ end: z.string()
2122
+ })).optional(),
2123
+ friday: z.array(z.object({
2124
+ start: z.string(),
2125
+ end: z.string()
2126
+ })).optional(),
2127
+ saturday: z.array(z.object({
2128
+ start: z.string(),
2129
+ end: z.string()
2130
+ })).optional(),
2131
+ sunday: z.array(z.object({
2132
+ start: z.string(),
2133
+ end: z.string()
2134
+ })).optional()
1703
2135
  }).optional()
1704
2136
  }).optional(),
1705
2137
  timezone: z.string().optional(),
1706
2138
  externalId: z.string().optional(),
1707
2139
  roamingOperatorId: z.number().int().optional(),
1708
2140
  lastUpdatedAt: z.string().datetime().optional(),
1709
- chargingZones: z.array(z.unknown()).optional(),
1710
- externalAppData: z.unknown().optional(),
2141
+ chargingZones: z.array(z.object({
2142
+ id: z.number().int().optional(),
2143
+ name: z.string().optional(),
2144
+ locationId: z.number().int().optional(),
2145
+ status: z.enum(["enabled", "disabled"]).optional(),
2146
+ additionalInfo: z.object({
2147
+ enabled: z.boolean().optional(),
2148
+ title: z.array(z.object({
2149
+ locale: z.string().optional(),
2150
+ translation: z.string().optional()
2151
+ })).optional(),
2152
+ description: z.array(z.object({
2153
+ locale: z.string().optional(),
2154
+ translation: z.string().optional()
2155
+ })).optional()
2156
+ }).optional()
2157
+ })).optional(),
2158
+ externalAppData: z.record(z.unknown()).optional(),
1711
2159
  roaming: z.object({
1712
2160
  owner: z.object({
1713
2161
  name: z.string().optional()
@@ -1729,53 +2177,116 @@ export const locationCreateBody = z.object({
1729
2177
  // PATCH /public-api/resources/locations/v2.0/{location}
1730
2178
  export const locationUpdateBody = z.object({
1731
2179
  id: z.number().int().optional(),
1732
- name: z.unknown().optional(),
1733
- shortDescription: z.unknown().optional(),
1734
- description: z.unknown().optional(),
1735
- additionalDescription: z.unknown().optional(),
1736
- locationImage: z.unknown().optional(),
1737
- images: z.array(z.unknown()).optional(),
2180
+ name: z.array(z.object({
2181
+ locale: z.string().optional(),
2182
+ translation: z.string().optional()
2183
+ })).optional(),
2184
+ shortDescription: z.array(z.object({
2185
+ locale: z.string().optional(),
2186
+ translation: z.string().optional()
2187
+ })).optional(),
2188
+ description: z.array(z.object({
2189
+ locale: z.string().optional(),
2190
+ translation: z.string().optional()
2191
+ })).optional(),
2192
+ additionalDescription: z.array(z.object({
2193
+ locale: z.string().optional(),
2194
+ translation: z.string().optional()
2195
+ })).optional(),
2196
+ locationImage: z.object({
2197
+ original: z.string(),
2198
+ thumbnail: z.string().optional(),
2199
+ mimeType: z.string()
2200
+ }).optional(),
2201
+ images: z.array(z.object({
2202
+ original: z.string(),
2203
+ thumbnail: z.string().optional(),
2204
+ mimeType: z.string()
2205
+ })).optional(),
1738
2206
  geoposition: z.object({
1739
2207
  latitude: z.number().min(-90).max(90),
1740
2208
  longitude: z.number().min(-180).max(180)
1741
2209
  }).optional(),
1742
- address: z.unknown().optional(),
1743
- streetAddress: z.unknown().optional(),
2210
+ address: z.array(z.object({
2211
+ locale: z.string().optional(),
2212
+ translation: z.string().optional()
2213
+ })).optional(),
2214
+ streetAddress: z.array(z.object({
2215
+ locale: z.string().optional(),
2216
+ translation: z.string().optional()
2217
+ })).optional(),
1744
2218
  city: z.string().optional(),
1745
- region: z.unknown().optional(),
1746
- state: z.unknown().optional(),
1747
- country: z.unknown().optional(),
2219
+ region: z.string().optional(),
2220
+ 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(),
2221
+ 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(),
1748
2222
  postCode: z.string().optional(),
1749
2223
  workingHours: z.object({
1750
2224
  isAlwaysOpen: z.boolean().optional(),
1751
2225
  stopSessionOutsideWorkingHours: z.boolean().optional(),
1752
2226
  alwaysOpenForUserGroupIds: z.array(z.number()).optional(),
1753
2227
  hours: z.object({
1754
- monday: z.unknown().optional(),
1755
- tuesday: z.unknown().optional(),
1756
- wednesday: z.unknown().optional(),
1757
- thursday: z.unknown().optional(),
1758
- friday: z.unknown().optional(),
1759
- saturday: z.unknown().optional(),
1760
- sunday: z.unknown().optional()
2228
+ monday: z.array(z.object({
2229
+ start: z.string(),
2230
+ end: z.string()
2231
+ })).optional(),
2232
+ tuesday: z.array(z.object({
2233
+ start: z.string(),
2234
+ end: z.string()
2235
+ })).optional(),
2236
+ wednesday: z.array(z.object({
2237
+ start: z.string(),
2238
+ end: z.string()
2239
+ })).optional(),
2240
+ thursday: z.array(z.object({
2241
+ start: z.string(),
2242
+ end: z.string()
2243
+ })).optional(),
2244
+ friday: z.array(z.object({
2245
+ start: z.string(),
2246
+ end: z.string()
2247
+ })).optional(),
2248
+ saturday: z.array(z.object({
2249
+ start: z.string(),
2250
+ end: z.string()
2251
+ })).optional(),
2252
+ sunday: z.array(z.object({
2253
+ start: z.string(),
2254
+ end: z.string()
2255
+ })).optional()
1761
2256
  }).optional()
1762
2257
  }).optional(),
1763
2258
  timezone: z.string().optional(),
1764
2259
  externalId: z.string().optional(),
1765
2260
  roamingOperatorId: z.number().int().optional(),
1766
2261
  lastUpdatedAt: z.string().datetime().optional(),
1767
- chargingZones: z.array(z.unknown()).optional(),
1768
- externalAppData: z.unknown().optional(),
1769
- roaming: z.object({
1770
- owner: z.object({
1771
- name: z.string().optional()
1772
- }).optional(),
1773
- operator: z.object({
1774
- name: z.string().optional()
1775
- }).optional(),
1776
- suboperator: z.object({
1777
- name: z.string().optional()
1778
- }).optional()
2262
+ chargingZones: z.array(z.object({
2263
+ id: z.number().int().optional(),
2264
+ name: z.string().optional(),
2265
+ locationId: z.number().int().optional(),
2266
+ status: z.enum(["enabled", "disabled"]).optional(),
2267
+ additionalInfo: z.object({
2268
+ enabled: z.boolean().optional(),
2269
+ title: z.array(z.object({
2270
+ locale: z.string().optional(),
2271
+ translation: z.string().optional()
2272
+ })).optional(),
2273
+ description: z.array(z.object({
2274
+ locale: z.string().optional(),
2275
+ translation: z.string().optional()
2276
+ })).optional()
2277
+ }).optional()
2278
+ })).optional(),
2279
+ externalAppData: z.record(z.unknown()).optional(),
2280
+ roaming: z.object({
2281
+ owner: z.object({
2282
+ name: z.string().optional()
2283
+ }).optional(),
2284
+ operator: z.object({
2285
+ name: z.string().optional()
2286
+ }).optional(),
2287
+ suboperator: z.object({
2288
+ name: z.string().optional()
2289
+ }).optional()
1779
2290
  }).optional(),
1780
2291
  tags: z.array(z.string()).optional()
1781
2292
  });
@@ -1790,8 +2301,14 @@ export const locationChargingZoneCreateBody = z.object({
1790
2301
  status: z.enum(["enabled", "disabled"]),
1791
2302
  additionalInfo: z.object({
1792
2303
  enabled: z.boolean().optional(),
1793
- title: z.unknown().optional(),
1794
- description: z.unknown().optional()
2304
+ title: z.array(z.object({
2305
+ locale: z.string().optional(),
2306
+ translation: z.string().optional()
2307
+ })).optional(),
2308
+ description: z.array(z.object({
2309
+ locale: z.string().optional(),
2310
+ translation: z.string().optional()
2311
+ })).optional()
1795
2312
  }).optional()
1796
2313
  });
1797
2314
 
@@ -1807,19 +2324,18 @@ export const locationChargingZoneUpdateBody = z.object({
1807
2324
  status: z.enum(["enabled", "disabled"]).optional(),
1808
2325
  additionalInfo: z.object({
1809
2326
  enabled: z.boolean().optional(),
1810
- title: z.unknown().optional(),
1811
- description: z.unknown().optional()
2327
+ title: z.array(z.object({
2328
+ locale: z.string().optional(),
2329
+ translation: z.string().optional()
2330
+ })).optional(),
2331
+ description: z.array(z.object({
2332
+ locale: z.string().optional(),
2333
+ translation: z.string().optional()
2334
+ })).optional()
1812
2335
  }).optional()
1813
2336
  });
1814
2337
 
1815
2338
  // GET /public-api/resources/parking-spaces/v1.0
1816
- export const listParkingSpaceQueryParams = z.object({
1817
- filter: z.object({
1818
- externalId: z.string().optional(),
1819
- evseId: z.string().optional()
1820
- }).optional(),
1821
- include: z.array(z.enum(["evses"])).optional()
1822
- });
1823
2339
 
1824
2340
  // POST /public-api/resources/parking-spaces/v1.0
1825
2341
  export const createParkingSpaceBody = z.object({
@@ -1881,50 +2397,53 @@ export const partnerContractCreateBody = z.object({
1881
2397
  perAcEvse: z.number().optional(),
1882
2398
  perDcEvse: z.number().optional()
1883
2399
  }).optional(),
1884
- lastUpdatedAt: z.unknown().optional()
2400
+ lastUpdatedAt: z.string().datetime().optional()
1885
2401
  });
1886
2402
 
1887
2403
  // GET /public-api/resources/partner-contracts/v1.0/{partnerContract}
1888
2404
 
1889
2405
  // PUT /public-api/resources/partner-contracts/v1.0/{partnerContract}
1890
- export const partnerContractUpdateBody = z.unknown();
2406
+ export const partnerContractUpdateBody = z.object({
2407
+ id: z.number().int().optional(),
2408
+ title: z.string(),
2409
+ partnerId: z.number().int(),
2410
+ startDate: z.string().datetime(),
2411
+ endDate: z.string().datetime().optional(),
2412
+ autoRenewal: z.boolean().optional(),
2413
+ accessAndPermissions: z.object({
2414
+ sessionsRemoteControl: z.boolean().optional(),
2415
+ startReservation: z.boolean().optional(),
2416
+ stopReservation: z.boolean().optional(),
2417
+ resetChargePoint: z.boolean().optional(),
2418
+ firmwareUpdate: z.boolean().optional()
2419
+ }).optional(),
2420
+ revenueSharing: z.object({
2421
+ partnerSharePercentageAcEvse: z.number().min(0).max(100).optional(),
2422
+ partnerSharePercentageDcEvse: z.number().min(0).max(100).optional(),
2423
+ excludeConnectionFee: z.boolean().optional(),
2424
+ deductElectricityCost: z.boolean().optional(),
2425
+ reimburseForElectricityCost: z.boolean().optional(),
2426
+ fixedFeePerSessionAc: z.number().optional(),
2427
+ fixedFeePerSessionDc: z.number().optional(),
2428
+ feePerKwhAc: z.number().optional(),
2429
+ feePerKwhDc: z.number().optional(),
2430
+ handlingFee: z.number().min(0).max(100).optional()
2431
+ }).optional(),
2432
+ monthlyPlatformFees: z.object({
2433
+ perChargePoint: z.number().optional(),
2434
+ perAcEvse: z.number().optional(),
2435
+ perDcEvse: z.number().optional()
2436
+ }).optional(),
2437
+ lastUpdatedAt: z.string().datetime().optional()
2438
+ });
1891
2439
 
1892
2440
  // DELETE /public-api/resources/partner-contracts/v1.0/{partnerContract}
1893
2441
 
1894
2442
  // GET /public-api/resources/partner-expenses/v1.0
1895
- export const expensesListingDeprecatedQueryParams = z.object({
1896
- filter: z.object({
1897
- partnerId: z.string().optional(),
1898
- dateFrom: z.string().datetime().optional(),
1899
- dateTo: z.string().datetime().optional(),
1900
- origin: z.enum(["platform-fee-emsp", "platform-fee-cpo", "user-custom-fee", "session-emsp"]).optional(),
1901
- currency: z.string().min(3).max(3).optional()
1902
- }).optional()
1903
- });
1904
2443
 
1905
2444
  // GET /public-api/resources/partner-expenses/v1.1
1906
- export const expensesListingQueryParams = z.object({
1907
- filter: z.object({
1908
- partnerId: z.string().optional(),
1909
- settlementReportId: z.string().optional(),
1910
- dateBefore: z.string().datetime().optional(),
1911
- dateAfter: z.string().datetime().optional(),
1912
- origin: z.enum(["platform-fee-emsp", "platform-fee-cpo", "user-custom-fee", "session-emsp"]).optional(),
1913
- currencyCode: z.string().min(3).max(3).optional()
1914
- }).optional()
1915
- });
1916
2445
 
1917
2446
  // GET /public-api/resources/partner-invites/v1.0
1918
- export const partnerInvitesListingQueryParams = z.object({
1919
- filter: z.object({
1920
- partnerId: z.string().optional(),
1921
- status: z.enum(["pending", "sent", "accepted"]).optional(),
1922
- createdFrom: z.string().datetime().optional(),
1923
- createdTo: z.string().datetime().optional(),
1924
- userId: z.string().optional(),
1925
- inviteEmail: z.string().email().optional()
1926
- }).optional()
1927
- });
1928
2447
 
1929
2448
  // POST /public-api/resources/partner-invites/v1.0
1930
2449
  export const partnerInviteCreateBody = z.object({
@@ -1941,9 +2460,6 @@ export const partnerInviteCreateBody = z.object({
1941
2460
  });
1942
2461
 
1943
2462
  // GET /public-api/resources/partner-invites/v1.0/{partnerInvite}
1944
- export const partnerInviteReadPathParams = z.object({
1945
- partnerInvite: z.number().int()
1946
- });
1947
2463
 
1948
2464
  // DELETE /public-api/resources/partner-invites/v1.0/{partnerInvite}
1949
2465
 
@@ -1962,41 +2478,12 @@ export const partnerInviteUpdateBody = z.object({
1962
2478
  });
1963
2479
 
1964
2480
  // GET /public-api/resources/partner-revenues/v1.0
1965
- export const revenuesListingDeprecatedQueryParams = z.object({
1966
- filter: z.object({
1967
- partnerId: z.string().optional(),
1968
- dateFrom: z.string().datetime().optional(),
1969
- dateTo: z.string().datetime().optional(),
1970
- origin: z.enum(["electricity-tax-reimbursement", "session-cpo"]).optional(),
1971
- currency: z.string().min(3).max(3).optional()
1972
- }).optional()
1973
- });
1974
2481
 
1975
2482
  // GET /public-api/resources/partner-revenues/v1.1
1976
- export const revenuesListingQueryParams = z.object({
1977
- filter: z.object({
1978
- partnerId: z.string().optional(),
1979
- settlementReportId: z.string().optional(),
1980
- dateBefore: z.string().datetime().optional(),
1981
- dateAfter: z.string().datetime().optional(),
1982
- origin: z.enum(["electricity-tax-reimbursement", "session-cpo"]).optional(),
1983
- currencyCode: z.string().min(3).max(3).optional()
1984
- }).optional()
1985
- });
1986
2483
 
1987
2484
  // GET /public-api/resources/partner-settlement-reports/v1.0
1988
- export const partnerSettlementReportsListingQueryParams = z.object({
1989
- filter: z.object({
1990
- partnerId: z.number().int().optional(),
1991
- periodAfter: z.string().optional(),
1992
- periodBefore: z.string().optional()
1993
- }).optional()
1994
- });
1995
2485
 
1996
2486
  // GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}
1997
- export const partnerSettlementReportReadPathParams = z.object({
1998
- partnerSettlementReport: z.number().int()
1999
- });
2000
2487
 
2001
2488
  // GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records
2002
2489
 
@@ -2008,23 +2495,17 @@ export const partnerSettlementReportPartnerSettlementRecordCreateBody = z.object
2008
2495
  });
2009
2496
 
2010
2497
  // GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
2011
- export const partnertSettlementReportPartnerSettlementRecordReadPathParams = z.object({
2012
- PartnerSettlementRecord: z.number().int()
2013
- });
2014
2498
 
2015
2499
  // PUT /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
2016
- export const partnerSettlementReportPartnerSettlementRecordUpdateBody = z.unknown();
2500
+ export const partnerSettlementReportPartnerSettlementRecordUpdateBody = z.object({
2501
+ date: z.string(),
2502
+ paidAmount: z.number(),
2503
+ note: z.string()
2504
+ });
2017
2505
 
2018
2506
  // DELETE /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
2019
2507
 
2020
2508
  // GET /public-api/resources/partners/v1.0
2021
- export const partnersListingDeprecatedQueryParams = z.object({
2022
- filter: z.object({
2023
- country: z.unknown().optional(),
2024
- regNo: z.string().optional(),
2025
- externalId: z.string().optional()
2026
- }).optional()
2027
- });
2028
2509
 
2029
2510
  // POST /public-api/resources/partners/v1.0
2030
2511
  export const partnerCreateDeprecatedBody = z.object({
@@ -2054,18 +2535,43 @@ export const partnerCreateDeprecatedBody = z.object({
2054
2535
  discount: z.number().optional()
2055
2536
  }).optional(),
2056
2537
  externalId: z.string().optional(),
2057
- lastUpdatedAt: z.unknown().optional()
2538
+ lastUpdatedAt: z.string().datetime().optional()
2058
2539
  });
2059
2540
 
2060
2541
  // GET /public-api/resources/partners/v1.0/{partner}
2061
- export const partnerReadDeprecatedPathParams = z.object({
2062
- partner: z.number().int()
2063
- });
2064
2542
 
2065
2543
  // DELETE /public-api/resources/partners/v1.0/{partner}
2066
2544
 
2067
2545
  // PATCH /public-api/resources/partners/v1.0/{partner}
2068
- export const partnerUpdateDeprecatedBody = z.unknown();
2546
+ export const partnerUpdateDeprecatedBody = z.object({
2547
+ id: z.number().int().optional(),
2548
+ name: z.string(),
2549
+ regNo: z.string().optional(),
2550
+ vatNo: z.string().optional(),
2551
+ 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(),
2552
+ city: z.string().optional(),
2553
+ postcode: z.string().optional(),
2554
+ address: z.string().optional(),
2555
+ contactPerson: z.string().optional(),
2556
+ email: z.string().email().optional(),
2557
+ phone: z.string().optional(),
2558
+ faultNotificationsEmail: z.string().email().optional(),
2559
+ monthlyPlatformFee: z.number().optional(),
2560
+ options: z.object({
2561
+ createUsers: z.boolean().optional(),
2562
+ addUserBalance: z.boolean().optional(),
2563
+ supplierOnReceipts: z.boolean().optional(),
2564
+ allowToControlTariffs: z.boolean().optional(),
2565
+ allowToControlTariffGroups: z.boolean().optional()
2566
+ }).optional(),
2567
+ corporateBilling: z.object({
2568
+ enabled: z.boolean().optional(),
2569
+ monthlyLimit: z.number().optional(),
2570
+ discount: z.number().optional()
2571
+ }).optional(),
2572
+ externalId: z.string().optional(),
2573
+ lastUpdatedAt: z.string().datetime().optional()
2574
+ });
2069
2575
 
2070
2576
  // GET /public-api/resources/partners/v2.0
2071
2577
 
@@ -2079,9 +2585,9 @@ export const partnerCreateBody = z.object({
2079
2585
  address: z.string().optional(),
2080
2586
  postcode: z.string().optional(),
2081
2587
  city: z.string().optional(),
2082
- country: z.unknown().optional(),
2083
- region: z.unknown().optional(),
2084
- state: z.unknown().optional(),
2588
+ 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(),
2589
+ region: z.string().optional(),
2590
+ 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(),
2085
2591
  contactDetails: z.object({
2086
2592
  administrative: z.object({
2087
2593
  contactPerson: z.string().optional(),
@@ -2121,8 +2627,15 @@ export const partnerCreateBody = z.object({
2121
2627
  discount: z.number().optional()
2122
2628
  }).optional(),
2123
2629
  externalId: z.string().optional(),
2124
- bankDetails: z.unknown().optional(),
2125
- lastUpdatedAt: z.unknown().optional()
2630
+ bankDetails: z.object({
2631
+ bankIban: z.string().optional(),
2632
+ bankName: z.string().optional(),
2633
+ bankAddress: z.string().optional(),
2634
+ bankCode: z.string().optional(),
2635
+ bankAccountNumber: z.string().optional(),
2636
+ bankAccountType: z.string().optional()
2637
+ }).optional(),
2638
+ lastUpdatedAt: z.string().datetime().optional()
2126
2639
  });
2127
2640
 
2128
2641
  // GET /public-api/resources/partners/v2.0/{partner}
@@ -2131,15 +2644,68 @@ export const partnerCreateBody = z.object({
2131
2644
 
2132
2645
  // PATCH /public-api/resources/partners/v2.0/{partner}
2133
2646
  export const partnerUpdateBody = z.object({
2134
- businessName: z.string().optional()
2647
+ businessName: z.string().optional(),
2648
+ id: z.number().int().optional(),
2649
+ name: z.string().optional(),
2650
+ regNo: z.string().optional(),
2651
+ vatNo: z.string().optional(),
2652
+ address: z.string().optional(),
2653
+ postcode: z.string().optional(),
2654
+ city: z.string().optional(),
2655
+ 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(),
2656
+ region: z.string().optional(),
2657
+ 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(),
2658
+ contactDetails: z.object({
2659
+ administrative: z.object({
2660
+ contactPerson: z.string().optional(),
2661
+ email: z.string().email().optional(),
2662
+ phone: z.string().optional()
2663
+ }).optional(),
2664
+ technical: z.object({
2665
+ contactPerson: z.string().optional(),
2666
+ email: z.string().email().optional(),
2667
+ phone: z.string().optional()
2668
+ }).optional(),
2669
+ billing: z.object({
2670
+ contactPerson: z.string().optional(),
2671
+ email: z.string().email().optional(),
2672
+ phone: z.string().optional()
2673
+ }).optional()
2674
+ }).optional(),
2675
+ notifications: z.object({
2676
+ technical: z.object({
2677
+ chargePointFaults: z.boolean().optional()
2678
+ }).optional(),
2679
+ billing: z.object({
2680
+ settlementReports: z.boolean().optional()
2681
+ }).optional()
2682
+ }).optional(),
2683
+ monthlyPlatformFee: z.number().optional(),
2684
+ options: z.object({
2685
+ createUsers: z.boolean().optional(),
2686
+ addUserBalance: z.boolean().optional(),
2687
+ supplierOnReceipts: z.boolean().optional(),
2688
+ allowToControlTariffs: z.boolean().optional(),
2689
+ allowToControlTariffGroups: z.boolean().optional()
2690
+ }).optional(),
2691
+ corporateBilling: z.object({
2692
+ enabled: z.boolean().optional(),
2693
+ monthlyLimit: z.number().optional(),
2694
+ discount: z.number().optional()
2695
+ }).optional(),
2696
+ externalId: z.string().optional(),
2697
+ bankDetails: z.object({
2698
+ bankIban: z.string().optional(),
2699
+ bankName: z.string().optional(),
2700
+ bankAddress: z.string().optional(),
2701
+ bankCode: z.string().optional(),
2702
+ bankAccountNumber: z.string().optional(),
2703
+ bankAccountType: z.string().optional()
2704
+ }).optional(),
2705
+ lastUpdatedAt: z.string().datetime().optional()
2135
2706
  });
2136
2707
 
2137
2708
  // GET /public-api/resources/payment-terminals/v1.0
2138
- export const getPaymentTerminalsQueryParams = z.object({
2139
- filter: z.object({
2140
- serialNumber: z.string().optional()
2141
- }).optional()
2142
- });
2143
2709
 
2144
2710
  // POST /public-api/resources/payment-terminals/v1.0
2145
2711
  export const createPaymentTerminalBody = z.union([z.union([z.object({
@@ -2152,7 +2718,7 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
2152
2718
  id: z.number().int().optional(),
2153
2719
  name: z.string(),
2154
2720
  integrationId: z.number().int(),
2155
- terminalType: z.unknown(),
2721
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2156
2722
  operatorId: z.number().int(),
2157
2723
  chargingZoneId: z.number().int().optional(),
2158
2724
  chargePointId: z.number().int().optional(),
@@ -2162,7 +2728,10 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
2162
2728
  phone: z.string(),
2163
2729
  defaultLanguage: z.string(),
2164
2730
  presentCardOnStopSession: z.boolean().optional(),
2165
- info: z.unknown(),
2731
+ info: z.array(z.object({
2732
+ locale: z.string().optional(),
2733
+ translation: z.string().optional()
2734
+ })),
2166
2735
  currencyCode: z.string().optional(),
2167
2736
  serialNumber: z.string().optional(),
2168
2737
  externalId: z.string().optional(),
@@ -2173,35 +2742,80 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
2173
2742
  }),
2174
2743
  networkStatusMonitoringEnabled: z.boolean().optional()
2175
2744
  }), z.object({
2745
+ id: z.number().int().optional(),
2746
+ name: z.string(),
2747
+ integrationId: z.number().int(),
2748
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2749
+ operatorId: z.number().int(),
2750
+ chargingZoneId: z.number().int().optional(),
2751
+ chargePointId: z.number().int().optional(),
2176
2752
  serialNumber: z.string(),
2177
2753
  externalId: z.string().optional()
2178
2754
  }), z.object({
2179
- adminToken: z.unknown().optional(),
2755
+ id: z.number().int().optional(),
2756
+ name: z.string(),
2757
+ integrationId: z.number().int(),
2758
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2759
+ operatorId: z.number().int(),
2760
+ chargingZoneId: z.number().int().optional(),
2761
+ chargePointId: z.number().int().optional(),
2762
+ adminToken: z.string().optional(),
2180
2763
  webhookUrl: z.string().optional(),
2181
2764
  serialNumber: z.string().optional(),
2182
2765
  externalId: z.string().optional()
2183
2766
  }), z.object({
2767
+ id: z.number().int().optional(),
2768
+ name: z.string(),
2769
+ integrationId: z.number().int(),
2770
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2771
+ operatorId: z.number().int(),
2772
+ chargingZoneId: z.number().int().optional(),
2773
+ chargePointId: z.number().int().optional(),
2184
2774
  terminalId: z.string(),
2185
2775
  serialNumber: z.string().optional(),
2186
2776
  externalId: z.string().optional()
2187
2777
  }), z.object({
2778
+ id: z.number().int().optional(),
2779
+ name: z.string(),
2780
+ integrationId: z.number().int(),
2781
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2782
+ operatorId: z.number().int(),
2783
+ chargingZoneId: z.number().int().optional(),
2784
+ chargePointId: z.number().int().optional(),
2188
2785
  serialNumber: z.string().optional(),
2189
2786
  externalId: z.string().optional()
2190
2787
  }), z.object({
2788
+ id: z.number().int().optional(),
2789
+ name: z.string(),
2790
+ integrationId: z.number().int(),
2791
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2792
+ operatorId: z.number().int(),
2793
+ chargingZoneId: z.number().int().optional(),
2794
+ chargePointId: z.number().int().optional(),
2191
2795
  verificationCode: z.string(),
2192
2796
  defaultLanguage: z.string(),
2193
2797
  presentCardOnStopSession: z.boolean().optional(),
2194
- info: z.unknown(),
2798
+ info: z.array(z.object({
2799
+ locale: z.string().optional(),
2800
+ translation: z.string().optional()
2801
+ })),
2195
2802
  serialNumber: z.string().optional(),
2196
2803
  externalId: z.string().optional()
2197
2804
  }), z.object({
2805
+ id: z.number().int().optional(),
2806
+ name: z.string(),
2807
+ integrationId: z.number().int(),
2808
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2809
+ operatorId: z.number().int(),
2810
+ chargingZoneId: z.number().int().optional(),
2811
+ chargePointId: z.number().int().optional(),
2198
2812
  serialNumber: z.string().optional(),
2199
2813
  externalId: z.string().optional()
2200
2814
  }), z.object({
2201
2815
  id: z.number().int().optional(),
2202
2816
  name: z.string(),
2203
2817
  integrationId: z.number().int(),
2204
- terminalType: z.unknown(),
2818
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2205
2819
  operatorId: z.number().int(),
2206
2820
  invoiceFields: z.array(z.object({
2207
2821
  field: z.string(),
@@ -2209,12 +2823,22 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
2209
2823
  type: z.enum(["individual", "company"])
2210
2824
  })).optional()
2211
2825
  }), z.object({
2212
- adminToken: z.unknown().optional(),
2826
+ id: z.number().int().optional(),
2827
+ name: z.string(),
2828
+ integrationId: z.number().int(),
2829
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]),
2830
+ operatorId: z.number().int(),
2831
+ chargingZoneId: z.number().int().optional(),
2832
+ chargePointId: z.number().int().optional(),
2833
+ adminToken: z.string().optional(),
2213
2834
  networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
2214
2835
  phone: z.string(),
2215
2836
  defaultLanguage: z.string(),
2216
2837
  presentCardOnStopSession: z.boolean().optional(),
2217
- info: z.unknown(),
2838
+ info: z.array(z.object({
2839
+ locale: z.string().optional(),
2840
+ translation: z.string().optional()
2841
+ })),
2218
2842
  currencyCode: z.string().optional(),
2219
2843
  serialNumber: z.string().optional(),
2220
2844
  externalId: z.string().optional(),
@@ -2222,23 +2846,6 @@ export const createPaymentTerminalBody = z.union([z.union([z.object({
2222
2846
  adyenApiKey: z.string(),
2223
2847
  supportedLanguages: z.array(z.string()).optional(),
2224
2848
  networkStatusMonitoringEnabled: z.boolean().optional()
2225
- }), z.object({
2226
- adminToken: z.unknown().optional(),
2227
- networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
2228
- phone: z.string(),
2229
- defaultLanguage: z.string(),
2230
- presentCardOnStopSession: z.boolean().optional(),
2231
- info: z.unknown(),
2232
- currencyCode: z.string().optional(),
2233
- countryCode: z.string().optional(),
2234
- serialNumber: z.string().optional(),
2235
- externalId: z.string().optional(),
2236
- supportedLanguages: z.array(z.string()).optional(),
2237
- bundle: z.object({
2238
- version: z.string().optional(),
2239
- downloadUrl: z.string().optional()
2240
- }),
2241
- networkStatusMonitoringEnabled: z.boolean().optional()
2242
2849
  })]);
2243
2850
 
2244
2851
  // GET /public-api/resources/payment-terminals/v1.0/{paymentTerminal}
@@ -2253,71 +2860,125 @@ export const updatePaymentTerminalBody = z.union([z.union([z.object({
2253
2860
  }), z.object({
2254
2861
  transactionTimeout: z.number().int().optional()
2255
2862
  })]), z.object({
2256
- adminToken: z.unknown().optional(),
2863
+ id: z.number().int().optional(),
2864
+ name: z.string().optional(),
2865
+ integrationId: z.number().int().optional(),
2866
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2867
+ operatorId: z.number().int().optional(),
2868
+ chargingZoneId: z.number().int().optional(),
2869
+ chargePointId: z.number().int().optional(),
2870
+ adminToken: z.string().optional(),
2257
2871
  isOnline: z.boolean().optional(),
2258
2872
  networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
2259
2873
  phone: z.string().optional(),
2260
2874
  defaultLanguage: z.string().optional(),
2261
2875
  presentCardOnStopSession: z.boolean().optional(),
2262
- info: z.unknown().optional(),
2876
+ info: z.array(z.object({
2877
+ locale: z.string().optional(),
2878
+ translation: z.string().optional()
2879
+ })).optional(),
2263
2880
  serialNumber: z.string().optional(),
2264
2881
  externalId: z.string().optional(),
2265
2882
  supportedLanguages: z.array(z.string()).optional()
2266
2883
  }), z.object({
2884
+ id: z.number().int().optional(),
2885
+ name: z.string().optional(),
2886
+ integrationId: z.number().int().optional(),
2887
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2888
+ operatorId: z.number().int().optional(),
2889
+ chargingZoneId: z.number().int().optional(),
2890
+ chargePointId: z.number().int().optional(),
2267
2891
  serialNumber: z.string().optional(),
2268
2892
  externalId: z.string().optional()
2269
2893
  }), z.object({
2270
- adminToken: z.unknown().optional(),
2894
+ id: z.number().int().optional(),
2895
+ name: z.string().optional(),
2896
+ integrationId: z.number().int().optional(),
2897
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2898
+ operatorId: z.number().int().optional(),
2899
+ chargingZoneId: z.number().int().optional(),
2900
+ chargePointId: z.number().int().optional(),
2901
+ adminToken: z.string().optional(),
2271
2902
  webhookUrl: z.string().optional(),
2272
2903
  serialNumber: z.string().optional(),
2273
2904
  externalId: z.string().optional()
2274
2905
  }), z.object({
2275
- terminalId: z.unknown().optional(),
2906
+ id: z.number().int().optional(),
2907
+ name: z.string().optional(),
2908
+ integrationId: z.number().int().optional(),
2909
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2910
+ operatorId: z.number().int().optional(),
2911
+ chargingZoneId: z.number().int().optional(),
2912
+ chargePointId: z.number().int().optional(),
2913
+ terminalId: z.string().optional(),
2276
2914
  serialNumber: z.string().optional(),
2277
2915
  externalId: z.string().optional()
2278
2916
  }), z.object({
2917
+ id: z.number().int().optional(),
2918
+ name: z.string().optional(),
2919
+ integrationId: z.number().int().optional(),
2920
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2921
+ operatorId: z.number().int().optional(),
2922
+ chargingZoneId: z.number().int().optional(),
2923
+ chargePointId: z.number().int().optional(),
2279
2924
  serialNumber: z.string().optional(),
2280
2925
  externalId: z.string().optional()
2281
2926
  }), z.object({
2927
+ id: z.number().int().optional(),
2928
+ name: z.string().optional(),
2929
+ integrationId: z.number().int().optional(),
2930
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2931
+ operatorId: z.number().int().optional(),
2932
+ chargingZoneId: z.number().int().optional(),
2933
+ chargePointId: z.number().int().optional(),
2282
2934
  verificationCode: z.string().optional(),
2283
2935
  defaultLanguage: z.string().optional(),
2284
2936
  presentCardOnStopSession: z.boolean().optional(),
2285
- info: z.unknown().optional(),
2937
+ info: z.array(z.object({
2938
+ locale: z.string().optional(),
2939
+ translation: z.string().optional()
2940
+ })).optional(),
2286
2941
  serialNumber: z.string().optional(),
2287
2942
  externalId: z.string().optional()
2288
2943
  }), z.object({
2944
+ id: z.number().int().optional(),
2945
+ name: z.string().optional(),
2946
+ integrationId: z.number().int().optional(),
2947
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2948
+ operatorId: z.number().int().optional(),
2949
+ chargingZoneId: z.number().int().optional(),
2950
+ chargePointId: z.number().int().optional(),
2289
2951
  serialNumber: z.string().optional(),
2290
2952
  externalId: z.string().optional()
2291
2953
  }), z.object({
2292
2954
  id: z.number().int().optional(),
2293
2955
  name: z.string().optional(),
2294
2956
  integrationId: z.number().int().optional(),
2295
- terminalType: z.unknown().optional(),
2957
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2296
2958
  operatorId: z.number().int().optional()
2297
2959
  }), z.object({
2298
- adminToken: z.unknown().optional(),
2960
+ id: z.number().int().optional(),
2961
+ name: z.string().optional(),
2962
+ integrationId: z.number().int().optional(),
2963
+ terminalType: z.enum(["Payter", "Valina", "Crane", "Ampeco", "Nayax", "Embedded", "Pax", "Windcave", "Web portal", "AdyenCastles"]).optional(),
2964
+ operatorId: z.number().int().optional(),
2965
+ chargingZoneId: z.number().int().optional(),
2966
+ chargePointId: z.number().int().optional(),
2967
+ adminToken: z.string().optional(),
2299
2968
  networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
2300
2969
  phone: z.string().optional(),
2301
2970
  defaultLanguage: z.string().optional(),
2302
2971
  presentCardOnStopSession: z.boolean().optional(),
2303
- info: z.unknown().optional(),
2972
+ info: z.array(z.object({
2973
+ locale: z.string().optional(),
2974
+ translation: z.string().optional()
2975
+ })).optional(),
2304
2976
  serialNumber: z.string().optional(),
2305
2977
  externalId: z.string().optional(),
2306
2978
  merchantAccount: z.string().optional(),
2307
2979
  adyenApiKey: z.string().optional(),
2308
2980
  supportedLanguages: z.array(z.string()).optional(),
2309
2981
  networkStatusMonitoringEnabled: z.boolean().optional()
2310
- }), z.object({
2311
- adminToken: z.unknown().optional(),
2312
- networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
2313
- phone: z.string().optional(),
2314
- defaultLanguage: z.string().optional(),
2315
- presentCardOnStopSession: z.boolean().optional(),
2316
- info: z.unknown().optional(),
2317
- serialNumber: z.string().optional(),
2318
- externalId: z.string().optional(),
2319
- supportedLanguages: z.array(z.string()).optional(),
2320
- networkStatusMonitoringEnabled: z.boolean().optional()
2321
2982
  })]);
2322
2983
 
2323
2984
  // GET /public-api/resources/provisioning-certificates/v2.0
@@ -2365,15 +3026,6 @@ export const updatePcIdBody = z.object({
2365
3026
  // GET /public-api/resources/receipts/v2.0/{receipt}
2366
3027
 
2367
3028
  // GET /public-api/resources/reservations/v1.0
2368
- export const reservationsListingQueryParams = z.object({
2369
- filter: z.object({
2370
- evseId: z.string().optional(),
2371
- userId: z.string().optional(),
2372
- status: z.enum(["active", "expired", "canceled", "done"]).optional(),
2373
- reservedFrom: z.string().datetime().optional(),
2374
- reservedTo: z.string().datetime().optional()
2375
- }).optional()
2376
- });
2377
3029
 
2378
3030
  // GET /public-api/resources/reservations/v1.0/{reservation}
2379
3031
 
@@ -2388,7 +3040,7 @@ export const rfidTagCreateDeprecatedBody = z.object({
2388
3040
  createdAt: z.string().optional(),
2389
3041
  status: z.enum(["enabled", "disabled", "suspended"]),
2390
3042
  userId: z.number().int().optional(),
2391
- lastUpdatedAt: z.unknown().optional()
3043
+ lastUpdatedAt: z.string().datetime().optional()
2392
3044
  });
2393
3045
 
2394
3046
  // GET /public-api/resources/rfid-tags/v1.0/{rfidTag}
@@ -2396,39 +3048,43 @@ export const rfidTagCreateDeprecatedBody = z.object({
2396
3048
  // DELETE /public-api/resources/rfid-tags/v1.0/{rfidTag}
2397
3049
 
2398
3050
  // PATCH /public-api/resources/rfid-tags/v1.0/{rfidTag}
2399
- export const rfidTagUpdateDeprecatedBody = z.unknown();
3051
+ export const rfidTagUpdateDeprecatedBody = z.object({
3052
+ id: z.number().int().optional(),
3053
+ rfidTagUid: z.string(),
3054
+ rfidLabel: z.string().optional(),
3055
+ expireAt: z.string().optional(),
3056
+ createdAt: z.string().optional(),
3057
+ status: z.enum(["enabled", "disabled", "suspended"]),
3058
+ userId: z.number().int().optional(),
3059
+ lastUpdatedAt: z.string().datetime().optional()
3060
+ });
2400
3061
 
2401
3062
  // GET /public-api/resources/roaming-connections/v2.0
2402
3063
 
2403
3064
  // GET /public-api/resources/roaming-connections/v2.0/{roamingConnection}
2404
- export const getRoamingConnectionPathParams = z.object({
2405
- roamingConnection: z.number().int()
2406
- });
2407
3065
 
2408
3066
  // GET /public-api/resources/roaming-operators/v2.0
2409
3067
 
2410
3068
  // GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}
2411
- export const roamingOperatorReadPathParams = z.object({
2412
- roamingOperator: z.number().int()
2413
- });
2414
3069
 
2415
3070
  // PATCH /public-api/resources/roaming-operators/v2.0/{roamingOperator}
2416
3071
  export const roamingOperatorUpdateBody = z.object({
2417
3072
  businessName: z.string().optional(),
2418
3073
  partnerId: z.number().int().optional(),
2419
3074
  enabled: z.boolean().optional(),
2420
- cpoSettings: z.object({}).optional()
2421
- });
2422
-
2423
- // GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters
2424
- export const listRoamingCustomTariffFiltersQueryParams = z.object({
2425
- filter: z.object({
2426
- status: z.enum(["enabled", "disabled"]).optional(),
2427
- createdAfter: z.unknown().optional(),
2428
- createdBefore: z.unknown().optional()
3075
+ cpoSettings: z.object({
3076
+ cpoQrcodePrefix: z.string().optional(),
3077
+ manualEvseManagement: z.boolean().optional(),
3078
+ applyCustomTariffsToEvsesWithRoamingTariff: z.boolean().optional(),
3079
+ sendsPeriodicMeterUpdates: z.boolean().optional(),
3080
+ externalTariffIntegration: z.string().optional(),
3081
+ threatEvseStatusUnknownAs: z.enum(["available", "unavailable"]).optional(),
3082
+ phaseAcPowerFormula: z.enum(["amperage_voltage_3", "amperage_voltage_sqr3"]).optional()
2429
3083
  }).optional()
2430
3084
  });
2431
3085
 
3086
+ // GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters
3087
+
2432
3088
  // POST /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters
2433
3089
  export const createRoamingCustomTariffFilterBody = z.object({
2434
3090
  id: z.number().int().optional(),
@@ -2439,8 +3095,8 @@ export const createRoamingCustomTariffFilterBody = z.object({
2439
3095
  powerBelowKw: z.number().min(0).optional(),
2440
3096
  evseIdPrefix: z.string().max(1000).optional(),
2441
3097
  order: z.number().int().optional(),
2442
- createdAt: z.unknown().optional(),
2443
- updatedAt: z.unknown().optional()
3098
+ createdAt: z.string().datetime().optional(),
3099
+ updatedAt: z.string().datetime().optional()
2444
3100
  });
2445
3101
 
2446
3102
  // PUT /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters/reorder
@@ -2469,18 +3125,8 @@ export const updateRoamingCustomTariffFilterBody = z.object({
2469
3125
  // GET /public-api/resources/roaming-platforms/v1.0
2470
3126
 
2471
3127
  // GET /public-api/resources/roaming-platforms/v1.0/{roamingPlatform}
2472
- export const roamingPlatformReadDeprecatedPathParams = z.object({
2473
- roamingPlatform: z.number().int()
2474
- });
2475
3128
 
2476
3129
  // GET /public-api/resources/roaming-providers/v2.0
2477
- export const roamingProvidersListingQueryParams = z.object({
2478
- filter: z.object({
2479
- platformId: z.number().int().optional(),
2480
- countryCode: z.string().optional(),
2481
- partyId: z.string().optional()
2482
- }).optional()
2483
- });
2484
3130
 
2485
3131
  // POST /public-api/resources/roaming-providers/v2.0
2486
3132
  export const roamingProviderCreateBody = z.union([z.object({
@@ -2489,26 +3135,34 @@ export const roamingProviderCreateBody = z.union([z.object({
2489
3135
  partnerId: z.number().int().optional(),
2490
3136
  hubjectId: z.string().optional()
2491
3137
  }), z.object({
3138
+ businessName: z.string().optional(),
3139
+ platformId: z.number().int(),
3140
+ partnerId: z.number().int().optional(),
2492
3141
  countryCode: z.string().optional(),
2493
3142
  partyId: z.string().optional()
2494
3143
  })]);
2495
3144
 
2496
3145
  // GET /public-api/resources/roaming-providers/v2.0/{roamingProvider}
2497
- export const roamingProviderReadPathParams = z.object({
2498
- roamingProvider: z.number().int()
2499
- });
2500
3146
 
2501
3147
  // DELETE /public-api/resources/roaming-providers/v2.0/{roamingProvider}
2502
3148
 
2503
3149
  // PATCH /public-api/resources/roaming-providers/v2.0/{roamingProvider}
2504
- export const roamingProviderUpdateBody = z.union([z.unknown(), z.object({})]);
3150
+ export const roamingProviderUpdateBody = z.union([z.object({
3151
+ businessName: z.string().optional(),
3152
+ platformId: z.number().int().optional(),
3153
+ partnerId: z.number().int().optional(),
3154
+ hubjectId: z.string().optional()
3155
+ }), z.object({
3156
+ businessName: z.string().optional(),
3157
+ platformId: z.number().int().optional(),
3158
+ partnerId: z.number().int().optional(),
3159
+ countryCode: z.string().optional(),
3160
+ partyId: z.string().optional()
3161
+ })]);
2505
3162
 
2506
3163
  // GET /public-api/resources/roaming-tariffs/v2.0
2507
3164
 
2508
3165
  // GET /public-api/resources/roaming-tariffs/v2.0/{roamingTariff}
2509
- export const roamingTariffReadPathParams = z.object({
2510
- roamingTariff: z.number().int()
2511
- });
2512
3166
 
2513
3167
  // PATCH /public-api/resources/roaming-tariffs/v2.0/{roamingTariff}
2514
3168
  export const roamingTariffUpdateBody = z.object({
@@ -2525,22 +3179,10 @@ export const roamingTariffUpdateBody = z.object({
2525
3179
  // GET /public-api/resources/security-events-log/v2.0/{securityEventLog}
2526
3180
 
2527
3181
  // GET /public-api/resources/security-events/v2.0
2528
- export const securityEventsListingQueryParams = z.object({
2529
- filter: z.object({
2530
- type: z.enum(["FirmwareUpdated", "SettingSystemTime", "StartupOfTheDevice", "ResetOrReboot", "SecurityLogWasCleared", "MemoryExhaustion", "TamperDetectionActivated"]).optional(),
2531
- chargePoint: z.string().optional(),
2532
- timestampFrom: z.string().optional(),
2533
- timestampTo: z.string().optional()
2534
- }).optional()
2535
- });
2536
3182
 
2537
3183
  // GET /public-api/resources/security-events/v2.0/{securityEvent}
2538
3184
 
2539
3185
  // GET /public-api/resources/sessions/v1.0
2540
- export const sessionsListingQueryParams = z.object({
2541
- withChargingPeriodsPriceBreakdown: z.boolean().optional(),
2542
- include: z.array(z.enum(["externalAppData"])).optional()
2543
- });
2544
3186
 
2545
3187
  // GET /public-api/resources/sessions/v1.0/{session}
2546
3188
 
@@ -2558,8 +3200,14 @@ export const sessionsListingQueryParams = z.object({
2558
3200
 
2559
3201
  // POST /public-api/resources/subscription-plans/v2.0
2560
3202
  export const subscriptionPlanCreateBody = z.object({
2561
- name: z.unknown(),
2562
- description: z.unknown(),
3203
+ name: z.array(z.object({
3204
+ locale: z.string().optional(),
3205
+ translation: z.string().optional()
3206
+ })),
3207
+ description: z.array(z.object({
3208
+ locale: z.string().optional(),
3209
+ translation: z.string().optional()
3210
+ })),
2563
3211
  renewalCycle: z.enum(["monthly", "annually"]),
2564
3212
  freeRenewalPeriods: z.number().int().optional(),
2565
3213
  type: z.enum(["pre-paid", "post-paid"]),
@@ -2578,9 +3226,9 @@ export const subscriptionPlanCreateBody = z.object({
2578
3226
  excludeRoaming: z.boolean().optional(),
2579
3227
  includedPartnerChargePoints: z.array(z.number().int()).optional(),
2580
3228
  excludedPartnerChargePoints: z.array(z.number().int()).optional(),
2581
- combined: z.unknown().optional(),
3229
+ combined: z.number().int().min(0).max(4000000).optional(),
2582
3230
  ac: z.number().int().min(0).max(4000000).optional(),
2583
- dc: z.unknown().optional()
3231
+ dc: z.number().int().min(0).max(4000000).optional()
2584
3232
  }).optional(),
2585
3233
  visibilityRestrictions: z.object({
2586
3234
  includedPartnerUsers: z.array(z.number().int()).optional(),
@@ -2588,7 +3236,7 @@ export const subscriptionPlanCreateBody = z.object({
2588
3236
  includedUserGroups: z.array(z.number().int()).optional(),
2589
3237
  excludedUserGroups: z.array(z.number().int()).optional()
2590
3238
  }).optional(),
2591
- lastUpdatedAt: z.unknown().optional()
3239
+ lastUpdatedAt: z.string().datetime().optional()
2592
3240
  });
2593
3241
 
2594
3242
  // GET /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
@@ -2597,8 +3245,14 @@ export const subscriptionPlanCreateBody = z.object({
2597
3245
 
2598
3246
  // PATCH /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
2599
3247
  export const subscriptionPlanUpdateBody = z.object({
2600
- name: z.unknown().optional(),
2601
- description: z.unknown().optional(),
3248
+ name: z.array(z.object({
3249
+ locale: z.string().optional(),
3250
+ translation: z.string().optional()
3251
+ })).optional(),
3252
+ description: z.array(z.object({
3253
+ locale: z.string().optional(),
3254
+ translation: z.string().optional()
3255
+ })).optional(),
2602
3256
  renewalCycle: z.enum(["monthly", "annually"]).optional(),
2603
3257
  freeRenewalPeriods: z.number().int().optional(),
2604
3258
  type: z.enum(["pre-paid", "post-paid"]).optional(),
@@ -2606,18 +3260,20 @@ export const subscriptionPlanUpdateBody = z.object({
2606
3260
  feePerEachPersonalChargePoint: z.number().optional(),
2607
3261
  postPaidChargingSessionsAccumulation: z.enum(["none", "personal", "personal_commercial"]).optional(),
2608
3262
  billingUsageThreshold: z.number().int().optional(),
2609
- billingType: z.unknown().optional(),
3263
+ billingType: z.enum(["default", "internal", "external"]).optional(),
2610
3264
  status: z.enum(["enabled", "disabled"]).optional(),
2611
3265
  allowance: z.object({
2612
3266
  resetCycle: z.enum(["as_renewal_cycle", "after_each_session", "after_24_hours", "after_each_week", "after_each_month", "after_each_year"]).optional(),
2613
3267
  type: z.enum(["none", "combined", "separate"]).optional(),
2614
- $ref: z.unknown().optional(),
2615
3268
  homeChargersOnly: z.boolean().optional(),
2616
3269
  includedCountries: z.array(z.unknown()).optional(),
2617
3270
  excludedCountries: z.array(z.unknown()).optional(),
2618
3271
  excludeRoaming: z.boolean().optional(),
2619
3272
  includedPartnerChargePoints: z.array(z.number().int()).optional(),
2620
- excludedPartnerChargePoints: z.array(z.number().int()).optional()
3273
+ excludedPartnerChargePoints: z.array(z.number().int()).optional(),
3274
+ combined: z.number().int().min(0).max(4000000).optional(),
3275
+ ac: z.number().int().min(0).max(4000000).optional(),
3276
+ dc: z.number().int().min(0).max(4000000).optional()
2621
3277
  }).optional(),
2622
3278
  visibilityRestrictions: z.object({
2623
3279
  includedPartnerUsers: z.array(z.number().int()).optional(),
@@ -2625,7 +3281,7 @@ export const subscriptionPlanUpdateBody = z.object({
2625
3281
  includedUserGroups: z.array(z.number().int()).optional(),
2626
3282
  excludedUserGroups: z.array(z.number().int()).optional()
2627
3283
  }).optional(),
2628
- lastUpdatedAt: z.unknown().optional()
3284
+ lastUpdatedAt: z.string().datetime().optional()
2629
3285
  });
2630
3286
 
2631
3287
  // GET /public-api/resources/subscriptions/v1.0
@@ -2635,12 +3291,22 @@ export const subscriptionPlanUpdateBody = z.object({
2635
3291
  // GET /public-api/resources/tariff-groups/v1.0
2636
3292
 
2637
3293
  // POST /public-api/resources/tariff-groups/v1.0
2638
- export const tariffGroupCreateBody = z.unknown();
3294
+ export const tariffGroupCreateBody = z.object({
3295
+ name: z.string(),
3296
+ tariffIds: z.array(z.number().int()).optional(),
3297
+ partnerId: z.number().int().optional(),
3298
+ lastUpdatedAt: z.string().datetime().optional()
3299
+ });
2639
3300
 
2640
3301
  // GET /public-api/resources/tariff-groups/v1.0/{tariffGroup}
2641
3302
 
2642
3303
  // PUT /public-api/resources/tariff-groups/v1.0/{tariffGroup}
2643
- export const tariffGroupUpdateBody = z.unknown();
3304
+ export const tariffGroupUpdateBody = z.object({
3305
+ name: z.string(),
3306
+ tariffIds: z.array(z.number().int()).optional(),
3307
+ partnerId: z.number().int().optional(),
3308
+ lastUpdatedAt: z.string().datetime().optional()
3309
+ });
2644
3310
 
2645
3311
  // DELETE /public-api/resources/tariff-groups/v1.0/{tariffGroup}
2646
3312
 
@@ -2653,9 +3319,9 @@ export const tariffCreateBody = z.object({
2653
3319
  id: z.number().int(),
2654
3320
  name: z.string(),
2655
3321
  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"]),
2656
- description: z.unknown().optional(),
2657
- additionalInformation: z.unknown().optional(),
2658
- learnMoreUrl: z.unknown().optional(),
3322
+ description: z.record(z.string()).optional(),
3323
+ additionalInformation: z.record(z.string()).optional(),
3324
+ learnMoreUrl: z.record(z.string()).optional(),
2659
3325
  dayTariffStart: z.string().optional(),
2660
3326
  nightTariffStart: z.string().optional(),
2661
3327
  pricing: z.object({
@@ -2689,7 +3355,11 @@ export const tariffCreateBody = z.object({
2689
3355
  markupFixedFeePerKwh: z.number().optional(),
2690
3356
  flexibleMarkUpAsFixedPerKwh: z.object({
2691
3357
  defaultPrice: z.number().optional(),
2692
- intervalPricing: z.array(z.unknown()).optional()
3358
+ intervalPricing: z.array(z.object({
3359
+ startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
3360
+ endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
3361
+ price: z.number()
3362
+ })).optional()
2693
3363
  }).optional(),
2694
3364
  multiPricePerKwh: z.array(z.object({
2695
3365
  firstKwh: z.number(),
@@ -2796,7 +3466,7 @@ export const tariffCreateBody = z.object({
2796
3466
  partner: z.object({
2797
3467
  id: z.number().int().optional()
2798
3468
  }).optional(),
2799
- lastUpdatedAt: z.unknown().optional(),
3469
+ lastUpdatedAt: z.string().datetime().optional(),
2800
3470
  display: z.object({
2801
3471
  defaultPriceInformation: z.string().max(150).optional(),
2802
3472
  defaultPriceInformationOffline: z.string().max(150).optional(),
@@ -2809,7 +3479,166 @@ export const tariffCreateBody = z.object({
2809
3479
  // GET /public-api/resources/tariffs/v1.0/{tariff}
2810
3480
 
2811
3481
  // PUT /public-api/resources/tariffs/v1.0/{tariff}
2812
- export const tariffUpdateBody = z.unknown();
3482
+ export const tariffUpdateBody = z.object({
3483
+ id: z.number().int(),
3484
+ name: z.string(),
3485
+ 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"]),
3486
+ description: z.record(z.string()).optional(),
3487
+ additionalInformation: z.record(z.string()).optional(),
3488
+ learnMoreUrl: z.record(z.string()).optional(),
3489
+ dayTariffStart: z.string().optional(),
3490
+ nightTariffStart: z.string().optional(),
3491
+ pricing: z.object({
3492
+ pricePerSession: z.number().optional(),
3493
+ connectionFee: z.number().optional(),
3494
+ pricePerKwh: z.number().optional(),
3495
+ dayPricePerKwh: z.number().optional(),
3496
+ nightPricePerKwh: z.number().optional(),
3497
+ pricePeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
3498
+ pricePerPeriod: z.number().optional(),
3499
+ durationFeeLimit: z.number().optional(),
3500
+ dayPricePerPeriod: z.number().optional(),
3501
+ nightPricePerPeriod: z.number().optional(),
3502
+ dayIdleFeePerMinute: z.number().optional(),
3503
+ nightIdleFeePerMinute: z.number().optional(),
3504
+ idleFeePerMinute: z.number().optional(),
3505
+ idleFeeGracePeriodMinutes: z.number().optional(),
3506
+ idlePricingPeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
3507
+ idleFeePeriodStart: z.string().optional(),
3508
+ idleFeePeriodEnd: z.string().optional(),
3509
+ idleFeeLimit: z.number().optional(),
3510
+ connectionFeeMinimumSessionDuration: z.number().int().optional(),
3511
+ connectionFeeMinimumSessionEnergy: z.number().optional(),
3512
+ durationFeeGracePeriod: z.number().int().optional(),
3513
+ minPrice: z.number().optional(),
3514
+ preAuthorizeAmount: z.number().optional(),
3515
+ taxID: z.number().int().optional(),
3516
+ chargePointElectricityRate: z.boolean().optional(),
3517
+ fallbackElectricityRateId: z.number().int().optional(),
3518
+ markupPercentagePerKwh: z.number().optional(),
3519
+ markupFixedFeePerKwh: z.number().optional(),
3520
+ flexibleMarkUpAsFixedPerKwh: z.object({
3521
+ defaultPrice: z.number().optional(),
3522
+ intervalPricing: z.array(z.object({
3523
+ startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
3524
+ endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
3525
+ price: z.number()
3526
+ })).optional()
3527
+ }).optional(),
3528
+ multiPricePerKwh: z.array(z.object({
3529
+ firstKwh: z.number(),
3530
+ lastKwh: z.number().optional(),
3531
+ feePerKwh: z.number().optional(),
3532
+ flatFee: z.number().optional()
3533
+ })).optional(),
3534
+ multiPricePerDuration: z.array(z.object({
3535
+ firstUnit: z.number().int(),
3536
+ lastUnit: z.number().int().optional(),
3537
+ feePerUnit: z.number().optional(),
3538
+ flatFee: z.number().optional()
3539
+ })).optional(),
3540
+ multiIdleFee: z.array(z.object({
3541
+ firstUnit: z.number().int(),
3542
+ lastUnit: z.number().int().optional(),
3543
+ feePerUnit: z.number().optional(),
3544
+ flatFee: z.number().optional()
3545
+ })).optional(),
3546
+ regularUsePeriod: z.number().optional(),
3547
+ averagePowerLevels: z.array(z.object({
3548
+ averagePowerUpToKw: z.number(),
3549
+ pricePerMinute: z.number()
3550
+ })).optional(),
3551
+ peakPowerLevels: z.array(z.object({
3552
+ peakPowerUpToKw: z.number(),
3553
+ regularPricePerMinute: z.number(),
3554
+ excessUsePricePerMin: z.number()
3555
+ })).optional(),
3556
+ timePeriods: z.array(z.object({
3557
+ startTime: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
3558
+ endTime: z.string().regex(new RegExp("^\\d{2}:\\d{2}$"))
3559
+ })).optional(),
3560
+ pricePeriods: z.object({
3561
+ connectionFeePeriods: z.object({
3562
+ fee: z.array(z.number()).optional()
3563
+ }).optional(),
3564
+ energyFeePeriods: z.object({
3565
+ fee: z.array(z.number()).optional()
3566
+ }).optional(),
3567
+ durationFeePeriods: z.object({
3568
+ fee: z.array(z.number()).optional()
3569
+ }).optional(),
3570
+ idleFeePeriods: z.object({
3571
+ fee: z.array(z.number()).optional()
3572
+ }).optional()
3573
+ }).optional(),
3574
+ daysWhenApplied: z.array(z.object({
3575
+ name: z.string().optional(),
3576
+ specialDates: z.array(z.string()).optional(),
3577
+ idleFeeGracePeriodMinutes: z.number().optional(),
3578
+ idlePricingPeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
3579
+ connectionFeeMinimumSessionDuration: z.number().int().optional(),
3580
+ connectionFeeMinimumSessionEnergy: z.number().optional(),
3581
+ durationFeeGracePeriod: z.number().int().optional(),
3582
+ pricePeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
3583
+ pricePeriods: z.object({
3584
+ connectionFeePeriods: z.object({
3585
+ fee: z.array(z.number()).optional()
3586
+ }).optional(),
3587
+ energyFeePeriods: z.object({
3588
+ fee: z.array(z.number()).optional()
3589
+ }).optional(),
3590
+ durationFeePeriods: z.object({
3591
+ fee: z.array(z.number()).optional()
3592
+ }).optional(),
3593
+ idleFeePeriods: z.object({
3594
+ fee: z.array(z.number()).optional()
3595
+ }).optional()
3596
+ }).optional()
3597
+ })).optional(),
3598
+ thresholdPriceForEnergy: z.number().optional(),
3599
+ priceForEnergyWhenOptimized: z.number().optional(),
3600
+ optimisedLabel: z.string().optional(),
3601
+ durationFeeFrom: z.string().optional(),
3602
+ durationFeeTo: z.string().optional(),
3603
+ subsidyIntegrationId: z.number().int().optional(),
3604
+ lockPriceOnSessionStart: z.boolean().optional(),
3605
+ lockEnergyPriceOnSessionStart: z.boolean().optional(),
3606
+ lockDurationPriceOnSessionStart: z.boolean().optional(),
3607
+ lockIdlePriceOnSessionStart: z.boolean().optional(),
3608
+ stateOfChargeIdleThreshold: z.union([z.literal(75), z.literal(80), z.literal(85), z.literal(90), z.literal(95), z.literal(100)]).optional(),
3609
+ averagePowerIdleThreshold: z.number().min(0).max(999999.99).optional()
3610
+ }).optional(),
3611
+ currency: z.string().optional(),
3612
+ stopSession: z.object({
3613
+ timeLimitMinutes: z.number().optional(),
3614
+ stopWhenEnergyExceedsKwh: z.number().optional()
3615
+ }).optional(),
3616
+ restrictions: z.object({
3617
+ applyToUsersOfChargePointOwner: z.boolean().optional(),
3618
+ applyToUsersOfChargePointPartner: z.boolean().optional(),
3619
+ applyToUsersOfAllRoamingEmsps: z.boolean().optional(),
3620
+ applyToAdHocUsers: z.boolean().optional(),
3621
+ adHocPreAuthorizeAmount: z.number().min(0).optional(),
3622
+ adHocStopWhenPreAuthorizedAmountFallsBelow: z.number().optional(),
3623
+ applyToUsersOfPartners: z.array(z.number()).optional(),
3624
+ applyToUsersWithGroups: z.array(z.string()).optional(),
3625
+ applyToUserGroupIds: z.array(z.number()).optional(),
3626
+ applyToUsersWithSubscriptions: z.array(z.number()).optional(),
3627
+ startDate: z.string().optional(),
3628
+ endDate: z.string().optional()
3629
+ }).optional(),
3630
+ partner: z.object({
3631
+ id: z.number().int().optional()
3632
+ }).optional(),
3633
+ lastUpdatedAt: z.string().datetime().optional(),
3634
+ display: z.object({
3635
+ defaultPriceInformation: z.string().max(150).optional(),
3636
+ defaultPriceInformationOffline: z.string().max(150).optional(),
3637
+ priceInformation: z.string().optional(),
3638
+ totalCostInformation: z.string().optional()
3639
+ }).optional(),
3640
+ integrationId: z.number().int().optional()
3641
+ });
2813
3642
 
2814
3643
  // DELETE /public-api/resources/tariffs/v1.0/{tariff}
2815
3644
 
@@ -2834,7 +3663,10 @@ export const taxIdentificationNumberUpdateBody = z.object({
2834
3663
  // POST /public-api/resources/taxes/v2.0
2835
3664
  export const taxCreateBody = z.object({
2836
3665
  name: z.string(),
2837
- displayName: z.unknown().optional(),
3666
+ displayName: z.array(z.object({
3667
+ locale: z.string().optional(),
3668
+ translation: z.string().optional()
3669
+ })).optional(),
2838
3670
  percentage: z.number(),
2839
3671
  taxIdentificationNumberId: z.number().int().optional()
2840
3672
  });
@@ -2846,7 +3678,10 @@ export const taxCreateBody = z.object({
2846
3678
  // PATCH /public-api/resources/taxes/v2.0/{tax}
2847
3679
  export const taxUpdateBody = z.object({
2848
3680
  name: z.string().optional(),
2849
- displayName: z.unknown().optional(),
3681
+ displayName: z.array(z.object({
3682
+ locale: z.string().optional(),
3683
+ translation: z.string().optional()
3684
+ })).optional(),
2850
3685
  percentage: z.number().optional(),
2851
3686
  taxIdentificationNumberId: z.number().int().optional()
2852
3687
  });
@@ -2896,7 +3731,7 @@ export const transactionsCreateBody = z.object({
2896
3731
  status: z.enum(["pending", "finalized", "failed", "reversed", "refunded", "authorized", "initialized"]),
2897
3732
  ref: z.string().optional(),
2898
3733
  failureReason: z.string().optional(),
2899
- lastUpdatedAt: z.unknown().optional()
3734
+ lastUpdatedAt: z.string().datetime().optional()
2900
3735
  });
2901
3736
 
2902
3737
  // GET /public-api/resources/transactions/v1.0/{transaction}
@@ -2916,23 +3751,17 @@ export const transactionUpdateBody = z.object({
2916
3751
  totalAmount: z.number(),
2917
3752
  ref: z.string().optional(),
2918
3753
  failureReason: z.string().optional(),
2919
- lastUpdatedAt: z.unknown().optional()
3754
+ lastUpdatedAt: z.string().datetime().optional()
2920
3755
  });
2921
3756
 
2922
3757
  // GET /public-api/resources/user-groups/v1.0
2923
- export const userGroupsListingQueryParams = z.object({
2924
- filter: z.object({
2925
- noPartner: z.string().optional(),
2926
- partnerId: z.string().optional()
2927
- }).optional()
2928
- });
2929
3758
 
2930
3759
  // POST /public-api/resources/user-groups/v1.0
2931
3760
  export const userGroupCreateBody = z.object({
2932
3761
  name: z.string(),
2933
3762
  partnerId: z.number().int().optional(),
2934
3763
  description: z.string().max(2000).optional(),
2935
- lastUpdatedAt: z.unknown().optional()
3764
+ lastUpdatedAt: z.string().datetime().optional()
2936
3765
  });
2937
3766
 
2938
3767
  // GET /public-api/resources/user-groups/v1.0/{userGroup}
@@ -2940,7 +3769,12 @@ export const userGroupCreateBody = z.object({
2940
3769
  // DELETE /public-api/resources/user-groups/v1.0/{userGroup}
2941
3770
 
2942
3771
  // PATCH /public-api/resources/user-groups/v1.0/{userGroup}
2943
- export const userGroupUpdateBody = z.unknown();
3772
+ export const userGroupUpdateBody = z.object({
3773
+ name: z.string(),
3774
+ partnerId: z.number().int().optional(),
3775
+ description: z.string().max(2000).optional(),
3776
+ lastUpdatedAt: z.string().datetime().optional()
3777
+ });
2944
3778
 
2945
3779
  // GET /public-api/resources/users/v1.0
2946
3780
 
@@ -2954,8 +3788,8 @@ export const userCreateBody = z.object({
2954
3788
  middle_name: z.string().optional(),
2955
3789
  last_name: z.string().optional(),
2956
3790
  phone: z.string().optional(),
2957
- country: z.unknown().optional(),
2958
- state: z.union([z.unknown(), z.unknown()]).optional(),
3791
+ 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(),
3792
+ 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(),
2959
3793
  city: z.string().optional(),
2960
3794
  post_code: z.string().optional(),
2961
3795
  address: z.string().optional(),
@@ -2967,7 +3801,7 @@ export const userCreateBody = z.object({
2967
3801
  options: z.object({
2968
3802
  sessionsAllowed: z.enum(["single_session", "multiple_simultaneous_sessions_per_idtag", "simultaneous_use_of_idtags", "multiple_simultaneous_sessions_remotely_and_idtags"]).optional()
2969
3803
  }).optional(),
2970
- lastUpdatedAt: z.unknown().optional(),
3804
+ lastUpdatedAt: z.string().datetime().optional(),
2971
3805
  receiveNewsAndPromotions: z.boolean().optional(),
2972
3806
  bankDetails: z.object({
2973
3807
  bankIban: z.string().optional(),
@@ -2977,14 +3811,11 @@ export const userCreateBody = z.object({
2977
3811
  bankAccountNumber: z.string().optional(),
2978
3812
  bankAccountType: z.string().optional()
2979
3813
  }).optional(),
2980
- externalAppData: z.unknown().optional(),
3814
+ externalAppData: z.record(z.unknown()).optional(),
2981
3815
  nonce: z.string().optional()
2982
3816
  });
2983
3817
 
2984
3818
  // GET /public-api/resources/users/v1.0/{user}
2985
- export const userReadQueryParams = z.object({
2986
- withAmountDue: z.boolean().optional()
2987
- });
2988
3819
 
2989
3820
  // DELETE /public-api/resources/users/v1.0/{user}
2990
3821
 
@@ -2998,19 +3829,28 @@ export const userUpdateBody = z.object({
2998
3829
  middle_name: z.string().optional(),
2999
3830
  last_name: z.string().optional(),
3000
3831
  phone: z.string().optional(),
3001
- country: z.unknown().optional(),
3002
- state: z.union([z.unknown(), z.unknown()]).optional(),
3832
+ 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(),
3833
+ 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(),
3003
3834
  city: z.string().optional(),
3004
3835
  post_code: z.string().optional(),
3005
3836
  address: z.string().optional(),
3006
3837
  vehicle_no: z.string().optional(),
3007
3838
  userGroupIds: z.array(z.number().int()).optional(),
3008
3839
  externalId: z.string().optional(),
3009
- options: z.unknown().optional(),
3010
- lastUpdatedAt: z.unknown().optional(),
3840
+ options: z.object({
3841
+ sessionsAllowed: z.enum(["single_session", "multiple_simultaneous_sessions_per_idtag", "simultaneous_use_of_idtags", "multiple_simultaneous_sessions_remotely_and_idtags"]).optional()
3842
+ }).optional(),
3843
+ lastUpdatedAt: z.string().datetime().optional(),
3011
3844
  receiveNewsAndPromotions: z.boolean().optional(),
3012
- bankDetails: z.unknown().optional(),
3013
- externalAppData: z.unknown().optional()
3845
+ bankDetails: z.object({
3846
+ bankIban: z.string().optional(),
3847
+ bankName: z.string().optional(),
3848
+ bankAddress: z.string().optional(),
3849
+ bankCode: z.string().optional(),
3850
+ bankAccountNumber: z.string().optional(),
3851
+ bankAccountType: z.string().optional()
3852
+ }).optional(),
3853
+ externalAppData: z.record(z.unknown()).optional()
3014
3854
  });
3015
3855
 
3016
3856
  // GET /public-api/resources/users/v1.0/{user}/invoice-details
@@ -3026,9 +3866,9 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
3026
3866
  companyRegNo: z.string().optional(),
3027
3867
  companyTaxId: z.string().optional(),
3028
3868
  companyTaxAdministrationOfficeName: z.string().optional(),
3029
- country: z.unknown().optional(),
3869
+ 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(),
3030
3870
  region: z.string().optional(),
3031
- state: z.union([z.unknown(), z.unknown(), z.unknown(), z.unknown(), 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(),
3871
+ 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(),
3032
3872
  city: z.string().optional(),
3033
3873
  postCode: z.string().optional(),
3034
3874
  address: z.string().optional()
@@ -3040,7 +3880,7 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
3040
3880
  mobilePhoneNumber: z.string().optional(),
3041
3881
  landlinePhoneNumber: z.string().optional(),
3042
3882
  taxId: z.string().optional(),
3043
- country: z.unknown().optional(),
3883
+ 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(),
3044
3884
  city: z.string().optional(),
3045
3885
  postcode: z.string().optional(),
3046
3886
  address: z.string().optional()
@@ -3049,7 +3889,7 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
3049
3889
  lastName: z.string(),
3050
3890
  email: z.string(),
3051
3891
  phone: z.string().optional(),
3052
- country: z.unknown().optional(),
3892
+ 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(),
3053
3893
  city: z.string().optional(),
3054
3894
  postcode: z.string().optional(),
3055
3895
  address: z.string().optional()
@@ -3063,7 +3903,7 @@ export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
3063
3903
  name: z.string(),
3064
3904
  email: z.string(),
3065
3905
  phone: z.string(),
3066
- country: z.unknown().optional(),
3906
+ 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(),
3067
3907
  city: z.string().optional(),
3068
3908
  postcode: z.string().optional(),
3069
3909
  address: z.string().optional()
@@ -3097,7 +3937,9 @@ export const createUtilityBody = z.object({
3097
3937
  // GET /public-api/resources/utilities/v1.0/{utility}
3098
3938
 
3099
3939
  // PUT /public-api/resources/utilities/v1.0/{utility}
3100
- export const updateUtilityBody = z.unknown();
3940
+ export const updateUtilityBody = z.object({
3941
+ name: z.string().min(1).max(255)
3942
+ });
3101
3943
 
3102
3944
  // DELETE /public-api/resources/utilities/v1.0/{utility}
3103
3945
 
@@ -3117,7 +3959,13 @@ export const vendorErrorCodeCreateBody = z.object({
3117
3959
  // DELETE /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
3118
3960
 
3119
3961
  // PATCH /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
3120
- export const vendorErrorCodeUpdateBody = z.unknown();
3962
+ export const vendorErrorCodeUpdateBody = z.object({
3963
+ id: z.number().int().optional(),
3964
+ vendorId: z.string(),
3965
+ errorCode: z.string(),
3966
+ errorCodeDescription: z.string().optional(),
3967
+ errorCodeCustomerAction: z.string().optional()
3968
+ });
3121
3969
 
3122
3970
  // GET /public-api/resources/vouchers/v2.0
3123
3971
 
@@ -3162,10 +4010,13 @@ export const voucherCreateBody = z.object({
3162
4010
  // PATCH /public-api/resources/vouchers/v2.1/{voucher}
3163
4011
  export const voucherUpdateBody = z.object({
3164
4012
  status: z.enum(["enabled", "disabled"]).optional(),
3165
- expireDate: z.unknown().optional(),
3166
- validityPeriod: z.unknown().optional(),
4013
+ expireDate: z.string().optional(),
4014
+ validityPeriod: z.enum(["1 month", "3 months", "6 months", "1 year", "2 years", "3 years", "5 years"]).optional(),
3167
4015
  assignBeforeDate: z.string().optional(),
3168
4016
  amount: z.number(),
3169
4017
  prefix: z.string().min(3).max(3).optional(),
3170
- title: z.unknown().optional()
4018
+ title: z.array(z.object({
4019
+ locale: z.string().optional(),
4020
+ translation: z.string().optional()
4021
+ })).optional()
3171
4022
  });