@verdocs/js-sdk 4.1.9 → 4.1.10
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 +32 -23
- package/dist/index.d.ts +32 -23
- package/dist/index.js +43 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -31
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1752,44 +1752,54 @@ declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: s
|
|
|
1752
1752
|
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "permissions">) => Promise<any>;
|
|
1753
1753
|
/**
|
|
1754
1754
|
* Get a list of organizations the caller is a member of.
|
|
1755
|
+
*
|
|
1756
|
+
* ```typescript
|
|
1757
|
+
* import {getOrganizations} from '@verdocs/js-sdk';
|
|
1758
|
+
*
|
|
1759
|
+
* const organizations = await getOrganizations(VerdocsEndpoint.getDefault());
|
|
1760
|
+
* ```
|
|
1755
1761
|
*/
|
|
1756
1762
|
declare const getOrganizations: (endpoint: VerdocsEndpoint) => Promise<IOrganization[]>;
|
|
1757
1763
|
/**
|
|
1758
1764
|
* Get an organization by ID.
|
|
1765
|
+
*
|
|
1766
|
+
* ```typescript
|
|
1767
|
+
* import {getOrganization} from '@verdocs/js-sdk';
|
|
1768
|
+
*
|
|
1769
|
+
* const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1770
|
+
* ```
|
|
1759
1771
|
*/
|
|
1760
1772
|
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
1761
1773
|
/**
|
|
1762
|
-
*
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
*
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
/**
|
|
1770
|
-
* Update an organization.
|
|
1774
|
+
* Update an organization. This can only be called by an admin or owner.
|
|
1775
|
+
*
|
|
1776
|
+
* ```typescript
|
|
1777
|
+
* import {updateOrganization} from '@verdocs/js-sdk';
|
|
1778
|
+
*
|
|
1779
|
+
* const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
|
|
1780
|
+
* ```
|
|
1771
1781
|
*/
|
|
1772
1782
|
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1773
1783
|
/**
|
|
1774
|
-
* Update the organization's logo. This can only be called by an admin or owner
|
|
1784
|
+
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1775
1785
|
*
|
|
1776
1786
|
* ```typescript
|
|
1777
1787
|
* import {uploadOrganizationLogo} from '@verdocs/js-sdk';
|
|
1778
1788
|
*
|
|
1779
|
-
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), file);
|
|
1789
|
+
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1780
1790
|
* ```
|
|
1781
1791
|
*/
|
|
1782
|
-
declare const uploadOrganizationLogo: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1792
|
+
declare const uploadOrganizationLogo: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1783
1793
|
/**
|
|
1784
|
-
* Update the organization's thumbnail. This can only be called by an admin or owner
|
|
1794
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1785
1795
|
*
|
|
1786
1796
|
* ```typescript
|
|
1787
1797
|
* import {uploadOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1788
1798
|
*
|
|
1789
|
-
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), file);
|
|
1799
|
+
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1790
1800
|
* ```
|
|
1791
1801
|
*/
|
|
1792
|
-
declare const uploadOrganizationThumbnail: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1802
|
+
declare const uploadOrganizationThumbnail: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1793
1803
|
/**
|
|
1794
1804
|
* Get the registered Webhooks for the caller's organization.
|
|
1795
1805
|
*/
|
|
@@ -2609,18 +2619,17 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2609
2619
|
* ```typescript
|
|
2610
2620
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2611
2621
|
*
|
|
2612
|
-
* const profiles = await getCurrentProfile();
|
|
2622
|
+
* const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
|
|
2613
2623
|
* ```
|
|
2614
2624
|
*/
|
|
2615
2625
|
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
|
|
2616
2626
|
/**
|
|
2617
2627
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2618
|
-
* TODO: Add a "public" profile endpoint for public pages
|
|
2619
2628
|
*
|
|
2620
2629
|
* ```typescript
|
|
2621
2630
|
* import {getProfile} from '@verdocs/js-sdk';
|
|
2622
2631
|
*
|
|
2623
|
-
* const profile = await getProfile('PROFILEID');
|
|
2632
|
+
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2624
2633
|
* ```
|
|
2625
2634
|
*/
|
|
2626
2635
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
@@ -2632,7 +2641,7 @@ declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Prom
|
|
|
2632
2641
|
* ```typescript
|
|
2633
2642
|
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2634
2643
|
*
|
|
2635
|
-
* const newProfile = await switchProfile('PROFILEID');
|
|
2644
|
+
* const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2636
2645
|
* ```
|
|
2637
2646
|
*/
|
|
2638
2647
|
declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse>;
|
|
@@ -2643,7 +2652,7 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2643
2652
|
* ```typescript
|
|
2644
2653
|
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2645
2654
|
*
|
|
2646
|
-
* const newProfile = await updateProfile('PROFILEID');
|
|
2655
|
+
* const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2647
2656
|
* ```
|
|
2648
2657
|
*/
|
|
2649
2658
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
@@ -2654,7 +2663,7 @@ declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, para
|
|
|
2654
2663
|
* ```typescript
|
|
2655
2664
|
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2656
2665
|
*
|
|
2657
|
-
* await deleteProfile('PROFILEID');
|
|
2666
|
+
* await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2658
2667
|
* ```
|
|
2659
2668
|
*/
|
|
2660
2669
|
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse | {
|
|
@@ -2679,7 +2688,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2679
2688
|
* ```typescript
|
|
2680
2689
|
* import {createProfile} from '@verdocs/js-sdk';
|
|
2681
2690
|
*
|
|
2682
|
-
* const newSession = await createProfile({
|
|
2691
|
+
* const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
|
|
2683
2692
|
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2684
2693
|
* });
|
|
2685
2694
|
* ```
|
|
@@ -2698,4 +2707,4 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountR
|
|
|
2698
2707
|
* ```
|
|
2699
2708
|
*/
|
|
2700
2709
|
declare const updateProfilePhoto: (endpoint: VerdocsEndpoint, profileId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
2701
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, 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, IKbaPINRequired, 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, IRecipientKbaStatusNotRequired, IRecipientKbaStatusComplete, IRecipientKbaStatusPinRequired, IRecipientKbaStatusIdentityRequired, IRecipientKbaChallengeRequired, IRecipientKbaStatusFailed, TRecipientKbaStatus, getKbaStatus, submitKbaPin, IKbaIdentity, submitKbaIdentity, submitKbaChallengeResponse, 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, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization,
|
|
2710
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, 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, IKbaPINRequired, 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, IRecipientKbaStatusNotRequired, IRecipientKbaStatusComplete, IRecipientKbaStatusPinRequired, IRecipientKbaStatusIdentityRequired, IRecipientKbaChallengeRequired, IRecipientKbaStatusFailed, TRecipientKbaStatus, getKbaStatus, submitKbaPin, IKbaIdentity, submitKbaIdentity, submitKbaChallengeResponse, 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, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization, updateOrganization, uploadOrganizationLogo, uploadOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, 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, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, verifyEmail, resendVerification, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, IUpdateProfileRequest, IAuthenticateResponse, IUpdatePasswordRequest, IUpdatePasswordResponse, ICreateAccountRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
|
package/dist/index.d.ts
CHANGED
|
@@ -1752,44 +1752,54 @@ declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: s
|
|
|
1752
1752
|
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "permissions">) => Promise<any>;
|
|
1753
1753
|
/**
|
|
1754
1754
|
* Get a list of organizations the caller is a member of.
|
|
1755
|
+
*
|
|
1756
|
+
* ```typescript
|
|
1757
|
+
* import {getOrganizations} from '@verdocs/js-sdk';
|
|
1758
|
+
*
|
|
1759
|
+
* const organizations = await getOrganizations(VerdocsEndpoint.getDefault());
|
|
1760
|
+
* ```
|
|
1755
1761
|
*/
|
|
1756
1762
|
declare const getOrganizations: (endpoint: VerdocsEndpoint) => Promise<IOrganization[]>;
|
|
1757
1763
|
/**
|
|
1758
1764
|
* Get an organization by ID.
|
|
1765
|
+
*
|
|
1766
|
+
* ```typescript
|
|
1767
|
+
* import {getOrganization} from '@verdocs/js-sdk';
|
|
1768
|
+
*
|
|
1769
|
+
* const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1770
|
+
* ```
|
|
1759
1771
|
*/
|
|
1760
1772
|
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
1761
1773
|
/**
|
|
1762
|
-
*
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
*
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
/**
|
|
1770
|
-
* Update an organization.
|
|
1774
|
+
* Update an organization. This can only be called by an admin or owner.
|
|
1775
|
+
*
|
|
1776
|
+
* ```typescript
|
|
1777
|
+
* import {updateOrganization} from '@verdocs/js-sdk';
|
|
1778
|
+
*
|
|
1779
|
+
* const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
|
|
1780
|
+
* ```
|
|
1771
1781
|
*/
|
|
1772
1782
|
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1773
1783
|
/**
|
|
1774
|
-
* Update the organization's logo. This can only be called by an admin or owner
|
|
1784
|
+
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1775
1785
|
*
|
|
1776
1786
|
* ```typescript
|
|
1777
1787
|
* import {uploadOrganizationLogo} from '@verdocs/js-sdk';
|
|
1778
1788
|
*
|
|
1779
|
-
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), file);
|
|
1789
|
+
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1780
1790
|
* ```
|
|
1781
1791
|
*/
|
|
1782
|
-
declare const uploadOrganizationLogo: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1792
|
+
declare const uploadOrganizationLogo: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1783
1793
|
/**
|
|
1784
|
-
* Update the organization's thumbnail. This can only be called by an admin or owner
|
|
1794
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1785
1795
|
*
|
|
1786
1796
|
* ```typescript
|
|
1787
1797
|
* import {uploadOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1788
1798
|
*
|
|
1789
|
-
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), file);
|
|
1799
|
+
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1790
1800
|
* ```
|
|
1791
1801
|
*/
|
|
1792
|
-
declare const uploadOrganizationThumbnail: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1802
|
+
declare const uploadOrganizationThumbnail: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1793
1803
|
/**
|
|
1794
1804
|
* Get the registered Webhooks for the caller's organization.
|
|
1795
1805
|
*/
|
|
@@ -2609,18 +2619,17 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2609
2619
|
* ```typescript
|
|
2610
2620
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2611
2621
|
*
|
|
2612
|
-
* const profiles = await getCurrentProfile();
|
|
2622
|
+
* const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
|
|
2613
2623
|
* ```
|
|
2614
2624
|
*/
|
|
2615
2625
|
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
|
|
2616
2626
|
/**
|
|
2617
2627
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2618
|
-
* TODO: Add a "public" profile endpoint for public pages
|
|
2619
2628
|
*
|
|
2620
2629
|
* ```typescript
|
|
2621
2630
|
* import {getProfile} from '@verdocs/js-sdk';
|
|
2622
2631
|
*
|
|
2623
|
-
* const profile = await getProfile('PROFILEID');
|
|
2632
|
+
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2624
2633
|
* ```
|
|
2625
2634
|
*/
|
|
2626
2635
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
@@ -2632,7 +2641,7 @@ declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Prom
|
|
|
2632
2641
|
* ```typescript
|
|
2633
2642
|
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2634
2643
|
*
|
|
2635
|
-
* const newProfile = await switchProfile('PROFILEID');
|
|
2644
|
+
* const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2636
2645
|
* ```
|
|
2637
2646
|
*/
|
|
2638
2647
|
declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse>;
|
|
@@ -2643,7 +2652,7 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2643
2652
|
* ```typescript
|
|
2644
2653
|
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2645
2654
|
*
|
|
2646
|
-
* const newProfile = await updateProfile('PROFILEID');
|
|
2655
|
+
* const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2647
2656
|
* ```
|
|
2648
2657
|
*/
|
|
2649
2658
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
@@ -2654,7 +2663,7 @@ declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, para
|
|
|
2654
2663
|
* ```typescript
|
|
2655
2664
|
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2656
2665
|
*
|
|
2657
|
-
* await deleteProfile('PROFILEID');
|
|
2666
|
+
* await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2658
2667
|
* ```
|
|
2659
2668
|
*/
|
|
2660
2669
|
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse | {
|
|
@@ -2679,7 +2688,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2679
2688
|
* ```typescript
|
|
2680
2689
|
* import {createProfile} from '@verdocs/js-sdk';
|
|
2681
2690
|
*
|
|
2682
|
-
* const newSession = await createProfile({
|
|
2691
|
+
* const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
|
|
2683
2692
|
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2684
2693
|
* });
|
|
2685
2694
|
* ```
|
|
@@ -2698,4 +2707,4 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountR
|
|
|
2698
2707
|
* ```
|
|
2699
2708
|
*/
|
|
2700
2709
|
declare const updateProfilePhoto: (endpoint: VerdocsEndpoint, profileId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
2701
|
-
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, 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, IKbaPINRequired, 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, IRecipientKbaStatusNotRequired, IRecipientKbaStatusComplete, IRecipientKbaStatusPinRequired, IRecipientKbaStatusIdentityRequired, IRecipientKbaChallengeRequired, IRecipientKbaStatusFailed, TRecipientKbaStatus, getKbaStatus, submitKbaPin, IKbaIdentity, submitKbaIdentity, submitKbaChallengeResponse, 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, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization,
|
|
2710
|
+
export { TRequestStatus, TTemplateSenderType, TTemplatePermission, TTemplateAction, TAccountPermission, TOrgPermission, TApiKeyPermission, TPermission, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, 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, IKbaPINRequired, 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, IRecipientKbaStatusNotRequired, IRecipientKbaStatusComplete, IRecipientKbaStatusPinRequired, IRecipientKbaStatusIdentityRequired, IRecipientKbaChallengeRequired, IRecipientKbaStatusFailed, TRecipientKbaStatus, getKbaStatus, submitKbaPin, IKbaIdentity, submitKbaIdentity, submitKbaChallengeResponse, 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, getGroup, createGroup, addGroupMember, deleteGroupMember, updateGroup, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganizations, getOrganization, updateOrganization, uploadOrganizationLogo, uploadOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, userHasPermissions, ISigningSessionRequest, ISigningSession, IUserSession, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, getTemplateRoles, getTemplateRole, updateTemplateRole, deleteTemplateRole, getTemplateRoleFields, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, 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, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, verifyEmail, resendVerification, getNotifications, getProfiles, getCurrentProfile, getProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, IUpdateProfileRequest, IAuthenticateResponse, IUpdatePasswordRequest, IUpdatePasswordResponse, ICreateAccountRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, timePeriod, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry, ITimePeriod };
|
package/dist/index.js
CHANGED
|
@@ -1767,52 +1767,66 @@ const updateOrganizationMember = (endpoint, profileId, params) => endpoint.api /
|
|
|
1767
1767
|
/**
|
|
1768
1768
|
* An Organization is the top level object for ownership for Members, Documents, and Templates.
|
|
1769
1769
|
*
|
|
1770
|
+
* NOTE: There is no call specifically to create an organization. Every organization must have
|
|
1771
|
+
* at least one "owner" type member. To create a new organization, call createProfile() with
|
|
1772
|
+
* the desired new orgName to create. The caller will become the first owner of the new org, and
|
|
1773
|
+
* can then invite new members to join as well.
|
|
1774
|
+
*
|
|
1775
|
+
* NOTE: There is no call to delete an organization. For safety, this is a manual process. Please
|
|
1776
|
+
* contact support@verdocs.com if you wish to completely delete an organization and all its records.
|
|
1777
|
+
*
|
|
1770
1778
|
* @module
|
|
1771
1779
|
*/
|
|
1772
1780
|
/**
|
|
1773
1781
|
* Get a list of organizations the caller is a member of.
|
|
1782
|
+
*
|
|
1783
|
+
* ```typescript
|
|
1784
|
+
* import {getOrganizations} from '@verdocs/js-sdk';
|
|
1785
|
+
*
|
|
1786
|
+
* const organizations = await getOrganizations(VerdocsEndpoint.getDefault());
|
|
1787
|
+
* ```
|
|
1774
1788
|
*/
|
|
1775
1789
|
const getOrganizations = (endpoint) => endpoint.api //
|
|
1776
1790
|
.get('/v2/organizations')
|
|
1777
1791
|
.then((r) => r.data);
|
|
1778
1792
|
/**
|
|
1779
1793
|
* Get an organization by ID.
|
|
1794
|
+
*
|
|
1795
|
+
* ```typescript
|
|
1796
|
+
* import {getOrganization} from '@verdocs/js-sdk';
|
|
1797
|
+
*
|
|
1798
|
+
* const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1799
|
+
* ```
|
|
1780
1800
|
*/
|
|
1781
1801
|
const getOrganization = (endpoint, organizationId) => endpoint.api //
|
|
1782
1802
|
.get(`/v2/organizations/${organizationId}`)
|
|
1783
1803
|
.then((r) => r.data);
|
|
1784
1804
|
/**
|
|
1785
|
-
*
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
*
|
|
1792
|
-
*/
|
|
1793
|
-
const deleteOrganization = (endpoint, organizationId) => endpoint.api //
|
|
1794
|
-
.delete(`/v2/organizations/${organizationId}`)
|
|
1795
|
-
.then((r) => r.data);
|
|
1796
|
-
/**
|
|
1797
|
-
* Update an organization.
|
|
1805
|
+
* Update an organization. This can only be called by an admin or owner.
|
|
1806
|
+
*
|
|
1807
|
+
* ```typescript
|
|
1808
|
+
* import {updateOrganization} from '@verdocs/js-sdk';
|
|
1809
|
+
*
|
|
1810
|
+
* const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
|
|
1811
|
+
* ```
|
|
1798
1812
|
*/
|
|
1799
1813
|
const updateOrganization = (endpoint, organizationId, params) => endpoint.api //
|
|
1800
1814
|
.patch(`/v2/organizations/${organizationId}`, params)
|
|
1801
1815
|
.then((r) => r.data);
|
|
1802
1816
|
/**
|
|
1803
|
-
* Update the organization's logo. This can only be called by an admin or owner
|
|
1817
|
+
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1804
1818
|
*
|
|
1805
1819
|
* ```typescript
|
|
1806
1820
|
* import {uploadOrganizationLogo} from '@verdocs/js-sdk';
|
|
1807
1821
|
*
|
|
1808
|
-
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), file);
|
|
1822
|
+
* await uploadOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1809
1823
|
* ```
|
|
1810
1824
|
*/
|
|
1811
|
-
const uploadOrganizationLogo = (endpoint, file, onUploadProgress) => {
|
|
1825
|
+
const uploadOrganizationLogo = (endpoint, organizationId, file, onUploadProgress) => {
|
|
1812
1826
|
const formData = new FormData();
|
|
1813
|
-
formData.append('
|
|
1827
|
+
formData.append('logo', file, file.name);
|
|
1814
1828
|
return endpoint.api //
|
|
1815
|
-
.
|
|
1829
|
+
.patch(`/v2/organizations/${organizationId}`, formData, {
|
|
1816
1830
|
timeout: 120000,
|
|
1817
1831
|
onUploadProgress: (event) => {
|
|
1818
1832
|
const total = event.total || 1;
|
|
@@ -1823,19 +1837,19 @@ const uploadOrganizationLogo = (endpoint, file, onUploadProgress) => {
|
|
|
1823
1837
|
.then((r) => r.data);
|
|
1824
1838
|
};
|
|
1825
1839
|
/**
|
|
1826
|
-
* Update the organization's thumbnail. This can only be called by an admin or owner
|
|
1840
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1827
1841
|
*
|
|
1828
1842
|
* ```typescript
|
|
1829
1843
|
* import {uploadOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1830
1844
|
*
|
|
1831
|
-
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), file);
|
|
1845
|
+
* await uploadOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1832
1846
|
* ```
|
|
1833
1847
|
*/
|
|
1834
|
-
const uploadOrganizationThumbnail = (endpoint, file, onUploadProgress) => {
|
|
1848
|
+
const uploadOrganizationThumbnail = (endpoint, organizationId, file, onUploadProgress) => {
|
|
1835
1849
|
const formData = new FormData();
|
|
1836
|
-
formData.append('
|
|
1850
|
+
formData.append('thumbnail', file, file.name);
|
|
1837
1851
|
return endpoint.api //
|
|
1838
|
-
.
|
|
1852
|
+
.patch(`/v2/organizations/${organizationId}`, formData, {
|
|
1839
1853
|
timeout: 120000,
|
|
1840
1854
|
onUploadProgress: (event) => {
|
|
1841
1855
|
const total = event.total || 1;
|
|
@@ -2662,7 +2676,7 @@ const getProfiles = (endpoint) => endpoint.api //
|
|
|
2662
2676
|
* ```typescript
|
|
2663
2677
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2664
2678
|
*
|
|
2665
|
-
* const profiles = await getCurrentProfile();
|
|
2679
|
+
* const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
|
|
2666
2680
|
* ```
|
|
2667
2681
|
*/
|
|
2668
2682
|
const getCurrentProfile = (endpoint) => endpoint.api //
|
|
@@ -2670,12 +2684,11 @@ const getCurrentProfile = (endpoint) => endpoint.api //
|
|
|
2670
2684
|
.then((r) => (r.data || []).find((profile) => profile.current));
|
|
2671
2685
|
/**
|
|
2672
2686
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2673
|
-
* TODO: Add a "public" profile endpoint for public pages
|
|
2674
2687
|
*
|
|
2675
2688
|
* ```typescript
|
|
2676
2689
|
* import {getProfile} from '@verdocs/js-sdk';
|
|
2677
2690
|
*
|
|
2678
|
-
* const profile = await getProfile('PROFILEID');
|
|
2691
|
+
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2679
2692
|
* ```
|
|
2680
2693
|
*/
|
|
2681
2694
|
const getProfile = (endpoint, profileId) => endpoint.api //
|
|
@@ -2689,7 +2702,7 @@ const getProfile = (endpoint, profileId) => endpoint.api //
|
|
|
2689
2702
|
* ```typescript
|
|
2690
2703
|
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2691
2704
|
*
|
|
2692
|
-
* const newProfile = await switchProfile('PROFILEID');
|
|
2705
|
+
* const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2693
2706
|
* ```
|
|
2694
2707
|
*/
|
|
2695
2708
|
const switchProfile = (endpoint, profileId) => endpoint.api //
|
|
@@ -2702,7 +2715,7 @@ const switchProfile = (endpoint, profileId) => endpoint.api //
|
|
|
2702
2715
|
* ```typescript
|
|
2703
2716
|
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2704
2717
|
*
|
|
2705
|
-
* const newProfile = await updateProfile('PROFILEID');
|
|
2718
|
+
* const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2706
2719
|
* ```
|
|
2707
2720
|
*/
|
|
2708
2721
|
const updateProfile = (endpoint, profileId, params) => endpoint.api //
|
|
@@ -2715,7 +2728,7 @@ const updateProfile = (endpoint, profileId, params) => endpoint.api //
|
|
|
2715
2728
|
* ```typescript
|
|
2716
2729
|
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2717
2730
|
*
|
|
2718
|
-
* await deleteProfile('PROFILEID');
|
|
2731
|
+
* await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2719
2732
|
* ```
|
|
2720
2733
|
*/
|
|
2721
2734
|
const deleteProfile = (endpoint, profileId) => endpoint.api //
|
|
@@ -2739,7 +2752,7 @@ const deleteProfile = (endpoint, profileId) => endpoint.api //
|
|
|
2739
2752
|
* ```typescript
|
|
2740
2753
|
* import {createProfile} from '@verdocs/js-sdk';
|
|
2741
2754
|
*
|
|
2742
|
-
* const newSession = await createProfile({
|
|
2755
|
+
* const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
|
|
2743
2756
|
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2744
2757
|
* });
|
|
2745
2758
|
* ```
|
|
@@ -2790,7 +2803,6 @@ exports.createEnvelopeReminder = createEnvelopeReminder;
|
|
|
2790
2803
|
exports.createField = createField;
|
|
2791
2804
|
exports.createGroup = createGroup;
|
|
2792
2805
|
exports.createInitials = createInitials;
|
|
2793
|
-
exports.createOrganization = createOrganization;
|
|
2794
2806
|
exports.createOrganizationInvitation = createOrganizationInvitation;
|
|
2795
2807
|
exports.createProfile = createProfile;
|
|
2796
2808
|
exports.createSignature = createSignature;
|
|
@@ -2809,7 +2821,6 @@ exports.deleteEnvelopeFieldAttachment = deleteEnvelopeFieldAttachment;
|
|
|
2809
2821
|
exports.deleteEnvelopeReminder = deleteEnvelopeReminder;
|
|
2810
2822
|
exports.deleteField = deleteField;
|
|
2811
2823
|
exports.deleteGroupMember = deleteGroupMember;
|
|
2812
|
-
exports.deleteOrganization = deleteOrganization;
|
|
2813
2824
|
exports.deleteOrganizationInvitation = deleteOrganizationInvitation;
|
|
2814
2825
|
exports.deleteOrganizationMember = deleteOrganizationMember;
|
|
2815
2826
|
exports.deleteProfile = deleteProfile;
|