@bikefinder/api-client 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +56 -13
  2. package/dist/admin/generated/client/client.gen.d.ts +3 -0
  3. package/dist/admin/generated/client/client.gen.d.ts.map +1 -0
  4. package/dist/admin/generated/client/client.gen.js +218 -0
  5. package/dist/admin/generated/client/client.gen.js.map +1 -0
  6. package/dist/admin/generated/client/index.d.ts +11 -0
  7. package/dist/admin/generated/client/index.d.ts.map +1 -0
  8. package/dist/admin/generated/client/index.js +7 -0
  9. package/dist/admin/generated/client/index.js.map +1 -0
  10. package/dist/admin/generated/client/types.gen.d.ts +121 -0
  11. package/dist/admin/generated/client/types.gen.d.ts.map +1 -0
  12. package/dist/admin/generated/client/types.gen.js +3 -0
  13. package/dist/admin/generated/client/types.gen.js.map +1 -0
  14. package/dist/admin/generated/client/utils.gen.d.ts +38 -0
  15. package/dist/admin/generated/client/utils.gen.d.ts.map +1 -0
  16. package/dist/admin/generated/client/utils.gen.js +232 -0
  17. package/dist/admin/generated/client/utils.gen.js.map +1 -0
  18. package/dist/admin/generated/client.gen.d.ts +13 -0
  19. package/dist/admin/generated/client.gen.d.ts.map +1 -0
  20. package/dist/admin/generated/client.gen.js +4 -0
  21. package/dist/admin/generated/client.gen.js.map +1 -0
  22. package/dist/admin/generated/core/auth.gen.d.ts +26 -0
  23. package/dist/admin/generated/core/auth.gen.d.ts.map +1 -0
  24. package/dist/admin/generated/core/auth.gen.js +15 -0
  25. package/dist/admin/generated/core/auth.gen.js.map +1 -0
  26. package/dist/admin/generated/core/bodySerializer.gen.d.ts +26 -0
  27. package/dist/admin/generated/core/bodySerializer.gen.d.ts.map +1 -0
  28. package/dist/admin/generated/core/bodySerializer.gen.js +58 -0
  29. package/dist/admin/generated/core/bodySerializer.gen.js.map +1 -0
  30. package/dist/admin/generated/core/params.gen.d.ts +44 -0
  31. package/dist/admin/generated/core/params.gen.d.ts.map +1 -0
  32. package/dist/admin/generated/core/params.gen.js +113 -0
  33. package/dist/admin/generated/core/params.gen.js.map +1 -0
  34. package/dist/admin/generated/core/pathSerializer.gen.d.ts +34 -0
  35. package/dist/admin/generated/core/pathSerializer.gen.d.ts.map +1 -0
  36. package/dist/admin/generated/core/pathSerializer.gen.js +115 -0
  37. package/dist/admin/generated/core/pathSerializer.gen.js.map +1 -0
  38. package/dist/admin/generated/core/queryKeySerializer.gen.d.ts +19 -0
  39. package/dist/admin/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  40. package/dist/admin/generated/core/queryKeySerializer.gen.js +100 -0
  41. package/dist/admin/generated/core/queryKeySerializer.gen.js.map +1 -0
  42. package/dist/admin/generated/core/serverSentEvents.gen.d.ts +72 -0
  43. package/dist/admin/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  44. package/dist/admin/generated/core/serverSentEvents.gen.js +137 -0
  45. package/dist/admin/generated/core/serverSentEvents.gen.js.map +1 -0
  46. package/dist/admin/generated/core/types.gen.d.ts +84 -0
  47. package/dist/admin/generated/core/types.gen.d.ts.map +1 -0
  48. package/dist/admin/generated/core/types.gen.js +3 -0
  49. package/dist/admin/generated/core/types.gen.js.map +1 -0
  50. package/dist/admin/generated/core/utils.gen.d.ts +20 -0
  51. package/dist/admin/generated/core/utils.gen.d.ts.map +1 -0
  52. package/dist/admin/generated/core/utils.gen.js +88 -0
  53. package/dist/admin/generated/core/utils.gen.js.map +1 -0
  54. package/dist/admin/generated/index.d.ts +3 -0
  55. package/dist/admin/generated/index.d.ts.map +1 -0
  56. package/dist/admin/generated/index.js +3 -0
  57. package/dist/admin/generated/index.js.map +1 -0
  58. package/dist/admin/generated/sdk.gen.d.ts +74 -0
  59. package/dist/admin/generated/sdk.gen.d.ts.map +1 -0
  60. package/dist/admin/generated/sdk.gen.js +417 -0
  61. package/dist/admin/generated/sdk.gen.js.map +1 -0
  62. package/dist/admin/generated/types.gen.d.ts +2087 -0
  63. package/dist/admin/generated/types.gen.d.ts.map +1 -0
  64. package/dist/admin/generated/types.gen.js +3 -0
  65. package/dist/admin/generated/types.gen.js.map +1 -0
  66. package/dist/admin/generated/zod.gen.d.ts +2786 -0
  67. package/dist/admin/generated/zod.gen.d.ts.map +1 -0
  68. package/dist/admin/generated/zod.gen.js +659 -0
  69. package/dist/admin/generated/zod.gen.js.map +1 -0
  70. package/dist/admin/index.d.ts +15 -0
  71. package/dist/admin/index.d.ts.map +1 -0
  72. package/dist/admin/index.js +19 -0
  73. package/dist/admin/index.js.map +1 -0
  74. package/dist/generated/index.d.ts +1 -1
  75. package/dist/generated/index.d.ts.map +1 -1
  76. package/dist/generated/sdk.gen.d.ts +128 -2
  77. package/dist/generated/sdk.gen.d.ts.map +1 -1
  78. package/dist/generated/sdk.gen.js +468 -5
  79. package/dist/generated/sdk.gen.js.map +1 -1
  80. package/dist/generated/types.gen.d.ts +1867 -0
  81. package/dist/generated/types.gen.d.ts.map +1 -1
  82. package/dist/generated/zod.gen.d.ts +1063 -0
  83. package/dist/generated/zod.gen.d.ts.map +1 -1
  84. package/dist/generated/zod.gen.js +801 -0
  85. package/dist/generated/zod.gen.js.map +1 -1
  86. package/dist/http-client.d.ts +1 -1
  87. package/dist/http-client.d.ts.map +1 -1
  88. package/dist/http-client.js +3 -3
  89. package/dist/http-client.js.map +1 -1
  90. package/dist/index.d.ts +2 -0
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +3 -2
  93. package/dist/index.js.map +1 -1
  94. package/dist/realtime/watch.d.ts +21 -0
  95. package/dist/realtime/watch.d.ts.map +1 -0
  96. package/dist/realtime/{watch-trackers.js → watch.js} +13 -11
  97. package/dist/realtime/watch.js.map +1 -0
  98. package/package.json +7 -2
  99. package/src/admin/generated/client/client.gen.ts +300 -0
  100. package/src/admin/generated/client/index.ts +27 -0
  101. package/src/admin/generated/client/types.gen.ts +238 -0
  102. package/src/admin/generated/client/utils.gen.ts +337 -0
  103. package/src/admin/generated/client.gen.ts +24 -0
  104. package/src/admin/generated/core/auth.gen.ts +49 -0
  105. package/src/admin/generated/core/bodySerializer.gen.ts +96 -0
  106. package/src/admin/generated/core/params.gen.ts +188 -0
  107. package/src/admin/generated/core/pathSerializer.gen.ts +186 -0
  108. package/src/admin/generated/core/queryKeySerializer.gen.ts +134 -0
  109. package/src/admin/generated/core/serverSentEvents.gen.ts +265 -0
  110. package/src/admin/generated/core/types.gen.ts +126 -0
  111. package/src/admin/generated/core/utils.gen.ts +146 -0
  112. package/src/admin/generated/index.ts +237 -0
  113. package/src/admin/generated/sdk.gen.ts +1066 -0
  114. package/src/admin/generated/types.gen.ts +2418 -0
  115. package/src/admin/generated/zod.gen.ts +805 -0
  116. package/src/admin/index.ts +34 -0
  117. package/src/generated/index.ts +232 -0
  118. package/src/generated/sdk.gen.ts +1072 -11
  119. package/src/generated/types.gen.ts +2215 -42
  120. package/src/generated/zod.gen.ts +968 -14
  121. package/src/http-client.ts +6 -3
  122. package/src/index.ts +10 -2
  123. package/src/realtime/watch.ts +158 -0
  124. package/dist/realtime/watch-trackers.d.ts +0 -10
  125. package/dist/realtime/watch-trackers.d.ts.map +0 -1
  126. package/dist/realtime/watch-trackers.js.map +0 -1
  127. package/src/realtime/watch-trackers.ts +0 -114
@@ -2,10 +2,166 @@
2
2
 
3
3
  import * as z from "zod";
4
4
 
5
+ export const zAccountDeletionRequest = z.object({
6
+ requestId: z.string(),
7
+ });
8
+
9
+ export const zAccountNotification = z.object({
10
+ id: z.string(),
11
+ title: z.string(),
12
+ body: z.string(),
13
+ trackerId: z.string().nullable(),
14
+ timestampMs: z.int().gte(-9007199254740991).lte(9007199254740991),
15
+ subscriptionId: z.string().nullable(),
16
+ });
17
+
18
+ export const zBluetoothBatteryRequest = z.object({
19
+ seenAt: z.int().gte(-9007199254740991).lte(9007199254740991),
20
+ level: z
21
+ .int()
22
+ .min(-2147483648, {
23
+ error: "Invalid value: Expected int32 to be >= -2147483648",
24
+ })
25
+ .max(2147483647, {
26
+ error: "Invalid value: Expected int32 to be <= 2147483647",
27
+ })
28
+ .nullable(),
29
+ isCharging: z.boolean(),
30
+ });
31
+
32
+ export const zBluetoothCommandReport = z.object({
33
+ type: z.string(),
34
+ success: z.boolean(),
35
+ });
36
+
37
+ export const zBluetoothObservationBattery = z.object({
38
+ level: z.number().nullable(),
39
+ isCharging: z.boolean(),
40
+ });
41
+
42
+ export const zBluetoothObservationRequest = z.object({
43
+ requestId: z.string(),
44
+ type: z.string(),
45
+ timestampMs: z.int().gte(-9007199254740991).lte(9007199254740991),
46
+ latitude: z.number(),
47
+ longitude: z.number(),
48
+ accuracy: z.number(),
49
+ userLocationAccuracy: z.number(),
50
+ crowdKey: z
51
+ .int()
52
+ .min(-2147483648, {
53
+ error: "Invalid value: Expected int32 to be >= -2147483648",
54
+ })
55
+ .max(2147483647, {
56
+ error: "Invalid value: Expected int32 to be <= 2147483647",
57
+ })
58
+ .nullable(),
59
+ rssi: z
60
+ .int()
61
+ .min(-2147483648, {
62
+ error: "Invalid value: Expected int32 to be >= -2147483648",
63
+ })
64
+ .max(2147483647, {
65
+ error: "Invalid value: Expected int32 to be <= 2147483647",
66
+ })
67
+ .nullable(),
68
+ status: z.string(),
69
+ statusValue: z
70
+ .int()
71
+ .min(-2147483648, {
72
+ error: "Invalid value: Expected int32 to be >= -2147483648",
73
+ })
74
+ .max(2147483647, {
75
+ error: "Invalid value: Expected int32 to be <= 2147483647",
76
+ }),
77
+ bleId: z.string(),
78
+ appState: z.string(),
79
+ battery: zBluetoothObservationBattery,
80
+ });
81
+
82
+ export const zBluetoothObservationResult = z.object({
83
+ success: z.boolean(),
84
+ observationId: z.string(),
85
+ });
86
+
87
+ export const zBluetoothReportingPolicy = z.object({
88
+ pauseMs: z
89
+ .int()
90
+ .min(-2147483648, {
91
+ error: "Invalid value: Expected int32 to be >= -2147483648",
92
+ })
93
+ .max(2147483647, {
94
+ error: "Invalid value: Expected int32 to be <= 2147483647",
95
+ }),
96
+ accuracy: z
97
+ .int()
98
+ .min(-2147483648, {
99
+ error: "Invalid value: Expected int32 to be >= -2147483648",
100
+ })
101
+ .max(2147483647, {
102
+ error: "Invalid value: Expected int32 to be <= 2147483647",
103
+ }),
104
+ });
105
+
106
+ export const zClaimTrackerGuestAccessRequest = z.object({
107
+ accessCode: z.string(),
108
+ displayName: z.string().nullable(),
109
+ });
110
+
111
+ export const zClaimTrackerOwnershipRequest = z.object({
112
+ displayName: z.string().nullable(),
113
+ });
114
+
115
+ export const zCommandSuccess = z.object({
116
+ success: z.boolean(),
117
+ });
118
+
119
+ export const zCompleteFirmwareRequest = z.object({
120
+ from: z.string(),
121
+ version: z.string(),
122
+ });
123
+
124
+ export const zFactoryResetResult = z.object({
125
+ error: z.boolean(),
126
+ });
127
+
5
128
  export const zHealthStatus = z.object({
6
129
  status: z.string(),
7
130
  });
8
131
 
132
+ export const zIFormFile = z.string();
133
+
134
+ export const zLegacyDevicePreferences = z.object({
135
+ unit: z.string(),
136
+ liquidGlass: z.boolean(),
137
+ mapStyle: z.string(),
138
+ });
139
+
140
+ export const zAccountPreferences = z.object({
141
+ language: z.string(),
142
+ alarm: z.boolean(),
143
+ timeSensitive: z.boolean(),
144
+ pushReady: z.boolean(),
145
+ devicePreferences: zLegacyDevicePreferences,
146
+ });
147
+
148
+ export const zNotificationPage = z.object({
149
+ items: z.array(zAccountNotification),
150
+ nextCursor: z.string().nullable(),
151
+ });
152
+
153
+ export const zPhotoUploadResult = z.object({
154
+ id: z.string(),
155
+ });
156
+
157
+ export const zPlanStatus = z.enum([
158
+ "active",
159
+ "ending",
160
+ "hold",
161
+ "inactive",
162
+ "unknown",
163
+ ]);
164
+
9
165
  export const zProblemDetails = z.object({
10
166
  type: z.string().nullish(),
11
167
  title: z.string().nullish(),
@@ -22,13 +178,287 @@ export const zProblemDetails = z.object({
22
178
  instance: z.string().nullish(),
23
179
  });
24
180
 
181
+ export const zRecordFirmwareAttemptRequest = z.object({
182
+ attemptId: z.string(),
183
+ success: z.boolean(),
184
+ });
185
+
186
+ export const zRecordFirmwareAttemptResult = z.object({
187
+ success: z.boolean(),
188
+ recorded: z.boolean(),
189
+ });
190
+
191
+ export const zRegisterPushRegistrationRequest = z.object({
192
+ token: z.string(),
193
+ previousTokens: z.array(z.string()).nullish(),
194
+ platform: z.string().nullish(),
195
+ });
196
+
197
+ export const zRemovePushRegistrationRequest = z.object({
198
+ tokens: z.array(z.string()),
199
+ });
200
+
201
+ export const zRemoveTrackerMembershipRequest = z.object({
202
+ expectedLastMember: z.boolean(),
203
+ });
204
+
205
+ export const zSubmitTrackerTheftReportRequest = z.object({
206
+ requestId: z.string(),
207
+ phoneNumber: z.string(),
208
+ });
209
+
210
+ export const zSubscriptionChangeRequest = z.object({
211
+ subscriptionId: z.string(),
212
+ });
213
+
214
+ export const zSubscriptionPlan = z.object({
215
+ id: z.string(),
216
+ ownerUid: z.string().nullable(),
217
+ name: z.string(),
218
+ fallbackTier: z
219
+ .int()
220
+ .min(-2147483648, {
221
+ error: "Invalid value: Expected int32 to be >= -2147483648",
222
+ })
223
+ .max(2147483647, {
224
+ error: "Invalid value: Expected int32 to be <= 2147483647",
225
+ })
226
+ .nullable(),
227
+ status: zPlanStatus,
228
+ isActive: z.boolean().nullable(),
229
+ quantity: z
230
+ .int()
231
+ .min(-2147483648, {
232
+ error: "Invalid value: Expected int32 to be >= -2147483648",
233
+ })
234
+ .max(2147483647, {
235
+ error: "Invalid value: Expected int32 to be <= 2147483647",
236
+ })
237
+ .nullable(),
238
+ available: z
239
+ .int()
240
+ .min(-2147483648, {
241
+ error: "Invalid value: Expected int32 to be >= -2147483648",
242
+ })
243
+ .max(2147483647, {
244
+ error: "Invalid value: Expected int32 to be <= 2147483647",
245
+ }),
246
+ trackerIds: z.array(z.string()),
247
+ managementUrl: z.string().nullable(),
248
+ nextRenewalMs: z
249
+ .int()
250
+ .gte(-9007199254740991)
251
+ .lte(9007199254740991)
252
+ .nullable(),
253
+ endMs: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
254
+ });
255
+
256
+ export const zSubscriptionList = z.object({
257
+ items: z.array(zSubscriptionPlan),
258
+ });
259
+
260
+ export const zTrackerBattery = z.object({
261
+ level: z
262
+ .int()
263
+ .min(-2147483648, {
264
+ error: "Invalid value: Expected int32 to be >= -2147483648",
265
+ })
266
+ .max(2147483647, {
267
+ error: "Invalid value: Expected int32 to be <= 2147483647",
268
+ })
269
+ .nullable(),
270
+ isCharging: z.boolean(),
271
+ timestampMs: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
272
+ });
273
+
274
+ export const zTrackerBikeDetails = z.object({
275
+ nickname: z.string(),
276
+ brand: z.string(),
277
+ type: z.string(),
278
+ model: z.string(),
279
+ frameNumber: z.string(),
280
+ marketPrice: z.string(),
281
+ marketPriceCurrency: z.string(),
282
+ url: z.string(),
283
+ });
284
+
285
+ export const zTrackerBluetoothCredentials = z.object({
286
+ id: z.string(),
287
+ imei: z.string().nullable(),
288
+ generation: z
289
+ .int()
290
+ .min(-2147483648, {
291
+ error: "Invalid value: Expected int32 to be >= -2147483648",
292
+ })
293
+ .max(2147483647, {
294
+ error: "Invalid value: Expected int32 to be <= 2147483647",
295
+ })
296
+ .nullable(),
297
+ pin: z.array(
298
+ z
299
+ .int()
300
+ .min(-2147483648, {
301
+ error: "Invalid value: Expected int32 to be >= -2147483648",
302
+ })
303
+ .max(2147483647, {
304
+ error: "Invalid value: Expected int32 to be <= 2147483647",
305
+ }),
306
+ ),
307
+ rotatePin: z.boolean(),
308
+ });
309
+
310
+ export const zTrackerClaimabilityRequest = z.object({
311
+ deviceIds: z.array(z.string()),
312
+ });
313
+
314
+ export const zTrackerFirmwarePlan = z.object({
315
+ trackerId: z.string(),
316
+ from: z.string(),
317
+ version: z.string(),
318
+ url: z.string(),
319
+ blockSize: 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
+ requiredBattery: z
328
+ .int()
329
+ .min(-2147483648, {
330
+ error: "Invalid value: Expected int32 to be >= -2147483648",
331
+ })
332
+ .max(2147483647, {
333
+ error: "Invalid value: Expected int32 to be <= 2147483647",
334
+ }),
335
+ blockTimeoutMs: z
336
+ .int()
337
+ .min(-2147483648, {
338
+ error: "Invalid value: Expected int32 to be >= -2147483648",
339
+ })
340
+ .max(2147483647, {
341
+ error: "Invalid value: Expected int32 to be <= 2147483647",
342
+ }),
343
+ rebootTimeoutMs: z
344
+ .int()
345
+ .min(-2147483648, {
346
+ error: "Invalid value: Expected int32 to be >= -2147483648",
347
+ })
348
+ .max(2147483647, {
349
+ error: "Invalid value: Expected int32 to be <= 2147483647",
350
+ }),
351
+ });
352
+
353
+ export const zTrackerFirmwareVersions = z.object({
354
+ lte: z.string().nullable(),
355
+ ble: z.string().nullable(),
356
+ bat: z.string().nullable(),
357
+ tiFirmware: z.string().nullable(),
358
+ mtkFirmware: z.string().nullable(),
359
+ });
360
+
361
+ export const zTrackerInvitation = z.object({
362
+ accessCode: z.string(),
363
+ });
364
+
365
+ export const zTrackerModeResult = z.object({
366
+ success: z.boolean(),
367
+ requestedMode: z.string(),
368
+ });
369
+
370
+ export const zTrackerPhoto = z.object({
371
+ id: z.string(),
372
+ kind: z.string(),
373
+ url: z.string(),
374
+ thumbnailUrl: z.string(),
375
+ timestampMs: z.int().gte(-9007199254740991).lte(9007199254740991).nullable(),
376
+ });
377
+
378
+ export const zTrackerPhotoList = z.object({
379
+ items: z.array(zTrackerPhoto),
380
+ });
381
+
382
+ export const zTrackerPosition = z.object({
383
+ id: z.string(),
384
+ latitude: z.number(),
385
+ longitude: z.number(),
386
+ timestampMs: z.int().gte(-9007199254740991).lte(9007199254740991),
387
+ source: z.string(),
388
+ accuracy: z.number().nullable(),
389
+ });
390
+
391
+ export const zHistoryPage = z.object({
392
+ items: z.array(zTrackerPosition),
393
+ nextCursor: z.string().nullable(),
394
+ });
395
+
396
+ export const zTrackerPositionState = z.object({
397
+ latest: zTrackerPosition.nullable(),
398
+ lastPrecise: zTrackerPosition.nullable(),
399
+ });
400
+
401
+ export const zTrackerSubscription = z.object({
402
+ id: z.string().nullable(),
403
+ status: z.string(),
404
+ endTimestampMs: z
405
+ .int()
406
+ .gte(-9007199254740991)
407
+ .lte(9007199254740991)
408
+ .nullable(),
409
+ tier: z
410
+ .int()
411
+ .min(-2147483648, {
412
+ error: "Invalid value: Expected int32 to be >= -2147483648",
413
+ })
414
+ .max(2147483647, {
415
+ error: "Invalid value: Expected int32 to be <= 2147483647",
416
+ })
417
+ .nullable(),
418
+ });
419
+
420
+ export const zTrackerTheftReportResult = z.object({
421
+ success: z.boolean(),
422
+ reportId: z.string(),
423
+ requestId: z.string(),
424
+ });
425
+
25
426
  export const zTrackingMode = z.enum(["standard", "security", "tracking"]);
26
427
 
428
+ export const zTrackerModeRequest = z.object({
429
+ mode: zTrackingMode,
430
+ });
431
+
27
432
  export const zTrackerSummary = z.object({
28
433
  id: z.string(),
29
434
  nickname: z.string().nullable(),
30
435
  requestedMode: zTrackingMode.nullable(),
31
436
  subscriptionActive: z.boolean().nullable(),
437
+ bikeDetails: zTrackerBikeDetails.nullable(),
438
+ battery: zTrackerBattery.nullable(),
439
+ subscription: zTrackerSubscription.nullable(),
440
+ membershipCount: z
441
+ .int()
442
+ .min(-2147483648, {
443
+ error: "Invalid value: Expected int32 to be >= -2147483648",
444
+ })
445
+ .max(2147483647, {
446
+ error: "Invalid value: Expected int32 to be <= 2147483647",
447
+ }),
448
+ sharingCodes: z.array(z.string()).nullable(),
449
+ generation: z
450
+ .int()
451
+ .min(-2147483648, {
452
+ error: "Invalid value: Expected int32 to be >= -2147483648",
453
+ })
454
+ .max(2147483647, {
455
+ error: "Invalid value: Expected int32 to be <= 2147483647",
456
+ })
457
+ .nullable(),
458
+ imei: z.string().nullable(),
459
+ iccid: z.string().nullable(),
460
+ firmwareVersions: zTrackerFirmwareVersions.nullable(),
461
+ lastCommunicationMode: z.string().nullable(),
32
462
  });
33
463
 
34
464
  export const zTrackerPage = z.object({
@@ -36,42 +466,82 @@ export const zTrackerPage = z.object({
36
466
  nextCursor: z.string().nullable(),
37
467
  });
38
468
 
469
+ export const zUpdateAccountPreferencesRequest = z.object({
470
+ language: z.string().nullish(),
471
+ alarm: z.boolean().nullish(),
472
+ timeSensitive: z.boolean().nullish(),
473
+ });
474
+
475
+ export const zUpdateBluetoothPinRequest = z.object({
476
+ pin: z.array(
477
+ z
478
+ .int()
479
+ .min(-2147483648, {
480
+ error: "Invalid value: Expected int32 to be >= -2147483648",
481
+ })
482
+ .max(2147483647, {
483
+ error: "Invalid value: Expected int32 to be <= 2147483647",
484
+ }),
485
+ ),
486
+ expected: z.array(
487
+ z
488
+ .int()
489
+ .min(-2147483648, {
490
+ error: "Invalid value: Expected int32 to be >= -2147483648",
491
+ })
492
+ .max(2147483647, {
493
+ error: "Invalid value: Expected int32 to be <= 2147483647",
494
+ }),
495
+ ),
496
+ clearRotation: z.boolean(),
497
+ });
498
+
499
+ export const zUpdateTrackerBikeRequest = z.object({
500
+ before: zTrackerBikeDetails,
501
+ draft: zTrackerBikeDetails,
502
+ });
503
+
39
504
  /**
40
505
  * OK
41
506
  */
42
507
  export const zGetHealthResponse = zHealthStatus;
43
508
 
44
- export const zListTrackersQuery = z.object({
45
- cursor: z
509
+ /**
510
+ * OK
511
+ */
512
+ export const zGetBluetoothReportingPolicyResponse = zBluetoothReportingPolicy;
513
+
514
+ export const zUnlinkTrackerSubscriptionBody = zSubscriptionChangeRequest;
515
+
516
+ export const zUnlinkTrackerSubscriptionPath = z.object({
517
+ trackerId: z
46
518
  .string()
47
519
  .min(1)
48
520
  .max(128)
49
- .regex(/^[A-Za-z0-9_-]+$/)
50
- .optional(),
51
- limit: z.int().gte(1).lte(100).optional().default(50),
521
+ .regex(/^[A-Za-z0-9_-]+$/),
52
522
  });
53
523
 
54
524
  /**
55
525
  * OK
56
526
  */
57
- export const zListTrackersResponse = zTrackerPage;
527
+ export const zUnlinkTrackerSubscriptionResponse = zCommandSuccess;
58
528
 
59
- export const zSubscribeTrackersQuery = z.object({
60
- cursor: z
529
+ export const zLinkTrackerSubscriptionBody = zSubscriptionChangeRequest;
530
+
531
+ export const zLinkTrackerSubscriptionPath = z.object({
532
+ trackerId: z
61
533
  .string()
62
534
  .min(1)
63
535
  .max(128)
64
- .regex(/^[A-Za-z0-9_-]+$/)
65
- .optional(),
66
- limit: z.int().gte(1).lte(100).optional().default(50),
536
+ .regex(/^[A-Za-z0-9_-]+$/),
67
537
  });
68
538
 
69
539
  /**
70
540
  * OK
71
541
  */
72
- export const zSubscribeTrackersResponse = zTrackerPage.nullable();
542
+ export const zLinkTrackerSubscriptionResponse = zCommandSuccess;
73
543
 
74
- export const zGetTrackerPath = z.object({
544
+ export const zListTrackerPhotosPath = z.object({
75
545
  trackerId: z
76
546
  .string()
77
547
  .min(1)
@@ -82,4 +552,488 @@ export const zGetTrackerPath = z.object({
82
552
  /**
83
553
  * OK
84
554
  */
85
- export const zGetTrackerResponse = zTrackerSummary;
555
+ export const zListTrackerPhotosResponse = zTrackerPhotoList;
556
+
557
+ export const zUploadTrackerPhotoBody = z
558
+ .object({
559
+ file: zIFormFile,
560
+ })
561
+ .and(
562
+ z.object({
563
+ kind: z.string(),
564
+ }),
565
+ )
566
+ .and(
567
+ z.object({
568
+ width: z
569
+ .int()
570
+ .min(-2147483648, {
571
+ error: "Invalid value: Expected int32 to be >= -2147483648",
572
+ })
573
+ .max(2147483647, {
574
+ error: "Invalid value: Expected int32 to be <= 2147483647",
575
+ }),
576
+ }),
577
+ )
578
+ .and(
579
+ z.object({
580
+ height: z
581
+ .int()
582
+ .min(-2147483648, {
583
+ error: "Invalid value: Expected int32 to be >= -2147483648",
584
+ })
585
+ .max(2147483647, {
586
+ error: "Invalid value: Expected int32 to be <= 2147483647",
587
+ }),
588
+ }),
589
+ );
590
+
591
+ export const zUploadTrackerPhotoPath = z.object({
592
+ trackerId: z
593
+ .string()
594
+ .min(1)
595
+ .max(128)
596
+ .regex(/^[A-Za-z0-9_-]+$/),
597
+ });
598
+
599
+ /**
600
+ * OK
601
+ */
602
+ export const zUploadTrackerPhotoResponse = zPhotoUploadResult;
603
+
604
+ export const zDeleteTrackerPhotoPath = z.object({
605
+ trackerId: z
606
+ .string()
607
+ .min(1)
608
+ .max(128)
609
+ .regex(/^[A-Za-z0-9_-]+$/),
610
+ photoId: z.string(),
611
+ });
612
+
613
+ /**
614
+ * OK
615
+ */
616
+ export const zDeleteTrackerPhotoResponse = zCommandSuccess;
617
+
618
+ export const zListTrackersQuery = z.object({
619
+ cursor: z
620
+ .string()
621
+ .min(1)
622
+ .max(128)
623
+ .regex(/^[A-Za-z0-9_-]+$/)
624
+ .optional(),
625
+ limit: z.int().gte(1).lte(100).optional().default(50),
626
+ });
627
+
628
+ /**
629
+ * OK
630
+ */
631
+ export const zListTrackersResponse = zTrackerPage;
632
+
633
+ export const zSubscribeTrackersQuery = z.object({
634
+ cursor: z
635
+ .string()
636
+ .min(1)
637
+ .max(128)
638
+ .regex(/^[A-Za-z0-9_-]+$/)
639
+ .optional(),
640
+ limit: z.int().gte(1).lte(100).optional().default(50),
641
+ });
642
+
643
+ /**
644
+ * OK
645
+ */
646
+ export const zSubscribeTrackersResponse = zTrackerPage.nullable();
647
+
648
+ export const zGetTrackerPath = z.object({
649
+ trackerId: z
650
+ .string()
651
+ .min(1)
652
+ .max(128)
653
+ .regex(/^[A-Za-z0-9_-]+$/),
654
+ });
655
+
656
+ /**
657
+ * OK
658
+ */
659
+ export const zGetTrackerResponse = zTrackerSummary;
660
+
661
+ export const zGetTrackerPositionsPath = z.object({
662
+ trackerId: z
663
+ .string()
664
+ .min(1)
665
+ .max(128)
666
+ .regex(/^[A-Za-z0-9_-]+$/),
667
+ });
668
+
669
+ /**
670
+ * OK
671
+ */
672
+ export const zGetTrackerPositionsResponse = zTrackerPositionState;
673
+
674
+ export const zSubscribeTrackerPositionsPath = z.object({
675
+ trackerId: z
676
+ .string()
677
+ .min(1)
678
+ .max(128)
679
+ .regex(/^[A-Za-z0-9_-]+$/),
680
+ });
681
+
682
+ /**
683
+ * OK
684
+ */
685
+ export const zSubscribeTrackerPositionsResponse =
686
+ zTrackerPositionState.nullable();
687
+
688
+ export const zSubscribeTrackerPhotosPath = z.object({
689
+ trackerId: z
690
+ .string()
691
+ .min(1)
692
+ .max(128)
693
+ .regex(/^[A-Za-z0-9_-]+$/),
694
+ });
695
+
696
+ /**
697
+ * OK
698
+ */
699
+ export const zSubscribeTrackerPhotosResponse = zTrackerPhotoList.nullable();
700
+
701
+ export const zRequestTrackerModeBody = zTrackerModeRequest;
702
+
703
+ export const zRequestTrackerModePath = z.object({
704
+ trackerId: z
705
+ .string()
706
+ .min(1)
707
+ .max(128)
708
+ .regex(/^[A-Za-z0-9_-]+$/),
709
+ });
710
+
711
+ /**
712
+ * OK
713
+ */
714
+ export const zRequestTrackerModeResponse = zTrackerModeResult;
715
+
716
+ export const zCheckTrackerClaimabilityBody = zTrackerClaimabilityRequest;
717
+
718
+ /**
719
+ * OK
720
+ */
721
+ export const zCheckTrackerClaimabilityResponse = z.record(
722
+ z.string(),
723
+ z.boolean(),
724
+ );
725
+
726
+ export const zClaimTrackerOwnershipBody = zClaimTrackerOwnershipRequest;
727
+
728
+ export const zClaimTrackerOwnershipPath = z.object({
729
+ trackerId: z
730
+ .string()
731
+ .min(1)
732
+ .max(128)
733
+ .regex(/^[A-Za-z0-9_-]+$/),
734
+ });
735
+
736
+ /**
737
+ * OK
738
+ */
739
+ export const zClaimTrackerOwnershipResponse = zCommandSuccess;
740
+
741
+ export const zClaimTrackerGuestAccessBody = zClaimTrackerGuestAccessRequest;
742
+
743
+ export const zClaimTrackerGuestAccessPath = z.object({
744
+ trackerId: z
745
+ .string()
746
+ .min(1)
747
+ .max(128)
748
+ .regex(/^[A-Za-z0-9_-]+$/),
749
+ });
750
+
751
+ /**
752
+ * OK
753
+ */
754
+ export const zClaimTrackerGuestAccessResponse = zCommandSuccess;
755
+
756
+ export const zCreateTrackerInvitationPath = z.object({
757
+ trackerId: z
758
+ .string()
759
+ .min(1)
760
+ .max(128)
761
+ .regex(/^[A-Za-z0-9_-]+$/),
762
+ });
763
+
764
+ /**
765
+ * OK
766
+ */
767
+ export const zCreateTrackerInvitationResponse = zTrackerInvitation;
768
+
769
+ export const zRevokeTrackerInvitationPath = z.object({
770
+ trackerId: z
771
+ .string()
772
+ .min(1)
773
+ .max(128)
774
+ .regex(/^[A-Za-z0-9_-]+$/),
775
+ accessCode: z.string(),
776
+ });
777
+
778
+ /**
779
+ * OK
780
+ */
781
+ export const zRevokeTrackerInvitationResponse = zCommandSuccess;
782
+
783
+ export const zRemoveTrackerMembershipBody = zRemoveTrackerMembershipRequest;
784
+
785
+ export const zRemoveTrackerMembershipPath = z.object({
786
+ trackerId: z
787
+ .string()
788
+ .min(1)
789
+ .max(128)
790
+ .regex(/^[A-Za-z0-9_-]+$/),
791
+ });
792
+
793
+ /**
794
+ * OK
795
+ */
796
+ export const zRemoveTrackerMembershipResponse = zCommandSuccess;
797
+
798
+ export const zUpdateTrackerBikeBody = zUpdateTrackerBikeRequest;
799
+
800
+ export const zUpdateTrackerBikePath = z.object({
801
+ trackerId: z
802
+ .string()
803
+ .min(1)
804
+ .max(128)
805
+ .regex(/^[A-Za-z0-9_-]+$/),
806
+ });
807
+
808
+ /**
809
+ * OK
810
+ */
811
+ export const zUpdateTrackerBikeResponse = zTrackerBikeDetails;
812
+
813
+ export const zSubmitTrackerTheftReportBody = zSubmitTrackerTheftReportRequest;
814
+
815
+ export const zSubmitTrackerTheftReportPath = z.object({
816
+ trackerId: z
817
+ .string()
818
+ .min(1)
819
+ .max(128)
820
+ .regex(/^[A-Za-z0-9_-]+$/),
821
+ });
822
+
823
+ /**
824
+ * OK
825
+ */
826
+ export const zSubmitTrackerTheftReportResponse = zTrackerTheftReportResult;
827
+
828
+ export const zGetTrackerBluetoothCredentialsPath = z.object({
829
+ trackerId: z
830
+ .string()
831
+ .min(1)
832
+ .max(128)
833
+ .regex(/^[A-Za-z0-9_-]+$/),
834
+ });
835
+
836
+ /**
837
+ * OK
838
+ */
839
+ export const zGetTrackerBluetoothCredentialsResponse =
840
+ zTrackerBluetoothCredentials;
841
+
842
+ export const zUpdateTrackerBluetoothPinBody = zUpdateBluetoothPinRequest;
843
+
844
+ export const zUpdateTrackerBluetoothPinPath = z.object({
845
+ trackerId: z
846
+ .string()
847
+ .min(1)
848
+ .max(128)
849
+ .regex(/^[A-Za-z0-9_-]+$/),
850
+ });
851
+
852
+ /**
853
+ * OK
854
+ */
855
+ export const zUpdateTrackerBluetoothPinResponse = zCommandSuccess;
856
+
857
+ export const zReportTrackerBluetoothBatteryBody = zBluetoothBatteryRequest;
858
+
859
+ export const zReportTrackerBluetoothBatteryPath = z.object({
860
+ trackerId: z
861
+ .string()
862
+ .min(1)
863
+ .max(128)
864
+ .regex(/^[A-Za-z0-9_-]+$/),
865
+ });
866
+
867
+ /**
868
+ * OK
869
+ */
870
+ export const zReportTrackerBluetoothBatteryResponse = zCommandSuccess;
871
+
872
+ export const zReportTrackerBluetoothCommandBody = zBluetoothCommandReport;
873
+
874
+ export const zReportTrackerBluetoothCommandPath = z.object({
875
+ trackerId: z
876
+ .string()
877
+ .min(1)
878
+ .max(128)
879
+ .regex(/^[A-Za-z0-9_-]+$/),
880
+ });
881
+
882
+ /**
883
+ * OK
884
+ */
885
+ export const zReportTrackerBluetoothCommandResponse = zCommandSuccess;
886
+
887
+ export const zUploadTrackerBluetoothObservationBody =
888
+ zBluetoothObservationRequest;
889
+
890
+ export const zUploadTrackerBluetoothObservationPath = z.object({
891
+ trackerId: z
892
+ .string()
893
+ .min(1)
894
+ .max(128)
895
+ .regex(/^[A-Za-z0-9_-]+$/),
896
+ });
897
+
898
+ /**
899
+ * OK
900
+ */
901
+ export const zUploadTrackerBluetoothObservationResponse =
902
+ zBluetoothObservationResult;
903
+
904
+ export const zReportTrackerFactoryResetPath = z.object({
905
+ trackerId: z
906
+ .string()
907
+ .min(1)
908
+ .max(128)
909
+ .regex(/^[A-Za-z0-9_-]+$/),
910
+ });
911
+
912
+ /**
913
+ * OK
914
+ */
915
+ export const zReportTrackerFactoryResetResponse = zFactoryResetResult;
916
+
917
+ export const zGetTrackerFirmwarePlanPath = z.object({
918
+ trackerId: z
919
+ .string()
920
+ .min(1)
921
+ .max(128)
922
+ .regex(/^[A-Za-z0-9_-]+$/),
923
+ });
924
+
925
+ export const zGetTrackerFirmwarePlanQuery = z.object({
926
+ platform: z.string(),
927
+ build: z.string(),
928
+ });
929
+
930
+ /**
931
+ * OK
932
+ */
933
+ export const zGetTrackerFirmwarePlanResponse = zTrackerFirmwarePlan;
934
+
935
+ export const zCompleteTrackerFirmwareUpdateBody = zCompleteFirmwareRequest;
936
+
937
+ export const zCompleteTrackerFirmwareUpdatePath = z.object({
938
+ trackerId: z
939
+ .string()
940
+ .min(1)
941
+ .max(128)
942
+ .regex(/^[A-Za-z0-9_-]+$/),
943
+ });
944
+
945
+ /**
946
+ * OK
947
+ */
948
+ export const zCompleteTrackerFirmwareUpdateResponse = zCommandSuccess;
949
+
950
+ export const zRecordTrackerFirmwareAttemptBody = zRecordFirmwareAttemptRequest;
951
+
952
+ export const zRecordTrackerFirmwareAttemptPath = z.object({
953
+ trackerId: z
954
+ .string()
955
+ .min(1)
956
+ .max(128)
957
+ .regex(/^[A-Za-z0-9_-]+$/),
958
+ });
959
+
960
+ /**
961
+ * OK
962
+ */
963
+ export const zRecordTrackerFirmwareAttemptResponse =
964
+ zRecordFirmwareAttemptResult;
965
+
966
+ /**
967
+ * OK
968
+ */
969
+ export const zGetAccountPreferencesResponse = zAccountPreferences;
970
+
971
+ export const zUpdateAccountPreferencesBody = zUpdateAccountPreferencesRequest;
972
+
973
+ /**
974
+ * OK
975
+ */
976
+ export const zUpdateAccountPreferencesResponse = zAccountPreferences;
977
+
978
+ /**
979
+ * OK
980
+ */
981
+ export const zSubscribeAccountPreferencesResponse =
982
+ zAccountPreferences.nullable();
983
+
984
+ export const zRemovePushRegistrationBody = zRemovePushRegistrationRequest;
985
+
986
+ /**
987
+ * No Content
988
+ */
989
+ export const zRemovePushRegistrationResponse = z.void();
990
+
991
+ export const zRegisterPushRegistrationBody = zRegisterPushRegistrationRequest;
992
+
993
+ /**
994
+ * No Content
995
+ */
996
+ export const zRegisterPushRegistrationResponse = z.void();
997
+
998
+ /**
999
+ * Accepted
1000
+ */
1001
+ export const zRequestAccountDeletionResponse = zAccountDeletionRequest;
1002
+
1003
+ export const zListTrackerHistoryPath = z.object({
1004
+ trackerId: z
1005
+ .string()
1006
+ .min(1)
1007
+ .max(128)
1008
+ .regex(/^[A-Za-z0-9_-]+$/),
1009
+ });
1010
+
1011
+ export const zListTrackerHistoryQuery = z.object({
1012
+ startMs: z.int().gte(-9007199254740991).lte(9007199254740991),
1013
+ endMs: z.int().gte(-9007199254740991).lte(9007199254740991),
1014
+ cursor: z.string().optional(),
1015
+ });
1016
+
1017
+ /**
1018
+ * OK
1019
+ */
1020
+ export const zListTrackerHistoryResponse = zHistoryPage;
1021
+
1022
+ export const zListNotificationsQuery = z.object({
1023
+ cursor: z.string().optional(),
1024
+ });
1025
+
1026
+ /**
1027
+ * OK
1028
+ */
1029
+ export const zListNotificationsResponse = zNotificationPage;
1030
+
1031
+ /**
1032
+ * OK
1033
+ */
1034
+ export const zListSubscriptionsResponse = zSubscriptionList;
1035
+
1036
+ /**
1037
+ * OK
1038
+ */
1039
+ export const zSubscribeSubscriptionsResponse = zSubscriptionList.nullable();