@verdocs/js-sdk 5.0.21 → 5.0.23

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.
package/dist/index.d.mts CHANGED
@@ -1264,6 +1264,15 @@ interface ISignerTokenResponse {
1264
1264
  * a signing session is being started, so it is included here for convenience.
1265
1265
  */
1266
1266
  recipient: IRecipient;
1267
+ /**
1268
+ * The next authentication step the recipient must perform, or null if no auth steps are needed.
1269
+ */
1270
+ auth_step: TRecipientAuthMethod | null;
1271
+ /**
1272
+ * If an authentication step must be performed, details related to it. Open-ended type to support
1273
+ * the modularity of the authentication system.
1274
+ */
1275
+ auth_details: Record<string, any> | null;
1267
1276
  }
1268
1277
  interface IInPersonLinkResponse {
1269
1278
  /** A valid Verdocs Web URL that hosts a signing experience. */
@@ -1659,7 +1668,7 @@ type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRe
1659
1668
  * Get the current KBA status. Note that this may only be called by the recipient and requires a
1660
1669
  * valid signing session to proceed. Although the Recipient object itself contains indications of
1661
1670
  * whether KBA is required, it will not contain the current status of the process. If
1662
- * `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
1671
+ * `recipient.auth_methods` is set (not empty), and `recipient.kba_completed` is false, this endpoint
1663
1672
  * should be called to determine the next KBA step required.
1664
1673
  */
1665
1674
  declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
@@ -2890,7 +2899,6 @@ declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, tem
2890
2899
  * @apiBody integer(min: 1, default: 1) sequence? Optional 1-based sequence number for the role. Roles that share the same sequence number act in parallel, and will receive invitations at the same time.
2891
2900
  * @apiBody integer(min: 1, default: 1) order? Optional 1-based order number for the role. Controls the left-to-right display order of roles at the same sequence number in the UI components e.g. `<verdocs-template-roles />`.
2892
2901
  * @apiBody boolean delegator? If true, the role may delegate their signing responsibility to another party.
2893
- * @apiBody string(enum:'pin'|'identity'|'') kba_method? Active PIN- or Identity-based KBA for the role. NOTE: Some KBA operations may incur additional fees.
2894
2902
  * @apiSuccess IRole . The newly-created role
2895
2903
  */
2896
2904
  declare const createTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, params: IRole) => Promise<IRole>;
package/dist/index.d.ts CHANGED
@@ -1264,6 +1264,15 @@ interface ISignerTokenResponse {
1264
1264
  * a signing session is being started, so it is included here for convenience.
1265
1265
  */
1266
1266
  recipient: IRecipient;
1267
+ /**
1268
+ * The next authentication step the recipient must perform, or null if no auth steps are needed.
1269
+ */
1270
+ auth_step: TRecipientAuthMethod | null;
1271
+ /**
1272
+ * If an authentication step must be performed, details related to it. Open-ended type to support
1273
+ * the modularity of the authentication system.
1274
+ */
1275
+ auth_details: Record<string, any> | null;
1267
1276
  }
1268
1277
  interface IInPersonLinkResponse {
1269
1278
  /** A valid Verdocs Web URL that hosts a signing experience. */
@@ -1659,7 +1668,7 @@ type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRe
1659
1668
  * Get the current KBA status. Note that this may only be called by the recipient and requires a
1660
1669
  * valid signing session to proceed. Although the Recipient object itself contains indications of
1661
1670
  * whether KBA is required, it will not contain the current status of the process. If
1662
- * `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
1671
+ * `recipient.auth_methods` is set (not empty), and `recipient.kba_completed` is false, this endpoint
1663
1672
  * should be called to determine the next KBA step required.
1664
1673
  */
1665
1674
  declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
@@ -2890,7 +2899,6 @@ declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, tem
2890
2899
  * @apiBody integer(min: 1, default: 1) sequence? Optional 1-based sequence number for the role. Roles that share the same sequence number act in parallel, and will receive invitations at the same time.
2891
2900
  * @apiBody integer(min: 1, default: 1) order? Optional 1-based order number for the role. Controls the left-to-right display order of roles at the same sequence number in the UI components e.g. `<verdocs-template-roles />`.
2892
2901
  * @apiBody boolean delegator? If true, the role may delegate their signing responsibility to another party.
2893
- * @apiBody string(enum:'pin'|'identity'|'') kba_method? Active PIN- or Identity-based KBA for the role. NOTE: Some KBA operations may incur additional fees.
2894
2902
  * @apiSuccess IRole . The newly-created role
2895
2903
  */
2896
2904
  declare const createTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, params: IRole) => Promise<IRole>;
package/dist/index.js CHANGED
@@ -819,12 +819,6 @@ const decodeAccessTokenBody = (token) => {
819
819
  catch (e) {
820
820
  return null;
821
821
  }
822
- Object.keys(decoded).forEach((key) => {
823
- if (typeof key === 'string' && key.startsWith('https://verdocs.com/')) {
824
- decoded[key.replace('https://verdocs.com/', '')] = decoded[key];
825
- delete decoded[key];
826
- }
827
- });
828
822
  return decoded;
829
823
  };
830
824
 
@@ -1831,7 +1825,7 @@ const createInitials = (endpoint, name, initials) => {
1831
1825
  * Get the current KBA status. Note that this may only be called by the recipient and requires a
1832
1826
  * valid signing session to proceed. Although the Recipient object itself contains indications of
1833
1827
  * whether KBA is required, it will not contain the current status of the process. If
1834
- * `recipient.kba_method` is set (not null), and `recipient.kba_completed` is false, this endpoint
1828
+ * `recipient.auth_methods` is set (not empty), and `recipient.kba_completed` is false, this endpoint
1835
1829
  * should be called to determine the next KBA step required.
1836
1830
  */
1837
1831
  const getKbaStep = (endpoint, envelope_id, role_name) => endpoint.api //
@@ -3127,7 +3121,6 @@ const userCanPreviewTemplate = (profile, template) => {
3127
3121
  * @apiBody integer(min: 1, default: 1) sequence? Optional 1-based sequence number for the role. Roles that share the same sequence number act in parallel, and will receive invitations at the same time.
3128
3122
  * @apiBody integer(min: 1, default: 1) order? Optional 1-based order number for the role. Controls the left-to-right display order of roles at the same sequence number in the UI components e.g. `<verdocs-template-roles />`.
3129
3123
  * @apiBody boolean delegator? If true, the role may delegate their signing responsibility to another party.
3130
- * @apiBody string(enum:'pin'|'identity'|'') kba_method? Active PIN- or Identity-based KBA for the role. NOTE: Some KBA operations may incur additional fees.
3131
3124
  * @apiSuccess IRole . The newly-created role
3132
3125
  */
3133
3126
  const createTemplateRole = (endpoint, template_id, params) => endpoint.api //