@globalscoutme/api-client 1.0.19 → 1.0.21

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.
@@ -168,6 +168,10 @@ export type UpdatePlayerDto = {
168
168
  * Bio
169
169
  */
170
170
  bio?: string;
171
+ /**
172
+ * Phone number
173
+ */
174
+ phone?: string | null;
171
175
  };
172
176
  export type PlayerSearchRequestDto = {
173
177
  /**
@@ -529,6 +533,10 @@ export type ProfileResponseDto = {
529
533
  * Agency name
530
534
  */
531
535
  agencyName?: string | null;
536
+ /**
537
+ * FIFA / scouting license number
538
+ */
539
+ scoutingLicenseNumber?: string | null;
532
540
  /**
533
541
  * Agency website URL
534
542
  */
@@ -655,6 +663,10 @@ export type UpdateProfileDto = {
655
663
  * Agency name
656
664
  */
657
665
  agencyName?: string;
666
+ /**
667
+ * FIFA / scouting license number
668
+ */
669
+ scoutingLicenseNumber?: string;
658
670
  /**
659
671
  * Agency website URL
660
672
  */
@@ -1014,6 +1026,50 @@ export type RegisterClubResponseDto = {
1014
1026
  */
1015
1027
  slug?: string;
1016
1028
  };
1029
+ export type RegisterAgentDto = {
1030
+ /**
1031
+ * Scout agency name
1032
+ */
1033
+ agencyName: string;
1034
+ /**
1035
+ * Agent first name
1036
+ */
1037
+ firstName: string;
1038
+ /**
1039
+ * Agent last name
1040
+ */
1041
+ lastName: string;
1042
+ /**
1043
+ * Agent email
1044
+ */
1045
+ email: string;
1046
+ /**
1047
+ * Password (min 8 characters)
1048
+ */
1049
+ password: string;
1050
+ /**
1051
+ * Agent phone number
1052
+ */
1053
+ phone?: string;
1054
+ };
1055
+ export type RegisterAgentResponseDto = {
1056
+ /**
1057
+ * Internal user_data id
1058
+ */
1059
+ userId: string;
1060
+ /**
1061
+ * Scout agency organization id
1062
+ */
1063
+ organizationId: string;
1064
+ /**
1065
+ * Scout agency name
1066
+ */
1067
+ agencyName: string;
1068
+ /**
1069
+ * Scout agency slug
1070
+ */
1071
+ slug?: string;
1072
+ };
1017
1073
  export type OrganizationResponseDto = {
1018
1074
  /**
1019
1075
  * Organization id
@@ -1163,6 +1219,92 @@ export type InvitationResponseDto = {
1163
1219
  expiresAt: string;
1164
1220
  acceptedAt?: string | null;
1165
1221
  };
1222
+ export type StartKycRequestDto = {
1223
+ /**
1224
+ * ISO 3166-1 alpha-2 country code (lowercase, matches index.countries)
1225
+ */
1226
+ country: string;
1227
+ /**
1228
+ * Channel initiating the KYC flow
1229
+ */
1230
+ channel: 'web' | 'mobile';
1231
+ };
1232
+ export type StartKycResponseDto = {
1233
+ /**
1234
+ * Short-lived token to Initialize the SmileID SDK widget
1235
+ */
1236
+ token?: string | null;
1237
+ /**
1238
+ * SmileID partner ID — required by the SDK
1239
+ */
1240
+ partnerId: string;
1241
+ /**
1242
+ * SmileID job identifier
1243
+ */
1244
+ jobId?: string | null;
1245
+ status: 'pending' | 'capture_started' | 'processing' | 'approved' | 'rejected' | 'blocked';
1246
+ /**
1247
+ * Number of retries left before the account is blocked
1248
+ */
1249
+ retriesRemaining: number;
1250
+ /**
1251
+ * ISO 3166-1 alpha-2 country code used for the KYC attempt
1252
+ */
1253
+ country?: string | null;
1254
+ };
1255
+ export type WebhookPartnerParamsDto = {
1256
+ /**
1257
+ * Our job identifier echoed back by SmileID
1258
+ */
1259
+ job_id?: string;
1260
+ user_id?: string;
1261
+ job_type?: string;
1262
+ };
1263
+ export type KycWebhookDto = {
1264
+ /**
1265
+ * SmileID internal job ID
1266
+ */
1267
+ SmileJobID?: string;
1268
+ PartnerParams?: WebhookPartnerParamsDto;
1269
+ /**
1270
+ * SmileID result code — 0810/1220/1221 = approved; 0001/0811/0812/0816/0903/1014 and 2xxx = rejected
1271
+ */
1272
+ ResultCode?: string;
1273
+ ResultText?: string;
1274
+ /**
1275
+ * ISO timestamp used in HMAC-SHA256 signature
1276
+ */
1277
+ timestamp: string;
1278
+ /**
1279
+ * HMAC-SHA256 signature for request authenticity
1280
+ */
1281
+ signature: string;
1282
+ };
1283
+ export type MarkSubmittedKycRequestDto = {
1284
+ /**
1285
+ * SmileID job identifier returned by /kyc/start
1286
+ */
1287
+ jobId: string;
1288
+ };
1289
+ export type KycStatusDto = {
1290
+ status: 'pending' | 'capture_started' | 'processing' | 'approved' | 'rejected' | 'blocked';
1291
+ retryCount: number;
1292
+ retriesRemaining: number;
1293
+ /**
1294
+ * SmileID job identifier for the current or latest KYC attempt
1295
+ */
1296
+ jobId?: string | null;
1297
+ /**
1298
+ * ISO 3166-1 alpha-2 country code used for the KYC attempt
1299
+ */
1300
+ country?: string | null;
1301
+ };
1302
+ export type CancelKycRequestDto = {
1303
+ /**
1304
+ * SmileID job identifier returned by /kyc/start or status
1305
+ */
1306
+ jobId: string;
1307
+ };
1166
1308
  export type TrainingContentListItemDto = {
1167
1309
  id: string;
1168
1310
  title: string;
@@ -1732,6 +1874,10 @@ export type PostApiOffersConversationsErrors = {
1732
1874
  * Unauthorized
1733
1875
  */
1734
1876
  401: unknown;
1877
+ /**
1878
+ * Only clubs and scouters can create offer conversations
1879
+ */
1880
+ 403: unknown;
1735
1881
  };
1736
1882
  export type PostApiOffersConversationsResponses = {
1737
1883
  201: ConversationDetailDto;
@@ -1837,6 +1983,26 @@ export type PostApiOrganizationsRegisterClubResponses = {
1837
1983
  201: RegisterClubResponseDto;
1838
1984
  };
1839
1985
  export type PostApiOrganizationsRegisterClubResponse = PostApiOrganizationsRegisterClubResponses[keyof PostApiOrganizationsRegisterClubResponses];
1986
+ export type PostApiOrganizationsRegisterAgentData = {
1987
+ body: RegisterAgentDto;
1988
+ path?: never;
1989
+ query?: never;
1990
+ url: '/api/organizations/register-agent';
1991
+ };
1992
+ export type PostApiOrganizationsRegisterAgentErrors = {
1993
+ /**
1994
+ * Bad request
1995
+ */
1996
+ 400: unknown;
1997
+ /**
1998
+ * Email already exists
1999
+ */
2000
+ 409: unknown;
2001
+ };
2002
+ export type PostApiOrganizationsRegisterAgentResponses = {
2003
+ 201: RegisterAgentResponseDto;
2004
+ };
2005
+ export type PostApiOrganizationsRegisterAgentResponse = PostApiOrganizationsRegisterAgentResponses[keyof PostApiOrganizationsRegisterAgentResponses];
1840
2006
  export type GetApiOrganizationsMeData = {
1841
2007
  body?: never;
1842
2008
  path?: never;
@@ -1990,6 +2156,110 @@ export type PostApiInvitationsAcceptResponses = {
1990
2156
  204: void;
1991
2157
  };
1992
2158
  export type PostApiInvitationsAcceptResponse = PostApiInvitationsAcceptResponses[keyof PostApiInvitationsAcceptResponses];
2159
+ export type PostApiKycStartData = {
2160
+ body: StartKycRequestDto;
2161
+ path?: never;
2162
+ query?: never;
2163
+ url: '/api/kyc/start';
2164
+ };
2165
+ export type PostApiKycStartErrors = {
2166
+ /**
2167
+ * Invalid request
2168
+ */
2169
+ 400: unknown;
2170
+ };
2171
+ export type PostApiKycStartResponses = {
2172
+ 200: StartKycResponseDto;
2173
+ };
2174
+ export type PostApiKycStartResponse = PostApiKycStartResponses[keyof PostApiKycStartResponses];
2175
+ export type PostApiKycWebhookData = {
2176
+ body: KycWebhookDto;
2177
+ path?: never;
2178
+ query?: never;
2179
+ url: '/api/kyc/webhook';
2180
+ };
2181
+ export type PostApiKycWebhookErrors = {
2182
+ /**
2183
+ * Invalid signature
2184
+ */
2185
+ 400: unknown;
2186
+ };
2187
+ export type PostApiKycWebhookResponses = {
2188
+ /**
2189
+ * Acknowledged
2190
+ */
2191
+ 200: unknown;
2192
+ };
2193
+ export type PostApiKycMarkSubmittedData = {
2194
+ body: MarkSubmittedKycRequestDto;
2195
+ path?: never;
2196
+ query?: never;
2197
+ url: '/api/kyc/mark-submitted';
2198
+ };
2199
+ export type PostApiKycMarkSubmittedErrors = {
2200
+ /**
2201
+ * Invalid request
2202
+ */
2203
+ 400: unknown;
2204
+ /**
2205
+ * No active KYC job found
2206
+ */
2207
+ 404: unknown;
2208
+ /**
2209
+ * Submitted job is stale
2210
+ */
2211
+ 409: unknown;
2212
+ };
2213
+ export type PostApiKycMarkSubmittedResponses = {
2214
+ 200: KycStatusDto;
2215
+ };
2216
+ export type PostApiKycMarkSubmittedResponse = PostApiKycMarkSubmittedResponses[keyof PostApiKycMarkSubmittedResponses];
2217
+ export type PostApiKycCancelData = {
2218
+ body: CancelKycRequestDto;
2219
+ path?: never;
2220
+ query?: never;
2221
+ url: '/api/kyc/cancel';
2222
+ };
2223
+ export type PostApiKycCancelErrors = {
2224
+ /**
2225
+ * Invalid request
2226
+ */
2227
+ 400: unknown;
2228
+ /**
2229
+ * No active KYC job found
2230
+ */
2231
+ 404: unknown;
2232
+ /**
2233
+ * Cancel job is stale
2234
+ */
2235
+ 409: unknown;
2236
+ };
2237
+ export type PostApiKycCancelResponses = {
2238
+ 200: KycStatusDto;
2239
+ };
2240
+ export type PostApiKycCancelResponse = PostApiKycCancelResponses[keyof PostApiKycCancelResponses];
2241
+ export type GetApiKycStatusByUserIdData = {
2242
+ body?: never;
2243
+ path: {
2244
+ userId: string;
2245
+ };
2246
+ query?: never;
2247
+ url: '/api/kyc/status/{userId}';
2248
+ };
2249
+ export type GetApiKycStatusByUserIdErrors = {
2250
+ /**
2251
+ * Cannot access another user's KYC status
2252
+ */
2253
+ 403: unknown;
2254
+ /**
2255
+ * No KYC record found
2256
+ */
2257
+ 404: unknown;
2258
+ };
2259
+ export type GetApiKycStatusByUserIdResponses = {
2260
+ 200: KycStatusDto;
2261
+ };
2262
+ export type GetApiKycStatusByUserIdResponse = GetApiKycStatusByUserIdResponses[keyof GetApiKycStatusByUserIdResponses];
1993
2263
  export type GetApiTrainingGroupedData = {
1994
2264
  body?: never;
1995
2265
  path?: never;
package/index.ts CHANGED
@@ -10,6 +10,7 @@ export {
10
10
  GlobalScoutMeClient,
11
11
  Index,
12
12
  Invitations,
13
+ Kyc,
13
14
  Offers,
14
15
  type Options,
15
16
  Organizations,
@@ -23,6 +24,7 @@ export type {
23
24
  AchievementCatalogDto,
24
25
  AuthMeResponseDto,
25
26
  BodyMeasurementResponseDto,
27
+ CancelKycRequestDto,
26
28
  CareerAchievementDto,
27
29
  ChallengeCatalogDto,
28
30
  ClientOptions,
@@ -100,6 +102,10 @@ export type {
100
102
  GetApiInvitationsData,
101
103
  GetApiInvitationsResponse,
102
104
  GetApiInvitationsResponses,
105
+ GetApiKycStatusByUserIdData,
106
+ GetApiKycStatusByUserIdErrors,
107
+ GetApiKycStatusByUserIdResponse,
108
+ GetApiKycStatusByUserIdResponses,
103
109
  GetApiOffersConversationsByIdMessagesData,
104
110
  GetApiOffersConversationsByIdMessagesErrors,
105
111
  GetApiOffersConversationsByIdMessagesResponse,
@@ -152,6 +158,9 @@ export type {
152
158
  HeartbeatResponseDto,
153
159
  IndexItemDto,
154
160
  InvitationResponseDto,
161
+ KycStatusDto,
162
+ KycWebhookDto,
163
+ MarkSubmittedKycRequestDto,
155
164
  MessageItemDto,
156
165
  MessageListResultDto,
157
166
  MessageSenderDto,
@@ -201,6 +210,21 @@ export type {
201
210
  PostApiInvitationsErrors,
202
211
  PostApiInvitationsResponse,
203
212
  PostApiInvitationsResponses,
213
+ PostApiKycCancelData,
214
+ PostApiKycCancelErrors,
215
+ PostApiKycCancelResponse,
216
+ PostApiKycCancelResponses,
217
+ PostApiKycMarkSubmittedData,
218
+ PostApiKycMarkSubmittedErrors,
219
+ PostApiKycMarkSubmittedResponse,
220
+ PostApiKycMarkSubmittedResponses,
221
+ PostApiKycStartData,
222
+ PostApiKycStartErrors,
223
+ PostApiKycStartResponse,
224
+ PostApiKycStartResponses,
225
+ PostApiKycWebhookData,
226
+ PostApiKycWebhookErrors,
227
+ PostApiKycWebhookResponses,
204
228
  PostApiOffersConversationsByIdMessagesData,
205
229
  PostApiOffersConversationsByIdMessagesErrors,
206
230
  PostApiOffersConversationsByIdMessagesResponse,
@@ -209,6 +233,10 @@ export type {
209
233
  PostApiOffersConversationsErrors,
210
234
  PostApiOffersConversationsResponse,
211
235
  PostApiOffersConversationsResponses,
236
+ PostApiOrganizationsRegisterAgentData,
237
+ PostApiOrganizationsRegisterAgentErrors,
238
+ PostApiOrganizationsRegisterAgentResponse,
239
+ PostApiOrganizationsRegisterAgentResponses,
212
240
  PostApiOrganizationsRegisterClubData,
213
241
  PostApiOrganizationsRegisterClubErrors,
214
242
  PostApiOrganizationsRegisterClubResponse,
@@ -239,10 +267,14 @@ export type {
239
267
  PutApiProfileMeErrors,
240
268
  PutApiProfileMeResponse,
241
269
  PutApiProfileMeResponses,
270
+ RegisterAgentDto,
271
+ RegisterAgentResponseDto,
242
272
  RegisterClubDto,
243
273
  RegisterClubResponseDto,
244
274
  SendInvitationRequestDto,
245
275
  SendMessageDto,
276
+ StartKycRequestDto,
277
+ StartKycResponseDto,
246
278
  TrainingCategoryGroupDto,
247
279
  TrainingContentDetailDto,
248
280
  TrainingContentListItemDto,
@@ -254,6 +286,7 @@ export type {
254
286
  UserAchievementResponseDto,
255
287
  VideoResponseDto,
256
288
  WatchingOrgDto,
289
+ WebhookPartnerParamsDto,
257
290
  } from './types.gen.js';
258
291
 
259
292
  export { client, type CreateClientConfig } from './client.gen.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalscoutme/api-client",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "GlobalScoutMe API client (generated)",
5
5
  "author": "GlobalScoutMe",
6
6
  "license": "UNLICENSED",
package/sdk.gen.ts CHANGED
@@ -50,6 +50,9 @@ import type {
50
50
  GetApiIndexCountriesResponses,
51
51
  GetApiInvitationsData,
52
52
  GetApiInvitationsResponses,
53
+ GetApiKycStatusByUserIdData,
54
+ GetApiKycStatusByUserIdErrors,
55
+ GetApiKycStatusByUserIdResponses,
53
56
  GetApiOffersConversationsByIdMessagesData,
54
57
  GetApiOffersConversationsByIdMessagesErrors,
55
58
  GetApiOffersConversationsByIdMessagesResponses,
@@ -112,12 +115,27 @@ import type {
112
115
  PostApiInvitationsData,
113
116
  PostApiInvitationsErrors,
114
117
  PostApiInvitationsResponses,
118
+ PostApiKycCancelData,
119
+ PostApiKycCancelErrors,
120
+ PostApiKycCancelResponses,
121
+ PostApiKycMarkSubmittedData,
122
+ PostApiKycMarkSubmittedErrors,
123
+ PostApiKycMarkSubmittedResponses,
124
+ PostApiKycStartData,
125
+ PostApiKycStartErrors,
126
+ PostApiKycStartResponses,
127
+ PostApiKycWebhookData,
128
+ PostApiKycWebhookErrors,
129
+ PostApiKycWebhookResponses,
115
130
  PostApiOffersConversationsByIdMessagesData,
116
131
  PostApiOffersConversationsByIdMessagesErrors,
117
132
  PostApiOffersConversationsByIdMessagesResponses,
118
133
  PostApiOffersConversationsData,
119
134
  PostApiOffersConversationsErrors,
120
135
  PostApiOffersConversationsResponses,
136
+ PostApiOrganizationsRegisterAgentData,
137
+ PostApiOrganizationsRegisterAgentErrors,
138
+ PostApiOrganizationsRegisterAgentResponses,
121
139
  PostApiOrganizationsRegisterClubData,
122
140
  PostApiOrganizationsRegisterClubErrors,
123
141
  PostApiOrganizationsRegisterClubResponses,
@@ -593,6 +611,23 @@ export class Organizations extends HeyApiClient {
593
611
  });
594
612
  }
595
613
 
614
+ public registerAgent<ThrowOnError extends boolean = false>(
615
+ options: Options<PostApiOrganizationsRegisterAgentData, ThrowOnError>,
616
+ ) {
617
+ return (options.client ?? this.client).post<
618
+ PostApiOrganizationsRegisterAgentResponses,
619
+ PostApiOrganizationsRegisterAgentErrors,
620
+ ThrowOnError
621
+ >({
622
+ url: '/api/organizations/register-agent',
623
+ ...options,
624
+ headers: {
625
+ 'Content-Type': 'application/json',
626
+ ...options.headers,
627
+ },
628
+ });
629
+ }
630
+
596
631
  public getMyOrganization<ThrowOnError extends boolean = false>(
597
632
  options?: Options<GetApiOrganizationsMeData, ThrowOnError>,
598
633
  ) {
@@ -702,6 +737,101 @@ export class Invitations extends HeyApiClient {
702
737
  }
703
738
  }
704
739
 
740
+ export class Kyc extends HeyApiClient {
741
+ /**
742
+ * Start or resume a KYC verification job
743
+ */
744
+ public startKyc<ThrowOnError extends boolean = false>(
745
+ options: Options<PostApiKycStartData, ThrowOnError>,
746
+ ) {
747
+ return (options.client ?? this.client).post<
748
+ PostApiKycStartResponses,
749
+ PostApiKycStartErrors,
750
+ ThrowOnError
751
+ >({
752
+ url: '/api/kyc/start',
753
+ ...options,
754
+ headers: {
755
+ 'Content-Type': 'application/json',
756
+ ...options.headers,
757
+ },
758
+ });
759
+ }
760
+
761
+ /**
762
+ * SmileID webhook — receives job results (public, signature-verified)
763
+ */
764
+ public kycWebhook<ThrowOnError extends boolean = false>(
765
+ options: Options<PostApiKycWebhookData, ThrowOnError>,
766
+ ) {
767
+ return (options.client ?? this.client).post<
768
+ PostApiKycWebhookResponses,
769
+ PostApiKycWebhookErrors,
770
+ ThrowOnError
771
+ >({
772
+ url: '/api/kyc/webhook',
773
+ ...options,
774
+ headers: {
775
+ 'Content-Type': 'application/json',
776
+ ...options.headers,
777
+ },
778
+ });
779
+ }
780
+
781
+ /**
782
+ * Mark the current KYC capture job as submitted
783
+ */
784
+ public markSubmittedKyc<ThrowOnError extends boolean = false>(
785
+ options: Options<PostApiKycMarkSubmittedData, ThrowOnError>,
786
+ ) {
787
+ return (options.client ?? this.client).post<
788
+ PostApiKycMarkSubmittedResponses,
789
+ PostApiKycMarkSubmittedErrors,
790
+ ThrowOnError
791
+ >({
792
+ url: '/api/kyc/mark-submitted',
793
+ ...options,
794
+ headers: {
795
+ 'Content-Type': 'application/json',
796
+ ...options.headers,
797
+ },
798
+ });
799
+ }
800
+
801
+ /**
802
+ * Cancel the active KYC verification job for the current user
803
+ */
804
+ public cancelKyc<ThrowOnError extends boolean = false>(
805
+ options: Options<PostApiKycCancelData, ThrowOnError>,
806
+ ) {
807
+ return (options.client ?? this.client).post<
808
+ PostApiKycCancelResponses,
809
+ PostApiKycCancelErrors,
810
+ ThrowOnError
811
+ >({
812
+ url: '/api/kyc/cancel',
813
+ ...options,
814
+ headers: {
815
+ 'Content-Type': 'application/json',
816
+ ...options.headers,
817
+ },
818
+ });
819
+ }
820
+
821
+ /**
822
+ * Get KYC status for a user
823
+ */
824
+ public getKycStatus<ThrowOnError extends boolean = false>(
825
+ options: Options<GetApiKycStatusByUserIdData, ThrowOnError>,
826
+ ) {
827
+ return (options.client ?? this.client).get<
828
+ GetApiKycStatusByUserIdResponses,
829
+ GetApiKycStatusByUserIdErrors,
830
+ ThrowOnError
831
+ >({ url: '/api/kyc/status/{userId}', ...options });
832
+ }
833
+ }
834
+
705
835
  export class Training extends HeyApiClient {
706
836
  /**
707
837
  * Get training content grouped by category, top 3 per category
@@ -865,6 +995,11 @@ export class GlobalScoutMeClient extends HeyApiClient {
865
995
  return (this._invitations ??= new Invitations({ client: this.client }));
866
996
  }
867
997
 
998
+ private _kyc?: Kyc;
999
+ get kyc(): Kyc {
1000
+ return (this._kyc ??= new Kyc({ client: this.client }));
1001
+ }
1002
+
868
1003
  private _training?: Training;
869
1004
  get training(): Training {
870
1005
  return (this._training ??= new Training({ client: this.client }));