@verdocs/js-sdk 4.2.7 → 4.2.10
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 +23 -20
- package/dist/index.d.ts +23 -20
- package/dist/index.js +17 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -19
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -143,18 +143,13 @@ declare const RolePermissions: Record<TRole, TPermission[]>;
|
|
|
143
143
|
* Confirm whether the user has all of the specified permissions.
|
|
144
144
|
*/
|
|
145
145
|
declare const userHasPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
146
|
-
interface ISigningSessionRequest {
|
|
147
|
-
envelopeId: string;
|
|
148
|
-
roleId: string;
|
|
149
|
-
inviteCode: string;
|
|
150
|
-
}
|
|
151
146
|
/**
|
|
152
147
|
* A Signing Session connects a caller to a role within an envelope, and can be used only for calls related to signing that envelope.
|
|
153
148
|
*/
|
|
154
149
|
interface ISigningSession {
|
|
155
150
|
aud: string;
|
|
156
151
|
iss: string;
|
|
157
|
-
sub: string; // Verdocs
|
|
152
|
+
sub: string; // Verdocs access key ID
|
|
158
153
|
email: string;
|
|
159
154
|
email_verified: boolean;
|
|
160
155
|
iat: number;
|
|
@@ -178,6 +173,17 @@ interface IUserSession {
|
|
|
178
173
|
"https://verdocs.com/profile_id": string;
|
|
179
174
|
"https://verdocs.com/organization_id": string;
|
|
180
175
|
}
|
|
176
|
+
interface IIdToken {
|
|
177
|
+
aud: string;
|
|
178
|
+
iss: string;
|
|
179
|
+
sub: string; // Auth0 user_id
|
|
180
|
+
email: string;
|
|
181
|
+
email_verified: boolean;
|
|
182
|
+
organization_id: string;
|
|
183
|
+
first_name: string;
|
|
184
|
+
last_name: string;
|
|
185
|
+
phone: string;
|
|
186
|
+
}
|
|
181
187
|
/**
|
|
182
188
|
* Verdocs supports two types of authenticated sessions: User and Signing. Both behave similarly and have similar
|
|
183
189
|
* properties, but signing sessions only have access to a small set of signing-related functions.
|
|
@@ -1256,15 +1262,6 @@ declare const createEnvelope: (endpoint: VerdocsEndpoint, request: ICreateEnvelo
|
|
|
1256
1262
|
* ```
|
|
1257
1263
|
*/
|
|
1258
1264
|
declare const getEnvelopesSummary: (endpoint: VerdocsEndpoint, page: number) => Promise<IEnvelopesSummary>;
|
|
1259
|
-
interface ISigningSessionResult {
|
|
1260
|
-
recipient: IRecipient;
|
|
1261
|
-
session: ISigningSession;
|
|
1262
|
-
signerToken: string;
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Get a signing session for an Envelope.
|
|
1266
|
-
*/
|
|
1267
|
-
declare const getSigningSession: (endpoint: VerdocsEndpoint, params: ISigningSessionRequest) => Promise<ISigningSessionResult>;
|
|
1268
1265
|
/**
|
|
1269
1266
|
* Get the list of recipients for an Envelope.
|
|
1270
1267
|
*/
|
|
@@ -1493,13 +1490,19 @@ declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId:
|
|
|
1493
1490
|
interface ISignerTokenResponse {
|
|
1494
1491
|
recipient: IRecipient;
|
|
1495
1492
|
envelope: IEnvelope;
|
|
1496
|
-
|
|
1497
|
-
|
|
1493
|
+
access_token: string;
|
|
1494
|
+
in_person_key: IInPersonAccessKey;
|
|
1498
1495
|
}
|
|
1499
1496
|
/**
|
|
1500
|
-
* Get a signing
|
|
1497
|
+
* Get a signing session for an Envelope. Note that this should generally be called with a NON-default
|
|
1498
|
+
* endpoint.
|
|
1499
|
+
*/
|
|
1500
|
+
declare const getSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Get a signing token for in-person signing. Authentication is required. This should be called
|
|
1503
|
+
* by the logged-in user who wants to sign.
|
|
1501
1504
|
*/
|
|
1502
|
-
declare const getSignerToken: (endpoint: VerdocsEndpoint,
|
|
1505
|
+
declare const getSignerToken: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<ISignerTokenResponse>;
|
|
1503
1506
|
/**
|
|
1504
1507
|
* Get an in-person signing link.
|
|
1505
1508
|
*/
|
|
@@ -2683,4 +2686,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2683
2686
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2684
2687
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2685
2688
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2686
|
-
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, 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,
|
|
2689
|
+
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, 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, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, 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, verifyEmail, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -143,18 +143,13 @@ declare const RolePermissions: Record<TRole, TPermission[]>;
|
|
|
143
143
|
* Confirm whether the user has all of the specified permissions.
|
|
144
144
|
*/
|
|
145
145
|
declare const userHasPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
|
|
146
|
-
interface ISigningSessionRequest {
|
|
147
|
-
envelopeId: string;
|
|
148
|
-
roleId: string;
|
|
149
|
-
inviteCode: string;
|
|
150
|
-
}
|
|
151
146
|
/**
|
|
152
147
|
* A Signing Session connects a caller to a role within an envelope, and can be used only for calls related to signing that envelope.
|
|
153
148
|
*/
|
|
154
149
|
interface ISigningSession {
|
|
155
150
|
aud: string;
|
|
156
151
|
iss: string;
|
|
157
|
-
sub: string; // Verdocs
|
|
152
|
+
sub: string; // Verdocs access key ID
|
|
158
153
|
email: string;
|
|
159
154
|
email_verified: boolean;
|
|
160
155
|
iat: number;
|
|
@@ -178,6 +173,17 @@ interface IUserSession {
|
|
|
178
173
|
"https://verdocs.com/profile_id": string;
|
|
179
174
|
"https://verdocs.com/organization_id": string;
|
|
180
175
|
}
|
|
176
|
+
interface IIdToken {
|
|
177
|
+
aud: string;
|
|
178
|
+
iss: string;
|
|
179
|
+
sub: string; // Auth0 user_id
|
|
180
|
+
email: string;
|
|
181
|
+
email_verified: boolean;
|
|
182
|
+
organization_id: string;
|
|
183
|
+
first_name: string;
|
|
184
|
+
last_name: string;
|
|
185
|
+
phone: string;
|
|
186
|
+
}
|
|
181
187
|
/**
|
|
182
188
|
* Verdocs supports two types of authenticated sessions: User and Signing. Both behave similarly and have similar
|
|
183
189
|
* properties, but signing sessions only have access to a small set of signing-related functions.
|
|
@@ -1256,15 +1262,6 @@ declare const createEnvelope: (endpoint: VerdocsEndpoint, request: ICreateEnvelo
|
|
|
1256
1262
|
* ```
|
|
1257
1263
|
*/
|
|
1258
1264
|
declare const getEnvelopesSummary: (endpoint: VerdocsEndpoint, page: number) => Promise<IEnvelopesSummary>;
|
|
1259
|
-
interface ISigningSessionResult {
|
|
1260
|
-
recipient: IRecipient;
|
|
1261
|
-
session: ISigningSession;
|
|
1262
|
-
signerToken: string;
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Get a signing session for an Envelope.
|
|
1266
|
-
*/
|
|
1267
|
-
declare const getSigningSession: (endpoint: VerdocsEndpoint, params: ISigningSessionRequest) => Promise<ISigningSessionResult>;
|
|
1268
1265
|
/**
|
|
1269
1266
|
* Get the list of recipients for an Envelope.
|
|
1270
1267
|
*/
|
|
@@ -1493,13 +1490,19 @@ declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId:
|
|
|
1493
1490
|
interface ISignerTokenResponse {
|
|
1494
1491
|
recipient: IRecipient;
|
|
1495
1492
|
envelope: IEnvelope;
|
|
1496
|
-
|
|
1497
|
-
|
|
1493
|
+
access_token: string;
|
|
1494
|
+
in_person_key: IInPersonAccessKey;
|
|
1498
1495
|
}
|
|
1499
1496
|
/**
|
|
1500
|
-
* Get a signing
|
|
1497
|
+
* Get a signing session for an Envelope. Note that this should generally be called with a NON-default
|
|
1498
|
+
* endpoint.
|
|
1499
|
+
*/
|
|
1500
|
+
declare const getSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Get a signing token for in-person signing. Authentication is required. This should be called
|
|
1503
|
+
* by the logged-in user who wants to sign.
|
|
1501
1504
|
*/
|
|
1502
|
-
declare const getSignerToken: (endpoint: VerdocsEndpoint,
|
|
1505
|
+
declare const getSignerToken: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<ISignerTokenResponse>;
|
|
1503
1506
|
/**
|
|
1504
1507
|
* Get an in-person signing link.
|
|
1505
1508
|
*/
|
|
@@ -2683,4 +2686,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2683
2686
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2684
2687
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2685
2688
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2686
|
-
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, 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,
|
|
2689
|
+
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, 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, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, 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, verifyEmail, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1422,21 +1422,6 @@ const createEnvelope = async (endpoint, request) => endpoint.api //
|
|
|
1422
1422
|
const getEnvelopesSummary = async (endpoint, page) => endpoint.api //
|
|
1423
1423
|
.post('/envelopes/summary', { page })
|
|
1424
1424
|
.then((r) => r.data);
|
|
1425
|
-
/**
|
|
1426
|
-
* Get a signing session for an Envelope.
|
|
1427
|
-
*/
|
|
1428
|
-
const getSigningSession = async (endpoint, params) => {
|
|
1429
|
-
window.console.log('[JS_SDK] getSigningSession', params, endpoint.api);
|
|
1430
|
-
return endpoint.api //
|
|
1431
|
-
.get(`/envelopes/${params.envelopeId}/recipients/${encodeURIComponent(params.roleId)}/invitation/${params.inviteCode}`)
|
|
1432
|
-
.then((r) => {
|
|
1433
|
-
// Avoiding a jsonwebtoken dependency here - we don't actually need the whole library
|
|
1434
|
-
const signerToken = r.headers?.signer_token || '';
|
|
1435
|
-
const session = decodeAccessTokenBody(signerToken);
|
|
1436
|
-
endpoint.setToken(signerToken);
|
|
1437
|
-
return { recipient: r.data, session, signerToken };
|
|
1438
|
-
});
|
|
1439
|
-
};
|
|
1440
1425
|
/**
|
|
1441
1426
|
* Get the list of recipients for an Envelope.
|
|
1442
1427
|
*/
|
|
@@ -1573,7 +1558,7 @@ const getEnvelopeDocumentPageDisplayUri = async (endpoint, envelopeId, documentI
|
|
|
1573
1558
|
* ```
|
|
1574
1559
|
*/
|
|
1575
1560
|
const getEnvelopes = (endpoint, params) => endpoint.api //
|
|
1576
|
-
.get('/envelopes', { params })
|
|
1561
|
+
.get('/v2/envelopes', { params })
|
|
1577
1562
|
.then((r) => r.data);
|
|
1578
1563
|
|
|
1579
1564
|
/**
|
|
@@ -1651,10 +1636,23 @@ const envelopeRecipientUpdateName = (endpoint, envelopeId, roleName, fullName) =
|
|
|
1651
1636
|
*/
|
|
1652
1637
|
const envelopeRecipientPrepare = (endpoint, envelopeId, roleName, recipients) => updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients });
|
|
1653
1638
|
/**
|
|
1654
|
-
* Get a signing
|
|
1639
|
+
* Get a signing session for an Envelope. Note that this should generally be called with a NON-default
|
|
1640
|
+
* endpoint.
|
|
1641
|
+
*/
|
|
1642
|
+
const getSigningSession = async (endpoint, envelope_id, role_name, key) => {
|
|
1643
|
+
return endpoint.api //
|
|
1644
|
+
.post(`/v2/sign/start/${envelope_id}/${encodeURIComponent(role_name)}/${key}`)
|
|
1645
|
+
.then((r) => {
|
|
1646
|
+
endpoint.setToken(r.data.access_token);
|
|
1647
|
+
return r.data;
|
|
1648
|
+
});
|
|
1649
|
+
};
|
|
1650
|
+
/**
|
|
1651
|
+
* Get a signing token for in-person signing. Authentication is required. This should be called
|
|
1652
|
+
* by the logged-in user who wants to sign.
|
|
1655
1653
|
*/
|
|
1656
|
-
const getSignerToken = (endpoint,
|
|
1657
|
-
.get(`/envelopes/${
|
|
1654
|
+
const getSignerToken = (endpoint, envelope_id, role_name) => endpoint.api //
|
|
1655
|
+
.get(`/envelopes/${envelope_id}/recipients/${encodeURIComponent(role_name)}/signer-token`)
|
|
1658
1656
|
.then((r) => r.data);
|
|
1659
1657
|
/**
|
|
1660
1658
|
* Get an in-person signing link.
|