@metamask-previews/kyc-controller 0.0.0-preview-7cfd8be → 0.0.0-preview-a3cea003b

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +29 -3
  2. package/dist/KycController-method-action-types.cjs.map +1 -1
  3. package/dist/KycController-method-action-types.d.cts +48 -2
  4. package/dist/KycController-method-action-types.d.cts.map +1 -1
  5. package/dist/KycController-method-action-types.d.mts +48 -2
  6. package/dist/KycController-method-action-types.d.mts.map +1 -1
  7. package/dist/KycController-method-action-types.mjs.map +1 -1
  8. package/dist/KycController.cjs +469 -12
  9. package/dist/KycController.cjs.map +1 -1
  10. package/dist/KycController.d.cts +109 -5
  11. package/dist/KycController.d.cts.map +1 -1
  12. package/dist/KycController.d.mts +109 -5
  13. package/dist/KycController.d.mts.map +1 -1
  14. package/dist/KycController.mjs +469 -12
  15. package/dist/KycController.mjs.map +1 -1
  16. package/dist/KycService-method-action-types.cjs.map +1 -1
  17. package/dist/KycService-method-action-types.d.cts +38 -2
  18. package/dist/KycService-method-action-types.d.cts.map +1 -1
  19. package/dist/KycService-method-action-types.d.mts +38 -2
  20. package/dist/KycService-method-action-types.d.mts.map +1 -1
  21. package/dist/KycService-method-action-types.mjs.map +1 -1
  22. package/dist/KycService.cjs +177 -22
  23. package/dist/KycService.cjs.map +1 -1
  24. package/dist/KycService.d.cts +97 -12
  25. package/dist/KycService.d.cts.map +1 -1
  26. package/dist/KycService.d.mts +97 -12
  27. package/dist/KycService.d.mts.map +1 -1
  28. package/dist/KycService.mjs +178 -23
  29. package/dist/KycService.mjs.map +1 -1
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +5 -5
  32. package/dist/index.d.cts.map +1 -1
  33. package/dist/index.d.mts +5 -5
  34. package/dist/index.d.mts.map +1 -1
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/types.cjs.map +1 -1
  37. package/dist/types.d.cts +49 -10
  38. package/dist/types.d.cts.map +1 -1
  39. package/dist/types.d.mts +49 -10
  40. package/dist/types.d.mts.map +1 -1
  41. package/dist/types.mjs.map +1 -1
  42. package/package.json +1 -1
@@ -7,7 +7,7 @@ import type { AuthenticationControllerGetBearerTokenAction } from "@metamask/pro
7
7
  import type { Infer, Struct } from "@metamask/superstruct";
8
8
  import type { QueryClientConfig } from "@tanstack/query-core";
9
9
  import type { KycServiceMethodActions } from "./KycService-method-action-types.cjs";
10
- import type { KycDisclaimer, KycSessionStatus } from "./types.cjs";
10
+ import type { KycDisclaimer, KycSessionStatus, KycUserStatusResponse, KycVendor } from "./types.cjs";
11
11
  import type { UkycStorageAccessToken } from "./ukyc/storageAccessToken.cjs";
12
12
  /**
13
13
  * The name of the {@link KycService}, used to namespace the service's actions.
@@ -52,13 +52,22 @@ export type KycServiceMessenger = Messenger<typeof serviceName, KycServiceAction
52
52
  export type KycServiceOptions = {
53
53
  messenger: KycServiceMessenger;
54
54
  /**
55
- * Base url of the KYC api
55
+ * A function used to make HTTP requests. Defaults to the runtime's native
56
+ * `fetch`, so consumers do not need to inject one on platforms where `fetch`
57
+ * is available globally (browser, React Native, Node 18+).
58
+ */
59
+ fetch?: typeof fetch;
60
+ /**
61
+ * Mandatory value that sets the base url to KYC api
56
62
  */
57
63
  baseUrl: string;
58
64
  /**
59
- * Base URL of the Fractal encryption api
65
+ * Base URL of the Fractal encryption service, from which the JWKS used to
66
+ * verify the `jwtChain` returned by {@link KycService.getWrappingKey} is
67
+ * fetched. Required to run the wrapping-key exchange in
68
+ * {@link KycService.fetchJwks}.
60
69
  */
61
- fractalEncryptionBaseUrl: string;
70
+ fractalEncryptionBaseUrl?: string;
62
71
  /**
63
72
  * Shared configuration applied to all queries exposed by the service (e.g. a
64
73
  * default `staleTime`/`gcTime`). Each data service gets its own
@@ -138,18 +147,53 @@ declare const ApplicantAccessTokenResponseStruct: Struct<{
138
147
  applicantAccessToken: Struct<string, null>;
139
148
  }>;
140
149
  export type ApplicantAccessTokenResponse = Infer<typeof ApplicantAccessTokenResponseStruct>;
150
+ declare const VendorCustomerResponseStruct: Struct<{
151
+ id: string;
152
+ status: string;
153
+ email: string;
154
+ }, {
155
+ id: Struct<string, null>;
156
+ email: Struct<string, null>;
157
+ status: Struct<string, null>;
158
+ }>;
159
+ export type VendorCustomerResponse = Infer<typeof VendorCustomerResponseStruct>;
141
160
  export type CreateSessionParams = {
142
161
  email: string;
143
162
  termsAcceptedAt: string;
144
163
  disclaimerIds: string[];
145
164
  };
146
165
  export type CheckKycRequiredParams = {
147
- accessToken: string;
148
- country: string;
166
+ /**
167
+ * Identity vendor to check. Defaults to `moonpay` for the existing
168
+ * Check/Auth path.
169
+ */
170
+ vendor?: KycVendor;
171
+ /**
172
+ * MoonPay access token. Required when `vendor` is `moonpay` (or omitted).
173
+ */
174
+ accessToken?: string;
175
+ /**
176
+ * ISO 3166-1 alpha-3 country code. Required when `vendor` is `moonpay`.
177
+ */
178
+ country?: string;
149
179
  capabilities?: {
150
180
  product: string;
151
181
  }[];
152
182
  };
183
+ export type CreateVendorCustomerParams = {
184
+ vendor: KycVendor;
185
+ email: string;
186
+ };
187
+ export type SubmitConsentsParams = {
188
+ /**
189
+ * Vendor disclaimer ids the customer accepted (T&C1). Mapped to the UKYC
190
+ * wire field `ironDisclaimerIds` for the Money/VBA consents contract.
191
+ */
192
+ disclaimerIds: string[];
193
+ sumsubTncSigned: boolean;
194
+ idosTncSigned: boolean;
195
+ kycLevel?: 'standard';
196
+ };
153
197
  export type GetWrappingKeyParams = {
154
198
  sessionClientPublicKey: string;
155
199
  };
@@ -165,7 +209,17 @@ export type WrappedEncryptionKey = {
165
209
  };
166
210
  export type CreateUkycSessionParams = {
167
211
  jwtToken: string;
168
- vendorMetadata: Record<string, unknown>;
212
+ /**
213
+ * Identity vendor for the UKYC session. Defaults to `moonpay` for the
214
+ * existing Check/Auth flow. Pass a non-MoonPay vendor (e.g. `iron`) for
215
+ * the consents path (no MoonPay metadata required).
216
+ */
217
+ vendor?: KycVendor;
218
+ /**
219
+ * Vendor-specific metadata. Required for MoonPay (`moonPayAccessToken` /
220
+ * `moonPayUserId`); optional / omitted for other vendors.
221
+ */
222
+ vendorMetadata?: Record<string, unknown>;
169
223
  wrappedEncryptionKey: WrappedEncryptionKey;
170
224
  /**
171
225
  * The client-signed `ukyc_capability_token` (envelope: payload + Ed25519
@@ -183,8 +237,9 @@ export type GetSessionStatusParams = {
183
237
  /**
184
238
  * `KycService` communicates with the Universal KYC (UKYC) backend to drive the
185
239
  * identity + document-verification flow. It is stateless and platform-agnostic:
186
- * HTTP is performed through the global `fetch`, and the auth bearer token and
187
- * geolocation come from other controllers via the messenger.
240
+ * HTTP is performed through the runtime's native `fetch` (or an injected
241
+ * `fetch` when provided), and the auth bearer token and geolocation come from
242
+ * other controllers via the messenger.
188
243
  *
189
244
  * It extends {@link BaseDataService}, so every request is routed through
190
245
  * `fetchQuery`: it is wrapped in the shared service policy (retries, circuit
@@ -200,6 +255,8 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
200
255
  *
201
256
  * @param options - The constructor options.
202
257
  * @param options.messenger - The messenger suited for this service.
258
+ * @param options.fetch - A function used to make HTTP requests. Defaults to
259
+ * the runtime's native `fetch`.
203
260
  * @param options.baseUrl - Base URL of the KYC API
204
261
  * @param options.fractalEncryptionBaseUrl - Base URL of the Fractal
205
262
  * encryption service, from which the JWKS used to verify the wrapping-key
@@ -208,7 +265,7 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
208
265
  * exposed by the service.
209
266
  * @param options.policyOptions - Options for the request service policy.
210
267
  */
211
- constructor({ messenger, baseUrl, fractalEncryptionBaseUrl, queryClientConfig, policyOptions, }: KycServiceOptions);
268
+ constructor({ messenger, fetch: fetchFunction, baseUrl, fractalEncryptionBaseUrl, queryClientConfig, policyOptions, }: KycServiceOptions);
212
269
  /**
213
270
  * Resolves the customer's country from the geolocation source and converts it
214
271
  * to an ISO 3166-1 alpha-3 code.
@@ -222,10 +279,12 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
222
279
  * created.
223
280
  *
224
281
  * @param params - The parameters.
282
+ * @param params.vendor - Identity vendor. Defaults to `moonpay`.
225
283
  * @param params.country - ISO 3166-1 alpha-3 country code.
226
284
  * @returns The disclaimers.
227
285
  */
228
- fetchDisclaimers({ country, }: {
286
+ fetchDisclaimers({ vendor, country, }: {
287
+ vendor?: KycVendor;
229
288
  country: string;
230
289
  }): Promise<KycDisclaimer[]>;
231
290
  /**
@@ -236,7 +295,7 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
236
295
  */
237
296
  createSession(params: CreateSessionParams): Promise<Infer<typeof CreateSessionResponseStruct>>;
238
297
  /**
239
- * Checks whether KYC is required for the given access token, country, and
298
+ * Checks whether KYC is required for the given vendor, country, and
240
299
  * capabilities.
241
300
  *
242
301
  * @param params - The check parameters.
@@ -245,6 +304,32 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
245
304
  checkKycRequired(params: CheckKycRequiredParams): Promise<{
246
305
  kycRequired: boolean;
247
306
  }>;
307
+ /**
308
+ * Creates (or resumes) an empty-shell customer for the authenticated
309
+ * canonical user on the given identity vendor. Must run before showing
310
+ * vendor T&C so the customer exists and resume logic can key off vendor
311
+ * status.
312
+ *
313
+ * @param params - The parameters.
314
+ * @param params.vendor - Identity vendor (e.g. `iron` for Money/VBA).
315
+ * @param params.email - Email associated with the customer.
316
+ * @returns The vendor customer record (subset validated for controller use).
317
+ */
318
+ createVendorCustomer(params: CreateVendorCustomerParams): Promise<VendorCustomerResponse>;
319
+ /**
320
+ * Posts T&C1 (vendor signings) and T&C2 (Sumsub + idOS) consents for the
321
+ * authenticated user. The API responds with 204 No Content on success.
322
+ *
323
+ * @param params - The consent parameters.
324
+ */
325
+ submitConsents(params: SubmitConsentsParams): Promise<void>;
326
+ /**
327
+ * Fetches the user-keyed simplified KYC status used by Money toast / banner
328
+ * surfaces (`GET /kyc/status`).
329
+ *
330
+ * @returns The simplified status payload.
331
+ */
332
+ fetchKycStatus(): Promise<KycUserStatusResponse>;
248
333
  /**
249
334
  * Requests a per-session wrapping key from the UKYC backend.
250
335
  *
@@ -1 +1 @@
1
- {"version":3,"file":"KycService.d.cts","sourceRoot":"","sources":["../src/KycService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oCAAoC;AAC9D,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACpC,kCAAkC,EACnC,oCAAoC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,mCAAmC;AAE7E,OAAO,KAAK,EAAE,yCAAyC,EAAE,yCAAyC;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EAAE,4CAA4C,EAAE,+CAA+C;AAC3G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAY3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,6CAA4C;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,oBAAmB;AAGlE,OAAO,KAAK,EAAE,sBAAsB,EAAE,sCAAqC;AAI3E;;GAEG;AACH,eAAO,MAAM,WAAW,eAAe,CAAC;AAgBxC;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAC3C,kCAAkC,CAAC,OAAO,WAAW,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,GACvB,iCAAiC,CAAC;AAEtC;;GAEG;AACH,KAAK,cAAc,GACf,4CAA4C,GAC5C,yCAAyC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,4BAA4B,CACpE,OAAO,WAAW,CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAC7C,oCAAoC,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,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,oBAAoB,CACxB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,sBAAsB,CAAC;IAwBlC;;;;;OAKG;IACG,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BjE;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAgBtD;;;;;;;;;;;;;OAaG;IACG,cAAc,CAClB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,mBAAmB,CAAC;IAsB/B;;;;;;;;OAQG;IACG,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC;IAgBxC;;;;;;;;OAQG;IACG,iBAAiB,CACrB,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,mBAAmB,CAAC;IAgC/B;;;;;;OAMG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,4BAA4B,CAAC;IAmBxC;;;;;;;OAOG;IACG,gBAAgB,CACpB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,gBAAgB,CAAC;CAqI7B"}
@@ -7,7 +7,7 @@ import type { AuthenticationControllerGetBearerTokenAction } from "@metamask/pro
7
7
  import type { Infer, Struct } from "@metamask/superstruct";
8
8
  import type { QueryClientConfig } from "@tanstack/query-core";
9
9
  import type { KycServiceMethodActions } from "./KycService-method-action-types.mjs";
10
- import type { KycDisclaimer, KycSessionStatus } from "./types.mjs";
10
+ import type { KycDisclaimer, KycSessionStatus, KycUserStatusResponse, KycVendor } from "./types.mjs";
11
11
  import type { UkycStorageAccessToken } from "./ukyc/storageAccessToken.mjs";
12
12
  /**
13
13
  * The name of the {@link KycService}, used to namespace the service's actions.
@@ -52,13 +52,22 @@ export type KycServiceMessenger = Messenger<typeof serviceName, KycServiceAction
52
52
  export type KycServiceOptions = {
53
53
  messenger: KycServiceMessenger;
54
54
  /**
55
- * Base url of the KYC api
55
+ * A function used to make HTTP requests. Defaults to the runtime's native
56
+ * `fetch`, so consumers do not need to inject one on platforms where `fetch`
57
+ * is available globally (browser, React Native, Node 18+).
58
+ */
59
+ fetch?: typeof fetch;
60
+ /**
61
+ * Mandatory value that sets the base url to KYC api
56
62
  */
57
63
  baseUrl: string;
58
64
  /**
59
- * Base URL of the Fractal encryption api
65
+ * Base URL of the Fractal encryption service, from which the JWKS used to
66
+ * verify the `jwtChain` returned by {@link KycService.getWrappingKey} is
67
+ * fetched. Required to run the wrapping-key exchange in
68
+ * {@link KycService.fetchJwks}.
60
69
  */
61
- fractalEncryptionBaseUrl: string;
70
+ fractalEncryptionBaseUrl?: string;
62
71
  /**
63
72
  * Shared configuration applied to all queries exposed by the service (e.g. a
64
73
  * default `staleTime`/`gcTime`). Each data service gets its own
@@ -138,18 +147,53 @@ declare const ApplicantAccessTokenResponseStruct: Struct<{
138
147
  applicantAccessToken: Struct<string, null>;
139
148
  }>;
140
149
  export type ApplicantAccessTokenResponse = Infer<typeof ApplicantAccessTokenResponseStruct>;
150
+ declare const VendorCustomerResponseStruct: Struct<{
151
+ id: string;
152
+ status: string;
153
+ email: string;
154
+ }, {
155
+ id: Struct<string, null>;
156
+ email: Struct<string, null>;
157
+ status: Struct<string, null>;
158
+ }>;
159
+ export type VendorCustomerResponse = Infer<typeof VendorCustomerResponseStruct>;
141
160
  export type CreateSessionParams = {
142
161
  email: string;
143
162
  termsAcceptedAt: string;
144
163
  disclaimerIds: string[];
145
164
  };
146
165
  export type CheckKycRequiredParams = {
147
- accessToken: string;
148
- country: string;
166
+ /**
167
+ * Identity vendor to check. Defaults to `moonpay` for the existing
168
+ * Check/Auth path.
169
+ */
170
+ vendor?: KycVendor;
171
+ /**
172
+ * MoonPay access token. Required when `vendor` is `moonpay` (or omitted).
173
+ */
174
+ accessToken?: string;
175
+ /**
176
+ * ISO 3166-1 alpha-3 country code. Required when `vendor` is `moonpay`.
177
+ */
178
+ country?: string;
149
179
  capabilities?: {
150
180
  product: string;
151
181
  }[];
152
182
  };
183
+ export type CreateVendorCustomerParams = {
184
+ vendor: KycVendor;
185
+ email: string;
186
+ };
187
+ export type SubmitConsentsParams = {
188
+ /**
189
+ * Vendor disclaimer ids the customer accepted (T&C1). Mapped to the UKYC
190
+ * wire field `ironDisclaimerIds` for the Money/VBA consents contract.
191
+ */
192
+ disclaimerIds: string[];
193
+ sumsubTncSigned: boolean;
194
+ idosTncSigned: boolean;
195
+ kycLevel?: 'standard';
196
+ };
153
197
  export type GetWrappingKeyParams = {
154
198
  sessionClientPublicKey: string;
155
199
  };
@@ -165,7 +209,17 @@ export type WrappedEncryptionKey = {
165
209
  };
166
210
  export type CreateUkycSessionParams = {
167
211
  jwtToken: string;
168
- vendorMetadata: Record<string, unknown>;
212
+ /**
213
+ * Identity vendor for the UKYC session. Defaults to `moonpay` for the
214
+ * existing Check/Auth flow. Pass a non-MoonPay vendor (e.g. `iron`) for
215
+ * the consents path (no MoonPay metadata required).
216
+ */
217
+ vendor?: KycVendor;
218
+ /**
219
+ * Vendor-specific metadata. Required for MoonPay (`moonPayAccessToken` /
220
+ * `moonPayUserId`); optional / omitted for other vendors.
221
+ */
222
+ vendorMetadata?: Record<string, unknown>;
169
223
  wrappedEncryptionKey: WrappedEncryptionKey;
170
224
  /**
171
225
  * The client-signed `ukyc_capability_token` (envelope: payload + Ed25519
@@ -183,8 +237,9 @@ export type GetSessionStatusParams = {
183
237
  /**
184
238
  * `KycService` communicates with the Universal KYC (UKYC) backend to drive the
185
239
  * identity + document-verification flow. It is stateless and platform-agnostic:
186
- * HTTP is performed through the global `fetch`, and the auth bearer token and
187
- * geolocation come from other controllers via the messenger.
240
+ * HTTP is performed through the runtime's native `fetch` (or an injected
241
+ * `fetch` when provided), and the auth bearer token and geolocation come from
242
+ * other controllers via the messenger.
188
243
  *
189
244
  * It extends {@link BaseDataService}, so every request is routed through
190
245
  * `fetchQuery`: it is wrapped in the shared service policy (retries, circuit
@@ -200,6 +255,8 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
200
255
  *
201
256
  * @param options - The constructor options.
202
257
  * @param options.messenger - The messenger suited for this service.
258
+ * @param options.fetch - A function used to make HTTP requests. Defaults to
259
+ * the runtime's native `fetch`.
203
260
  * @param options.baseUrl - Base URL of the KYC API
204
261
  * @param options.fractalEncryptionBaseUrl - Base URL of the Fractal
205
262
  * encryption service, from which the JWKS used to verify the wrapping-key
@@ -208,7 +265,7 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
208
265
  * exposed by the service.
209
266
  * @param options.policyOptions - Options for the request service policy.
210
267
  */
211
- constructor({ messenger, baseUrl, fractalEncryptionBaseUrl, queryClientConfig, policyOptions, }: KycServiceOptions);
268
+ constructor({ messenger, fetch: fetchFunction, baseUrl, fractalEncryptionBaseUrl, queryClientConfig, policyOptions, }: KycServiceOptions);
212
269
  /**
213
270
  * Resolves the customer's country from the geolocation source and converts it
214
271
  * to an ISO 3166-1 alpha-3 code.
@@ -222,10 +279,12 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
222
279
  * created.
223
280
  *
224
281
  * @param params - The parameters.
282
+ * @param params.vendor - Identity vendor. Defaults to `moonpay`.
225
283
  * @param params.country - ISO 3166-1 alpha-3 country code.
226
284
  * @returns The disclaimers.
227
285
  */
228
- fetchDisclaimers({ country, }: {
286
+ fetchDisclaimers({ vendor, country, }: {
287
+ vendor?: KycVendor;
229
288
  country: string;
230
289
  }): Promise<KycDisclaimer[]>;
231
290
  /**
@@ -236,7 +295,7 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
236
295
  */
237
296
  createSession(params: CreateSessionParams): Promise<Infer<typeof CreateSessionResponseStruct>>;
238
297
  /**
239
- * Checks whether KYC is required for the given access token, country, and
298
+ * Checks whether KYC is required for the given vendor, country, and
240
299
  * capabilities.
241
300
  *
242
301
  * @param params - The check parameters.
@@ -245,6 +304,32 @@ export declare class KycService extends BaseDataService<typeof serviceName, KycS
245
304
  checkKycRequired(params: CheckKycRequiredParams): Promise<{
246
305
  kycRequired: boolean;
247
306
  }>;
307
+ /**
308
+ * Creates (or resumes) an empty-shell customer for the authenticated
309
+ * canonical user on the given identity vendor. Must run before showing
310
+ * vendor T&C so the customer exists and resume logic can key off vendor
311
+ * status.
312
+ *
313
+ * @param params - The parameters.
314
+ * @param params.vendor - Identity vendor (e.g. `iron` for Money/VBA).
315
+ * @param params.email - Email associated with the customer.
316
+ * @returns The vendor customer record (subset validated for controller use).
317
+ */
318
+ createVendorCustomer(params: CreateVendorCustomerParams): Promise<VendorCustomerResponse>;
319
+ /**
320
+ * Posts T&C1 (vendor signings) and T&C2 (Sumsub + idOS) consents for the
321
+ * authenticated user. The API responds with 204 No Content on success.
322
+ *
323
+ * @param params - The consent parameters.
324
+ */
325
+ submitConsents(params: SubmitConsentsParams): Promise<void>;
326
+ /**
327
+ * Fetches the user-keyed simplified KYC status used by Money toast / banner
328
+ * surfaces (`GET /kyc/status`).
329
+ *
330
+ * @returns The simplified status payload.
331
+ */
332
+ fetchKycStatus(): Promise<KycUserStatusResponse>;
248
333
  /**
249
334
  * Requests a per-session wrapping key from the UKYC backend.
250
335
  *
@@ -1 +1 @@
1
- {"version":3,"file":"KycService.d.mts","sourceRoot":"","sources":["../src/KycService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,oCAAoC;AAC9D,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACpC,kCAAkC,EACnC,oCAAoC;AACrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,mCAAmC;AAE7E,OAAO,KAAK,EAAE,yCAAyC,EAAE,yCAAyC;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EAAE,4CAA4C,EAAE,+CAA+C;AAC3G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,8BAA8B;AAY3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,6BAA6B;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,6CAA4C;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,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