@bikefinder/api-client 0.4.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.
@@ -44,6 +44,38 @@ export type AdminDocument = {
44
44
  id: string;
45
45
  fields: AdminSupportValue;
46
46
  };
47
+ export type AdminEvidenceAccountsRequest = {
48
+ accountIds: Array<string>;
49
+ };
50
+ export type AdminEvidenceCursor = {
51
+ timestamp: AdminTimestamp;
52
+ id: string;
53
+ };
54
+ export type AdminEvidenceDocument = {
55
+ id: string;
56
+ path: string;
57
+ exists: boolean;
58
+ fields: null | AdminSupportValue;
59
+ updatedAt: null | AdminTimestamp;
60
+ createdAt: null | AdminTimestamp;
61
+ readAt: AdminTimestamp;
62
+ };
63
+ export type AdminEvidenceDomain = "battery" | "versions" | "reporting" | "configuration" | "membershipReference" | "membershipState" | "commerceReference" | "plan" | "availability" | "bindingCount";
64
+ export type AdminEvidenceHistoryGroup = "battery" | "versions" | "reporting" | "diagnostics";
65
+ export type AdminEvidenceHistoryRequest = {
66
+ accountId: string;
67
+ source: AdminEvidenceHistorySource;
68
+ from: string;
69
+ to: string;
70
+ after?: null | AdminEvidenceCursor;
71
+ fields?: null | Array<AdminEvidenceHistoryGroup>;
72
+ };
73
+ export type AdminEvidenceHistorySource = "data" | "sanitizedData" | "bluetooth" | "audit" | "commandPackets";
74
+ export type AdminEvidenceSnapshot = {
75
+ documents: Array<AdminEvidenceDocument>;
76
+ relatedDocuments: Array<AdminEvidenceDocument>;
77
+ readAt: AdminTimestamp;
78
+ };
47
79
  export type AdminFavoriteRequest = {
48
80
  comment: string;
49
81
  };
@@ -103,6 +135,28 @@ export type AdminReadResult = {
103
135
  nextCursor: null | string;
104
136
  states: null | AdminPublicStates;
105
137
  };
138
+ export type AdminRelationshipChangeRequest = {
139
+ accountIds: Array<string>;
140
+ kind: AdminRelationshipKind;
141
+ accountId: string;
142
+ expectedVersion: string;
143
+ subscriptionId?: null | string;
144
+ allowLastAccountCleanup?: boolean;
145
+ };
146
+ export type AdminRelationshipKind = "subscriptionBinding" | "deviceAccount";
147
+ export type AdminRelationshipRequest = {
148
+ accountIds: Array<string>;
149
+ kind: AdminRelationshipKind;
150
+ };
151
+ export type AdminRelationshipVerification = {
152
+ verified: boolean;
153
+ };
154
+ export type AdminRelationshipVerificationRequest = {
155
+ kind: AdminRelationshipKind;
156
+ accountId: string;
157
+ remainingAccountIds: Array<string>;
158
+ subscriptionId?: null | string;
159
+ };
106
160
  export type AdminRequestId = {
107
161
  requestId: string;
108
162
  };
@@ -150,6 +204,11 @@ export type AdminTrackerCommandResult = {
150
204
  commandId: string;
151
205
  jobIds: Array<string>;
152
206
  };
207
+ export type AdminTrackerFactsRequest = {
208
+ target: string;
209
+ accountIds: Array<string>;
210
+ domain: AdminEvidenceDomain;
211
+ };
153
212
  export type AdminTrackerView = {
154
213
  tracker: AdminReadResult;
155
214
  operationalState: null | AdminOperationalState;
@@ -183,6 +242,578 @@ export type ProblemDetails = {
183
242
  [key: string]: Array<string>;
184
243
  };
185
244
  };
245
+ export type AdminListAccountTrackerEvidenceData = {
246
+ body?: never;
247
+ path: {
248
+ accountId: string;
249
+ };
250
+ query?: {
251
+ after?: string;
252
+ };
253
+ url: "/v1/admin/product-evidence/accounts/{accountId}/trackers";
254
+ };
255
+ export type AdminListAccountTrackerEvidenceErrors = {
256
+ /**
257
+ * Bad Request
258
+ */
259
+ 400: ProblemDetails;
260
+ /**
261
+ * Unauthorized
262
+ */
263
+ 401: ProblemDetails;
264
+ /**
265
+ * Forbidden
266
+ */
267
+ 403: ProblemDetails;
268
+ /**
269
+ * Conflict
270
+ */
271
+ 409: ProblemDetails;
272
+ /**
273
+ * Payload Too Large
274
+ */
275
+ 413: ProblemDetails;
276
+ /**
277
+ * Too Many Requests
278
+ */
279
+ 429: ProblemDetails;
280
+ /**
281
+ * Internal Server Error
282
+ */
283
+ 500: ProblemDetails;
284
+ /**
285
+ * Bad Gateway
286
+ */
287
+ 502: ProblemDetails;
288
+ /**
289
+ * Service Unavailable
290
+ */
291
+ 503: ProblemDetails;
292
+ };
293
+ export type AdminListAccountTrackerEvidenceError = AdminListAccountTrackerEvidenceErrors[keyof AdminListAccountTrackerEvidenceErrors];
294
+ export type AdminListAccountTrackerEvidenceResponses = {
295
+ /**
296
+ * OK
297
+ */
298
+ 200: AdminEvidenceSnapshot;
299
+ };
300
+ export type AdminListAccountTrackerEvidenceResponse = AdminListAccountTrackerEvidenceResponses[keyof AdminListAccountTrackerEvidenceResponses];
301
+ export type AdminListAccountSubscriptionEvidenceData = {
302
+ body?: never;
303
+ path: {
304
+ accountId: string;
305
+ };
306
+ query?: {
307
+ after?: string;
308
+ };
309
+ url: "/v1/admin/product-evidence/accounts/{accountId}/subscriptions";
310
+ };
311
+ export type AdminListAccountSubscriptionEvidenceErrors = {
312
+ /**
313
+ * Bad Request
314
+ */
315
+ 400: ProblemDetails;
316
+ /**
317
+ * Unauthorized
318
+ */
319
+ 401: ProblemDetails;
320
+ /**
321
+ * Forbidden
322
+ */
323
+ 403: ProblemDetails;
324
+ /**
325
+ * Conflict
326
+ */
327
+ 409: ProblemDetails;
328
+ /**
329
+ * Payload Too Large
330
+ */
331
+ 413: ProblemDetails;
332
+ /**
333
+ * Too Many Requests
334
+ */
335
+ 429: ProblemDetails;
336
+ /**
337
+ * Internal Server Error
338
+ */
339
+ 500: ProblemDetails;
340
+ /**
341
+ * Bad Gateway
342
+ */
343
+ 502: ProblemDetails;
344
+ /**
345
+ * Service Unavailable
346
+ */
347
+ 503: ProblemDetails;
348
+ };
349
+ export type AdminListAccountSubscriptionEvidenceError = AdminListAccountSubscriptionEvidenceErrors[keyof AdminListAccountSubscriptionEvidenceErrors];
350
+ export type AdminListAccountSubscriptionEvidenceResponses = {
351
+ /**
352
+ * OK
353
+ */
354
+ 200: AdminEvidenceSnapshot;
355
+ };
356
+ export type AdminListAccountSubscriptionEvidenceResponse = AdminListAccountSubscriptionEvidenceResponses[keyof AdminListAccountSubscriptionEvidenceResponses];
357
+ export type AdminQueryTrackerFactEvidenceData = {
358
+ body: AdminTrackerFactsRequest;
359
+ path?: never;
360
+ query?: never;
361
+ url: "/v1/admin/product-evidence/tracker-fact-queries";
362
+ };
363
+ export type AdminQueryTrackerFactEvidenceErrors = {
364
+ /**
365
+ * Bad Request
366
+ */
367
+ 400: ProblemDetails;
368
+ /**
369
+ * Unauthorized
370
+ */
371
+ 401: ProblemDetails;
372
+ /**
373
+ * Forbidden
374
+ */
375
+ 403: ProblemDetails;
376
+ /**
377
+ * Conflict
378
+ */
379
+ 409: ProblemDetails;
380
+ /**
381
+ * Payload Too Large
382
+ */
383
+ 413: ProblemDetails;
384
+ /**
385
+ * Unsupported Media Type
386
+ */
387
+ 415: ProblemDetails;
388
+ /**
389
+ * Too Many Requests
390
+ */
391
+ 429: ProblemDetails;
392
+ /**
393
+ * Internal Server Error
394
+ */
395
+ 500: ProblemDetails;
396
+ /**
397
+ * Bad Gateway
398
+ */
399
+ 502: ProblemDetails;
400
+ /**
401
+ * Service Unavailable
402
+ */
403
+ 503: ProblemDetails;
404
+ };
405
+ export type AdminQueryTrackerFactEvidenceError = AdminQueryTrackerFactEvidenceErrors[keyof AdminQueryTrackerFactEvidenceErrors];
406
+ export type AdminQueryTrackerFactEvidenceResponses = {
407
+ /**
408
+ * OK
409
+ */
410
+ 200: AdminEvidenceSnapshot;
411
+ };
412
+ export type AdminQueryTrackerFactEvidenceResponse = AdminQueryTrackerFactEvidenceResponses[keyof AdminQueryTrackerFactEvidenceResponses];
413
+ export type AdminGetSubscriptionFactEvidenceData = {
414
+ body?: never;
415
+ path: {
416
+ subscriptionId: string;
417
+ };
418
+ query: {
419
+ domain: "battery" | "versions" | "reporting" | "configuration" | "membershipReference" | "membershipState" | "commerceReference" | "plan" | "availability" | "bindingCount";
420
+ };
421
+ url: "/v1/admin/product-evidence/subscriptions/{subscriptionId}";
422
+ };
423
+ export type AdminGetSubscriptionFactEvidenceErrors = {
424
+ /**
425
+ * Bad Request
426
+ */
427
+ 400: ProblemDetails;
428
+ /**
429
+ * Unauthorized
430
+ */
431
+ 401: ProblemDetails;
432
+ /**
433
+ * Forbidden
434
+ */
435
+ 403: ProblemDetails;
436
+ /**
437
+ * Conflict
438
+ */
439
+ 409: ProblemDetails;
440
+ /**
441
+ * Payload Too Large
442
+ */
443
+ 413: ProblemDetails;
444
+ /**
445
+ * Too Many Requests
446
+ */
447
+ 429: ProblemDetails;
448
+ /**
449
+ * Internal Server Error
450
+ */
451
+ 500: ProblemDetails;
452
+ /**
453
+ * Bad Gateway
454
+ */
455
+ 502: ProblemDetails;
456
+ /**
457
+ * Service Unavailable
458
+ */
459
+ 503: ProblemDetails;
460
+ };
461
+ export type AdminGetSubscriptionFactEvidenceError = AdminGetSubscriptionFactEvidenceErrors[keyof AdminGetSubscriptionFactEvidenceErrors];
462
+ export type AdminGetSubscriptionFactEvidenceResponses = {
463
+ /**
464
+ * OK
465
+ */
466
+ 200: AdminEvidenceSnapshot;
467
+ };
468
+ export type AdminGetSubscriptionFactEvidenceResponse = AdminGetSubscriptionFactEvidenceResponses[keyof AdminGetSubscriptionFactEvidenceResponses];
469
+ export type AdminQueryTrackerSubscriptionEvidenceData = {
470
+ body: AdminEvidenceAccountsRequest;
471
+ path: {
472
+ trackerId: string;
473
+ };
474
+ query?: never;
475
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/subscription-queries";
476
+ };
477
+ export type AdminQueryTrackerSubscriptionEvidenceErrors = {
478
+ /**
479
+ * Bad Request
480
+ */
481
+ 400: ProblemDetails;
482
+ /**
483
+ * Unauthorized
484
+ */
485
+ 401: ProblemDetails;
486
+ /**
487
+ * Forbidden
488
+ */
489
+ 403: ProblemDetails;
490
+ /**
491
+ * Conflict
492
+ */
493
+ 409: ProblemDetails;
494
+ /**
495
+ * Payload Too Large
496
+ */
497
+ 413: ProblemDetails;
498
+ /**
499
+ * Unsupported Media Type
500
+ */
501
+ 415: ProblemDetails;
502
+ /**
503
+ * Too Many Requests
504
+ */
505
+ 429: ProblemDetails;
506
+ /**
507
+ * Internal Server Error
508
+ */
509
+ 500: ProblemDetails;
510
+ /**
511
+ * Bad Gateway
512
+ */
513
+ 502: ProblemDetails;
514
+ /**
515
+ * Service Unavailable
516
+ */
517
+ 503: ProblemDetails;
518
+ };
519
+ export type AdminQueryTrackerSubscriptionEvidenceError = AdminQueryTrackerSubscriptionEvidenceErrors[keyof AdminQueryTrackerSubscriptionEvidenceErrors];
520
+ export type AdminQueryTrackerSubscriptionEvidenceResponses = {
521
+ /**
522
+ * OK
523
+ */
524
+ 200: AdminEvidenceSnapshot;
525
+ };
526
+ export type AdminQueryTrackerSubscriptionEvidenceResponse = AdminQueryTrackerSubscriptionEvidenceResponses[keyof AdminQueryTrackerSubscriptionEvidenceResponses];
527
+ export type AdminQueryCommerceBindingEvidenceData = {
528
+ body: AdminEvidenceAccountsRequest;
529
+ path: {
530
+ wooId: number;
531
+ };
532
+ query?: never;
533
+ url: "/v1/admin/product-evidence/commerce-subscriptions/{wooId}/binding-queries";
534
+ };
535
+ export type AdminQueryCommerceBindingEvidenceErrors = {
536
+ /**
537
+ * Bad Request
538
+ */
539
+ 400: ProblemDetails;
540
+ /**
541
+ * Unauthorized
542
+ */
543
+ 401: ProblemDetails;
544
+ /**
545
+ * Forbidden
546
+ */
547
+ 403: ProblemDetails;
548
+ /**
549
+ * Conflict
550
+ */
551
+ 409: ProblemDetails;
552
+ /**
553
+ * Payload Too Large
554
+ */
555
+ 413: ProblemDetails;
556
+ /**
557
+ * Unsupported Media Type
558
+ */
559
+ 415: ProblemDetails;
560
+ /**
561
+ * Too Many Requests
562
+ */
563
+ 429: ProblemDetails;
564
+ /**
565
+ * Internal Server Error
566
+ */
567
+ 500: ProblemDetails;
568
+ /**
569
+ * Bad Gateway
570
+ */
571
+ 502: ProblemDetails;
572
+ /**
573
+ * Service Unavailable
574
+ */
575
+ 503: ProblemDetails;
576
+ };
577
+ export type AdminQueryCommerceBindingEvidenceError = AdminQueryCommerceBindingEvidenceErrors[keyof AdminQueryCommerceBindingEvidenceErrors];
578
+ export type AdminQueryCommerceBindingEvidenceResponses = {
579
+ /**
580
+ * OK
581
+ */
582
+ 200: AdminEvidenceSnapshot;
583
+ };
584
+ export type AdminQueryCommerceBindingEvidenceResponse = AdminQueryCommerceBindingEvidenceResponses[keyof AdminQueryCommerceBindingEvidenceResponses];
585
+ export type AdminQueryTrackerHistoryEvidenceData = {
586
+ body: AdminEvidenceHistoryRequest;
587
+ path: {
588
+ trackerId: string;
589
+ };
590
+ query?: never;
591
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/history-queries";
592
+ };
593
+ export type AdminQueryTrackerHistoryEvidenceErrors = {
594
+ /**
595
+ * Bad Request
596
+ */
597
+ 400: ProblemDetails;
598
+ /**
599
+ * Unauthorized
600
+ */
601
+ 401: ProblemDetails;
602
+ /**
603
+ * Forbidden
604
+ */
605
+ 403: ProblemDetails;
606
+ /**
607
+ * Conflict
608
+ */
609
+ 409: ProblemDetails;
610
+ /**
611
+ * Payload Too Large
612
+ */
613
+ 413: ProblemDetails;
614
+ /**
615
+ * Unsupported Media Type
616
+ */
617
+ 415: ProblemDetails;
618
+ /**
619
+ * Too Many Requests
620
+ */
621
+ 429: ProblemDetails;
622
+ /**
623
+ * Internal Server Error
624
+ */
625
+ 500: ProblemDetails;
626
+ /**
627
+ * Bad Gateway
628
+ */
629
+ 502: ProblemDetails;
630
+ /**
631
+ * Service Unavailable
632
+ */
633
+ 503: ProblemDetails;
634
+ };
635
+ export type AdminQueryTrackerHistoryEvidenceError = AdminQueryTrackerHistoryEvidenceErrors[keyof AdminQueryTrackerHistoryEvidenceErrors];
636
+ export type AdminQueryTrackerHistoryEvidenceResponses = {
637
+ /**
638
+ * OK
639
+ */
640
+ 200: AdminEvidenceSnapshot;
641
+ };
642
+ export type AdminQueryTrackerHistoryEvidenceResponse = AdminQueryTrackerHistoryEvidenceResponses[keyof AdminQueryTrackerHistoryEvidenceResponses];
643
+ export type AdminQueryTrackerRelationshipEvidenceData = {
644
+ body: AdminRelationshipRequest;
645
+ path: {
646
+ trackerId: string;
647
+ };
648
+ query?: never;
649
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/relationship-queries";
650
+ };
651
+ export type AdminQueryTrackerRelationshipEvidenceErrors = {
652
+ /**
653
+ * Bad Request
654
+ */
655
+ 400: ProblemDetails;
656
+ /**
657
+ * Unauthorized
658
+ */
659
+ 401: ProblemDetails;
660
+ /**
661
+ * Forbidden
662
+ */
663
+ 403: ProblemDetails;
664
+ /**
665
+ * Conflict
666
+ */
667
+ 409: ProblemDetails;
668
+ /**
669
+ * Payload Too Large
670
+ */
671
+ 413: ProblemDetails;
672
+ /**
673
+ * Unsupported Media Type
674
+ */
675
+ 415: ProblemDetails;
676
+ /**
677
+ * Too Many Requests
678
+ */
679
+ 429: ProblemDetails;
680
+ /**
681
+ * Internal Server Error
682
+ */
683
+ 500: ProblemDetails;
684
+ /**
685
+ * Bad Gateway
686
+ */
687
+ 502: ProblemDetails;
688
+ /**
689
+ * Service Unavailable
690
+ */
691
+ 503: ProblemDetails;
692
+ };
693
+ export type AdminQueryTrackerRelationshipEvidenceError = AdminQueryTrackerRelationshipEvidenceErrors[keyof AdminQueryTrackerRelationshipEvidenceErrors];
694
+ export type AdminQueryTrackerRelationshipEvidenceResponses = {
695
+ /**
696
+ * OK
697
+ */
698
+ 200: AdminEvidenceSnapshot;
699
+ };
700
+ export type AdminQueryTrackerRelationshipEvidenceResponse = AdminQueryTrackerRelationshipEvidenceResponses[keyof AdminQueryTrackerRelationshipEvidenceResponses];
701
+ export type AdminChangeTrackerRelationshipData = {
702
+ body: AdminRelationshipChangeRequest;
703
+ path: {
704
+ trackerId: string;
705
+ };
706
+ query?: never;
707
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/relationship-changes";
708
+ };
709
+ export type AdminChangeTrackerRelationshipErrors = {
710
+ /**
711
+ * Bad Request
712
+ */
713
+ 400: ProblemDetails;
714
+ /**
715
+ * Unauthorized
716
+ */
717
+ 401: ProblemDetails;
718
+ /**
719
+ * Forbidden
720
+ */
721
+ 403: ProblemDetails;
722
+ /**
723
+ * Conflict
724
+ */
725
+ 409: ProblemDetails;
726
+ /**
727
+ * Payload Too Large
728
+ */
729
+ 413: ProblemDetails;
730
+ /**
731
+ * Unsupported Media Type
732
+ */
733
+ 415: ProblemDetails;
734
+ /**
735
+ * Too Many Requests
736
+ */
737
+ 429: ProblemDetails;
738
+ /**
739
+ * Internal Server Error
740
+ */
741
+ 500: ProblemDetails;
742
+ /**
743
+ * Bad Gateway
744
+ */
745
+ 502: ProblemDetails;
746
+ /**
747
+ * Service Unavailable
748
+ */
749
+ 503: ProblemDetails;
750
+ };
751
+ export type AdminChangeTrackerRelationshipError = AdminChangeTrackerRelationshipErrors[keyof AdminChangeTrackerRelationshipErrors];
752
+ export type AdminChangeTrackerRelationshipResponses = {
753
+ /**
754
+ * OK
755
+ */
756
+ 200: CommandSuccess;
757
+ };
758
+ export type AdminChangeTrackerRelationshipResponse = AdminChangeTrackerRelationshipResponses[keyof AdminChangeTrackerRelationshipResponses];
759
+ export type AdminVerifyTrackerRelationshipData = {
760
+ body: AdminRelationshipVerificationRequest;
761
+ path: {
762
+ trackerId: string;
763
+ };
764
+ query?: never;
765
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/relationship-verification-queries";
766
+ };
767
+ export type AdminVerifyTrackerRelationshipErrors = {
768
+ /**
769
+ * Bad Request
770
+ */
771
+ 400: ProblemDetails;
772
+ /**
773
+ * Unauthorized
774
+ */
775
+ 401: ProblemDetails;
776
+ /**
777
+ * Forbidden
778
+ */
779
+ 403: ProblemDetails;
780
+ /**
781
+ * Conflict
782
+ */
783
+ 409: ProblemDetails;
784
+ /**
785
+ * Payload Too Large
786
+ */
787
+ 413: ProblemDetails;
788
+ /**
789
+ * Unsupported Media Type
790
+ */
791
+ 415: ProblemDetails;
792
+ /**
793
+ * Too Many Requests
794
+ */
795
+ 429: ProblemDetails;
796
+ /**
797
+ * Internal Server Error
798
+ */
799
+ 500: ProblemDetails;
800
+ /**
801
+ * Bad Gateway
802
+ */
803
+ 502: ProblemDetails;
804
+ /**
805
+ * Service Unavailable
806
+ */
807
+ 503: ProblemDetails;
808
+ };
809
+ export type AdminVerifyTrackerRelationshipError = AdminVerifyTrackerRelationshipErrors[keyof AdminVerifyTrackerRelationshipErrors];
810
+ export type AdminVerifyTrackerRelationshipResponses = {
811
+ /**
812
+ * OK
813
+ */
814
+ 200: AdminRelationshipVerification;
815
+ };
816
+ export type AdminVerifyTrackerRelationshipResponse = AdminVerifyTrackerRelationshipResponses[keyof AdminVerifyTrackerRelationshipResponses];
186
817
  export type AdminGetSessionData = {
187
818
  body?: never;
188
819
  path?: never;