@verdocs/js-sdk 4.0.6 → 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 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
  *
@@ -2228,7 +2267,10 @@ interface ISwitchProfileResponse {
2228
2267
  interface IUpdateProfileRequest {
2229
2268
  first_name?: string;
2230
2269
  last_name?: string;
2270
+ // email?: string;
2231
2271
  phone?: string;
2272
+ permissions?: TPermission[];
2273
+ roles?: TRole[];
2232
2274
  }
2233
2275
  interface IAuthenticateUserRequest {
2234
2276
  username: string;
@@ -2427,16 +2469,6 @@ declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile
2427
2469
  * ```
2428
2470
  */
2429
2471
  declare const getRoles: (endpoint: VerdocsEndpoint) => Promise<TRole[]>;
2430
- /**
2431
- * Get a list of system roles.
2432
- *
2433
- * ```typescript
2434
- * import {Profiles} from '@verdocs/js-sdk/Users';
2435
- *
2436
- * const permissions = await Profiles.getPermissions();
2437
- * ```
2438
- */
2439
- declare const getPermissions: (endpoint: VerdocsEndpoint) => Promise<any>;
2440
2472
  /**
2441
2473
  * Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
2442
2474
  *
@@ -2458,16 +2490,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
2458
2490
  * ```
2459
2491
  */
2460
2492
  declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
2461
- /**
2462
- * Get a profile's permissions. The caller must have admin access to the given profile.
2463
- *
2464
- * ```typescript
2465
- * import {Profiles} from '@verdocs/js-sdk/Users';
2466
- *
2467
- * const permissions = await Profiles.getProfilePermissions('PROFILEID');
2468
- * ```
2469
- */
2470
- declare const getProfilePermissions: (endpoint: VerdocsEndpoint, profileId: string) => Promise<TPermission[]>;
2471
2493
  /**
2472
2494
  * Get a profile's groups.
2473
2495
  *
@@ -2500,6 +2522,9 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
2500
2522
  * ```
2501
2523
  */
2502
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);
2503
2528
  /**
2504
2529
  * Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
2505
2530
  *
@@ -2538,4 +2563,4 @@ interface ISignupSurvey {
2538
2563
  declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
2539
2564
  status: "OK";
2540
2565
  }>;
2541
- 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, getPermissions, createProfile, getProfile, getProfilePermissions, 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 };
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
  *
@@ -2228,7 +2267,10 @@ interface ISwitchProfileResponse {
2228
2267
  interface IUpdateProfileRequest {
2229
2268
  first_name?: string;
2230
2269
  last_name?: string;
2270
+ // email?: string;
2231
2271
  phone?: string;
2272
+ permissions?: TPermission[];
2273
+ roles?: TRole[];
2232
2274
  }
2233
2275
  interface IAuthenticateUserRequest {
2234
2276
  username: string;
@@ -2427,16 +2469,6 @@ declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile
2427
2469
  * ```
2428
2470
  */
2429
2471
  declare const getRoles: (endpoint: VerdocsEndpoint) => Promise<TRole[]>;
2430
- /**
2431
- * Get a list of system roles.
2432
- *
2433
- * ```typescript
2434
- * import {Profiles} from '@verdocs/js-sdk/Users';
2435
- *
2436
- * const permissions = await Profiles.getPermissions();
2437
- * ```
2438
- */
2439
- declare const getPermissions: (endpoint: VerdocsEndpoint) => Promise<any>;
2440
2472
  /**
2441
2473
  * Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
2442
2474
  *
@@ -2458,16 +2490,6 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileR
2458
2490
  * ```
2459
2491
  */
2460
2492
  declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
2461
- /**
2462
- * Get a profile's permissions. The caller must have admin access to the given profile.
2463
- *
2464
- * ```typescript
2465
- * import {Profiles} from '@verdocs/js-sdk/Users';
2466
- *
2467
- * const permissions = await Profiles.getProfilePermissions('PROFILEID');
2468
- * ```
2469
- */
2470
- declare const getProfilePermissions: (endpoint: VerdocsEndpoint, profileId: string) => Promise<TPermission[]>;
2471
2493
  /**
2472
2494
  * Get a profile's groups.
2473
2495
  *
@@ -2500,6 +2522,9 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
2500
2522
  * ```
2501
2523
  */
2502
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);
2503
2528
  /**
2504
2529
  * Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
2505
2530
  *
@@ -2538,4 +2563,4 @@ interface ISignupSurvey {
2538
2563
  declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
2539
2564
  status: "OK";
2540
2565
  }>;
2541
- 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, getPermissions, createProfile, getProfile, getProfilePermissions, 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 };
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 };