@verdocs/js-sdk 4.0.5 → 4.0.7
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 +53 -21
- package/dist/index.d.ts +53 -21
- package/dist/index.js +2326 -2314
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2326 -2313
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +3 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -89,6 +89,9 @@ interface IOrganization {
|
|
|
89
89
|
thumbnail_url: string | null;
|
|
90
90
|
primary_color: string | null;
|
|
91
91
|
secondary_color: string | null;
|
|
92
|
+
entitlements?: Record<string, any>;
|
|
93
|
+
mtd_usage?: Record<string, any>;
|
|
94
|
+
ytd_usage?: Record<string, any>;
|
|
92
95
|
data?: Record<string, any>;
|
|
93
96
|
/** Creation date/time. */
|
|
94
97
|
created_at: string;
|
|
@@ -414,6 +417,13 @@ interface IRecipient {
|
|
|
414
417
|
created_at: string;
|
|
415
418
|
updated_at: string;
|
|
416
419
|
last_attempt_at: string;
|
|
420
|
+
/**
|
|
421
|
+
* If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
|
|
422
|
+
* created from this template.
|
|
423
|
+
*/
|
|
424
|
+
kba_method: string | null;
|
|
425
|
+
kba_completed: boolean;
|
|
426
|
+
kba_details: Record<string, any>;
|
|
417
427
|
envelope?: IEnvelope;
|
|
418
428
|
profile?: IProfile;
|
|
419
429
|
}
|
|
@@ -455,6 +465,11 @@ interface IRole {
|
|
|
455
465
|
*/
|
|
456
466
|
order: number;
|
|
457
467
|
delegator?: boolean;
|
|
468
|
+
/**
|
|
469
|
+
* If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
|
|
470
|
+
* created from this template.
|
|
471
|
+
*/
|
|
472
|
+
kba_method?: string;
|
|
458
473
|
}
|
|
459
474
|
interface ISignature {
|
|
460
475
|
id: string;
|
|
@@ -508,14 +523,20 @@ interface ITemplate {
|
|
|
508
523
|
/**
|
|
509
524
|
* If true, the template is only visible to the creator. If false, the template will also be visible to the user's
|
|
510
525
|
* organization, if any.
|
|
526
|
+
* @deprecated. See "visibility".
|
|
511
527
|
*/
|
|
512
528
|
is_personal: boolean;
|
|
513
529
|
/**
|
|
514
530
|
* If true, the template is visible publicly. Note that this does not necessarily mean it is also visible to the
|
|
515
531
|
* user's organization. It may be desirable to create documents that are public but that do not appear in the
|
|
516
532
|
* organization's shared templates list. To achieve this, set both `is_personal` and `is_public` to TRUE.
|
|
533
|
+
* @deprecated. See "visibility".
|
|
517
534
|
*/
|
|
518
535
|
is_public: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* If set, the visibility level for the template.
|
|
538
|
+
*/
|
|
539
|
+
visibility?: string;
|
|
519
540
|
/**
|
|
520
541
|
* If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.)
|
|
521
542
|
*/
|
|
@@ -867,6 +888,7 @@ type TEnvironment = "verdocs" | "verdocs-stage";
|
|
|
867
888
|
type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession) => void;
|
|
868
889
|
interface VerdocsEndpointOptions {
|
|
869
890
|
baseURL?: string;
|
|
891
|
+
baseURLv2?: string;
|
|
870
892
|
timeout?: number;
|
|
871
893
|
environment?: TEnvironment;
|
|
872
894
|
sessionType?: TSessionType;
|
|
@@ -897,6 +919,7 @@ declare class VerdocsEndpoint {
|
|
|
897
919
|
private environment;
|
|
898
920
|
private sessionType;
|
|
899
921
|
private baseURL;
|
|
922
|
+
private baseURLv2;
|
|
900
923
|
private clientID;
|
|
901
924
|
private timeout;
|
|
902
925
|
private token;
|
|
@@ -933,6 +956,11 @@ declare class VerdocsEndpoint {
|
|
|
933
956
|
* Get the current base URL. This should rarely be anything other than 'https://api.verdocs.com'.
|
|
934
957
|
*/
|
|
935
958
|
getBaseURL(): string;
|
|
959
|
+
/**
|
|
960
|
+
* Get the current base URL for the v2 APIs.
|
|
961
|
+
* This should rarely be anything other than 'https://api-v2.verdocs.com'.
|
|
962
|
+
*/
|
|
963
|
+
getBaseURLv2(): string;
|
|
936
964
|
/**
|
|
937
965
|
* Get the current client ID, if set.
|
|
938
966
|
*/
|
|
@@ -984,6 +1012,17 @@ declare class VerdocsEndpoint {
|
|
|
984
1012
|
* ```
|
|
985
1013
|
*/
|
|
986
1014
|
setBaseURL(url: string): VerdocsEndpoint;
|
|
1015
|
+
/**
|
|
1016
|
+
* Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
|
|
1017
|
+
*
|
|
1018
|
+
* ```typescript
|
|
1019
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1020
|
+
*
|
|
1021
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1022
|
+
* endpoint.setBaseURL('https://api.verdocs.com');
|
|
1023
|
+
* ```
|
|
1024
|
+
*/
|
|
1025
|
+
setBaseURLv2(url: string): VerdocsEndpoint;
|
|
987
1026
|
/**
|
|
988
1027
|
* Set the Client ID for Verdocs API calls.
|
|
989
1028
|
*
|
|
@@ -1291,6 +1330,13 @@ declare const listEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopes
|
|
|
1291
1330
|
page: number;
|
|
1292
1331
|
envelopes: IEnvelope[];
|
|
1293
1332
|
}>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Get all of the envelopes that were sent using a given template.
|
|
1335
|
+
* NOTE: This endpoint will be retired soon. Its response is not paginated and it is typically used only to retrieve
|
|
1336
|
+
* "submitted data" for a template. A new endpoint will be introduced to provide this function more directly.
|
|
1337
|
+
* @deprecated
|
|
1338
|
+
*/
|
|
1339
|
+
declare const getEnvelopesByTemplateId: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IEnvelope[]>;
|
|
1294
1340
|
/**
|
|
1295
1341
|
* Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
|
|
1296
1342
|
* an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
|
|
@@ -2221,7 +2267,10 @@ interface ISwitchProfileResponse {
|
|
|
2221
2267
|
interface IUpdateProfileRequest {
|
|
2222
2268
|
first_name?: string;
|
|
2223
2269
|
last_name?: string;
|
|
2270
|
+
// email?: string;
|
|
2224
2271
|
phone?: string;
|
|
2272
|
+
permissions?: TPermission[];
|
|
2273
|
+
roles?: TRole[];
|
|
2225
2274
|
}
|
|
2226
2275
|
interface IAuthenticateUserRequest {
|
|
2227
2276
|
username: string;
|
|
@@ -2420,16 +2469,6 @@ declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile
|
|
|
2420
2469
|
* ```
|
|
2421
2470
|
*/
|
|
2422
2471
|
declare const getRoles: (endpoint: VerdocsEndpoint) => Promise<TRole[]>;
|
|
2423
|
-
/**
|
|
2424
|
-
* Get a list of system roles.
|
|
2425
|
-
*
|
|
2426
|
-
* ```typescript
|
|
2427
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2428
|
-
*
|
|
2429
|
-
* const permissions = await Profiles.getPermissions();
|
|
2430
|
-
* ```
|
|
2431
|
-
*/
|
|
2432
|
-
declare const getPermissions: (endpoint: VerdocsEndpoint) => Promise<any>;
|
|
2433
2472
|
/**
|
|
2434
2473
|
* Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
2435
2474
|
*
|
|
@@ -2451,16 +2490,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
|
|
|
2451
2490
|
* ```
|
|
2452
2491
|
*/
|
|
2453
2492
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
2454
|
-
/**
|
|
2455
|
-
* Get a profile's permissions. The caller must have admin access to the given profile.
|
|
2456
|
-
*
|
|
2457
|
-
* ```typescript
|
|
2458
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2459
|
-
*
|
|
2460
|
-
* const permissions = await Profiles.getProfilePermissions('PROFILEID');
|
|
2461
|
-
* ```
|
|
2462
|
-
*/
|
|
2463
|
-
declare const getProfilePermissions: (endpoint: VerdocsEndpoint, profileId: string) => Promise<TPermission[]>;
|
|
2464
2493
|
/**
|
|
2465
2494
|
* Get a profile's groups.
|
|
2466
2495
|
*
|
|
@@ -2493,6 +2522,9 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2493
2522
|
* ```
|
|
2494
2523
|
*/
|
|
2495
2524
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
2525
|
+
// endpoint.api //
|
|
2526
|
+
// .post<IEnvelopeSummaries>('/envelopes/list', params, {baseURL: endpoint.getBaseURLv2()})
|
|
2527
|
+
// .then((r) => r.data);
|
|
2496
2528
|
/**
|
|
2497
2529
|
* Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
|
|
2498
2530
|
*
|
|
@@ -2531,4 +2563,4 @@ interface ISignupSurvey {
|
|
|
2531
2563
|
declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
|
|
2532
2564
|
status: "OK";
|
|
2533
2565
|
}>;
|
|
2534
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TPlan, 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, 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, getGroupByName, getGroup, getGroupMembers, addGroupMembers, deleteGroupMembers, addGroupPermission, deleteGroupPermission, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, claimNewUser, getOrganizationMembers, deleteOrganizationMember, addOrganizationMemberRole, deleteOrganizationMemberRole, getOrganizationMemberPlans, getOrganizations, createOrganization, deleteOrganization, getOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, 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, authenticateUser, authenticateApp, validateToken, refreshTokens, updatePassword, resetPassword, updateEmail, resendVerification, createUser, billingPlaceholder, getNotifications, getProfiles, getCurrentProfile, getRoles,
|
|
2566
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TPlan, 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, getGroupByName, getGroup, getGroupMembers, addGroupMembers, deleteGroupMembers, addGroupPermission, deleteGroupPermission, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, claimNewUser, getOrganizationMembers, deleteOrganizationMember, addOrganizationMemberRole, deleteOrganizationMemberRole, getOrganizationMemberPlans, getOrganizations, createOrganization, deleteOrganization, getOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, 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, authenticateUser, authenticateApp, validateToken, refreshTokens, updatePassword, resetPassword, updateEmail, resendVerification, createUser, billingPlaceholder, getNotifications, getProfiles, getCurrentProfile, getRoles, createProfile, getProfile, getProfileGroups, switchProfile, updateProfile, deleteProfile, createBusinessAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, IUpdateProfileRequest, IAuthenticateUserRequest, IAuthenticateAppRequest, IAuthenticateResponse, TokenValidationRequest, TokenValidationResponse, IUpdatePasswordRequest, UpdatePasswordResponse, UpdateEmailRequest, UpdateEmailResponse, ICreateBusinessAccountRequest, ICreateUserRequest, 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
|
@@ -89,6 +89,9 @@ interface IOrganization {
|
|
|
89
89
|
thumbnail_url: string | null;
|
|
90
90
|
primary_color: string | null;
|
|
91
91
|
secondary_color: string | null;
|
|
92
|
+
entitlements?: Record<string, any>;
|
|
93
|
+
mtd_usage?: Record<string, any>;
|
|
94
|
+
ytd_usage?: Record<string, any>;
|
|
92
95
|
data?: Record<string, any>;
|
|
93
96
|
/** Creation date/time. */
|
|
94
97
|
created_at: string;
|
|
@@ -414,6 +417,13 @@ interface IRecipient {
|
|
|
414
417
|
created_at: string;
|
|
415
418
|
updated_at: string;
|
|
416
419
|
last_attempt_at: string;
|
|
420
|
+
/**
|
|
421
|
+
* If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
|
|
422
|
+
* created from this template.
|
|
423
|
+
*/
|
|
424
|
+
kba_method: string | null;
|
|
425
|
+
kba_completed: boolean;
|
|
426
|
+
kba_details: Record<string, any>;
|
|
417
427
|
envelope?: IEnvelope;
|
|
418
428
|
profile?: IProfile;
|
|
419
429
|
}
|
|
@@ -455,6 +465,11 @@ interface IRole {
|
|
|
455
465
|
*/
|
|
456
466
|
order: number;
|
|
457
467
|
delegator?: boolean;
|
|
468
|
+
/**
|
|
469
|
+
* If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
|
|
470
|
+
* created from this template.
|
|
471
|
+
*/
|
|
472
|
+
kba_method?: string;
|
|
458
473
|
}
|
|
459
474
|
interface ISignature {
|
|
460
475
|
id: string;
|
|
@@ -508,14 +523,20 @@ interface ITemplate {
|
|
|
508
523
|
/**
|
|
509
524
|
* If true, the template is only visible to the creator. If false, the template will also be visible to the user's
|
|
510
525
|
* organization, if any.
|
|
526
|
+
* @deprecated. See "visibility".
|
|
511
527
|
*/
|
|
512
528
|
is_personal: boolean;
|
|
513
529
|
/**
|
|
514
530
|
* If true, the template is visible publicly. Note that this does not necessarily mean it is also visible to the
|
|
515
531
|
* user's organization. It may be desirable to create documents that are public but that do not appear in the
|
|
516
532
|
* organization's shared templates list. To achieve this, set both `is_personal` and `is_public` to TRUE.
|
|
533
|
+
* @deprecated. See "visibility".
|
|
517
534
|
*/
|
|
518
535
|
is_public: boolean;
|
|
536
|
+
/**
|
|
537
|
+
* If set, the visibility level for the template.
|
|
538
|
+
*/
|
|
539
|
+
visibility?: string;
|
|
519
540
|
/**
|
|
520
541
|
* If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.)
|
|
521
542
|
*/
|
|
@@ -867,6 +888,7 @@ type TEnvironment = "verdocs" | "verdocs-stage";
|
|
|
867
888
|
type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession) => void;
|
|
868
889
|
interface VerdocsEndpointOptions {
|
|
869
890
|
baseURL?: string;
|
|
891
|
+
baseURLv2?: string;
|
|
870
892
|
timeout?: number;
|
|
871
893
|
environment?: TEnvironment;
|
|
872
894
|
sessionType?: TSessionType;
|
|
@@ -897,6 +919,7 @@ declare class VerdocsEndpoint {
|
|
|
897
919
|
private environment;
|
|
898
920
|
private sessionType;
|
|
899
921
|
private baseURL;
|
|
922
|
+
private baseURLv2;
|
|
900
923
|
private clientID;
|
|
901
924
|
private timeout;
|
|
902
925
|
private token;
|
|
@@ -933,6 +956,11 @@ declare class VerdocsEndpoint {
|
|
|
933
956
|
* Get the current base URL. This should rarely be anything other than 'https://api.verdocs.com'.
|
|
934
957
|
*/
|
|
935
958
|
getBaseURL(): string;
|
|
959
|
+
/**
|
|
960
|
+
* Get the current base URL for the v2 APIs.
|
|
961
|
+
* This should rarely be anything other than 'https://api-v2.verdocs.com'.
|
|
962
|
+
*/
|
|
963
|
+
getBaseURLv2(): string;
|
|
936
964
|
/**
|
|
937
965
|
* Get the current client ID, if set.
|
|
938
966
|
*/
|
|
@@ -984,6 +1012,17 @@ declare class VerdocsEndpoint {
|
|
|
984
1012
|
* ```
|
|
985
1013
|
*/
|
|
986
1014
|
setBaseURL(url: string): VerdocsEndpoint;
|
|
1015
|
+
/**
|
|
1016
|
+
* Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
|
|
1017
|
+
*
|
|
1018
|
+
* ```typescript
|
|
1019
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1020
|
+
*
|
|
1021
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1022
|
+
* endpoint.setBaseURL('https://api.verdocs.com');
|
|
1023
|
+
* ```
|
|
1024
|
+
*/
|
|
1025
|
+
setBaseURLv2(url: string): VerdocsEndpoint;
|
|
987
1026
|
/**
|
|
988
1027
|
* Set the Client ID for Verdocs API calls.
|
|
989
1028
|
*
|
|
@@ -1291,6 +1330,13 @@ declare const listEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopes
|
|
|
1291
1330
|
page: number;
|
|
1292
1331
|
envelopes: IEnvelope[];
|
|
1293
1332
|
}>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Get all of the envelopes that were sent using a given template.
|
|
1335
|
+
* NOTE: This endpoint will be retired soon. Its response is not paginated and it is typically used only to retrieve
|
|
1336
|
+
* "submitted data" for a template. A new endpoint will be introduced to provide this function more directly.
|
|
1337
|
+
* @deprecated
|
|
1338
|
+
*/
|
|
1339
|
+
declare const getEnvelopesByTemplateId: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IEnvelope[]>;
|
|
1294
1340
|
/**
|
|
1295
1341
|
* Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
|
|
1296
1342
|
* an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
|
|
@@ -2221,7 +2267,10 @@ interface ISwitchProfileResponse {
|
|
|
2221
2267
|
interface IUpdateProfileRequest {
|
|
2222
2268
|
first_name?: string;
|
|
2223
2269
|
last_name?: string;
|
|
2270
|
+
// email?: string;
|
|
2224
2271
|
phone?: string;
|
|
2272
|
+
permissions?: TPermission[];
|
|
2273
|
+
roles?: TRole[];
|
|
2225
2274
|
}
|
|
2226
2275
|
interface IAuthenticateUserRequest {
|
|
2227
2276
|
username: string;
|
|
@@ -2420,16 +2469,6 @@ declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile
|
|
|
2420
2469
|
* ```
|
|
2421
2470
|
*/
|
|
2422
2471
|
declare const getRoles: (endpoint: VerdocsEndpoint) => Promise<TRole[]>;
|
|
2423
|
-
/**
|
|
2424
|
-
* Get a list of system roles.
|
|
2425
|
-
*
|
|
2426
|
-
* ```typescript
|
|
2427
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2428
|
-
*
|
|
2429
|
-
* const permissions = await Profiles.getPermissions();
|
|
2430
|
-
* ```
|
|
2431
|
-
*/
|
|
2432
|
-
declare const getPermissions: (endpoint: VerdocsEndpoint) => Promise<any>;
|
|
2433
2472
|
/**
|
|
2434
2473
|
* Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
2435
2474
|
*
|
|
@@ -2451,16 +2490,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
|
|
|
2451
2490
|
* ```
|
|
2452
2491
|
*/
|
|
2453
2492
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
2454
|
-
/**
|
|
2455
|
-
* Get a profile's permissions. The caller must have admin access to the given profile.
|
|
2456
|
-
*
|
|
2457
|
-
* ```typescript
|
|
2458
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
2459
|
-
*
|
|
2460
|
-
* const permissions = await Profiles.getProfilePermissions('PROFILEID');
|
|
2461
|
-
* ```
|
|
2462
|
-
*/
|
|
2463
|
-
declare const getProfilePermissions: (endpoint: VerdocsEndpoint, profileId: string) => Promise<TPermission[]>;
|
|
2464
2493
|
/**
|
|
2465
2494
|
* Get a profile's groups.
|
|
2466
2495
|
*
|
|
@@ -2493,6 +2522,9 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2493
2522
|
* ```
|
|
2494
2523
|
*/
|
|
2495
2524
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
2525
|
+
// endpoint.api //
|
|
2526
|
+
// .post<IEnvelopeSummaries>('/envelopes/list', params, {baseURL: endpoint.getBaseURLv2()})
|
|
2527
|
+
// .then((r) => r.data);
|
|
2496
2528
|
/**
|
|
2497
2529
|
* Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
|
|
2498
2530
|
*
|
|
@@ -2531,4 +2563,4 @@ interface ISignupSurvey {
|
|
|
2531
2563
|
declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
|
|
2532
2564
|
status: "OK";
|
|
2533
2565
|
}>;
|
|
2534
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TPlan, 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, 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, getGroupByName, getGroup, getGroupMembers, addGroupMembers, deleteGroupMembers, addGroupPermission, deleteGroupPermission, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, claimNewUser, getOrganizationMembers, deleteOrganizationMember, addOrganizationMemberRole, deleteOrganizationMemberRole, getOrganizationMemberPlans, getOrganizations, createOrganization, deleteOrganization, getOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, 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, authenticateUser, authenticateApp, validateToken, refreshTokens, updatePassword, resetPassword, updateEmail, resendVerification, createUser, billingPlaceholder, getNotifications, getProfiles, getCurrentProfile, getRoles,
|
|
2566
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TPlan, 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, getGroupByName, getGroup, getGroupMembers, addGroupMembers, deleteGroupMembers, addGroupPermission, deleteGroupPermission, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, claimNewUser, getOrganizationMembers, deleteOrganizationMember, addOrganizationMemberRole, deleteOrganizationMemberRole, getOrganizationMemberPlans, getOrganizations, createOrganization, deleteOrganization, getOrganization, updateOrganization, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, 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, authenticateUser, authenticateApp, validateToken, refreshTokens, updatePassword, resetPassword, updateEmail, resendVerification, createUser, billingPlaceholder, getNotifications, getProfiles, getCurrentProfile, getRoles, createProfile, getProfile, getProfileGroups, switchProfile, updateProfile, deleteProfile, createBusinessAccount, ISignupSurvey, recordSignupSurvey, ICreateProfileRequest, ISwitchProfileResponse, IUpdateProfileRequest, IAuthenticateUserRequest, IAuthenticateAppRequest, IAuthenticateResponse, TokenValidationRequest, TokenValidationResponse, IUpdatePasswordRequest, UpdatePasswordResponse, UpdateEmailRequest, UpdateEmailResponse, ICreateBusinessAccountRequest, ICreateUserRequest, 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 };
|