@verdocs/js-sdk 5.0.22 → 5.0.24

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. */
@@ -1346,6 +1355,37 @@ interface ICreateEnvelopeDirectlyRequest {
1346
1355
  followup_reminders: number;
1347
1356
  }
1348
1357
  type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelopeDirectlyRequest;
1358
+ interface IAuthenticateRecipientViaPasscodeRequest {
1359
+ auth_method: "passcode";
1360
+ code: string;
1361
+ }
1362
+ interface IAuthenticateRecipientViaEmailRequest {
1363
+ auth_method: "email";
1364
+ code: string;
1365
+ resend?: boolean;
1366
+ }
1367
+ interface IAuthenticateRecipientViaSMSRequest {
1368
+ auth_method: "sms";
1369
+ code: string;
1370
+ resend?: boolean;
1371
+ }
1372
+ interface IKBAResponse {
1373
+ type: string;
1374
+ answer: string | number;
1375
+ }
1376
+ interface IAuthenticateRecipientViaKBARequest {
1377
+ auth_method: "kba";
1378
+ first_name?: string;
1379
+ last_name?: string;
1380
+ address?: string;
1381
+ city?: string;
1382
+ state?: string;
1383
+ zip?: string;
1384
+ ssn_last_4?: string;
1385
+ dob?: string;
1386
+ responses?: IKBAResponse[];
1387
+ }
1388
+ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest | IAuthenticateRecipientViaEmailRequest | IAuthenticateRecipientViaSMSRequest | IAuthenticateRecipientViaKBARequest;
1349
1389
  /**
1350
1390
  * Create an envelope
1351
1391
  *
@@ -1659,7 +1699,7 @@ type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRe
1659
1699
  * Get the current KBA status. Note that this may only be called by the recipient and requires a
1660
1700
  * valid signing session to proceed. Although the Recipient object itself contains indications of
1661
1701
  * 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
1702
+ * `recipient.auth_methods` is set (not empty), and `recipient.kba_completed` is false, this endpoint
1663
1703
  * should be called to determine the next KBA step required.
1664
1704
  */
1665
1705
  declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
@@ -1760,6 +1800,34 @@ declare const startSigningSession: (endpoint: VerdocsEndpoint, envelope_id: stri
1760
1800
  * @apiSuccess IInPersonLinkResponse . Signing session token and envelope/recipient metadata.
1761
1801
  */
1762
1802
  declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IInPersonLinkResponse>;
1803
+ /**
1804
+ * Authenticate a signing session. All signing sessions use an invite code at a minimum, but
1805
+ * many scenarios require more robust verification of recipients so one or more verification
1806
+ * methods may be attached to each recipient. If an authentication method is enabled, the
1807
+ * signer must first accept the e-signature disclosures, then complete each verification step
1808
+ * before attempting to view/display documents, complete any fields, or submit the envelope.
1809
+ * This endpoint should be called to complete each step. If the call fails an error will be
1810
+ * thrown.
1811
+ *
1812
+ * @group Recipients
1813
+ * @api POST /v2/sign/authenticate Authenticate signing session
1814
+ * @apiParam string(enum:'passcode'|'email'|'sms'|'kba'|'id') auth_method The authentication method being completed
1815
+ * @apiParam string code? The passcode or OTP entered. Required for passcode, email, and SMS methods.
1816
+ * @apiParam boolean resend? For SMS or email methods, set to send a new code.
1817
+ * @apiParam boolean first_name? For KBA, the recipient's first name
1818
+ * @apiParam boolean last_name? For KBA, the recipient's last name
1819
+ * @apiParam boolean address? For KBA, the recipient's address
1820
+ * @apiParam boolean city? For KBA, the recipient's city
1821
+ * @apiParam boolean state? For KBA, the recipient's state
1822
+ * @apiParam boolean zip? For KBA, the recipient's zip code
1823
+ * @apiParam boolean ssn_last_4? For KBA, the last 4 digits of the recipient's SSN
1824
+ * @apiParam boolean dob? For KBA, the recipient's date of birth
1825
+ * @apiParam array(items:IKBAResponse) responses? For KBA, responses to any challenge questions presented
1826
+ * @apiSuccess string . Success message
1827
+ */
1828
+ declare const authenticateSigner: (endpoint: VerdocsEndpoint, params: TAuthenticateRecipientRequest) => Promise<{
1829
+ status: "OK";
1830
+ }>;
1763
1831
  /**
1764
1832
  * Send a delegation request.
1765
1833
  */
@@ -2890,7 +2958,6 @@ declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, tem
2890
2958
  * @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
2959
  * @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
2960
  * @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
2961
  * @apiSuccess IRole . The newly-created role
2895
2962
  */
2896
2963
  declare const createTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, params: IRole) => Promise<IRole>;
@@ -3434,4 +3501,4 @@ declare const decodeJWTBody: (token: string) => any;
3434
3501
  * the presence of the `document_id` field, which will only be present for signing sessions.
3435
3502
  */
3436
3503
  declare const decodeAccessTokenBody: (token: string) => TSession;
3437
- export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, sortFields, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
3504
+ export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, startSigningSession, getInPersonLink, authenticateSigner, sendDelegate, resendInvitation, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, sortFields, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
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. */
@@ -1346,6 +1355,37 @@ interface ICreateEnvelopeDirectlyRequest {
1346
1355
  followup_reminders: number;
1347
1356
  }
1348
1357
  type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelopeDirectlyRequest;
1358
+ interface IAuthenticateRecipientViaPasscodeRequest {
1359
+ auth_method: "passcode";
1360
+ code: string;
1361
+ }
1362
+ interface IAuthenticateRecipientViaEmailRequest {
1363
+ auth_method: "email";
1364
+ code: string;
1365
+ resend?: boolean;
1366
+ }
1367
+ interface IAuthenticateRecipientViaSMSRequest {
1368
+ auth_method: "sms";
1369
+ code: string;
1370
+ resend?: boolean;
1371
+ }
1372
+ interface IKBAResponse {
1373
+ type: string;
1374
+ answer: string | number;
1375
+ }
1376
+ interface IAuthenticateRecipientViaKBARequest {
1377
+ auth_method: "kba";
1378
+ first_name?: string;
1379
+ last_name?: string;
1380
+ address?: string;
1381
+ city?: string;
1382
+ state?: string;
1383
+ zip?: string;
1384
+ ssn_last_4?: string;
1385
+ dob?: string;
1386
+ responses?: IKBAResponse[];
1387
+ }
1388
+ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest | IAuthenticateRecipientViaEmailRequest | IAuthenticateRecipientViaSMSRequest | IAuthenticateRecipientViaKBARequest;
1349
1389
  /**
1350
1390
  * Create an envelope
1351
1391
  *
@@ -1659,7 +1699,7 @@ type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRe
1659
1699
  * Get the current KBA status. Note that this may only be called by the recipient and requires a
1660
1700
  * valid signing session to proceed. Although the Recipient object itself contains indications of
1661
1701
  * 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
1702
+ * `recipient.auth_methods` is set (not empty), and `recipient.kba_completed` is false, this endpoint
1663
1703
  * should be called to determine the next KBA step required.
1664
1704
  */
1665
1705
  declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
@@ -1760,6 +1800,34 @@ declare const startSigningSession: (endpoint: VerdocsEndpoint, envelope_id: stri
1760
1800
  * @apiSuccess IInPersonLinkResponse . Signing session token and envelope/recipient metadata.
1761
1801
  */
1762
1802
  declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IInPersonLinkResponse>;
1803
+ /**
1804
+ * Authenticate a signing session. All signing sessions use an invite code at a minimum, but
1805
+ * many scenarios require more robust verification of recipients so one or more verification
1806
+ * methods may be attached to each recipient. If an authentication method is enabled, the
1807
+ * signer must first accept the e-signature disclosures, then complete each verification step
1808
+ * before attempting to view/display documents, complete any fields, or submit the envelope.
1809
+ * This endpoint should be called to complete each step. If the call fails an error will be
1810
+ * thrown.
1811
+ *
1812
+ * @group Recipients
1813
+ * @api POST /v2/sign/authenticate Authenticate signing session
1814
+ * @apiParam string(enum:'passcode'|'email'|'sms'|'kba'|'id') auth_method The authentication method being completed
1815
+ * @apiParam string code? The passcode or OTP entered. Required for passcode, email, and SMS methods.
1816
+ * @apiParam boolean resend? For SMS or email methods, set to send a new code.
1817
+ * @apiParam boolean first_name? For KBA, the recipient's first name
1818
+ * @apiParam boolean last_name? For KBA, the recipient's last name
1819
+ * @apiParam boolean address? For KBA, the recipient's address
1820
+ * @apiParam boolean city? For KBA, the recipient's city
1821
+ * @apiParam boolean state? For KBA, the recipient's state
1822
+ * @apiParam boolean zip? For KBA, the recipient's zip code
1823
+ * @apiParam boolean ssn_last_4? For KBA, the last 4 digits of the recipient's SSN
1824
+ * @apiParam boolean dob? For KBA, the recipient's date of birth
1825
+ * @apiParam array(items:IKBAResponse) responses? For KBA, responses to any challenge questions presented
1826
+ * @apiSuccess string . Success message
1827
+ */
1828
+ declare const authenticateSigner: (endpoint: VerdocsEndpoint, params: TAuthenticateRecipientRequest) => Promise<{
1829
+ status: "OK";
1830
+ }>;
1763
1831
  /**
1764
1832
  * Send a delegation request.
1765
1833
  */
@@ -2890,7 +2958,6 @@ declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, tem
2890
2958
  * @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
2959
  * @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
2960
  * @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
2961
  * @apiSuccess IRole . The newly-created role
2895
2962
  */
2896
2963
  declare const createTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, params: IRole) => Promise<IRole>;
@@ -3434,4 +3501,4 @@ declare const decodeJWTBody: (token: string) => any;
3434
3501
  * the presence of the `document_id` field, which will only be present for signing sessions.
3435
3502
  */
3436
3503
  declare const decodeAccessTokenBody: (token: string) => TSession;
3437
- export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, sortFields, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
3504
+ export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, startSigningSession, getInPersonLink, authenticateSigner, sendDelegate, resendInvitation, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, sortFields, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
package/dist/index.js CHANGED
@@ -1825,7 +1825,7 @@ const createInitials = (endpoint, name, initials) => {
1825
1825
  * Get the current KBA status. Note that this may only be called by the recipient and requires a
1826
1826
  * valid signing session to proceed. Although the Recipient object itself contains indications of
1827
1827
  * whether KBA is required, it will not contain the current status of the process. If
1828
- * `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
1829
1829
  * should be called to determine the next KBA step required.
1830
1830
  */
1831
1831
  const getKbaStep = (endpoint, envelope_id, role_name) => endpoint.api //
@@ -1932,6 +1932,34 @@ const startSigningSession = async (endpoint, envelope_id, role_name, key) => {
1932
1932
  const getInPersonLink = (endpoint, envelope_id, role_name) => endpoint.api //
1933
1933
  .post(`/v2/sign/in-person/${envelope_id}/${encodeURIComponent(role_name)}`)
1934
1934
  .then((r) => r.data);
1935
+ /**
1936
+ * Authenticate a signing session. All signing sessions use an invite code at a minimum, but
1937
+ * many scenarios require more robust verification of recipients so one or more verification
1938
+ * methods may be attached to each recipient. If an authentication method is enabled, the
1939
+ * signer must first accept the e-signature disclosures, then complete each verification step
1940
+ * before attempting to view/display documents, complete any fields, or submit the envelope.
1941
+ * This endpoint should be called to complete each step. If the call fails an error will be
1942
+ * thrown.
1943
+ *
1944
+ * @group Recipients
1945
+ * @api POST /v2/sign/authenticate Authenticate signing session
1946
+ * @apiParam string(enum:'passcode'|'email'|'sms'|'kba'|'id') auth_method The authentication method being completed
1947
+ * @apiParam string code? The passcode or OTP entered. Required for passcode, email, and SMS methods.
1948
+ * @apiParam boolean resend? For SMS or email methods, set to send a new code.
1949
+ * @apiParam boolean first_name? For KBA, the recipient's first name
1950
+ * @apiParam boolean last_name? For KBA, the recipient's last name
1951
+ * @apiParam boolean address? For KBA, the recipient's address
1952
+ * @apiParam boolean city? For KBA, the recipient's city
1953
+ * @apiParam boolean state? For KBA, the recipient's state
1954
+ * @apiParam boolean zip? For KBA, the recipient's zip code
1955
+ * @apiParam boolean ssn_last_4? For KBA, the last 4 digits of the recipient's SSN
1956
+ * @apiParam boolean dob? For KBA, the recipient's date of birth
1957
+ * @apiParam array(items:IKBAResponse) responses? For KBA, responses to any challenge questions presented
1958
+ * @apiSuccess string . Success message
1959
+ */
1960
+ const authenticateSigner = (endpoint, params) => endpoint.api //
1961
+ .post(`/v2/sign/authenticate`)
1962
+ .then((r) => r.data);
1935
1963
  /**
1936
1964
  * Send a delegation request.
1937
1965
  */
@@ -3121,7 +3149,6 @@ const userCanPreviewTemplate = (profile, template) => {
3121
3149
  * @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.
3122
3150
  * @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 />`.
3123
3151
  * @apiBody boolean delegator? If true, the role may delegate their signing responsibility to another party.
3124
- * @apiBody string(enum:'pin'|'identity'|'') kba_method? Active PIN- or Identity-based KBA for the role. NOTE: Some KBA operations may incur additional fees.
3125
3152
  * @apiSuccess IRole . The newly-created role
3126
3153
  */
3127
3154
  const createTemplateRole = (endpoint, template_id, params) => endpoint.api //
@@ -3587,6 +3614,7 @@ exports.acceptOrganizationInvitation = acceptOrganizationInvitation;
3587
3614
  exports.addGroupMember = addGroupMember;
3588
3615
  exports.addTemplateTag = addTemplateTag;
3589
3616
  exports.authenticate = authenticate;
3617
+ exports.authenticateSigner = authenticateSigner;
3590
3618
  exports.blobToBase64 = blobToBase64;
3591
3619
  exports.canPerformTemplateAction = canPerformTemplateAction;
3592
3620
  exports.cancelEnvelope = cancelEnvelope;