@globalscoutme/api-client 1.0.13 → 1.0.15

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,92 +7,135 @@ import type {
7
7
  TDataShape,
8
8
  } from './client/index.js';
9
9
  import type {
10
- DeletePlayersMeData,
11
- DeletePlayersMeErrors,
12
- DeletePlayersMeResponses,
13
- DeleteVideosByIdData,
14
- DeleteVideosByIdErrors,
15
- DeleteVideosByIdResponses,
16
- GetAchievementsData,
17
- GetAchievementsMeData,
18
- GetAchievementsMeErrors,
19
- GetAchievementsMeResponses,
20
- GetAchievementsResponses,
21
- GetAuthMeData,
22
- GetAuthMeErrors,
23
- GetAuthMeResponses,
24
- GetBodyMeasurementsMeData,
25
- GetBodyMeasurementsMeErrors,
26
- GetBodyMeasurementsMeResponses,
27
- GetDocumentsMeData,
28
- GetDocumentsMeErrors,
29
- GetDocumentsMeResponses,
30
- GetIndexByTableNameData,
31
- GetIndexByTableNameErrors,
32
- GetIndexByTableNameResponses,
33
- GetOffersConversationsByIdMessagesData,
34
- GetOffersConversationsByIdMessagesErrors,
35
- GetOffersConversationsByIdMessagesResponses,
36
- GetOffersConversationsData,
37
- GetOffersConversationsErrors,
38
- GetOffersConversationsResponses,
39
- GetOrganizationsMeData,
40
- GetOrganizationsMeErrors,
41
- GetOrganizationsMeResponses,
42
- GetPlayersByIdData,
43
- GetPlayersByIdErrors,
44
- GetPlayersByIdResponses,
45
- GetPlayersMeDashboardData,
46
- GetPlayersMeDashboardErrors,
47
- GetPlayersMeDashboardResponses,
48
- GetPlayersMeData,
49
- GetPlayersMeErrors,
50
- GetPlayersMeResponses,
51
- GetProfileMeData,
52
- GetProfileMeErrors,
53
- GetProfileMeResponses,
54
- GetVideosByIdPlayUrlData,
55
- GetVideosByIdPlayUrlErrors,
56
- GetVideosByIdPlayUrlResponses,
57
- GetVideosMeData,
58
- GetVideosMeErrors,
59
- GetVideosMeResponses,
60
- PatchOffersConversationsByIdReadData,
61
- PatchOffersConversationsByIdReadErrors,
62
- PatchOffersConversationsByIdReadResponses,
63
- PatchPlayersMeData,
64
- PatchPlayersMeErrors,
65
- PatchPlayersMeResponses,
66
- PostBodyMeasurementsData,
67
- PostBodyMeasurementsErrors,
68
- PostBodyMeasurementsResponses,
69
- PostDocumentsData,
70
- PostDocumentsErrors,
71
- PostDocumentsResponses,
72
- PostOffersConversationsByIdMessagesData,
73
- PostOffersConversationsByIdMessagesErrors,
74
- PostOffersConversationsByIdMessagesResponses,
75
- PostOffersConversationsData,
76
- PostOffersConversationsErrors,
77
- PostOffersConversationsResponses,
78
- PostOrganizationsRegisterClubData,
79
- PostOrganizationsRegisterClubErrors,
80
- PostOrganizationsRegisterClubResponses,
81
- PostPlayersSearchData,
82
- PostPlayersSearchErrors,
83
- PostPlayersSearchResponses,
84
- PostStorageUploadUrlData,
85
- PostStorageUploadUrlErrors,
86
- PostStorageUploadUrlResponses,
87
- PostVideosData,
88
- PostVideosErrors,
89
- PostVideosResponses,
90
- PutOrganizationsMeData,
91
- PutOrganizationsMeErrors,
92
- PutOrganizationsMeResponses,
93
- PutProfileMeData,
94
- PutProfileMeErrors,
95
- PutProfileMeResponses,
10
+ DeleteApiClubsMeByIdData,
11
+ DeleteApiClubsMeByIdErrors,
12
+ DeleteApiClubsMeByIdResponses,
13
+ DeleteApiInvitationsByIdData,
14
+ DeleteApiInvitationsByIdErrors,
15
+ DeleteApiInvitationsByIdResponses,
16
+ DeleteApiPlayersMeData,
17
+ DeleteApiPlayersMeErrors,
18
+ DeleteApiPlayersMeResponses,
19
+ DeleteApiVideosByIdData,
20
+ DeleteApiVideosByIdErrors,
21
+ DeleteApiVideosByIdResponses,
22
+ GetApiAchievementsData,
23
+ GetApiAchievementsMeData,
24
+ GetApiAchievementsMeErrors,
25
+ GetApiAchievementsMeResponses,
26
+ GetApiAchievementsResponses,
27
+ GetApiAuthMeData,
28
+ GetApiAuthMeErrors,
29
+ GetApiAuthMeResponses,
30
+ GetApiBodyMeasurementsMeData,
31
+ GetApiBodyMeasurementsMeErrors,
32
+ GetApiBodyMeasurementsMeResponses,
33
+ GetApiChallengesData,
34
+ GetApiChallengesErrors,
35
+ GetApiChallengesMeData,
36
+ GetApiChallengesMeErrors,
37
+ GetApiChallengesMeResponses,
38
+ GetApiChallengesResponses,
39
+ GetApiClubsMeData,
40
+ GetApiClubsMeErrors,
41
+ GetApiClubsMeResponses,
42
+ GetApiDocumentsMeData,
43
+ GetApiDocumentsMeErrors,
44
+ GetApiDocumentsMeResponses,
45
+ GetApiIndexByTableNameData,
46
+ GetApiIndexByTableNameErrors,
47
+ GetApiIndexByTableNameResponses,
48
+ GetApiInvitationsData,
49
+ GetApiInvitationsResponses,
50
+ GetApiOffersConversationsByIdMessagesData,
51
+ GetApiOffersConversationsByIdMessagesErrors,
52
+ GetApiOffersConversationsByIdMessagesResponses,
53
+ GetApiOffersConversationsData,
54
+ GetApiOffersConversationsErrors,
55
+ GetApiOffersConversationsResponses,
56
+ GetApiOrganizationsMeData,
57
+ GetApiOrganizationsMeErrors,
58
+ GetApiOrganizationsMeResponses,
59
+ GetApiPlayersByIdData,
60
+ GetApiPlayersByIdErrors,
61
+ GetApiPlayersByIdResponses,
62
+ GetApiPlayersMeDashboardData,
63
+ GetApiPlayersMeDashboardErrors,
64
+ GetApiPlayersMeDashboardResponses,
65
+ GetApiPlayersMeData,
66
+ GetApiPlayersMeErrors,
67
+ GetApiPlayersMeResponses,
68
+ GetApiProfileMeData,
69
+ GetApiProfileMeErrors,
70
+ GetApiProfileMeResponses,
71
+ GetApiTrainingByIdData,
72
+ GetApiTrainingByIdErrors,
73
+ GetApiTrainingByIdResponses,
74
+ GetApiTrainingData,
75
+ GetApiTrainingErrors,
76
+ GetApiTrainingGroupedData,
77
+ GetApiTrainingGroupedErrors,
78
+ GetApiTrainingGroupedResponses,
79
+ GetApiTrainingResponses,
80
+ GetApiVideosByIdPlayUrlData,
81
+ GetApiVideosByIdPlayUrlErrors,
82
+ GetApiVideosByIdPlayUrlResponses,
83
+ GetApiVideosMeData,
84
+ GetApiVideosMeErrors,
85
+ GetApiVideosMeResponses,
86
+ PatchApiClubsMeByIdData,
87
+ PatchApiClubsMeByIdErrors,
88
+ PatchApiClubsMeByIdResponses,
89
+ PatchApiOffersConversationsByIdReadData,
90
+ PatchApiOffersConversationsByIdReadErrors,
91
+ PatchApiOffersConversationsByIdReadResponses,
92
+ PatchApiPlayersMeData,
93
+ PatchApiPlayersMeErrors,
94
+ PatchApiPlayersMeResponses,
95
+ PostApiBodyMeasurementsData,
96
+ PostApiBodyMeasurementsErrors,
97
+ PostApiBodyMeasurementsResponses,
98
+ PostApiClubsMeData,
99
+ PostApiClubsMeErrors,
100
+ PostApiClubsMeResponses,
101
+ PostApiDocumentsData,
102
+ PostApiDocumentsErrors,
103
+ PostApiDocumentsResponses,
104
+ PostApiInvitationsAcceptData,
105
+ PostApiInvitationsAcceptResponses,
106
+ PostApiInvitationsByIdResendData,
107
+ PostApiInvitationsByIdResendErrors,
108
+ PostApiInvitationsByIdResendResponses,
109
+ PostApiInvitationsData,
110
+ PostApiInvitationsErrors,
111
+ PostApiInvitationsResponses,
112
+ PostApiOffersConversationsByIdMessagesData,
113
+ PostApiOffersConversationsByIdMessagesErrors,
114
+ PostApiOffersConversationsByIdMessagesResponses,
115
+ PostApiOffersConversationsData,
116
+ PostApiOffersConversationsErrors,
117
+ PostApiOffersConversationsResponses,
118
+ PostApiOrganizationsRegisterClubData,
119
+ PostApiOrganizationsRegisterClubErrors,
120
+ PostApiOrganizationsRegisterClubResponses,
121
+ PostApiPlayersMeHeartbeatData,
122
+ PostApiPlayersMeHeartbeatErrors,
123
+ PostApiPlayersMeHeartbeatResponses,
124
+ PostApiPlayersSearchData,
125
+ PostApiPlayersSearchErrors,
126
+ PostApiPlayersSearchResponses,
127
+ PostApiStorageUploadUrlData,
128
+ PostApiStorageUploadUrlErrors,
129
+ PostApiStorageUploadUrlResponses,
130
+ PostApiVideosData,
131
+ PostApiVideosErrors,
132
+ PostApiVideosResponses,
133
+ PutApiOrganizationsMeData,
134
+ PutApiOrganizationsMeErrors,
135
+ PutApiOrganizationsMeResponses,
136
+ PutApiProfileMeData,
137
+ PutApiProfileMeErrors,
138
+ PutApiProfileMeResponses,
96
139
  } from './types.gen.js';
97
140
 
98
141
  export type Options<
@@ -142,46 +185,46 @@ class HeyApiRegistry<T> {
142
185
 
143
186
  export class Auth extends HeyApiClient {
144
187
  public getAuthMe<ThrowOnError extends boolean = false>(
145
- options?: Options<GetAuthMeData, ThrowOnError>,
188
+ options?: Options<GetApiAuthMeData, ThrowOnError>,
146
189
  ) {
147
190
  return (options?.client ?? this.client).get<
148
- GetAuthMeResponses,
149
- GetAuthMeErrors,
191
+ GetApiAuthMeResponses,
192
+ GetApiAuthMeErrors,
150
193
  ThrowOnError
151
- >({ url: '/auth/me', ...options });
194
+ >({ url: '/api/auth/me', ...options });
152
195
  }
153
196
  }
154
197
 
155
198
  export class Players extends HeyApiClient {
156
199
  public deleteMe<ThrowOnError extends boolean = false>(
157
- options?: Options<DeletePlayersMeData, ThrowOnError>,
200
+ options?: Options<DeleteApiPlayersMeData, ThrowOnError>,
158
201
  ) {
159
202
  return (options?.client ?? this.client).delete<
160
- DeletePlayersMeResponses,
161
- DeletePlayersMeErrors,
203
+ DeleteApiPlayersMeResponses,
204
+ DeleteApiPlayersMeErrors,
162
205
  ThrowOnError
163
- >({ url: '/players/me', ...options });
206
+ >({ url: '/api/players/me', ...options });
164
207
  }
165
208
 
166
209
  public getMe<ThrowOnError extends boolean = false>(
167
- options?: Options<GetPlayersMeData, ThrowOnError>,
210
+ options?: Options<GetApiPlayersMeData, ThrowOnError>,
168
211
  ) {
169
212
  return (options?.client ?? this.client).get<
170
- GetPlayersMeResponses,
171
- GetPlayersMeErrors,
213
+ GetApiPlayersMeResponses,
214
+ GetApiPlayersMeErrors,
172
215
  ThrowOnError
173
- >({ url: '/players/me', ...options });
216
+ >({ url: '/api/players/me', ...options });
174
217
  }
175
218
 
176
219
  public patchMe<ThrowOnError extends boolean = false>(
177
- options: Options<PatchPlayersMeData, ThrowOnError>,
220
+ options: Options<PatchApiPlayersMeData, ThrowOnError>,
178
221
  ) {
179
222
  return (options.client ?? this.client).patch<
180
- PatchPlayersMeResponses,
181
- PatchPlayersMeErrors,
223
+ PatchApiPlayersMeResponses,
224
+ PatchApiPlayersMeErrors,
182
225
  ThrowOnError
183
226
  >({
184
- url: '/players/me',
227
+ url: '/api/players/me',
185
228
  ...options,
186
229
  headers: {
187
230
  'Content-Type': 'application/json',
@@ -191,24 +234,44 @@ export class Players extends HeyApiClient {
191
234
  }
192
235
 
193
236
  public getMyDashboard<ThrowOnError extends boolean = false>(
194
- options?: Options<GetPlayersMeDashboardData, ThrowOnError>,
237
+ options?: Options<GetApiPlayersMeDashboardData, ThrowOnError>,
195
238
  ) {
196
239
  return (options?.client ?? this.client).get<
197
- GetPlayersMeDashboardResponses,
198
- GetPlayersMeDashboardErrors,
240
+ GetApiPlayersMeDashboardResponses,
241
+ GetApiPlayersMeDashboardErrors,
199
242
  ThrowOnError
200
- >({ url: '/players/me/dashboard', ...options });
243
+ >({ url: '/api/players/me/dashboard', ...options });
244
+ }
245
+
246
+ /**
247
+ * Ping presence; records login day and updates user timezone
248
+ */
249
+ public heartbeat<ThrowOnError extends boolean = false>(
250
+ options: Options<PostApiPlayersMeHeartbeatData, ThrowOnError>,
251
+ ) {
252
+ return (options.client ?? this.client).post<
253
+ PostApiPlayersMeHeartbeatResponses,
254
+ PostApiPlayersMeHeartbeatErrors,
255
+ ThrowOnError
256
+ >({
257
+ url: '/api/players/me/heartbeat',
258
+ ...options,
259
+ headers: {
260
+ 'Content-Type': 'application/json',
261
+ ...options.headers,
262
+ },
263
+ });
201
264
  }
202
265
 
203
266
  public searchPlayers<ThrowOnError extends boolean = false>(
204
- options: Options<PostPlayersSearchData, ThrowOnError>,
267
+ options: Options<PostApiPlayersSearchData, ThrowOnError>,
205
268
  ) {
206
269
  return (options.client ?? this.client).post<
207
- PostPlayersSearchResponses,
208
- PostPlayersSearchErrors,
270
+ PostApiPlayersSearchResponses,
271
+ PostApiPlayersSearchErrors,
209
272
  ThrowOnError
210
273
  >({
211
- url: '/players/search',
274
+ url: '/api/players/search',
212
275
  ...options,
213
276
  headers: {
214
277
  'Content-Type': 'application/json',
@@ -218,36 +281,36 @@ export class Players extends HeyApiClient {
218
281
  }
219
282
 
220
283
  public getPlayerById<ThrowOnError extends boolean = false>(
221
- options: Options<GetPlayersByIdData, ThrowOnError>,
284
+ options: Options<GetApiPlayersByIdData, ThrowOnError>,
222
285
  ) {
223
286
  return (options.client ?? this.client).get<
224
- GetPlayersByIdResponses,
225
- GetPlayersByIdErrors,
287
+ GetApiPlayersByIdResponses,
288
+ GetApiPlayersByIdErrors,
226
289
  ThrowOnError
227
- >({ url: '/players/{id}', ...options });
290
+ >({ url: '/api/players/{id}', ...options });
228
291
  }
229
292
  }
230
293
 
231
294
  export class Profile extends HeyApiClient {
232
295
  public getProfileMe<ThrowOnError extends boolean = false>(
233
- options?: Options<GetProfileMeData, ThrowOnError>,
296
+ options?: Options<GetApiProfileMeData, ThrowOnError>,
234
297
  ) {
235
298
  return (options?.client ?? this.client).get<
236
- GetProfileMeResponses,
237
- GetProfileMeErrors,
299
+ GetApiProfileMeResponses,
300
+ GetApiProfileMeErrors,
238
301
  ThrowOnError
239
- >({ url: '/profile/me', ...options });
302
+ >({ url: '/api/profile/me', ...options });
240
303
  }
241
304
 
242
305
  public updateProfileMe<ThrowOnError extends boolean = false>(
243
- options: Options<PutProfileMeData, ThrowOnError>,
306
+ options: Options<PutApiProfileMeData, ThrowOnError>,
244
307
  ) {
245
308
  return (options.client ?? this.client).put<
246
- PutProfileMeResponses,
247
- PutProfileMeErrors,
309
+ PutApiProfileMeResponses,
310
+ PutApiProfileMeErrors,
248
311
  ThrowOnError
249
312
  >({
250
- url: '/profile/me',
313
+ url: '/api/profile/me',
251
314
  ...options,
252
315
  headers: {
253
316
  'Content-Type': 'application/json',
@@ -259,46 +322,130 @@ export class Profile extends HeyApiClient {
259
322
 
260
323
  export class Achievements extends HeyApiClient {
261
324
  public getAchievementsCatalog<ThrowOnError extends boolean = false>(
262
- options?: Options<GetAchievementsData, ThrowOnError>,
325
+ options?: Options<GetApiAchievementsData, ThrowOnError>,
263
326
  ) {
264
327
  return (options?.client ?? this.client).get<
265
- GetAchievementsResponses,
328
+ GetApiAchievementsResponses,
266
329
  unknown,
267
330
  ThrowOnError
268
- >({ url: '/achievements', ...options });
331
+ >({ url: '/api/achievements', ...options });
269
332
  }
270
333
 
271
334
  public getMyAchievements<ThrowOnError extends boolean = false>(
272
- options?: Options<GetAchievementsMeData, ThrowOnError>,
335
+ options?: Options<GetApiAchievementsMeData, ThrowOnError>,
273
336
  ) {
274
337
  return (options?.client ?? this.client).get<
275
- GetAchievementsMeResponses,
276
- GetAchievementsMeErrors,
338
+ GetApiAchievementsMeResponses,
339
+ GetApiAchievementsMeErrors,
277
340
  ThrowOnError
278
- >({ url: '/achievements/me', ...options });
341
+ >({ url: '/api/achievements/me', ...options });
279
342
  }
280
343
  }
281
344
 
282
345
  export class Body extends HeyApiClient {
283
346
  public getMyMeasurements<ThrowOnError extends boolean = false>(
284
- options?: Options<GetBodyMeasurementsMeData, ThrowOnError>,
347
+ options?: Options<GetApiBodyMeasurementsMeData, ThrowOnError>,
285
348
  ) {
286
349
  return (options?.client ?? this.client).get<
287
- GetBodyMeasurementsMeResponses,
288
- GetBodyMeasurementsMeErrors,
350
+ GetApiBodyMeasurementsMeResponses,
351
+ GetApiBodyMeasurementsMeErrors,
289
352
  ThrowOnError
290
- >({ url: '/body/measurements/me', ...options });
353
+ >({ url: '/api/body/measurements/me', ...options });
291
354
  }
292
355
 
293
356
  public createMeasurement<ThrowOnError extends boolean = false>(
294
- options: Options<PostBodyMeasurementsData, ThrowOnError>,
357
+ options: Options<PostApiBodyMeasurementsData, ThrowOnError>,
295
358
  ) {
296
359
  return (options.client ?? this.client).post<
297
- PostBodyMeasurementsResponses,
298
- PostBodyMeasurementsErrors,
360
+ PostApiBodyMeasurementsResponses,
361
+ PostApiBodyMeasurementsErrors,
299
362
  ThrowOnError
300
363
  >({
301
- url: '/body/measurements',
364
+ url: '/api/body/measurements',
365
+ ...options,
366
+ headers: {
367
+ 'Content-Type': 'application/json',
368
+ ...options.headers,
369
+ },
370
+ });
371
+ }
372
+ }
373
+
374
+ export class Challenges extends HeyApiClient {
375
+ /**
376
+ * List all active challenges
377
+ */
378
+ public getChallengesCatalog<ThrowOnError extends boolean = false>(
379
+ options?: Options<GetApiChallengesData, ThrowOnError>,
380
+ ) {
381
+ return (options?.client ?? this.client).get<
382
+ GetApiChallengesResponses,
383
+ GetApiChallengesErrors,
384
+ ThrowOnError
385
+ >({ url: '/api/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<GetApiChallengesMeData, ThrowOnError>,
393
+ ) {
394
+ return (options?.client ?? this.client).get<
395
+ GetApiChallengesMeResponses,
396
+ GetApiChallengesMeErrors,
397
+ ThrowOnError
398
+ >({ url: '/api/challenges/me', ...options });
399
+ }
400
+ }
401
+
402
+ export class Clubs extends HeyApiClient {
403
+ public getMyClubs<ThrowOnError extends boolean = false>(
404
+ options?: Options<GetApiClubsMeData, ThrowOnError>,
405
+ ) {
406
+ return (options?.client ?? this.client).get<
407
+ GetApiClubsMeResponses,
408
+ GetApiClubsMeErrors,
409
+ ThrowOnError
410
+ >({ url: '/api/clubs/me', ...options });
411
+ }
412
+
413
+ public createMyClub<ThrowOnError extends boolean = false>(
414
+ options: Options<PostApiClubsMeData, ThrowOnError>,
415
+ ) {
416
+ return (options.client ?? this.client).post<
417
+ PostApiClubsMeResponses,
418
+ PostApiClubsMeErrors,
419
+ ThrowOnError
420
+ >({
421
+ url: '/api/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<DeleteApiClubsMeByIdData, ThrowOnError>,
432
+ ) {
433
+ return (options.client ?? this.client).delete<
434
+ DeleteApiClubsMeByIdResponses,
435
+ DeleteApiClubsMeByIdErrors,
436
+ ThrowOnError
437
+ >({ url: '/api/clubs/me/{id}', ...options });
438
+ }
439
+
440
+ public updateMyClub<ThrowOnError extends boolean = false>(
441
+ options: Options<PatchApiClubsMeByIdData, ThrowOnError>,
442
+ ) {
443
+ return (options.client ?? this.client).patch<
444
+ PatchApiClubsMeByIdResponses,
445
+ PatchApiClubsMeByIdErrors,
446
+ ThrowOnError
447
+ >({
448
+ url: '/api/clubs/me/{id}',
302
449
  ...options,
303
450
  headers: {
304
451
  'Content-Type': 'application/json',
@@ -310,24 +457,24 @@ export class Body extends HeyApiClient {
310
457
 
311
458
  export class Documents extends HeyApiClient {
312
459
  public getMyDocuments<ThrowOnError extends boolean = false>(
313
- options?: Options<GetDocumentsMeData, ThrowOnError>,
460
+ options?: Options<GetApiDocumentsMeData, ThrowOnError>,
314
461
  ) {
315
462
  return (options?.client ?? this.client).get<
316
- GetDocumentsMeResponses,
317
- GetDocumentsMeErrors,
463
+ GetApiDocumentsMeResponses,
464
+ GetApiDocumentsMeErrors,
318
465
  ThrowOnError
319
- >({ url: '/documents/me', ...options });
466
+ >({ url: '/api/documents/me', ...options });
320
467
  }
321
468
 
322
469
  public createDocument<ThrowOnError extends boolean = false>(
323
- options: Options<PostDocumentsData, ThrowOnError>,
470
+ options: Options<PostApiDocumentsData, ThrowOnError>,
324
471
  ) {
325
472
  return (options.client ?? this.client).post<
326
- PostDocumentsResponses,
327
- PostDocumentsErrors,
473
+ PostApiDocumentsResponses,
474
+ PostApiDocumentsErrors,
328
475
  ThrowOnError
329
476
  >({
330
- url: '/documents',
477
+ url: '/api/documents',
331
478
  ...options,
332
479
  headers: {
333
480
  'Content-Type': 'application/json',
@@ -339,36 +486,36 @@ export class Documents extends HeyApiClient {
339
486
 
340
487
  export class Index extends HeyApiClient {
341
488
  public getIndexItems<ThrowOnError extends boolean = false>(
342
- options: Options<GetIndexByTableNameData, ThrowOnError>,
489
+ options: Options<GetApiIndexByTableNameData, ThrowOnError>,
343
490
  ) {
344
491
  return (options.client ?? this.client).get<
345
- GetIndexByTableNameResponses,
346
- GetIndexByTableNameErrors,
492
+ GetApiIndexByTableNameResponses,
493
+ GetApiIndexByTableNameErrors,
347
494
  ThrowOnError
348
- >({ url: '/index/{tableName}', ...options });
495
+ >({ url: '/api/index/{tableName}', ...options });
349
496
  }
350
497
  }
351
498
 
352
499
  export class Offers extends HeyApiClient {
353
500
  public listConversations<ThrowOnError extends boolean = false>(
354
- options?: Options<GetOffersConversationsData, ThrowOnError>,
501
+ options?: Options<GetApiOffersConversationsData, ThrowOnError>,
355
502
  ) {
356
503
  return (options?.client ?? this.client).get<
357
- GetOffersConversationsResponses,
358
- GetOffersConversationsErrors,
504
+ GetApiOffersConversationsResponses,
505
+ GetApiOffersConversationsErrors,
359
506
  ThrowOnError
360
- >({ url: '/offers/conversations', ...options });
507
+ >({ url: '/api/offers/conversations', ...options });
361
508
  }
362
509
 
363
510
  public createConversation<ThrowOnError extends boolean = false>(
364
- options: Options<PostOffersConversationsData, ThrowOnError>,
511
+ options: Options<PostApiOffersConversationsData, ThrowOnError>,
365
512
  ) {
366
513
  return (options.client ?? this.client).post<
367
- PostOffersConversationsResponses,
368
- PostOffersConversationsErrors,
514
+ PostApiOffersConversationsResponses,
515
+ PostApiOffersConversationsErrors,
369
516
  ThrowOnError
370
517
  >({
371
- url: '/offers/conversations',
518
+ url: '/api/offers/conversations',
372
519
  ...options,
373
520
  headers: {
374
521
  'Content-Type': 'application/json',
@@ -378,24 +525,24 @@ export class Offers extends HeyApiClient {
378
525
  }
379
526
 
380
527
  public listMessages<ThrowOnError extends boolean = false>(
381
- options: Options<GetOffersConversationsByIdMessagesData, ThrowOnError>,
528
+ options: Options<GetApiOffersConversationsByIdMessagesData, ThrowOnError>,
382
529
  ) {
383
530
  return (options.client ?? this.client).get<
384
- GetOffersConversationsByIdMessagesResponses,
385
- GetOffersConversationsByIdMessagesErrors,
531
+ GetApiOffersConversationsByIdMessagesResponses,
532
+ GetApiOffersConversationsByIdMessagesErrors,
386
533
  ThrowOnError
387
- >({ url: '/offers/conversations/{id}/messages', ...options });
534
+ >({ url: '/api/offers/conversations/{id}/messages', ...options });
388
535
  }
389
536
 
390
537
  public sendMessage<ThrowOnError extends boolean = false>(
391
- options: Options<PostOffersConversationsByIdMessagesData, ThrowOnError>,
538
+ options: Options<PostApiOffersConversationsByIdMessagesData, ThrowOnError>,
392
539
  ) {
393
540
  return (options.client ?? this.client).post<
394
- PostOffersConversationsByIdMessagesResponses,
395
- PostOffersConversationsByIdMessagesErrors,
541
+ PostApiOffersConversationsByIdMessagesResponses,
542
+ PostApiOffersConversationsByIdMessagesErrors,
396
543
  ThrowOnError
397
544
  >({
398
- url: '/offers/conversations/{id}/messages',
545
+ url: '/api/offers/conversations/{id}/messages',
399
546
  ...options,
400
547
  headers: {
401
548
  'Content-Type': 'application/json',
@@ -405,26 +552,26 @@ export class Offers extends HeyApiClient {
405
552
  }
406
553
 
407
554
  public markConversationRead<ThrowOnError extends boolean = false>(
408
- options: Options<PatchOffersConversationsByIdReadData, ThrowOnError>,
555
+ options: Options<PatchApiOffersConversationsByIdReadData, ThrowOnError>,
409
556
  ) {
410
557
  return (options.client ?? this.client).patch<
411
- PatchOffersConversationsByIdReadResponses,
412
- PatchOffersConversationsByIdReadErrors,
558
+ PatchApiOffersConversationsByIdReadResponses,
559
+ PatchApiOffersConversationsByIdReadErrors,
413
560
  ThrowOnError
414
- >({ url: '/offers/conversations/{id}/read', ...options });
561
+ >({ url: '/api/offers/conversations/{id}/read', ...options });
415
562
  }
416
563
  }
417
564
 
418
565
  export class Organizations extends HeyApiClient {
419
566
  public registerClub<ThrowOnError extends boolean = false>(
420
- options: Options<PostOrganizationsRegisterClubData, ThrowOnError>,
567
+ options: Options<PostApiOrganizationsRegisterClubData, ThrowOnError>,
421
568
  ) {
422
569
  return (options.client ?? this.client).post<
423
- PostOrganizationsRegisterClubResponses,
424
- PostOrganizationsRegisterClubErrors,
570
+ PostApiOrganizationsRegisterClubResponses,
571
+ PostApiOrganizationsRegisterClubErrors,
425
572
  ThrowOnError
426
573
  >({
427
- url: '/organizations/register-club',
574
+ url: '/api/organizations/register-club',
428
575
  ...options,
429
576
  headers: {
430
577
  'Content-Type': 'application/json',
@@ -434,24 +581,24 @@ export class Organizations extends HeyApiClient {
434
581
  }
435
582
 
436
583
  public getMyOrganization<ThrowOnError extends boolean = false>(
437
- options?: Options<GetOrganizationsMeData, ThrowOnError>,
584
+ options?: Options<GetApiOrganizationsMeData, ThrowOnError>,
438
585
  ) {
439
586
  return (options?.client ?? this.client).get<
440
- GetOrganizationsMeResponses,
441
- GetOrganizationsMeErrors,
587
+ GetApiOrganizationsMeResponses,
588
+ GetApiOrganizationsMeErrors,
442
589
  ThrowOnError
443
- >({ url: '/organizations/me', ...options });
590
+ >({ url: '/api/organizations/me', ...options });
444
591
  }
445
592
 
446
593
  public updateMyOrganization<ThrowOnError extends boolean = false>(
447
- options: Options<PutOrganizationsMeData, ThrowOnError>,
594
+ options: Options<PutApiOrganizationsMeData, ThrowOnError>,
448
595
  ) {
449
596
  return (options.client ?? this.client).put<
450
- PutOrganizationsMeResponses,
451
- PutOrganizationsMeErrors,
597
+ PutApiOrganizationsMeResponses,
598
+ PutApiOrganizationsMeErrors,
452
599
  ThrowOnError
453
600
  >({
454
- url: '/organizations/me',
601
+ url: '/api/organizations/me',
455
602
  ...options,
456
603
  headers: {
457
604
  'Content-Type': 'application/json',
@@ -463,14 +610,43 @@ export class Organizations extends HeyApiClient {
463
610
 
464
611
  export class Storage extends HeyApiClient {
465
612
  public createUploadUrl<ThrowOnError extends boolean = false>(
466
- options: Options<PostStorageUploadUrlData, ThrowOnError>,
613
+ options: Options<PostApiStorageUploadUrlData, ThrowOnError>,
614
+ ) {
615
+ return (options.client ?? this.client).post<
616
+ PostApiStorageUploadUrlResponses,
617
+ PostApiStorageUploadUrlErrors,
618
+ ThrowOnError
619
+ >({
620
+ url: '/api/storage/upload-url',
621
+ ...options,
622
+ headers: {
623
+ 'Content-Type': 'application/json',
624
+ ...options.headers,
625
+ },
626
+ });
627
+ }
628
+ }
629
+
630
+ export class Invitations extends HeyApiClient {
631
+ public listInvitations<ThrowOnError extends boolean = false>(
632
+ options?: Options<GetApiInvitationsData, ThrowOnError>,
633
+ ) {
634
+ return (options?.client ?? this.client).get<
635
+ GetApiInvitationsResponses,
636
+ unknown,
637
+ ThrowOnError
638
+ >({ url: '/api/invitations', ...options });
639
+ }
640
+
641
+ public sendInvitation<ThrowOnError extends boolean = false>(
642
+ options: Options<PostApiInvitationsData, ThrowOnError>,
467
643
  ) {
468
644
  return (options.client ?? this.client).post<
469
- PostStorageUploadUrlResponses,
470
- PostStorageUploadUrlErrors,
645
+ PostApiInvitationsResponses,
646
+ PostApiInvitationsErrors,
471
647
  ThrowOnError
472
648
  >({
473
- url: '/storage/upload-url',
649
+ url: '/api/invitations',
474
650
  ...options,
475
651
  headers: {
476
652
  'Content-Type': 'application/json',
@@ -478,28 +654,102 @@ export class Storage extends HeyApiClient {
478
654
  },
479
655
  });
480
656
  }
657
+
658
+ public resendInvitation<ThrowOnError extends boolean = false>(
659
+ options: Options<PostApiInvitationsByIdResendData, ThrowOnError>,
660
+ ) {
661
+ return (options.client ?? this.client).post<
662
+ PostApiInvitationsByIdResendResponses,
663
+ PostApiInvitationsByIdResendErrors,
664
+ ThrowOnError
665
+ >({ url: '/api/invitations/{id}/resend', ...options });
666
+ }
667
+
668
+ public deleteInvitation<ThrowOnError extends boolean = false>(
669
+ options: Options<DeleteApiInvitationsByIdData, ThrowOnError>,
670
+ ) {
671
+ return (options.client ?? this.client).delete<
672
+ DeleteApiInvitationsByIdResponses,
673
+ DeleteApiInvitationsByIdErrors,
674
+ ThrowOnError
675
+ >({ url: '/api/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<PostApiInvitationsAcceptData, ThrowOnError>,
683
+ ) {
684
+ return (options?.client ?? this.client).post<
685
+ PostApiInvitationsAcceptResponses,
686
+ unknown,
687
+ ThrowOnError
688
+ >({ url: '/api/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<GetApiTrainingGroupedData, ThrowOnError>,
698
+ ) {
699
+ return (options?.client ?? this.client).get<
700
+ GetApiTrainingGroupedResponses,
701
+ GetApiTrainingGroupedErrors,
702
+ ThrowOnError
703
+ >({ url: '/api/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<GetApiTrainingData, ThrowOnError>,
711
+ ) {
712
+ return (options?.client ?? this.client).get<
713
+ GetApiTrainingResponses,
714
+ GetApiTrainingErrors,
715
+ ThrowOnError
716
+ >({ url: '/api/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<GetApiTrainingByIdData, ThrowOnError>,
724
+ ) {
725
+ return (options.client ?? this.client).get<
726
+ GetApiTrainingByIdResponses,
727
+ GetApiTrainingByIdErrors,
728
+ ThrowOnError
729
+ >({ url: '/api/training/{id}', ...options });
730
+ }
481
731
  }
482
732
 
483
733
  export class Videos extends HeyApiClient {
484
734
  public getMyVideos<ThrowOnError extends boolean = false>(
485
- options: Options<GetVideosMeData, ThrowOnError>,
735
+ options: Options<GetApiVideosMeData, ThrowOnError>,
486
736
  ) {
487
737
  return (options.client ?? this.client).get<
488
- GetVideosMeResponses,
489
- GetVideosMeErrors,
738
+ GetApiVideosMeResponses,
739
+ GetApiVideosMeErrors,
490
740
  ThrowOnError
491
- >({ url: '/videos/me', ...options });
741
+ >({ url: '/api/videos/me', ...options });
492
742
  }
493
743
 
494
744
  public createVideo<ThrowOnError extends boolean = false>(
495
- options: Options<PostVideosData, ThrowOnError>,
745
+ options: Options<PostApiVideosData, ThrowOnError>,
496
746
  ) {
497
747
  return (options.client ?? this.client).post<
498
- PostVideosResponses,
499
- PostVideosErrors,
748
+ PostApiVideosResponses,
749
+ PostApiVideosErrors,
500
750
  ThrowOnError
501
751
  >({
502
- url: '/videos',
752
+ url: '/api/videos',
503
753
  ...options,
504
754
  headers: {
505
755
  'Content-Type': 'application/json',
@@ -509,23 +759,23 @@ export class Videos extends HeyApiClient {
509
759
  }
510
760
 
511
761
  public getVideoPlayUrl<ThrowOnError extends boolean = false>(
512
- options: Options<GetVideosByIdPlayUrlData, ThrowOnError>,
762
+ options: Options<GetApiVideosByIdPlayUrlData, ThrowOnError>,
513
763
  ) {
514
764
  return (options.client ?? this.client).get<
515
- GetVideosByIdPlayUrlResponses,
516
- GetVideosByIdPlayUrlErrors,
765
+ GetApiVideosByIdPlayUrlResponses,
766
+ GetApiVideosByIdPlayUrlErrors,
517
767
  ThrowOnError
518
- >({ url: '/videos/{id}/play-url', ...options });
768
+ >({ url: '/api/videos/{id}/play-url', ...options });
519
769
  }
520
770
 
521
771
  public deleteVideo<ThrowOnError extends boolean = false>(
522
- options: Options<DeleteVideosByIdData, ThrowOnError>,
772
+ options: Options<DeleteApiVideosByIdData, ThrowOnError>,
523
773
  ) {
524
774
  return (options.client ?? this.client).delete<
525
- DeleteVideosByIdResponses,
526
- DeleteVideosByIdErrors,
775
+ DeleteApiVideosByIdResponses,
776
+ DeleteApiVideosByIdErrors,
527
777
  ThrowOnError
528
- >({ url: '/videos/{id}', ...options });
778
+ >({ url: '/api/videos/{id}', ...options });
529
779
  }
530
780
  }
531
781
 
@@ -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 }));