@vpdev2/metakyc 1.0.56 → 1.0.57

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.
@@ -1,5 +1,4 @@
1
- export interface PreCreateApplicantParams {
2
- workflowKey: string;
1
+ export interface ApplicantPreFillParams {
3
2
  firstName?: string;
4
3
  lastName?: string;
5
4
  email?: string;
@@ -17,33 +16,31 @@ export interface CreateSessionTokenParams {
17
16
  /** String client ID (non-ABP projects). Provide this OR tenantId. */
18
17
  clientId?: string;
19
18
  /**
20
- * Optional external reference ID to bind the session token to a specific user.
21
- * When set, the server enforces that all API calls made with this token
22
- * can only create/access applicants matching this externalRefId.
19
+ * Your system's unique user identifier. The server automatically creates or
20
+ * finds an applicant matching this ID, so the response always includes `applicantId`.
23
21
  */
24
- externalRefId?: string;
22
+ externalRefId: string;
25
23
  /**
26
- * Workflow key to embed in the token. When using the unified <MetaKYC /> component,
27
- * this tells the SDK which workflow to use without requiring client-side configuration.
24
+ * Workflow key for this session. Together with `externalRefId`, the server
25
+ * creates or retrieves the applicant assigned to this workflow.
28
26
  */
29
- workflowKey?: string;
27
+ workflowKey: string;
30
28
  /**
31
29
  * When true, the SDK shows the company applicant form instead of individual.
32
30
  * Embedded in the token so the SDK auto-detects the form type.
33
31
  */
34
32
  isCompany?: boolean;
35
33
  /**
36
- * Optional: pre-create a skeleton applicant during token creation.
37
- * When provided, the response includes `applicantId` which can be passed
38
- * to the SDK so the CreateApplicantForm starts pre-filled.
34
+ * Optional pre-fill data for the applicant (email, name, etc.).
35
+ * The applicant is always created; this just seeds initial field values.
39
36
  */
40
- applicant?: PreCreateApplicantParams;
37
+ applicant?: ApplicantPreFillParams;
41
38
  }
42
39
  export interface SessionTokenResult {
43
40
  accessToken: string;
44
41
  expiresInSeconds: number;
45
- /** Present when an applicant was pre-created via the `applicant` parameter. */
46
- applicantId?: number;
42
+ /** The applicant ID created/found for this externalRefId + workflowKey combination. */
43
+ applicantId: number;
47
44
  }
48
45
  /**
49
46
  * Server-side utility to create a short-lived SDK session token.
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/client/session.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,qBAAa,cAAc;WACZ,WAAW,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAwCxF"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/client/session.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,S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