@bikefinder/api-client 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +3 -1
  2. package/dist/admin/generated/index.d.ts +1 -1
  3. package/dist/admin/generated/index.d.ts.map +1 -1
  4. package/dist/admin/generated/sdk.gen.d.ts +173 -19
  5. package/dist/admin/generated/sdk.gen.d.ts.map +1 -1
  6. package/dist/admin/generated/sdk.gen.js +377 -125
  7. package/dist/admin/generated/sdk.gen.js.map +1 -1
  8. package/dist/admin/generated/types.gen.d.ts +1468 -431
  9. package/dist/admin/generated/types.gen.d.ts.map +1 -1
  10. package/dist/admin/generated/zod.gen.d.ts +2726 -1638
  11. package/dist/admin/generated/zod.gen.d.ts.map +1 -1
  12. package/dist/admin/generated/zod.gen.js +410 -270
  13. package/dist/admin/generated/zod.gen.js.map +1 -1
  14. package/dist/generated/index.d.ts +1 -1
  15. package/dist/generated/index.d.ts.map +1 -1
  16. package/dist/generated/sdk.gen.d.ts +80 -45
  17. package/dist/generated/sdk.gen.d.ts.map +1 -1
  18. package/dist/generated/sdk.gen.js +192 -157
  19. package/dist/generated/sdk.gen.js.map +1 -1
  20. package/dist/generated/types.gen.d.ts +887 -453
  21. package/dist/generated/types.gen.d.ts.map +1 -1
  22. package/dist/generated/zod.gen.d.ts +468 -286
  23. package/dist/generated/zod.gen.d.ts.map +1 -1
  24. package/dist/generated/zod.gen.js +188 -201
  25. package/dist/generated/zod.gen.js.map +1 -1
  26. package/dist/realtime/api-stream-error.d.ts +2 -1
  27. package/dist/realtime/api-stream-error.d.ts.map +1 -1
  28. package/dist/realtime/api-stream-error.js +8 -1
  29. package/dist/realtime/api-stream-error.js.map +1 -1
  30. package/dist/realtime/watch.d.ts.map +1 -1
  31. package/dist/realtime/watch.js +1 -1
  32. package/dist/realtime/watch.js.map +1 -1
  33. package/dist/transport.js +10 -1
  34. package/dist/transport.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/admin/generated/index.ts +65 -7
  37. package/src/admin/generated/sdk.gen.ts +720 -300
  38. package/src/admin/generated/types.gen.ts +1646 -513
  39. package/src/admin/generated/zod.gen.ts +474 -286
  40. package/src/generated/index.ts +6 -2
  41. package/src/generated/sdk.gen.ts +408 -373
  42. package/src/generated/types.gen.ts +956 -516
  43. package/src/generated/zod.gen.ts +217 -231
  44. package/src/realtime/api-stream-error.ts +12 -1
  45. package/src/realtime/watch.ts +6 -1
  46. package/src/transport.ts +10 -1
@@ -3,8 +3,8 @@
3
3
  import * as z from "zod";
4
4
 
5
5
  export const zAdminAddMemberRequest = z.object({
6
- email: z.string(),
7
- description: z.string().optional().default(""),
6
+ email: z.string().max(320),
7
+ description: z.string().max(1000).optional().default(""),
8
8
  });
9
9
 
10
10
  export const zAdminB2bSubscriptionResult = z.object({
@@ -24,18 +24,18 @@ export const zAdminB2bTier = z.enum([
24
24
  ]);
25
25
 
26
26
  export const zAdminB2bSubscriptionRequest = z.object({
27
- company: z.string(),
28
- streetName: z.string(),
29
- postalArea: z.string(),
27
+ requestId: z.string().regex(/^[A-Za-z0-9_-]{16,128}$/),
28
+ company: z.string().max(128),
29
+ streetName: z.string().max(123),
30
+ postalArea: z.string().max(32),
30
31
  tier: zAdminB2bTier,
31
- country: z.string(),
32
- email: z.string(),
33
- quantity: z.int().gte(-9007199254740991).lte(9007199254740991),
34
- date: z.string(),
35
- nextPaymentDate: z.string(),
36
- tierInfo: z.string(),
37
- description: z.string().optional().default(""),
38
- requestId: z.string().nullish(),
32
+ country: z.string().regex(/^[A-Z]{2}$/),
33
+ email: z.string().max(125),
34
+ quantity: z.int().gte(1).lte(2147483647),
35
+ startsAt: z.iso.datetime({ offset: true }),
36
+ nextPaymentAt: z.iso.datetime({ offset: true }),
37
+ tierInfo: z.string().max(4000),
38
+ description: z.string().max(4000).optional().default(""),
39
39
  });
40
40
 
41
41
  export const zAdminBikeRequest = z.object({
@@ -47,47 +47,67 @@ export const zAdminConfigurationRequest = z.object({
47
47
  });
48
48
 
49
49
  export const zAdminDenylistRequest = z.object({
50
- requestId: z.string(),
50
+ requestId: z
51
+ .string()
52
+ .regex(
53
+ /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/,
54
+ ),
51
55
  value: z.boolean(),
52
56
  expected: z.boolean(),
53
- reason: z.string().nullish(),
57
+ reason: z.string().max(1000).nullish(),
54
58
  });
55
59
 
56
- export const zAdminDeviceCommandResult = z.object({
57
- success: z.boolean(),
58
- commandId: z.string(),
59
- jobIds: z.array(z.string()),
60
+ export const zAdminEvidenceAccountsRequest = z.object({
61
+ accountIds: z.array(z.string()).min(1).max(20),
60
62
  });
61
63
 
62
- export const zAdminFavoriteRequest = z.object({
63
- comment: z.string(),
64
- });
64
+ export const zAdminEvidenceDomain = z.enum([
65
+ "battery",
66
+ "versions",
67
+ "reporting",
68
+ "configuration",
69
+ "membershipReference",
70
+ "membershipState",
71
+ "commerceReference",
72
+ "plan",
73
+ "availability",
74
+ "bindingCount",
75
+ ]);
65
76
 
66
- export const zAdminGeneration = z.enum(["g1", "gen2"]);
77
+ export const zAdminEvidenceHistoryGroup = z.enum([
78
+ "battery",
79
+ "versions",
80
+ "reporting",
81
+ "diagnostics",
82
+ ]);
67
83
 
68
- export const zAdminHistoryCollection = z.enum([
84
+ export const zAdminEvidenceHistorySource = z.enum([
69
85
  "data",
70
- "images",
71
- "logs",
72
- "productionData",
73
86
  "sanitizedData",
87
+ "bluetooth",
88
+ "audit",
89
+ "commandPackets",
74
90
  ]);
75
91
 
76
- export const zAdminInsuranceProvider = z.enum(["cycler", "hepster", "tryg"]);
92
+ export const zAdminFavoriteRequest = z.object({
93
+ comment: z.string().max(4000),
94
+ });
95
+
96
+ export const zAdminGeneration = z.enum(["gen1", "gen2"]);
77
97
 
78
98
  export const zAdminLinkSubscriptionRequest = z.object({
79
99
  subscriptionId: z.string(),
80
100
  });
81
101
 
82
102
  export const zAdminLookupRequest = z.object({
83
- uids: z.array(z.string()).nullish(),
84
- emails: z.array(z.string()).nullish(),
103
+ uids: z.array(z.string()).max(100).nullish(),
104
+ emails: z.array(z.string()).max(100).nullish(),
85
105
  });
86
106
 
87
107
  export const zAdminLookupUser = z.object({
88
108
  userId: z.string(),
89
- email: z.string().nullish(),
90
- nickname: z.string().nullish(),
109
+ email: z.string().nullable(),
110
+ nickname: z.string().nullable(),
91
111
  });
92
112
 
93
113
  export const zAdminLookupResult = z.object({
@@ -107,29 +127,53 @@ export const zAdminModeRequest = z.object({
107
127
  });
108
128
 
109
129
  export const zAdminNotificationRequest = z.object({
110
- requestId: z.string(),
111
- title: z.string(),
112
- message: z.string(),
130
+ requestId: z
131
+ .string()
132
+ .regex(
133
+ /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/,
134
+ ),
135
+ title: z.string().max(200),
136
+ message: z.string().max(4000),
113
137
  supportTimestamp: z.boolean().nullish(),
114
- log: z.string().nullish(),
138
+ log: z.string().max(1000).nullish(),
115
139
  });
116
140
 
117
- export const zAdminPrivateDomain = z.enum([
118
- "battery",
119
- "firmware",
120
- "runtime",
121
- "statistics",
141
+ export const zAdminRelationshipKind = z.enum([
142
+ "subscriptionBinding",
143
+ "deviceAccount",
122
144
  ]);
123
145
 
124
- export const zAdminPublicDomain = z.enum([
125
- "battery",
126
- "configuration",
127
- "contact",
128
- "location",
129
- ]);
146
+ export const zAdminRelationshipChangeRequest = z.object({
147
+ accountIds: z.array(z.string()).min(1).max(20),
148
+ kind: zAdminRelationshipKind,
149
+ accountId: z.string().min(1).max(128),
150
+ expectedVersion: z.string().regex(/^[a-f0-9]{64}$/),
151
+ subscriptionId: z.string().nullish(),
152
+ allowLastAccountCleanup: z.boolean().optional().default(false),
153
+ });
154
+
155
+ export const zAdminRelationshipRequest = z.object({
156
+ accountIds: z.array(z.string()).min(1).max(20),
157
+ kind: zAdminRelationshipKind,
158
+ });
159
+
160
+ export const zAdminRelationshipVerification = z.object({
161
+ verified: z.boolean(),
162
+ });
163
+
164
+ export const zAdminRelationshipVerificationRequest = z.object({
165
+ kind: zAdminRelationshipKind,
166
+ accountId: z.string().min(1).max(128),
167
+ remainingAccountIds: z.array(z.string()).max(100),
168
+ subscriptionId: z.string().nullish(),
169
+ });
130
170
 
131
171
  export const zAdminRequestId = z.object({
132
- requestId: z.string(),
172
+ requestId: z
173
+ .string()
174
+ .regex(
175
+ /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/,
176
+ ),
133
177
  });
134
178
 
135
179
  export const zAdminSession = z.object({
@@ -139,8 +183,6 @@ export const zAdminSession = z.object({
139
183
  isSalesUser: z.boolean(),
140
184
  });
141
185
 
142
- export const zAdminSubscriptionSearchKind = z.enum(["b2b", "uid", "wooId"]);
143
-
144
186
  export const zAdminSupportValue = z
145
187
  .union([
146
188
  z.boolean(),
@@ -185,16 +227,16 @@ export const zAdminDocument = z.object({
185
227
  });
186
228
 
187
229
  export const zAdminPublicStates = z.object({
188
- contact: zAdminDocument.nullish(),
189
- battery: zAdminDocument.nullish(),
190
- location: zAdminDocument.nullish(),
191
- configuration: zAdminDocument.nullish(),
230
+ contact: zAdminDocument.nullable(),
231
+ battery: zAdminDocument.nullable(),
232
+ location: zAdminDocument.nullable(),
233
+ configuration: zAdminDocument.nullable(),
192
234
  });
193
235
 
194
236
  export const zAdminReadResult = z.object({
195
237
  documents: z.array(zAdminDocument),
196
238
  nextCursor: z.string().nullable(),
197
- states: zAdminPublicStates.nullish(),
239
+ states: zAdminPublicStates.nullable(),
198
240
  });
199
241
 
200
242
  export const zAdminTimestamp = z.object({
@@ -209,6 +251,36 @@ export const zAdminTimestamp = z.object({
209
251
  }),
210
252
  });
211
253
 
254
+ export const zAdminEvidenceCursor = z.object({
255
+ timestamp: zAdminTimestamp,
256
+ id: z.string().min(1).max(254),
257
+ });
258
+
259
+ export const zAdminEvidenceDocument = z.object({
260
+ id: z.string(),
261
+ path: z.string(),
262
+ exists: z.boolean(),
263
+ fields: zAdminSupportValue.nullable(),
264
+ updatedAt: zAdminTimestamp.nullable(),
265
+ createdAt: zAdminTimestamp.nullable(),
266
+ readAt: zAdminTimestamp,
267
+ });
268
+
269
+ export const zAdminEvidenceHistoryRequest = z.object({
270
+ accountId: z.string().min(1).max(128),
271
+ source: zAdminEvidenceHistorySource,
272
+ from: z.iso.datetime({ offset: true }),
273
+ to: z.iso.datetime({ offset: true }),
274
+ after: zAdminEvidenceCursor.nullish(),
275
+ fields: z.array(zAdminEvidenceHistoryGroup).min(1).max(4).nullish(),
276
+ });
277
+
278
+ export const zAdminEvidenceSnapshot = z.object({
279
+ documents: z.array(zAdminEvidenceDocument),
280
+ relatedDocuments: z.array(zAdminEvidenceDocument),
281
+ readAt: zAdminTimestamp,
282
+ });
283
+
212
284
  export const zAdminTrackerCommand = z.enum([
213
285
  "changeEncryptionKey",
214
286
  "changeRareConfigs",
@@ -226,12 +298,17 @@ export const zAdminTrackerCommandRequest = z.object({
226
298
  expectedCommand: z.string().nullable(),
227
299
  });
228
300
 
229
- export const zAdminTrackerSearchKind = z.enum([
230
- "iccid",
231
- "imei",
232
- "subscriptionId",
233
- "uid",
234
- ]);
301
+ export const zAdminTrackerCommandResult = z.object({
302
+ success: z.boolean(),
303
+ commandId: z.string(),
304
+ jobIds: z.array(z.string()),
305
+ });
306
+
307
+ export const zAdminTrackerFactsRequest = z.object({
308
+ target: z.string().min(1).max(254),
309
+ accountIds: z.array(z.string()).min(1).max(20),
310
+ domain: zAdminEvidenceDomain,
311
+ });
235
312
 
236
313
  export const zCommandSuccess = z.object({
237
314
  success: z.boolean(),
@@ -247,10 +324,10 @@ export const zAdminOperationalDomain = z.object({
247
324
  });
248
325
 
249
326
  export const zAdminOperationalDomains = z.object({
250
- battery: zAdminOperationalDomain.nullish(),
251
- runtime: zAdminOperationalDomain.nullish(),
252
- statistics: zAdminOperationalDomain.nullish(),
253
- firmware: zAdminOperationalDomain.nullish(),
327
+ battery: zAdminOperationalDomain.nullable(),
328
+ runtime: zAdminOperationalDomain.nullable(),
329
+ statistics: zAdminOperationalDomain.nullable(),
330
+ firmware: zAdminOperationalDomain.nullable(),
254
331
  });
255
332
 
256
333
  export const zAdminOperationalState = z.object({
@@ -291,277 +368,242 @@ export const zProblemDetails = z.object({
291
368
  .nullish(),
292
369
  detail: z.string().nullish(),
293
370
  instance: z.string().nullish(),
371
+ code: z.string(),
372
+ traceId: z.string(),
373
+ errors: z.record(z.string(), z.array(z.string())).optional(),
294
374
  });
295
375
 
296
- export const zAdminUploadTrackerPhotoBody = z
297
- .object({
298
- file: zIFormFile,
299
- })
300
- .and(
301
- z.object({
302
- kind: z.string(),
303
- }),
304
- )
305
- .and(
306
- z.object({
307
- width: z
308
- .int()
309
- .min(-2147483648, {
310
- error: "Invalid value: Expected int32 to be >= -2147483648",
311
- })
312
- .max(2147483647, {
313
- error: "Invalid value: Expected int32 to be <= 2147483647",
314
- }),
315
- }),
316
- )
317
- .and(
318
- z.object({
319
- height: z
320
- .int()
321
- .min(-2147483648, {
322
- error: "Invalid value: Expected int32 to be >= -2147483648",
323
- })
324
- .max(2147483647, {
325
- error: "Invalid value: Expected int32 to be <= 2147483647",
326
- }),
327
- }),
328
- );
376
+ export const zAdminListAccountTrackerEvidencePath = z.object({
377
+ accountId: z.string(),
378
+ });
329
379
 
330
- export const zAdminUploadTrackerPhotoPath = z.object({
331
- trackerId: z
332
- .string()
333
- .min(1)
334
- .max(128)
335
- .regex(/^[A-Za-z0-9_-]+$/),
380
+ export const zAdminListAccountTrackerEvidenceQuery = z.object({
381
+ after: z.string().optional(),
336
382
  });
337
383
 
338
384
  /**
339
385
  * OK
340
386
  */
341
- export const zAdminUploadTrackerPhotoResponse = zPhotoUploadResult;
387
+ export const zAdminListAccountTrackerEvidenceResponse = zAdminEvidenceSnapshot;
342
388
 
343
- export const zAdminGetTrackerPath = z.object({
344
- trackerId: z
345
- .string()
346
- .min(1)
347
- .max(128)
348
- .regex(/^[A-Za-z0-9_-]+$/),
389
+ export const zAdminListAccountSubscriptionEvidencePath = z.object({
390
+ accountId: z.string(),
349
391
  });
350
392
 
351
- export const zAdminGetTrackerQuery = z.object({
352
- domains: z.array(zAdminPublicDomain).optional(),
393
+ export const zAdminListAccountSubscriptionEvidenceQuery = z.object({
394
+ after: z.string().optional(),
353
395
  });
354
396
 
355
397
  /**
356
398
  * OK
357
399
  */
358
- export const zAdminGetTrackerResponse = zAdminReadResult;
400
+ export const zAdminListAccountSubscriptionEvidenceResponse =
401
+ zAdminEvidenceSnapshot;
359
402
 
360
- export const zAdminSearchTrackersQuery = z.object({
361
- kind: zAdminTrackerSearchKind,
362
- value: z.string(),
363
- cursor: z.string().optional(),
364
- });
403
+ export const zAdminQueryTrackerFactEvidenceBody = zAdminTrackerFactsRequest;
365
404
 
366
405
  /**
367
406
  * OK
368
407
  */
369
- export const zAdminSearchTrackersResponse = zAdminReadResult;
408
+ export const zAdminQueryTrackerFactEvidenceResponse = zAdminEvidenceSnapshot;
370
409
 
371
- export const zAdminGetUserPath = z.object({
372
- uid: z.string(),
373
- });
374
-
375
- /**
376
- * OK
377
- */
378
- export const zAdminGetUserResponse = zAdminReadResult;
379
-
380
- export const zAdminGetSubscriptionPath = z.object({
410
+ export const zAdminGetSubscriptionFactEvidencePath = z.object({
381
411
  subscriptionId: z.string(),
382
412
  });
383
413
 
384
- /**
385
- * OK
386
- */
387
- export const zAdminGetSubscriptionResponse = zAdminReadResult;
388
-
389
- export const zAdminSearchSubscriptionsQuery = z.object({
390
- kind: zAdminSubscriptionSearchKind,
391
- value: z.string().optional().default(""),
392
- cursor: z.string().optional(),
414
+ export const zAdminGetSubscriptionFactEvidenceQuery = z.object({
415
+ domain: z.enum([
416
+ "battery",
417
+ "versions",
418
+ "reporting",
419
+ "configuration",
420
+ "membershipReference",
421
+ "membershipState",
422
+ "commerceReference",
423
+ "plan",
424
+ "availability",
425
+ "bindingCount",
426
+ ]),
393
427
  });
394
428
 
395
429
  /**
396
430
  * OK
397
431
  */
398
- export const zAdminSearchSubscriptionsResponse = zAdminReadResult;
432
+ export const zAdminGetSubscriptionFactEvidenceResponse = zAdminEvidenceSnapshot;
399
433
 
400
- export const zAdminListInsurancePath = z.object({
401
- subscriptionId: z.string(),
402
- provider: zAdminInsuranceProvider,
403
- });
434
+ export const zAdminQueryTrackerSubscriptionEvidenceBody =
435
+ zAdminEvidenceAccountsRequest;
404
436
 
405
- export const zAdminListInsuranceQuery = z.object({
406
- cursor: z.string().optional(),
437
+ export const zAdminQueryTrackerSubscriptionEvidencePath = z.object({
438
+ trackerId: z
439
+ .string()
440
+ .length(32)
441
+ .regex(/^[a-f0-9]{32}$/),
407
442
  });
408
443
 
409
444
  /**
410
445
  * OK
411
446
  */
412
- export const zAdminListInsuranceResponse = zAdminReadResult;
447
+ export const zAdminQueryTrackerSubscriptionEvidenceResponse =
448
+ zAdminEvidenceSnapshot;
413
449
 
414
- export const zAdminListFavoritesQuery = z.object({
415
- cursor: z.string().optional(),
450
+ export const zAdminQueryCommerceBindingEvidenceBody =
451
+ zAdminEvidenceAccountsRequest;
452
+
453
+ export const zAdminQueryCommerceBindingEvidencePath = z.object({
454
+ wooId: z.int().gte(-9007199254740991).lte(9007199254740991),
416
455
  });
417
456
 
418
457
  /**
419
458
  * OK
420
459
  */
421
- export const zAdminListFavoritesResponse = zAdminReadResult;
460
+ export const zAdminQueryCommerceBindingEvidenceResponse =
461
+ zAdminEvidenceSnapshot;
422
462
 
423
- export const zAdminDeleteFavoritePath = z.object({
463
+ export const zAdminQueryTrackerHistoryEvidenceBody =
464
+ zAdminEvidenceHistoryRequest;
465
+
466
+ export const zAdminQueryTrackerHistoryEvidencePath = z.object({
424
467
  trackerId: z
425
468
  .string()
426
- .min(1)
427
- .max(128)
428
- .regex(/^[A-Za-z0-9_-]+$/),
469
+ .length(32)
470
+ .regex(/^[a-f0-9]{32}$/),
429
471
  });
430
472
 
431
473
  /**
432
474
  * OK
433
475
  */
434
- export const zAdminDeleteFavoriteResponse = zCommandSuccess;
476
+ export const zAdminQueryTrackerHistoryEvidenceResponse = zAdminEvidenceSnapshot;
435
477
 
436
- export const zAdminGetFavoritePath = z.object({
478
+ export const zAdminQueryTrackerRelationshipEvidenceBody =
479
+ zAdminRelationshipRequest;
480
+
481
+ export const zAdminQueryTrackerRelationshipEvidencePath = z.object({
437
482
  trackerId: z
438
483
  .string()
439
- .min(1)
440
- .max(128)
441
- .regex(/^[A-Za-z0-9_-]+$/),
484
+ .length(32)
485
+ .regex(/^[a-f0-9]{32}$/),
442
486
  });
443
487
 
444
488
  /**
445
489
  * OK
446
490
  */
447
- export const zAdminGetFavoriteResponse = zAdminReadResult;
491
+ export const zAdminQueryTrackerRelationshipEvidenceResponse =
492
+ zAdminEvidenceSnapshot;
448
493
 
449
- export const zAdminUpdateFavoriteCommentBody = zAdminFavoriteRequest;
494
+ export const zAdminChangeTrackerRelationshipBody =
495
+ zAdminRelationshipChangeRequest;
450
496
 
451
- export const zAdminUpdateFavoriteCommentPath = z.object({
497
+ export const zAdminChangeTrackerRelationshipPath = z.object({
452
498
  trackerId: z
453
499
  .string()
454
- .min(1)
455
- .max(128)
456
- .regex(/^[A-Za-z0-9_-]+$/),
500
+ .length(32)
501
+ .regex(/^[a-f0-9]{32}$/),
457
502
  });
458
503
 
459
504
  /**
460
505
  * OK
461
506
  */
462
- export const zAdminUpdateFavoriteCommentResponse = zCommandSuccess;
507
+ export const zAdminChangeTrackerRelationshipResponse = zCommandSuccess;
463
508
 
464
- export const zAdminPutFavoriteBody = zAdminFavoriteRequest;
509
+ export const zAdminVerifyTrackerRelationshipBody =
510
+ zAdminRelationshipVerificationRequest;
465
511
 
466
- export const zAdminPutFavoritePath = z.object({
512
+ export const zAdminVerifyTrackerRelationshipPath = z.object({
467
513
  trackerId: z
468
514
  .string()
469
- .min(1)
470
- .max(128)
471
- .regex(/^[A-Za-z0-9_-]+$/),
515
+ .length(32)
516
+ .regex(/^[a-f0-9]{32}$/),
472
517
  });
473
518
 
474
519
  /**
475
520
  * OK
476
521
  */
477
- export const zAdminPutFavoriteResponse = zCommandSuccess;
478
-
479
- export const zAdminListTrackerHistoryPath = z.object({
480
- trackerId: z
481
- .string()
482
- .min(1)
483
- .max(128)
484
- .regex(/^[A-Za-z0-9_-]+$/),
485
- collection: zAdminHistoryCollection,
486
- });
487
-
488
- export const zAdminListTrackerHistoryQuery = z.object({
489
- from: z.int().gte(-9007199254740991).lte(9007199254740991).optional(),
490
- to: z.int().gte(-9007199254740991).lte(9007199254740991).optional(),
491
- cursor: z.string().optional(),
492
- });
522
+ export const zAdminVerifyTrackerRelationshipResponse =
523
+ zAdminRelationshipVerification;
493
524
 
494
525
  /**
495
526
  * OK
496
527
  */
497
- export const zAdminListTrackerHistoryResponse = zAdminReadResult;
528
+ export const zAdminGetSessionResponse = zAdminSession;
498
529
 
499
- export const zAdminGetTrackerOperationalStatePath = z.object({
530
+ export const zAdminGetTrackerPath = z.object({
500
531
  trackerId: z
501
532
  .string()
502
- .min(1)
503
- .max(128)
504
- .regex(/^[A-Za-z0-9_-]+$/),
533
+ .length(32)
534
+ .regex(/^[a-f0-9]{32}$/),
505
535
  });
506
536
 
507
- export const zAdminGetTrackerOperationalStateQuery = z.object({
508
- domains: z.array(zAdminPrivateDomain),
537
+ export const zAdminGetTrackerQuery = z.object({
538
+ domains: z
539
+ .array(z.enum(["battery", "configuration", "contact", "location"]))
540
+ .optional(),
509
541
  });
510
542
 
511
543
  /**
512
544
  * OK
513
545
  */
514
- export const zAdminGetTrackerOperationalStateResponse = zAdminOperationalState;
515
-
516
- /**
517
- * OK
518
- */
519
- export const zAdminGetSessionResponse = zAdminSession;
546
+ export const zAdminGetTrackerResponse = zAdminReadResult;
520
547
 
521
- export const zAdminLookupUsersBody = zAdminLookupRequest;
548
+ export const zAdminSearchTrackersQuery = z.object({
549
+ kind: z.enum(["iccid", "imei", "subscriptionId", "uid"]),
550
+ value: z.string(),
551
+ cursor: z.string().optional(),
552
+ });
522
553
 
523
554
  /**
524
555
  * OK
525
556
  */
526
- export const zAdminLookupUsersResponse = zAdminLookupResult;
527
-
528
- export const zAdminAddTrackerMemberBody = zAdminAddMemberRequest;
557
+ export const zAdminSearchTrackersResponse = zAdminReadResult;
529
558
 
530
- export const zAdminAddTrackerMemberPath = z.object({
559
+ export const zAdminListTrackerHistoryPath = z.object({
531
560
  trackerId: z
532
561
  .string()
533
- .min(1)
534
- .max(128)
535
- .regex(/^[A-Za-z0-9_-]+$/),
562
+ .length(32)
563
+ .regex(/^[a-f0-9]{32}$/),
564
+ collection: z.enum([
565
+ "data",
566
+ "images",
567
+ "logs",
568
+ "productionData",
569
+ "sanitizedData",
570
+ ]),
571
+ });
572
+
573
+ export const zAdminListTrackerHistoryQuery = z.object({
574
+ from: z.iso.datetime({ offset: true }).optional(),
575
+ to: z.iso.datetime({ offset: true }).optional(),
576
+ cursor: z.string().optional(),
536
577
  });
537
578
 
538
579
  /**
539
580
  * OK
540
581
  */
541
- export const zAdminAddTrackerMemberResponse = zCommandSuccess;
582
+ export const zAdminListTrackerHistoryResponse = zAdminReadResult;
542
583
 
543
- export const zAdminRemoveTrackerMemberPath = z.object({
584
+ export const zAdminGetTrackerOperationalStatePath = z.object({
544
585
  trackerId: z
545
586
  .string()
546
- .min(1)
547
- .max(128)
548
- .regex(/^[A-Za-z0-9_-]+$/),
549
- uid: z.string(),
587
+ .length(32)
588
+ .regex(/^[a-f0-9]{32}$/),
589
+ });
590
+
591
+ export const zAdminGetTrackerOperationalStateQuery = z.object({
592
+ domains: z.array(z.enum(["battery", "firmware", "runtime", "statistics"])),
550
593
  });
551
594
 
552
595
  /**
553
596
  * OK
554
597
  */
555
- export const zAdminRemoveTrackerMemberResponse = zCommandSuccess;
598
+ export const zAdminGetTrackerOperationalStateResponse = zAdminOperationalState;
556
599
 
557
600
  export const zAdminRequestTrackerModeBody = zAdminModeRequest;
558
601
 
559
602
  export const zAdminRequestTrackerModePath = z.object({
560
603
  trackerId: z
561
604
  .string()
562
- .min(1)
563
- .max(128)
564
- .regex(/^[A-Za-z0-9_-]+$/),
605
+ .length(32)
606
+ .regex(/^[a-f0-9]{32}$/),
565
607
  });
566
608
 
567
609
  /**
@@ -574,9 +616,8 @@ export const zAdminRequestTrackerCommandBody = zAdminTrackerCommandRequest;
574
616
  export const zAdminRequestTrackerCommandPath = z.object({
575
617
  trackerId: z
576
618
  .string()
577
- .min(1)
578
- .max(128)
579
- .regex(/^[A-Za-z0-9_-]+$/),
619
+ .length(32)
620
+ .regex(/^[a-f0-9]{32}$/),
580
621
  });
581
622
 
582
623
  /**
@@ -589,9 +630,8 @@ export const zAdminUpdateTrackerConfigurationBody = zAdminConfigurationRequest;
589
630
  export const zAdminUpdateTrackerConfigurationPath = z.object({
590
631
  trackerId: z
591
632
  .string()
592
- .min(1)
593
- .max(128)
594
- .regex(/^[A-Za-z0-9_-]+$/),
633
+ .length(32)
634
+ .regex(/^[a-f0-9]{32}$/),
595
635
  });
596
636
 
597
637
  /**
@@ -604,9 +644,8 @@ export const zAdminUpdateTrackerBikeBody = zAdminBikeRequest;
604
644
  export const zAdminUpdateTrackerBikePath = z.object({
605
645
  trackerId: z
606
646
  .string()
607
- .min(1)
608
- .max(128)
609
- .regex(/^[A-Za-z0-9_-]+$/),
647
+ .length(32)
648
+ .regex(/^[a-f0-9]{32}$/),
610
649
  });
611
650
 
612
651
  /**
@@ -619,108 +658,107 @@ export const zAdminCleanTrackerBody = zAdminRequestId;
619
658
  export const zAdminCleanTrackerPath = z.object({
620
659
  trackerId: z
621
660
  .string()
622
- .min(1)
623
- .max(128)
624
- .regex(/^[A-Za-z0-9_-]+$/),
661
+ .length(32)
662
+ .regex(/^[a-f0-9]{32}$/),
625
663
  });
626
664
 
627
665
  /**
628
- * OK
666
+ * Accepted
629
667
  */
630
- export const zAdminCleanTrackerResponse = zAdminDeviceCommandResult;
668
+ export const zAdminCleanTrackerResponse = zAdminTrackerCommandResult;
631
669
 
632
670
  export const zAdminSetTrackerDenylistBody = zAdminDenylistRequest;
633
671
 
634
672
  export const zAdminSetTrackerDenylistPath = z.object({
635
673
  trackerId: z
636
674
  .string()
637
- .min(1)
638
- .max(128)
639
- .regex(/^[A-Za-z0-9_-]+$/),
675
+ .length(32)
676
+ .regex(/^[a-f0-9]{32}$/),
640
677
  });
641
678
 
642
679
  /**
643
680
  * OK
644
681
  */
645
- export const zAdminSetTrackerDenylistResponse = zAdminDeviceCommandResult;
682
+ export const zAdminSetTrackerDenylistResponse = zAdminTrackerCommandResult;
646
683
 
647
684
  export const zAdminNotifyTrackerBody = zAdminNotificationRequest;
648
685
 
649
686
  export const zAdminNotifyTrackerPath = z.object({
650
687
  trackerId: z
651
688
  .string()
652
- .min(1)
653
- .max(128)
654
- .regex(/^[A-Za-z0-9_-]+$/),
689
+ .length(32)
690
+ .regex(/^[a-f0-9]{32}$/),
655
691
  });
656
692
 
657
693
  /**
658
- * OK
694
+ * Accepted
659
695
  */
660
- export const zAdminNotifyTrackerResponse = zAdminDeviceCommandResult;
696
+ export const zAdminNotifyTrackerResponse = zAdminTrackerCommandResult;
661
697
 
662
- export const zAdminUnlinkTrackerSubscriptionPath = z.object({
698
+ export const zAdminAddTrackerMemberBody = zAdminAddMemberRequest;
699
+
700
+ export const zAdminAddTrackerMemberPath = z.object({
663
701
  trackerId: z
664
702
  .string()
665
- .min(1)
666
- .max(128)
667
- .regex(/^[A-Za-z0-9_-]+$/),
703
+ .length(32)
704
+ .regex(/^[a-f0-9]{32}$/),
668
705
  });
669
706
 
670
707
  /**
671
708
  * OK
672
709
  */
673
- export const zAdminUnlinkTrackerSubscriptionResponse = zCommandSuccess;
674
-
675
- export const zAdminLinkTrackerSubscriptionBody = zAdminLinkSubscriptionRequest;
710
+ export const zAdminAddTrackerMemberResponse = zCommandSuccess;
676
711
 
677
- export const zAdminLinkTrackerSubscriptionPath = z.object({
712
+ export const zAdminRemoveTrackerMemberPath = z.object({
678
713
  trackerId: z
679
714
  .string()
680
- .min(1)
681
- .max(128)
682
- .regex(/^[A-Za-z0-9_-]+$/),
715
+ .length(32)
716
+ .regex(/^[a-f0-9]{32}$/),
717
+ uid: z.string(),
683
718
  });
684
719
 
685
720
  /**
686
721
  * OK
687
722
  */
688
- export const zAdminLinkTrackerSubscriptionResponse = zCommandSuccess;
689
-
690
- export const zAdminRequestSubscriptionInsuranceBody = zAdminRequestId;
723
+ export const zAdminRemoveTrackerMemberResponse = zCommandSuccess;
691
724
 
692
- export const zAdminRequestSubscriptionInsurancePath = z.object({
693
- subscriptionId: z.string(),
725
+ export const zAdminUnlinkTrackerSubscriptionPath = z.object({
726
+ trackerId: z
727
+ .string()
728
+ .length(32)
729
+ .regex(/^[a-f0-9]{32}$/),
694
730
  });
695
731
 
696
732
  /**
697
733
  * OK
698
734
  */
699
- export const zAdminRequestSubscriptionInsuranceResponse = zCommandSuccess;
735
+ export const zAdminUnlinkTrackerSubscriptionResponse = zCommandSuccess;
700
736
 
701
- export const zAdminRequestUserInsuranceBody = zAdminRequestId;
737
+ export const zAdminLinkTrackerSubscriptionBody = zAdminLinkSubscriptionRequest;
702
738
 
703
- export const zAdminRequestUserInsurancePath = z.object({
704
- uid: z.string(),
739
+ export const zAdminLinkTrackerSubscriptionPath = z.object({
740
+ trackerId: z
741
+ .string()
742
+ .length(32)
743
+ .regex(/^[a-f0-9]{32}$/),
705
744
  });
706
745
 
707
746
  /**
708
747
  * OK
709
748
  */
710
- export const zAdminRequestUserInsuranceResponse = zCommandSuccess;
749
+ export const zAdminLinkTrackerSubscriptionResponse = zCommandSuccess;
711
750
 
712
751
  export const zAdminRequestTrackerInsuranceBody = zAdminRequestId;
713
752
 
714
753
  export const zAdminRequestTrackerInsurancePath = z.object({
715
754
  trackerId: z
716
755
  .string()
717
- .min(1)
718
- .max(128)
719
- .regex(/^[A-Za-z0-9_-]+$/),
756
+ .length(32)
757
+ .regex(/^[a-f0-9]{32}$/),
720
758
  });
721
759
 
722
760
  /**
723
- * OK
761
+ * Accepted
724
762
  */
725
763
  export const zAdminRequestTrackerInsuranceResponse = zCommandSuccess;
726
764
 
@@ -729,26 +767,72 @@ export const zAdminReconcileTrackerSubscriptionBody = zAdminRequestId;
729
767
  export const zAdminReconcileTrackerSubscriptionPath = z.object({
730
768
  trackerId: z
731
769
  .string()
732
- .min(1)
733
- .max(128)
734
- .regex(/^[A-Za-z0-9_-]+$/),
770
+ .length(32)
771
+ .regex(/^[a-f0-9]{32}$/),
735
772
  });
736
773
 
737
774
  /**
738
- * OK
775
+ * Accepted
739
776
  */
740
777
  export const zAdminReconcileTrackerSubscriptionResponse = zCommandSuccess;
741
778
 
742
- export const zAdminRefreshSubscriptionBody = zAdminRequestId;
779
+ export const zAdminUploadTrackerPhotoBody = z.object({
780
+ file: z.string().max(10485760),
781
+ kind: z.enum(["bike", "installation", "receipt"]),
782
+ width: z.int().gte(1).lte(16384),
783
+ height: z.int().gte(1).lte(16384),
784
+ });
743
785
 
744
- export const zAdminRefreshSubscriptionPath = z.object({
745
- subscriptionId: z.string(),
786
+ export const zAdminUploadTrackerPhotoPath = z.object({
787
+ trackerId: z
788
+ .string()
789
+ .length(32)
790
+ .regex(/^[a-f0-9]{32}$/),
746
791
  });
747
792
 
748
793
  /**
749
794
  * OK
750
795
  */
751
- export const zAdminRefreshSubscriptionResponse = zCommandSuccess;
796
+ export const zAdminUploadTrackerPhotoResponse = zPhotoUploadResult;
797
+
798
+ export const zAdminSubscribeTrackerPath = z.object({
799
+ trackerId: z
800
+ .string()
801
+ .length(32)
802
+ .regex(/^[a-f0-9]{32}$/),
803
+ });
804
+
805
+ /**
806
+ * OK
807
+ */
808
+ export const zAdminSubscribeTrackerResponse = zAdminTrackerView.nullable();
809
+
810
+ export const zAdminGetUserPath = z.object({
811
+ uid: z.string(),
812
+ });
813
+
814
+ /**
815
+ * OK
816
+ */
817
+ export const zAdminGetUserResponse = zAdminReadResult;
818
+
819
+ export const zAdminLookupUsersBody = zAdminLookupRequest;
820
+
821
+ /**
822
+ * OK
823
+ */
824
+ export const zAdminLookupUsersResponse = zAdminLookupResult;
825
+
826
+ export const zAdminRequestUserInsuranceBody = zAdminRequestId;
827
+
828
+ export const zAdminRequestUserInsurancePath = z.object({
829
+ uid: z.string(),
830
+ });
831
+
832
+ /**
833
+ * Accepted
834
+ */
835
+ export const zAdminRequestUserInsuranceResponse = zCommandSuccess;
752
836
 
753
837
  export const zAdminLinkSingleSubscriptionBody = zAdminRequestId;
754
838
 
@@ -761,45 +845,149 @@ export const zAdminLinkSingleSubscriptionPath = z.object({
761
845
  */
762
846
  export const zAdminLinkSingleSubscriptionResponse = zCommandSuccess;
763
847
 
764
- export const zAdminCreateB2bSubscriptionBody = zAdminB2bSubscriptionRequest;
848
+ export const zAdminGetSubscriptionPath = z.object({
849
+ subscriptionId: z.string(),
850
+ });
765
851
 
766
852
  /**
767
853
  * OK
768
854
  */
769
- export const zAdminCreateB2bSubscriptionResponse = zAdminB2bSubscriptionResult;
855
+ export const zAdminGetSubscriptionResponse = zAdminReadResult;
770
856
 
771
- export const zAdminCancelB2bSubscriptionPath = z.object({
857
+ export const zAdminSearchSubscriptionsQuery = z.object({
858
+ kind: z.enum(["b2b", "uid", "wooId"]),
859
+ value: z.string().optional().default(""),
860
+ cursor: z.string().optional(),
861
+ });
862
+
863
+ /**
864
+ * OK
865
+ */
866
+ export const zAdminSearchSubscriptionsResponse = zAdminReadResult;
867
+
868
+ export const zAdminListInsurancePath = z.object({
772
869
  subscriptionId: z.string(),
870
+ provider: z.enum(["cycler", "hepster", "tryg"]),
871
+ });
872
+
873
+ export const zAdminListInsuranceQuery = z.object({
874
+ cursor: z.string().optional(),
773
875
  });
774
876
 
775
877
  /**
776
878
  * OK
777
879
  */
778
- export const zAdminCancelB2bSubscriptionResponse = zCommandSuccess;
880
+ export const zAdminListInsuranceResponse = zAdminReadResult;
779
881
 
780
- export const zAdminSyncB2bInsurancePath = z.object({
882
+ export const zAdminRequestSubscriptionInsuranceBody = zAdminRequestId;
883
+
884
+ export const zAdminRequestSubscriptionInsurancePath = z.object({
885
+ subscriptionId: z.string(),
886
+ });
887
+
888
+ /**
889
+ * Accepted
890
+ */
891
+ export const zAdminRequestSubscriptionInsuranceResponse = zCommandSuccess;
892
+
893
+ export const zAdminRefreshSubscriptionBody = zAdminRequestId;
894
+
895
+ export const zAdminRefreshSubscriptionPath = z.object({
781
896
  subscriptionId: z.string(),
782
897
  });
783
898
 
899
+ /**
900
+ * Accepted
901
+ */
902
+ export const zAdminRefreshSubscriptionResponse = zCommandSuccess;
903
+
904
+ export const zAdminListFavoritesQuery = z.object({
905
+ cursor: z.string().optional(),
906
+ });
907
+
784
908
  /**
785
909
  * OK
786
910
  */
787
- export const zAdminSyncB2bInsuranceResponse = zCommandSuccess;
911
+ export const zAdminListFavoritesResponse = zAdminReadResult;
912
+
913
+ export const zAdminDeleteFavoritePath = z.object({
914
+ trackerId: z
915
+ .string()
916
+ .length(32)
917
+ .regex(/^[a-f0-9]{32}$/),
918
+ });
788
919
 
789
920
  /**
790
921
  * OK
791
922
  */
792
- export const zAdminSyncAllB2bInsuranceResponse = zCommandSuccess;
923
+ export const zAdminDeleteFavoriteResponse = zCommandSuccess;
793
924
 
794
- export const zAdminSubscribeTrackerPath = z.object({
925
+ export const zAdminGetFavoritePath = z.object({
795
926
  trackerId: z
796
927
  .string()
797
- .min(1)
798
- .max(128)
799
- .regex(/^[A-Za-z0-9_-]+$/),
928
+ .length(32)
929
+ .regex(/^[a-f0-9]{32}$/),
800
930
  });
801
931
 
802
932
  /**
803
933
  * OK
804
934
  */
805
- export const zAdminSubscribeTrackerResponse = zAdminTrackerView.nullable();
935
+ export const zAdminGetFavoriteResponse = zAdminReadResult;
936
+
937
+ export const zAdminUpdateFavoriteCommentBody = zAdminFavoriteRequest;
938
+
939
+ export const zAdminUpdateFavoriteCommentPath = z.object({
940
+ trackerId: z
941
+ .string()
942
+ .length(32)
943
+ .regex(/^[a-f0-9]{32}$/),
944
+ });
945
+
946
+ /**
947
+ * OK
948
+ */
949
+ export const zAdminUpdateFavoriteCommentResponse = zCommandSuccess;
950
+
951
+ export const zAdminPutFavoriteBody = zAdminFavoriteRequest;
952
+
953
+ export const zAdminPutFavoritePath = z.object({
954
+ trackerId: z
955
+ .string()
956
+ .length(32)
957
+ .regex(/^[a-f0-9]{32}$/),
958
+ });
959
+
960
+ /**
961
+ * OK
962
+ */
963
+ export const zAdminPutFavoriteResponse = zCommandSuccess;
964
+
965
+ export const zAdminCreateB2bSubscriptionBody = zAdminB2bSubscriptionRequest;
966
+
967
+ /**
968
+ * Created
969
+ */
970
+ export const zAdminCreateB2bSubscriptionResponse = zAdminB2bSubscriptionResult;
971
+
972
+ export const zAdminCancelB2bSubscriptionPath = z.object({
973
+ subscriptionId: z.string(),
974
+ });
975
+
976
+ /**
977
+ * OK
978
+ */
979
+ export const zAdminCancelB2bSubscriptionResponse = zCommandSuccess;
980
+
981
+ export const zAdminSyncB2bInsurancePath = z.object({
982
+ subscriptionId: z.string(),
983
+ });
984
+
985
+ /**
986
+ * Accepted
987
+ */
988
+ export const zAdminSyncB2bInsuranceResponse = zCommandSuccess;
989
+
990
+ /**
991
+ * Accepted
992
+ */
993
+ export const zAdminSyncAllB2bInsuranceResponse = zCommandSuccess;