@verdocs/js-sdk 4.2.18 → 4.2.20

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
@@ -151,7 +151,6 @@ interface ISigningSession {
151
151
  iss: string;
152
152
  sub: string; // Verdocs access key ID
153
153
  email: string;
154
- email_verified: boolean;
155
154
  iat: number;
156
155
  exp: number;
157
156
  "https://verdocs.com/session_type": "signing";
@@ -166,7 +165,6 @@ interface IUserSession {
166
165
  iss: string;
167
166
  sub: string; // Auth0 user_id
168
167
  email: string;
169
- email_verified: boolean;
170
168
  iat: number;
171
169
  exp: number;
172
170
  "https://verdocs.com/session_type": "user";
@@ -178,7 +176,6 @@ interface IIdToken {
178
176
  iss: string;
179
177
  sub: string; // Auth0 user_id
180
178
  email: string;
181
- email_verified: boolean;
182
179
  organization_id: string;
183
180
  first_name: string;
184
181
  last_name: string;
@@ -1728,6 +1725,13 @@ declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params:
1728
1725
  name: string;
1729
1726
  permissions: TPermission[];
1730
1727
  }) => Promise<any>;
1728
+ interface ICreateProfileRequest {
1729
+ email: string;
1730
+ password: string;
1731
+ first_name: string;
1732
+ last_name: string;
1733
+ org_name: string;
1734
+ }
1731
1735
  interface IUpdateProfileRequest {
1732
1736
  first_name?: string;
1733
1737
  last_name?: string;
@@ -1744,21 +1748,23 @@ interface IAuthenticateResponse {
1744
1748
  access_token_exp: number;
1745
1749
  refresh_token_exp: number;
1746
1750
  }
1747
- interface IUpdatePasswordRequest {
1751
+ interface IChangePasswordRequest {
1748
1752
  old_password: string;
1749
1753
  new_password: string;
1750
1754
  }
1751
- interface IUpdatePasswordResponse {
1755
+ interface IChangePasswordResponse {
1752
1756
  status: TRequestStatus;
1753
- /** Success or failure message */
1754
1757
  message: string;
1755
1758
  }
1756
- interface ICreateAccountRequest {
1759
+ interface IResetPasswordRequest {
1757
1760
  email: string;
1758
- password: string;
1759
- first_name: string;
1760
- last_name: string;
1761
- org_name: string;
1761
+ }
1762
+ interface IResetPasswordResponse {
1763
+ status: "OK";
1764
+ }
1765
+ interface IVerifyEmailRequest {
1766
+ email: string;
1767
+ token: string;
1762
1768
  }
1763
1769
  interface IROPCRequest {
1764
1770
  grant_type: "password";
@@ -1819,7 +1825,7 @@ declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) =>
1819
1825
  * }
1820
1826
  * ```
1821
1827
  */
1822
- declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<IUpdatePasswordResponse>;
1828
+ declare const changePassword: (endpoint: VerdocsEndpoint, params: IChangePasswordRequest) => Promise<IChangePasswordResponse>;
1823
1829
  /**
1824
1830
  * Request a password reset, when the old password is not known (typically in login forms).
1825
1831
  *
@@ -1853,6 +1859,20 @@ declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
1853
1859
  declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
1854
1860
  result: "done";
1855
1861
  }>;
1862
+ /**
1863
+ * Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
1864
+ * a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
1865
+ * the access token to be used may be passed directly as a parameter here. This avoids the need to set it as the
1866
+ * active token on an endpoint, which may be inconvenient in workflows where it is preferable to keep the user in
1867
+ * "anonymous" mode while verification is being performed.
1868
+ *
1869
+ * ```typescript
1870
+ * import {resendVerification} from '@verdocs/js-sdk';
1871
+ *
1872
+ * const result = await resendVerification();
1873
+ * ```
1874
+ */
1875
+ declare const verifyPassword: (endpoint: VerdocsEndpoint, params: IVerifyEmailRequest) => Promise<IAuthenticateResponse>;
1856
1876
  declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
1857
1877
  /**
1858
1878
  * Get the user's available profiles. The current profile will be marked with `current: true`.
@@ -1944,7 +1964,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
1944
1964
  * });
1945
1965
  * ```
1946
1966
  */
1947
- declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountRequest) => Promise<IAuthenticateResponse>;
1967
+ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileRequest) => Promise<IAuthenticateResponse>;
1948
1968
  /**
1949
1969
  * Update the caller's profile photo. This can only be called for the user's "current" profile.
1950
1970
  *
@@ -2709,4 +2729,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
2709
2729
  declare const isValidPhone: (phone: string | undefined) => boolean;
2710
2730
  declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
2711
2731
  declare const isValidTag: (value: string, tags: string[]) => boolean;
2712
- export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, 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, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, 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, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, IUpdateProfileRequest, IAuthenticateResponse, IUpdatePasswordRequest, IUpdatePasswordResponse, ICreateAccountRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
2732
+ export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, 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, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, 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, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyPassword, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
package/dist/index.d.ts CHANGED
@@ -151,7 +151,6 @@ interface ISigningSession {
151
151
  iss: string;
152
152
  sub: string; // Verdocs access key ID
153
153
  email: string;
154
- email_verified: boolean;
155
154
  iat: number;
156
155
  exp: number;
157
156
  "https://verdocs.com/session_type": "signing";
@@ -166,7 +165,6 @@ interface IUserSession {
166
165
  iss: string;
167
166
  sub: string; // Auth0 user_id
168
167
  email: string;
169
- email_verified: boolean;
170
168
  iat: number;
171
169
  exp: number;
172
170
  "https://verdocs.com/session_type": "user";
@@ -178,7 +176,6 @@ interface IIdToken {
178
176
  iss: string;
179
177
  sub: string; // Auth0 user_id
180
178
  email: string;
181
- email_verified: boolean;
182
179
  organization_id: string;
183
180
  first_name: string;
184
181
  last_name: string;
@@ -1728,6 +1725,13 @@ declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params:
1728
1725
  name: string;
1729
1726
  permissions: TPermission[];
1730
1727
  }) => Promise<any>;
1728
+ interface ICreateProfileRequest {
1729
+ email: string;
1730
+ password: string;
1731
+ first_name: string;
1732
+ last_name: string;
1733
+ org_name: string;
1734
+ }
1731
1735
  interface IUpdateProfileRequest {
1732
1736
  first_name?: string;
1733
1737
  last_name?: string;
@@ -1744,21 +1748,23 @@ interface IAuthenticateResponse {
1744
1748
  access_token_exp: number;
1745
1749
  refresh_token_exp: number;
1746
1750
  }
1747
- interface IUpdatePasswordRequest {
1751
+ interface IChangePasswordRequest {
1748
1752
  old_password: string;
1749
1753
  new_password: string;
1750
1754
  }
1751
- interface IUpdatePasswordResponse {
1755
+ interface IChangePasswordResponse {
1752
1756
  status: TRequestStatus;
1753
- /** Success or failure message */
1754
1757
  message: string;
1755
1758
  }
1756
- interface ICreateAccountRequest {
1759
+ interface IResetPasswordRequest {
1757
1760
  email: string;
1758
- password: string;
1759
- first_name: string;
1760
- last_name: string;
1761
- org_name: string;
1761
+ }
1762
+ interface IResetPasswordResponse {
1763
+ status: "OK";
1764
+ }
1765
+ interface IVerifyEmailRequest {
1766
+ email: string;
1767
+ token: string;
1762
1768
  }
1763
1769
  interface IROPCRequest {
1764
1770
  grant_type: "password";
@@ -1819,7 +1825,7 @@ declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) =>
1819
1825
  * }
1820
1826
  * ```
1821
1827
  */
1822
- declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<IUpdatePasswordResponse>;
1828
+ declare const changePassword: (endpoint: VerdocsEndpoint, params: IChangePasswordRequest) => Promise<IChangePasswordResponse>;
1823
1829
  /**
1824
1830
  * Request a password reset, when the old password is not known (typically in login forms).
1825
1831
  *
@@ -1853,6 +1859,20 @@ declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
1853
1859
  declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
1854
1860
  result: "done";
1855
1861
  }>;
1862
+ /**
1863
+ * Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
1864
+ * a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
1865
+ * the access token to be used may be passed directly as a parameter here. This avoids the need to set it as the
1866
+ * active token on an endpoint, which may be inconvenient in workflows where it is preferable to keep the user in
1867
+ * "anonymous" mode while verification is being performed.
1868
+ *
1869
+ * ```typescript
1870
+ * import {resendVerification} from '@verdocs/js-sdk';
1871
+ *
1872
+ * const result = await resendVerification();
1873
+ * ```
1874
+ */
1875
+ declare const verifyPassword: (endpoint: VerdocsEndpoint, params: IVerifyEmailRequest) => Promise<IAuthenticateResponse>;
1856
1876
  declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
1857
1877
  /**
1858
1878
  * Get the user's available profiles. The current profile will be marked with `current: true`.
@@ -1944,7 +1964,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
1944
1964
  * });
1945
1965
  * ```
1946
1966
  */
1947
- declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountRequest) => Promise<IAuthenticateResponse>;
1967
+ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileRequest) => Promise<IAuthenticateResponse>;
1948
1968
  /**
1949
1969
  * Update the caller's profile photo. This can only be called for the user's "current" profile.
1950
1970
  *
@@ -2709,4 +2729,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
2709
2729
  declare const isValidPhone: (phone: string | undefined) => boolean;
2710
2730
  declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
2711
2731
  declare const isValidTag: (value: string, tags: string[]) => boolean;
2712
- export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, 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, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, 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, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, IUpdateProfileRequest, IAuthenticateResponse, IUpdatePasswordRequest, IUpdatePasswordResponse, ICreateAccountRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
2732
+ export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, 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, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, 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, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyPassword, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
package/dist/index.js CHANGED
@@ -870,6 +870,22 @@ const resetPassword = (endpoint, params) => endpoint.api //
870
870
  const resendVerification = (endpoint, accessToken) => endpoint.api //
871
871
  .post('/v2/users/resend-verification', {}, accessToken ? { headers: { Authorization: `Bearer ${accessToken}` } } : {})
872
872
  .then((r) => r.data);
873
+ /**
874
+ * Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
875
+ * a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
876
+ * the access token to be used may be passed directly as a parameter here. This avoids the need to set it as the
877
+ * active token on an endpoint, which may be inconvenient in workflows where it is preferable to keep the user in
878
+ * "anonymous" mode while verification is being performed.
879
+ *
880
+ * ```typescript
881
+ * import {resendVerification} from '@verdocs/js-sdk';
882
+ *
883
+ * const result = await resendVerification();
884
+ * ```
885
+ */
886
+ const verifyPassword = (endpoint, params) => endpoint.api //
887
+ .post('/v2/users/verify', params)
888
+ .then((r) => r.data);
873
889
 
874
890
  const getNotifications = async (endpoint) => endpoint.api //
875
891
  .get('/v2/notifications')
@@ -3041,4 +3057,5 @@ exports.userHasSharedTemplate = userHasSharedTemplate;
3041
3057
  exports.userIsEnvelopeOwner = userIsEnvelopeOwner;
3042
3058
  exports.userIsEnvelopeRecipient = userIsEnvelopeRecipient;
3043
3059
  exports.userIsTemplateCreator = userIsTemplateCreator;
3060
+ exports.verifyPassword = verifyPassword;
3044
3061
  //# sourceMappingURL=index.js.map