vesant-sdk 1.8.0-dev.153299b → 1.8.0-dev.237d268

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.
@@ -119,14 +119,22 @@ interface Proof {
119
119
  id: string;
120
120
  kyc_id: string;
121
121
  type: ProofType;
122
- document: string;
122
+ /** Storage key. The platform never returns it; use `link` to download. */
123
+ document?: string;
123
124
  document_number?: string;
125
+ /** Document type the customer selected (e.g. `passport`). */
126
+ selected_type?: string;
127
+ /** Short-lived download URL, attached on `getKycRequest`. */
128
+ link?: string;
124
129
  created_at: string;
125
130
  }
126
131
  interface ProofDownloadURL {
132
+ /** Proof ID on the KYC record. */
133
+ id: string;
127
134
  type: ProofType;
128
135
  url: string;
129
- expires_at: string;
136
+ /** Not sent by the platform; the link itself is short-lived. */
137
+ expires_at?: string;
130
138
  }
131
139
  interface KycCustomerProfile {
132
140
  id: string;
@@ -261,6 +269,16 @@ interface KycVerificationTriggers {
261
269
  first_purchase: boolean;
262
270
  /** Re-trigger verification once the customer's identity document has expired. */
263
271
  auto_trigger_on_id_expiration: boolean;
272
+ /**
273
+ * Manual KYC Verification: whether customers may start a verification
274
+ * themselves (`trigger_event: "manual"`), independent of the event
275
+ * triggers and of their status. On by default. When on, a `manual`
276
+ * request always returns a link — an already verified customer included.
277
+ * When off, it answers `kyc_required: false` with reason
278
+ * `KYC_NOT_REQUIRED_TRIGGER_DISABLED`; hide your Verification option in
279
+ * that case.
280
+ */
281
+ manual: boolean;
264
282
  /** Hold sensitive profile changes (name, DOB, address) behind KYC. */
265
283
  account_sensitive_action?: AccountSensitiveActionTrigger;
266
284
  }
@@ -430,8 +448,9 @@ interface UpdateKycStatusRequest {
430
448
  }
431
449
  /**
432
450
  * Events that can trigger a KYC request. Each maps to a per-event toggle in
433
- * the tenant's KYC verification trigger preferences, except `manual` (always
434
- * required) and `login` (only for an expired identity document).
451
+ * the tenant's KYC verification trigger preferences (`manual` to the Manual
452
+ * KYC Verification toggle), except `login` (only for an expired identity
453
+ * document).
435
454
  */
436
455
  type KycTriggerEvent = 'onboarding' | 'first_withdrawal' | 'first_purchase'
437
456
  /** Aliases of `first_withdrawal` / `first_purchase` — same tenant toggles. */
@@ -493,8 +512,12 @@ interface RequestKycSubmitLinkRequest {
493
512
  /**
494
513
  * Event that triggered the KYC request. The tenant's KYC verification
495
514
  * trigger preferences decide, per event, whether KYC is required
496
- * (`kyc_required` in the response). "manual" always requires KYC and
497
- * honors the tenant's allow-skip-on-manual option (`can_skip`). "login"
515
+ * (`kyc_required` in the response). "manual" — the customer starting
516
+ * verification themselves — is governed by the tenant's Manual KYC
517
+ * Verification toggle (on by default): when on it always returns a link,
518
+ * even for an already verified customer, and honors the
519
+ * allow-skip-on-manual option (`can_skip`); when off it answers
520
+ * `kyc_required: false` with `KYC_NOT_REQUIRED_TRIGGER_DISABLED`. "login"
498
521
  * answers for any customer state — never verified (asked, not skippable),
499
522
  * document expired (asked, skippable so you can offer "Remind me later"),
500
523
  * or verified and valid (not asked) — so a platform that gates entry on KYC
@@ -619,7 +642,8 @@ interface RequestKycSubmitLinkResponse {
619
642
  * Whether the user may skip verification. `true` for
620
643
  * `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
621
644
  * for `"login"` when an expired identity document triggered the request
622
- * (offer "Remind me later"), and when the customer is already verified.
645
+ * (offer "Remind me later"), and when the customer is already verified
646
+ * (except on `"manual"`, which always issues a link while enabled).
623
647
  * Always `false` at `"withdrawal"` / `"purchase"` — that is where a
624
648
  * postponed re-verification becomes mandatory.
625
649
  */
@@ -1244,15 +1268,20 @@ declare class KycClient extends BaseClient {
1244
1268
  */
1245
1269
  submitVerification(request: DocumentVerificationRequest, requestOptions?: RequestOptions): Promise<DocumentVerificationResponse>;
1246
1270
  /**
1247
- * Get a KYC request by ID
1271
+ * Get a KYC record by ID
1248
1272
  *
1249
- * @param id - KYC request ID
1250
- * @returns KYC request details including proofs and alerts
1273
+ * Works with your tenant API key. Each entry in `proofs` carries a
1274
+ * short-lived `link` for downloading that document, and `reference` holds
1275
+ * your own customer reference (the `forward_reference`).
1276
+ *
1277
+ * @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
1278
+ * @returns KYC record including proofs (with download links) and alerts
1251
1279
  *
1252
1280
  * @example
1253
1281
  * ```typescript
1254
1282
  * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
1255
1283
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
1284
+ * kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
1256
1285
  * ```
1257
1286
  */
1258
1287
  getKycRequest(id: string): Promise<KycRequest>;
@@ -1271,6 +1300,10 @@ declare class KycClient extends BaseClient {
1271
1300
  * );
1272
1301
  * console.log(`Found ${requests.total} pending requests`);
1273
1302
  * ```
1303
+ *
1304
+ * @remarks Console session only. This endpoint accepts a Vesant console
1305
+ * (dashboard login) token, not a tenant API key; called with an API key it
1306
+ * fails with `AuthenticationError` or a permission error.
1274
1307
  */
1275
1308
  listKycRequests(filters?: KycRequestFilters, pagination?: PaginationParams): Promise<KycRequestListResponse>;
1276
1309
  /**
@@ -1294,6 +1327,10 @@ declare class KycClient extends BaseClient {
1294
1327
  * reason: "Document expired"
1295
1328
  * });
1296
1329
  * ```
1330
+ *
1331
+ * @remarks Console session only. This endpoint accepts a Vesant console
1332
+ * (dashboard login) token, not a tenant API key; called with an API key it
1333
+ * fails with `AuthenticationError` or a permission error.
1297
1334
  */
1298
1335
  updateKycStatus(request: UpdateKycStatusRequest): Promise<void>;
1299
1336
  /**
@@ -1318,14 +1355,18 @@ declare class KycClient extends BaseClient {
1318
1355
  /**
1319
1356
  * Get downloadable URLs for KYC proofs/documents
1320
1357
  *
1321
- * @param kycId - KYC request ID
1322
- * @returns Array of proof download URLs with expiration
1358
+ * Derived from the `proofs` of `getKycRequest`: the platform attaches a
1359
+ * short-lived download link to every proof on the KYC record, so no
1360
+ * separate endpoint is needed. Proofs without a link are omitted.
1361
+ *
1362
+ * @param kycId - KYC record ID
1363
+ * @returns Array of proof download URLs
1323
1364
  *
1324
1365
  * @example
1325
1366
  * ```typescript
1326
1367
  * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
1327
1368
  * proofs.forEach(proof => {
1328
- * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
1369
+ * console.log(`${proof.type}: ${proof.url}`);
1329
1370
  * });
1330
1371
  * ```
1331
1372
  */
@@ -1346,6 +1387,10 @@ declare class KycClient extends BaseClient {
1346
1387
  * console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
1347
1388
  * console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
1348
1389
  * ```
1390
+ *
1391
+ * @remarks Console session only. This endpoint accepts a Vesant console
1392
+ * (dashboard login) token, not a tenant API key; called with an API key it
1393
+ * fails with `AuthenticationError` or a permission error.
1349
1394
  */
1350
1395
  getOverview(fromDate?: string, toDate?: string): Promise<KycOverview>;
1351
1396
  /**
@@ -1353,6 +1398,10 @@ declare class KycClient extends BaseClient {
1353
1398
  *
1354
1399
  * @param alertId - Alert ID
1355
1400
  * @returns Alert details
1401
+ *
1402
+ * @remarks Console session only. This endpoint accepts a Vesant console
1403
+ * (dashboard login) token, not a tenant API key; called with an API key it
1404
+ * fails with `AuthenticationError` or a permission error.
1356
1405
  */
1357
1406
  getAlert(alertId: string): Promise<KycAlert>;
1358
1407
  /**
@@ -1374,6 +1423,10 @@ declare class KycClient extends BaseClient {
1374
1423
  * );
1375
1424
  * console.log(`Found ${alerts.total} alerts`);
1376
1425
  * ```
1426
+ *
1427
+ * @remarks Console session only. This endpoint accepts a Vesant console
1428
+ * (dashboard login) token, not a tenant API key; called with an API key it
1429
+ * fails with `AuthenticationError` or a permission error.
1377
1430
  */
1378
1431
  listAlerts(filters?: KycAlertFilters, pagination?: PaginationParams): Promise<KycAlertListResponse>;
1379
1432
  /**
@@ -1403,6 +1456,10 @@ declare class KycClient extends BaseClient {
1403
1456
  * reason: "Requires senior review - suspicious documents"
1404
1457
  * });
1405
1458
  * ```
1459
+ *
1460
+ * @remarks Console session only. This endpoint accepts a Vesant console
1461
+ * (dashboard login) token, not a tenant API key; called with an API key it
1462
+ * fails with `AuthenticationError` or a permission error.
1406
1463
  */
1407
1464
  updateAlert(alertId: string, update: UpdateKycAlertRequest): Promise<void>;
1408
1465
  /**
@@ -1416,6 +1473,10 @@ declare class KycClient extends BaseClient {
1416
1473
  * console.log(`Face verification required: ${prefs.is_face_verification_required}`);
1417
1474
  * console.log(`Required documents: ${prefs.required_document_count}`);
1418
1475
  * ```
1476
+ *
1477
+ * @remarks Console session only. This endpoint accepts a Vesant console
1478
+ * (dashboard login) token, not a tenant API key; called with an API key it
1479
+ * fails with `AuthenticationError` or a permission error.
1419
1480
  */
1420
1481
  getPreferences(): Promise<KycPreferences>;
1421
1482
  /**
@@ -119,14 +119,22 @@ interface Proof {
119
119
  id: string;
120
120
  kyc_id: string;
121
121
  type: ProofType;
122
- document: string;
122
+ /** Storage key. The platform never returns it; use `link` to download. */
123
+ document?: string;
123
124
  document_number?: string;
125
+ /** Document type the customer selected (e.g. `passport`). */
126
+ selected_type?: string;
127
+ /** Short-lived download URL, attached on `getKycRequest`. */
128
+ link?: string;
124
129
  created_at: string;
125
130
  }
126
131
  interface ProofDownloadURL {
132
+ /** Proof ID on the KYC record. */
133
+ id: string;
127
134
  type: ProofType;
128
135
  url: string;
129
- expires_at: string;
136
+ /** Not sent by the platform; the link itself is short-lived. */
137
+ expires_at?: string;
130
138
  }
131
139
  interface KycCustomerProfile {
132
140
  id: string;
@@ -261,6 +269,16 @@ interface KycVerificationTriggers {
261
269
  first_purchase: boolean;
262
270
  /** Re-trigger verification once the customer's identity document has expired. */
263
271
  auto_trigger_on_id_expiration: boolean;
272
+ /**
273
+ * Manual KYC Verification: whether customers may start a verification
274
+ * themselves (`trigger_event: "manual"`), independent of the event
275
+ * triggers and of their status. On by default. When on, a `manual`
276
+ * request always returns a link — an already verified customer included.
277
+ * When off, it answers `kyc_required: false` with reason
278
+ * `KYC_NOT_REQUIRED_TRIGGER_DISABLED`; hide your Verification option in
279
+ * that case.
280
+ */
281
+ manual: boolean;
264
282
  /** Hold sensitive profile changes (name, DOB, address) behind KYC. */
265
283
  account_sensitive_action?: AccountSensitiveActionTrigger;
266
284
  }
@@ -430,8 +448,9 @@ interface UpdateKycStatusRequest {
430
448
  }
431
449
  /**
432
450
  * Events that can trigger a KYC request. Each maps to a per-event toggle in
433
- * the tenant's KYC verification trigger preferences, except `manual` (always
434
- * required) and `login` (only for an expired identity document).
451
+ * the tenant's KYC verification trigger preferences (`manual` to the Manual
452
+ * KYC Verification toggle), except `login` (only for an expired identity
453
+ * document).
435
454
  */
436
455
  type KycTriggerEvent = 'onboarding' | 'first_withdrawal' | 'first_purchase'
437
456
  /** Aliases of `first_withdrawal` / `first_purchase` — same tenant toggles. */
@@ -493,8 +512,12 @@ interface RequestKycSubmitLinkRequest {
493
512
  /**
494
513
  * Event that triggered the KYC request. The tenant's KYC verification
495
514
  * trigger preferences decide, per event, whether KYC is required
496
- * (`kyc_required` in the response). "manual" always requires KYC and
497
- * honors the tenant's allow-skip-on-manual option (`can_skip`). "login"
515
+ * (`kyc_required` in the response). "manual" — the customer starting
516
+ * verification themselves — is governed by the tenant's Manual KYC
517
+ * Verification toggle (on by default): when on it always returns a link,
518
+ * even for an already verified customer, and honors the
519
+ * allow-skip-on-manual option (`can_skip`); when off it answers
520
+ * `kyc_required: false` with `KYC_NOT_REQUIRED_TRIGGER_DISABLED`. "login"
498
521
  * answers for any customer state — never verified (asked, not skippable),
499
522
  * document expired (asked, skippable so you can offer "Remind me later"),
500
523
  * or verified and valid (not asked) — so a platform that gates entry on KYC
@@ -619,7 +642,8 @@ interface RequestKycSubmitLinkResponse {
619
642
  * Whether the user may skip verification. `true` for
620
643
  * `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
621
644
  * for `"login"` when an expired identity document triggered the request
622
- * (offer "Remind me later"), and when the customer is already verified.
645
+ * (offer "Remind me later"), and when the customer is already verified
646
+ * (except on `"manual"`, which always issues a link while enabled).
623
647
  * Always `false` at `"withdrawal"` / `"purchase"` — that is where a
624
648
  * postponed re-verification becomes mandatory.
625
649
  */
@@ -1244,15 +1268,20 @@ declare class KycClient extends BaseClient {
1244
1268
  */
1245
1269
  submitVerification(request: DocumentVerificationRequest, requestOptions?: RequestOptions): Promise<DocumentVerificationResponse>;
1246
1270
  /**
1247
- * Get a KYC request by ID
1271
+ * Get a KYC record by ID
1248
1272
  *
1249
- * @param id - KYC request ID
1250
- * @returns KYC request details including proofs and alerts
1273
+ * Works with your tenant API key. Each entry in `proofs` carries a
1274
+ * short-lived `link` for downloading that document, and `reference` holds
1275
+ * your own customer reference (the `forward_reference`).
1276
+ *
1277
+ * @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
1278
+ * @returns KYC record including proofs (with download links) and alerts
1251
1279
  *
1252
1280
  * @example
1253
1281
  * ```typescript
1254
1282
  * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
1255
1283
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
1284
+ * kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
1256
1285
  * ```
1257
1286
  */
1258
1287
  getKycRequest(id: string): Promise<KycRequest>;
@@ -1271,6 +1300,10 @@ declare class KycClient extends BaseClient {
1271
1300
  * );
1272
1301
  * console.log(`Found ${requests.total} pending requests`);
1273
1302
  * ```
1303
+ *
1304
+ * @remarks Console session only. This endpoint accepts a Vesant console
1305
+ * (dashboard login) token, not a tenant API key; called with an API key it
1306
+ * fails with `AuthenticationError` or a permission error.
1274
1307
  */
1275
1308
  listKycRequests(filters?: KycRequestFilters, pagination?: PaginationParams): Promise<KycRequestListResponse>;
1276
1309
  /**
@@ -1294,6 +1327,10 @@ declare class KycClient extends BaseClient {
1294
1327
  * reason: "Document expired"
1295
1328
  * });
1296
1329
  * ```
1330
+ *
1331
+ * @remarks Console session only. This endpoint accepts a Vesant console
1332
+ * (dashboard login) token, not a tenant API key; called with an API key it
1333
+ * fails with `AuthenticationError` or a permission error.
1297
1334
  */
1298
1335
  updateKycStatus(request: UpdateKycStatusRequest): Promise<void>;
1299
1336
  /**
@@ -1318,14 +1355,18 @@ declare class KycClient extends BaseClient {
1318
1355
  /**
1319
1356
  * Get downloadable URLs for KYC proofs/documents
1320
1357
  *
1321
- * @param kycId - KYC request ID
1322
- * @returns Array of proof download URLs with expiration
1358
+ * Derived from the `proofs` of `getKycRequest`: the platform attaches a
1359
+ * short-lived download link to every proof on the KYC record, so no
1360
+ * separate endpoint is needed. Proofs without a link are omitted.
1361
+ *
1362
+ * @param kycId - KYC record ID
1363
+ * @returns Array of proof download URLs
1323
1364
  *
1324
1365
  * @example
1325
1366
  * ```typescript
1326
1367
  * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
1327
1368
  * proofs.forEach(proof => {
1328
- * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
1369
+ * console.log(`${proof.type}: ${proof.url}`);
1329
1370
  * });
1330
1371
  * ```
1331
1372
  */
@@ -1346,6 +1387,10 @@ declare class KycClient extends BaseClient {
1346
1387
  * console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
1347
1388
  * console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
1348
1389
  * ```
1390
+ *
1391
+ * @remarks Console session only. This endpoint accepts a Vesant console
1392
+ * (dashboard login) token, not a tenant API key; called with an API key it
1393
+ * fails with `AuthenticationError` or a permission error.
1349
1394
  */
1350
1395
  getOverview(fromDate?: string, toDate?: string): Promise<KycOverview>;
1351
1396
  /**
@@ -1353,6 +1398,10 @@ declare class KycClient extends BaseClient {
1353
1398
  *
1354
1399
  * @param alertId - Alert ID
1355
1400
  * @returns Alert details
1401
+ *
1402
+ * @remarks Console session only. This endpoint accepts a Vesant console
1403
+ * (dashboard login) token, not a tenant API key; called with an API key it
1404
+ * fails with `AuthenticationError` or a permission error.
1356
1405
  */
1357
1406
  getAlert(alertId: string): Promise<KycAlert>;
1358
1407
  /**
@@ -1374,6 +1423,10 @@ declare class KycClient extends BaseClient {
1374
1423
  * );
1375
1424
  * console.log(`Found ${alerts.total} alerts`);
1376
1425
  * ```
1426
+ *
1427
+ * @remarks Console session only. This endpoint accepts a Vesant console
1428
+ * (dashboard login) token, not a tenant API key; called with an API key it
1429
+ * fails with `AuthenticationError` or a permission error.
1377
1430
  */
1378
1431
  listAlerts(filters?: KycAlertFilters, pagination?: PaginationParams): Promise<KycAlertListResponse>;
1379
1432
  /**
@@ -1403,6 +1456,10 @@ declare class KycClient extends BaseClient {
1403
1456
  * reason: "Requires senior review - suspicious documents"
1404
1457
  * });
1405
1458
  * ```
1459
+ *
1460
+ * @remarks Console session only. This endpoint accepts a Vesant console
1461
+ * (dashboard login) token, not a tenant API key; called with an API key it
1462
+ * fails with `AuthenticationError` or a permission error.
1406
1463
  */
1407
1464
  updateAlert(alertId: string, update: UpdateKycAlertRequest): Promise<void>;
1408
1465
  /**
@@ -1416,6 +1473,10 @@ declare class KycClient extends BaseClient {
1416
1473
  * console.log(`Face verification required: ${prefs.is_face_verification_required}`);
1417
1474
  * console.log(`Required documents: ${prefs.required_document_count}`);
1418
1475
  * ```
1476
+ *
1477
+ * @remarks Console session only. This endpoint accepts a Vesant console
1478
+ * (dashboard login) token, not a tenant API key; called with an API key it
1479
+ * fails with `AuthenticationError` or a permission error.
1419
1480
  */
1420
1481
  getPreferences(): Promise<KycPreferences>;
1421
1482
  /**
package/dist/kyc/index.js CHANGED
@@ -892,19 +892,26 @@ var KycClient = class extends BaseClient {
892
892
  }, void 0, requestOptions);
893
893
  }
894
894
  /**
895
- * Get a KYC request by ID
895
+ * Get a KYC record by ID
896
896
  *
897
- * @param id - KYC request ID
898
- * @returns KYC request details including proofs and alerts
897
+ * Works with your tenant API key. Each entry in `proofs` carries a
898
+ * short-lived `link` for downloading that document, and `reference` holds
899
+ * your own customer reference (the `forward_reference`).
900
+ *
901
+ * @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
902
+ * @returns KYC record including proofs (with download links) and alerts
899
903
  *
900
904
  * @example
901
905
  * ```typescript
902
906
  * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
903
907
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
908
+ * kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
904
909
  * ```
905
910
  */
906
911
  async getKycRequest(id) {
907
- return this.request(`/api/v1/kyc/requests/${id}`);
912
+ return this.request(`/api/v1/kyc/${encodeURIComponent(id)}`, {
913
+ headers: this.getUserHeaders()
914
+ });
908
915
  }
909
916
  /**
910
917
  * List KYC requests with filters and pagination
@@ -921,6 +928,10 @@ var KycClient = class extends BaseClient {
921
928
  * );
922
929
  * console.log(`Found ${requests.total} pending requests`);
923
930
  * ```
931
+ *
932
+ * @remarks Console session only. This endpoint accepts a Vesant console
933
+ * (dashboard login) token, not a tenant API key; called with an API key it
934
+ * fails with `AuthenticationError` or a permission error.
924
935
  */
925
936
  async listKycRequests(filters, pagination) {
926
937
  const params = {};
@@ -958,6 +969,10 @@ var KycClient = class extends BaseClient {
958
969
  * reason: "Document expired"
959
970
  * });
960
971
  * ```
972
+ *
973
+ * @remarks Console session only. This endpoint accepts a Vesant console
974
+ * (dashboard login) token, not a tenant API key; called with an API key it
975
+ * fails with `AuthenticationError` or a permission error.
961
976
  */
962
977
  async updateKycStatus(request) {
963
978
  await this.request("/api/v1/kyc/status", {
@@ -994,22 +1009,24 @@ var KycClient = class extends BaseClient {
994
1009
  /**
995
1010
  * Get downloadable URLs for KYC proofs/documents
996
1011
  *
997
- * @param kycId - KYC request ID
998
- * @returns Array of proof download URLs with expiration
1012
+ * Derived from the `proofs` of `getKycRequest`: the platform attaches a
1013
+ * short-lived download link to every proof on the KYC record, so no
1014
+ * separate endpoint is needed. Proofs without a link are omitted.
1015
+ *
1016
+ * @param kycId - KYC record ID
1017
+ * @returns Array of proof download URLs
999
1018
  *
1000
1019
  * @example
1001
1020
  * ```typescript
1002
1021
  * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
1003
1022
  * proofs.forEach(proof => {
1004
- * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
1023
+ * console.log(`${proof.type}: ${proof.url}`);
1005
1024
  * });
1006
1025
  * ```
1007
1026
  */
1008
1027
  async getProofDownloadURLs(kycId) {
1009
- return this.request(
1010
- `/api/v1/kyc/proofs/${kycId}`,
1011
- { headers: this.getUserHeaders() }
1012
- );
1028
+ const kyc = await this.getKycRequest(kycId);
1029
+ return (kyc.proofs ?? []).filter((proof) => typeof proof.link === "string" && proof.link !== "").map((proof) => ({ id: proof.id, type: proof.type, url: proof.link }));
1013
1030
  }
1014
1031
  // ============================================================================
1015
1032
  // KYC Overview & Statistics
@@ -1030,6 +1047,10 @@ var KycClient = class extends BaseClient {
1030
1047
  * console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
1031
1048
  * console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
1032
1049
  * ```
1050
+ *
1051
+ * @remarks Console session only. This endpoint accepts a Vesant console
1052
+ * (dashboard login) token, not a tenant API key; called with an API key it
1053
+ * fails with `AuthenticationError` or a permission error.
1033
1054
  */
1034
1055
  async getOverview(fromDate, toDate) {
1035
1056
  const params = {};
@@ -1047,6 +1068,10 @@ var KycClient = class extends BaseClient {
1047
1068
  *
1048
1069
  * @param alertId - Alert ID
1049
1070
  * @returns Alert details
1071
+ *
1072
+ * @remarks Console session only. This endpoint accepts a Vesant console
1073
+ * (dashboard login) token, not a tenant API key; called with an API key it
1074
+ * fails with `AuthenticationError` or a permission error.
1050
1075
  */
1051
1076
  async getAlert(alertId) {
1052
1077
  return this.request(`/api/v1/kyc/alerts/${alertId}`);
@@ -1070,6 +1095,10 @@ var KycClient = class extends BaseClient {
1070
1095
  * );
1071
1096
  * console.log(`Found ${alerts.total} alerts`);
1072
1097
  * ```
1098
+ *
1099
+ * @remarks Console session only. This endpoint accepts a Vesant console
1100
+ * (dashboard login) token, not a tenant API key; called with an API key it
1101
+ * fails with `AuthenticationError` or a permission error.
1073
1102
  */
1074
1103
  async listAlerts(filters, pagination) {
1075
1104
  const params = {};
@@ -1116,6 +1145,10 @@ var KycClient = class extends BaseClient {
1116
1145
  * reason: "Requires senior review - suspicious documents"
1117
1146
  * });
1118
1147
  * ```
1148
+ *
1149
+ * @remarks Console session only. This endpoint accepts a Vesant console
1150
+ * (dashboard login) token, not a tenant API key; called with an API key it
1151
+ * fails with `AuthenticationError` or a permission error.
1119
1152
  */
1120
1153
  async updateAlert(alertId, update) {
1121
1154
  await this.request(`/api/v1/kyc/alerts/${alertId}`, {
@@ -1138,6 +1171,10 @@ var KycClient = class extends BaseClient {
1138
1171
  * console.log(`Face verification required: ${prefs.is_face_verification_required}`);
1139
1172
  * console.log(`Required documents: ${prefs.required_document_count}`);
1140
1173
  * ```
1174
+ *
1175
+ * @remarks Console session only. This endpoint accepts a Vesant console
1176
+ * (dashboard login) token, not a tenant API key; called with an API key it
1177
+ * fails with `AuthenticationError` or a permission error.
1141
1178
  */
1142
1179
  async getPreferences() {
1143
1180
  return this.request("/api/v1/kyc/preferences");