@verdocs/js-sdk 4.2.6 → 4.2.9
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 +22 -27
- package/dist/index.d.ts +22 -27
- package/dist/index.js +18 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -20
- 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,28 +143,20 @@ 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
|
-
profile_id: string;
|
|
156
|
-
envelope_id: string;
|
|
157
|
-
role: string;
|
|
158
|
-
email: string;
|
|
159
|
-
access_key: {
|
|
160
|
-
id: string;
|
|
161
|
-
type: string;
|
|
162
|
-
};
|
|
163
|
-
iss: string;
|
|
164
150
|
aud: string;
|
|
165
|
-
|
|
151
|
+
iss: string;
|
|
152
|
+
sub: string; // Verdocs profile_id
|
|
153
|
+
email: string;
|
|
154
|
+
email_verified: boolean;
|
|
166
155
|
iat: number;
|
|
167
|
-
|
|
156
|
+
exp: number;
|
|
157
|
+
"https://verdocs.com/session_type": "signing";
|
|
158
|
+
"https://verdocs.com/envelope_id": string;
|
|
159
|
+
"https://verdocs.com/role_name": string;
|
|
168
160
|
}
|
|
169
161
|
/**
|
|
170
162
|
* A User Session connects a caller to a Verdocs profile, and can be used for any operations that profile may perform.
|
|
@@ -172,11 +164,12 @@ interface ISigningSession {
|
|
|
172
164
|
interface IUserSession {
|
|
173
165
|
aud: string;
|
|
174
166
|
iss: string;
|
|
175
|
-
sub: string;
|
|
167
|
+
sub: string; // Auth0 user_id
|
|
176
168
|
email: string;
|
|
177
169
|
email_verified: boolean;
|
|
178
170
|
iat: number;
|
|
179
171
|
exp: number;
|
|
172
|
+
"https://verdocs.com/session_type": "user";
|
|
180
173
|
"https://verdocs.com/profile_id": string;
|
|
181
174
|
"https://verdocs.com/organization_id": string;
|
|
182
175
|
}
|
|
@@ -1263,10 +1256,6 @@ interface ISigningSessionResult {
|
|
|
1263
1256
|
session: ISigningSession;
|
|
1264
1257
|
signerToken: string;
|
|
1265
1258
|
}
|
|
1266
|
-
/**
|
|
1267
|
-
* Get a signing session for an Envelope.
|
|
1268
|
-
*/
|
|
1269
|
-
declare const getSigningSession: (endpoint: VerdocsEndpoint, params: ISigningSessionRequest) => Promise<ISigningSessionResult>;
|
|
1270
1259
|
/**
|
|
1271
1260
|
* Get the list of recipients for an Envelope.
|
|
1272
1261
|
*/
|
|
@@ -1452,7 +1441,7 @@ interface IKbaIdentity {
|
|
|
1452
1441
|
/**
|
|
1453
1442
|
* Submit an identity response to a KBA challenge.
|
|
1454
1443
|
*/
|
|
1455
|
-
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint,
|
|
1444
|
+
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1456
1445
|
interface IKbaChallengeResponse {
|
|
1457
1446
|
responses: {
|
|
1458
1447
|
type: string;
|
|
@@ -1495,13 +1484,19 @@ declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId:
|
|
|
1495
1484
|
interface ISignerTokenResponse {
|
|
1496
1485
|
recipient: IRecipient;
|
|
1497
1486
|
envelope: IEnvelope;
|
|
1498
|
-
|
|
1499
|
-
|
|
1487
|
+
access_token: string;
|
|
1488
|
+
in_person_key: IInPersonAccessKey;
|
|
1500
1489
|
}
|
|
1501
1490
|
/**
|
|
1502
|
-
* Get a signing
|
|
1491
|
+
* Get a signing session for an Envelope. Note that this should generally be called with a NON-default
|
|
1492
|
+
* endpoint.
|
|
1493
|
+
*/
|
|
1494
|
+
declare const getSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Get a signing token for in-person signing. Authentication is required. This should be called
|
|
1497
|
+
* by the logged-in user who wants to sign.
|
|
1503
1498
|
*/
|
|
1504
|
-
declare const getSignerToken: (endpoint: VerdocsEndpoint,
|
|
1499
|
+
declare const getSignerToken: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<ISignerTokenResponse>;
|
|
1505
1500
|
/**
|
|
1506
1501
|
* Get an in-person signing link.
|
|
1507
1502
|
*/
|
|
@@ -2685,4 +2680,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2685
2680
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2686
2681
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2687
2682
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2688
|
-
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, ISigningSessionResult,
|
|
2683
|
+
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, ISigningSessionResult, 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, 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,28 +143,20 @@ 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
|
-
profile_id: string;
|
|
156
|
-
envelope_id: string;
|
|
157
|
-
role: string;
|
|
158
|
-
email: string;
|
|
159
|
-
access_key: {
|
|
160
|
-
id: string;
|
|
161
|
-
type: string;
|
|
162
|
-
};
|
|
163
|
-
iss: string;
|
|
164
150
|
aud: string;
|
|
165
|
-
|
|
151
|
+
iss: string;
|
|
152
|
+
sub: string; // Verdocs profile_id
|
|
153
|
+
email: string;
|
|
154
|
+
email_verified: boolean;
|
|
166
155
|
iat: number;
|
|
167
|
-
|
|
156
|
+
exp: number;
|
|
157
|
+
"https://verdocs.com/session_type": "signing";
|
|
158
|
+
"https://verdocs.com/envelope_id": string;
|
|
159
|
+
"https://verdocs.com/role_name": string;
|
|
168
160
|
}
|
|
169
161
|
/**
|
|
170
162
|
* A User Session connects a caller to a Verdocs profile, and can be used for any operations that profile may perform.
|
|
@@ -172,11 +164,12 @@ interface ISigningSession {
|
|
|
172
164
|
interface IUserSession {
|
|
173
165
|
aud: string;
|
|
174
166
|
iss: string;
|
|
175
|
-
sub: string;
|
|
167
|
+
sub: string; // Auth0 user_id
|
|
176
168
|
email: string;
|
|
177
169
|
email_verified: boolean;
|
|
178
170
|
iat: number;
|
|
179
171
|
exp: number;
|
|
172
|
+
"https://verdocs.com/session_type": "user";
|
|
180
173
|
"https://verdocs.com/profile_id": string;
|
|
181
174
|
"https://verdocs.com/organization_id": string;
|
|
182
175
|
}
|
|
@@ -1263,10 +1256,6 @@ interface ISigningSessionResult {
|
|
|
1263
1256
|
session: ISigningSession;
|
|
1264
1257
|
signerToken: string;
|
|
1265
1258
|
}
|
|
1266
|
-
/**
|
|
1267
|
-
* Get a signing session for an Envelope.
|
|
1268
|
-
*/
|
|
1269
|
-
declare const getSigningSession: (endpoint: VerdocsEndpoint, params: ISigningSessionRequest) => Promise<ISigningSessionResult>;
|
|
1270
1259
|
/**
|
|
1271
1260
|
* Get the list of recipients for an Envelope.
|
|
1272
1261
|
*/
|
|
@@ -1452,7 +1441,7 @@ interface IKbaIdentity {
|
|
|
1452
1441
|
/**
|
|
1453
1442
|
* Submit an identity response to a KBA challenge.
|
|
1454
1443
|
*/
|
|
1455
|
-
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint,
|
|
1444
|
+
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1456
1445
|
interface IKbaChallengeResponse {
|
|
1457
1446
|
responses: {
|
|
1458
1447
|
type: string;
|
|
@@ -1495,13 +1484,19 @@ declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId:
|
|
|
1495
1484
|
interface ISignerTokenResponse {
|
|
1496
1485
|
recipient: IRecipient;
|
|
1497
1486
|
envelope: IEnvelope;
|
|
1498
|
-
|
|
1499
|
-
|
|
1487
|
+
access_token: string;
|
|
1488
|
+
in_person_key: IInPersonAccessKey;
|
|
1500
1489
|
}
|
|
1501
1490
|
/**
|
|
1502
|
-
* Get a signing
|
|
1491
|
+
* Get a signing session for an Envelope. Note that this should generally be called with a NON-default
|
|
1492
|
+
* endpoint.
|
|
1493
|
+
*/
|
|
1494
|
+
declare const getSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Get a signing token for in-person signing. Authentication is required. This should be called
|
|
1497
|
+
* by the logged-in user who wants to sign.
|
|
1503
1498
|
*/
|
|
1504
|
-
declare const getSignerToken: (endpoint: VerdocsEndpoint,
|
|
1499
|
+
declare const getSignerToken: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<ISignerTokenResponse>;
|
|
1505
1500
|
/**
|
|
1506
1501
|
* Get an in-person signing link.
|
|
1507
1502
|
*/
|
|
@@ -2685,4 +2680,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2685
2680
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2686
2681
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2687
2682
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2688
|
-
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, ISigningSessionResult,
|
|
2683
|
+
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, ISigningSessionResult, 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, 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
|
*/
|
|
@@ -1609,8 +1594,8 @@ const submitKbaPin = (endpoint, envelope_id, role_name, pin) => endpoint.api //
|
|
|
1609
1594
|
/**
|
|
1610
1595
|
* Submit an identity response to a KBA challenge.
|
|
1611
1596
|
*/
|
|
1612
|
-
const submitKbaIdentity = (endpoint,
|
|
1613
|
-
.post(`/v2/kba/identity`, {
|
|
1597
|
+
const submitKbaIdentity = (endpoint, envelope_id, role_name, identity) => endpoint.api //
|
|
1598
|
+
.post(`/v2/kba/identity`, { envelope_id, role_name, identity })
|
|
1614
1599
|
.then((r) => r.data);
|
|
1615
1600
|
/**
|
|
1616
1601
|
* Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
|
|
@@ -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.
|