@bikefinder/api-client 0.3.0 → 0.4.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 +132 -18
  5. package/dist/admin/generated/sdk.gen.d.ts.map +1 -1
  6. package/dist/admin/generated/sdk.gen.js +264 -150
  7. package/dist/admin/generated/sdk.gen.js.map +1 -1
  8. package/dist/admin/generated/types.gen.d.ts +791 -385
  9. package/dist/admin/generated/types.gen.d.ts.map +1 -1
  10. package/dist/admin/generated/zod.gen.d.ts +957 -988
  11. package/dist/admin/generated/zod.gen.d.ts.map +1 -1
  12. package/dist/admin/generated/zod.gen.js +239 -292
  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 +1 -7
  37. package/src/admin/generated/sdk.gen.ts +440 -326
  38. package/src/admin/generated/types.gen.ts +860 -464
  39. package/src/admin/generated/zod.gen.ts +259 -318
  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,35 @@ 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(),
54
- });
55
-
56
- export const zAdminDeviceCommandResult = z.object({
57
- success: z.boolean(),
58
- commandId: z.string(),
59
- jobIds: z.array(z.string()),
57
+ reason: z.string().max(1000).nullish(),
60
58
  });
61
59
 
62
60
  export const zAdminFavoriteRequest = z.object({
63
- comment: z.string(),
61
+ comment: z.string().max(4000),
64
62
  });
65
63
 
66
- export const zAdminGeneration = z.enum(["g1", "gen2"]);
67
-
68
- export const zAdminHistoryCollection = z.enum([
69
- "data",
70
- "images",
71
- "logs",
72
- "productionData",
73
- "sanitizedData",
74
- ]);
75
-
76
- export const zAdminInsuranceProvider = z.enum(["cycler", "hepster", "tryg"]);
64
+ export const zAdminGeneration = z.enum(["gen1", "gen2"]);
77
65
 
78
66
  export const zAdminLinkSubscriptionRequest = z.object({
79
67
  subscriptionId: z.string(),
80
68
  });
81
69
 
82
70
  export const zAdminLookupRequest = z.object({
83
- uids: z.array(z.string()).nullish(),
84
- emails: z.array(z.string()).nullish(),
71
+ uids: z.array(z.string()).max(100).nullish(),
72
+ emails: z.array(z.string()).max(100).nullish(),
85
73
  });
86
74
 
87
75
  export const zAdminLookupUser = z.object({
88
76
  userId: z.string(),
89
- email: z.string().nullish(),
90
- nickname: z.string().nullish(),
77
+ email: z.string().nullable(),
78
+ nickname: z.string().nullable(),
91
79
  });
92
80
 
93
81
  export const zAdminLookupResult = z.object({
@@ -107,29 +95,23 @@ export const zAdminModeRequest = z.object({
107
95
  });
108
96
 
109
97
  export const zAdminNotificationRequest = z.object({
110
- requestId: z.string(),
111
- title: z.string(),
112
- message: z.string(),
98
+ requestId: z
99
+ .string()
100
+ .regex(
101
+ /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/,
102
+ ),
103
+ title: z.string().max(200),
104
+ message: z.string().max(4000),
113
105
  supportTimestamp: z.boolean().nullish(),
114
- log: z.string().nullish(),
106
+ log: z.string().max(1000).nullish(),
115
107
  });
116
108
 
117
- export const zAdminPrivateDomain = z.enum([
118
- "battery",
119
- "firmware",
120
- "runtime",
121
- "statistics",
122
- ]);
123
-
124
- export const zAdminPublicDomain = z.enum([
125
- "battery",
126
- "configuration",
127
- "contact",
128
- "location",
129
- ]);
130
-
131
109
  export const zAdminRequestId = z.object({
132
- requestId: z.string(),
110
+ requestId: z
111
+ .string()
112
+ .regex(
113
+ /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/,
114
+ ),
133
115
  });
134
116
 
135
117
  export const zAdminSession = z.object({
@@ -139,8 +121,6 @@ export const zAdminSession = z.object({
139
121
  isSalesUser: z.boolean(),
140
122
  });
141
123
 
142
- export const zAdminSubscriptionSearchKind = z.enum(["b2b", "uid", "wooId"]);
143
-
144
124
  export const zAdminSupportValue = z
145
125
  .union([
146
126
  z.boolean(),
@@ -185,16 +165,16 @@ export const zAdminDocument = z.object({
185
165
  });
186
166
 
187
167
  export const zAdminPublicStates = z.object({
188
- contact: zAdminDocument.nullish(),
189
- battery: zAdminDocument.nullish(),
190
- location: zAdminDocument.nullish(),
191
- configuration: zAdminDocument.nullish(),
168
+ contact: zAdminDocument.nullable(),
169
+ battery: zAdminDocument.nullable(),
170
+ location: zAdminDocument.nullable(),
171
+ configuration: zAdminDocument.nullable(),
192
172
  });
193
173
 
194
174
  export const zAdminReadResult = z.object({
195
175
  documents: z.array(zAdminDocument),
196
176
  nextCursor: z.string().nullable(),
197
- states: zAdminPublicStates.nullish(),
177
+ states: zAdminPublicStates.nullable(),
198
178
  });
199
179
 
200
180
  export const zAdminTimestamp = z.object({
@@ -226,12 +206,11 @@ export const zAdminTrackerCommandRequest = z.object({
226
206
  expectedCommand: z.string().nullable(),
227
207
  });
228
208
 
229
- export const zAdminTrackerSearchKind = z.enum([
230
- "iccid",
231
- "imei",
232
- "subscriptionId",
233
- "uid",
234
- ]);
209
+ export const zAdminTrackerCommandResult = z.object({
210
+ success: z.boolean(),
211
+ commandId: z.string(),
212
+ jobIds: z.array(z.string()),
213
+ });
235
214
 
236
215
  export const zCommandSuccess = z.object({
237
216
  success: z.boolean(),
@@ -247,10 +226,10 @@ export const zAdminOperationalDomain = z.object({
247
226
  });
248
227
 
249
228
  export const zAdminOperationalDomains = z.object({
250
- battery: zAdminOperationalDomain.nullish(),
251
- runtime: zAdminOperationalDomain.nullish(),
252
- statistics: zAdminOperationalDomain.nullish(),
253
- firmware: zAdminOperationalDomain.nullish(),
229
+ battery: zAdminOperationalDomain.nullable(),
230
+ runtime: zAdminOperationalDomain.nullable(),
231
+ statistics: zAdminOperationalDomain.nullable(),
232
+ firmware: zAdminOperationalDomain.nullable(),
254
233
  });
255
234
 
256
235
  export const zAdminOperationalState = z.object({
@@ -291,65 +270,27 @@ export const zProblemDetails = z.object({
291
270
  .nullish(),
292
271
  detail: z.string().nullish(),
293
272
  instance: z.string().nullish(),
294
- });
295
-
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
- );
329
-
330
- export const zAdminUploadTrackerPhotoPath = z.object({
331
- trackerId: z
332
- .string()
333
- .min(1)
334
- .max(128)
335
- .regex(/^[A-Za-z0-9_-]+$/),
273
+ code: z.string(),
274
+ traceId: z.string(),
275
+ errors: z.record(z.string(), z.array(z.string())).optional(),
336
276
  });
337
277
 
338
278
  /**
339
279
  * OK
340
280
  */
341
- export const zAdminUploadTrackerPhotoResponse = zPhotoUploadResult;
281
+ export const zAdminGetSessionResponse = zAdminSession;
342
282
 
343
283
  export const zAdminGetTrackerPath = z.object({
344
284
  trackerId: z
345
285
  .string()
346
- .min(1)
347
- .max(128)
348
- .regex(/^[A-Za-z0-9_-]+$/),
286
+ .length(32)
287
+ .regex(/^[a-f0-9]{32}$/),
349
288
  });
350
289
 
351
290
  export const zAdminGetTrackerQuery = z.object({
352
- domains: z.array(zAdminPublicDomain).optional(),
291
+ domains: z
292
+ .array(z.enum(["battery", "configuration", "contact", "location"]))
293
+ .optional(),
353
294
  });
354
295
 
355
296
  /**
@@ -358,7 +299,7 @@ export const zAdminGetTrackerQuery = z.object({
358
299
  export const zAdminGetTrackerResponse = zAdminReadResult;
359
300
 
360
301
  export const zAdminSearchTrackersQuery = z.object({
361
- kind: zAdminTrackerSearchKind,
302
+ kind: z.enum(["iccid", "imei", "subscriptionId", "uid"]),
362
303
  value: z.string(),
363
304
  cursor: z.string().optional(),
364
305
  });
@@ -368,171 +309,152 @@ export const zAdminSearchTrackersQuery = z.object({
368
309
  */
369
310
  export const zAdminSearchTrackersResponse = zAdminReadResult;
370
311
 
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({
381
- subscriptionId: z.string(),
312
+ export const zAdminListTrackerHistoryPath = z.object({
313
+ trackerId: z
314
+ .string()
315
+ .length(32)
316
+ .regex(/^[a-f0-9]{32}$/),
317
+ collection: z.enum([
318
+ "data",
319
+ "images",
320
+ "logs",
321
+ "productionData",
322
+ "sanitizedData",
323
+ ]),
382
324
  });
383
325
 
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(""),
326
+ export const zAdminListTrackerHistoryQuery = z.object({
327
+ from: z.iso.datetime({ offset: true }).optional(),
328
+ to: z.iso.datetime({ offset: true }).optional(),
392
329
  cursor: z.string().optional(),
393
330
  });
394
331
 
395
332
  /**
396
333
  * OK
397
334
  */
398
- export const zAdminSearchSubscriptionsResponse = zAdminReadResult;
335
+ export const zAdminListTrackerHistoryResponse = zAdminReadResult;
399
336
 
400
- export const zAdminListInsurancePath = z.object({
401
- subscriptionId: z.string(),
402
- provider: zAdminInsuranceProvider,
337
+ export const zAdminGetTrackerOperationalStatePath = z.object({
338
+ trackerId: z
339
+ .string()
340
+ .length(32)
341
+ .regex(/^[a-f0-9]{32}$/),
403
342
  });
404
343
 
405
- export const zAdminListInsuranceQuery = z.object({
406
- cursor: z.string().optional(),
344
+ export const zAdminGetTrackerOperationalStateQuery = z.object({
345
+ domains: z.array(z.enum(["battery", "firmware", "runtime", "statistics"])),
407
346
  });
408
347
 
409
348
  /**
410
349
  * OK
411
350
  */
412
- export const zAdminListInsuranceResponse = zAdminReadResult;
413
-
414
- export const zAdminListFavoritesQuery = z.object({
415
- cursor: z.string().optional(),
416
- });
351
+ export const zAdminGetTrackerOperationalStateResponse = zAdminOperationalState;
417
352
 
418
- /**
419
- * OK
420
- */
421
- export const zAdminListFavoritesResponse = zAdminReadResult;
353
+ export const zAdminRequestTrackerModeBody = zAdminModeRequest;
422
354
 
423
- export const zAdminDeleteFavoritePath = z.object({
355
+ export const zAdminRequestTrackerModePath = z.object({
424
356
  trackerId: z
425
357
  .string()
426
- .min(1)
427
- .max(128)
428
- .regex(/^[A-Za-z0-9_-]+$/),
358
+ .length(32)
359
+ .regex(/^[a-f0-9]{32}$/),
429
360
  });
430
361
 
431
362
  /**
432
363
  * OK
433
364
  */
434
- export const zAdminDeleteFavoriteResponse = zCommandSuccess;
365
+ export const zAdminRequestTrackerModeResponse = zCommandSuccess;
435
366
 
436
- export const zAdminGetFavoritePath = z.object({
367
+ export const zAdminRequestTrackerCommandBody = zAdminTrackerCommandRequest;
368
+
369
+ export const zAdminRequestTrackerCommandPath = z.object({
437
370
  trackerId: z
438
371
  .string()
439
- .min(1)
440
- .max(128)
441
- .regex(/^[A-Za-z0-9_-]+$/),
372
+ .length(32)
373
+ .regex(/^[a-f0-9]{32}$/),
442
374
  });
443
375
 
444
376
  /**
445
377
  * OK
446
378
  */
447
- export const zAdminGetFavoriteResponse = zAdminReadResult;
379
+ export const zAdminRequestTrackerCommandResponse = zCommandSuccess;
448
380
 
449
- export const zAdminUpdateFavoriteCommentBody = zAdminFavoriteRequest;
381
+ export const zAdminUpdateTrackerConfigurationBody = zAdminConfigurationRequest;
450
382
 
451
- export const zAdminUpdateFavoriteCommentPath = z.object({
383
+ export const zAdminUpdateTrackerConfigurationPath = z.object({
452
384
  trackerId: z
453
385
  .string()
454
- .min(1)
455
- .max(128)
456
- .regex(/^[A-Za-z0-9_-]+$/),
386
+ .length(32)
387
+ .regex(/^[a-f0-9]{32}$/),
457
388
  });
458
389
 
459
390
  /**
460
391
  * OK
461
392
  */
462
- export const zAdminUpdateFavoriteCommentResponse = zCommandSuccess;
393
+ export const zAdminUpdateTrackerConfigurationResponse = zCommandSuccess;
463
394
 
464
- export const zAdminPutFavoriteBody = zAdminFavoriteRequest;
395
+ export const zAdminUpdateTrackerBikeBody = zAdminBikeRequest;
465
396
 
466
- export const zAdminPutFavoritePath = z.object({
397
+ export const zAdminUpdateTrackerBikePath = z.object({
467
398
  trackerId: z
468
399
  .string()
469
- .min(1)
470
- .max(128)
471
- .regex(/^[A-Za-z0-9_-]+$/),
400
+ .length(32)
401
+ .regex(/^[a-f0-9]{32}$/),
472
402
  });
473
403
 
474
404
  /**
475
405
  * OK
476
406
  */
477
- export const zAdminPutFavoriteResponse = zCommandSuccess;
407
+ export const zAdminUpdateTrackerBikeResponse = zCommandSuccess;
478
408
 
479
- export const zAdminListTrackerHistoryPath = z.object({
409
+ export const zAdminCleanTrackerBody = zAdminRequestId;
410
+
411
+ export const zAdminCleanTrackerPath = z.object({
480
412
  trackerId: z
481
413
  .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(),
414
+ .length(32)
415
+ .regex(/^[a-f0-9]{32}$/),
492
416
  });
493
417
 
494
418
  /**
495
- * OK
419
+ * Accepted
496
420
  */
497
- export const zAdminListTrackerHistoryResponse = zAdminReadResult;
421
+ export const zAdminCleanTrackerResponse = zAdminTrackerCommandResult;
498
422
 
499
- export const zAdminGetTrackerOperationalStatePath = z.object({
423
+ export const zAdminSetTrackerDenylistBody = zAdminDenylistRequest;
424
+
425
+ export const zAdminSetTrackerDenylistPath = z.object({
500
426
  trackerId: z
501
427
  .string()
502
- .min(1)
503
- .max(128)
504
- .regex(/^[A-Za-z0-9_-]+$/),
505
- });
506
-
507
- export const zAdminGetTrackerOperationalStateQuery = z.object({
508
- domains: z.array(zAdminPrivateDomain),
428
+ .length(32)
429
+ .regex(/^[a-f0-9]{32}$/),
509
430
  });
510
431
 
511
432
  /**
512
433
  * OK
513
434
  */
514
- export const zAdminGetTrackerOperationalStateResponse = zAdminOperationalState;
435
+ export const zAdminSetTrackerDenylistResponse = zAdminTrackerCommandResult;
515
436
 
516
- /**
517
- * OK
518
- */
519
- export const zAdminGetSessionResponse = zAdminSession;
437
+ export const zAdminNotifyTrackerBody = zAdminNotificationRequest;
520
438
 
521
- export const zAdminLookupUsersBody = zAdminLookupRequest;
439
+ export const zAdminNotifyTrackerPath = z.object({
440
+ trackerId: z
441
+ .string()
442
+ .length(32)
443
+ .regex(/^[a-f0-9]{32}$/),
444
+ });
522
445
 
523
446
  /**
524
- * OK
447
+ * Accepted
525
448
  */
526
- export const zAdminLookupUsersResponse = zAdminLookupResult;
449
+ export const zAdminNotifyTrackerResponse = zAdminTrackerCommandResult;
527
450
 
528
451
  export const zAdminAddTrackerMemberBody = zAdminAddMemberRequest;
529
452
 
530
453
  export const zAdminAddTrackerMemberPath = z.object({
531
454
  trackerId: z
532
455
  .string()
533
- .min(1)
534
- .max(128)
535
- .regex(/^[A-Za-z0-9_-]+$/),
456
+ .length(32)
457
+ .regex(/^[a-f0-9]{32}$/),
536
458
  });
537
459
 
538
460
  /**
@@ -543,9 +465,8 @@ export const zAdminAddTrackerMemberResponse = zCommandSuccess;
543
465
  export const zAdminRemoveTrackerMemberPath = z.object({
544
466
  trackerId: z
545
467
  .string()
546
- .min(1)
547
- .max(128)
548
- .regex(/^[A-Za-z0-9_-]+$/),
468
+ .length(32)
469
+ .regex(/^[a-f0-9]{32}$/),
549
470
  uid: z.string(),
550
471
  });
551
472
 
@@ -554,138 +475,162 @@ export const zAdminRemoveTrackerMemberPath = z.object({
554
475
  */
555
476
  export const zAdminRemoveTrackerMemberResponse = zCommandSuccess;
556
477
 
557
- export const zAdminRequestTrackerModeBody = zAdminModeRequest;
558
-
559
- export const zAdminRequestTrackerModePath = z.object({
478
+ export const zAdminUnlinkTrackerSubscriptionPath = z.object({
560
479
  trackerId: z
561
480
  .string()
562
- .min(1)
563
- .max(128)
564
- .regex(/^[A-Za-z0-9_-]+$/),
481
+ .length(32)
482
+ .regex(/^[a-f0-9]{32}$/),
565
483
  });
566
484
 
567
485
  /**
568
486
  * OK
569
487
  */
570
- export const zAdminRequestTrackerModeResponse = zCommandSuccess;
488
+ export const zAdminUnlinkTrackerSubscriptionResponse = zCommandSuccess;
571
489
 
572
- export const zAdminRequestTrackerCommandBody = zAdminTrackerCommandRequest;
490
+ export const zAdminLinkTrackerSubscriptionBody = zAdminLinkSubscriptionRequest;
573
491
 
574
- export const zAdminRequestTrackerCommandPath = z.object({
492
+ export const zAdminLinkTrackerSubscriptionPath = z.object({
575
493
  trackerId: z
576
494
  .string()
577
- .min(1)
578
- .max(128)
579
- .regex(/^[A-Za-z0-9_-]+$/),
495
+ .length(32)
496
+ .regex(/^[a-f0-9]{32}$/),
580
497
  });
581
498
 
582
499
  /**
583
500
  * OK
584
501
  */
585
- export const zAdminRequestTrackerCommandResponse = zCommandSuccess;
502
+ export const zAdminLinkTrackerSubscriptionResponse = zCommandSuccess;
586
503
 
587
- export const zAdminUpdateTrackerConfigurationBody = zAdminConfigurationRequest;
504
+ export const zAdminRequestTrackerInsuranceBody = zAdminRequestId;
588
505
 
589
- export const zAdminUpdateTrackerConfigurationPath = z.object({
506
+ export const zAdminRequestTrackerInsurancePath = z.object({
590
507
  trackerId: z
591
508
  .string()
592
- .min(1)
593
- .max(128)
594
- .regex(/^[A-Za-z0-9_-]+$/),
509
+ .length(32)
510
+ .regex(/^[a-f0-9]{32}$/),
595
511
  });
596
512
 
597
513
  /**
598
- * OK
514
+ * Accepted
599
515
  */
600
- export const zAdminUpdateTrackerConfigurationResponse = zCommandSuccess;
516
+ export const zAdminRequestTrackerInsuranceResponse = zCommandSuccess;
601
517
 
602
- export const zAdminUpdateTrackerBikeBody = zAdminBikeRequest;
518
+ export const zAdminReconcileTrackerSubscriptionBody = zAdminRequestId;
603
519
 
604
- export const zAdminUpdateTrackerBikePath = z.object({
520
+ export const zAdminReconcileTrackerSubscriptionPath = z.object({
605
521
  trackerId: z
606
522
  .string()
607
- .min(1)
608
- .max(128)
609
- .regex(/^[A-Za-z0-9_-]+$/),
523
+ .length(32)
524
+ .regex(/^[a-f0-9]{32}$/),
610
525
  });
611
526
 
612
527
  /**
613
- * OK
528
+ * Accepted
614
529
  */
615
- export const zAdminUpdateTrackerBikeResponse = zCommandSuccess;
530
+ export const zAdminReconcileTrackerSubscriptionResponse = zCommandSuccess;
616
531
 
617
- export const zAdminCleanTrackerBody = zAdminRequestId;
532
+ export const zAdminUploadTrackerPhotoBody = z.object({
533
+ file: z.string().max(10485760),
534
+ kind: z.enum(["bike", "installation", "receipt"]),
535
+ width: z.int().gte(1).lte(16384),
536
+ height: z.int().gte(1).lte(16384),
537
+ });
618
538
 
619
- export const zAdminCleanTrackerPath = z.object({
539
+ export const zAdminUploadTrackerPhotoPath = z.object({
620
540
  trackerId: z
621
541
  .string()
622
- .min(1)
623
- .max(128)
624
- .regex(/^[A-Za-z0-9_-]+$/),
542
+ .length(32)
543
+ .regex(/^[a-f0-9]{32}$/),
625
544
  });
626
545
 
627
546
  /**
628
547
  * OK
629
548
  */
630
- export const zAdminCleanTrackerResponse = zAdminDeviceCommandResult;
631
-
632
- export const zAdminSetTrackerDenylistBody = zAdminDenylistRequest;
549
+ export const zAdminUploadTrackerPhotoResponse = zPhotoUploadResult;
633
550
 
634
- export const zAdminSetTrackerDenylistPath = z.object({
551
+ export const zAdminSubscribeTrackerPath = z.object({
635
552
  trackerId: z
636
553
  .string()
637
- .min(1)
638
- .max(128)
639
- .regex(/^[A-Za-z0-9_-]+$/),
554
+ .length(32)
555
+ .regex(/^[a-f0-9]{32}$/),
640
556
  });
641
557
 
642
558
  /**
643
559
  * OK
644
560
  */
645
- export const zAdminSetTrackerDenylistResponse = zAdminDeviceCommandResult;
561
+ export const zAdminSubscribeTrackerResponse = zAdminTrackerView.nullable();
646
562
 
647
- export const zAdminNotifyTrackerBody = zAdminNotificationRequest;
563
+ export const zAdminGetUserPath = z.object({
564
+ uid: z.string(),
565
+ });
648
566
 
649
- export const zAdminNotifyTrackerPath = z.object({
650
- trackerId: z
651
- .string()
652
- .min(1)
653
- .max(128)
654
- .regex(/^[A-Za-z0-9_-]+$/),
567
+ /**
568
+ * OK
569
+ */
570
+ export const zAdminGetUserResponse = zAdminReadResult;
571
+
572
+ export const zAdminLookupUsersBody = zAdminLookupRequest;
573
+
574
+ /**
575
+ * OK
576
+ */
577
+ export const zAdminLookupUsersResponse = zAdminLookupResult;
578
+
579
+ export const zAdminRequestUserInsuranceBody = zAdminRequestId;
580
+
581
+ export const zAdminRequestUserInsurancePath = z.object({
582
+ uid: z.string(),
583
+ });
584
+
585
+ /**
586
+ * Accepted
587
+ */
588
+ export const zAdminRequestUserInsuranceResponse = zCommandSuccess;
589
+
590
+ export const zAdminLinkSingleSubscriptionBody = zAdminRequestId;
591
+
592
+ export const zAdminLinkSingleSubscriptionPath = z.object({
593
+ uid: z.string(),
655
594
  });
656
595
 
657
596
  /**
658
597
  * OK
659
598
  */
660
- export const zAdminNotifyTrackerResponse = zAdminDeviceCommandResult;
599
+ export const zAdminLinkSingleSubscriptionResponse = zCommandSuccess;
661
600
 
662
- export const zAdminUnlinkTrackerSubscriptionPath = z.object({
663
- trackerId: z
664
- .string()
665
- .min(1)
666
- .max(128)
667
- .regex(/^[A-Za-z0-9_-]+$/),
601
+ export const zAdminGetSubscriptionPath = z.object({
602
+ subscriptionId: z.string(),
668
603
  });
669
604
 
670
605
  /**
671
606
  * OK
672
607
  */
673
- export const zAdminUnlinkTrackerSubscriptionResponse = zCommandSuccess;
608
+ export const zAdminGetSubscriptionResponse = zAdminReadResult;
674
609
 
675
- export const zAdminLinkTrackerSubscriptionBody = zAdminLinkSubscriptionRequest;
610
+ export const zAdminSearchSubscriptionsQuery = z.object({
611
+ kind: z.enum(["b2b", "uid", "wooId"]),
612
+ value: z.string().optional().default(""),
613
+ cursor: z.string().optional(),
614
+ });
676
615
 
677
- export const zAdminLinkTrackerSubscriptionPath = z.object({
678
- trackerId: z
679
- .string()
680
- .min(1)
681
- .max(128)
682
- .regex(/^[A-Za-z0-9_-]+$/),
616
+ /**
617
+ * OK
618
+ */
619
+ export const zAdminSearchSubscriptionsResponse = zAdminReadResult;
620
+
621
+ export const zAdminListInsurancePath = z.object({
622
+ subscriptionId: z.string(),
623
+ provider: z.enum(["cycler", "hepster", "tryg"]),
624
+ });
625
+
626
+ export const zAdminListInsuranceQuery = z.object({
627
+ cursor: z.string().optional(),
683
628
  });
684
629
 
685
630
  /**
686
631
  * OK
687
632
  */
688
- export const zAdminLinkTrackerSubscriptionResponse = zCommandSuccess;
633
+ export const zAdminListInsuranceResponse = zAdminReadResult;
689
634
 
690
635
  export const zAdminRequestSubscriptionInsuranceBody = zAdminRequestId;
691
636
 
@@ -694,77 +639,86 @@ export const zAdminRequestSubscriptionInsurancePath = z.object({
694
639
  });
695
640
 
696
641
  /**
697
- * OK
642
+ * Accepted
698
643
  */
699
644
  export const zAdminRequestSubscriptionInsuranceResponse = zCommandSuccess;
700
645
 
701
- export const zAdminRequestUserInsuranceBody = zAdminRequestId;
646
+ export const zAdminRefreshSubscriptionBody = zAdminRequestId;
702
647
 
703
- export const zAdminRequestUserInsurancePath = z.object({
704
- uid: z.string(),
648
+ export const zAdminRefreshSubscriptionPath = z.object({
649
+ subscriptionId: z.string(),
705
650
  });
706
651
 
707
652
  /**
708
- * OK
653
+ * Accepted
709
654
  */
710
- export const zAdminRequestUserInsuranceResponse = zCommandSuccess;
655
+ export const zAdminRefreshSubscriptionResponse = zCommandSuccess;
711
656
 
712
- export const zAdminRequestTrackerInsuranceBody = zAdminRequestId;
657
+ export const zAdminListFavoritesQuery = z.object({
658
+ cursor: z.string().optional(),
659
+ });
713
660
 
714
- export const zAdminRequestTrackerInsurancePath = z.object({
661
+ /**
662
+ * OK
663
+ */
664
+ export const zAdminListFavoritesResponse = zAdminReadResult;
665
+
666
+ export const zAdminDeleteFavoritePath = z.object({
715
667
  trackerId: z
716
668
  .string()
717
- .min(1)
718
- .max(128)
719
- .regex(/^[A-Za-z0-9_-]+$/),
669
+ .length(32)
670
+ .regex(/^[a-f0-9]{32}$/),
720
671
  });
721
672
 
722
673
  /**
723
674
  * OK
724
675
  */
725
- export const zAdminRequestTrackerInsuranceResponse = zCommandSuccess;
726
-
727
- export const zAdminReconcileTrackerSubscriptionBody = zAdminRequestId;
676
+ export const zAdminDeleteFavoriteResponse = zCommandSuccess;
728
677
 
729
- export const zAdminReconcileTrackerSubscriptionPath = z.object({
678
+ export const zAdminGetFavoritePath = z.object({
730
679
  trackerId: z
731
680
  .string()
732
- .min(1)
733
- .max(128)
734
- .regex(/^[A-Za-z0-9_-]+$/),
681
+ .length(32)
682
+ .regex(/^[a-f0-9]{32}$/),
735
683
  });
736
684
 
737
685
  /**
738
686
  * OK
739
687
  */
740
- export const zAdminReconcileTrackerSubscriptionResponse = zCommandSuccess;
688
+ export const zAdminGetFavoriteResponse = zAdminReadResult;
741
689
 
742
- export const zAdminRefreshSubscriptionBody = zAdminRequestId;
690
+ export const zAdminUpdateFavoriteCommentBody = zAdminFavoriteRequest;
743
691
 
744
- export const zAdminRefreshSubscriptionPath = z.object({
745
- subscriptionId: z.string(),
692
+ export const zAdminUpdateFavoriteCommentPath = z.object({
693
+ trackerId: z
694
+ .string()
695
+ .length(32)
696
+ .regex(/^[a-f0-9]{32}$/),
746
697
  });
747
698
 
748
699
  /**
749
700
  * OK
750
701
  */
751
- export const zAdminRefreshSubscriptionResponse = zCommandSuccess;
702
+ export const zAdminUpdateFavoriteCommentResponse = zCommandSuccess;
752
703
 
753
- export const zAdminLinkSingleSubscriptionBody = zAdminRequestId;
704
+ export const zAdminPutFavoriteBody = zAdminFavoriteRequest;
754
705
 
755
- export const zAdminLinkSingleSubscriptionPath = z.object({
756
- uid: z.string(),
706
+ export const zAdminPutFavoritePath = z.object({
707
+ trackerId: z
708
+ .string()
709
+ .length(32)
710
+ .regex(/^[a-f0-9]{32}$/),
757
711
  });
758
712
 
759
713
  /**
760
714
  * OK
761
715
  */
762
- export const zAdminLinkSingleSubscriptionResponse = zCommandSuccess;
716
+ export const zAdminPutFavoriteResponse = zCommandSuccess;
763
717
 
764
718
  export const zAdminCreateB2bSubscriptionBody = zAdminB2bSubscriptionRequest;
765
719
 
766
720
  /**
767
- * OK
721
+ * Created
768
722
  */
769
723
  export const zAdminCreateB2bSubscriptionResponse = zAdminB2bSubscriptionResult;
770
724
 
@@ -782,24 +736,11 @@ export const zAdminSyncB2bInsurancePath = z.object({
782
736
  });
783
737
 
784
738
  /**
785
- * OK
739
+ * Accepted
786
740
  */
787
741
  export const zAdminSyncB2bInsuranceResponse = zCommandSuccess;
788
742
 
789
743
  /**
790
- * OK
744
+ * Accepted
791
745
  */
792
746
  export const zAdminSyncAllB2bInsuranceResponse = zCommandSuccess;
793
-
794
- export const zAdminSubscribeTrackerPath = z.object({
795
- trackerId: z
796
- .string()
797
- .min(1)
798
- .max(128)
799
- .regex(/^[A-Za-z0-9_-]+$/),
800
- });
801
-
802
- /**
803
- * OK
804
- */
805
- export const zAdminSubscribeTrackerResponse = zAdminTrackerView.nullable();