vesant-sdk 1.7.0-dev.b7f5c17 → 1.7.0-dev.c2e85f3

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.
@@ -318,7 +318,14 @@ interface RequestKycSubmitLinkRequest {
318
318
  redirect_url?: string;
319
319
  /** URL to receive callback notifications via POST request when KYC status changes (optional) */
320
320
  callback_url?: string;
321
- /** Event that triggered the KYC request (e.g. "onboarding", "login", "transaction") */
321
+ /**
322
+ * Event that triggered the KYC request. Valid values: "onboarding",
323
+ * "first_withdrawal", "first_purchase", "manual". The tenant's KYC
324
+ * verification trigger preferences decide, per event, whether KYC is
325
+ * required (`kyc_required` in the response). "manual" always requires
326
+ * KYC and honors the tenant's allow-skip-on-manual option (`can_skip`).
327
+ * Omitted or unknown values default to KYC required with no skip.
328
+ */
322
329
  trigger_event?: string;
323
330
  }
324
331
  /**
@@ -389,6 +396,19 @@ interface RequestKycSubmitLinkResponse {
389
396
  link: string;
390
397
  /** KYC request ID */
391
398
  kyc_id: string;
399
+ /**
400
+ * Whether KYC is required for the reported `trigger_event`, per the
401
+ * tenant's verification trigger preferences. `false` when the trigger
402
+ * is disabled for the tenant, or when the customer is already verified
403
+ * (in that case `link` and `kyc_id` are empty).
404
+ */
405
+ kyc_required: boolean;
406
+ /**
407
+ * Whether the user may skip verification. Only `true` for
408
+ * `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
409
+ * or when the customer is already verified.
410
+ */
411
+ can_skip: boolean;
392
412
  }
393
413
  /** Device class detected by the SDK (purely client-side — server doesn't care). */
394
414
  type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
@@ -798,7 +818,7 @@ declare class KycClient extends BaseClient {
798
818
  * @example
799
819
  * ```typescript
800
820
  * const result = await client.submitVerification({
801
- * reference: "customer_123",
821
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
802
822
  * email: "customer@example.com",
803
823
  * country: "US",
804
824
  * document: {
@@ -824,7 +844,7 @@ declare class KycClient extends BaseClient {
824
844
  *
825
845
  * @example
826
846
  * ```typescript
827
- * const kyc = await client.getKycRequest("kyc_abc123");
847
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
828
848
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
829
849
  * ```
830
850
  */
@@ -877,7 +897,7 @@ declare class KycClient extends BaseClient {
877
897
  * @example
878
898
  * ```typescript
879
899
  * await client.requestAdditionalDocuments({
880
- * id: "kyc_abc123",
900
+ * id: "550e8400-e29b-41d4-a716-446655440000",
881
901
  * document_types: ["address", "document_two"],
882
902
  * message: "Please provide proof of address and secondary ID"
883
903
  * });
@@ -892,7 +912,7 @@ declare class KycClient extends BaseClient {
892
912
  *
893
913
  * @example
894
914
  * ```typescript
895
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
915
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
896
916
  * proofs.forEach(proof => {
897
917
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
898
918
  * });
@@ -318,7 +318,14 @@ interface RequestKycSubmitLinkRequest {
318
318
  redirect_url?: string;
319
319
  /** URL to receive callback notifications via POST request when KYC status changes (optional) */
320
320
  callback_url?: string;
321
- /** Event that triggered the KYC request (e.g. "onboarding", "login", "transaction") */
321
+ /**
322
+ * Event that triggered the KYC request. Valid values: "onboarding",
323
+ * "first_withdrawal", "first_purchase", "manual". The tenant's KYC
324
+ * verification trigger preferences decide, per event, whether KYC is
325
+ * required (`kyc_required` in the response). "manual" always requires
326
+ * KYC and honors the tenant's allow-skip-on-manual option (`can_skip`).
327
+ * Omitted or unknown values default to KYC required with no skip.
328
+ */
322
329
  trigger_event?: string;
323
330
  }
324
331
  /**
@@ -389,6 +396,19 @@ interface RequestKycSubmitLinkResponse {
389
396
  link: string;
390
397
  /** KYC request ID */
391
398
  kyc_id: string;
399
+ /**
400
+ * Whether KYC is required for the reported `trigger_event`, per the
401
+ * tenant's verification trigger preferences. `false` when the trigger
402
+ * is disabled for the tenant, or when the customer is already verified
403
+ * (in that case `link` and `kyc_id` are empty).
404
+ */
405
+ kyc_required: boolean;
406
+ /**
407
+ * Whether the user may skip verification. Only `true` for
408
+ * `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
409
+ * or when the customer is already verified.
410
+ */
411
+ can_skip: boolean;
392
412
  }
393
413
  /** Device class detected by the SDK (purely client-side — server doesn't care). */
394
414
  type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
@@ -798,7 +818,7 @@ declare class KycClient extends BaseClient {
798
818
  * @example
799
819
  * ```typescript
800
820
  * const result = await client.submitVerification({
801
- * reference: "customer_123",
821
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
802
822
  * email: "customer@example.com",
803
823
  * country: "US",
804
824
  * document: {
@@ -824,7 +844,7 @@ declare class KycClient extends BaseClient {
824
844
  *
825
845
  * @example
826
846
  * ```typescript
827
- * const kyc = await client.getKycRequest("kyc_abc123");
847
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
828
848
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
829
849
  * ```
830
850
  */
@@ -877,7 +897,7 @@ declare class KycClient extends BaseClient {
877
897
  * @example
878
898
  * ```typescript
879
899
  * await client.requestAdditionalDocuments({
880
- * id: "kyc_abc123",
900
+ * id: "550e8400-e29b-41d4-a716-446655440000",
881
901
  * document_types: ["address", "document_two"],
882
902
  * message: "Please provide proof of address and secondary ID"
883
903
  * });
@@ -892,7 +912,7 @@ declare class KycClient extends BaseClient {
892
912
  *
893
913
  * @example
894
914
  * ```typescript
895
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
915
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
896
916
  * proofs.forEach(proof => {
897
917
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
898
918
  * });
package/dist/kyc/index.js CHANGED
@@ -760,7 +760,7 @@ var KycClient = class extends BaseClient {
760
760
  * @example
761
761
  * ```typescript
762
762
  * const result = await client.submitVerification({
763
- * reference: "customer_123",
763
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
764
764
  * email: "customer@example.com",
765
765
  * country: "US",
766
766
  * document: {
@@ -792,7 +792,7 @@ var KycClient = class extends BaseClient {
792
792
  *
793
793
  * @example
794
794
  * ```typescript
795
- * const kyc = await client.getKycRequest("kyc_abc123");
795
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
796
796
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
797
797
  * ```
798
798
  */
@@ -867,7 +867,7 @@ var KycClient = class extends BaseClient {
867
867
  * @example
868
868
  * ```typescript
869
869
  * await client.requestAdditionalDocuments({
870
- * id: "kyc_abc123",
870
+ * id: "550e8400-e29b-41d4-a716-446655440000",
871
871
  * document_types: ["address", "document_two"],
872
872
  * message: "Please provide proof of address and secondary ID"
873
873
  * });
@@ -888,7 +888,7 @@ var KycClient = class extends BaseClient {
888
888
  *
889
889
  * @example
890
890
  * ```typescript
891
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
891
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
892
892
  * proofs.forEach(proof => {
893
893
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
894
894
  * });