@verdocs/js-sdk 4.2.81 → 4.2.83
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 -6
- package/dist/index.d.ts +53 -6
- package/dist/index.js +64 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -9
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1768,12 +1768,13 @@ declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pic
|
|
|
1768
1768
|
*/
|
|
1769
1769
|
declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
|
|
1770
1770
|
/**
|
|
1771
|
-
* Get a list of groups for
|
|
1771
|
+
* Get a list of groups for the caller's organization. NOTE: Any organization member may request
|
|
1772
|
+
* the list of groups, but only Owners and Admins may update them.
|
|
1772
1773
|
*
|
|
1773
1774
|
* ```typescript
|
|
1774
1775
|
* import {getGroups} from '@verdocs/js-sdk';
|
|
1775
1776
|
*
|
|
1776
|
-
* const groups = await getGroups(
|
|
1777
|
+
* const groups = await getGroups();
|
|
1777
1778
|
* ```
|
|
1778
1779
|
*/
|
|
1779
1780
|
declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
|
|
@@ -1783,20 +1784,66 @@ declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
|
|
|
1783
1784
|
* ```typescript
|
|
1784
1785
|
* import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
|
|
1785
1786
|
*
|
|
1786
|
-
* const
|
|
1787
|
+
* const group = await getGroup(GROUPID);
|
|
1787
1788
|
* ```
|
|
1788
1789
|
*/
|
|
1789
1790
|
declare const getGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<IGroup>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Create a group. Note that "everyone" is a reserved name and may not be created.
|
|
1793
|
+
*
|
|
1794
|
+
* ```typescript
|
|
1795
|
+
* import {createGroup} from '@verdocs/js-sdk';
|
|
1796
|
+
*
|
|
1797
|
+
* const group = await createGroup(VerdocsEndpoint.getDefault(), {name:'newgroup'});
|
|
1798
|
+
* ```
|
|
1799
|
+
*/
|
|
1790
1800
|
declare const createGroup: (endpoint: VerdocsEndpoint, params: {
|
|
1791
1801
|
name: string;
|
|
1792
1802
|
permissions: TPermission[];
|
|
1793
1803
|
}) => Promise<any>;
|
|
1794
|
-
|
|
1795
|
-
|
|
1804
|
+
/**
|
|
1805
|
+
* Update a group. Note that "everyone" is a reserved name and may not be changed.
|
|
1806
|
+
*
|
|
1807
|
+
* ```typescript
|
|
1808
|
+
* import {updateGroup} from '@verdocs/js-sdk';
|
|
1809
|
+
*
|
|
1810
|
+
* const updated = await updateGroup(VerdocsEndpoint.getDefault(), {name:'newname'});
|
|
1811
|
+
* ```
|
|
1812
|
+
*/
|
|
1796
1813
|
declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
|
|
1797
1814
|
name: string;
|
|
1798
1815
|
permissions: TPermission[];
|
|
1799
1816
|
}) => Promise<any>;
|
|
1817
|
+
/**
|
|
1818
|
+
* Get an organization by ID. Note that the "everyone" group cannot be deleted.
|
|
1819
|
+
*
|
|
1820
|
+
* ```typescript
|
|
1821
|
+
* import {deleteGroup} from '@verdocs/js-sdk';
|
|
1822
|
+
*
|
|
1823
|
+
* await deleteGroup(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1824
|
+
* ```
|
|
1825
|
+
*/
|
|
1826
|
+
declare const deleteGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<any>;
|
|
1827
|
+
/**
|
|
1828
|
+
* Add a member to a group.
|
|
1829
|
+
*
|
|
1830
|
+
* ```typescript
|
|
1831
|
+
* import {addGroupMember} from '@verdocs/js-sdk';
|
|
1832
|
+
*
|
|
1833
|
+
* await addGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
|
|
1834
|
+
* ```
|
|
1835
|
+
*/
|
|
1836
|
+
declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1837
|
+
/**
|
|
1838
|
+
* Remove a member from a group.
|
|
1839
|
+
*
|
|
1840
|
+
* ```typescript
|
|
1841
|
+
* import {deleteGroupMember} from '@verdocs/js-sdk';
|
|
1842
|
+
*
|
|
1843
|
+
* await deleteGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
|
|
1844
|
+
* ```
|
|
1845
|
+
*/
|
|
1846
|
+
declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1800
1847
|
interface ICreateProfileRequest {
|
|
1801
1848
|
email: string;
|
|
1802
1849
|
password: string;
|
|
@@ -2747,4 +2794,4 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2747
2794
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2748
2795
|
*/
|
|
2749
2796
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2750
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember,
|
|
2797
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, 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, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|
package/dist/index.d.ts
CHANGED
|
@@ -1768,12 +1768,13 @@ declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pic
|
|
|
1768
1768
|
*/
|
|
1769
1769
|
declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
|
|
1770
1770
|
/**
|
|
1771
|
-
* Get a list of groups for
|
|
1771
|
+
* Get a list of groups for the caller's organization. NOTE: Any organization member may request
|
|
1772
|
+
* the list of groups, but only Owners and Admins may update them.
|
|
1772
1773
|
*
|
|
1773
1774
|
* ```typescript
|
|
1774
1775
|
* import {getGroups} from '@verdocs/js-sdk';
|
|
1775
1776
|
*
|
|
1776
|
-
* const groups = await getGroups(
|
|
1777
|
+
* const groups = await getGroups();
|
|
1777
1778
|
* ```
|
|
1778
1779
|
*/
|
|
1779
1780
|
declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
|
|
@@ -1783,20 +1784,66 @@ declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
|
|
|
1783
1784
|
* ```typescript
|
|
1784
1785
|
* import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
|
|
1785
1786
|
*
|
|
1786
|
-
* const
|
|
1787
|
+
* const group = await getGroup(GROUPID);
|
|
1787
1788
|
* ```
|
|
1788
1789
|
*/
|
|
1789
1790
|
declare const getGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<IGroup>;
|
|
1791
|
+
/**
|
|
1792
|
+
* Create a group. Note that "everyone" is a reserved name and may not be created.
|
|
1793
|
+
*
|
|
1794
|
+
* ```typescript
|
|
1795
|
+
* import {createGroup} from '@verdocs/js-sdk';
|
|
1796
|
+
*
|
|
1797
|
+
* const group = await createGroup(VerdocsEndpoint.getDefault(), {name:'newgroup'});
|
|
1798
|
+
* ```
|
|
1799
|
+
*/
|
|
1790
1800
|
declare const createGroup: (endpoint: VerdocsEndpoint, params: {
|
|
1791
1801
|
name: string;
|
|
1792
1802
|
permissions: TPermission[];
|
|
1793
1803
|
}) => Promise<any>;
|
|
1794
|
-
|
|
1795
|
-
|
|
1804
|
+
/**
|
|
1805
|
+
* Update a group. Note that "everyone" is a reserved name and may not be changed.
|
|
1806
|
+
*
|
|
1807
|
+
* ```typescript
|
|
1808
|
+
* import {updateGroup} from '@verdocs/js-sdk';
|
|
1809
|
+
*
|
|
1810
|
+
* const updated = await updateGroup(VerdocsEndpoint.getDefault(), {name:'newname'});
|
|
1811
|
+
* ```
|
|
1812
|
+
*/
|
|
1796
1813
|
declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
|
|
1797
1814
|
name: string;
|
|
1798
1815
|
permissions: TPermission[];
|
|
1799
1816
|
}) => Promise<any>;
|
|
1817
|
+
/**
|
|
1818
|
+
* Get an organization by ID. Note that the "everyone" group cannot be deleted.
|
|
1819
|
+
*
|
|
1820
|
+
* ```typescript
|
|
1821
|
+
* import {deleteGroup} from '@verdocs/js-sdk';
|
|
1822
|
+
*
|
|
1823
|
+
* await deleteGroup(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1824
|
+
* ```
|
|
1825
|
+
*/
|
|
1826
|
+
declare const deleteGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<any>;
|
|
1827
|
+
/**
|
|
1828
|
+
* Add a member to a group.
|
|
1829
|
+
*
|
|
1830
|
+
* ```typescript
|
|
1831
|
+
* import {addGroupMember} from '@verdocs/js-sdk';
|
|
1832
|
+
*
|
|
1833
|
+
* await addGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
|
|
1834
|
+
* ```
|
|
1835
|
+
*/
|
|
1836
|
+
declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1837
|
+
/**
|
|
1838
|
+
* Remove a member from a group.
|
|
1839
|
+
*
|
|
1840
|
+
* ```typescript
|
|
1841
|
+
* import {deleteGroupMember} from '@verdocs/js-sdk';
|
|
1842
|
+
*
|
|
1843
|
+
* await deleteGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
|
|
1844
|
+
* ```
|
|
1845
|
+
*/
|
|
1846
|
+
declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
|
|
1800
1847
|
interface ICreateProfileRequest {
|
|
1801
1848
|
email: string;
|
|
1802
1849
|
password: string;
|
|
@@ -2747,4 +2794,4 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2747
2794
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2748
2795
|
*/
|
|
2749
2796
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2750
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, addGroupMember, deleteGroupMember,
|
|
2797
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, 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, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,12 @@ const WEBHOOK_EVENTS = [
|
|
|
52
52
|
'template_used',
|
|
53
53
|
];
|
|
54
54
|
const ALL_PERMISSIONS = [
|
|
55
|
+
// TODO: Are these permissions still relevant?
|
|
56
|
+
// 'member:view',
|
|
57
|
+
// 'org:create',
|
|
58
|
+
// 'org:view',
|
|
59
|
+
// 'org:list',
|
|
60
|
+
// 'org:transfer',
|
|
55
61
|
'template:creator:create:public',
|
|
56
62
|
'template:creator:create:org',
|
|
57
63
|
'template:creator:create:personal',
|
|
@@ -1968,12 +1974,13 @@ const updateOrganizationContact = (endpoint, profileId, params) => endpoint.api
|
|
|
1968
1974
|
* @module
|
|
1969
1975
|
*/
|
|
1970
1976
|
/**
|
|
1971
|
-
* Get a list of groups for
|
|
1977
|
+
* Get a list of groups for the caller's organization. NOTE: Any organization member may request
|
|
1978
|
+
* the list of groups, but only Owners and Admins may update them.
|
|
1972
1979
|
*
|
|
1973
1980
|
* ```typescript
|
|
1974
1981
|
* import {getGroups} from '@verdocs/js-sdk';
|
|
1975
1982
|
*
|
|
1976
|
-
* const groups = await getGroups(
|
|
1983
|
+
* const groups = await getGroups();
|
|
1977
1984
|
* ```
|
|
1978
1985
|
*/
|
|
1979
1986
|
const getGroups = (endpoint) => endpoint.api //
|
|
@@ -1985,24 +1992,72 @@ const getGroups = (endpoint) => endpoint.api //
|
|
|
1985
1992
|
* ```typescript
|
|
1986
1993
|
* import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
|
|
1987
1994
|
*
|
|
1988
|
-
* const
|
|
1995
|
+
* const group = await getGroup(GROUPID);
|
|
1989
1996
|
* ```
|
|
1990
1997
|
*/
|
|
1991
1998
|
const getGroup = (endpoint, groupId) => endpoint.api //
|
|
1992
1999
|
.get(`/v2/organization-groups/${groupId}`)
|
|
1993
2000
|
.then((r) => r.data);
|
|
2001
|
+
/**
|
|
2002
|
+
* Create a group. Note that "everyone" is a reserved name and may not be created.
|
|
2003
|
+
*
|
|
2004
|
+
* ```typescript
|
|
2005
|
+
* import {createGroup} from '@verdocs/js-sdk';
|
|
2006
|
+
*
|
|
2007
|
+
* const group = await createGroup(VerdocsEndpoint.getDefault(), {name:'newgroup'});
|
|
2008
|
+
* ```
|
|
2009
|
+
*/
|
|
1994
2010
|
const createGroup = (endpoint, params) => endpoint.api //
|
|
1995
2011
|
.post('/v2/organization-groups', params)
|
|
1996
2012
|
.then((r) => r.data);
|
|
2013
|
+
/**
|
|
2014
|
+
* Update a group. Note that "everyone" is a reserved name and may not be changed.
|
|
2015
|
+
*
|
|
2016
|
+
* ```typescript
|
|
2017
|
+
* import {updateGroup} from '@verdocs/js-sdk';
|
|
2018
|
+
*
|
|
2019
|
+
* const updated = await updateGroup(VerdocsEndpoint.getDefault(), {name:'newname'});
|
|
2020
|
+
* ```
|
|
2021
|
+
*/
|
|
2022
|
+
const updateGroup = (endpoint, groupId, params) => endpoint.api //
|
|
2023
|
+
.patch(`/v2/organization-groups/${groupId}`, params)
|
|
2024
|
+
.then((r) => r.data);
|
|
2025
|
+
/**
|
|
2026
|
+
* Get an organization by ID. Note that the "everyone" group cannot be deleted.
|
|
2027
|
+
*
|
|
2028
|
+
* ```typescript
|
|
2029
|
+
* import {deleteGroup} from '@verdocs/js-sdk';
|
|
2030
|
+
*
|
|
2031
|
+
* await deleteGroup(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
2032
|
+
* ```
|
|
2033
|
+
*/
|
|
2034
|
+
const deleteGroup = (endpoint, groupId) => endpoint.api //
|
|
2035
|
+
.delete(`/v2/organization-groups/${groupId}`)
|
|
2036
|
+
.then((r) => r.data);
|
|
2037
|
+
/**
|
|
2038
|
+
* Add a member to a group.
|
|
2039
|
+
*
|
|
2040
|
+
* ```typescript
|
|
2041
|
+
* import {addGroupMember} from '@verdocs/js-sdk';
|
|
2042
|
+
*
|
|
2043
|
+
* await addGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
|
|
2044
|
+
* ```
|
|
2045
|
+
*/
|
|
1997
2046
|
const addGroupMember = (endpoint, groupId, profile_id) => endpoint.api //
|
|
1998
2047
|
.post(`/v2/organization-groups/${groupId}/members`, { profile_id })
|
|
1999
2048
|
.then((r) => r.data);
|
|
2049
|
+
/**
|
|
2050
|
+
* Remove a member from a group.
|
|
2051
|
+
*
|
|
2052
|
+
* ```typescript
|
|
2053
|
+
* import {deleteGroupMember} from '@verdocs/js-sdk';
|
|
2054
|
+
*
|
|
2055
|
+
* await deleteGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
|
|
2056
|
+
* ```
|
|
2057
|
+
*/
|
|
2000
2058
|
const deleteGroupMember = (endpoint, groupId, profile_id) => endpoint.api //
|
|
2001
2059
|
.delete(`/v2/organization-groups/${groupId}/members/${profile_id}`)
|
|
2002
2060
|
.then((r) => r.data);
|
|
2003
|
-
const updateGroup = (endpoint, groupId, params) => endpoint.api //
|
|
2004
|
-
.patch(`/v2/organization-groups/${groupId}`, params)
|
|
2005
|
-
.then((r) => r.data);
|
|
2006
2061
|
|
|
2007
2062
|
/**
|
|
2008
2063
|
* An invitation represents an opportunity for a Member to join an Organization.
|
|
@@ -2212,7 +2267,7 @@ const updateOrganizationThumbnail = (endpoint, organizationId, file, onUploadPro
|
|
|
2212
2267
|
* ```
|
|
2213
2268
|
*/
|
|
2214
2269
|
const getWebhooks = (endpoint) => endpoint.api //
|
|
2215
|
-
.get(`/v2/webhooks
|
|
2270
|
+
.get(`/v2/webhooks`)
|
|
2216
2271
|
.then((r) => r.data);
|
|
2217
2272
|
/**
|
|
2218
2273
|
* Update the registered Webhook configuration for the caller's organization. Note that
|
|
@@ -2226,7 +2281,7 @@ const getWebhooks = (endpoint) => endpoint.api //
|
|
|
2226
2281
|
* ```
|
|
2227
2282
|
*/
|
|
2228
2283
|
const setWebhooks = (endpoint, params) => endpoint.api //
|
|
2229
|
-
.patch(`/v2/webhooks
|
|
2284
|
+
.patch(`/v2/webhooks`, params)
|
|
2230
2285
|
.then((r) => r.data);
|
|
2231
2286
|
|
|
2232
2287
|
/**
|
|
@@ -2963,6 +3018,7 @@ exports.deleteApiKey = deleteApiKey;
|
|
|
2963
3018
|
exports.deleteEnvelopeFieldAttachment = deleteEnvelopeFieldAttachment;
|
|
2964
3019
|
exports.deleteEnvelopeReminder = deleteEnvelopeReminder;
|
|
2965
3020
|
exports.deleteField = deleteField;
|
|
3021
|
+
exports.deleteGroup = deleteGroup;
|
|
2966
3022
|
exports.deleteGroupMember = deleteGroupMember;
|
|
2967
3023
|
exports.deleteOrganizationContact = deleteOrganizationContact;
|
|
2968
3024
|
exports.deleteOrganizationInvitation = deleteOrganizationInvitation;
|