@verdocs/js-sdk 4.2.80 → 4.2.82

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
@@ -920,6 +920,7 @@ declare const FIELD_TYPES: TFieldType[];
920
920
  declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
921
921
  declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
922
922
  declare const WEBHOOK_EVENTS: string[];
923
+ declare const ALL_PERMISSIONS: string[];
923
924
  type TEnvironment = "" | "beta";
924
925
  type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession, profile: IProfile | null) => void;
925
926
  interface VerdocsEndpointOptions {
@@ -1767,12 +1768,13 @@ declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pic
1767
1768
  */
1768
1769
  declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
1769
1770
  /**
1770
- * Get a list of groups for a given organization. The caller must have admin access to the organization.
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.
1771
1773
  *
1772
1774
  * ```typescript
1773
1775
  * import {getGroups} from '@verdocs/js-sdk';
1774
1776
  *
1775
- * const groups = await getGroups(ORGID);
1777
+ * const groups = await getGroups();
1776
1778
  * ```
1777
1779
  */
1778
1780
  declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
@@ -1782,20 +1784,66 @@ declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
1782
1784
  * ```typescript
1783
1785
  * import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
1784
1786
  *
1785
- * const groups = await getGroup(GROUPID);
1787
+ * const group = await getGroup(GROUPID);
1786
1788
  * ```
1787
1789
  */
1788
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
+ */
1789
1800
  declare const createGroup: (endpoint: VerdocsEndpoint, params: {
1790
1801
  name: string;
1791
1802
  permissions: TPermission[];
1792
1803
  }) => Promise<any>;
1793
- declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
1794
- declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
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
+ */
1795
1813
  declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
1796
1814
  name: string;
1797
1815
  permissions: TPermission[];
1798
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>;
1799
1847
  interface ICreateProfileRequest {
1800
1848
  email: string;
1801
1849
  password: string;
@@ -2746,4 +2794,4 @@ declare const decodeJWTBody: (token: string) => any;
2746
2794
  * the presence of the `document_id` field, which will only be present for signing sessions.
2747
2795
  */
2748
2796
  declare const decodeAccessTokenBody: (token: string) => TSession;
2749
- 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, 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, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, 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 };
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
@@ -920,6 +920,7 @@ declare const FIELD_TYPES: TFieldType[];
920
920
  declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
921
921
  declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
922
922
  declare const WEBHOOK_EVENTS: string[];
923
+ declare const ALL_PERMISSIONS: string[];
923
924
  type TEnvironment = "" | "beta";
924
925
  type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession, profile: IProfile | null) => void;
925
926
  interface VerdocsEndpointOptions {
@@ -1767,12 +1768,13 @@ declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pic
1767
1768
  */
1768
1769
  declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
1769
1770
  /**
1770
- * Get a list of groups for a given organization. The caller must have admin access to the organization.
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.
1771
1773
  *
1772
1774
  * ```typescript
1773
1775
  * import {getGroups} from '@verdocs/js-sdk';
1774
1776
  *
1775
- * const groups = await getGroups(ORGID);
1777
+ * const groups = await getGroups();
1776
1778
  * ```
1777
1779
  */
1778
1780
  declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
@@ -1782,20 +1784,66 @@ declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
1782
1784
  * ```typescript
1783
1785
  * import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
1784
1786
  *
1785
- * const groups = await getGroup(GROUPID);
1787
+ * const group = await getGroup(GROUPID);
1786
1788
  * ```
1787
1789
  */
1788
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
+ */
1789
1800
  declare const createGroup: (endpoint: VerdocsEndpoint, params: {
1790
1801
  name: string;
1791
1802
  permissions: TPermission[];
1792
1803
  }) => Promise<any>;
1793
- declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
1794
- declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
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
+ */
1795
1813
  declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
1796
1814
  name: string;
1797
1815
  permissions: TPermission[];
1798
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>;
1799
1847
  interface ICreateProfileRequest {
1800
1848
  email: string;
1801
1849
  password: string;
@@ -2746,4 +2794,4 @@ declare const decodeJWTBody: (token: string) => any;
2746
2794
  * the presence of the `document_id` field, which will only be present for signing sessions.
2747
2795
  */
2748
2796
  declare const decodeAccessTokenBody: (token: string) => TSession;
2749
- 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, 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, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, 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 };
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
@@ -51,6 +51,39 @@ const WEBHOOK_EVENTS = [
51
51
  'template_deleted',
52
52
  'template_used',
53
53
  ];
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',
61
+ 'template:creator:create:public',
62
+ 'template:creator:create:org',
63
+ 'template:creator:create:personal',
64
+ 'template:creator:delete',
65
+ 'template:creator:visibility',
66
+ 'template:member:read',
67
+ 'template:member:write',
68
+ 'template:member:delete',
69
+ 'template:member:visibility',
70
+ 'owner:add',
71
+ 'owner:remove',
72
+ 'admin:add',
73
+ 'admin:remove',
74
+ 'member:view',
75
+ 'member:add',
76
+ 'member:remove',
77
+ 'org:create',
78
+ 'org:view',
79
+ 'org:update',
80
+ 'org:delete',
81
+ 'org:transfer',
82
+ 'org:list',
83
+ 'envelope:create',
84
+ 'envelope:cancel',
85
+ 'envelope:view',
86
+ ];
54
87
 
55
88
  /**
56
89
  * Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
@@ -1941,12 +1974,13 @@ const updateOrganizationContact = (endpoint, profileId, params) => endpoint.api
1941
1974
  * @module
1942
1975
  */
1943
1976
  /**
1944
- * Get a list of groups for a given organization. The caller must have admin access to the organization.
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.
1945
1979
  *
1946
1980
  * ```typescript
1947
1981
  * import {getGroups} from '@verdocs/js-sdk';
1948
1982
  *
1949
- * const groups = await getGroups(ORGID);
1983
+ * const groups = await getGroups();
1950
1984
  * ```
1951
1985
  */
1952
1986
  const getGroups = (endpoint) => endpoint.api //
@@ -1958,24 +1992,72 @@ const getGroups = (endpoint) => endpoint.api //
1958
1992
  * ```typescript
1959
1993
  * import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
1960
1994
  *
1961
- * const groups = await getGroup(GROUPID);
1995
+ * const group = await getGroup(GROUPID);
1962
1996
  * ```
1963
1997
  */
1964
1998
  const getGroup = (endpoint, groupId) => endpoint.api //
1965
1999
  .get(`/v2/organization-groups/${groupId}`)
1966
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
+ */
1967
2010
  const createGroup = (endpoint, params) => endpoint.api //
1968
2011
  .post('/v2/organization-groups', params)
1969
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
+ */
1970
2046
  const addGroupMember = (endpoint, groupId, profile_id) => endpoint.api //
1971
2047
  .post(`/v2/organization-groups/${groupId}/members`, { profile_id })
1972
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
+ */
1973
2058
  const deleteGroupMember = (endpoint, groupId, profile_id) => endpoint.api //
1974
2059
  .delete(`/v2/organization-groups/${groupId}/members/${profile_id}`)
1975
2060
  .then((r) => r.data);
1976
- const updateGroup = (endpoint, groupId, params) => endpoint.api //
1977
- .patch(`/v2/organization-groups/${groupId}`, params)
1978
- .then((r) => r.data);
1979
2061
 
1980
2062
  /**
1981
2063
  * An invitation represents an opportunity for a Member to join an Organization.
@@ -2894,6 +2976,7 @@ const isValidRoleName = (value, roles) => roles.findIndex((role) => role.name ==
2894
2976
  const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
2895
2977
  const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
2896
2978
 
2979
+ exports.ALL_PERMISSIONS = ALL_PERMISSIONS;
2897
2980
  exports.AtoB = AtoB;
2898
2981
  exports.Countries = Countries;
2899
2982
  exports.DEFAULT_FIELD_HEIGHTS = DEFAULT_FIELD_HEIGHTS;
@@ -2935,6 +3018,7 @@ exports.deleteApiKey = deleteApiKey;
2935
3018
  exports.deleteEnvelopeFieldAttachment = deleteEnvelopeFieldAttachment;
2936
3019
  exports.deleteEnvelopeReminder = deleteEnvelopeReminder;
2937
3020
  exports.deleteField = deleteField;
3021
+ exports.deleteGroup = deleteGroup;
2938
3022
  exports.deleteGroupMember = deleteGroupMember;
2939
3023
  exports.deleteOrganizationContact = deleteOrganizationContact;
2940
3024
  exports.deleteOrganizationInvitation = deleteOrganizationInvitation;