vesant-sdk 1.7.1-dev.ec505dc → 1.7.1-dev.f42297f

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.
@@ -11,7 +11,11 @@ import { B as BaseClient, R as RequestOptions } from '../client-q9fN8Hhf.mjs';
11
11
  * - services/kyc-service/internal/handler/
12
12
  */
13
13
 
14
- type KycStatus = 'pending' | 'accepted' | 'declined' | 'review.pending' | 'unknown';
14
+ type KycStatus =
15
+ /** Submit link issued but the customer has not submitted documents yet — not "in progress". */
16
+ 'awaiting_kyc'
17
+ /** Documents submitted, verification in progress. */
18
+ | 'pending' | 'accepted' | 'declined' | 'review.pending' | 'unknown';
15
19
  type KycDeclinedCode = 'KYC_DOCUMENT_EXPIRED' | 'KYC_DOCUMENT_INVALID' | 'KYC_FACE_MISMATCH' | 'KYC_AGE_REQUIREMENT' | 'KYC_DUPLICATE_IDENTITY' | 'KYC_ADDRESS_MISMATCH' | 'KYC_NAME_MISMATCH' | 'KYC_PROVIDER_REJECTED' | 'KYC_DECLINED';
16
20
  declare const KYC_DECLINED_DESCRIPTIONS: Record<KycDeclinedCode, string>;
17
21
  type KycAlertStatus = 'pending' | 'in_progress' | 'resolved' | 'closed' | 'escalated';
@@ -539,17 +543,22 @@ interface KycHandoffSession {
539
543
  is_submitted: boolean;
540
544
  }
541
545
  interface CheckKycStatusRequest {
542
- /** User ID to check KYC status for */
546
+ /** Customer identifier. Sent for context only the lookup is by kyc_id. */
543
547
  user_id: string;
544
- /** Authentication token */
548
+ /** The KYC request ID returned by requestKycSubmitLink; drives the status lookup. */
545
549
  kyc_id: string;
546
550
  }
547
551
  /**
548
552
  * Response from checkKycStatus. Always returns the same shape.
549
553
  *
550
- * `additional_data` is `null` when `status === 'pending'`.
551
- * When `status !== 'pending'`, `additional_data` contains the full KYC record
552
- * including document details, proofs, and the customer's risk profile.
554
+ * `additional_data` is `null` when `status` is `'awaiting_kyc'` or `'pending'`.
555
+ * Otherwise it contains the full KYC record including document details,
556
+ * proofs, and the customer's risk profile.
557
+ *
558
+ * `status === 'awaiting_kyc'` means the submit link was issued but the
559
+ * customer has not submitted documents — treat it as "not started", never as
560
+ * "in progress". Check `link_expired`: `false` → re-surface the existing
561
+ * link; `true` → request a fresh one via `requestKycSubmitLink`.
553
562
  */
554
563
  interface CheckKycStatusResponse {
555
564
  id: string;
@@ -578,8 +587,12 @@ interface CheckKycStatusResponse {
578
587
  is_address_verification_required: boolean;
579
588
  is_age_verification_required: boolean;
580
589
  created_at: string;
581
- /** Full KYC record with document details, proofs, and risk profile. Null when status is 'pending'. */
590
+ /** Full KYC record with document details, proofs, and risk profile. Null when status is 'awaiting_kyc' or 'pending'. */
582
591
  additional_data: KycRequest | null;
592
+ /** Present when status is 'awaiting_kyc': whether the submit link has expired (request a new one when true). */
593
+ link_expired?: boolean;
594
+ /** Present when status is 'awaiting_kyc': the submit link's expiry time (RFC 3339). */
595
+ link_expires_at?: string;
583
596
  }
584
597
  interface RequestAdditionalDocumentsRequest {
585
598
  /** KYC request ID */
@@ -11,7 +11,11 @@ import { B as BaseClient, R as RequestOptions } from '../client-q9fN8Hhf.js';
11
11
  * - services/kyc-service/internal/handler/
12
12
  */
13
13
 
14
- type KycStatus = 'pending' | 'accepted' | 'declined' | 'review.pending' | 'unknown';
14
+ type KycStatus =
15
+ /** Submit link issued but the customer has not submitted documents yet — not "in progress". */
16
+ 'awaiting_kyc'
17
+ /** Documents submitted, verification in progress. */
18
+ | 'pending' | 'accepted' | 'declined' | 'review.pending' | 'unknown';
15
19
  type KycDeclinedCode = 'KYC_DOCUMENT_EXPIRED' | 'KYC_DOCUMENT_INVALID' | 'KYC_FACE_MISMATCH' | 'KYC_AGE_REQUIREMENT' | 'KYC_DUPLICATE_IDENTITY' | 'KYC_ADDRESS_MISMATCH' | 'KYC_NAME_MISMATCH' | 'KYC_PROVIDER_REJECTED' | 'KYC_DECLINED';
16
20
  declare const KYC_DECLINED_DESCRIPTIONS: Record<KycDeclinedCode, string>;
17
21
  type KycAlertStatus = 'pending' | 'in_progress' | 'resolved' | 'closed' | 'escalated';
@@ -539,17 +543,22 @@ interface KycHandoffSession {
539
543
  is_submitted: boolean;
540
544
  }
541
545
  interface CheckKycStatusRequest {
542
- /** User ID to check KYC status for */
546
+ /** Customer identifier. Sent for context only the lookup is by kyc_id. */
543
547
  user_id: string;
544
- /** Authentication token */
548
+ /** The KYC request ID returned by requestKycSubmitLink; drives the status lookup. */
545
549
  kyc_id: string;
546
550
  }
547
551
  /**
548
552
  * Response from checkKycStatus. Always returns the same shape.
549
553
  *
550
- * `additional_data` is `null` when `status === 'pending'`.
551
- * When `status !== 'pending'`, `additional_data` contains the full KYC record
552
- * including document details, proofs, and the customer's risk profile.
554
+ * `additional_data` is `null` when `status` is `'awaiting_kyc'` or `'pending'`.
555
+ * Otherwise it contains the full KYC record including document details,
556
+ * proofs, and the customer's risk profile.
557
+ *
558
+ * `status === 'awaiting_kyc'` means the submit link was issued but the
559
+ * customer has not submitted documents — treat it as "not started", never as
560
+ * "in progress". Check `link_expired`: `false` → re-surface the existing
561
+ * link; `true` → request a fresh one via `requestKycSubmitLink`.
553
562
  */
554
563
  interface CheckKycStatusResponse {
555
564
  id: string;
@@ -578,8 +587,12 @@ interface CheckKycStatusResponse {
578
587
  is_address_verification_required: boolean;
579
588
  is_age_verification_required: boolean;
580
589
  created_at: string;
581
- /** Full KYC record with document details, proofs, and risk profile. Null when status is 'pending'. */
590
+ /** Full KYC record with document details, proofs, and risk profile. Null when status is 'awaiting_kyc' or 'pending'. */
582
591
  additional_data: KycRequest | null;
592
+ /** Present when status is 'awaiting_kyc': whether the submit link has expired (request a new one when true). */
593
+ link_expired?: boolean;
594
+ /** Present when status is 'awaiting_kyc': the submit link's expiry time (RFC 3339). */
595
+ link_expires_at?: string;
583
596
  }
584
597
  interface RequestAdditionalDocumentsRequest {
585
598
  /** KYC request ID */