@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.
@@ -56,6 +56,58 @@ export type AdminDocument = {
56
56
  fields: AdminSupportValue;
57
57
  };
58
58
 
59
+ export type AdminEvidenceAccountsRequest = {
60
+ accountIds: Array<string>;
61
+ };
62
+
63
+ export type AdminEvidenceCursor = {
64
+ timestamp: AdminTimestamp;
65
+ id: string;
66
+ };
67
+
68
+ export type AdminEvidenceDocument = {
69
+ id: string;
70
+ path: string;
71
+ exists: boolean;
72
+ fields: null | AdminSupportValue;
73
+ updatedAt: null | AdminTimestamp;
74
+ createdAt: null | AdminTimestamp;
75
+ readAt: AdminTimestamp;
76
+ };
77
+
78
+ export type AdminEvidenceDomain =
79
+ | "battery"
80
+ | "versions"
81
+ | "reporting"
82
+ | "configuration"
83
+ | "membershipReference"
84
+ | "membershipState"
85
+ | "commerceReference"
86
+ | "plan"
87
+ | "availability"
88
+ | "bindingCount";
89
+
90
+ export type AdminEvidenceHistoryGroup =
91
+ "battery" | "versions" | "reporting" | "diagnostics";
92
+
93
+ export type AdminEvidenceHistoryRequest = {
94
+ accountId: string;
95
+ source: AdminEvidenceHistorySource;
96
+ from: string;
97
+ to: string;
98
+ after?: null | AdminEvidenceCursor;
99
+ fields?: null | Array<AdminEvidenceHistoryGroup>;
100
+ };
101
+
102
+ export type AdminEvidenceHistorySource =
103
+ "data" | "sanitizedData" | "bluetooth" | "audit" | "commandPackets";
104
+
105
+ export type AdminEvidenceSnapshot = {
106
+ documents: Array<AdminEvidenceDocument>;
107
+ relatedDocuments: Array<AdminEvidenceDocument>;
108
+ readAt: AdminTimestamp;
109
+ };
110
+
59
111
  export type AdminFavoriteRequest = {
60
112
  comment: string;
61
113
  };
@@ -129,6 +181,33 @@ export type AdminReadResult = {
129
181
  states: null | AdminPublicStates;
130
182
  };
131
183
 
184
+ export type AdminRelationshipChangeRequest = {
185
+ accountIds: Array<string>;
186
+ kind: AdminRelationshipKind;
187
+ accountId: string;
188
+ expectedVersion: string;
189
+ subscriptionId?: null | string;
190
+ allowLastAccountCleanup?: boolean;
191
+ };
192
+
193
+ export type AdminRelationshipKind = "subscriptionBinding" | "deviceAccount";
194
+
195
+ export type AdminRelationshipRequest = {
196
+ accountIds: Array<string>;
197
+ kind: AdminRelationshipKind;
198
+ };
199
+
200
+ export type AdminRelationshipVerification = {
201
+ verified: boolean;
202
+ };
203
+
204
+ export type AdminRelationshipVerificationRequest = {
205
+ kind: AdminRelationshipKind;
206
+ accountId: string;
207
+ remainingAccountIds: Array<string>;
208
+ subscriptionId?: null | string;
209
+ };
210
+
132
211
  export type AdminRequestId = {
133
212
  requestId: string;
134
213
  };
@@ -202,6 +281,12 @@ export type AdminTrackerCommandResult = {
202
281
  jobIds: Array<string>;
203
282
  };
204
283
 
284
+ export type AdminTrackerFactsRequest = {
285
+ target: string;
286
+ accountIds: Array<string>;
287
+ domain: AdminEvidenceDomain;
288
+ };
289
+
205
290
  export type AdminTrackerView = {
206
291
  tracker: AdminReadResult;
207
292
  operationalState: null | AdminOperationalState;
@@ -241,6 +326,658 @@ export type ProblemDetails = {
241
326
  };
242
327
  };
243
328
 
329
+ export type AdminListAccountTrackerEvidenceData = {
330
+ body?: never;
331
+ path: {
332
+ accountId: string;
333
+ };
334
+ query?: {
335
+ after?: string;
336
+ };
337
+ url: "/v1/admin/product-evidence/accounts/{accountId}/trackers";
338
+ };
339
+
340
+ export type AdminListAccountTrackerEvidenceErrors = {
341
+ /**
342
+ * Bad Request
343
+ */
344
+ 400: ProblemDetails;
345
+ /**
346
+ * Unauthorized
347
+ */
348
+ 401: ProblemDetails;
349
+ /**
350
+ * Forbidden
351
+ */
352
+ 403: ProblemDetails;
353
+ /**
354
+ * Conflict
355
+ */
356
+ 409: ProblemDetails;
357
+ /**
358
+ * Payload Too Large
359
+ */
360
+ 413: ProblemDetails;
361
+ /**
362
+ * Too Many Requests
363
+ */
364
+ 429: ProblemDetails;
365
+ /**
366
+ * Internal Server Error
367
+ */
368
+ 500: ProblemDetails;
369
+ /**
370
+ * Bad Gateway
371
+ */
372
+ 502: ProblemDetails;
373
+ /**
374
+ * Service Unavailable
375
+ */
376
+ 503: ProblemDetails;
377
+ };
378
+
379
+ export type AdminListAccountTrackerEvidenceError =
380
+ AdminListAccountTrackerEvidenceErrors[keyof AdminListAccountTrackerEvidenceErrors];
381
+
382
+ export type AdminListAccountTrackerEvidenceResponses = {
383
+ /**
384
+ * OK
385
+ */
386
+ 200: AdminEvidenceSnapshot;
387
+ };
388
+
389
+ export type AdminListAccountTrackerEvidenceResponse =
390
+ AdminListAccountTrackerEvidenceResponses[keyof AdminListAccountTrackerEvidenceResponses];
391
+
392
+ export type AdminListAccountSubscriptionEvidenceData = {
393
+ body?: never;
394
+ path: {
395
+ accountId: string;
396
+ };
397
+ query?: {
398
+ after?: string;
399
+ };
400
+ url: "/v1/admin/product-evidence/accounts/{accountId}/subscriptions";
401
+ };
402
+
403
+ export type AdminListAccountSubscriptionEvidenceErrors = {
404
+ /**
405
+ * Bad Request
406
+ */
407
+ 400: ProblemDetails;
408
+ /**
409
+ * Unauthorized
410
+ */
411
+ 401: ProblemDetails;
412
+ /**
413
+ * Forbidden
414
+ */
415
+ 403: ProblemDetails;
416
+ /**
417
+ * Conflict
418
+ */
419
+ 409: ProblemDetails;
420
+ /**
421
+ * Payload Too Large
422
+ */
423
+ 413: ProblemDetails;
424
+ /**
425
+ * Too Many Requests
426
+ */
427
+ 429: ProblemDetails;
428
+ /**
429
+ * Internal Server Error
430
+ */
431
+ 500: ProblemDetails;
432
+ /**
433
+ * Bad Gateway
434
+ */
435
+ 502: ProblemDetails;
436
+ /**
437
+ * Service Unavailable
438
+ */
439
+ 503: ProblemDetails;
440
+ };
441
+
442
+ export type AdminListAccountSubscriptionEvidenceError =
443
+ AdminListAccountSubscriptionEvidenceErrors[keyof AdminListAccountSubscriptionEvidenceErrors];
444
+
445
+ export type AdminListAccountSubscriptionEvidenceResponses = {
446
+ /**
447
+ * OK
448
+ */
449
+ 200: AdminEvidenceSnapshot;
450
+ };
451
+
452
+ export type AdminListAccountSubscriptionEvidenceResponse =
453
+ AdminListAccountSubscriptionEvidenceResponses[keyof AdminListAccountSubscriptionEvidenceResponses];
454
+
455
+ export type AdminQueryTrackerFactEvidenceData = {
456
+ body: AdminTrackerFactsRequest;
457
+ path?: never;
458
+ query?: never;
459
+ url: "/v1/admin/product-evidence/tracker-fact-queries";
460
+ };
461
+
462
+ export type AdminQueryTrackerFactEvidenceErrors = {
463
+ /**
464
+ * Bad Request
465
+ */
466
+ 400: ProblemDetails;
467
+ /**
468
+ * Unauthorized
469
+ */
470
+ 401: ProblemDetails;
471
+ /**
472
+ * Forbidden
473
+ */
474
+ 403: ProblemDetails;
475
+ /**
476
+ * Conflict
477
+ */
478
+ 409: ProblemDetails;
479
+ /**
480
+ * Payload Too Large
481
+ */
482
+ 413: ProblemDetails;
483
+ /**
484
+ * Unsupported Media Type
485
+ */
486
+ 415: ProblemDetails;
487
+ /**
488
+ * Too Many Requests
489
+ */
490
+ 429: ProblemDetails;
491
+ /**
492
+ * Internal Server Error
493
+ */
494
+ 500: ProblemDetails;
495
+ /**
496
+ * Bad Gateway
497
+ */
498
+ 502: ProblemDetails;
499
+ /**
500
+ * Service Unavailable
501
+ */
502
+ 503: ProblemDetails;
503
+ };
504
+
505
+ export type AdminQueryTrackerFactEvidenceError =
506
+ AdminQueryTrackerFactEvidenceErrors[keyof AdminQueryTrackerFactEvidenceErrors];
507
+
508
+ export type AdminQueryTrackerFactEvidenceResponses = {
509
+ /**
510
+ * OK
511
+ */
512
+ 200: AdminEvidenceSnapshot;
513
+ };
514
+
515
+ export type AdminQueryTrackerFactEvidenceResponse =
516
+ AdminQueryTrackerFactEvidenceResponses[keyof AdminQueryTrackerFactEvidenceResponses];
517
+
518
+ export type AdminGetSubscriptionFactEvidenceData = {
519
+ body?: never;
520
+ path: {
521
+ subscriptionId: string;
522
+ };
523
+ query: {
524
+ domain:
525
+ | "battery"
526
+ | "versions"
527
+ | "reporting"
528
+ | "configuration"
529
+ | "membershipReference"
530
+ | "membershipState"
531
+ | "commerceReference"
532
+ | "plan"
533
+ | "availability"
534
+ | "bindingCount";
535
+ };
536
+ url: "/v1/admin/product-evidence/subscriptions/{subscriptionId}";
537
+ };
538
+
539
+ export type AdminGetSubscriptionFactEvidenceErrors = {
540
+ /**
541
+ * Bad Request
542
+ */
543
+ 400: ProblemDetails;
544
+ /**
545
+ * Unauthorized
546
+ */
547
+ 401: ProblemDetails;
548
+ /**
549
+ * Forbidden
550
+ */
551
+ 403: ProblemDetails;
552
+ /**
553
+ * Conflict
554
+ */
555
+ 409: ProblemDetails;
556
+ /**
557
+ * Payload Too Large
558
+ */
559
+ 413: 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
+
578
+ export type AdminGetSubscriptionFactEvidenceError =
579
+ AdminGetSubscriptionFactEvidenceErrors[keyof AdminGetSubscriptionFactEvidenceErrors];
580
+
581
+ export type AdminGetSubscriptionFactEvidenceResponses = {
582
+ /**
583
+ * OK
584
+ */
585
+ 200: AdminEvidenceSnapshot;
586
+ };
587
+
588
+ export type AdminGetSubscriptionFactEvidenceResponse =
589
+ AdminGetSubscriptionFactEvidenceResponses[keyof AdminGetSubscriptionFactEvidenceResponses];
590
+
591
+ export type AdminQueryTrackerSubscriptionEvidenceData = {
592
+ body: AdminEvidenceAccountsRequest;
593
+ path: {
594
+ trackerId: string;
595
+ };
596
+ query?: never;
597
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/subscription-queries";
598
+ };
599
+
600
+ export type AdminQueryTrackerSubscriptionEvidenceErrors = {
601
+ /**
602
+ * Bad Request
603
+ */
604
+ 400: ProblemDetails;
605
+ /**
606
+ * Unauthorized
607
+ */
608
+ 401: ProblemDetails;
609
+ /**
610
+ * Forbidden
611
+ */
612
+ 403: ProblemDetails;
613
+ /**
614
+ * Conflict
615
+ */
616
+ 409: ProblemDetails;
617
+ /**
618
+ * Payload Too Large
619
+ */
620
+ 413: ProblemDetails;
621
+ /**
622
+ * Unsupported Media Type
623
+ */
624
+ 415: ProblemDetails;
625
+ /**
626
+ * Too Many Requests
627
+ */
628
+ 429: ProblemDetails;
629
+ /**
630
+ * Internal Server Error
631
+ */
632
+ 500: ProblemDetails;
633
+ /**
634
+ * Bad Gateway
635
+ */
636
+ 502: ProblemDetails;
637
+ /**
638
+ * Service Unavailable
639
+ */
640
+ 503: ProblemDetails;
641
+ };
642
+
643
+ export type AdminQueryTrackerSubscriptionEvidenceError =
644
+ AdminQueryTrackerSubscriptionEvidenceErrors[keyof AdminQueryTrackerSubscriptionEvidenceErrors];
645
+
646
+ export type AdminQueryTrackerSubscriptionEvidenceResponses = {
647
+ /**
648
+ * OK
649
+ */
650
+ 200: AdminEvidenceSnapshot;
651
+ };
652
+
653
+ export type AdminQueryTrackerSubscriptionEvidenceResponse =
654
+ AdminQueryTrackerSubscriptionEvidenceResponses[keyof AdminQueryTrackerSubscriptionEvidenceResponses];
655
+
656
+ export type AdminQueryCommerceBindingEvidenceData = {
657
+ body: AdminEvidenceAccountsRequest;
658
+ path: {
659
+ wooId: number;
660
+ };
661
+ query?: never;
662
+ url: "/v1/admin/product-evidence/commerce-subscriptions/{wooId}/binding-queries";
663
+ };
664
+
665
+ export type AdminQueryCommerceBindingEvidenceErrors = {
666
+ /**
667
+ * Bad Request
668
+ */
669
+ 400: ProblemDetails;
670
+ /**
671
+ * Unauthorized
672
+ */
673
+ 401: ProblemDetails;
674
+ /**
675
+ * Forbidden
676
+ */
677
+ 403: ProblemDetails;
678
+ /**
679
+ * Conflict
680
+ */
681
+ 409: ProblemDetails;
682
+ /**
683
+ * Payload Too Large
684
+ */
685
+ 413: ProblemDetails;
686
+ /**
687
+ * Unsupported Media Type
688
+ */
689
+ 415: ProblemDetails;
690
+ /**
691
+ * Too Many Requests
692
+ */
693
+ 429: ProblemDetails;
694
+ /**
695
+ * Internal Server Error
696
+ */
697
+ 500: ProblemDetails;
698
+ /**
699
+ * Bad Gateway
700
+ */
701
+ 502: ProblemDetails;
702
+ /**
703
+ * Service Unavailable
704
+ */
705
+ 503: ProblemDetails;
706
+ };
707
+
708
+ export type AdminQueryCommerceBindingEvidenceError =
709
+ AdminQueryCommerceBindingEvidenceErrors[keyof AdminQueryCommerceBindingEvidenceErrors];
710
+
711
+ export type AdminQueryCommerceBindingEvidenceResponses = {
712
+ /**
713
+ * OK
714
+ */
715
+ 200: AdminEvidenceSnapshot;
716
+ };
717
+
718
+ export type AdminQueryCommerceBindingEvidenceResponse =
719
+ AdminQueryCommerceBindingEvidenceResponses[keyof AdminQueryCommerceBindingEvidenceResponses];
720
+
721
+ export type AdminQueryTrackerHistoryEvidenceData = {
722
+ body: AdminEvidenceHistoryRequest;
723
+ path: {
724
+ trackerId: string;
725
+ };
726
+ query?: never;
727
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/history-queries";
728
+ };
729
+
730
+ export type AdminQueryTrackerHistoryEvidenceErrors = {
731
+ /**
732
+ * Bad Request
733
+ */
734
+ 400: ProblemDetails;
735
+ /**
736
+ * Unauthorized
737
+ */
738
+ 401: ProblemDetails;
739
+ /**
740
+ * Forbidden
741
+ */
742
+ 403: ProblemDetails;
743
+ /**
744
+ * Conflict
745
+ */
746
+ 409: ProblemDetails;
747
+ /**
748
+ * Payload Too Large
749
+ */
750
+ 413: ProblemDetails;
751
+ /**
752
+ * Unsupported Media Type
753
+ */
754
+ 415: ProblemDetails;
755
+ /**
756
+ * Too Many Requests
757
+ */
758
+ 429: ProblemDetails;
759
+ /**
760
+ * Internal Server Error
761
+ */
762
+ 500: ProblemDetails;
763
+ /**
764
+ * Bad Gateway
765
+ */
766
+ 502: ProblemDetails;
767
+ /**
768
+ * Service Unavailable
769
+ */
770
+ 503: ProblemDetails;
771
+ };
772
+
773
+ export type AdminQueryTrackerHistoryEvidenceError =
774
+ AdminQueryTrackerHistoryEvidenceErrors[keyof AdminQueryTrackerHistoryEvidenceErrors];
775
+
776
+ export type AdminQueryTrackerHistoryEvidenceResponses = {
777
+ /**
778
+ * OK
779
+ */
780
+ 200: AdminEvidenceSnapshot;
781
+ };
782
+
783
+ export type AdminQueryTrackerHistoryEvidenceResponse =
784
+ AdminQueryTrackerHistoryEvidenceResponses[keyof AdminQueryTrackerHistoryEvidenceResponses];
785
+
786
+ export type AdminQueryTrackerRelationshipEvidenceData = {
787
+ body: AdminRelationshipRequest;
788
+ path: {
789
+ trackerId: string;
790
+ };
791
+ query?: never;
792
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/relationship-queries";
793
+ };
794
+
795
+ export type AdminQueryTrackerRelationshipEvidenceErrors = {
796
+ /**
797
+ * Bad Request
798
+ */
799
+ 400: ProblemDetails;
800
+ /**
801
+ * Unauthorized
802
+ */
803
+ 401: ProblemDetails;
804
+ /**
805
+ * Forbidden
806
+ */
807
+ 403: ProblemDetails;
808
+ /**
809
+ * Conflict
810
+ */
811
+ 409: ProblemDetails;
812
+ /**
813
+ * Payload Too Large
814
+ */
815
+ 413: ProblemDetails;
816
+ /**
817
+ * Unsupported Media Type
818
+ */
819
+ 415: ProblemDetails;
820
+ /**
821
+ * Too Many Requests
822
+ */
823
+ 429: ProblemDetails;
824
+ /**
825
+ * Internal Server Error
826
+ */
827
+ 500: ProblemDetails;
828
+ /**
829
+ * Bad Gateway
830
+ */
831
+ 502: ProblemDetails;
832
+ /**
833
+ * Service Unavailable
834
+ */
835
+ 503: ProblemDetails;
836
+ };
837
+
838
+ export type AdminQueryTrackerRelationshipEvidenceError =
839
+ AdminQueryTrackerRelationshipEvidenceErrors[keyof AdminQueryTrackerRelationshipEvidenceErrors];
840
+
841
+ export type AdminQueryTrackerRelationshipEvidenceResponses = {
842
+ /**
843
+ * OK
844
+ */
845
+ 200: AdminEvidenceSnapshot;
846
+ };
847
+
848
+ export type AdminQueryTrackerRelationshipEvidenceResponse =
849
+ AdminQueryTrackerRelationshipEvidenceResponses[keyof AdminQueryTrackerRelationshipEvidenceResponses];
850
+
851
+ export type AdminChangeTrackerRelationshipData = {
852
+ body: AdminRelationshipChangeRequest;
853
+ path: {
854
+ trackerId: string;
855
+ };
856
+ query?: never;
857
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/relationship-changes";
858
+ };
859
+
860
+ export type AdminChangeTrackerRelationshipErrors = {
861
+ /**
862
+ * Bad Request
863
+ */
864
+ 400: ProblemDetails;
865
+ /**
866
+ * Unauthorized
867
+ */
868
+ 401: ProblemDetails;
869
+ /**
870
+ * Forbidden
871
+ */
872
+ 403: ProblemDetails;
873
+ /**
874
+ * Conflict
875
+ */
876
+ 409: ProblemDetails;
877
+ /**
878
+ * Payload Too Large
879
+ */
880
+ 413: ProblemDetails;
881
+ /**
882
+ * Unsupported Media Type
883
+ */
884
+ 415: ProblemDetails;
885
+ /**
886
+ * Too Many Requests
887
+ */
888
+ 429: ProblemDetails;
889
+ /**
890
+ * Internal Server Error
891
+ */
892
+ 500: ProblemDetails;
893
+ /**
894
+ * Bad Gateway
895
+ */
896
+ 502: ProblemDetails;
897
+ /**
898
+ * Service Unavailable
899
+ */
900
+ 503: ProblemDetails;
901
+ };
902
+
903
+ export type AdminChangeTrackerRelationshipError =
904
+ AdminChangeTrackerRelationshipErrors[keyof AdminChangeTrackerRelationshipErrors];
905
+
906
+ export type AdminChangeTrackerRelationshipResponses = {
907
+ /**
908
+ * OK
909
+ */
910
+ 200: CommandSuccess;
911
+ };
912
+
913
+ export type AdminChangeTrackerRelationshipResponse =
914
+ AdminChangeTrackerRelationshipResponses[keyof AdminChangeTrackerRelationshipResponses];
915
+
916
+ export type AdminVerifyTrackerRelationshipData = {
917
+ body: AdminRelationshipVerificationRequest;
918
+ path: {
919
+ trackerId: string;
920
+ };
921
+ query?: never;
922
+ url: "/v1/admin/product-evidence/trackers/{trackerId}/relationship-verification-queries";
923
+ };
924
+
925
+ export type AdminVerifyTrackerRelationshipErrors = {
926
+ /**
927
+ * Bad Request
928
+ */
929
+ 400: ProblemDetails;
930
+ /**
931
+ * Unauthorized
932
+ */
933
+ 401: ProblemDetails;
934
+ /**
935
+ * Forbidden
936
+ */
937
+ 403: ProblemDetails;
938
+ /**
939
+ * Conflict
940
+ */
941
+ 409: ProblemDetails;
942
+ /**
943
+ * Payload Too Large
944
+ */
945
+ 413: ProblemDetails;
946
+ /**
947
+ * Unsupported Media Type
948
+ */
949
+ 415: ProblemDetails;
950
+ /**
951
+ * Too Many Requests
952
+ */
953
+ 429: ProblemDetails;
954
+ /**
955
+ * Internal Server Error
956
+ */
957
+ 500: ProblemDetails;
958
+ /**
959
+ * Bad Gateway
960
+ */
961
+ 502: ProblemDetails;
962
+ /**
963
+ * Service Unavailable
964
+ */
965
+ 503: ProblemDetails;
966
+ };
967
+
968
+ export type AdminVerifyTrackerRelationshipError =
969
+ AdminVerifyTrackerRelationshipErrors[keyof AdminVerifyTrackerRelationshipErrors];
970
+
971
+ export type AdminVerifyTrackerRelationshipResponses = {
972
+ /**
973
+ * OK
974
+ */
975
+ 200: AdminRelationshipVerification;
976
+ };
977
+
978
+ export type AdminVerifyTrackerRelationshipResponse =
979
+ AdminVerifyTrackerRelationshipResponses[keyof AdminVerifyTrackerRelationshipResponses];
980
+
244
981
  export type AdminGetSessionData = {
245
982
  body?: never;
246
983
  path?: never;