@globalscoutme/api-client 1.1.1 → 1.1.3

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.
package/sdk.gen.ts CHANGED
@@ -29,6 +29,16 @@ import type {
29
29
  GetApiAuthMeData,
30
30
  GetApiAuthMeErrors,
31
31
  GetApiAuthMeResponses,
32
+ GetApiBillingMeData,
33
+ GetApiBillingMeResponses,
34
+ GetApiBillingPlansData,
35
+ GetApiBillingPlansResponses,
36
+ GetApiBillingProductsData,
37
+ GetApiBillingProductsResponses,
38
+ GetApiBillingReportPurchasesByIdReportData,
39
+ GetApiBillingReportPurchasesByIdReportResponses,
40
+ GetApiBillingReportPurchasesCurrentData,
41
+ GetApiBillingReportPurchasesCurrentResponses,
32
42
  GetApiBodyMeasurementsMeData,
33
43
  GetApiBodyMeasurementsMeErrors,
34
44
  GetApiBodyMeasurementsMeResponses,
@@ -41,6 +51,9 @@ import type {
41
51
  GetApiClubsMeData,
42
52
  GetApiClubsMeErrors,
43
53
  GetApiClubsMeResponses,
54
+ GetApiCmjMeasurementsMeData,
55
+ GetApiCmjMeasurementsMeErrors,
56
+ GetApiCmjMeasurementsMeResponses,
44
57
  GetApiDashboardMeData,
45
58
  GetApiDashboardMeErrors,
46
59
  GetApiDashboardMeResponses,
@@ -61,6 +74,9 @@ import type {
61
74
  GetApiKycStatusByUserIdData,
62
75
  GetApiKycStatusByUserIdErrors,
63
76
  GetApiKycStatusByUserIdResponses,
77
+ GetApiMeasurementsProfileMeData,
78
+ GetApiMeasurementsProfileMeErrors,
79
+ GetApiMeasurementsProfileMeResponses,
64
80
  GetApiNotificationsPreferencesData,
65
81
  GetApiNotificationsPreferencesResponses,
66
82
  GetApiOffersConversationsByIdMessagesData,
@@ -74,6 +90,9 @@ import type {
74
90
  GetApiOrganizationsMeResponses,
75
91
  GetApiPlayersByIdData,
76
92
  GetApiPlayersByIdErrors,
93
+ GetApiPlayersByIdReportData,
94
+ GetApiPlayersByIdReportErrors,
95
+ GetApiPlayersByIdReportResponses,
77
96
  GetApiPlayersByIdResponses,
78
97
  GetApiPlayersMeDashboardData,
79
98
  GetApiPlayersMeDashboardErrors,
@@ -114,6 +133,20 @@ import type {
114
133
  PatchApiPlayersMeData,
115
134
  PatchApiPlayersMeErrors,
116
135
  PatchApiPlayersMeResponses,
136
+ PostApiBillingAccessCodesRedeemData,
137
+ PostApiBillingAccessCodesRedeemResponses,
138
+ PostApiBillingAppleSyncPurchaseData,
139
+ PostApiBillingAppleSyncPurchaseResponses,
140
+ PostApiBillingGoogleSyncPurchaseData,
141
+ PostApiBillingGoogleSyncPurchaseResponses,
142
+ PostApiBillingReportPurchasesByIdStartGenerationData,
143
+ PostApiBillingReportPurchasesByIdStartGenerationResponses,
144
+ PostApiBillingReportPurchasesPlayerCandidatesData,
145
+ PostApiBillingReportPurchasesPlayerCandidatesResponses,
146
+ PostApiBillingStripeCheckoutSessionData,
147
+ PostApiBillingStripeCheckoutSessionResponses,
148
+ PostApiBillingStripePortalSessionData,
149
+ PostApiBillingStripePortalSessionResponses,
117
150
  PostApiBodyMeasurementsData,
118
151
  PostApiBodyMeasurementsErrors,
119
152
  PostApiBodyMeasurementsResponses,
@@ -143,6 +176,9 @@ import type {
143
176
  PostApiKycWebhookData,
144
177
  PostApiKycWebhookErrors,
145
178
  PostApiKycWebhookResponses,
179
+ PostApiMeasurementsPlayerSessionMeData,
180
+ PostApiMeasurementsPlayerSessionMeErrors,
181
+ PostApiMeasurementsPlayerSessionMeResponses,
146
182
  PostApiNotificationsDevicesData,
147
183
  PostApiNotificationsDevicesResponses,
148
184
  PostApiOffersConversationsByIdMessagesData,
@@ -328,6 +364,16 @@ export class Players extends HeyApiClient {
328
364
  });
329
365
  }
330
366
 
367
+ public getPlayerReport<ThrowOnError extends boolean = false>(
368
+ options: Options<GetApiPlayersByIdReportData, ThrowOnError>,
369
+ ) {
370
+ return (options.client ?? this.client).get<
371
+ GetApiPlayersByIdReportResponses,
372
+ GetApiPlayersByIdReportErrors,
373
+ ThrowOnError
374
+ >({ url: '/api/players/{id}/report', ...options });
375
+ }
376
+
331
377
  public getPlayerById<ThrowOnError extends boolean = false>(
332
378
  options: Options<GetApiPlayersByIdData, ThrowOnError>,
333
379
  ) {
@@ -339,6 +385,260 @@ export class Players extends HeyApiClient {
339
385
  }
340
386
  }
341
387
 
388
+ export class Billing extends HeyApiClient {
389
+ public listBillingPlans<ThrowOnError extends boolean = false>(
390
+ options?: Options<GetApiBillingPlansData, ThrowOnError>,
391
+ ) {
392
+ return (options?.client ?? this.client).get<
393
+ GetApiBillingPlansResponses,
394
+ unknown,
395
+ ThrowOnError
396
+ >({ url: '/api/billing/plans', ...options });
397
+ }
398
+
399
+ public listBillingProducts<ThrowOnError extends boolean = false>(
400
+ options?: Options<GetApiBillingProductsData, ThrowOnError>,
401
+ ) {
402
+ return (options?.client ?? this.client).get<
403
+ GetApiBillingProductsResponses,
404
+ unknown,
405
+ ThrowOnError
406
+ >({ url: '/api/billing/products', ...options });
407
+ }
408
+
409
+ public getMyBillingEntitlement<ThrowOnError extends boolean = false>(
410
+ options?: Options<GetApiBillingMeData, ThrowOnError>,
411
+ ) {
412
+ return (options?.client ?? this.client).get<
413
+ GetApiBillingMeResponses,
414
+ unknown,
415
+ ThrowOnError
416
+ >({ url: '/api/billing/me', ...options });
417
+ }
418
+
419
+ public redeemBillingAccessCode<ThrowOnError extends boolean = false>(
420
+ options: Options<PostApiBillingAccessCodesRedeemData, ThrowOnError>,
421
+ ) {
422
+ return (options.client ?? this.client).post<
423
+ PostApiBillingAccessCodesRedeemResponses,
424
+ unknown,
425
+ ThrowOnError
426
+ >({
427
+ url: '/api/billing/access-codes/redeem',
428
+ ...options,
429
+ headers: {
430
+ 'Content-Type': 'application/json',
431
+ ...options.headers,
432
+ },
433
+ });
434
+ }
435
+
436
+ public getCurrentBillingReportPurchase<ThrowOnError extends boolean = false>(
437
+ options?: Options<GetApiBillingReportPurchasesCurrentData, ThrowOnError>,
438
+ ) {
439
+ return (options?.client ?? this.client).get<
440
+ GetApiBillingReportPurchasesCurrentResponses,
441
+ unknown,
442
+ ThrowOnError
443
+ >({ url: '/api/billing/report-purchases/current', ...options });
444
+ }
445
+
446
+ public getBillingReportResult<ThrowOnError extends boolean = false>(
447
+ options: Options<GetApiBillingReportPurchasesByIdReportData, ThrowOnError>,
448
+ ) {
449
+ return (options.client ?? this.client).get<
450
+ GetApiBillingReportPurchasesByIdReportResponses,
451
+ unknown,
452
+ ThrowOnError
453
+ >({ url: '/api/billing/report-purchases/{id}/report', ...options });
454
+ }
455
+
456
+ public startBillingReportGeneration<ThrowOnError extends boolean = false>(
457
+ options: Options<
458
+ PostApiBillingReportPurchasesByIdStartGenerationData,
459
+ ThrowOnError
460
+ >,
461
+ ) {
462
+ return (options.client ?? this.client).post<
463
+ PostApiBillingReportPurchasesByIdStartGenerationResponses,
464
+ unknown,
465
+ ThrowOnError
466
+ >({
467
+ url: '/api/billing/report-purchases/{id}/start-generation',
468
+ ...options,
469
+ headers: {
470
+ 'Content-Type': 'application/json',
471
+ ...options.headers,
472
+ },
473
+ });
474
+ }
475
+
476
+ public findBillingReportPlayerCandidates<
477
+ ThrowOnError extends boolean = false,
478
+ >(
479
+ options: Options<
480
+ PostApiBillingReportPurchasesPlayerCandidatesData,
481
+ ThrowOnError
482
+ >,
483
+ ) {
484
+ return (options.client ?? this.client).post<
485
+ PostApiBillingReportPurchasesPlayerCandidatesResponses,
486
+ unknown,
487
+ ThrowOnError
488
+ >({
489
+ url: '/api/billing/report-purchases/player-candidates',
490
+ ...options,
491
+ headers: {
492
+ 'Content-Type': 'application/json',
493
+ ...options.headers,
494
+ },
495
+ });
496
+ }
497
+
498
+ public createStripeCheckoutSession<ThrowOnError extends boolean = false>(
499
+ options: Options<PostApiBillingStripeCheckoutSessionData, ThrowOnError>,
500
+ ) {
501
+ return (options.client ?? this.client).post<
502
+ PostApiBillingStripeCheckoutSessionResponses,
503
+ unknown,
504
+ ThrowOnError
505
+ >({
506
+ url: '/api/billing/stripe/checkout-session',
507
+ ...options,
508
+ headers: {
509
+ 'Content-Type': 'application/json',
510
+ ...options.headers,
511
+ },
512
+ });
513
+ }
514
+
515
+ public createStripePortalSession<ThrowOnError extends boolean = false>(
516
+ options?: Options<PostApiBillingStripePortalSessionData, ThrowOnError>,
517
+ ) {
518
+ return (options?.client ?? this.client).post<
519
+ PostApiBillingStripePortalSessionResponses,
520
+ unknown,
521
+ ThrowOnError
522
+ >({ url: '/api/billing/stripe/portal-session', ...options });
523
+ }
524
+
525
+ public syncAppleBillingPurchase<ThrowOnError extends boolean = false>(
526
+ options: Options<PostApiBillingAppleSyncPurchaseData, ThrowOnError>,
527
+ ) {
528
+ return (options.client ?? this.client).post<
529
+ PostApiBillingAppleSyncPurchaseResponses,
530
+ unknown,
531
+ ThrowOnError
532
+ >({
533
+ url: '/api/billing/apple/sync-purchase',
534
+ ...options,
535
+ headers: {
536
+ 'Content-Type': 'application/json',
537
+ ...options.headers,
538
+ },
539
+ });
540
+ }
541
+
542
+ public syncGoogleBillingPurchase<ThrowOnError extends boolean = false>(
543
+ options: Options<PostApiBillingGoogleSyncPurchaseData, ThrowOnError>,
544
+ ) {
545
+ return (options.client ?? this.client).post<
546
+ PostApiBillingGoogleSyncPurchaseResponses,
547
+ unknown,
548
+ ThrowOnError
549
+ >({
550
+ url: '/api/billing/google/sync-purchase',
551
+ ...options,
552
+ headers: {
553
+ 'Content-Type': 'application/json',
554
+ ...options.headers,
555
+ },
556
+ });
557
+ }
558
+ }
559
+
560
+ export class Notifications extends HeyApiClient {
561
+ public getNotificationPreferences<ThrowOnError extends boolean = false>(
562
+ options?: Options<GetApiNotificationsPreferencesData, ThrowOnError>,
563
+ ) {
564
+ return (options?.client ?? this.client).get<
565
+ GetApiNotificationsPreferencesResponses,
566
+ unknown,
567
+ ThrowOnError
568
+ >({ url: '/api/notifications/preferences', ...options });
569
+ }
570
+
571
+ public updateNotificationPreferences<ThrowOnError extends boolean = false>(
572
+ options: Options<PatchApiNotificationsPreferencesData, ThrowOnError>,
573
+ ) {
574
+ return (options.client ?? this.client).patch<
575
+ PatchApiNotificationsPreferencesResponses,
576
+ unknown,
577
+ ThrowOnError
578
+ >({
579
+ url: '/api/notifications/preferences',
580
+ ...options,
581
+ headers: {
582
+ 'Content-Type': 'application/json',
583
+ ...options.headers,
584
+ },
585
+ });
586
+ }
587
+
588
+ public registerPushDevice<ThrowOnError extends boolean = false>(
589
+ options: Options<PostApiNotificationsDevicesData, ThrowOnError>,
590
+ ) {
591
+ return (options.client ?? this.client).post<
592
+ PostApiNotificationsDevicesResponses,
593
+ unknown,
594
+ ThrowOnError
595
+ >({
596
+ url: '/api/notifications/devices',
597
+ ...options,
598
+ headers: {
599
+ 'Content-Type': 'application/json',
600
+ ...options.headers,
601
+ },
602
+ });
603
+ }
604
+
605
+ public deactivateCurrentPushDevice<ThrowOnError extends boolean = false>(
606
+ options: Options<DeleteApiNotificationsDevicesCurrentData, ThrowOnError>,
607
+ ) {
608
+ return (options.client ?? this.client).delete<
609
+ DeleteApiNotificationsDevicesCurrentResponses,
610
+ unknown,
611
+ ThrowOnError
612
+ >({
613
+ url: '/api/notifications/devices/current',
614
+ ...options,
615
+ headers: {
616
+ 'Content-Type': 'application/json',
617
+ ...options.headers,
618
+ },
619
+ });
620
+ }
621
+ }
622
+
623
+ export class Storage extends HeyApiClient {
624
+ public createUploadUrl<ThrowOnError extends boolean = false>(
625
+ options: Options<PostApiStorageUploadUrlData, ThrowOnError>,
626
+ ) {
627
+ return (options.client ?? this.client).post<
628
+ PostApiStorageUploadUrlResponses,
629
+ PostApiStorageUploadUrlErrors,
630
+ ThrowOnError
631
+ >({
632
+ url: '/api/storage/upload-url',
633
+ ...options,
634
+ headers: {
635
+ 'Content-Type': 'application/json',
636
+ ...options.headers,
637
+ },
638
+ });
639
+ }
640
+ }
641
+
342
642
  export class Profile extends HeyApiClient {
343
643
  public getProfileMe<ThrowOnError extends boolean = false>(
344
644
  options?: Options<GetApiProfileMeData, ThrowOnError>,
@@ -419,6 +719,18 @@ export class Body extends HeyApiClient {
419
719
  }
420
720
  }
421
721
 
722
+ export class Cmj extends HeyApiClient {
723
+ public getMyCmjMeasurements<ThrowOnError extends boolean = false>(
724
+ options?: Options<GetApiCmjMeasurementsMeData, ThrowOnError>,
725
+ ) {
726
+ return (options?.client ?? this.client).get<
727
+ GetApiCmjMeasurementsMeResponses,
728
+ GetApiCmjMeasurementsMeErrors,
729
+ ThrowOnError
730
+ >({ url: '/api/cmj/measurements/me', ...options });
731
+ }
732
+ }
733
+
422
734
  export class Challenges extends HeyApiClient {
423
735
  /**
424
736
  * List all active challenges
@@ -620,69 +932,6 @@ export class Offers extends HeyApiClient {
620
932
  }
621
933
  }
622
934
 
623
- export class Notifications extends HeyApiClient {
624
- public getNotificationPreferences<ThrowOnError extends boolean = false>(
625
- options?: Options<GetApiNotificationsPreferencesData, ThrowOnError>,
626
- ) {
627
- return (options?.client ?? this.client).get<
628
- GetApiNotificationsPreferencesResponses,
629
- unknown,
630
- ThrowOnError
631
- >({ url: '/api/notifications/preferences', ...options });
632
- }
633
-
634
- public updateNotificationPreferences<ThrowOnError extends boolean = false>(
635
- options: Options<PatchApiNotificationsPreferencesData, ThrowOnError>,
636
- ) {
637
- return (options.client ?? this.client).patch<
638
- PatchApiNotificationsPreferencesResponses,
639
- unknown,
640
- ThrowOnError
641
- >({
642
- url: '/api/notifications/preferences',
643
- ...options,
644
- headers: {
645
- 'Content-Type': 'application/json',
646
- ...options.headers,
647
- },
648
- });
649
- }
650
-
651
- public registerPushDevice<ThrowOnError extends boolean = false>(
652
- options: Options<PostApiNotificationsDevicesData, ThrowOnError>,
653
- ) {
654
- return (options.client ?? this.client).post<
655
- PostApiNotificationsDevicesResponses,
656
- unknown,
657
- ThrowOnError
658
- >({
659
- url: '/api/notifications/devices',
660
- ...options,
661
- headers: {
662
- 'Content-Type': 'application/json',
663
- ...options.headers,
664
- },
665
- });
666
- }
667
-
668
- public deactivateCurrentPushDevice<ThrowOnError extends boolean = false>(
669
- options: Options<DeleteApiNotificationsDevicesCurrentData, ThrowOnError>,
670
- ) {
671
- return (options.client ?? this.client).delete<
672
- DeleteApiNotificationsDevicesCurrentResponses,
673
- unknown,
674
- ThrowOnError
675
- >({
676
- url: '/api/notifications/devices/current',
677
- ...options,
678
- headers: {
679
- 'Content-Type': 'application/json',
680
- ...options.headers,
681
- },
682
- });
683
- }
684
- }
685
-
686
935
  export class Organizations extends HeyApiClient {
687
936
  public registerClub<ThrowOnError extends boolean = false>(
688
937
  options: Options<PostApiOrganizationsRegisterClubData, ThrowOnError>,
@@ -746,25 +995,6 @@ export class Organizations extends HeyApiClient {
746
995
  }
747
996
  }
748
997
 
749
- export class Storage extends HeyApiClient {
750
- public createUploadUrl<ThrowOnError extends boolean = false>(
751
- options: Options<PostApiStorageUploadUrlData, ThrowOnError>,
752
- ) {
753
- return (options.client ?? this.client).post<
754
- PostApiStorageUploadUrlResponses,
755
- PostApiStorageUploadUrlErrors,
756
- ThrowOnError
757
- >({
758
- url: '/api/storage/upload-url',
759
- ...options,
760
- headers: {
761
- 'Content-Type': 'application/json',
762
- ...options.headers,
763
- },
764
- });
765
- }
766
- }
767
-
768
998
  export class Invitations extends HeyApiClient {
769
999
  public listInvitations<ThrowOnError extends boolean = false>(
770
1000
  options?: Options<GetApiInvitationsData, ThrowOnError>,
@@ -922,6 +1152,35 @@ export class Kyc extends HeyApiClient {
922
1152
  }
923
1153
  }
924
1154
 
1155
+ export class Measurements extends HeyApiClient {
1156
+ public getMyMeasurementProfile<ThrowOnError extends boolean = false>(
1157
+ options?: Options<GetApiMeasurementsProfileMeData, ThrowOnError>,
1158
+ ) {
1159
+ return (options?.client ?? this.client).get<
1160
+ GetApiMeasurementsProfileMeResponses,
1161
+ GetApiMeasurementsProfileMeErrors,
1162
+ ThrowOnError
1163
+ >({ url: '/api/measurements/profile/me', ...options });
1164
+ }
1165
+
1166
+ public createMyMeasurementPlayerSession<ThrowOnError extends boolean = false>(
1167
+ options: Options<PostApiMeasurementsPlayerSessionMeData, ThrowOnError>,
1168
+ ) {
1169
+ return (options.client ?? this.client).post<
1170
+ PostApiMeasurementsPlayerSessionMeResponses,
1171
+ PostApiMeasurementsPlayerSessionMeErrors,
1172
+ ThrowOnError
1173
+ >({
1174
+ url: '/api/measurements/player-session/me',
1175
+ ...options,
1176
+ headers: {
1177
+ 'Content-Type': 'application/json',
1178
+ ...options.headers,
1179
+ },
1180
+ });
1181
+ }
1182
+ }
1183
+
925
1184
  export class Training extends HeyApiClient {
926
1185
  /**
927
1186
  * Get training content grouped by category, top 3 per category
@@ -1136,6 +1395,21 @@ export class GlobalScoutMeClient extends HeyApiClient {
1136
1395
  return (this._players ??= new Players({ client: this.client }));
1137
1396
  }
1138
1397
 
1398
+ private _billing?: Billing;
1399
+ get billing(): Billing {
1400
+ return (this._billing ??= new Billing({ client: this.client }));
1401
+ }
1402
+
1403
+ private _notifications?: Notifications;
1404
+ get notifications(): Notifications {
1405
+ return (this._notifications ??= new Notifications({ client: this.client }));
1406
+ }
1407
+
1408
+ private _storage?: Storage;
1409
+ get storage(): Storage {
1410
+ return (this._storage ??= new Storage({ client: this.client }));
1411
+ }
1412
+
1139
1413
  private _profile?: Profile;
1140
1414
  get profile(): Profile {
1141
1415
  return (this._profile ??= new Profile({ client: this.client }));
@@ -1151,6 +1425,11 @@ export class GlobalScoutMeClient extends HeyApiClient {
1151
1425
  return (this._body ??= new Body({ client: this.client }));
1152
1426
  }
1153
1427
 
1428
+ private _cmj?: Cmj;
1429
+ get cmj(): Cmj {
1430
+ return (this._cmj ??= new Cmj({ client: this.client }));
1431
+ }
1432
+
1154
1433
  private _challenges?: Challenges;
1155
1434
  get challenges(): Challenges {
1156
1435
  return (this._challenges ??= new Challenges({ client: this.client }));
@@ -1176,21 +1455,11 @@ export class GlobalScoutMeClient extends HeyApiClient {
1176
1455
  return (this._offers ??= new Offers({ client: this.client }));
1177
1456
  }
1178
1457
 
1179
- private _notifications?: Notifications;
1180
- get notifications(): Notifications {
1181
- return (this._notifications ??= new Notifications({ client: this.client }));
1182
- }
1183
-
1184
1458
  private _organizations?: Organizations;
1185
1459
  get organizations(): Organizations {
1186
1460
  return (this._organizations ??= new Organizations({ client: this.client }));
1187
1461
  }
1188
1462
 
1189
- private _storage?: Storage;
1190
- get storage(): Storage {
1191
- return (this._storage ??= new Storage({ client: this.client }));
1192
- }
1193
-
1194
1463
  private _invitations?: Invitations;
1195
1464
  get invitations(): Invitations {
1196
1465
  return (this._invitations ??= new Invitations({ client: this.client }));
@@ -1201,6 +1470,11 @@ export class GlobalScoutMeClient extends HeyApiClient {
1201
1470
  return (this._kyc ??= new Kyc({ client: this.client }));
1202
1471
  }
1203
1472
 
1473
+ private _measurements?: Measurements;
1474
+ get measurements(): Measurements {
1475
+ return (this._measurements ??= new Measurements({ client: this.client }));
1476
+ }
1477
+
1204
1478
  private _training?: Training;
1205
1479
  get training(): Training {
1206
1480
  return (this._training ??= new Training({ client: this.client }));