@globalscoutme/api-client 1.0.13 → 1.0.14

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
@@ -7,6 +7,12 @@ import type {
7
7
  TDataShape,
8
8
  } from './client/index.js';
9
9
  import type {
10
+ DeleteClubsMeByIdData,
11
+ DeleteClubsMeByIdErrors,
12
+ DeleteClubsMeByIdResponses,
13
+ DeleteInvitationsByIdData,
14
+ DeleteInvitationsByIdErrors,
15
+ DeleteInvitationsByIdResponses,
10
16
  DeletePlayersMeData,
11
17
  DeletePlayersMeErrors,
12
18
  DeletePlayersMeResponses,
@@ -24,12 +30,23 @@ import type {
24
30
  GetBodyMeasurementsMeData,
25
31
  GetBodyMeasurementsMeErrors,
26
32
  GetBodyMeasurementsMeResponses,
33
+ GetChallengesData,
34
+ GetChallengesErrors,
35
+ GetChallengesMeData,
36
+ GetChallengesMeErrors,
37
+ GetChallengesMeResponses,
38
+ GetChallengesResponses,
39
+ GetClubsMeData,
40
+ GetClubsMeErrors,
41
+ GetClubsMeResponses,
27
42
  GetDocumentsMeData,
28
43
  GetDocumentsMeErrors,
29
44
  GetDocumentsMeResponses,
30
45
  GetIndexByTableNameData,
31
46
  GetIndexByTableNameErrors,
32
47
  GetIndexByTableNameResponses,
48
+ GetInvitationsData,
49
+ GetInvitationsResponses,
33
50
  GetOffersConversationsByIdMessagesData,
34
51
  GetOffersConversationsByIdMessagesErrors,
35
52
  GetOffersConversationsByIdMessagesResponses,
@@ -51,12 +68,24 @@ import type {
51
68
  GetProfileMeData,
52
69
  GetProfileMeErrors,
53
70
  GetProfileMeResponses,
71
+ GetTrainingByIdData,
72
+ GetTrainingByIdErrors,
73
+ GetTrainingByIdResponses,
74
+ GetTrainingData,
75
+ GetTrainingErrors,
76
+ GetTrainingGroupedData,
77
+ GetTrainingGroupedErrors,
78
+ GetTrainingGroupedResponses,
79
+ GetTrainingResponses,
54
80
  GetVideosByIdPlayUrlData,
55
81
  GetVideosByIdPlayUrlErrors,
56
82
  GetVideosByIdPlayUrlResponses,
57
83
  GetVideosMeData,
58
84
  GetVideosMeErrors,
59
85
  GetVideosMeResponses,
86
+ PatchClubsMeByIdData,
87
+ PatchClubsMeByIdErrors,
88
+ PatchClubsMeByIdResponses,
60
89
  PatchOffersConversationsByIdReadData,
61
90
  PatchOffersConversationsByIdReadErrors,
62
91
  PatchOffersConversationsByIdReadResponses,
@@ -66,9 +95,20 @@ import type {
66
95
  PostBodyMeasurementsData,
67
96
  PostBodyMeasurementsErrors,
68
97
  PostBodyMeasurementsResponses,
98
+ PostClubsMeData,
99
+ PostClubsMeErrors,
100
+ PostClubsMeResponses,
69
101
  PostDocumentsData,
70
102
  PostDocumentsErrors,
71
103
  PostDocumentsResponses,
104
+ PostInvitationsAcceptData,
105
+ PostInvitationsAcceptResponses,
106
+ PostInvitationsByIdResendData,
107
+ PostInvitationsByIdResendErrors,
108
+ PostInvitationsByIdResendResponses,
109
+ PostInvitationsData,
110
+ PostInvitationsErrors,
111
+ PostInvitationsResponses,
72
112
  PostOffersConversationsByIdMessagesData,
73
113
  PostOffersConversationsByIdMessagesErrors,
74
114
  PostOffersConversationsByIdMessagesResponses,
@@ -78,6 +118,9 @@ import type {
78
118
  PostOrganizationsRegisterClubData,
79
119
  PostOrganizationsRegisterClubErrors,
80
120
  PostOrganizationsRegisterClubResponses,
121
+ PostPlayersMeHeartbeatData,
122
+ PostPlayersMeHeartbeatErrors,
123
+ PostPlayersMeHeartbeatResponses,
81
124
  PostPlayersSearchData,
82
125
  PostPlayersSearchErrors,
83
126
  PostPlayersSearchResponses,
@@ -200,6 +243,26 @@ export class Players extends HeyApiClient {
200
243
  >({ url: '/players/me/dashboard', ...options });
201
244
  }
202
245
 
246
+ /**
247
+ * Ping presence; records login day and updates user timezone
248
+ */
249
+ public heartbeat<ThrowOnError extends boolean = false>(
250
+ options: Options<PostPlayersMeHeartbeatData, ThrowOnError>,
251
+ ) {
252
+ return (options.client ?? this.client).post<
253
+ PostPlayersMeHeartbeatResponses,
254
+ PostPlayersMeHeartbeatErrors,
255
+ ThrowOnError
256
+ >({
257
+ url: '/players/me/heartbeat',
258
+ ...options,
259
+ headers: {
260
+ 'Content-Type': 'application/json',
261
+ ...options.headers,
262
+ },
263
+ });
264
+ }
265
+
203
266
  public searchPlayers<ThrowOnError extends boolean = false>(
204
267
  options: Options<PostPlayersSearchData, ThrowOnError>,
205
268
  ) {
@@ -308,6 +371,90 @@ export class Body extends HeyApiClient {
308
371
  }
309
372
  }
310
373
 
374
+ export class Challenges extends HeyApiClient {
375
+ /**
376
+ * List all active challenges
377
+ */
378
+ public getChallengesCatalog<ThrowOnError extends boolean = false>(
379
+ options?: Options<GetChallengesData, ThrowOnError>,
380
+ ) {
381
+ return (options?.client ?? this.client).get<
382
+ GetChallengesResponses,
383
+ GetChallengesErrors,
384
+ ThrowOnError
385
+ >({ url: '/challenges', ...options });
386
+ }
387
+
388
+ /**
389
+ * Get the current user's active + recently-expired challenges
390
+ */
391
+ public getMyChallenges<ThrowOnError extends boolean = false>(
392
+ options?: Options<GetChallengesMeData, ThrowOnError>,
393
+ ) {
394
+ return (options?.client ?? this.client).get<
395
+ GetChallengesMeResponses,
396
+ GetChallengesMeErrors,
397
+ ThrowOnError
398
+ >({ url: '/challenges/me', ...options });
399
+ }
400
+ }
401
+
402
+ export class Clubs extends HeyApiClient {
403
+ public getMyClubs<ThrowOnError extends boolean = false>(
404
+ options?: Options<GetClubsMeData, ThrowOnError>,
405
+ ) {
406
+ return (options?.client ?? this.client).get<
407
+ GetClubsMeResponses,
408
+ GetClubsMeErrors,
409
+ ThrowOnError
410
+ >({ url: '/clubs/me', ...options });
411
+ }
412
+
413
+ public createMyClub<ThrowOnError extends boolean = false>(
414
+ options: Options<PostClubsMeData, ThrowOnError>,
415
+ ) {
416
+ return (options.client ?? this.client).post<
417
+ PostClubsMeResponses,
418
+ PostClubsMeErrors,
419
+ ThrowOnError
420
+ >({
421
+ url: '/clubs/me',
422
+ ...options,
423
+ headers: {
424
+ 'Content-Type': 'application/json',
425
+ ...options.headers,
426
+ },
427
+ });
428
+ }
429
+
430
+ public deleteMyClub<ThrowOnError extends boolean = false>(
431
+ options: Options<DeleteClubsMeByIdData, ThrowOnError>,
432
+ ) {
433
+ return (options.client ?? this.client).delete<
434
+ DeleteClubsMeByIdResponses,
435
+ DeleteClubsMeByIdErrors,
436
+ ThrowOnError
437
+ >({ url: '/clubs/me/{id}', ...options });
438
+ }
439
+
440
+ public updateMyClub<ThrowOnError extends boolean = false>(
441
+ options: Options<PatchClubsMeByIdData, ThrowOnError>,
442
+ ) {
443
+ return (options.client ?? this.client).patch<
444
+ PatchClubsMeByIdResponses,
445
+ PatchClubsMeByIdErrors,
446
+ ThrowOnError
447
+ >({
448
+ url: '/clubs/me/{id}',
449
+ ...options,
450
+ headers: {
451
+ 'Content-Type': 'application/json',
452
+ ...options.headers,
453
+ },
454
+ });
455
+ }
456
+ }
457
+
311
458
  export class Documents extends HeyApiClient {
312
459
  public getMyDocuments<ThrowOnError extends boolean = false>(
313
460
  options?: Options<GetDocumentsMeData, ThrowOnError>,
@@ -480,6 +627,109 @@ export class Storage extends HeyApiClient {
480
627
  }
481
628
  }
482
629
 
630
+ export class Invitations extends HeyApiClient {
631
+ public listInvitations<ThrowOnError extends boolean = false>(
632
+ options?: Options<GetInvitationsData, ThrowOnError>,
633
+ ) {
634
+ return (options?.client ?? this.client).get<
635
+ GetInvitationsResponses,
636
+ unknown,
637
+ ThrowOnError
638
+ >({ url: '/invitations', ...options });
639
+ }
640
+
641
+ public sendInvitation<ThrowOnError extends boolean = false>(
642
+ options: Options<PostInvitationsData, ThrowOnError>,
643
+ ) {
644
+ return (options.client ?? this.client).post<
645
+ PostInvitationsResponses,
646
+ PostInvitationsErrors,
647
+ ThrowOnError
648
+ >({
649
+ url: '/invitations',
650
+ ...options,
651
+ headers: {
652
+ 'Content-Type': 'application/json',
653
+ ...options.headers,
654
+ },
655
+ });
656
+ }
657
+
658
+ public resendInvitation<ThrowOnError extends boolean = false>(
659
+ options: Options<PostInvitationsByIdResendData, ThrowOnError>,
660
+ ) {
661
+ return (options.client ?? this.client).post<
662
+ PostInvitationsByIdResendResponses,
663
+ PostInvitationsByIdResendErrors,
664
+ ThrowOnError
665
+ >({ url: '/invitations/{id}/resend', ...options });
666
+ }
667
+
668
+ public deleteInvitation<ThrowOnError extends boolean = false>(
669
+ options: Options<DeleteInvitationsByIdData, ThrowOnError>,
670
+ ) {
671
+ return (options.client ?? this.client).delete<
672
+ DeleteInvitationsByIdResponses,
673
+ DeleteInvitationsByIdErrors,
674
+ ThrowOnError
675
+ >({ url: '/invitations/{id}', ...options });
676
+ }
677
+
678
+ /**
679
+ * Called by web app after Supabase auth callback to link invitee to their organization
680
+ */
681
+ public acceptInvitation<ThrowOnError extends boolean = false>(
682
+ options?: Options<PostInvitationsAcceptData, ThrowOnError>,
683
+ ) {
684
+ return (options?.client ?? this.client).post<
685
+ PostInvitationsAcceptResponses,
686
+ unknown,
687
+ ThrowOnError
688
+ >({ url: '/invitations/accept', ...options });
689
+ }
690
+ }
691
+
692
+ export class Training extends HeyApiClient {
693
+ /**
694
+ * Get training content grouped by category, top 3 per category
695
+ */
696
+ public getTrainingGrouped<ThrowOnError extends boolean = false>(
697
+ options?: Options<GetTrainingGroupedData, ThrowOnError>,
698
+ ) {
699
+ return (options?.client ?? this.client).get<
700
+ GetTrainingGroupedResponses,
701
+ GetTrainingGroupedErrors,
702
+ ThrowOnError
703
+ >({ url: '/training/grouped', ...options });
704
+ }
705
+
706
+ /**
707
+ * List training content, optionally filtered by category
708
+ */
709
+ public getTrainingList<ThrowOnError extends boolean = false>(
710
+ options?: Options<GetTrainingData, ThrowOnError>,
711
+ ) {
712
+ return (options?.client ?? this.client).get<
713
+ GetTrainingResponses,
714
+ GetTrainingErrors,
715
+ ThrowOnError
716
+ >({ url: '/training', ...options });
717
+ }
718
+
719
+ /**
720
+ * Get full detail of a training content item
721
+ */
722
+ public getTrainingById<ThrowOnError extends boolean = false>(
723
+ options: Options<GetTrainingByIdData, ThrowOnError>,
724
+ ) {
725
+ return (options.client ?? this.client).get<
726
+ GetTrainingByIdResponses,
727
+ GetTrainingByIdErrors,
728
+ ThrowOnError
729
+ >({ url: '/training/{id}', ...options });
730
+ }
731
+ }
732
+
483
733
  export class Videos extends HeyApiClient {
484
734
  public getMyVideos<ThrowOnError extends boolean = false>(
485
735
  options: Options<GetVideosMeData, ThrowOnError>,
@@ -562,6 +812,16 @@ export class GlobalScoutMeClient extends HeyApiClient {
562
812
  return (this._body ??= new Body({ client: this.client }));
563
813
  }
564
814
 
815
+ private _challenges?: Challenges;
816
+ get challenges(): Challenges {
817
+ return (this._challenges ??= new Challenges({ client: this.client }));
818
+ }
819
+
820
+ private _clubs?: Clubs;
821
+ get clubs(): Clubs {
822
+ return (this._clubs ??= new Clubs({ client: this.client }));
823
+ }
824
+
565
825
  private _documents?: Documents;
566
826
  get documents(): Documents {
567
827
  return (this._documents ??= new Documents({ client: this.client }));
@@ -587,6 +847,16 @@ export class GlobalScoutMeClient extends HeyApiClient {
587
847
  return (this._storage ??= new Storage({ client: this.client }));
588
848
  }
589
849
 
850
+ private _invitations?: Invitations;
851
+ get invitations(): Invitations {
852
+ return (this._invitations ??= new Invitations({ client: this.client }));
853
+ }
854
+
855
+ private _training?: Training;
856
+ get training(): Training {
857
+ return (this._training ??= new Training({ client: this.client }));
858
+ }
859
+
590
860
  private _videos?: Videos;
591
861
  get videos(): Videos {
592
862
  return (this._videos ??= new Videos({ client: this.client }));