@verdocs/js-sdk 4.1.3 → 4.1.4
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 +47 -42
- package/dist/index.d.ts +47 -42
- package/dist/index.js +23 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -37
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1619,7 +1619,7 @@ declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint, params:
|
|
|
1619
1619
|
declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1620
1620
|
declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IOrganizationInvitation>;
|
|
1621
1621
|
declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1622
|
-
declare const
|
|
1622
|
+
declare const getOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IOrganizationInvitation>;
|
|
1623
1623
|
declare const acceptOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IProfile>;
|
|
1624
1624
|
declare const declineOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<{
|
|
1625
1625
|
status: "OK";
|
|
@@ -2322,9 +2322,11 @@ interface ICreateProfileRequest {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
interface ISwitchProfileResponse {
|
|
2324
2324
|
profile: IProfile;
|
|
2325
|
-
idToken: string;
|
|
2326
2325
|
accessToken: string;
|
|
2326
|
+
idToken: string;
|
|
2327
2327
|
refreshToken: string;
|
|
2328
|
+
accessTokenExp: number;
|
|
2329
|
+
refreshTokenExp: number;
|
|
2328
2330
|
}
|
|
2329
2331
|
interface IUpdateProfileRequest {
|
|
2330
2332
|
first_name?: string;
|
|
@@ -2334,25 +2336,20 @@ interface IUpdateProfileRequest {
|
|
|
2334
2336
|
permissions?: TPermission[];
|
|
2335
2337
|
roles?: TRole[];
|
|
2336
2338
|
}
|
|
2337
|
-
interface IAuthenticateUserRequest {
|
|
2338
|
-
username: string;
|
|
2339
|
-
password: string;
|
|
2340
|
-
}
|
|
2341
|
-
interface IAuthenticateAppRequest {
|
|
2342
|
-
client_id: string;
|
|
2343
|
-
client_secret: string;
|
|
2344
|
-
}
|
|
2345
2339
|
interface IAuthenticateResponse {
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2340
|
+
access_token: string;
|
|
2341
|
+
id_token: string;
|
|
2342
|
+
refresh_token: string;
|
|
2343
|
+
expires_in: number;
|
|
2344
|
+
access_token_exp: number;
|
|
2345
|
+
refresh_token_exp: number;
|
|
2349
2346
|
}
|
|
2350
2347
|
interface IUpdatePasswordRequest {
|
|
2351
2348
|
email: string;
|
|
2352
2349
|
oldPassword: string;
|
|
2353
2350
|
newPassword: string;
|
|
2354
2351
|
}
|
|
2355
|
-
interface
|
|
2352
|
+
interface IUpdatePasswordResponse {
|
|
2356
2353
|
status: TRequestStatus;
|
|
2357
2354
|
/** Success or failure message */
|
|
2358
2355
|
message: string;
|
|
@@ -2364,34 +2361,42 @@ interface ICreateAccountRequest {
|
|
|
2364
2361
|
lastName: string;
|
|
2365
2362
|
orgName: string;
|
|
2366
2363
|
}
|
|
2364
|
+
interface IROPCRequest {
|
|
2365
|
+
grant_type: "password";
|
|
2366
|
+
username: string;
|
|
2367
|
+
password: string;
|
|
2368
|
+
client_id?: string;
|
|
2369
|
+
scope?: string;
|
|
2370
|
+
}
|
|
2371
|
+
interface IClientCredentialsRequest {
|
|
2372
|
+
grant_type: "client_credentials";
|
|
2373
|
+
client_id: string;
|
|
2374
|
+
client_secret: string;
|
|
2375
|
+
scope?: string;
|
|
2376
|
+
}
|
|
2377
|
+
interface IRefreshTokenRequest {
|
|
2378
|
+
grant_type: "refresh_token";
|
|
2379
|
+
refresh_token: string;
|
|
2380
|
+
client_id?: string;
|
|
2381
|
+
scope?: string;
|
|
2382
|
+
}
|
|
2383
|
+
type TAuthenticationRequest = IROPCRequest | IClientCredentialsRequest | IRefreshTokenRequest;
|
|
2367
2384
|
/**
|
|
2368
|
-
* Authenticate to Verdocs
|
|
2385
|
+
* Authenticate to Verdocs.
|
|
2369
2386
|
*
|
|
2370
2387
|
* ```typescript
|
|
2371
|
-
* import {
|
|
2372
|
-
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
2388
|
+
* import {authenticate, VerdocsEndpoint} from '@verdocs/js-sdk';
|
|
2373
2389
|
*
|
|
2374
|
-
*
|
|
2375
|
-
*
|
|
2376
|
-
*
|
|
2377
|
-
*/
|
|
2378
|
-
declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticateUserRequest) => Promise<IAuthenticateResponse>;
|
|
2379
|
-
/**
|
|
2380
|
-
* Authenticate to Verdocs via client ID / Secret authentication. **NOTE: This is only suitable for
|
|
2381
|
-
* NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
|
|
2382
|
-
* that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
|
|
2383
|
-
* hours. This expiration may change based on future security needs. Application developers are encouraged
|
|
2384
|
-
* to check the `exp` expiration field in the response, and renew tokens after they expire.
|
|
2390
|
+
* // Client-side call, suitable for Web and mobile apps:
|
|
2391
|
+
* const {access_token} = await Auth.authenticate({ username: 'test@test.com', password: 'PASSWORD', grant_type:'password' });
|
|
2392
|
+
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
2385
2393
|
*
|
|
2386
|
-
*
|
|
2387
|
-
*
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2390
|
-
* const {accessToken} = await Auth.authenticateApp({ client_id: 'CLIENTID', client_secret: 'SECRET' });
|
|
2391
|
-
* Transport.setAuthToken(accessToken);
|
|
2394
|
+
* // Server-side call, suitable for server apps. NEVER EXPOSE client_secret IN FRONT-END CODE:
|
|
2395
|
+
* const {access_token} = await Auth.authenticate({ client_id: '...', client_secret: '...', grant_type:'client_credentials' });
|
|
2396
|
+
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
2392
2397
|
* ```
|
|
2393
2398
|
*/
|
|
2394
|
-
declare const
|
|
2399
|
+
declare const authenticate: (endpoint: VerdocsEndpoint, params: TAuthenticationRequest) => Promise<IAuthenticateResponse>;
|
|
2395
2400
|
/**
|
|
2396
2401
|
* If called before the session expires, this will refresh the caller's session and tokens.
|
|
2397
2402
|
*
|
|
@@ -2403,27 +2408,27 @@ declare const authenticateApp: (endpoint: VerdocsEndpoint, params: IAuthenticate
|
|
|
2403
2408
|
* Transport.setAuthToken(accessToken);
|
|
2404
2409
|
* ```
|
|
2405
2410
|
*/
|
|
2406
|
-
declare const
|
|
2411
|
+
declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) => Promise<IAuthenticateResponse>;
|
|
2407
2412
|
/**
|
|
2408
2413
|
* Update the caller's password when the old password is known (typically for logged-in users).
|
|
2409
2414
|
*
|
|
2410
2415
|
* ```typescript
|
|
2411
|
-
* import {
|
|
2416
|
+
* import {changePassword} from '@verdocs/js-sdk/Auth';
|
|
2412
2417
|
*
|
|
2413
|
-
* const {status, message} = await
|
|
2418
|
+
* const {status, message} = await changePassword({ email, oldPassword, newPassword });
|
|
2414
2419
|
* if (status !== 'OK') {
|
|
2415
2420
|
* window.alert(`Password reset error: ${message}`);
|
|
2416
2421
|
* }
|
|
2417
2422
|
* ```
|
|
2418
2423
|
*/
|
|
2419
|
-
declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<
|
|
2424
|
+
declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<IUpdatePasswordResponse>;
|
|
2420
2425
|
/**
|
|
2421
2426
|
* Request a password reset, when the old password is not known (typically in login forms).
|
|
2422
2427
|
*
|
|
2423
2428
|
* ```typescript
|
|
2424
|
-
* import {
|
|
2429
|
+
* import {resetPassword} from '@verdocs/js-sdk/Auth';
|
|
2425
2430
|
*
|
|
2426
|
-
* const {success} = await
|
|
2431
|
+
* const {success} = await resetPassword({ email });
|
|
2427
2432
|
* if (status !== 'OK') {
|
|
2428
2433
|
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
|
2429
2434
|
* }
|
|
@@ -2552,4 +2557,4 @@ interface ISignupSurvey {
|
|
|
2552
2557
|
declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
|
|
2553
2558
|
status: "OK";
|
|
2554
2559
|
}>;
|
|
2555
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TRole, TSortTemplateBy, TAccessKeyType, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, IActivityEntry, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, IEnvelopeSearchParams, searchEnvelopes, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, throttledGetEnvelope, ITimeRange, IListEnvelopesParams, listEnvelopes, getEnvelopesByTemplateId, createInitials, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResultEntry, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummary, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, TEnvelopePermission, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation,
|
|
2560
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TRole, TSortTemplateBy, TAccessKeyType, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, IActivityEntry, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, IEnvelopeSearchParams, searchEnvelopes, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, throttledGetEnvelope, ITimeRange, IListEnvelopesParams, listEnvelopes, getEnvelopesByTemplateId, createInitials, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResultEntry, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummary, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, TEnvelopePermission, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization, createOrganization, deleteOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, 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, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, getTemplateOwnerInfo, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, createTemplatev2, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, getTemplatesSummary, throttledGetTemplate, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSummary, ITemplateSearchParams, ITemplateSummaries, ITemplateTag, ITag, IStar, ITemplateOwnerInfo, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, getNotifications, getProfiles, getCurrentProfile, createProfile, getProfile, switchProfile, updateProfile, deleteProfile, createAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1619,7 +1619,7 @@ declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint, params:
|
|
|
1619
1619
|
declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1620
1620
|
declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IOrganizationInvitation>;
|
|
1621
1621
|
declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
|
|
1622
|
-
declare const
|
|
1622
|
+
declare const getOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IOrganizationInvitation>;
|
|
1623
1623
|
declare const acceptOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IProfile>;
|
|
1624
1624
|
declare const declineOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<{
|
|
1625
1625
|
status: "OK";
|
|
@@ -2322,9 +2322,11 @@ interface ICreateProfileRequest {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
interface ISwitchProfileResponse {
|
|
2324
2324
|
profile: IProfile;
|
|
2325
|
-
idToken: string;
|
|
2326
2325
|
accessToken: string;
|
|
2326
|
+
idToken: string;
|
|
2327
2327
|
refreshToken: string;
|
|
2328
|
+
accessTokenExp: number;
|
|
2329
|
+
refreshTokenExp: number;
|
|
2328
2330
|
}
|
|
2329
2331
|
interface IUpdateProfileRequest {
|
|
2330
2332
|
first_name?: string;
|
|
@@ -2334,25 +2336,20 @@ interface IUpdateProfileRequest {
|
|
|
2334
2336
|
permissions?: TPermission[];
|
|
2335
2337
|
roles?: TRole[];
|
|
2336
2338
|
}
|
|
2337
|
-
interface IAuthenticateUserRequest {
|
|
2338
|
-
username: string;
|
|
2339
|
-
password: string;
|
|
2340
|
-
}
|
|
2341
|
-
interface IAuthenticateAppRequest {
|
|
2342
|
-
client_id: string;
|
|
2343
|
-
client_secret: string;
|
|
2344
|
-
}
|
|
2345
2339
|
interface IAuthenticateResponse {
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2340
|
+
access_token: string;
|
|
2341
|
+
id_token: string;
|
|
2342
|
+
refresh_token: string;
|
|
2343
|
+
expires_in: number;
|
|
2344
|
+
access_token_exp: number;
|
|
2345
|
+
refresh_token_exp: number;
|
|
2349
2346
|
}
|
|
2350
2347
|
interface IUpdatePasswordRequest {
|
|
2351
2348
|
email: string;
|
|
2352
2349
|
oldPassword: string;
|
|
2353
2350
|
newPassword: string;
|
|
2354
2351
|
}
|
|
2355
|
-
interface
|
|
2352
|
+
interface IUpdatePasswordResponse {
|
|
2356
2353
|
status: TRequestStatus;
|
|
2357
2354
|
/** Success or failure message */
|
|
2358
2355
|
message: string;
|
|
@@ -2364,34 +2361,42 @@ interface ICreateAccountRequest {
|
|
|
2364
2361
|
lastName: string;
|
|
2365
2362
|
orgName: string;
|
|
2366
2363
|
}
|
|
2364
|
+
interface IROPCRequest {
|
|
2365
|
+
grant_type: "password";
|
|
2366
|
+
username: string;
|
|
2367
|
+
password: string;
|
|
2368
|
+
client_id?: string;
|
|
2369
|
+
scope?: string;
|
|
2370
|
+
}
|
|
2371
|
+
interface IClientCredentialsRequest {
|
|
2372
|
+
grant_type: "client_credentials";
|
|
2373
|
+
client_id: string;
|
|
2374
|
+
client_secret: string;
|
|
2375
|
+
scope?: string;
|
|
2376
|
+
}
|
|
2377
|
+
interface IRefreshTokenRequest {
|
|
2378
|
+
grant_type: "refresh_token";
|
|
2379
|
+
refresh_token: string;
|
|
2380
|
+
client_id?: string;
|
|
2381
|
+
scope?: string;
|
|
2382
|
+
}
|
|
2383
|
+
type TAuthenticationRequest = IROPCRequest | IClientCredentialsRequest | IRefreshTokenRequest;
|
|
2367
2384
|
/**
|
|
2368
|
-
* Authenticate to Verdocs
|
|
2385
|
+
* Authenticate to Verdocs.
|
|
2369
2386
|
*
|
|
2370
2387
|
* ```typescript
|
|
2371
|
-
* import {
|
|
2372
|
-
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
2388
|
+
* import {authenticate, VerdocsEndpoint} from '@verdocs/js-sdk';
|
|
2373
2389
|
*
|
|
2374
|
-
*
|
|
2375
|
-
*
|
|
2376
|
-
*
|
|
2377
|
-
*/
|
|
2378
|
-
declare const authenticateUser: (endpoint: VerdocsEndpoint, params: IAuthenticateUserRequest) => Promise<IAuthenticateResponse>;
|
|
2379
|
-
/**
|
|
2380
|
-
* Authenticate to Verdocs via client ID / Secret authentication. **NOTE: This is only suitable for
|
|
2381
|
-
* NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
|
|
2382
|
-
* that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
|
|
2383
|
-
* hours. This expiration may change based on future security needs. Application developers are encouraged
|
|
2384
|
-
* to check the `exp` expiration field in the response, and renew tokens after they expire.
|
|
2390
|
+
* // Client-side call, suitable for Web and mobile apps:
|
|
2391
|
+
* const {access_token} = await Auth.authenticate({ username: 'test@test.com', password: 'PASSWORD', grant_type:'password' });
|
|
2392
|
+
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
2385
2393
|
*
|
|
2386
|
-
*
|
|
2387
|
-
*
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2390
|
-
* const {accessToken} = await Auth.authenticateApp({ client_id: 'CLIENTID', client_secret: 'SECRET' });
|
|
2391
|
-
* Transport.setAuthToken(accessToken);
|
|
2394
|
+
* // Server-side call, suitable for server apps. NEVER EXPOSE client_secret IN FRONT-END CODE:
|
|
2395
|
+
* const {access_token} = await Auth.authenticate({ client_id: '...', client_secret: '...', grant_type:'client_credentials' });
|
|
2396
|
+
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
2392
2397
|
* ```
|
|
2393
2398
|
*/
|
|
2394
|
-
declare const
|
|
2399
|
+
declare const authenticate: (endpoint: VerdocsEndpoint, params: TAuthenticationRequest) => Promise<IAuthenticateResponse>;
|
|
2395
2400
|
/**
|
|
2396
2401
|
* If called before the session expires, this will refresh the caller's session and tokens.
|
|
2397
2402
|
*
|
|
@@ -2403,27 +2408,27 @@ declare const authenticateApp: (endpoint: VerdocsEndpoint, params: IAuthenticate
|
|
|
2403
2408
|
* Transport.setAuthToken(accessToken);
|
|
2404
2409
|
* ```
|
|
2405
2410
|
*/
|
|
2406
|
-
declare const
|
|
2411
|
+
declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) => Promise<IAuthenticateResponse>;
|
|
2407
2412
|
/**
|
|
2408
2413
|
* Update the caller's password when the old password is known (typically for logged-in users).
|
|
2409
2414
|
*
|
|
2410
2415
|
* ```typescript
|
|
2411
|
-
* import {
|
|
2416
|
+
* import {changePassword} from '@verdocs/js-sdk/Auth';
|
|
2412
2417
|
*
|
|
2413
|
-
* const {status, message} = await
|
|
2418
|
+
* const {status, message} = await changePassword({ email, oldPassword, newPassword });
|
|
2414
2419
|
* if (status !== 'OK') {
|
|
2415
2420
|
* window.alert(`Password reset error: ${message}`);
|
|
2416
2421
|
* }
|
|
2417
2422
|
* ```
|
|
2418
2423
|
*/
|
|
2419
|
-
declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<
|
|
2424
|
+
declare const changePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<IUpdatePasswordResponse>;
|
|
2420
2425
|
/**
|
|
2421
2426
|
* Request a password reset, when the old password is not known (typically in login forms).
|
|
2422
2427
|
*
|
|
2423
2428
|
* ```typescript
|
|
2424
|
-
* import {
|
|
2429
|
+
* import {resetPassword} from '@verdocs/js-sdk/Auth';
|
|
2425
2430
|
*
|
|
2426
|
-
* const {success} = await
|
|
2431
|
+
* const {success} = await resetPassword({ email });
|
|
2427
2432
|
* if (status !== 'OK') {
|
|
2428
2433
|
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
|
2429
2434
|
* }
|
|
@@ -2552,4 +2557,4 @@ interface ISignupSurvey {
|
|
|
2552
2557
|
declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
|
|
2553
2558
|
status: "OK";
|
|
2554
2559
|
}>;
|
|
2555
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TRole, TSortTemplateBy, TAccessKeyType, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, IActivityEntry, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, IEnvelopeSearchParams, searchEnvelopes, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, throttledGetEnvelope, ITimeRange, IListEnvelopesParams, listEnvelopes, getEnvelopesByTemplateId, createInitials, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResultEntry, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummary, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, TEnvelopePermission, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation,
|
|
2560
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TRole, TSortTemplateBy, TAccessKeyType, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, IActivityEntry, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, IEnvelopeSearchParams, searchEnvelopes, ISigningSessionResult, getSigningSession, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, throttledGetEnvelope, ITimeRange, IListEnvelopesParams, listEnvelopes, getEnvelopesByTemplateId, createInitials, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResultEntry, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummary, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, TEnvelopePermission, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization, createOrganization, deleteOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, 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, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, getTemplateOwnerInfo, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, createTemplatev2, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, getTemplatesSummary, throttledGetTemplate, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSummary, ITemplateSearchParams, ITemplateSummaries, ITemplateTag, ITag, IStar, ITemplateOwnerInfo, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, getNotifications, getProfiles, getCurrentProfile, createProfile, getProfile, switchProfile, updateProfile, deleteProfile, createAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, 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 };
|
package/dist/index.js
CHANGED
|
@@ -868,7 +868,7 @@ class VerdocsEndpoint {
|
|
|
868
868
|
static getDefault() {
|
|
869
869
|
if (!globalThis$1[ENDPOINT_KEY]) {
|
|
870
870
|
globalThis$1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
|
871
|
-
window.console.debug('[JS_SDK] Created default endpoint', globalThis
|
|
871
|
+
// window.console.debug('[JS_SDK] Created default endpoint', globalThis[ENDPOINT_KEY].baseURL);
|
|
872
872
|
}
|
|
873
873
|
return globalThis$1[ENDPOINT_KEY];
|
|
874
874
|
}
|
|
@@ -1710,7 +1710,7 @@ const updateOrganizationInvitation = (endpoint, email, params) => endpoint.api /
|
|
|
1710
1710
|
const resendOrganizationInvitation = (endpoint, email) => endpoint.api //
|
|
1711
1711
|
.post('/v2/organization-invitations/resend', { email })
|
|
1712
1712
|
.then((r) => r.data);
|
|
1713
|
-
const
|
|
1713
|
+
const getOrganizationInvitation = (endpoint, email, token) => endpoint.api //
|
|
1714
1714
|
.get(`/v2/organization-invitations/${email}/${token}`)
|
|
1715
1715
|
.then((r) => r.data);
|
|
1716
1716
|
const acceptOrganizationInvitation = (endpoint, email, token) => endpoint.api //
|
|
@@ -2474,36 +2474,22 @@ const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
|
|
|
2474
2474
|
const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
|
|
2475
2475
|
|
|
2476
2476
|
/**
|
|
2477
|
-
* Authenticate to Verdocs
|
|
2477
|
+
* Authenticate to Verdocs.
|
|
2478
2478
|
*
|
|
2479
2479
|
* ```typescript
|
|
2480
|
-
* import {
|
|
2481
|
-
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
2480
|
+
* import {authenticate, VerdocsEndpoint} from '@verdocs/js-sdk';
|
|
2482
2481
|
*
|
|
2483
|
-
*
|
|
2484
|
-
*
|
|
2485
|
-
*
|
|
2486
|
-
*/
|
|
2487
|
-
const authenticateUser = (endpoint, params) => endpoint.api //
|
|
2488
|
-
.post('/authentication/login', params)
|
|
2489
|
-
.then((r) => r.data);
|
|
2490
|
-
/**
|
|
2491
|
-
* Authenticate to Verdocs via client ID / Secret authentication. **NOTE: This is only suitable for
|
|
2492
|
-
* NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
|
|
2493
|
-
* that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
|
|
2494
|
-
* hours. This expiration may change based on future security needs. Application developers are encouraged
|
|
2495
|
-
* to check the `exp` expiration field in the response, and renew tokens after they expire.
|
|
2482
|
+
* // Client-side call, suitable for Web and mobile apps:
|
|
2483
|
+
* const {access_token} = await Auth.authenticate({ username: 'test@test.com', password: 'PASSWORD', grant_type:'password' });
|
|
2484
|
+
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
2496
2485
|
*
|
|
2497
|
-
*
|
|
2498
|
-
*
|
|
2499
|
-
*
|
|
2500
|
-
*
|
|
2501
|
-
* const {accessToken} = await Auth.authenticateApp({ client_id: 'CLIENTID', client_secret: 'SECRET' });
|
|
2502
|
-
* Transport.setAuthToken(accessToken);
|
|
2486
|
+
* // Server-side call, suitable for server apps. NEVER EXPOSE client_secret IN FRONT-END CODE:
|
|
2487
|
+
* const {access_token} = await Auth.authenticate({ client_id: '...', client_secret: '...', grant_type:'client_credentials' });
|
|
2488
|
+
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
2503
2489
|
* ```
|
|
2504
2490
|
*/
|
|
2505
|
-
const
|
|
2506
|
-
.post('/
|
|
2491
|
+
const authenticate = (endpoint, params) => endpoint.api //
|
|
2492
|
+
.post('/v2/oauth2/token', params)
|
|
2507
2493
|
.then((r) => r.data);
|
|
2508
2494
|
/**
|
|
2509
2495
|
* If called before the session expires, this will refresh the caller's session and tokens.
|
|
@@ -2516,38 +2502,36 @@ const authenticateApp = (endpoint, params) => endpoint.api //
|
|
|
2516
2502
|
* Transport.setAuthToken(accessToken);
|
|
2517
2503
|
* ```
|
|
2518
2504
|
*/
|
|
2519
|
-
const
|
|
2520
|
-
.get('/token')
|
|
2521
|
-
.then((r) => r.data);
|
|
2505
|
+
const refreshToken = (endpoint, refreshToken) => authenticate(endpoint, { grant_type: 'refresh_token', refresh_token: refreshToken });
|
|
2522
2506
|
/**
|
|
2523
2507
|
* Update the caller's password when the old password is known (typically for logged-in users).
|
|
2524
2508
|
*
|
|
2525
2509
|
* ```typescript
|
|
2526
|
-
* import {
|
|
2510
|
+
* import {changePassword} from '@verdocs/js-sdk/Auth';
|
|
2527
2511
|
*
|
|
2528
|
-
* const {status, message} = await
|
|
2512
|
+
* const {status, message} = await changePassword({ email, oldPassword, newPassword });
|
|
2529
2513
|
* if (status !== 'OK') {
|
|
2530
2514
|
* window.alert(`Password reset error: ${message}`);
|
|
2531
2515
|
* }
|
|
2532
2516
|
* ```
|
|
2533
2517
|
*/
|
|
2534
2518
|
const changePassword = (endpoint, params) => endpoint.api //
|
|
2535
|
-
.
|
|
2519
|
+
.post('/v2/users/change-password', params)
|
|
2536
2520
|
.then((r) => r.data);
|
|
2537
2521
|
/**
|
|
2538
2522
|
* Request a password reset, when the old password is not known (typically in login forms).
|
|
2539
2523
|
*
|
|
2540
2524
|
* ```typescript
|
|
2541
|
-
* import {
|
|
2525
|
+
* import {resetPassword} from '@verdocs/js-sdk/Auth';
|
|
2542
2526
|
*
|
|
2543
|
-
* const {success} = await
|
|
2527
|
+
* const {success} = await resetPassword({ email });
|
|
2544
2528
|
* if (status !== 'OK') {
|
|
2545
2529
|
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
|
2546
2530
|
* }
|
|
2547
2531
|
* ```
|
|
2548
2532
|
*/
|
|
2549
2533
|
const resetPassword = (endpoint, params) => endpoint.api //
|
|
2550
|
-
.post('/
|
|
2534
|
+
.post('/v2/users/reset-password', params)
|
|
2551
2535
|
.then((r) => r.data);
|
|
2552
2536
|
/**
|
|
2553
2537
|
* Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
|
|
@@ -2563,7 +2547,7 @@ const resetPassword = (endpoint, params) => endpoint.api //
|
|
|
2563
2547
|
* ```
|
|
2564
2548
|
*/
|
|
2565
2549
|
const resendVerification = (endpoint, accessToken) => endpoint.api //
|
|
2566
|
-
.post('/
|
|
2550
|
+
.post('/v2/users/resend-verification', {}, accessToken ? { headers: { Authorization: `Bearer ${accessToken}` } } : {})
|
|
2567
2551
|
.then((r) => r.data);
|
|
2568
2552
|
|
|
2569
2553
|
const getNotifications = async (endpoint) => endpoint.api //
|
|
@@ -2682,8 +2666,7 @@ exports.VerdocsEndpoint = VerdocsEndpoint;
|
|
|
2682
2666
|
exports.acceptOrganizationInvitation = acceptOrganizationInvitation;
|
|
2683
2667
|
exports.addGroupMember = addGroupMember;
|
|
2684
2668
|
exports.addTemplateTag = addTemplateTag;
|
|
2685
|
-
exports.
|
|
2686
|
-
exports.authenticateUser = authenticateUser;
|
|
2669
|
+
exports.authenticate = authenticate;
|
|
2687
2670
|
exports.blobToBase64 = blobToBase64;
|
|
2688
2671
|
exports.canPerformTemplateAction = canPerformTemplateAction;
|
|
2689
2672
|
exports.cancelEnvelope = cancelEnvelope;
|
|
@@ -2763,6 +2746,7 @@ exports.getMatchingCountry = getMatchingCountry;
|
|
|
2763
2746
|
exports.getNextRecipient = getNextRecipient;
|
|
2764
2747
|
exports.getNotifications = getNotifications;
|
|
2765
2748
|
exports.getOrganization = getOrganization;
|
|
2749
|
+
exports.getOrganizationInvitation = getOrganizationInvitation;
|
|
2766
2750
|
exports.getOrganizationInvitations = getOrganizationInvitations;
|
|
2767
2751
|
exports.getOrganizationMembers = getOrganizationMembers;
|
|
2768
2752
|
exports.getOrganizations = getOrganizations;
|
|
@@ -2799,7 +2783,6 @@ exports.getTemplatesSummary = getTemplatesSummary;
|
|
|
2799
2783
|
exports.getValidator = getValidator;
|
|
2800
2784
|
exports.getValidators = getValidators;
|
|
2801
2785
|
exports.getWebhooks = getWebhooks;
|
|
2802
|
-
exports.gettOrganizationInvitation = gettOrganizationInvitation;
|
|
2803
2786
|
exports.hasRequiredPermissions = hasRequiredPermissions;
|
|
2804
2787
|
exports.integerSequence = integerSequence;
|
|
2805
2788
|
exports.isAmericanSamoa = isAmericanSamoa;
|
|
@@ -2820,7 +2803,7 @@ exports.nameToRGBA = nameToRGBA;
|
|
|
2820
2803
|
exports.recipientCanAct = recipientCanAct;
|
|
2821
2804
|
exports.recipientHasAction = recipientHasAction;
|
|
2822
2805
|
exports.recordSignupSurvey = recordSignupSurvey;
|
|
2823
|
-
exports.
|
|
2806
|
+
exports.refreshToken = refreshToken;
|
|
2824
2807
|
exports.rescale = rescale;
|
|
2825
2808
|
exports.resendInvitation = resendInvitation;
|
|
2826
2809
|
exports.resendOrganizationInvitation = resendOrganizationInvitation;
|