@ampeco/public-api-mcp 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +734 -0
- package/dist/build/flattener.d.ts +39 -0
- package/dist/build/flattener.d.ts.map +1 -0
- package/dist/build/flattener.js +193 -0
- package/dist/build/flattener.js.map +1 -0
- package/dist/build/index.d.ts +13 -0
- package/dist/build/index.d.ts.map +1 -0
- package/dist/build/index.js +175 -0
- package/dist/build/index.js.map +1 -0
- package/dist/build/optimizer.d.ts +32 -0
- package/dist/build/optimizer.d.ts.map +1 -0
- package/dist/build/optimizer.js +222 -0
- package/dist/build/optimizer.js.map +1 -0
- package/dist/build/parser.d.ts +35 -0
- package/dist/build/parser.d.ts.map +1 -0
- package/dist/build/parser.js +83 -0
- package/dist/build/parser.js.map +1 -0
- package/dist/build/types.d.ts +91 -0
- package/dist/build/types.d.ts.map +1 -0
- package/dist/build/types.js +5 -0
- package/dist/build/types.js.map +1 -0
- package/dist/build/zod-generator.d.ts +34 -0
- package/dist/build/zod-generator.d.ts.map +1 -0
- package/dist/build/zod-generator.js +317 -0
- package/dist/build/zod-generator.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +99 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/generated/build-stats.json +7 -0
- package/dist/generated/endpoints.json +32181 -0
- package/dist/generated/schemas.d.ts +8157 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2726 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/schemas.ts +3171 -0
- package/dist/server/factory.d.ts +11 -0
- package/dist/server/factory.d.ts.map +1 -0
- package/dist/server/factory.js +450 -0
- package/dist/server/factory.js.map +1 -0
- package/dist/server/factory.test.d.ts +5 -0
- package/dist/server/factory.test.d.ts.map +1 -0
- package/dist/server/factory.test.js +77 -0
- package/dist/server/factory.test.js.map +1 -0
- package/dist/server/http.d.ts +10 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +110 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +1502 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/loader.d.ts +10 -0
- package/dist/server/loader.d.ts.map +1 -0
- package/dist/server/loader.js +19 -0
- package/dist/server/loader.js.map +1 -0
- package/dist/server/prompts.d.ts +6 -0
- package/dist/server/prompts.d.ts.map +1 -0
- package/dist/server/prompts.js +462 -0
- package/dist/server/prompts.js.map +1 -0
- package/dist/server/stdio.d.ts +10 -0
- package/dist/server/stdio.d.ts.map +1 -0
- package/dist/server/stdio.js +25 -0
- package/dist/server/stdio.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,3171 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// Auto-generated Zod schemas from OpenAPI specification
|
|
4
|
+
// Do not edit manually - regenerate with build script
|
|
5
|
+
|
|
6
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/change-availability
|
|
7
|
+
export const chargePointChangeAvailabilityBody = z.object({
|
|
8
|
+
evseNetworkId: z.number().int().optional(),
|
|
9
|
+
type: z.enum(["Inoperative", "Operative"])
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/change-owner
|
|
13
|
+
export const chargePointChangeOwnerBody = z.object({
|
|
14
|
+
userId: z.number().int().optional()
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/clear-charging-profile
|
|
18
|
+
export const chargePointClearChargingProfileBody = z.object({
|
|
19
|
+
id: z.number().optional(),
|
|
20
|
+
evseNetworkId: z.string().optional(),
|
|
21
|
+
chargingProfilePurpose: z.string().optional(),
|
|
22
|
+
stackLevel: z.number().optional()
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/get-diagnostics
|
|
26
|
+
export const chargePointGetDiagnosticsBody = z.object({
|
|
27
|
+
location: z.string(),
|
|
28
|
+
start: z.string().datetime().optional(),
|
|
29
|
+
stop: z.string().datetime().optional()
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/get-security-log
|
|
33
|
+
export const chargePointGetSecurityLogBody = z.object({
|
|
34
|
+
url: z.string().url(),
|
|
35
|
+
reason: z.string(),
|
|
36
|
+
retries: z.number().int().min(0).max(10).optional(),
|
|
37
|
+
interval: z.number().int().min(0).max(3600).optional(),
|
|
38
|
+
startTime: z.string().optional(),
|
|
39
|
+
stopTime: z.string().optional()
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/move-evses-to-satellite
|
|
43
|
+
export const chargePointMoveEvsesToSatelliteBody = z.object({
|
|
44
|
+
satelliteChargePointId: z.number().int(),
|
|
45
|
+
evseIds: z.array(z.number().int())
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/reserve/{evse}
|
|
49
|
+
export const chargePointReserveBody = z.object({
|
|
50
|
+
userId: z.number().int(),
|
|
51
|
+
reason: z.string().optional()
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/reset-security-profile
|
|
55
|
+
|
|
56
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/reset/{type}
|
|
57
|
+
|
|
58
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/send-data-transfer
|
|
59
|
+
export const chargePointSendDataTransferBody = z.object({
|
|
60
|
+
vendorId: z.string(),
|
|
61
|
+
messageId: z.string().optional(),
|
|
62
|
+
data: z.string().optional()
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/set-charging-profile/{evseNetworkId}
|
|
66
|
+
export const chargePointSetChargingProfileBody = z.object({
|
|
67
|
+
transactionId: z.number().int().optional(),
|
|
68
|
+
stackLevel: z.number().int(),
|
|
69
|
+
chargingProfilePurpose: z.enum(["ChargePointMaxProfile", "TxDefaultProfile", "TxProfile"]),
|
|
70
|
+
chargingProfileKind: z.enum(["Absolute", "Recurring", "Relative"]),
|
|
71
|
+
recurrencyKind: z.enum(["Daily", "Weekly"]).optional(),
|
|
72
|
+
validFrom: z.string().datetime().optional(),
|
|
73
|
+
validTo: z.string().datetime().optional(),
|
|
74
|
+
chargingSchedule: z.object({
|
|
75
|
+
id: z.number().optional(),
|
|
76
|
+
duration: z.number().int().optional(),
|
|
77
|
+
startSchedule: z.string().datetime().optional(),
|
|
78
|
+
chargingRateUnit: z.enum(["A", "W"]),
|
|
79
|
+
chargingSchedulePeriod: z.array(z.object({
|
|
80
|
+
startPeriod: z.number().int(),
|
|
81
|
+
limit: z.number(),
|
|
82
|
+
numberPhases: z.number().int().optional()
|
|
83
|
+
})),
|
|
84
|
+
minChargingRate: z.number().optional()
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/start
|
|
89
|
+
export const chargePointStartChargingSessionWithoutEvseBody = z.object({
|
|
90
|
+
userId: z.number().int().optional(),
|
|
91
|
+
paymentMethodId: z.string().optional(),
|
|
92
|
+
externalSessionId: z.string().optional(),
|
|
93
|
+
connectorId: z.number().int().optional(),
|
|
94
|
+
bookingId: z.number().int().optional()
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/start/{evse}
|
|
98
|
+
|
|
99
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/stop/{session}
|
|
100
|
+
export const chargePointStopChargingSessionBody = z.object({
|
|
101
|
+
force: z.boolean().optional()
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/sync-configuration
|
|
105
|
+
export const chargePointSyncConfigurationBody = z.object({
|
|
106
|
+
keys: z.array(z.union([z.unknown(), z.string()])).optional()
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/trigger-message
|
|
110
|
+
|
|
111
|
+
// POST /public-api/actions/charge-point/v1.0/{chargePoint}/unlock/{evse}
|
|
112
|
+
|
|
113
|
+
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/change-sharing-code
|
|
114
|
+
export const chargePointChangeSharingCodeBody = z.object({
|
|
115
|
+
sharingCode: z.string().optional()
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/delete-certificate
|
|
119
|
+
export const chargePointDeleteCertificateBody = z.object({
|
|
120
|
+
certificateType: z.enum(["ChargingStationCertificate", "V2GCertificate", "V2GRootCertificate", "MORootCertificate", "CSMSRootCertificate", "ManufacturerRootCertificate", "V2GCertificateChain"])
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/install-certificate
|
|
124
|
+
export const chargePointInstallCertificateBody = z.object({
|
|
125
|
+
certificateType: z.enum(["V2GRootCertificate", "MORootCertificate", "CSMSRootCertificate", "ManufacturerRootCertificate"])
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/set-configuration
|
|
129
|
+
export const chargePointSetConfigurationBody = z.object({
|
|
130
|
+
value: z.string(),
|
|
131
|
+
name: z.string(),
|
|
132
|
+
instance: z.string().optional(),
|
|
133
|
+
componentName: z.string().optional(),
|
|
134
|
+
evseId: z.number().int().optional()
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/sync-certificates
|
|
138
|
+
export const chargePointGetInstalledCertificateIdsBody = z.object({
|
|
139
|
+
certificateType: z.enum(["V2GRootCertificate", "MORootCertificate", "CSMSRootCertificate", "V2GCertificateChain", "ManufacturerRootCertificate"]).optional()
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// POST /public-api/actions/charge-point/v2.0/{chargePoint}/update-firmware
|
|
143
|
+
export const chargePointUpdateFirmwareBody = z.object({
|
|
144
|
+
url: z.string().optional(),
|
|
145
|
+
firmwareVersionId: z.number().int().optional(),
|
|
146
|
+
retrieveAfter: z.string().datetime().optional(),
|
|
147
|
+
retries: z.number().int().min(0).max(10).optional(),
|
|
148
|
+
interval: z.number().int().min(0).max(3600).optional(),
|
|
149
|
+
signed: z.boolean(),
|
|
150
|
+
signingCertificate: z.string().optional(),
|
|
151
|
+
signature: z.string().optional(),
|
|
152
|
+
downloadUrlProtocol: z.enum(["http", "https"]).optional()
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// POST /public-api/actions/circuit/v2.0/{circuit}/attach-charge-point
|
|
156
|
+
export const circuitAttachChargePointBody = z.object({
|
|
157
|
+
chargePointId: z.number().int(),
|
|
158
|
+
priority: z.number().min(0).optional()
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// POST /public-api/actions/circuit/v2.0/{circuit}/detach-charge-point/{chargePoint}
|
|
162
|
+
|
|
163
|
+
// POST /public-api/actions/circuit/v2.0/{circuit}/set-charge-point-priority/{chargePoint}
|
|
164
|
+
export const circuitSetChargePointPriorityBody = z.unknown();
|
|
165
|
+
|
|
166
|
+
// POST /public-api/actions/circuit/v2.0/{circuit}/set-charge-point-priority/{chargePoint}/evse/{evse}
|
|
167
|
+
export const circuitSetChargePointEvsePriorityBody = z.unknown();
|
|
168
|
+
|
|
169
|
+
// POST /public-api/actions/circuit/v2.0/{circuit}/set-circuit-soc-priorities
|
|
170
|
+
export const circuitSetCircuitSocPriorityBody = z.object({
|
|
171
|
+
upperThresholdPercent: z.number().min(5).max(95).optional(),
|
|
172
|
+
highSoCPriority: z.unknown().optional(),
|
|
173
|
+
lowerThresholdPercent: z.number().min(5).max(95).optional(),
|
|
174
|
+
lowSoCPriority: z.number().min(0).optional()
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// POST /public-api/actions/circuit/v2.0/{circuit}/set-session-priority/{session}
|
|
178
|
+
export const circuitSetSessionPriorityBody = z.object({
|
|
179
|
+
priority: z.number().min(0)
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// POST /public-api/actions/configuration-template/v1.0/{template}/apply-to-charge-points
|
|
183
|
+
export const configurationTemplateApplyToChargePointsBody = z.object({
|
|
184
|
+
chargePointIds: z.array(z.number().int()).optional(),
|
|
185
|
+
shouldPersist: z.boolean().optional()
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// 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()]));
|
|
193
|
+
|
|
194
|
+
// POST /public-api/actions/electricity-meter/v1.0/{electricityMeter}/report-consumption
|
|
195
|
+
export const electricityMeterReportConsumptionBody = z.object({
|
|
196
|
+
timestamp: z.string().datetime().optional(),
|
|
197
|
+
currentL1: z.number().int().optional(),
|
|
198
|
+
currentL2: z.number().int().optional(),
|
|
199
|
+
currentL3: z.number().int().optional()
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// POST /public-api/actions/evse/v1.0/{evse}/start
|
|
203
|
+
export const evseStartChargingWithEvseIdBody = z.object({
|
|
204
|
+
chargingProfile: z.unknown().optional()
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// POST /public-api/actions/evse/v1.0/{evse}/trigger-message
|
|
208
|
+
export const evseTriggerMessageBody = z.object({
|
|
209
|
+
type: z.enum(["BootNotification", "DiagnosticsStatusNotification", "LogStatusNotification", "FirmwareStatusNotification", "PublishFirmwareStatusNotification", "Heartbeat", "MeterValues", "StatusNotification", "SignV2GCertificate", "SignChargingStationCertificate", "SignCombinedCertificate", "TransactionEvent"])
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// POST /public-api/actions/flexibility-asset/v1.0/{flexibilityAsset}/change-status
|
|
213
|
+
export const changeFlexibilityAssetStatusPathParams = z.object({
|
|
214
|
+
flexibilityAsset: z.string()
|
|
215
|
+
});
|
|
216
|
+
export const changeFlexibilityAssetStatusBody = z.object({
|
|
217
|
+
status: z.enum(["enabled", "disabled"]),
|
|
218
|
+
endsAt: z.string().datetime().optional()
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// POST /public-api/actions/flexibility-asset/v1.0/{flexibilityAsset}/create-activation-request
|
|
222
|
+
export const flexibilityAssetCreateActivationRequestPathParams = z.object({
|
|
223
|
+
flexibilityAsset: z.string()
|
|
224
|
+
});
|
|
225
|
+
export const flexibilityAssetCreateActivationRequestBody = z.object({
|
|
226
|
+
periods: z.array(z.object({
|
|
227
|
+
startTime: z.string().datetime(),
|
|
228
|
+
endTime: z.string().datetime(),
|
|
229
|
+
energy: z.number().int().optional(),
|
|
230
|
+
maxPower: z.number().int().optional()
|
|
231
|
+
})).optional()
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
// POST /public-api/actions/id-tag/v1.0/{idTag}/reissue-emaid
|
|
235
|
+
|
|
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
|
+
// POST /public-api/actions/locations/v2.0/{location}/check-booking-availability
|
|
250
|
+
export const locationCheckBookingAvailabilityBody = z.object({
|
|
251
|
+
startAfter: z.string().datetime(),
|
|
252
|
+
endBefore: z.string().datetime()
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
// POST /public-api/actions/notifications/v1.0/{notification}/resend
|
|
256
|
+
export const notificationsResendFailedBody = z.object({
|
|
257
|
+
notifications: z.array(z.unknown()),
|
|
258
|
+
startTime: z.string().optional(),
|
|
259
|
+
endTime: z.string().optional()
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// POST /public-api/actions/parking-spaces/v1.0/{parkingSpace}/update-occupancy-status
|
|
263
|
+
export const parkingSpaceUpdateOccupancyStatusBody = z.object({
|
|
264
|
+
status: z.enum(["available", "occupied"])
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// POST /public-api/actions/provisioning-certificate/v1.0/{provisioningCertificate}/issue-emaid
|
|
268
|
+
export const certificateIssueAnEmaidBody = z.object({
|
|
269
|
+
paymentMethod: z.string().optional()
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// POST /public-api/actions/reservation/v1.0/{reservation}/cancel
|
|
273
|
+
export const reservationCancelBody = z.object({
|
|
274
|
+
force: z.boolean().optional(),
|
|
275
|
+
reason: z.string().optional()
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
// POST /public-api/actions/roaming-operator/v2.0/{roamingOperator}/custom-tariff-filter/{customTariffFilter}/set-pricing-data
|
|
279
|
+
export const updateCustomTariffFilterTariffBody = z.object({
|
|
280
|
+
country_code: z.string().min(2).max(2).optional(),
|
|
281
|
+
party_id: z.string().min(3).max(3).optional(),
|
|
282
|
+
id: z.string().max(36),
|
|
283
|
+
currency: z.string().min(3).max(3),
|
|
284
|
+
type: z.enum(["AD_HOC_PAYMENT", "PROFILE_CHEAP", "PROFILE_FAST", "PROFILE_GREEN", "REGULAR"]).optional(),
|
|
285
|
+
tariff_alt_text: z.array(z.object({
|
|
286
|
+
language: z.string().min(2).max(2),
|
|
287
|
+
text: z.string().max(512)
|
|
288
|
+
})).optional(),
|
|
289
|
+
tariff_alt_url: z.string().url().max(255).optional(),
|
|
290
|
+
min_price: z.object({
|
|
291
|
+
excl_vat: z.number().min(0).optional(),
|
|
292
|
+
incl_vat: z.number().min(0).optional()
|
|
293
|
+
}).optional(),
|
|
294
|
+
max_price: z.unknown().optional(),
|
|
295
|
+
elements: z.array(z.object({
|
|
296
|
+
price_components: z.array(z.object({
|
|
297
|
+
type: z.enum(["ENERGY", "FLAT", "PARKING_TIME", "TIME"]),
|
|
298
|
+
price: z.number().min(0),
|
|
299
|
+
vat: z.number().min(0).max(100).optional(),
|
|
300
|
+
step_size: z.number().int().min(1)
|
|
301
|
+
})).min(1),
|
|
302
|
+
restrictions: z.object({
|
|
303
|
+
start_time: z.string().regex(new RegExp("^([01]?[0-9]|2[0-3]):[0-5][0-9]$")).optional(),
|
|
304
|
+
end_time: z.string().regex(new RegExp("^([01]?[0-9]|2[0-3]):[0-5][0-9]$")).optional(),
|
|
305
|
+
start_date: z.string().optional(),
|
|
306
|
+
end_date: z.string().optional(),
|
|
307
|
+
min_kwh: z.number().min(0).optional(),
|
|
308
|
+
max_kwh: z.number().min(0).optional(),
|
|
309
|
+
min_current: z.number().min(0).optional(),
|
|
310
|
+
max_current: z.number().min(0).optional(),
|
|
311
|
+
min_power: z.number().min(0).optional(),
|
|
312
|
+
max_power: z.number().min(0).optional(),
|
|
313
|
+
min_duration: z.number().int().min(0).optional(),
|
|
314
|
+
max_duration: z.number().int().min(0).optional(),
|
|
315
|
+
day_of_week: z.array(z.enum(["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"])).optional(),
|
|
316
|
+
reservation: z.enum(["RESERVATION", "RESERVATION_EXPIRES"]).optional()
|
|
317
|
+
}).optional()
|
|
318
|
+
})).min(1),
|
|
319
|
+
start_date_time: z.string().datetime().optional(),
|
|
320
|
+
end_date_time: z.string().datetime().optional(),
|
|
321
|
+
energy_mix: z.object({
|
|
322
|
+
is_green_energy: z.boolean().optional(),
|
|
323
|
+
energy_sources: z.array(z.object({
|
|
324
|
+
source: z.enum(["NUCLEAR", "GENERAL_FOSSIL", "COAL", "GAS", "GENERAL_GREEN", "SOLAR", "WIND", "WATER"]),
|
|
325
|
+
percentage: z.number().min(0).max(100)
|
|
326
|
+
})).optional(),
|
|
327
|
+
environ_impact: z.array(z.object({
|
|
328
|
+
category: z.enum(["NUCLEAR_WASTE", "CARBON_DIOXIDE"]),
|
|
329
|
+
amount: z.number().min(0)
|
|
330
|
+
})).optional(),
|
|
331
|
+
supplier_name: z.string().max(64).optional(),
|
|
332
|
+
energy_product_name: z.string().max(64).optional()
|
|
333
|
+
}).optional(),
|
|
334
|
+
last_updated: z.string().datetime()
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
// POST /public-api/actions/session/v1.0/{session}/assign-user
|
|
338
|
+
export const sessionAssignToUserBody = z.object({
|
|
339
|
+
userId: z.number().int()
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
// POST /public-api/actions/session/v1.0/{session}/retry-payment
|
|
343
|
+
export const sessionRetryPaymentBody = z.object({
|
|
344
|
+
paymentMethodId: z.number().int().optional()
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// POST /public-api/actions/subscription-plans/v1.0/{subscriptionPlan}/replace
|
|
348
|
+
export const subscriptionPlanReplaceBody = z.object({
|
|
349
|
+
planId: z.number().int(),
|
|
350
|
+
replaceAt: z.string().datetime().optional(),
|
|
351
|
+
reason: z.string()
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
// POST /public-api/actions/tariffs/v2.0/{tariff}/set-tariff-display-information
|
|
355
|
+
export const tariffSetDisplayInformationBody = z.object({
|
|
356
|
+
defaultPriceInformation: z.string().max(150).optional(),
|
|
357
|
+
defaultPriceInformationOffline: z.string().max(150).optional(),
|
|
358
|
+
priceInformation: z.string().optional(),
|
|
359
|
+
totalCostInformation: z.string().optional()
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
// POST /public-api/actions/transactions/v1.0/{transaction}/issue-invoice
|
|
363
|
+
export const transactionIssueInvoiceBody = z.object({
|
|
364
|
+
email: z.string(),
|
|
365
|
+
invoiceDetails: z.object({
|
|
366
|
+
invoiceType: z.enum(["individual", "company"]),
|
|
367
|
+
individualName: z.string().optional(),
|
|
368
|
+
individualPersonalId: z.string().optional(),
|
|
369
|
+
individualTaxId: z.string().optional(),
|
|
370
|
+
companyName: z.string().optional(),
|
|
371
|
+
companyRegNo: z.string().optional(),
|
|
372
|
+
companyTaxId: z.string().optional(),
|
|
373
|
+
companyTaxAdministrationOfficeName: z.string().optional(),
|
|
374
|
+
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(),
|
|
375
|
+
city: z.string().optional(),
|
|
376
|
+
postCode: z.string().optional(),
|
|
377
|
+
address: z.string().optional()
|
|
378
|
+
})
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
// POST /public-api/actions/transactions/v1.0/{transaction}/resend-invoice
|
|
382
|
+
|
|
383
|
+
// POST /public-api/actions/transactions/v1.0/{transaction}/update-payment-reference
|
|
384
|
+
export const transactionUpdatePaymentReferenceBody = z.object({
|
|
385
|
+
ref: z.string()
|
|
386
|
+
}).strict();
|
|
387
|
+
|
|
388
|
+
// POST /public-api/actions/users/v1.0/{user}/activate-subscription
|
|
389
|
+
export const userActivateSubscriptionBody = z.object({
|
|
390
|
+
planId: z.number().int(),
|
|
391
|
+
endDate: z.string().optional(),
|
|
392
|
+
autoRenewal: z.boolean().optional(),
|
|
393
|
+
reason: z.string().optional()
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// POST /public-api/actions/users/v1.0/{user}/add-balance
|
|
397
|
+
export const userAddBalanceBody = z.object({
|
|
398
|
+
amount: z.number(),
|
|
399
|
+
reason: z.string(),
|
|
400
|
+
app_info: z.string().max(2000).optional()
|
|
401
|
+
}).strict();
|
|
402
|
+
|
|
403
|
+
// POST /public-api/actions/users/v1.0/{user}/apply-custom-fee
|
|
404
|
+
export const userApplyCustomFeeBody = z.object({
|
|
405
|
+
amount: z.number(),
|
|
406
|
+
description: z.string(),
|
|
407
|
+
paymentMethodId: z.string().optional()
|
|
408
|
+
}).strict();
|
|
409
|
+
|
|
410
|
+
// POST /public-api/actions/users/v1.0/{user}/cancel-subscription
|
|
411
|
+
export const userCancelSubscriptionBody = z.object({
|
|
412
|
+
reason: z.string()
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
// POST /public-api/actions/users/v1.0/{user}/change-status
|
|
416
|
+
export const userChangeStatusBody = z.object({
|
|
417
|
+
status: z.enum(["enabled", "disabled"]),
|
|
418
|
+
reason: z.string()
|
|
419
|
+
}).strict();
|
|
420
|
+
|
|
421
|
+
// POST /public-api/actions/users/v1.0/{user}/clear-subscription-amount-due
|
|
422
|
+
|
|
423
|
+
// GET /public-api/actions/users/v2.0/{user}/export-all-private-data
|
|
424
|
+
|
|
425
|
+
// POST /public-api/actions/users/v2.0/{user}/redeem-voucher
|
|
426
|
+
export const userRedeemVoucherBody = z.object({
|
|
427
|
+
code: z.string()
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
// GET /public-api/notifications/v1.0
|
|
431
|
+
|
|
432
|
+
// POST /public-api/notifications/v1.0
|
|
433
|
+
export const notificationsSubscribeDeprecatedBody = z.object({
|
|
434
|
+
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"])),
|
|
435
|
+
callbackUrl: z.string().url().max(500)
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
// GET /public-api/notifications/v1.0/{notification}
|
|
439
|
+
|
|
440
|
+
// PUT /public-api/notifications/v1.0/{notification}
|
|
441
|
+
export const notificationsUpdateDeprecatedBody = z.object({
|
|
442
|
+
notifications: z.array(z.unknown()),
|
|
443
|
+
callbackUrl: z.string().url().max(500)
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// DELETE /public-api/notifications/v1.0/{notification}
|
|
447
|
+
|
|
448
|
+
// GET /public-api/notifications/v2.0
|
|
449
|
+
|
|
450
|
+
// POST /public-api/notifications/v2.0
|
|
451
|
+
export const notificationsSubscribeBody = z.object({
|
|
452
|
+
id: z.number(),
|
|
453
|
+
via: z.enum(["webhook", "kafka"]),
|
|
454
|
+
notifications: z.array(z.unknown()),
|
|
455
|
+
webhook: z.object({
|
|
456
|
+
callbackUrl: z.string().url().max(500)
|
|
457
|
+
}).optional(),
|
|
458
|
+
kafka: z.object({
|
|
459
|
+
topic: z.string(),
|
|
460
|
+
brokers: z.array(z.string()),
|
|
461
|
+
compressionCodec: z.enum(["none", "gzip", "snappy", "lz4"]).optional(),
|
|
462
|
+
securityProtocol: z.enum(["PLAINTEXT", "SASL_SSL"]).optional(),
|
|
463
|
+
saslMechanism: z.enum(["PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512"]).optional(),
|
|
464
|
+
saslUsername: z.string().optional(),
|
|
465
|
+
saslPassword: z.string().optional()
|
|
466
|
+
}).optional()
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
// GET /public-api/notifications/v2.0/{notification}
|
|
470
|
+
|
|
471
|
+
// PUT /public-api/notifications/v2.0/{notification}
|
|
472
|
+
export const notificationsCreateBody = z.unknown();
|
|
473
|
+
|
|
474
|
+
// DELETE /public-api/notifications/v2.0/{notification}
|
|
475
|
+
|
|
476
|
+
// GET /public-api/resources/authorizations/v1.0/{authorization}
|
|
477
|
+
export const authorizationReadDeprecatedPathParams = z.object({
|
|
478
|
+
authorization: z.string()
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
// GET /public-api/resources/authorizations/v2.0
|
|
482
|
+
|
|
483
|
+
// GET /public-api/resources/authorizations/v2.0/{authorization}
|
|
484
|
+
export const authorizationReadPathParams = z.object({
|
|
485
|
+
authorization: z.string()
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
// GET /public-api/resources/booking-requests/v1.0
|
|
489
|
+
|
|
490
|
+
// POST /public-api/resources/booking-requests/v1.0
|
|
491
|
+
export const bookingRequestCreateBody = z.union([z.object({
|
|
492
|
+
id: z.number().int().optional(),
|
|
493
|
+
type: z.enum(["create"]),
|
|
494
|
+
status: z.enum(["pending", "approved", "rejected"]).optional(),
|
|
495
|
+
rejectionReason: z.string().optional(),
|
|
496
|
+
createdAt: z.string().datetime().optional(),
|
|
497
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
498
|
+
userId: z.number().int(),
|
|
499
|
+
locationId: z.number().int(),
|
|
500
|
+
evseId: z.number().int().optional(),
|
|
501
|
+
evseCriteria: z.object({
|
|
502
|
+
currentType: z.unknown().optional(),
|
|
503
|
+
minPower: z.number().optional(),
|
|
504
|
+
maxPower: z.number().optional(),
|
|
505
|
+
connectorType: z.unknown().optional()
|
|
506
|
+
}).optional(),
|
|
507
|
+
startAt: z.string().datetime(),
|
|
508
|
+
endAt: z.string().datetime()
|
|
509
|
+
}), z.object({
|
|
510
|
+
type: z.enum(["update"]),
|
|
511
|
+
bookingId: z.number().int(),
|
|
512
|
+
userId: z.number().int().optional(),
|
|
513
|
+
startAt: z.string().datetime().optional(),
|
|
514
|
+
endAt: z.string().datetime().optional()
|
|
515
|
+
}), z.object({
|
|
516
|
+
type: z.enum(["cancel"]),
|
|
517
|
+
bookingId: z.number().int()
|
|
518
|
+
})]);
|
|
519
|
+
|
|
520
|
+
// GET /public-api/resources/booking-requests/v1.0/{bookingRequest}
|
|
521
|
+
|
|
522
|
+
// GET /public-api/resources/bookings/v1.0
|
|
523
|
+
|
|
524
|
+
// GET /public-api/resources/bookings/v1.0/{booking}
|
|
525
|
+
|
|
526
|
+
// 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
|
+
|
|
533
|
+
// GET /public-api/resources/cdrs/v2.0/{cdr}
|
|
534
|
+
export const cdrReadPathParams = z.object({
|
|
535
|
+
cdr: z.number().int()
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
// 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
|
+
|
|
546
|
+
// POST /public-api/resources/charge-point-downtime-periods/v1.0
|
|
547
|
+
export const chargePointDowntimePeriodCreateBody = z.object({
|
|
548
|
+
$ref: z.unknown().optional(),
|
|
549
|
+
chargePointId: z.number().int()
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
// GET /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
|
|
553
|
+
|
|
554
|
+
// DELETE /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
|
|
555
|
+
|
|
556
|
+
// PATCH /public-api/resources/charge-point-downtime-periods/v1.0/{chargePointDowntimePeriod}
|
|
557
|
+
export const chargePointDowntimePeriodUpdateBody = z.unknown();
|
|
558
|
+
|
|
559
|
+
// GET /public-api/resources/charge-point-models/v1.0
|
|
560
|
+
export const chargePointModelsListingQueryParams = z.object({
|
|
561
|
+
filter: z.unknown().optional()
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
// POST /public-api/resources/charge-point-models/v1.0
|
|
565
|
+
export const chargePointModelCreateBody = z.unknown();
|
|
566
|
+
|
|
567
|
+
// GET /public-api/resources/charge-point-models/v1.0/{modelId}
|
|
568
|
+
|
|
569
|
+
// DELETE /public-api/resources/charge-point-models/v1.0/{modelId}
|
|
570
|
+
|
|
571
|
+
// PATCH /public-api/resources/charge-point-models/v1.0/{modelId}
|
|
572
|
+
export const chargePointModelUpdateBody = z.unknown();
|
|
573
|
+
|
|
574
|
+
// GET /public-api/resources/charge-point-vendors/v1.0
|
|
575
|
+
|
|
576
|
+
// POST /public-api/resources/charge-point-vendors/v1.0
|
|
577
|
+
export const chargePointVendorCreateBody = z.unknown();
|
|
578
|
+
|
|
579
|
+
// GET /public-api/resources/charge-point-vendors/v1.0/{vendorId}
|
|
580
|
+
|
|
581
|
+
// DELETE /public-api/resources/charge-point-vendors/v1.0/{vendorId}
|
|
582
|
+
|
|
583
|
+
// PATCH /public-api/resources/charge-point-vendors/v1.0/{vendorId}
|
|
584
|
+
export const chargePointVendorUpdateBody = z.unknown();
|
|
585
|
+
|
|
586
|
+
// GET /public-api/resources/charge-points/v1.0
|
|
587
|
+
|
|
588
|
+
// POST /public-api/resources/charge-points/v1.0
|
|
589
|
+
export const chargePointCreateDeprecatedBody = z.object({
|
|
590
|
+
templateId: z.number().int(),
|
|
591
|
+
evses: z.record(z.object({
|
|
592
|
+
tariffGroupId: z.number().int().optional(),
|
|
593
|
+
physicalReference: z.string().optional(),
|
|
594
|
+
maxAmperage: z.number().optional(),
|
|
595
|
+
status: z.enum(["active", "disabled", "out of order"]).optional()
|
|
596
|
+
})).optional(),
|
|
597
|
+
externalId: z.string().optional()
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
// GET /public-api/resources/charge-points/v1.0/{chargePoint}
|
|
601
|
+
|
|
602
|
+
// DELETE /public-api/resources/charge-points/v1.0/{chargePoint}
|
|
603
|
+
|
|
604
|
+
// PATCH /public-api/resources/charge-points/v1.0/{chargePoint}
|
|
605
|
+
export const chargePointUpdateDeprecatedBody = z.object({
|
|
606
|
+
evses: z.unknown().optional(),
|
|
607
|
+
externalId: z.string().optional()
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
// GET /public-api/resources/charge-points/v1.0/{chargePoint}/configurations
|
|
611
|
+
|
|
612
|
+
// GET /public-api/resources/charge-points/v1.0/{chargePoint}/configurations/{key}
|
|
613
|
+
|
|
614
|
+
// PATCH /public-api/resources/charge-points/v1.0/{chargePoint}/configurations/{key}
|
|
615
|
+
export const chargePointConfigurationUpdateDeprecatedBody = z.object({
|
|
616
|
+
value: z.string().optional()
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
// GET /public-api/resources/charge-points/v1.0/{chargePoint}/status
|
|
620
|
+
|
|
621
|
+
// 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
|
+
|
|
649
|
+
// POST /public-api/resources/charge-points/v2.0
|
|
650
|
+
export const chargePointCreateBody = z.object({
|
|
651
|
+
id: z.number().int().optional(),
|
|
652
|
+
name: z.string().max(255),
|
|
653
|
+
type: z.enum(["private", "public", "personal"]),
|
|
654
|
+
pin: z.string().max(4).optional(),
|
|
655
|
+
locationId: z.number().int().optional(),
|
|
656
|
+
chargingZoneId: z.number().int().optional(),
|
|
657
|
+
electricityRateId: z.number().int().optional(),
|
|
658
|
+
subscription: z.object({
|
|
659
|
+
required: z.boolean().optional(),
|
|
660
|
+
planIds: z.array(z.number().int()).optional()
|
|
661
|
+
}).optional(),
|
|
662
|
+
networkType: z.enum(["cellular", "ethernet", "wlan"]).optional(),
|
|
663
|
+
status: z.enum(["enabled", "disabled", "out of order", "demo"]),
|
|
664
|
+
managedByOperator: z.boolean().optional(),
|
|
665
|
+
externalId: z.string().optional(),
|
|
666
|
+
network: z.object({
|
|
667
|
+
id: z.string().optional(),
|
|
668
|
+
protocol: z.enum(["ocpp 1.5", "ocpp 1.6", "ocpp 1.6 soap", "ocpp 2.0.1"]).optional(),
|
|
669
|
+
password: z.string().optional(),
|
|
670
|
+
ip: z.string().optional(),
|
|
671
|
+
port: z.number().int().optional()
|
|
672
|
+
}).optional(),
|
|
673
|
+
capabilities: z.array(z.enum(["remote_start_stop_capable", "meter_values", "stop_transaction_on_ev_disconnect", "disregard_the_heartbeats", "display_messages"])).optional(),
|
|
674
|
+
autoStartWithoutAuthorization: z.boolean().optional(),
|
|
675
|
+
disableAutoStartEmulation: z.boolean().optional(),
|
|
676
|
+
security: z.object({
|
|
677
|
+
desiredProfile: z.number().int().optional(),
|
|
678
|
+
currentProfile: z.number().int(),
|
|
679
|
+
hardwareEnabledProfile: z.number().int().optional(),
|
|
680
|
+
desiredProfileStatus: z.enum(["applied", "pending", "rejected"]).optional()
|
|
681
|
+
}).optional(),
|
|
682
|
+
modelId: z.number().int().optional(),
|
|
683
|
+
enableAutoFaultRecovery: z.boolean().optional(),
|
|
684
|
+
user: z.unknown().optional(),
|
|
685
|
+
partner: z.object({
|
|
686
|
+
id: z.number().int().optional(),
|
|
687
|
+
contractId: z.number().int().optional(),
|
|
688
|
+
contactId: z.number().int().optional(),
|
|
689
|
+
corporateBillingAsDefault: z.boolean().optional(),
|
|
690
|
+
accessType: z.enum(["private_view_private_use", "private_view_public_use", "public_view_private_use"]).optional(),
|
|
691
|
+
notice: z.unknown().optional()
|
|
692
|
+
}).optional(),
|
|
693
|
+
utilityId: z.number().int().optional(),
|
|
694
|
+
createdAt: z.string().datetime().optional(),
|
|
695
|
+
firstContactAt: z.string().optional(),
|
|
696
|
+
roamingOperatorId: z.number().int().optional(),
|
|
697
|
+
chargingProfile: z.unknown().optional(),
|
|
698
|
+
displayTariffAndCosts: z.boolean().optional(),
|
|
699
|
+
lastBootNotification: z.object({
|
|
700
|
+
model: z.string().optional(),
|
|
701
|
+
vendor: z.string().optional(),
|
|
702
|
+
chargeBoxSerialNumber: z.string().optional(),
|
|
703
|
+
chargePointSerialNumber: z.string().optional(),
|
|
704
|
+
firmwareVersion: z.string().optional(),
|
|
705
|
+
iccid: z.string().optional(),
|
|
706
|
+
imsi: z.string().optional(),
|
|
707
|
+
meterSerialNumber: z.string().optional(),
|
|
708
|
+
meterType: z.string().optional()
|
|
709
|
+
}).optional(),
|
|
710
|
+
networkStatus: z.enum(["never_connected", "available", "temporarily_unavailable", "long-term_unavailable"]).optional(),
|
|
711
|
+
hardwareStatus: z.enum(["available", "unavailable", "faulted"]).optional(),
|
|
712
|
+
vendorErrorCode: z.string().optional(),
|
|
713
|
+
tags: z.unknown().optional(),
|
|
714
|
+
sharingCode: z.string().optional(),
|
|
715
|
+
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(),
|
|
721
|
+
ocppConnectedChargePointId: z.number().int().optional(),
|
|
722
|
+
communicationMode: z.enum(["none", "direct_ocpp", "via_ocpp_connected_charge_point"]).optional()
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}
|
|
726
|
+
|
|
727
|
+
// DELETE /public-api/resources/charge-points/v2.0/{chargePoint}
|
|
728
|
+
|
|
729
|
+
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}
|
|
730
|
+
export const chargePointUpdateBody = z.object({
|
|
731
|
+
id: z.number().int().optional(),
|
|
732
|
+
name: z.string().max(255).optional(),
|
|
733
|
+
type: z.enum(["private", "public", "personal"]).optional(),
|
|
734
|
+
pin: z.string().max(4).optional(),
|
|
735
|
+
locationId: z.number().int().optional(),
|
|
736
|
+
chargingZoneId: z.number().int().optional(),
|
|
737
|
+
electricityRateId: z.number().int().optional(),
|
|
738
|
+
subscription: z.object({
|
|
739
|
+
required: z.boolean().optional(),
|
|
740
|
+
planIds: z.array(z.number().int()).optional()
|
|
741
|
+
}).optional(),
|
|
742
|
+
networkType: z.enum(["cellular", "ethernet", "wlan"]).optional(),
|
|
743
|
+
status: z.enum(["enabled", "disabled", "out of order", "demo"]).optional(),
|
|
744
|
+
managedByOperator: z.boolean().optional(),
|
|
745
|
+
externalId: z.string().optional(),
|
|
746
|
+
network: z.object({
|
|
747
|
+
id: z.string().optional(),
|
|
748
|
+
protocol: z.enum(["ocpp 1.5", "ocpp 1.6", "ocpp 1.6 soap", "ocpp 2.0.1"]).optional(),
|
|
749
|
+
password: z.string().optional(),
|
|
750
|
+
ip: z.string().optional(),
|
|
751
|
+
port: z.number().int().optional()
|
|
752
|
+
}).optional(),
|
|
753
|
+
capabilities: z.array(z.enum(["remote_start_stop_capable", "meter_values", "stop_transaction_on_ev_disconnect", "disregard_the_heartbeats", "display_messages"])).optional(),
|
|
754
|
+
autoStartWithoutAuthorization: z.boolean().optional(),
|
|
755
|
+
disableAutoStartEmulation: z.boolean().optional(),
|
|
756
|
+
security: z.object({
|
|
757
|
+
desiredProfile: z.number().int().optional(),
|
|
758
|
+
currentProfile: z.number().int().optional(),
|
|
759
|
+
hardwareEnabledProfile: z.number().int().optional(),
|
|
760
|
+
desiredProfileStatus: z.enum(["applied", "pending", "rejected"]).optional()
|
|
761
|
+
}).optional(),
|
|
762
|
+
modelId: z.number().int().optional(),
|
|
763
|
+
enableAutoFaultRecovery: z.boolean().optional(),
|
|
764
|
+
user: z.object({
|
|
765
|
+
id: z.number().int().optional(),
|
|
766
|
+
automaticFirmwareUpdatesEnabled: z.boolean().optional()
|
|
767
|
+
}).optional(),
|
|
768
|
+
partner: z.object({
|
|
769
|
+
id: z.number().int().optional(),
|
|
770
|
+
contractId: z.number().int().optional(),
|
|
771
|
+
contactId: z.number().int().optional(),
|
|
772
|
+
corporateBillingAsDefault: z.boolean().optional(),
|
|
773
|
+
accessType: z.enum(["private_view_private_use", "private_view_public_use", "public_view_private_use"]).optional(),
|
|
774
|
+
notice: z.unknown().optional()
|
|
775
|
+
}).optional(),
|
|
776
|
+
utilityId: z.number().int().optional(),
|
|
777
|
+
tags: z.array(z.string()).optional(),
|
|
778
|
+
enabledRandomisedDelay: z.boolean().optional(),
|
|
779
|
+
noticeId: z.number().int().optional(),
|
|
780
|
+
usesRenewableEnergy: z.boolean().optional(),
|
|
781
|
+
integratedAt: z.string().datetime().optional(),
|
|
782
|
+
manufacturedAt: z.string().datetime().optional()
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/available-personal-smart-charging-modes
|
|
786
|
+
|
|
787
|
+
// 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
|
+
|
|
797
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/configurations/{key}
|
|
798
|
+
|
|
799
|
+
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/configurations/{key}
|
|
800
|
+
export const chargePointConfigurationUpdateBody = z.object({
|
|
801
|
+
value: z.string().optional()
|
|
802
|
+
});
|
|
803
|
+
|
|
804
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/evses
|
|
805
|
+
|
|
806
|
+
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/evses
|
|
807
|
+
export const chargePointEvseCreateBody = z.object({
|
|
808
|
+
physicalReference: z.string(),
|
|
809
|
+
currentType: z.unknown(),
|
|
810
|
+
label: z.string().optional(),
|
|
811
|
+
networkId: z.string(),
|
|
812
|
+
status: z.enum(["enabled", "disabled", "out of order"]),
|
|
813
|
+
midMeterCertificationEndYear: z.number().int().optional(),
|
|
814
|
+
tariffGroupId: z.number().int().optional(),
|
|
815
|
+
allowsReservation: z.boolean().optional(),
|
|
816
|
+
bookingEnabled: z.boolean().optional(),
|
|
817
|
+
powerOptions: z.unknown().optional(),
|
|
818
|
+
externalId: z.string().optional()
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}
|
|
822
|
+
|
|
823
|
+
// DELETE /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}
|
|
824
|
+
|
|
825
|
+
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}
|
|
826
|
+
export const chargePointEvseUpdateBody = z.object({
|
|
827
|
+
physicalReference: z.string().optional(),
|
|
828
|
+
currentType: z.unknown().optional(),
|
|
829
|
+
label: z.string().optional(),
|
|
830
|
+
networkId: z.string().optional(),
|
|
831
|
+
status: z.enum(["enabled", "disabled", "out of order"]).optional(),
|
|
832
|
+
midMeterCertificationEndYear: z.number().int().optional(),
|
|
833
|
+
tariffGroupId: z.number().int().optional(),
|
|
834
|
+
allowsReservation: z.boolean().optional(),
|
|
835
|
+
bookingEnabled: z.boolean().optional(),
|
|
836
|
+
powerOptions: z.unknown().optional(),
|
|
837
|
+
externalId: z.string().optional()
|
|
838
|
+
});
|
|
839
|
+
|
|
840
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors
|
|
841
|
+
|
|
842
|
+
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors
|
|
843
|
+
export const chargePointEvseConnectorCreateBody = z.object({
|
|
844
|
+
type: z.unknown(),
|
|
845
|
+
format: z.enum(["socket", "cable"]).optional(),
|
|
846
|
+
status: z.enum(["enabled", "disabled"]).optional()
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors/{connector}
|
|
850
|
+
|
|
851
|
+
// DELETE /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors/{connector}
|
|
852
|
+
|
|
853
|
+
// PATCH /public-api/resources/charge-points/v2.0/{chargePoint}/evses/{evse}/connectors/{connector}
|
|
854
|
+
export const chargePointEvseConnectorUpdateBody = z.object({
|
|
855
|
+
type: z.unknown().optional(),
|
|
856
|
+
format: z.enum(["socket", "cable"]).optional(),
|
|
857
|
+
status: z.enum(["enabled", "disabled"]).optional()
|
|
858
|
+
});
|
|
859
|
+
|
|
860
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/hardware-status-logs
|
|
861
|
+
|
|
862
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/latest-hardware-status-log
|
|
863
|
+
|
|
864
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/latest-network-status-log
|
|
865
|
+
|
|
866
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/network-status-logs
|
|
867
|
+
|
|
868
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/personal-smart-charging-preferences
|
|
869
|
+
|
|
870
|
+
// 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({
|
|
872
|
+
enabled: z.boolean()
|
|
873
|
+
})]);
|
|
874
|
+
|
|
875
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/shared-partners
|
|
876
|
+
|
|
877
|
+
// PUT /public-api/resources/charge-points/v2.0/{chargePoint}/shared-partners
|
|
878
|
+
export const chargePointSharedPartnersSyncBody = z.object({
|
|
879
|
+
partnerIds: z.array(z.number().int())
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/shares
|
|
883
|
+
|
|
884
|
+
// POST /public-api/resources/charge-points/v2.0/{chargePoint}/shares
|
|
885
|
+
export const chargePointShareCreateBody = z.object({
|
|
886
|
+
userId: z.number().int()
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
// GET /public-api/resources/charge-points/v2.0/{chargePoint}/shares/{share}
|
|
890
|
+
|
|
891
|
+
// DELETE /public-api/resources/charge-points/v2.0/{chargePoint}/shares/{share}
|
|
892
|
+
|
|
893
|
+
// 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()]);
|
|
895
|
+
|
|
896
|
+
// GET /public-api/resources/circuits/v1.0
|
|
897
|
+
|
|
898
|
+
// POST /public-api/resources/circuits/v1.0
|
|
899
|
+
export const circuitCreateDeprecatedBody = z.object({
|
|
900
|
+
id: z.number().int().optional(),
|
|
901
|
+
name: z.string(),
|
|
902
|
+
phases: z.enum(["1", "3"]),
|
|
903
|
+
maxCurrent: z.number().min(0),
|
|
904
|
+
minChargePointCurrent: z.number().min(0).optional(),
|
|
905
|
+
setSessionLimitToZeroOnIdle: z.boolean().optional(),
|
|
906
|
+
chargePoints: z.array(z.object({
|
|
907
|
+
id: z.number().int(),
|
|
908
|
+
maxCurrent: z.number(),
|
|
909
|
+
phases: z.enum(["1", "3"]),
|
|
910
|
+
inputVoltage: z.enum(["110-130", "220-240", "380", "400"]),
|
|
911
|
+
phaseRotation: z.enum(["L1", "L2", "L3", "RST", "RTS", "SRT", "STR", "TRS", "TSR"])
|
|
912
|
+
})),
|
|
913
|
+
lastUpdatedAt: z.unknown().optional()
|
|
914
|
+
});
|
|
915
|
+
|
|
916
|
+
// GET /public-api/resources/circuits/v1.0/{dlmCircuit}
|
|
917
|
+
|
|
918
|
+
// DELETE /public-api/resources/circuits/v1.0/{dlmCircuit}
|
|
919
|
+
|
|
920
|
+
// PATCH /public-api/resources/circuits/v1.0/{dlmCircuit}
|
|
921
|
+
export const circuitUpdateDeprecatedBody = z.object({
|
|
922
|
+
id: z.number().int().optional(),
|
|
923
|
+
name: z.string().optional(),
|
|
924
|
+
phases: z.enum(["1", "3"]).optional(),
|
|
925
|
+
maxCurrent: z.number().min(0).optional(),
|
|
926
|
+
minChargePointCurrent: z.number().min(0).optional(),
|
|
927
|
+
setSessionLimitToZeroOnIdle: z.boolean().optional(),
|
|
928
|
+
chargePoints: z.array(z.object({
|
|
929
|
+
id: z.number().int(),
|
|
930
|
+
maxCurrent: z.number(),
|
|
931
|
+
phases: z.enum(["1", "3"]),
|
|
932
|
+
inputVoltage: z.enum(["110-130", "220-240", "380", "400"]),
|
|
933
|
+
phaseRotation: z.enum(["L1", "L2", "L3", "RST", "RTS", "SRT", "STR", "TRS", "TSR"])
|
|
934
|
+
})).optional(),
|
|
935
|
+
lastUpdatedAt: z.unknown().optional()
|
|
936
|
+
});
|
|
937
|
+
|
|
938
|
+
// GET /public-api/resources/circuits/v1.0/{dlmCircuit}/consumption
|
|
939
|
+
export const circuitConsumptionAllPhasesDeprecatedPathParams = z.object({
|
|
940
|
+
dlmCircuit: z.number().int()
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
// 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
|
+
|
|
949
|
+
// 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
|
+
|
|
954
|
+
// POST /public-api/resources/circuits/v2.0
|
|
955
|
+
export const circuitCreateBody = z.object({
|
|
956
|
+
id: z.number().int().optional(),
|
|
957
|
+
name: z.string(),
|
|
958
|
+
parentCircuitId: z.number().int().optional(),
|
|
959
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]),
|
|
960
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
961
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional(),
|
|
962
|
+
electricalConfiguration: z.unknown().optional(),
|
|
963
|
+
maxVoltage: z.unknown().optional(),
|
|
964
|
+
maxCurrent: z.number(),
|
|
965
|
+
minChargePointCurrent: z.number().optional(),
|
|
966
|
+
setSessionLimitToZeroOnIdle: z.boolean().optional(),
|
|
967
|
+
electricityMeterId: z.number().optional(),
|
|
968
|
+
offlineReservedCurrent: z.number().optional(),
|
|
969
|
+
loadBalancingIntegration: z.object({
|
|
970
|
+
id: z.number().int().optional(),
|
|
971
|
+
fields: z.union([z.object({
|
|
972
|
+
startDate: z.string().optional()
|
|
973
|
+
}), z.object({
|
|
974
|
+
installationId: z.string().uuid()
|
|
975
|
+
})]).optional()
|
|
976
|
+
}).optional()
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}
|
|
980
|
+
|
|
981
|
+
// DELETE /public-api/resources/circuits/v2.0/{circuit}
|
|
982
|
+
|
|
983
|
+
// PATCH /public-api/resources/circuits/v2.0/{circuit}
|
|
984
|
+
export const circuitUpdateBody = z.object({
|
|
985
|
+
id: z.number().int().optional(),
|
|
986
|
+
name: z.string().optional(),
|
|
987
|
+
parentCircuitId: z.number().int().optional(),
|
|
988
|
+
phases: z.enum(["single_phase", "three_phase", "split_phase"]).optional(),
|
|
989
|
+
phaseRotation: z.enum(["RST", "RTS", "SRT", "STR", "TRS", "TSR"]).optional(),
|
|
990
|
+
connectedPhase: z.enum(["L1", "L2", "L3", "L1_L2", "L1_L3", "L2_L3"]).optional(),
|
|
991
|
+
electricalConfiguration: z.unknown().optional(),
|
|
992
|
+
maxVoltage: z.unknown().optional(),
|
|
993
|
+
maxCurrent: z.number().optional(),
|
|
994
|
+
minChargePointCurrent: z.number().optional(),
|
|
995
|
+
setSessionLimitToZeroOnIdle: z.boolean().optional(),
|
|
996
|
+
electricityMeterId: z.number().optional(),
|
|
997
|
+
offlineReservedCurrent: z.number().optional(),
|
|
998
|
+
loadBalancingIntegration: z.object({
|
|
999
|
+
id: z.number().int().optional(),
|
|
1000
|
+
fields: z.union([z.object({
|
|
1001
|
+
startDate: z.string().optional()
|
|
1002
|
+
}), z.object({
|
|
1003
|
+
installationId: z.string().uuid()
|
|
1004
|
+
})]).optional()
|
|
1005
|
+
}).optional()
|
|
1006
|
+
});
|
|
1007
|
+
|
|
1008
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}/charge-point-priorities
|
|
1009
|
+
|
|
1010
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}/consumption
|
|
1011
|
+
export const circuitConsumptionPathParams = z.object({
|
|
1012
|
+
circuit: z.number().int()
|
|
1013
|
+
});
|
|
1014
|
+
|
|
1015
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}/soc-priorities
|
|
1016
|
+
|
|
1017
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}/unmanaged-load
|
|
1018
|
+
|
|
1019
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}/user-priorities
|
|
1020
|
+
|
|
1021
|
+
// POST /public-api/resources/circuits/v2.0/{circuit}/user-priorities
|
|
1022
|
+
export const circuitUserPriorityCreateBody = z.object({
|
|
1023
|
+
id: z.number().int().optional(),
|
|
1024
|
+
targetId: z.number().int(),
|
|
1025
|
+
type: z.enum(["partner", "userGroup"]),
|
|
1026
|
+
priority: z.number().min(0)
|
|
1027
|
+
});
|
|
1028
|
+
|
|
1029
|
+
// GET /public-api/resources/circuits/v2.0/{circuit}/user-priorities/{userPriority}
|
|
1030
|
+
|
|
1031
|
+
// DELETE /public-api/resources/circuits/v2.0/{circuit}/user-priorities/{userPriority}
|
|
1032
|
+
|
|
1033
|
+
// PATCH /public-api/resources/circuits/v2.0/{circuit}/user-priorities/{userPriority}
|
|
1034
|
+
export const circuitUserPriorityUpdateBody = z.object({
|
|
1035
|
+
id: z.number().int().optional(),
|
|
1036
|
+
targetId: z.number().int().optional(),
|
|
1037
|
+
type: z.enum(["partner", "userGroup"]).optional(),
|
|
1038
|
+
priority: z.number().min(0).optional()
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
// 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
|
+
|
|
1048
|
+
// POST /public-api/resources/configuration-templates/v1.0
|
|
1049
|
+
export const createConfigurationTemplateBody = z.object({
|
|
1050
|
+
id: z.number().int().optional(),
|
|
1051
|
+
name: z.string(),
|
|
1052
|
+
ocppVersion: z.enum(["ocpp 1.6", "ocpp 2.0.1"]),
|
|
1053
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1054
|
+
});
|
|
1055
|
+
|
|
1056
|
+
// GET /public-api/resources/configuration-templates/v1.0/{template}
|
|
1057
|
+
|
|
1058
|
+
// DELETE /public-api/resources/configuration-templates/v1.0/{template}
|
|
1059
|
+
|
|
1060
|
+
// PATCH /public-api/resources/configuration-templates/v1.0/{template}
|
|
1061
|
+
export const updateConfigurationTemplateBody = z.object({
|
|
1062
|
+
name: z.string().optional()
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
// GET /public-api/resources/configuration-templates/v1.0/{template}/variables
|
|
1066
|
+
export const configurationTemplateVariableListingPathParams = z.object({
|
|
1067
|
+
template: z.number().int()
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1070
|
+
// POST /public-api/resources/configuration-templates/v1.0/{template}/variables
|
|
1071
|
+
export const configurationTemplateVariableCreatePathParams = z.object({
|
|
1072
|
+
template: z.number().int()
|
|
1073
|
+
});
|
|
1074
|
+
export const configurationTemplateVariableCreateBody = z.union([z.object({
|
|
1075
|
+
id: z.number().int().optional(),
|
|
1076
|
+
keyName: z.string(),
|
|
1077
|
+
value: z.string(),
|
|
1078
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1079
|
+
}).strict(), z.object({
|
|
1080
|
+
id: z.number().int().optional(),
|
|
1081
|
+
value: z.string(),
|
|
1082
|
+
variableName: z.string(),
|
|
1083
|
+
variableType: z.enum(["Actual", "Target", "MinSet", "MaxSet"]).optional(),
|
|
1084
|
+
variableInstance: z.string().optional(),
|
|
1085
|
+
component: z.string(),
|
|
1086
|
+
componentInstance: z.string().optional(),
|
|
1087
|
+
evseId: z.number().int().optional(),
|
|
1088
|
+
connectorId: z.number().int().optional(),
|
|
1089
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1090
|
+
})]);
|
|
1091
|
+
|
|
1092
|
+
// DELETE /public-api/resources/configuration-templates/v1.0/{template}/variables/{variable}
|
|
1093
|
+
|
|
1094
|
+
// PATCH /public-api/resources/configuration-templates/v1.0/{template}/variables/{variable}
|
|
1095
|
+
export const configurationTemplateVariableUpdateBody = z.union([z.object({
|
|
1096
|
+
id: z.number().int().optional(),
|
|
1097
|
+
keyName: z.string().optional(),
|
|
1098
|
+
value: z.string().optional(),
|
|
1099
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1100
|
+
}).strict(), z.object({
|
|
1101
|
+
id: z.number().int().optional(),
|
|
1102
|
+
value: z.string().optional(),
|
|
1103
|
+
variableName: z.string().optional(),
|
|
1104
|
+
variableType: z.enum(["Actual", "Target", "MinSet", "MaxSet"]).optional(),
|
|
1105
|
+
variableInstance: z.string().optional(),
|
|
1106
|
+
component: z.string().optional(),
|
|
1107
|
+
componentInstance: z.string().optional(),
|
|
1108
|
+
evseId: z.number().int().optional(),
|
|
1109
|
+
connectorId: z.number().int().optional(),
|
|
1110
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1111
|
+
})]);
|
|
1112
|
+
|
|
1113
|
+
// GET /public-api/resources/contact-details/v2.0
|
|
1114
|
+
|
|
1115
|
+
// PUT /public-api/resources/contact-details/v2.0
|
|
1116
|
+
export const contactDetailsUpdateBody = z.object({
|
|
1117
|
+
email: z.string(),
|
|
1118
|
+
phone: z.string().optional(),
|
|
1119
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1120
|
+
});
|
|
1121
|
+
|
|
1122
|
+
// DELETE /public-api/resources/contact-details/v2.0
|
|
1123
|
+
|
|
1124
|
+
// 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
|
+
|
|
1131
|
+
// POST /public-api/resources/cp-models/v1.0
|
|
1132
|
+
export const chargePointModelCreateDeprecatedBody = z.object({
|
|
1133
|
+
name: z.string(),
|
|
1134
|
+
vendorId: z.number().int(),
|
|
1135
|
+
userManual: z.string().url().optional(),
|
|
1136
|
+
installerManual: z.string().url().optional()
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
// GET /public-api/resources/cp-models/v1.0/{modelId}
|
|
1140
|
+
|
|
1141
|
+
// DELETE /public-api/resources/cp-models/v1.0/{modelId}
|
|
1142
|
+
|
|
1143
|
+
// PATCH /public-api/resources/cp-models/v1.0/{modelId}
|
|
1144
|
+
export const chargePointModelUpdateDeprecatedBody = z.object({
|
|
1145
|
+
name: z.string().optional(),
|
|
1146
|
+
vendorId: z.number().int().optional(),
|
|
1147
|
+
userManual: z.string().url().optional(),
|
|
1148
|
+
installerManual: z.string().url().optional()
|
|
1149
|
+
});
|
|
1150
|
+
|
|
1151
|
+
// GET /public-api/resources/cp-vendors/v1.0
|
|
1152
|
+
|
|
1153
|
+
// POST /public-api/resources/cp-vendors/v1.0
|
|
1154
|
+
export const chargePointVendorCreateDeprecatedBody = z.object({
|
|
1155
|
+
id: z.number().int(),
|
|
1156
|
+
name: z.string()
|
|
1157
|
+
});
|
|
1158
|
+
|
|
1159
|
+
// GET /public-api/resources/cp-vendors/v1.0/{vendorId}
|
|
1160
|
+
|
|
1161
|
+
// DELETE /public-api/resources/cp-vendors/v1.0/{vendorId}
|
|
1162
|
+
|
|
1163
|
+
// PATCH /public-api/resources/cp-vendors/v1.0/{vendorId}
|
|
1164
|
+
export const chargePointVendorUpdateDeprecatedBody = z.object({
|
|
1165
|
+
name: z.string().optional()
|
|
1166
|
+
});
|
|
1167
|
+
|
|
1168
|
+
// GET /public-api/resources/currencies/v2.0
|
|
1169
|
+
|
|
1170
|
+
// POST /public-api/resources/currencies/v2.0
|
|
1171
|
+
export const currencyCreateBody = z.object({
|
|
1172
|
+
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"]),
|
|
1173
|
+
prefix: z.string().optional(),
|
|
1174
|
+
suffix: z.string().optional(),
|
|
1175
|
+
decimal: z.number().int().optional(),
|
|
1176
|
+
unitPriceAndCalculationsDecimal: z.number().int().optional(),
|
|
1177
|
+
enableUseOfMinorCurrencyUnit: z.boolean().optional(),
|
|
1178
|
+
minorUnitSign: z.string().optional()
|
|
1179
|
+
});
|
|
1180
|
+
|
|
1181
|
+
// GET /public-api/resources/currencies/v2.0/{currency}
|
|
1182
|
+
|
|
1183
|
+
// DELETE /public-api/resources/currencies/v2.0/{currency}
|
|
1184
|
+
|
|
1185
|
+
// 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()
|
|
1196
|
+
});
|
|
1197
|
+
|
|
1198
|
+
// POST /public-api/resources/currency-rates/v1.0
|
|
1199
|
+
export const createCurrencyRateBody = z.object({
|
|
1200
|
+
base: z.string(),
|
|
1201
|
+
target: z.string(),
|
|
1202
|
+
rate: z.number()
|
|
1203
|
+
});
|
|
1204
|
+
|
|
1205
|
+
// GET /public-api/resources/currency-rates/v1.0/{currencyRate}
|
|
1206
|
+
|
|
1207
|
+
// DELETE /public-api/resources/currency-rates/v1.0/{currencyRate}
|
|
1208
|
+
|
|
1209
|
+
// PATCH /public-api/resources/currency-rates/v1.0/{currencyRate}
|
|
1210
|
+
export const updateCurrencyRateBody = z.object({
|
|
1211
|
+
rate: z.number()
|
|
1212
|
+
});
|
|
1213
|
+
|
|
1214
|
+
// GET /public-api/resources/custom-fees/v2.0
|
|
1215
|
+
|
|
1216
|
+
// GET /public-api/resources/custom-fees/v2.0/{customFee}
|
|
1217
|
+
|
|
1218
|
+
// 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
|
+
|
|
1225
|
+
// POST /public-api/resources/downtime-period-notices/v1.0
|
|
1226
|
+
export const postDowntimePeriodNoticeBody = z.object({
|
|
1227
|
+
$ref: z.unknown().optional()
|
|
1228
|
+
});
|
|
1229
|
+
|
|
1230
|
+
// GET /public-api/resources/downtime-period-notices/v1.0/{notice}
|
|
1231
|
+
|
|
1232
|
+
// DELETE /public-api/resources/downtime-period-notices/v1.0/{notice}
|
|
1233
|
+
|
|
1234
|
+
// PATCH /public-api/resources/downtime-period-notices/v1.0/{notice}
|
|
1235
|
+
export const patchDowntimePeriodNoticeBody = z.object({
|
|
1236
|
+
type: z.enum(["downtime", "exempt"]).optional(),
|
|
1237
|
+
notice: z.string().optional(),
|
|
1238
|
+
description: z.string().optional()
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
// GET /public-api/resources/electricity-meters/v1.0
|
|
1242
|
+
|
|
1243
|
+
// POST /public-api/resources/electricity-meters/v1.0
|
|
1244
|
+
export const electricityMeterCreateBody = z.object({
|
|
1245
|
+
id: z.number().optional()
|
|
1246
|
+
});
|
|
1247
|
+
|
|
1248
|
+
// GET /public-api/resources/electricity-meters/v1.0/{electricityMeter}
|
|
1249
|
+
|
|
1250
|
+
// DELETE /public-api/resources/electricity-meters/v1.0/{electricityMeter}
|
|
1251
|
+
|
|
1252
|
+
// PATCH /public-api/resources/electricity-meters/v1.0/{electricityMeter}
|
|
1253
|
+
export const electricityMeterUpdateBody = z.object({
|
|
1254
|
+
name: z.string().optional(),
|
|
1255
|
+
integrationId: z.number().int().optional(),
|
|
1256
|
+
integrationParameters: z.record(z.string()).optional()
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
// GET /public-api/resources/electricity-rates/v1.0
|
|
1260
|
+
|
|
1261
|
+
// POST /public-api/resources/electricity-rates/v1.0
|
|
1262
|
+
export const electricityRateCreateDeprecatedBody = z.object({
|
|
1263
|
+
id: z.number().int().optional(),
|
|
1264
|
+
name: z.string(),
|
|
1265
|
+
utilityId: z.number().int().optional(),
|
|
1266
|
+
pricingGranularityInMinutes: z.union([z.literal(60), z.literal(30), z.literal(15)]),
|
|
1267
|
+
defaultPricePerKwh: z.number(),
|
|
1268
|
+
taxId: z.number().int().optional(),
|
|
1269
|
+
taxPercentage: z.number().min(0).max(100).optional(),
|
|
1270
|
+
intervalPricing: z.array(z.object({
|
|
1271
|
+
weekDays: z.array(z.enum(["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"])),
|
|
1272
|
+
elements: z.array(z.object({
|
|
1273
|
+
startAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1274
|
+
endAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1275
|
+
price: z.number().optional()
|
|
1276
|
+
})).optional()
|
|
1277
|
+
})).optional(),
|
|
1278
|
+
intervalSpecialPricing: z.array(z.object({
|
|
1279
|
+
specialPricingName: z.string(),
|
|
1280
|
+
validOn: z.array(z.string()),
|
|
1281
|
+
elements: z.array(z.object({
|
|
1282
|
+
startAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1283
|
+
endAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}:\\d{2}$")),
|
|
1284
|
+
price: z.number().optional()
|
|
1285
|
+
})).optional()
|
|
1286
|
+
})).optional()
|
|
1287
|
+
});
|
|
1288
|
+
|
|
1289
|
+
// GET /public-api/resources/electricity-rates/v1.0/{electricityRate}
|
|
1290
|
+
|
|
1291
|
+
// PUT /public-api/resources/electricity-rates/v1.0/{electricityRate}
|
|
1292
|
+
export const electricityRateUpdateDeprecatedBody = z.unknown();
|
|
1293
|
+
|
|
1294
|
+
// DELETE /public-api/resources/electricity-rates/v1.0/{electricityRate}
|
|
1295
|
+
|
|
1296
|
+
// 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
|
+
|
|
1304
|
+
// POST /public-api/resources/electricity-rates/v2.0
|
|
1305
|
+
export const electricityRateCreateBody = z.object({
|
|
1306
|
+
id: z.number().int().optional(),
|
|
1307
|
+
name: z.string(),
|
|
1308
|
+
utilityId: z.number().int().optional(),
|
|
1309
|
+
defaultPrice: z.number(),
|
|
1310
|
+
taxPercentage: z.number().min(0).max(100)
|
|
1311
|
+
});
|
|
1312
|
+
|
|
1313
|
+
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}
|
|
1314
|
+
|
|
1315
|
+
// DELETE /public-api/resources/electricity-rates/v2.0/{electricityRate}
|
|
1316
|
+
|
|
1317
|
+
// PATCH /public-api/resources/electricity-rates/v2.0/{electricityRate}
|
|
1318
|
+
export const electricityRateUpdateBody = z.object({
|
|
1319
|
+
id: z.number().int().optional(),
|
|
1320
|
+
name: z.string().optional(),
|
|
1321
|
+
utilityId: z.number().int().optional(),
|
|
1322
|
+
defaultPrice: z.number().optional(),
|
|
1323
|
+
taxPercentage: z.number().min(0).max(100).optional()
|
|
1324
|
+
});
|
|
1325
|
+
|
|
1326
|
+
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/energy-mix
|
|
1327
|
+
|
|
1328
|
+
// PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/energy-mix
|
|
1329
|
+
export const electricityRateEnergyMixUpdateBody = z.object({
|
|
1330
|
+
solar: z.number().min(0).max(100).optional(),
|
|
1331
|
+
wind: z.number().min(0).max(100).optional(),
|
|
1332
|
+
hydro: z.number().min(0).max(100).optional(),
|
|
1333
|
+
nuclear: z.number().min(0).max(100).optional(),
|
|
1334
|
+
coal: z.number().min(0).max(100).optional(),
|
|
1335
|
+
naturalGas: z.number().min(0).max(100).optional(),
|
|
1336
|
+
otherRenewable: z.number().min(0).max(100).optional(),
|
|
1337
|
+
otherNonRenewable: z.number().min(0).max(100).optional()
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods
|
|
1341
|
+
|
|
1342
|
+
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date
|
|
1343
|
+
|
|
1344
|
+
// 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
|
+
|
|
1349
|
+
// PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
|
|
1350
|
+
export const electricityRatePricePeriodsDateCreateOrUpdateBody = z.object({
|
|
1351
|
+
periods: z.array(z.object({
|
|
1352
|
+
startsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
1353
|
+
endsAt: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
1354
|
+
price: z.number()
|
|
1355
|
+
}))
|
|
1356
|
+
});
|
|
1357
|
+
|
|
1358
|
+
// DELETE /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/date/{date}
|
|
1359
|
+
|
|
1360
|
+
// GET /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day
|
|
1361
|
+
|
|
1362
|
+
// 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
|
+
|
|
1367
|
+
// PUT /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
|
|
1368
|
+
export const electricityRatePricePeriodsWeekDayCreateaOrUpdateBody = z.unknown();
|
|
1369
|
+
|
|
1370
|
+
// DELETE /public-api/resources/electricity-rates/v2.0/{electricityRate}/price-periods/week-day/{weekDay}
|
|
1371
|
+
|
|
1372
|
+
// 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
|
+
|
|
1389
|
+
// POST /public-api/resources/evse-downtime-periods/v1.0
|
|
1390
|
+
export const evseDowntimePeriodCreateBody = z.object({
|
|
1391
|
+
evseId: z.number().int(),
|
|
1392
|
+
noticeId: z.number().int(),
|
|
1393
|
+
startedAt: z.string().datetime(),
|
|
1394
|
+
endedAt: z.string().datetime()
|
|
1395
|
+
});
|
|
1396
|
+
|
|
1397
|
+
// GET /public-api/resources/evse-downtime-periods/v1.0/{evseDowntimePeriod}
|
|
1398
|
+
|
|
1399
|
+
// DELETE /public-api/resources/evse-downtime-periods/v1.0/{evseDowntimePeriod}
|
|
1400
|
+
|
|
1401
|
+
// PATCH /public-api/resources/evse-downtime-periods/v1.0/{evseDowntimePeriod}
|
|
1402
|
+
export const evseDowntimePeriodUpdateBody = z.object({
|
|
1403
|
+
noticeId: z.number().int().optional(),
|
|
1404
|
+
startedAt: z.string().datetime().optional(),
|
|
1405
|
+
endedAt: z.string().datetime().optional()
|
|
1406
|
+
});
|
|
1407
|
+
|
|
1408
|
+
// 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
|
+
|
|
1415
|
+
// GET /public-api/resources/evses/v2.0/{evse}
|
|
1416
|
+
|
|
1417
|
+
// PUT /public-api/resources/evses/v2.0/{evse}
|
|
1418
|
+
export const evseUpdateDeprecatedBody = z.object({
|
|
1419
|
+
id: z.number().int().optional(),
|
|
1420
|
+
chargePointId: z.number().int().optional(),
|
|
1421
|
+
chargingProfile: z.unknown().optional(),
|
|
1422
|
+
roaming: z.object({
|
|
1423
|
+
evseId: z.string().optional(),
|
|
1424
|
+
status: z.enum(["available", "blocked", "charging", "inoperative", "outoforder", "planned", "removed", "reserved", "unknown"]).optional(),
|
|
1425
|
+
tariffIds: z.array(z.string()).optional()
|
|
1426
|
+
}).optional(),
|
|
1427
|
+
connectors: z.array(z.object({
|
|
1428
|
+
id: z.number().int().optional(),
|
|
1429
|
+
type: z.intersection(z.enum(["type1", "type2", "type3", "chademo", "ccs1", "ccs2", "catarc", "schuko", "nacs", "cee16", "cee32", "j1772", "inductive", "nema-5-20", "type-e-french", "type-g-british", "type-j-swiss", "avcon", "chaoji", "nema-6-30", "nema-6-50"]), z.string()).optional(),
|
|
1430
|
+
format: z.enum(["socket", "cable"]).optional(),
|
|
1431
|
+
status: z.enum(["active", "disabled"]).optional()
|
|
1432
|
+
})).optional(),
|
|
1433
|
+
physicalReference: z.string(),
|
|
1434
|
+
type: z.enum(["ac", "dc"]),
|
|
1435
|
+
networkId: z.string(),
|
|
1436
|
+
status: z.enum(["active", "disabled", "out of order"]),
|
|
1437
|
+
tariffGroupId: z.number().int().optional(),
|
|
1438
|
+
allowsReservation: z.boolean(),
|
|
1439
|
+
maxPowerKw: z.number().optional(),
|
|
1440
|
+
maxVoltage: z.intersection(z.unknown(), z.unknown()),
|
|
1441
|
+
maxAmperage: z.number().optional(),
|
|
1442
|
+
phases: z.enum(["single_phase", "three_phase"]),
|
|
1443
|
+
phaseRotation: z.enum(["rst", "rts", "srt", "str", "trs", "tsr"]).optional(),
|
|
1444
|
+
midMeterCertificationEndYear: z.number().int().optional(),
|
|
1445
|
+
externalId: z.string().optional(),
|
|
1446
|
+
hardwareStatus: z.unknown().optional()
|
|
1447
|
+
});
|
|
1448
|
+
|
|
1449
|
+
// 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
|
+
|
|
1457
|
+
// GET /public-api/resources/evses/v2.0/{evse}/latest-hardware-status-log
|
|
1458
|
+
|
|
1459
|
+
// 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
|
+
|
|
1471
|
+
// POST /public-api/resources/evses/v2.1
|
|
1472
|
+
export const evseCreateBody = z.object({
|
|
1473
|
+
chargePointId: z.number().int()
|
|
1474
|
+
});
|
|
1475
|
+
|
|
1476
|
+
// GET /public-api/resources/evses/v2.1/{evse}
|
|
1477
|
+
|
|
1478
|
+
// DELETE /public-api/resources/evses/v2.1/{evse}
|
|
1479
|
+
|
|
1480
|
+
// PATCH /public-api/resources/evses/v2.1/{evse}
|
|
1481
|
+
export const evseUpdateBody = z.unknown();
|
|
1482
|
+
|
|
1483
|
+
// GET /public-api/resources/faqs/v2.0
|
|
1484
|
+
|
|
1485
|
+
// POST /public-api/resources/faqs/v2.0
|
|
1486
|
+
export const faqCreateBody = z.object({
|
|
1487
|
+
question: z.unknown(),
|
|
1488
|
+
answer: z.array(z.object({
|
|
1489
|
+
locale: z.string().optional(),
|
|
1490
|
+
translation: z.string().optional()
|
|
1491
|
+
}))
|
|
1492
|
+
});
|
|
1493
|
+
|
|
1494
|
+
// GET /public-api/resources/faqs/v2.0/{faq}
|
|
1495
|
+
|
|
1496
|
+
// DELETE /public-api/resources/faqs/v2.0/{faq}
|
|
1497
|
+
|
|
1498
|
+
// PATCH /public-api/resources/faqs/v2.0/{faq}
|
|
1499
|
+
export const faqUpdateBody = z.object({
|
|
1500
|
+
question: z.unknown().optional(),
|
|
1501
|
+
answer: z.unknown().optional()
|
|
1502
|
+
});
|
|
1503
|
+
|
|
1504
|
+
// 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
|
+
|
|
1514
|
+
// GET /public-api/resources/firmware-versions/v1.0/{firmwareVersion}
|
|
1515
|
+
|
|
1516
|
+
// GET /public-api/resources/firmware-versions/v1.0/{firmwareVersion}/attached-models
|
|
1517
|
+
|
|
1518
|
+
// 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
|
+
|
|
1525
|
+
// GET /public-api/resources/flexibility-activation-requests/v1.0/{flexibilityActivationRequest}
|
|
1526
|
+
|
|
1527
|
+
// 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
|
+
|
|
1534
|
+
// POST /public-api/resources/flexibility-assets/v1.0
|
|
1535
|
+
export const createFlexibilityAssetBody = z.object({
|
|
1536
|
+
id: z.number().optional(),
|
|
1537
|
+
dlmCircuitId: z.number(),
|
|
1538
|
+
chargePointId: z.number(),
|
|
1539
|
+
evseId: z.number(),
|
|
1540
|
+
status: z.enum(["enabled", "disabled"]),
|
|
1541
|
+
endsAt: z.string().datetime().optional()
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1544
|
+
// GET /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}
|
|
1545
|
+
|
|
1546
|
+
// DELETE /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}
|
|
1547
|
+
|
|
1548
|
+
// PATCH /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}
|
|
1549
|
+
export const updateFlexibilityAssetBody = z.object({
|
|
1550
|
+
description: z.string().optional(),
|
|
1551
|
+
downwardRegulationLimit: z.number().int().optional(),
|
|
1552
|
+
upwardRegulationLimit: z.number().int().optional(),
|
|
1553
|
+
integrationId: z.number().optional(),
|
|
1554
|
+
integrationParameters: z.record(z.string()).optional()
|
|
1555
|
+
});
|
|
1556
|
+
|
|
1557
|
+
// GET /public-api/resources/flexibility-assets/v1.0/{flexibilityAsset}/historical-time-series
|
|
1558
|
+
|
|
1559
|
+
// 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
|
+
|
|
1570
|
+
// GET /public-api/resources/id-tags/v2.0
|
|
1571
|
+
|
|
1572
|
+
// POST /public-api/resources/id-tags/v2.0
|
|
1573
|
+
export const idTagCreateBody = z.object({
|
|
1574
|
+
id: z.number().int().optional(),
|
|
1575
|
+
idTagUid: z.string(),
|
|
1576
|
+
idLabel: z.string().optional(),
|
|
1577
|
+
expireAt: z.string().datetime().optional(),
|
|
1578
|
+
createdAt: z.string().datetime().optional(),
|
|
1579
|
+
status: z.enum(["enabled", "disabled", "suspended"]),
|
|
1580
|
+
type: z.enum(["rfid", "mac_address"]),
|
|
1581
|
+
vehicleType: z.union([z.null(), z.literal("company_car"), z.literal("private_car")]).optional(),
|
|
1582
|
+
paymentMethodId: z.string().optional(),
|
|
1583
|
+
userId: z.number().int().optional(),
|
|
1584
|
+
externalId: z.string().optional(),
|
|
1585
|
+
partnerId: z.number().int().optional(),
|
|
1586
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1587
|
+
});
|
|
1588
|
+
|
|
1589
|
+
// GET /public-api/resources/id-tags/v2.0/{idTag}
|
|
1590
|
+
|
|
1591
|
+
// DELETE /public-api/resources/id-tags/v2.0/{idTag}
|
|
1592
|
+
|
|
1593
|
+
// PATCH /public-api/resources/id-tags/v2.0/{idTag}
|
|
1594
|
+
export const idTagUpdateBody = z.object({
|
|
1595
|
+
id: z.number().int().optional(),
|
|
1596
|
+
idTagUid: z.string().optional(),
|
|
1597
|
+
idLabel: z.string().optional(),
|
|
1598
|
+
expireAt: z.string().datetime().optional(),
|
|
1599
|
+
createdAt: z.string().datetime().optional(),
|
|
1600
|
+
status: z.enum(["enabled", "disabled", "suspended"]).optional(),
|
|
1601
|
+
type: z.enum(["rfid", "mac_address"]).optional(),
|
|
1602
|
+
vehicleType: z.union([z.null(), z.literal("company_car"), z.literal("private_car")]).optional(),
|
|
1603
|
+
paymentMethodId: z.string().optional(),
|
|
1604
|
+
userId: z.number().int().optional(),
|
|
1605
|
+
externalId: z.string().optional(),
|
|
1606
|
+
partnerId: z.number().int().optional(),
|
|
1607
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1608
|
+
});
|
|
1609
|
+
|
|
1610
|
+
// GET /public-api/resources/installer-jobs/v1.0
|
|
1611
|
+
|
|
1612
|
+
// POST /public-api/resources/installer-jobs/v1.0
|
|
1613
|
+
export const createInstallerJobBody = z.object({
|
|
1614
|
+
installationAndMaintenanceCompanyId: z.number().int()
|
|
1615
|
+
});
|
|
1616
|
+
|
|
1617
|
+
// 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
|
+
|
|
1622
|
+
// DELETE /public-api/resources/installer-jobs/v1.0/{installerJob}
|
|
1623
|
+
|
|
1624
|
+
// PATCH /public-api/resources/installer-jobs/v1.0/{installerJob}
|
|
1625
|
+
export const updateInstallerJobBody = z.object({
|
|
1626
|
+
installerAdminId: z.number().int().optional(),
|
|
1627
|
+
pin: z.string().min(4).max(12).optional(),
|
|
1628
|
+
description: z.string().optional()
|
|
1629
|
+
});
|
|
1630
|
+
|
|
1631
|
+
// 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
|
+
|
|
1639
|
+
// GET /public-api/resources/invoices/v1.0/{invoice}
|
|
1640
|
+
export const invoiceReadPathParams = z.object({
|
|
1641
|
+
invoice: z.string()
|
|
1642
|
+
});
|
|
1643
|
+
|
|
1644
|
+
// GET /public-api/resources/locations/v1.0
|
|
1645
|
+
|
|
1646
|
+
// POST /public-api/resources/locations/v1.0
|
|
1647
|
+
export const locationCreateDeprecatedBody = z.object({});
|
|
1648
|
+
|
|
1649
|
+
// GET /public-api/resources/locations/v1.0/{location}
|
|
1650
|
+
|
|
1651
|
+
// DELETE /public-api/resources/locations/v1.0/{location}
|
|
1652
|
+
|
|
1653
|
+
// 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(),
|
|
1662
|
+
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()
|
|
1669
|
+
});
|
|
1670
|
+
|
|
1671
|
+
// POST /public-api/resources/locations/v2.0
|
|
1672
|
+
export const locationCreateBody = z.object({
|
|
1673
|
+
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(),
|
|
1680
|
+
geoposition: z.object({
|
|
1681
|
+
latitude: z.number().min(-90).max(90),
|
|
1682
|
+
longitude: z.number().min(-180).max(180)
|
|
1683
|
+
}),
|
|
1684
|
+
address: z.unknown(),
|
|
1685
|
+
streetAddress: z.unknown().optional(),
|
|
1686
|
+
city: z.string().optional(),
|
|
1687
|
+
region: z.unknown().optional(),
|
|
1688
|
+
state: z.unknown().optional(),
|
|
1689
|
+
country: z.unknown(),
|
|
1690
|
+
postCode: z.string().optional(),
|
|
1691
|
+
workingHours: z.object({
|
|
1692
|
+
isAlwaysOpen: z.boolean().optional(),
|
|
1693
|
+
stopSessionOutsideWorkingHours: z.boolean().optional(),
|
|
1694
|
+
alwaysOpenForUserGroupIds: z.array(z.number()).optional(),
|
|
1695
|
+
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()
|
|
1703
|
+
}).optional()
|
|
1704
|
+
}).optional(),
|
|
1705
|
+
timezone: z.string().optional(),
|
|
1706
|
+
externalId: z.string().optional(),
|
|
1707
|
+
roamingOperatorId: z.number().int().optional(),
|
|
1708
|
+
lastUpdatedAt: z.string().datetime().optional(),
|
|
1709
|
+
chargingZones: z.array(z.unknown()).optional(),
|
|
1710
|
+
externalAppData: z.unknown().optional(),
|
|
1711
|
+
roaming: z.object({
|
|
1712
|
+
owner: z.object({
|
|
1713
|
+
name: z.string().optional()
|
|
1714
|
+
}).optional(),
|
|
1715
|
+
operator: z.object({
|
|
1716
|
+
name: z.string().optional()
|
|
1717
|
+
}).optional(),
|
|
1718
|
+
suboperator: z.object({
|
|
1719
|
+
name: z.string().optional()
|
|
1720
|
+
}).optional()
|
|
1721
|
+
}).optional(),
|
|
1722
|
+
tags: z.array(z.string()).optional()
|
|
1723
|
+
});
|
|
1724
|
+
|
|
1725
|
+
// GET /public-api/resources/locations/v2.0/{location}
|
|
1726
|
+
|
|
1727
|
+
// DELETE /public-api/resources/locations/v2.0/{location}
|
|
1728
|
+
|
|
1729
|
+
// PATCH /public-api/resources/locations/v2.0/{location}
|
|
1730
|
+
export const locationUpdateBody = z.object({
|
|
1731
|
+
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(),
|
|
1738
|
+
geoposition: z.object({
|
|
1739
|
+
latitude: z.number().min(-90).max(90),
|
|
1740
|
+
longitude: z.number().min(-180).max(180)
|
|
1741
|
+
}).optional(),
|
|
1742
|
+
address: z.unknown().optional(),
|
|
1743
|
+
streetAddress: z.unknown().optional(),
|
|
1744
|
+
city: z.string().optional(),
|
|
1745
|
+
region: z.unknown().optional(),
|
|
1746
|
+
state: z.unknown().optional(),
|
|
1747
|
+
country: z.unknown().optional(),
|
|
1748
|
+
postCode: z.string().optional(),
|
|
1749
|
+
workingHours: z.object({
|
|
1750
|
+
isAlwaysOpen: z.boolean().optional(),
|
|
1751
|
+
stopSessionOutsideWorkingHours: z.boolean().optional(),
|
|
1752
|
+
alwaysOpenForUserGroupIds: z.array(z.number()).optional(),
|
|
1753
|
+
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()
|
|
1761
|
+
}).optional()
|
|
1762
|
+
}).optional(),
|
|
1763
|
+
timezone: z.string().optional(),
|
|
1764
|
+
externalId: z.string().optional(),
|
|
1765
|
+
roamingOperatorId: z.number().int().optional(),
|
|
1766
|
+
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()
|
|
1779
|
+
}).optional(),
|
|
1780
|
+
tags: z.array(z.string()).optional()
|
|
1781
|
+
});
|
|
1782
|
+
|
|
1783
|
+
// GET /public-api/resources/locations/v2.0/{location}/charging-zones
|
|
1784
|
+
|
|
1785
|
+
// POST /public-api/resources/locations/v2.0/{location}/charging-zones
|
|
1786
|
+
export const locationChargingZoneCreateBody = z.object({
|
|
1787
|
+
id: z.number().int().optional(),
|
|
1788
|
+
name: z.string(),
|
|
1789
|
+
locationId: z.number().int().optional(),
|
|
1790
|
+
status: z.enum(["enabled", "disabled"]),
|
|
1791
|
+
additionalInfo: z.object({
|
|
1792
|
+
enabled: z.boolean().optional(),
|
|
1793
|
+
title: z.unknown().optional(),
|
|
1794
|
+
description: z.unknown().optional()
|
|
1795
|
+
}).optional()
|
|
1796
|
+
});
|
|
1797
|
+
|
|
1798
|
+
// GET /public-api/resources/locations/v2.0/{location}/charging-zones/{chargingZone}
|
|
1799
|
+
|
|
1800
|
+
// DELETE /public-api/resources/locations/v2.0/{location}/charging-zones/{chargingZone}
|
|
1801
|
+
|
|
1802
|
+
// PATCH /public-api/resources/locations/v2.0/{location}/charging-zones/{chargingZone}
|
|
1803
|
+
export const locationChargingZoneUpdateBody = z.object({
|
|
1804
|
+
id: z.number().int().optional(),
|
|
1805
|
+
name: z.string().optional(),
|
|
1806
|
+
locationId: z.number().int().optional(),
|
|
1807
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
1808
|
+
additionalInfo: z.object({
|
|
1809
|
+
enabled: z.boolean().optional(),
|
|
1810
|
+
title: z.unknown().optional(),
|
|
1811
|
+
description: z.unknown().optional()
|
|
1812
|
+
}).optional()
|
|
1813
|
+
});
|
|
1814
|
+
|
|
1815
|
+
// 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
|
+
|
|
1824
|
+
// POST /public-api/resources/parking-spaces/v1.0
|
|
1825
|
+
export const createParkingSpaceBody = z.object({
|
|
1826
|
+
label: z.string(),
|
|
1827
|
+
locationId: z.number().int(),
|
|
1828
|
+
externalId: z.string().optional(),
|
|
1829
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
1830
|
+
occupancyStatus: z.enum(["unknown", "available", "occupied"]).optional(),
|
|
1831
|
+
disabilitiesAccessible: z.boolean().optional(),
|
|
1832
|
+
evses: z.array(z.number().int()).optional()
|
|
1833
|
+
});
|
|
1834
|
+
|
|
1835
|
+
// GET /public-api/resources/parking-spaces/v1.0/{parkingSpace}
|
|
1836
|
+
|
|
1837
|
+
// PUT /public-api/resources/parking-spaces/v1.0/{parkingSpace}
|
|
1838
|
+
export const updateParkingSpaceBody = z.object({
|
|
1839
|
+
label: z.string(),
|
|
1840
|
+
locationId: z.number().int(),
|
|
1841
|
+
externalId: z.string().optional(),
|
|
1842
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
1843
|
+
occupancyStatus: z.enum(["unknown", "available", "occupied"]).optional(),
|
|
1844
|
+
disabilitiesAccessible: z.boolean().optional(),
|
|
1845
|
+
evses: z.array(z.number().int()).optional()
|
|
1846
|
+
});
|
|
1847
|
+
|
|
1848
|
+
// DELETE /public-api/resources/parking-spaces/v1.0/{parkingSpace}
|
|
1849
|
+
|
|
1850
|
+
// GET /public-api/resources/partner-contracts/v1.0
|
|
1851
|
+
|
|
1852
|
+
// POST /public-api/resources/partner-contracts/v1.0
|
|
1853
|
+
export const partnerContractCreateBody = z.object({
|
|
1854
|
+
id: z.number().int().optional(),
|
|
1855
|
+
title: z.string(),
|
|
1856
|
+
partnerId: z.number().int(),
|
|
1857
|
+
startDate: z.string().datetime(),
|
|
1858
|
+
endDate: z.string().datetime().optional(),
|
|
1859
|
+
autoRenewal: z.boolean().optional(),
|
|
1860
|
+
accessAndPermissions: z.object({
|
|
1861
|
+
sessionsRemoteControl: z.boolean().optional(),
|
|
1862
|
+
startReservation: z.boolean().optional(),
|
|
1863
|
+
stopReservation: z.boolean().optional(),
|
|
1864
|
+
resetChargePoint: z.boolean().optional(),
|
|
1865
|
+
firmwareUpdate: z.boolean().optional()
|
|
1866
|
+
}).optional(),
|
|
1867
|
+
revenueSharing: z.object({
|
|
1868
|
+
partnerSharePercentageAcEvse: z.number().min(0).max(100).optional(),
|
|
1869
|
+
partnerSharePercentageDcEvse: z.number().min(0).max(100).optional(),
|
|
1870
|
+
excludeConnectionFee: z.boolean().optional(),
|
|
1871
|
+
deductElectricityCost: z.boolean().optional(),
|
|
1872
|
+
reimburseForElectricityCost: z.boolean().optional(),
|
|
1873
|
+
fixedFeePerSessionAc: z.number().optional(),
|
|
1874
|
+
fixedFeePerSessionDc: z.number().optional(),
|
|
1875
|
+
feePerKwhAc: z.number().optional(),
|
|
1876
|
+
feePerKwhDc: z.number().optional(),
|
|
1877
|
+
handlingFee: z.number().min(0).max(100).optional()
|
|
1878
|
+
}).optional(),
|
|
1879
|
+
monthlyPlatformFees: z.object({
|
|
1880
|
+
perChargePoint: z.number().optional(),
|
|
1881
|
+
perAcEvse: z.number().optional(),
|
|
1882
|
+
perDcEvse: z.number().optional()
|
|
1883
|
+
}).optional(),
|
|
1884
|
+
lastUpdatedAt: z.unknown().optional()
|
|
1885
|
+
});
|
|
1886
|
+
|
|
1887
|
+
// GET /public-api/resources/partner-contracts/v1.0/{partnerContract}
|
|
1888
|
+
|
|
1889
|
+
// PUT /public-api/resources/partner-contracts/v1.0/{partnerContract}
|
|
1890
|
+
export const partnerContractUpdateBody = z.unknown();
|
|
1891
|
+
|
|
1892
|
+
// DELETE /public-api/resources/partner-contracts/v1.0/{partnerContract}
|
|
1893
|
+
|
|
1894
|
+
// 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
|
+
|
|
1905
|
+
// 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
|
+
|
|
1917
|
+
// 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
|
+
|
|
1929
|
+
// POST /public-api/resources/partner-invites/v1.0
|
|
1930
|
+
export const partnerInviteCreateBody = z.object({
|
|
1931
|
+
partnerId: z.number().int(),
|
|
1932
|
+
sendViaEmail: z.boolean().optional(),
|
|
1933
|
+
email: z.string().email().optional(),
|
|
1934
|
+
language: z.string().optional(),
|
|
1935
|
+
acceptUrl: z.string().url().optional(),
|
|
1936
|
+
options: z.object({
|
|
1937
|
+
allowCorporateAccountBilling: z.boolean().optional(),
|
|
1938
|
+
limitCorporateAccountBillingToPartnerChargePoints: z.boolean().optional(),
|
|
1939
|
+
allowAccessToPrivateChargePoints: z.boolean().optional()
|
|
1940
|
+
}).optional()
|
|
1941
|
+
});
|
|
1942
|
+
|
|
1943
|
+
// GET /public-api/resources/partner-invites/v1.0/{partnerInvite}
|
|
1944
|
+
export const partnerInviteReadPathParams = z.object({
|
|
1945
|
+
partnerInvite: z.number().int()
|
|
1946
|
+
});
|
|
1947
|
+
|
|
1948
|
+
// DELETE /public-api/resources/partner-invites/v1.0/{partnerInvite}
|
|
1949
|
+
|
|
1950
|
+
// PATCH /public-api/resources/partner-invites/v1.0/{partnerInvite}
|
|
1951
|
+
export const partnerInviteUpdateBody = z.object({
|
|
1952
|
+
partnerId: z.number().int().optional(),
|
|
1953
|
+
sendViaEmail: z.boolean().optional(),
|
|
1954
|
+
email: z.string().email().optional(),
|
|
1955
|
+
language: z.string().optional(),
|
|
1956
|
+
acceptUrl: z.string().url().optional(),
|
|
1957
|
+
options: z.object({
|
|
1958
|
+
allowCorporateAccountBilling: z.boolean().optional(),
|
|
1959
|
+
limitCorporateAccountBillingToPartnerChargePoints: z.boolean().optional(),
|
|
1960
|
+
allowAccessToPrivateChargePoints: z.boolean().optional()
|
|
1961
|
+
}).optional()
|
|
1962
|
+
});
|
|
1963
|
+
|
|
1964
|
+
// 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
|
+
|
|
1975
|
+
// 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
|
+
|
|
1987
|
+
// 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
|
+
|
|
1996
|
+
// GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}
|
|
1997
|
+
export const partnerSettlementReportReadPathParams = z.object({
|
|
1998
|
+
partnerSettlementReport: z.number().int()
|
|
1999
|
+
});
|
|
2000
|
+
|
|
2001
|
+
// GET /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records
|
|
2002
|
+
|
|
2003
|
+
// POST /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records
|
|
2004
|
+
export const partnerSettlementReportPartnerSettlementRecordCreateBody = z.object({
|
|
2005
|
+
date: z.string(),
|
|
2006
|
+
paidAmount: z.number(),
|
|
2007
|
+
note: z.string()
|
|
2008
|
+
});
|
|
2009
|
+
|
|
2010
|
+
// 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
|
+
|
|
2015
|
+
// PUT /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
|
|
2016
|
+
export const partnerSettlementReportPartnerSettlementRecordUpdateBody = z.unknown();
|
|
2017
|
+
|
|
2018
|
+
// DELETE /public-api/resources/partner-settlement-reports/v1.0/{partnerSettlementReport}/records/{PartnerSettlementRecord}
|
|
2019
|
+
|
|
2020
|
+
// 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
|
+
|
|
2029
|
+
// POST /public-api/resources/partners/v1.0
|
|
2030
|
+
export const partnerCreateDeprecatedBody = z.object({
|
|
2031
|
+
id: z.number().int().optional(),
|
|
2032
|
+
name: z.string(),
|
|
2033
|
+
regNo: z.string().optional(),
|
|
2034
|
+
vatNo: z.string().optional(),
|
|
2035
|
+
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(),
|
|
2036
|
+
city: z.string().optional(),
|
|
2037
|
+
postcode: z.string().optional(),
|
|
2038
|
+
address: z.string().optional(),
|
|
2039
|
+
contactPerson: z.string().optional(),
|
|
2040
|
+
email: z.string().email().optional(),
|
|
2041
|
+
phone: z.string().optional(),
|
|
2042
|
+
faultNotificationsEmail: z.string().email().optional(),
|
|
2043
|
+
monthlyPlatformFee: z.number().optional(),
|
|
2044
|
+
options: z.object({
|
|
2045
|
+
createUsers: z.boolean().optional(),
|
|
2046
|
+
addUserBalance: z.boolean().optional(),
|
|
2047
|
+
supplierOnReceipts: z.boolean().optional(),
|
|
2048
|
+
allowToControlTariffs: z.boolean().optional(),
|
|
2049
|
+
allowToControlTariffGroups: z.boolean().optional()
|
|
2050
|
+
}).optional(),
|
|
2051
|
+
corporateBilling: z.object({
|
|
2052
|
+
enabled: z.boolean().optional(),
|
|
2053
|
+
monthlyLimit: z.number().optional(),
|
|
2054
|
+
discount: z.number().optional()
|
|
2055
|
+
}).optional(),
|
|
2056
|
+
externalId: z.string().optional(),
|
|
2057
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2058
|
+
});
|
|
2059
|
+
|
|
2060
|
+
// GET /public-api/resources/partners/v1.0/{partner}
|
|
2061
|
+
export const partnerReadDeprecatedPathParams = z.object({
|
|
2062
|
+
partner: z.number().int()
|
|
2063
|
+
});
|
|
2064
|
+
|
|
2065
|
+
// DELETE /public-api/resources/partners/v1.0/{partner}
|
|
2066
|
+
|
|
2067
|
+
// PATCH /public-api/resources/partners/v1.0/{partner}
|
|
2068
|
+
export const partnerUpdateDeprecatedBody = z.unknown();
|
|
2069
|
+
|
|
2070
|
+
// GET /public-api/resources/partners/v2.0
|
|
2071
|
+
|
|
2072
|
+
// POST /public-api/resources/partners/v2.0
|
|
2073
|
+
export const partnerCreateBody = z.object({
|
|
2074
|
+
businessName: z.string().optional(),
|
|
2075
|
+
id: z.number().int().optional(),
|
|
2076
|
+
name: z.string(),
|
|
2077
|
+
regNo: z.string().optional(),
|
|
2078
|
+
vatNo: z.string().optional(),
|
|
2079
|
+
address: z.string().optional(),
|
|
2080
|
+
postcode: z.string().optional(),
|
|
2081
|
+
city: z.string().optional(),
|
|
2082
|
+
country: z.unknown().optional(),
|
|
2083
|
+
region: z.unknown().optional(),
|
|
2084
|
+
state: z.unknown().optional(),
|
|
2085
|
+
contactDetails: z.object({
|
|
2086
|
+
administrative: z.object({
|
|
2087
|
+
contactPerson: z.string().optional(),
|
|
2088
|
+
email: z.string().email().optional(),
|
|
2089
|
+
phone: z.string().optional()
|
|
2090
|
+
}).optional(),
|
|
2091
|
+
technical: z.object({
|
|
2092
|
+
contactPerson: z.string().optional(),
|
|
2093
|
+
email: z.string().email().optional(),
|
|
2094
|
+
phone: z.string().optional()
|
|
2095
|
+
}).optional(),
|
|
2096
|
+
billing: z.object({
|
|
2097
|
+
contactPerson: z.string().optional(),
|
|
2098
|
+
email: z.string().email().optional(),
|
|
2099
|
+
phone: z.string().optional()
|
|
2100
|
+
}).optional()
|
|
2101
|
+
}).optional(),
|
|
2102
|
+
notifications: z.object({
|
|
2103
|
+
technical: z.object({
|
|
2104
|
+
chargePointFaults: z.boolean().optional()
|
|
2105
|
+
}).optional(),
|
|
2106
|
+
billing: z.object({
|
|
2107
|
+
settlementReports: z.boolean().optional()
|
|
2108
|
+
}).optional()
|
|
2109
|
+
}).optional(),
|
|
2110
|
+
monthlyPlatformFee: z.number().optional(),
|
|
2111
|
+
options: z.object({
|
|
2112
|
+
createUsers: z.boolean().optional(),
|
|
2113
|
+
addUserBalance: z.boolean().optional(),
|
|
2114
|
+
supplierOnReceipts: z.boolean().optional(),
|
|
2115
|
+
allowToControlTariffs: z.boolean().optional(),
|
|
2116
|
+
allowToControlTariffGroups: z.boolean().optional()
|
|
2117
|
+
}).optional(),
|
|
2118
|
+
corporateBilling: z.object({
|
|
2119
|
+
enabled: z.boolean().optional(),
|
|
2120
|
+
monthlyLimit: z.number().optional(),
|
|
2121
|
+
discount: z.number().optional()
|
|
2122
|
+
}).optional(),
|
|
2123
|
+
externalId: z.string().optional(),
|
|
2124
|
+
bankDetails: z.unknown().optional(),
|
|
2125
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2126
|
+
});
|
|
2127
|
+
|
|
2128
|
+
// GET /public-api/resources/partners/v2.0/{partner}
|
|
2129
|
+
|
|
2130
|
+
// DELETE /public-api/resources/partners/v2.0/{partner}
|
|
2131
|
+
|
|
2132
|
+
// PATCH /public-api/resources/partners/v2.0/{partner}
|
|
2133
|
+
export const partnerUpdateBody = z.object({
|
|
2134
|
+
businessName: z.string().optional()
|
|
2135
|
+
});
|
|
2136
|
+
|
|
2137
|
+
// 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
|
+
|
|
2144
|
+
// POST /public-api/resources/payment-terminals/v1.0
|
|
2145
|
+
export const createPaymentTerminalBody = z.union([z.union([z.object({
|
|
2146
|
+
preauthorizeAmount: z.number(),
|
|
2147
|
+
currencyId: z.number().int().optional(),
|
|
2148
|
+
valueAddedTaxId: z.number().int().optional()
|
|
2149
|
+
}), z.object({
|
|
2150
|
+
transactionTimeout: z.number().int()
|
|
2151
|
+
})]), z.object({
|
|
2152
|
+
id: z.number().int().optional(),
|
|
2153
|
+
name: z.string(),
|
|
2154
|
+
integrationId: z.number().int(),
|
|
2155
|
+
terminalType: z.unknown(),
|
|
2156
|
+
operatorId: z.number().int(),
|
|
2157
|
+
chargingZoneId: z.number().int().optional(),
|
|
2158
|
+
chargePointId: z.number().int().optional(),
|
|
2159
|
+
adminToken: z.string().optional(),
|
|
2160
|
+
isOnline: z.boolean().optional(),
|
|
2161
|
+
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
2162
|
+
phone: z.string(),
|
|
2163
|
+
defaultLanguage: z.string(),
|
|
2164
|
+
presentCardOnStopSession: z.boolean().optional(),
|
|
2165
|
+
info: z.unknown(),
|
|
2166
|
+
currencyCode: z.string().optional(),
|
|
2167
|
+
serialNumber: z.string().optional(),
|
|
2168
|
+
externalId: z.string().optional(),
|
|
2169
|
+
supportedLanguages: z.array(z.string()).optional(),
|
|
2170
|
+
bundle: z.object({
|
|
2171
|
+
version: z.string().optional(),
|
|
2172
|
+
downloadUrl: z.string().optional()
|
|
2173
|
+
}),
|
|
2174
|
+
networkStatusMonitoringEnabled: z.boolean().optional()
|
|
2175
|
+
}), z.object({
|
|
2176
|
+
serialNumber: z.string(),
|
|
2177
|
+
externalId: z.string().optional()
|
|
2178
|
+
}), z.object({
|
|
2179
|
+
adminToken: z.unknown().optional(),
|
|
2180
|
+
webhookUrl: z.string().optional(),
|
|
2181
|
+
serialNumber: z.string().optional(),
|
|
2182
|
+
externalId: z.string().optional()
|
|
2183
|
+
}), z.object({
|
|
2184
|
+
terminalId: z.string(),
|
|
2185
|
+
serialNumber: z.string().optional(),
|
|
2186
|
+
externalId: z.string().optional()
|
|
2187
|
+
}), z.object({
|
|
2188
|
+
serialNumber: z.string().optional(),
|
|
2189
|
+
externalId: z.string().optional()
|
|
2190
|
+
}), z.object({
|
|
2191
|
+
verificationCode: z.string(),
|
|
2192
|
+
defaultLanguage: z.string(),
|
|
2193
|
+
presentCardOnStopSession: z.boolean().optional(),
|
|
2194
|
+
info: z.unknown(),
|
|
2195
|
+
serialNumber: z.string().optional(),
|
|
2196
|
+
externalId: z.string().optional()
|
|
2197
|
+
}), z.object({
|
|
2198
|
+
serialNumber: z.string().optional(),
|
|
2199
|
+
externalId: z.string().optional()
|
|
2200
|
+
}), z.object({
|
|
2201
|
+
id: z.number().int().optional(),
|
|
2202
|
+
name: z.string(),
|
|
2203
|
+
integrationId: z.number().int(),
|
|
2204
|
+
terminalType: z.unknown(),
|
|
2205
|
+
operatorId: z.number().int(),
|
|
2206
|
+
invoiceFields: z.array(z.object({
|
|
2207
|
+
field: z.string(),
|
|
2208
|
+
required: z.boolean(),
|
|
2209
|
+
type: z.enum(["individual", "company"])
|
|
2210
|
+
})).optional()
|
|
2211
|
+
}), z.object({
|
|
2212
|
+
adminToken: z.unknown().optional(),
|
|
2213
|
+
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
2214
|
+
phone: z.string(),
|
|
2215
|
+
defaultLanguage: z.string(),
|
|
2216
|
+
presentCardOnStopSession: z.boolean().optional(),
|
|
2217
|
+
info: z.unknown(),
|
|
2218
|
+
currencyCode: z.string().optional(),
|
|
2219
|
+
serialNumber: z.string().optional(),
|
|
2220
|
+
externalId: z.string().optional(),
|
|
2221
|
+
merchantAccount: z.string(),
|
|
2222
|
+
adyenApiKey: z.string(),
|
|
2223
|
+
supportedLanguages: z.array(z.string()).optional(),
|
|
2224
|
+
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
|
+
})]);
|
|
2243
|
+
|
|
2244
|
+
// GET /public-api/resources/payment-terminals/v1.0/{paymentTerminal}
|
|
2245
|
+
|
|
2246
|
+
// DELETE /public-api/resources/payment-terminals/v1.0/{paymentTerminal}
|
|
2247
|
+
|
|
2248
|
+
// PATCH /public-api/resources/payment-terminals/v1.0/{paymentTerminal}
|
|
2249
|
+
export const updatePaymentTerminalBody = z.union([z.union([z.object({
|
|
2250
|
+
preauthorizeAmount: z.number().optional(),
|
|
2251
|
+
currencyId: z.number().int().optional(),
|
|
2252
|
+
valueAddedTaxId: z.number().int().optional()
|
|
2253
|
+
}), z.object({
|
|
2254
|
+
transactionTimeout: z.number().int().optional()
|
|
2255
|
+
})]), z.object({
|
|
2256
|
+
adminToken: z.unknown().optional(),
|
|
2257
|
+
isOnline: z.boolean().optional(),
|
|
2258
|
+
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
2259
|
+
phone: z.string().optional(),
|
|
2260
|
+
defaultLanguage: z.string().optional(),
|
|
2261
|
+
presentCardOnStopSession: z.boolean().optional(),
|
|
2262
|
+
info: z.unknown().optional(),
|
|
2263
|
+
serialNumber: z.string().optional(),
|
|
2264
|
+
externalId: z.string().optional(),
|
|
2265
|
+
supportedLanguages: z.array(z.string()).optional()
|
|
2266
|
+
}), z.object({
|
|
2267
|
+
serialNumber: z.string().optional(),
|
|
2268
|
+
externalId: z.string().optional()
|
|
2269
|
+
}), z.object({
|
|
2270
|
+
adminToken: z.unknown().optional(),
|
|
2271
|
+
webhookUrl: z.string().optional(),
|
|
2272
|
+
serialNumber: z.string().optional(),
|
|
2273
|
+
externalId: z.string().optional()
|
|
2274
|
+
}), z.object({
|
|
2275
|
+
terminalId: z.unknown().optional(),
|
|
2276
|
+
serialNumber: z.string().optional(),
|
|
2277
|
+
externalId: z.string().optional()
|
|
2278
|
+
}), z.object({
|
|
2279
|
+
serialNumber: z.string().optional(),
|
|
2280
|
+
externalId: z.string().optional()
|
|
2281
|
+
}), z.object({
|
|
2282
|
+
verificationCode: z.string().optional(),
|
|
2283
|
+
defaultLanguage: z.string().optional(),
|
|
2284
|
+
presentCardOnStopSession: z.boolean().optional(),
|
|
2285
|
+
info: z.unknown().optional(),
|
|
2286
|
+
serialNumber: z.string().optional(),
|
|
2287
|
+
externalId: z.string().optional()
|
|
2288
|
+
}), z.object({
|
|
2289
|
+
serialNumber: z.string().optional(),
|
|
2290
|
+
externalId: z.string().optional()
|
|
2291
|
+
}), z.object({
|
|
2292
|
+
id: z.number().int().optional(),
|
|
2293
|
+
name: z.string().optional(),
|
|
2294
|
+
integrationId: z.number().int().optional(),
|
|
2295
|
+
terminalType: z.unknown().optional(),
|
|
2296
|
+
operatorId: z.number().int().optional()
|
|
2297
|
+
}), z.object({
|
|
2298
|
+
adminToken: z.unknown().optional(),
|
|
2299
|
+
networkStatus: z.enum(["online", "offline", "unknown"]).optional(),
|
|
2300
|
+
phone: z.string().optional(),
|
|
2301
|
+
defaultLanguage: z.string().optional(),
|
|
2302
|
+
presentCardOnStopSession: z.boolean().optional(),
|
|
2303
|
+
info: z.unknown().optional(),
|
|
2304
|
+
serialNumber: z.string().optional(),
|
|
2305
|
+
externalId: z.string().optional(),
|
|
2306
|
+
merchantAccount: z.string().optional(),
|
|
2307
|
+
adyenApiKey: z.string().optional(),
|
|
2308
|
+
supportedLanguages: z.array(z.string()).optional(),
|
|
2309
|
+
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
|
+
})]);
|
|
2322
|
+
|
|
2323
|
+
// GET /public-api/resources/provisioning-certificates/v2.0
|
|
2324
|
+
|
|
2325
|
+
// POST /public-api/resources/provisioning-certificates/v2.0
|
|
2326
|
+
export const createPcIdBody = z.object({
|
|
2327
|
+
id: z.number().int().optional(),
|
|
2328
|
+
pcId: z.string(),
|
|
2329
|
+
name: z.string(),
|
|
2330
|
+
vehicleType: z.enum(["company", "private"]),
|
|
2331
|
+
userId: z.number().int(),
|
|
2332
|
+
idTags: z.array(z.object({
|
|
2333
|
+
id: z.number().int().optional(),
|
|
2334
|
+
type: z.enum(["rfid", "mac_address", "emaid"]).optional(),
|
|
2335
|
+
name: z.string().optional(),
|
|
2336
|
+
paymentMethod: z.string().optional(),
|
|
2337
|
+
status: z.enum(["active", "disabled", "suspended"]).optional(),
|
|
2338
|
+
expireAt: z.string().datetime().optional()
|
|
2339
|
+
})).optional()
|
|
2340
|
+
});
|
|
2341
|
+
|
|
2342
|
+
// GET /public-api/resources/provisioning-certificates/v2.0/{provisioningCertificate}
|
|
2343
|
+
|
|
2344
|
+
// DELETE /public-api/resources/provisioning-certificates/v2.0/{provisioningCertificate}
|
|
2345
|
+
|
|
2346
|
+
// PATCH /public-api/resources/provisioning-certificates/v2.0/{provisioningCertificate}
|
|
2347
|
+
export const updatePcIdBody = z.object({
|
|
2348
|
+
id: z.number().int().optional(),
|
|
2349
|
+
pcId: z.string().optional(),
|
|
2350
|
+
name: z.string().optional(),
|
|
2351
|
+
vehicleType: z.enum(["company", "private"]).optional(),
|
|
2352
|
+
userId: z.number().int().optional(),
|
|
2353
|
+
idTags: z.array(z.object({
|
|
2354
|
+
id: z.number().int().optional(),
|
|
2355
|
+
type: z.enum(["rfid", "mac_address", "emaid"]).optional(),
|
|
2356
|
+
name: z.string().optional(),
|
|
2357
|
+
paymentMethod: z.string().optional(),
|
|
2358
|
+
status: z.enum(["active", "disabled", "suspended"]).optional(),
|
|
2359
|
+
expireAt: z.string().datetime().optional()
|
|
2360
|
+
})).optional()
|
|
2361
|
+
});
|
|
2362
|
+
|
|
2363
|
+
// GET /public-api/resources/receipts/v2.0
|
|
2364
|
+
|
|
2365
|
+
// GET /public-api/resources/receipts/v2.0/{receipt}
|
|
2366
|
+
|
|
2367
|
+
// 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
|
+
|
|
2378
|
+
// GET /public-api/resources/reservations/v1.0/{reservation}
|
|
2379
|
+
|
|
2380
|
+
// GET /public-api/resources/rfid-tags/v1.0
|
|
2381
|
+
|
|
2382
|
+
// POST /public-api/resources/rfid-tags/v1.0
|
|
2383
|
+
export const rfidTagCreateDeprecatedBody = z.object({
|
|
2384
|
+
id: z.number().int().optional(),
|
|
2385
|
+
rfidTagUid: z.string(),
|
|
2386
|
+
rfidLabel: z.string().optional(),
|
|
2387
|
+
expireAt: z.string().optional(),
|
|
2388
|
+
createdAt: z.string().optional(),
|
|
2389
|
+
status: z.enum(["enabled", "disabled", "suspended"]),
|
|
2390
|
+
userId: z.number().int().optional(),
|
|
2391
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2392
|
+
});
|
|
2393
|
+
|
|
2394
|
+
// GET /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2395
|
+
|
|
2396
|
+
// DELETE /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2397
|
+
|
|
2398
|
+
// PATCH /public-api/resources/rfid-tags/v1.0/{rfidTag}
|
|
2399
|
+
export const rfidTagUpdateDeprecatedBody = z.unknown();
|
|
2400
|
+
|
|
2401
|
+
// GET /public-api/resources/roaming-connections/v2.0
|
|
2402
|
+
|
|
2403
|
+
// GET /public-api/resources/roaming-connections/v2.0/{roamingConnection}
|
|
2404
|
+
export const getRoamingConnectionPathParams = z.object({
|
|
2405
|
+
roamingConnection: z.number().int()
|
|
2406
|
+
});
|
|
2407
|
+
|
|
2408
|
+
// GET /public-api/resources/roaming-operators/v2.0
|
|
2409
|
+
|
|
2410
|
+
// GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}
|
|
2411
|
+
export const roamingOperatorReadPathParams = z.object({
|
|
2412
|
+
roamingOperator: z.number().int()
|
|
2413
|
+
});
|
|
2414
|
+
|
|
2415
|
+
// PATCH /public-api/resources/roaming-operators/v2.0/{roamingOperator}
|
|
2416
|
+
export const roamingOperatorUpdateBody = z.object({
|
|
2417
|
+
businessName: z.string().optional(),
|
|
2418
|
+
partnerId: z.number().int().optional(),
|
|
2419
|
+
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()
|
|
2429
|
+
}).optional()
|
|
2430
|
+
});
|
|
2431
|
+
|
|
2432
|
+
// POST /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters
|
|
2433
|
+
export const createRoamingCustomTariffFilterBody = z.object({
|
|
2434
|
+
id: z.number().int().optional(),
|
|
2435
|
+
name: z.string().min(1).max(255),
|
|
2436
|
+
status: z.enum(["enabled", "disabled"]),
|
|
2437
|
+
countryCode: z.string().regex(new RegExp("^[A-Z]{2}$")).optional(),
|
|
2438
|
+
applicableCurrentTypes: z.array(z.enum(["AC", "DC"])).optional(),
|
|
2439
|
+
powerBelowKw: z.number().min(0).optional(),
|
|
2440
|
+
evseIdPrefix: z.string().max(1000).optional(),
|
|
2441
|
+
order: z.number().int().optional(),
|
|
2442
|
+
createdAt: z.unknown().optional(),
|
|
2443
|
+
updatedAt: z.unknown().optional()
|
|
2444
|
+
});
|
|
2445
|
+
|
|
2446
|
+
// PUT /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters/reorder
|
|
2447
|
+
export const reorderRoamingCustomTariffFiltersBody = z.object({
|
|
2448
|
+
filters: z.array(z.object({
|
|
2449
|
+
id: z.number().int(),
|
|
2450
|
+
order: z.number().int().min(1)
|
|
2451
|
+
}))
|
|
2452
|
+
});
|
|
2453
|
+
|
|
2454
|
+
// GET /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters/{customTariffFilter}
|
|
2455
|
+
|
|
2456
|
+
// DELETE /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters/{customTariffFilter}
|
|
2457
|
+
|
|
2458
|
+
// PATCH /public-api/resources/roaming-operators/v2.0/{roamingOperator}/custom-tariff-filters/{customTariffFilter}
|
|
2459
|
+
export const updateRoamingCustomTariffFilterBody = z.object({
|
|
2460
|
+
name: z.string().min(1).max(255).optional(),
|
|
2461
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
2462
|
+
countryCode: z.string().regex(new RegExp("^[A-Z]{2}$")).optional(),
|
|
2463
|
+
applicableCurrentTypes: z.array(z.enum(["AC", "DC"])).optional(),
|
|
2464
|
+
powerBelowKw: z.number().min(0).optional(),
|
|
2465
|
+
evseIdPrefix: z.string().max(1000).optional(),
|
|
2466
|
+
order: z.number().int().optional()
|
|
2467
|
+
});
|
|
2468
|
+
|
|
2469
|
+
// GET /public-api/resources/roaming-platforms/v1.0
|
|
2470
|
+
|
|
2471
|
+
// GET /public-api/resources/roaming-platforms/v1.0/{roamingPlatform}
|
|
2472
|
+
export const roamingPlatformReadDeprecatedPathParams = z.object({
|
|
2473
|
+
roamingPlatform: z.number().int()
|
|
2474
|
+
});
|
|
2475
|
+
|
|
2476
|
+
// 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
|
+
|
|
2485
|
+
// POST /public-api/resources/roaming-providers/v2.0
|
|
2486
|
+
export const roamingProviderCreateBody = z.union([z.object({
|
|
2487
|
+
businessName: z.string().optional(),
|
|
2488
|
+
platformId: z.number().int(),
|
|
2489
|
+
partnerId: z.number().int().optional(),
|
|
2490
|
+
hubjectId: z.string().optional()
|
|
2491
|
+
}), z.object({
|
|
2492
|
+
countryCode: z.string().optional(),
|
|
2493
|
+
partyId: z.string().optional()
|
|
2494
|
+
})]);
|
|
2495
|
+
|
|
2496
|
+
// GET /public-api/resources/roaming-providers/v2.0/{roamingProvider}
|
|
2497
|
+
export const roamingProviderReadPathParams = z.object({
|
|
2498
|
+
roamingProvider: z.number().int()
|
|
2499
|
+
});
|
|
2500
|
+
|
|
2501
|
+
// DELETE /public-api/resources/roaming-providers/v2.0/{roamingProvider}
|
|
2502
|
+
|
|
2503
|
+
// PATCH /public-api/resources/roaming-providers/v2.0/{roamingProvider}
|
|
2504
|
+
export const roamingProviderUpdateBody = z.union([z.unknown(), z.object({})]);
|
|
2505
|
+
|
|
2506
|
+
// GET /public-api/resources/roaming-tariffs/v2.0
|
|
2507
|
+
|
|
2508
|
+
// GET /public-api/resources/roaming-tariffs/v2.0/{roamingTariff}
|
|
2509
|
+
export const roamingTariffReadPathParams = z.object({
|
|
2510
|
+
roamingTariff: z.number().int()
|
|
2511
|
+
});
|
|
2512
|
+
|
|
2513
|
+
// PATCH /public-api/resources/roaming-tariffs/v2.0/{roamingTariff}
|
|
2514
|
+
export const roamingTariffUpdateBody = z.object({
|
|
2515
|
+
id: z.number().int().optional(),
|
|
2516
|
+
roamingIds: z.array(z.string()).optional(),
|
|
2517
|
+
roamingTariffHumanReadable: z.string().optional(),
|
|
2518
|
+
rawRoamingTariffs: z.array(z.object({})).optional(),
|
|
2519
|
+
operatorId: z.number().int().optional(),
|
|
2520
|
+
tariffGroupId: z.number().int().optional()
|
|
2521
|
+
});
|
|
2522
|
+
|
|
2523
|
+
// GET /public-api/resources/security-events-log/v2.0
|
|
2524
|
+
|
|
2525
|
+
// GET /public-api/resources/security-events-log/v2.0/{securityEventLog}
|
|
2526
|
+
|
|
2527
|
+
// 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
|
+
|
|
2537
|
+
// GET /public-api/resources/security-events/v2.0/{securityEvent}
|
|
2538
|
+
|
|
2539
|
+
// 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
|
+
|
|
2545
|
+
// GET /public-api/resources/sessions/v1.0/{session}
|
|
2546
|
+
|
|
2547
|
+
// GET /public-api/resources/sessions/v1.0/{session}/consumption-stats
|
|
2548
|
+
|
|
2549
|
+
// GET /public-api/resources/settings/v1.0
|
|
2550
|
+
|
|
2551
|
+
// GET /public-api/resources/sub-operators/v1.0
|
|
2552
|
+
|
|
2553
|
+
// GET /public-api/resources/sub-operators/v1.0/{subOperator}
|
|
2554
|
+
|
|
2555
|
+
// GET /public-api/resources/subscription-plans/v1.0
|
|
2556
|
+
|
|
2557
|
+
// GET /public-api/resources/subscription-plans/v2.0
|
|
2558
|
+
|
|
2559
|
+
// POST /public-api/resources/subscription-plans/v2.0
|
|
2560
|
+
export const subscriptionPlanCreateBody = z.object({
|
|
2561
|
+
name: z.unknown(),
|
|
2562
|
+
description: z.unknown(),
|
|
2563
|
+
renewalCycle: z.enum(["monthly", "annually"]),
|
|
2564
|
+
freeRenewalPeriods: z.number().int().optional(),
|
|
2565
|
+
type: z.enum(["pre-paid", "post-paid"]),
|
|
2566
|
+
baseFee: z.number().optional(),
|
|
2567
|
+
baseFeeAppliesPerEachHomeCharger: z.boolean().optional(),
|
|
2568
|
+
postPaidChargingSessionsAccumulation: z.enum(["none", "personal", "personal_commercial"]).optional(),
|
|
2569
|
+
billingUsageThreshold: z.number().int().optional(),
|
|
2570
|
+
billingType: z.enum(["default", "internal", "external"]).optional(),
|
|
2571
|
+
status: z.enum(["enabled", "disabled"]),
|
|
2572
|
+
allowance: z.object({
|
|
2573
|
+
resetCycle: z.enum(["as_renewal_cycle", "after_each_session", "after_24_hours", "after_each_week", "after_each_month", "after_each_year"]).optional(),
|
|
2574
|
+
type: z.enum(["none", "combined", "separate"]).optional(),
|
|
2575
|
+
homeChargersOnly: z.boolean().optional(),
|
|
2576
|
+
includedCountries: z.array(z.unknown()).optional(),
|
|
2577
|
+
excludedCountries: z.array(z.unknown()).optional(),
|
|
2578
|
+
excludeRoaming: z.boolean().optional(),
|
|
2579
|
+
includedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2580
|
+
excludedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2581
|
+
combined: z.unknown().optional(),
|
|
2582
|
+
ac: z.number().int().min(0).max(4000000).optional(),
|
|
2583
|
+
dc: z.unknown().optional()
|
|
2584
|
+
}).optional(),
|
|
2585
|
+
visibilityRestrictions: z.object({
|
|
2586
|
+
includedPartnerUsers: z.array(z.number().int()).optional(),
|
|
2587
|
+
excludedPartnerUsers: z.array(z.number().int()).optional(),
|
|
2588
|
+
includedUserGroups: z.array(z.number().int()).optional(),
|
|
2589
|
+
excludedUserGroups: z.array(z.number().int()).optional()
|
|
2590
|
+
}).optional(),
|
|
2591
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2592
|
+
});
|
|
2593
|
+
|
|
2594
|
+
// GET /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
|
|
2595
|
+
|
|
2596
|
+
// DELETE /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
|
|
2597
|
+
|
|
2598
|
+
// PATCH /public-api/resources/subscription-plans/v2.0/{subscriptionPlan}
|
|
2599
|
+
export const subscriptionPlanUpdateBody = z.object({
|
|
2600
|
+
name: z.unknown().optional(),
|
|
2601
|
+
description: z.unknown().optional(),
|
|
2602
|
+
renewalCycle: z.enum(["monthly", "annually"]).optional(),
|
|
2603
|
+
freeRenewalPeriods: z.number().int().optional(),
|
|
2604
|
+
type: z.enum(["pre-paid", "post-paid"]).optional(),
|
|
2605
|
+
baseFee: z.number().optional(),
|
|
2606
|
+
feePerEachPersonalChargePoint: z.number().optional(),
|
|
2607
|
+
postPaidChargingSessionsAccumulation: z.enum(["none", "personal", "personal_commercial"]).optional(),
|
|
2608
|
+
billingUsageThreshold: z.number().int().optional(),
|
|
2609
|
+
billingType: z.unknown().optional(),
|
|
2610
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
2611
|
+
allowance: z.object({
|
|
2612
|
+
resetCycle: z.enum(["as_renewal_cycle", "after_each_session", "after_24_hours", "after_each_week", "after_each_month", "after_each_year"]).optional(),
|
|
2613
|
+
type: z.enum(["none", "combined", "separate"]).optional(),
|
|
2614
|
+
$ref: z.unknown().optional(),
|
|
2615
|
+
homeChargersOnly: z.boolean().optional(),
|
|
2616
|
+
includedCountries: z.array(z.unknown()).optional(),
|
|
2617
|
+
excludedCountries: z.array(z.unknown()).optional(),
|
|
2618
|
+
excludeRoaming: z.boolean().optional(),
|
|
2619
|
+
includedPartnerChargePoints: z.array(z.number().int()).optional(),
|
|
2620
|
+
excludedPartnerChargePoints: z.array(z.number().int()).optional()
|
|
2621
|
+
}).optional(),
|
|
2622
|
+
visibilityRestrictions: z.object({
|
|
2623
|
+
includedPartnerUsers: z.array(z.number().int()).optional(),
|
|
2624
|
+
excludedPartnerUsers: z.array(z.number().int()).optional(),
|
|
2625
|
+
includedUserGroups: z.array(z.number().int()).optional(),
|
|
2626
|
+
excludedUserGroups: z.array(z.number().int()).optional()
|
|
2627
|
+
}).optional(),
|
|
2628
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2629
|
+
});
|
|
2630
|
+
|
|
2631
|
+
// GET /public-api/resources/subscriptions/v1.0
|
|
2632
|
+
|
|
2633
|
+
// GET /public-api/resources/subscriptions/v1.0/{subscription}
|
|
2634
|
+
|
|
2635
|
+
// GET /public-api/resources/tariff-groups/v1.0
|
|
2636
|
+
|
|
2637
|
+
// POST /public-api/resources/tariff-groups/v1.0
|
|
2638
|
+
export const tariffGroupCreateBody = z.unknown();
|
|
2639
|
+
|
|
2640
|
+
// GET /public-api/resources/tariff-groups/v1.0/{tariffGroup}
|
|
2641
|
+
|
|
2642
|
+
// PUT /public-api/resources/tariff-groups/v1.0/{tariffGroup}
|
|
2643
|
+
export const tariffGroupUpdateBody = z.unknown();
|
|
2644
|
+
|
|
2645
|
+
// DELETE /public-api/resources/tariff-groups/v1.0/{tariffGroup}
|
|
2646
|
+
|
|
2647
|
+
// GET /public-api/resources/tariff-snapshots/v1.0/{tariffSnapshot}
|
|
2648
|
+
|
|
2649
|
+
// GET /public-api/resources/tariffs/v1.0
|
|
2650
|
+
|
|
2651
|
+
// POST /public-api/resources/tariffs/v1.0
|
|
2652
|
+
export const tariffCreateBody = z.object({
|
|
2653
|
+
id: z.number().int(),
|
|
2654
|
+
name: z.string(),
|
|
2655
|
+
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(),
|
|
2659
|
+
dayTariffStart: z.string().optional(),
|
|
2660
|
+
nightTariffStart: z.string().optional(),
|
|
2661
|
+
pricing: z.object({
|
|
2662
|
+
pricePerSession: z.number().optional(),
|
|
2663
|
+
connectionFee: z.number().optional(),
|
|
2664
|
+
pricePerKwh: z.number().optional(),
|
|
2665
|
+
dayPricePerKwh: z.number().optional(),
|
|
2666
|
+
nightPricePerKwh: z.number().optional(),
|
|
2667
|
+
pricePeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
2668
|
+
pricePerPeriod: z.number().optional(),
|
|
2669
|
+
durationFeeLimit: z.number().optional(),
|
|
2670
|
+
dayPricePerPeriod: z.number().optional(),
|
|
2671
|
+
nightPricePerPeriod: z.number().optional(),
|
|
2672
|
+
dayIdleFeePerMinute: z.number().optional(),
|
|
2673
|
+
nightIdleFeePerMinute: z.number().optional(),
|
|
2674
|
+
idleFeePerMinute: z.number().optional(),
|
|
2675
|
+
idleFeeGracePeriodMinutes: z.number().optional(),
|
|
2676
|
+
idlePricingPeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
2677
|
+
idleFeePeriodStart: z.string().optional(),
|
|
2678
|
+
idleFeePeriodEnd: z.string().optional(),
|
|
2679
|
+
idleFeeLimit: z.number().optional(),
|
|
2680
|
+
connectionFeeMinimumSessionDuration: z.number().int().optional(),
|
|
2681
|
+
connectionFeeMinimumSessionEnergy: z.number().optional(),
|
|
2682
|
+
durationFeeGracePeriod: z.number().int().optional(),
|
|
2683
|
+
minPrice: z.number().optional(),
|
|
2684
|
+
preAuthorizeAmount: z.number().optional(),
|
|
2685
|
+
taxID: z.number().int().optional(),
|
|
2686
|
+
chargePointElectricityRate: z.boolean().optional(),
|
|
2687
|
+
fallbackElectricityRateId: z.number().int().optional(),
|
|
2688
|
+
markupPercentagePerKwh: z.number().optional(),
|
|
2689
|
+
markupFixedFeePerKwh: z.number().optional(),
|
|
2690
|
+
flexibleMarkUpAsFixedPerKwh: z.object({
|
|
2691
|
+
defaultPrice: z.number().optional(),
|
|
2692
|
+
intervalPricing: z.array(z.unknown()).optional()
|
|
2693
|
+
}).optional(),
|
|
2694
|
+
multiPricePerKwh: z.array(z.object({
|
|
2695
|
+
firstKwh: z.number(),
|
|
2696
|
+
lastKwh: z.number().optional(),
|
|
2697
|
+
feePerKwh: z.number().optional(),
|
|
2698
|
+
flatFee: z.number().optional()
|
|
2699
|
+
})).optional(),
|
|
2700
|
+
multiPricePerDuration: z.array(z.object({
|
|
2701
|
+
firstUnit: z.number().int(),
|
|
2702
|
+
lastUnit: z.number().int().optional(),
|
|
2703
|
+
feePerUnit: z.number().optional(),
|
|
2704
|
+
flatFee: z.number().optional()
|
|
2705
|
+
})).optional(),
|
|
2706
|
+
multiIdleFee: z.array(z.object({
|
|
2707
|
+
firstUnit: z.number().int(),
|
|
2708
|
+
lastUnit: z.number().int().optional(),
|
|
2709
|
+
feePerUnit: z.number().optional(),
|
|
2710
|
+
flatFee: z.number().optional()
|
|
2711
|
+
})).optional(),
|
|
2712
|
+
regularUsePeriod: z.number().optional(),
|
|
2713
|
+
averagePowerLevels: z.array(z.object({
|
|
2714
|
+
averagePowerUpToKw: z.number(),
|
|
2715
|
+
pricePerMinute: z.number()
|
|
2716
|
+
})).optional(),
|
|
2717
|
+
peakPowerLevels: z.array(z.object({
|
|
2718
|
+
peakPowerUpToKw: z.number(),
|
|
2719
|
+
regularPricePerMinute: z.number(),
|
|
2720
|
+
excessUsePricePerMin: z.number()
|
|
2721
|
+
})).optional(),
|
|
2722
|
+
timePeriods: z.array(z.object({
|
|
2723
|
+
startTime: z.string().regex(new RegExp("^\\d{2}:\\d{2}$")),
|
|
2724
|
+
endTime: z.string().regex(new RegExp("^\\d{2}:\\d{2}$"))
|
|
2725
|
+
})).optional(),
|
|
2726
|
+
pricePeriods: z.object({
|
|
2727
|
+
connectionFeePeriods: z.object({
|
|
2728
|
+
fee: z.array(z.number()).optional()
|
|
2729
|
+
}).optional(),
|
|
2730
|
+
energyFeePeriods: z.object({
|
|
2731
|
+
fee: z.array(z.number()).optional()
|
|
2732
|
+
}).optional(),
|
|
2733
|
+
durationFeePeriods: z.object({
|
|
2734
|
+
fee: z.array(z.number()).optional()
|
|
2735
|
+
}).optional(),
|
|
2736
|
+
idleFeePeriods: z.object({
|
|
2737
|
+
fee: z.array(z.number()).optional()
|
|
2738
|
+
}).optional()
|
|
2739
|
+
}).optional(),
|
|
2740
|
+
daysWhenApplied: z.array(z.object({
|
|
2741
|
+
name: z.string().optional(),
|
|
2742
|
+
specialDates: z.array(z.string()).optional(),
|
|
2743
|
+
idleFeeGracePeriodMinutes: z.number().optional(),
|
|
2744
|
+
idlePricingPeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
2745
|
+
connectionFeeMinimumSessionDuration: z.number().int().optional(),
|
|
2746
|
+
connectionFeeMinimumSessionEnergy: z.number().optional(),
|
|
2747
|
+
durationFeeGracePeriod: z.number().int().optional(),
|
|
2748
|
+
pricePeriodInMinutes: z.union([z.literal(1), z.literal(15), z.literal(30), z.literal(60), z.literal(240), z.literal(360)]).optional(),
|
|
2749
|
+
pricePeriods: z.object({
|
|
2750
|
+
connectionFeePeriods: z.object({
|
|
2751
|
+
fee: z.array(z.number()).optional()
|
|
2752
|
+
}).optional(),
|
|
2753
|
+
energyFeePeriods: z.object({
|
|
2754
|
+
fee: z.array(z.number()).optional()
|
|
2755
|
+
}).optional(),
|
|
2756
|
+
durationFeePeriods: z.object({
|
|
2757
|
+
fee: z.array(z.number()).optional()
|
|
2758
|
+
}).optional(),
|
|
2759
|
+
idleFeePeriods: z.object({
|
|
2760
|
+
fee: z.array(z.number()).optional()
|
|
2761
|
+
}).optional()
|
|
2762
|
+
}).optional()
|
|
2763
|
+
})).optional(),
|
|
2764
|
+
thresholdPriceForEnergy: z.number().optional(),
|
|
2765
|
+
priceForEnergyWhenOptimized: z.number().optional(),
|
|
2766
|
+
optimisedLabel: z.string().optional(),
|
|
2767
|
+
durationFeeFrom: z.string().optional(),
|
|
2768
|
+
durationFeeTo: z.string().optional(),
|
|
2769
|
+
subsidyIntegrationId: z.number().int().optional(),
|
|
2770
|
+
lockPriceOnSessionStart: z.boolean().optional(),
|
|
2771
|
+
lockEnergyPriceOnSessionStart: z.boolean().optional(),
|
|
2772
|
+
lockDurationPriceOnSessionStart: z.boolean().optional(),
|
|
2773
|
+
lockIdlePriceOnSessionStart: z.boolean().optional(),
|
|
2774
|
+
stateOfChargeIdleThreshold: z.union([z.literal(75), z.literal(80), z.literal(85), z.literal(90), z.literal(95), z.literal(100)]).optional(),
|
|
2775
|
+
averagePowerIdleThreshold: z.number().min(0).max(999999.99).optional()
|
|
2776
|
+
}).optional(),
|
|
2777
|
+
currency: z.string().optional(),
|
|
2778
|
+
stopSession: z.object({
|
|
2779
|
+
timeLimitMinutes: z.number().optional(),
|
|
2780
|
+
stopWhenEnergyExceedsKwh: z.number().optional()
|
|
2781
|
+
}).optional(),
|
|
2782
|
+
restrictions: z.object({
|
|
2783
|
+
applyToUsersOfChargePointOwner: z.boolean().optional(),
|
|
2784
|
+
applyToUsersOfChargePointPartner: z.boolean().optional(),
|
|
2785
|
+
applyToUsersOfAllRoamingEmsps: z.boolean().optional(),
|
|
2786
|
+
applyToAdHocUsers: z.boolean().optional(),
|
|
2787
|
+
adHocPreAuthorizeAmount: z.number().min(0).optional(),
|
|
2788
|
+
adHocStopWhenPreAuthorizedAmountFallsBelow: z.number().optional(),
|
|
2789
|
+
applyToUsersOfPartners: z.array(z.number()).optional(),
|
|
2790
|
+
applyToUsersWithGroups: z.array(z.string()).optional(),
|
|
2791
|
+
applyToUserGroupIds: z.array(z.number()).optional(),
|
|
2792
|
+
applyToUsersWithSubscriptions: z.array(z.number()).optional(),
|
|
2793
|
+
startDate: z.string().optional(),
|
|
2794
|
+
endDate: z.string().optional()
|
|
2795
|
+
}).optional(),
|
|
2796
|
+
partner: z.object({
|
|
2797
|
+
id: z.number().int().optional()
|
|
2798
|
+
}).optional(),
|
|
2799
|
+
lastUpdatedAt: z.unknown().optional(),
|
|
2800
|
+
display: z.object({
|
|
2801
|
+
defaultPriceInformation: z.string().max(150).optional(),
|
|
2802
|
+
defaultPriceInformationOffline: z.string().max(150).optional(),
|
|
2803
|
+
priceInformation: z.string().optional(),
|
|
2804
|
+
totalCostInformation: z.string().optional()
|
|
2805
|
+
}).optional(),
|
|
2806
|
+
integrationId: z.number().int().optional()
|
|
2807
|
+
});
|
|
2808
|
+
|
|
2809
|
+
// GET /public-api/resources/tariffs/v1.0/{tariff}
|
|
2810
|
+
|
|
2811
|
+
// PUT /public-api/resources/tariffs/v1.0/{tariff}
|
|
2812
|
+
export const tariffUpdateBody = z.unknown();
|
|
2813
|
+
|
|
2814
|
+
// DELETE /public-api/resources/tariffs/v1.0/{tariff}
|
|
2815
|
+
|
|
2816
|
+
// GET /public-api/resources/tax-identification-numbers/v2.0
|
|
2817
|
+
|
|
2818
|
+
// POST /public-api/resources/tax-identification-numbers/v2.0
|
|
2819
|
+
export const taxIdentificationNumberCreateBody = z.object({
|
|
2820
|
+
name: z.string()
|
|
2821
|
+
});
|
|
2822
|
+
|
|
2823
|
+
// GET /public-api/resources/tax-identification-numbers/v2.0/{taxIdentificationNumber}
|
|
2824
|
+
|
|
2825
|
+
// DELETE /public-api/resources/tax-identification-numbers/v2.0/{taxIdentificationNumber}
|
|
2826
|
+
|
|
2827
|
+
// PATCH /public-api/resources/tax-identification-numbers/v2.0/{taxIdentificationNumber}
|
|
2828
|
+
export const taxIdentificationNumberUpdateBody = z.object({
|
|
2829
|
+
name: z.string().optional()
|
|
2830
|
+
});
|
|
2831
|
+
|
|
2832
|
+
// GET /public-api/resources/taxes/v2.0
|
|
2833
|
+
|
|
2834
|
+
// POST /public-api/resources/taxes/v2.0
|
|
2835
|
+
export const taxCreateBody = z.object({
|
|
2836
|
+
name: z.string(),
|
|
2837
|
+
displayName: z.unknown().optional(),
|
|
2838
|
+
percentage: z.number(),
|
|
2839
|
+
taxIdentificationNumberId: z.number().int().optional()
|
|
2840
|
+
});
|
|
2841
|
+
|
|
2842
|
+
// GET /public-api/resources/taxes/v2.0/{tax}
|
|
2843
|
+
|
|
2844
|
+
// DELETE /public-api/resources/taxes/v2.0/{tax}
|
|
2845
|
+
|
|
2846
|
+
// PATCH /public-api/resources/taxes/v2.0/{tax}
|
|
2847
|
+
export const taxUpdateBody = z.object({
|
|
2848
|
+
name: z.string().optional(),
|
|
2849
|
+
displayName: z.unknown().optional(),
|
|
2850
|
+
percentage: z.number().optional(),
|
|
2851
|
+
taxIdentificationNumberId: z.number().int().optional()
|
|
2852
|
+
});
|
|
2853
|
+
|
|
2854
|
+
// GET /public-api/resources/templates/v1.0
|
|
2855
|
+
|
|
2856
|
+
// GET /public-api/resources/terms-and-policies/v2.0
|
|
2857
|
+
|
|
2858
|
+
// GET /public-api/resources/terms-and-policies/v2.0/{termVersion}
|
|
2859
|
+
|
|
2860
|
+
// GET /public-api/resources/top-up-packages/v2.0
|
|
2861
|
+
|
|
2862
|
+
// POST /public-api/resources/top-up-packages/v2.0
|
|
2863
|
+
export const topUpPackagCreateBody = z.object({
|
|
2864
|
+
price: z.number(),
|
|
2865
|
+
bonus: z.number(),
|
|
2866
|
+
enabled: z.boolean().optional()
|
|
2867
|
+
});
|
|
2868
|
+
|
|
2869
|
+
// GET /public-api/resources/top-up-packages/v2.0/{topUpPackage}
|
|
2870
|
+
|
|
2871
|
+
// DELETE /public-api/resources/top-up-packages/v2.0/{topUpPackage}
|
|
2872
|
+
|
|
2873
|
+
// PATCH /public-api/resources/top-up-packages/v2.0/{topUpPackage}
|
|
2874
|
+
export const topUpPackageUpdateBody = z.object({
|
|
2875
|
+
price: z.number().optional(),
|
|
2876
|
+
bonus: z.number().optional(),
|
|
2877
|
+
enabled: z.boolean().optional()
|
|
2878
|
+
});
|
|
2879
|
+
|
|
2880
|
+
// GET /public-api/resources/transactions/v1.0
|
|
2881
|
+
|
|
2882
|
+
// POST /public-api/resources/transactions/v1.0
|
|
2883
|
+
export const transactionsCreateBody = z.object({
|
|
2884
|
+
sessionId: z.number().int().optional(),
|
|
2885
|
+
paymentMethod: z.object({
|
|
2886
|
+
methodType: z.enum(["card", "bank_transfer", "wallet"]).optional(),
|
|
2887
|
+
cardNetwork: z.enum(["visa", "mastercard", "paypal", "maestro", "amex", "unknown"]).optional(),
|
|
2888
|
+
bankTransferType: z.enum(["pse", "sepa"]).optional(),
|
|
2889
|
+
walletType: z.enum(["applepay", "googlepay", "twint", "other"]).optional(),
|
|
2890
|
+
type: z.enum(["visa", "mastercard", "paypal", "maestro", "amex", "unknown"]).optional(),
|
|
2891
|
+
last4: z.string().min(4).max(4).optional(),
|
|
2892
|
+
expMonth: z.string().optional(),
|
|
2893
|
+
expYear: z.string().optional()
|
|
2894
|
+
}).optional(),
|
|
2895
|
+
totalAmount: z.number(),
|
|
2896
|
+
status: z.enum(["pending", "finalized", "failed", "reversed", "refunded", "authorized", "initialized"]),
|
|
2897
|
+
ref: z.string().optional(),
|
|
2898
|
+
failureReason: z.string().optional(),
|
|
2899
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2900
|
+
});
|
|
2901
|
+
|
|
2902
|
+
// GET /public-api/resources/transactions/v1.0/{transaction}
|
|
2903
|
+
|
|
2904
|
+
// PATCH /public-api/resources/transactions/v1.0/{transaction}
|
|
2905
|
+
export const transactionUpdateBody = z.object({
|
|
2906
|
+
paymentMethod: z.object({
|
|
2907
|
+
methodType: z.enum(["card", "bank_transfer"]).optional(),
|
|
2908
|
+
cardNetwork: z.enum(["visa", "mastercard", "paypal", "maestro", "amex", "unknown"]).optional(),
|
|
2909
|
+
bankTransferType: z.enum(["pse", "sepa"]).optional(),
|
|
2910
|
+
type: z.enum(["visa", "mastercard", "paypal", "maestro", "amex", "unknown"]).optional(),
|
|
2911
|
+
last4: z.string().min(4).max(4).optional(),
|
|
2912
|
+
expMonth: z.string().optional(),
|
|
2913
|
+
expYear: z.string().optional()
|
|
2914
|
+
}).optional(),
|
|
2915
|
+
status: z.enum(["pending", "finalized", "failed", "reversed", "refunded", "authorized", "initialized"]),
|
|
2916
|
+
totalAmount: z.number(),
|
|
2917
|
+
ref: z.string().optional(),
|
|
2918
|
+
failureReason: z.string().optional(),
|
|
2919
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2920
|
+
});
|
|
2921
|
+
|
|
2922
|
+
// 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
|
+
|
|
2930
|
+
// POST /public-api/resources/user-groups/v1.0
|
|
2931
|
+
export const userGroupCreateBody = z.object({
|
|
2932
|
+
name: z.string(),
|
|
2933
|
+
partnerId: z.number().int().optional(),
|
|
2934
|
+
description: z.string().max(2000).optional(),
|
|
2935
|
+
lastUpdatedAt: z.unknown().optional()
|
|
2936
|
+
});
|
|
2937
|
+
|
|
2938
|
+
// GET /public-api/resources/user-groups/v1.0/{userGroup}
|
|
2939
|
+
|
|
2940
|
+
// DELETE /public-api/resources/user-groups/v1.0/{userGroup}
|
|
2941
|
+
|
|
2942
|
+
// PATCH /public-api/resources/user-groups/v1.0/{userGroup}
|
|
2943
|
+
export const userGroupUpdateBody = z.unknown();
|
|
2944
|
+
|
|
2945
|
+
// GET /public-api/resources/users/v1.0
|
|
2946
|
+
|
|
2947
|
+
// POST /public-api/resources/users/v1.0
|
|
2948
|
+
export const userCreateBody = z.object({
|
|
2949
|
+
email: z.string().email(),
|
|
2950
|
+
emailVerified: z.string().optional(),
|
|
2951
|
+
password: z.string().min(6),
|
|
2952
|
+
requirePasswordReset: z.boolean().optional(),
|
|
2953
|
+
first_name: z.string().optional(),
|
|
2954
|
+
middle_name: z.string().optional(),
|
|
2955
|
+
last_name: z.string().optional(),
|
|
2956
|
+
phone: z.string().optional(),
|
|
2957
|
+
country: z.unknown().optional(),
|
|
2958
|
+
state: z.union([z.unknown(), z.unknown()]).optional(),
|
|
2959
|
+
city: z.string().optional(),
|
|
2960
|
+
post_code: z.string().optional(),
|
|
2961
|
+
address: z.string().optional(),
|
|
2962
|
+
vehicle_no: z.string().optional(),
|
|
2963
|
+
personal_id: z.string().optional(),
|
|
2964
|
+
locale: z.string().optional(),
|
|
2965
|
+
userGroupIds: z.array(z.number().int()).optional(),
|
|
2966
|
+
externalId: z.string().optional(),
|
|
2967
|
+
options: z.object({
|
|
2968
|
+
sessionsAllowed: z.enum(["single_session", "multiple_simultaneous_sessions_per_idtag", "simultaneous_use_of_idtags", "multiple_simultaneous_sessions_remotely_and_idtags"]).optional()
|
|
2969
|
+
}).optional(),
|
|
2970
|
+
lastUpdatedAt: z.unknown().optional(),
|
|
2971
|
+
receiveNewsAndPromotions: z.boolean().optional(),
|
|
2972
|
+
bankDetails: z.object({
|
|
2973
|
+
bankIban: z.string().optional(),
|
|
2974
|
+
bankName: z.string().optional(),
|
|
2975
|
+
bankAddress: z.string().optional(),
|
|
2976
|
+
bankCode: z.string().optional(),
|
|
2977
|
+
bankAccountNumber: z.string().optional(),
|
|
2978
|
+
bankAccountType: z.string().optional()
|
|
2979
|
+
}).optional(),
|
|
2980
|
+
externalAppData: z.unknown().optional(),
|
|
2981
|
+
nonce: z.string().optional()
|
|
2982
|
+
});
|
|
2983
|
+
|
|
2984
|
+
// GET /public-api/resources/users/v1.0/{user}
|
|
2985
|
+
export const userReadQueryParams = z.object({
|
|
2986
|
+
withAmountDue: z.boolean().optional()
|
|
2987
|
+
});
|
|
2988
|
+
|
|
2989
|
+
// DELETE /public-api/resources/users/v1.0/{user}
|
|
2990
|
+
|
|
2991
|
+
// PATCH /public-api/resources/users/v1.0/{user}
|
|
2992
|
+
export const userUpdateBody = z.object({
|
|
2993
|
+
email: z.string().email().optional(),
|
|
2994
|
+
emailVerified: z.string().optional(),
|
|
2995
|
+
password: z.string().min(6).optional(),
|
|
2996
|
+
requirePasswordReset: z.boolean().optional(),
|
|
2997
|
+
first_name: z.string().optional(),
|
|
2998
|
+
middle_name: z.string().optional(),
|
|
2999
|
+
last_name: z.string().optional(),
|
|
3000
|
+
phone: z.string().optional(),
|
|
3001
|
+
country: z.unknown().optional(),
|
|
3002
|
+
state: z.union([z.unknown(), z.unknown()]).optional(),
|
|
3003
|
+
city: z.string().optional(),
|
|
3004
|
+
post_code: z.string().optional(),
|
|
3005
|
+
address: z.string().optional(),
|
|
3006
|
+
vehicle_no: z.string().optional(),
|
|
3007
|
+
userGroupIds: z.array(z.number().int()).optional(),
|
|
3008
|
+
externalId: z.string().optional(),
|
|
3009
|
+
options: z.unknown().optional(),
|
|
3010
|
+
lastUpdatedAt: z.unknown().optional(),
|
|
3011
|
+
receiveNewsAndPromotions: z.boolean().optional(),
|
|
3012
|
+
bankDetails: z.unknown().optional(),
|
|
3013
|
+
externalAppData: z.unknown().optional()
|
|
3014
|
+
});
|
|
3015
|
+
|
|
3016
|
+
// GET /public-api/resources/users/v1.0/{user}/invoice-details
|
|
3017
|
+
|
|
3018
|
+
// POST /public-api/resources/users/v1.0/{user}/invoice-details
|
|
3019
|
+
export const invoiceDetailsCreateOrUpdateBody = z.union([z.object({
|
|
3020
|
+
requireInvoice: z.boolean(),
|
|
3021
|
+
invoiceType: z.enum(["individual", "company"]),
|
|
3022
|
+
individualName: z.string().optional(),
|
|
3023
|
+
individualPersonalId: z.string().optional(),
|
|
3024
|
+
individualTaxId: z.string().optional(),
|
|
3025
|
+
companyName: z.string().optional(),
|
|
3026
|
+
companyRegNo: z.string().optional(),
|
|
3027
|
+
companyTaxId: z.string().optional(),
|
|
3028
|
+
companyTaxAdministrationOfficeName: z.string().optional(),
|
|
3029
|
+
country: z.unknown().optional(),
|
|
3030
|
+
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(),
|
|
3032
|
+
city: z.string().optional(),
|
|
3033
|
+
postCode: z.string().optional(),
|
|
3034
|
+
address: z.string().optional()
|
|
3035
|
+
}), z.object({
|
|
3036
|
+
invoiceRequired: z.boolean(),
|
|
3037
|
+
clientType: z.enum(["individual", "company"]),
|
|
3038
|
+
name: z.string().optional(),
|
|
3039
|
+
email: z.string().optional(),
|
|
3040
|
+
mobilePhoneNumber: z.string().optional(),
|
|
3041
|
+
landlinePhoneNumber: z.string().optional(),
|
|
3042
|
+
taxId: z.string().optional(),
|
|
3043
|
+
country: z.unknown().optional(),
|
|
3044
|
+
city: z.string().optional(),
|
|
3045
|
+
postcode: z.string().optional(),
|
|
3046
|
+
address: z.string().optional()
|
|
3047
|
+
}), z.object({
|
|
3048
|
+
firstName: z.string(),
|
|
3049
|
+
lastName: z.string(),
|
|
3050
|
+
email: z.string(),
|
|
3051
|
+
phone: z.string().optional(),
|
|
3052
|
+
country: z.unknown().optional(),
|
|
3053
|
+
city: z.string().optional(),
|
|
3054
|
+
postcode: z.string().optional(),
|
|
3055
|
+
address: z.string().optional()
|
|
3056
|
+
}), z.object({
|
|
3057
|
+
invoiceType: z.enum(["EInvoice", "Company", "Donation"]),
|
|
3058
|
+
carrierType: z.enum(["Mobile", "Citizen", "GreenWorld"]).optional(),
|
|
3059
|
+
loveCode: z.string().optional(),
|
|
3060
|
+
mobileBarCode: z.string().optional(),
|
|
3061
|
+
citizenId: z.string().optional(),
|
|
3062
|
+
companyId: z.string().optional(),
|
|
3063
|
+
name: z.string(),
|
|
3064
|
+
email: z.string(),
|
|
3065
|
+
phone: z.string(),
|
|
3066
|
+
country: z.unknown().optional(),
|
|
3067
|
+
city: z.string().optional(),
|
|
3068
|
+
postcode: z.string().optional(),
|
|
3069
|
+
address: z.string().optional()
|
|
3070
|
+
})]);
|
|
3071
|
+
|
|
3072
|
+
// GET /public-api/resources/users/v1.0/{user}/payment-methods
|
|
3073
|
+
|
|
3074
|
+
// POST /public-api/resources/users/v1.0/{user}/payment-methods
|
|
3075
|
+
export const paymentMethodCreateBody = z.object({
|
|
3076
|
+
tokenizedType: z.enum(["card", "bank_transfer"]).optional(),
|
|
3077
|
+
bankTransferType: z.enum(["sepa"]).optional(),
|
|
3078
|
+
transactionId: z.number().optional()
|
|
3079
|
+
});
|
|
3080
|
+
|
|
3081
|
+
// GET /public-api/resources/users/v1.0/{user}/payment-methods/{paymentMethodId}
|
|
3082
|
+
|
|
3083
|
+
// DELETE /public-api/resources/users/v1.0/{user}/payment-methods/{paymentMethodId}
|
|
3084
|
+
|
|
3085
|
+
// PATCH /public-api/resources/users/v1.0/{user}/payment-methods/{paymentMethodId}
|
|
3086
|
+
export const paymentMethodUpdateBody = z.object({
|
|
3087
|
+
default: z.boolean().optional()
|
|
3088
|
+
});
|
|
3089
|
+
|
|
3090
|
+
// GET /public-api/resources/utilities/v1.0
|
|
3091
|
+
|
|
3092
|
+
// POST /public-api/resources/utilities/v1.0
|
|
3093
|
+
export const createUtilityBody = z.object({
|
|
3094
|
+
name: z.string().min(1).max(255)
|
|
3095
|
+
});
|
|
3096
|
+
|
|
3097
|
+
// GET /public-api/resources/utilities/v1.0/{utility}
|
|
3098
|
+
|
|
3099
|
+
// PUT /public-api/resources/utilities/v1.0/{utility}
|
|
3100
|
+
export const updateUtilityBody = z.unknown();
|
|
3101
|
+
|
|
3102
|
+
// DELETE /public-api/resources/utilities/v1.0/{utility}
|
|
3103
|
+
|
|
3104
|
+
// GET /public-api/resources/vendor-error-codes/v2.0
|
|
3105
|
+
|
|
3106
|
+
// POST /public-api/resources/vendor-error-codes/v2.0
|
|
3107
|
+
export const vendorErrorCodeCreateBody = z.object({
|
|
3108
|
+
id: z.number().int().optional(),
|
|
3109
|
+
vendorId: z.string(),
|
|
3110
|
+
errorCode: z.string(),
|
|
3111
|
+
errorCodeDescription: z.string().optional(),
|
|
3112
|
+
errorCodeCustomerAction: z.string().optional()
|
|
3113
|
+
});
|
|
3114
|
+
|
|
3115
|
+
// GET /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
|
|
3116
|
+
|
|
3117
|
+
// DELETE /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
|
|
3118
|
+
|
|
3119
|
+
// PATCH /public-api/resources/vendor-error-codes/v2.0/{vendorErrorCode}
|
|
3120
|
+
export const vendorErrorCodeUpdateBody = z.unknown();
|
|
3121
|
+
|
|
3122
|
+
// GET /public-api/resources/vouchers/v2.0
|
|
3123
|
+
|
|
3124
|
+
// POST /public-api/resources/vouchers/v2.0
|
|
3125
|
+
export const voucherCreateDeprecatedBody = z.object({
|
|
3126
|
+
amount: z.number(),
|
|
3127
|
+
expireDate: z.string().optional(),
|
|
3128
|
+
description: z.string().optional()
|
|
3129
|
+
});
|
|
3130
|
+
|
|
3131
|
+
// GET /public-api/resources/vouchers/v2.0/{voucher}
|
|
3132
|
+
|
|
3133
|
+
// DELETE /public-api/resources/vouchers/v2.0/{voucher}
|
|
3134
|
+
|
|
3135
|
+
// PATCH /public-api/resources/vouchers/v2.0/{voucher}
|
|
3136
|
+
export const voucherUpdateDeprecatedBody = z.object({
|
|
3137
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
3138
|
+
expireDate: z.string().optional(),
|
|
3139
|
+
amount: z.number()
|
|
3140
|
+
});
|
|
3141
|
+
|
|
3142
|
+
// GET /public-api/resources/vouchers/v2.1
|
|
3143
|
+
|
|
3144
|
+
// POST /public-api/resources/vouchers/v2.1
|
|
3145
|
+
export const voucherCreateBody = z.object({
|
|
3146
|
+
amount: z.number(),
|
|
3147
|
+
expireDate: z.string().optional(),
|
|
3148
|
+
validityPeriod: z.enum(["1 month", "3 months", "6 months", "1 year", "2 years", "3 years", "5 years"]).optional(),
|
|
3149
|
+
assignBeforeDate: z.string().optional(),
|
|
3150
|
+
description: z.string().optional(),
|
|
3151
|
+
prefix: z.string().min(3).max(3).optional(),
|
|
3152
|
+
title: z.array(z.object({
|
|
3153
|
+
locale: z.string().optional(),
|
|
3154
|
+
translation: z.string().optional()
|
|
3155
|
+
})).optional()
|
|
3156
|
+
});
|
|
3157
|
+
|
|
3158
|
+
// GET /public-api/resources/vouchers/v2.1/{voucher}
|
|
3159
|
+
|
|
3160
|
+
// DELETE /public-api/resources/vouchers/v2.1/{voucher}
|
|
3161
|
+
|
|
3162
|
+
// PATCH /public-api/resources/vouchers/v2.1/{voucher}
|
|
3163
|
+
export const voucherUpdateBody = z.object({
|
|
3164
|
+
status: z.enum(["enabled", "disabled"]).optional(),
|
|
3165
|
+
expireDate: z.unknown().optional(),
|
|
3166
|
+
validityPeriod: z.unknown().optional(),
|
|
3167
|
+
assignBeforeDate: z.string().optional(),
|
|
3168
|
+
amount: z.number(),
|
|
3169
|
+
prefix: z.string().min(3).max(3).optional(),
|
|
3170
|
+
title: z.unknown().optional()
|
|
3171
|
+
});
|