@verdocs/js-sdk 4.1.9 → 4.1.11
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 +30 -30
- package/dist/index.d.ts +30 -30
- package/dist/index.js +43 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -40
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1751,45 +1751,46 @@ declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IPr
|
|
|
1751
1751
|
declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
|
|
1752
1752
|
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "permissions">) => Promise<any>;
|
|
1753
1753
|
/**
|
|
1754
|
-
* Get
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
*
|
|
1754
|
+
* Get an organization by ID. Note that this endpoint will return only a subset of fields
|
|
1755
|
+
* if the caller is not a member of the organization (the public fields).
|
|
1756
|
+
*
|
|
1757
|
+
* ```typescript
|
|
1758
|
+
* import {getOrganization} from '@verdocs/js-sdk';
|
|
1759
|
+
*
|
|
1760
|
+
* const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1761
|
+
* ```
|
|
1759
1762
|
*/
|
|
1760
1763
|
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
1761
1764
|
/**
|
|
1762
|
-
*
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
*
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
/**
|
|
1770
|
-
* Update an organization.
|
|
1765
|
+
* Update an organization. This can only be called by an admin or owner.
|
|
1766
|
+
*
|
|
1767
|
+
* ```typescript
|
|
1768
|
+
* import {updateOrganization} from '@verdocs/js-sdk';
|
|
1769
|
+
*
|
|
1770
|
+
* const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
|
|
1771
|
+
* ```
|
|
1771
1772
|
*/
|
|
1772
1773
|
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1773
1774
|
/**
|
|
1774
|
-
* Update the organization's logo. This can only be called by an admin or owner
|
|
1775
|
+
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1775
1776
|
*
|
|
1776
1777
|
* ```typescript
|
|
1777
|
-
* import {
|
|
1778
|
+
* import {updateOrganizationLogo} from '@verdocs/js-sdk';
|
|
1778
1779
|
*
|
|
1779
|
-
* await
|
|
1780
|
+
* await updateOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1780
1781
|
* ```
|
|
1781
1782
|
*/
|
|
1782
|
-
declare const
|
|
1783
|
+
declare const updateOrganizationLogo: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1783
1784
|
/**
|
|
1784
|
-
* Update the organization's thumbnail. This can only be called by an admin or owner
|
|
1785
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1785
1786
|
*
|
|
1786
1787
|
* ```typescript
|
|
1787
|
-
* import {
|
|
1788
|
+
* import {updateOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1788
1789
|
*
|
|
1789
|
-
* await
|
|
1790
|
+
* await updateOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1790
1791
|
* ```
|
|
1791
1792
|
*/
|
|
1792
|
-
declare const
|
|
1793
|
+
declare const updateOrganizationThumbnail: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1793
1794
|
/**
|
|
1794
1795
|
* Get the registered Webhooks for the caller's organization.
|
|
1795
1796
|
*/
|
|
@@ -2609,18 +2610,17 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2609
2610
|
* ```typescript
|
|
2610
2611
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2611
2612
|
*
|
|
2612
|
-
* const profiles = await getCurrentProfile();
|
|
2613
|
+
* const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
|
|
2613
2614
|
* ```
|
|
2614
2615
|
*/
|
|
2615
2616
|
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
|
|
2616
2617
|
/**
|
|
2617
2618
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2618
|
-
* TODO: Add a "public" profile endpoint for public pages
|
|
2619
2619
|
*
|
|
2620
2620
|
* ```typescript
|
|
2621
2621
|
* import {getProfile} from '@verdocs/js-sdk';
|
|
2622
2622
|
*
|
|
2623
|
-
* const profile = await getProfile('PROFILEID');
|
|
2623
|
+
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2624
2624
|
* ```
|
|
2625
2625
|
*/
|
|
2626
2626
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
@@ -2632,7 +2632,7 @@ declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Prom
|
|
|
2632
2632
|
* ```typescript
|
|
2633
2633
|
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2634
2634
|
*
|
|
2635
|
-
* const newProfile = await switchProfile('PROFILEID');
|
|
2635
|
+
* const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2636
2636
|
* ```
|
|
2637
2637
|
*/
|
|
2638
2638
|
declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse>;
|
|
@@ -2643,7 +2643,7 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2643
2643
|
* ```typescript
|
|
2644
2644
|
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2645
2645
|
*
|
|
2646
|
-
* const newProfile = await updateProfile('PROFILEID');
|
|
2646
|
+
* const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2647
2647
|
* ```
|
|
2648
2648
|
*/
|
|
2649
2649
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
@@ -2654,7 +2654,7 @@ declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, para
|
|
|
2654
2654
|
* ```typescript
|
|
2655
2655
|
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2656
2656
|
*
|
|
2657
|
-
* await deleteProfile('PROFILEID');
|
|
2657
|
+
* await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2658
2658
|
* ```
|
|
2659
2659
|
*/
|
|
2660
2660
|
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse | {
|
|
@@ -2679,7 +2679,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2679
2679
|
* ```typescript
|
|
2680
2680
|
* import {createProfile} from '@verdocs/js-sdk';
|
|
2681
2681
|
*
|
|
2682
|
-
* const newSession = await createProfile({
|
|
2682
|
+
* const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
|
|
2683
2683
|
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2684
2684
|
* });
|
|
2685
2685
|
* ```
|
|
@@ -2698,4 +2698,4 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountR
|
|
|
2698
2698
|
* ```
|
|
2699
2699
|
*/
|
|
2700
2700
|
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,
|
|
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, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, 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
|
@@ -1751,45 +1751,46 @@ declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IPr
|
|
|
1751
1751
|
declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
|
|
1752
1752
|
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "permissions">) => Promise<any>;
|
|
1753
1753
|
/**
|
|
1754
|
-
* Get
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
*
|
|
1754
|
+
* Get an organization by ID. Note that this endpoint will return only a subset of fields
|
|
1755
|
+
* if the caller is not a member of the organization (the public fields).
|
|
1756
|
+
*
|
|
1757
|
+
* ```typescript
|
|
1758
|
+
* import {getOrganization} from '@verdocs/js-sdk';
|
|
1759
|
+
*
|
|
1760
|
+
* const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1761
|
+
* ```
|
|
1759
1762
|
*/
|
|
1760
1763
|
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
1761
1764
|
/**
|
|
1762
|
-
*
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
*
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
/**
|
|
1770
|
-
* Update an organization.
|
|
1765
|
+
* Update an organization. This can only be called by an admin or owner.
|
|
1766
|
+
*
|
|
1767
|
+
* ```typescript
|
|
1768
|
+
* import {updateOrganization} from '@verdocs/js-sdk';
|
|
1769
|
+
*
|
|
1770
|
+
* const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
|
|
1771
|
+
* ```
|
|
1771
1772
|
*/
|
|
1772
1773
|
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
|
|
1773
1774
|
/**
|
|
1774
|
-
* Update the organization's logo. This can only be called by an admin or owner
|
|
1775
|
+
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1775
1776
|
*
|
|
1776
1777
|
* ```typescript
|
|
1777
|
-
* import {
|
|
1778
|
+
* import {updateOrganizationLogo} from '@verdocs/js-sdk';
|
|
1778
1779
|
*
|
|
1779
|
-
* await
|
|
1780
|
+
* await updateOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1780
1781
|
* ```
|
|
1781
1782
|
*/
|
|
1782
|
-
declare const
|
|
1783
|
+
declare const updateOrganizationLogo: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1783
1784
|
/**
|
|
1784
|
-
* Update the organization's thumbnail. This can only be called by an admin or owner
|
|
1785
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1785
1786
|
*
|
|
1786
1787
|
* ```typescript
|
|
1787
|
-
* import {
|
|
1788
|
+
* import {updateOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1788
1789
|
*
|
|
1789
|
-
* await
|
|
1790
|
+
* await updateOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1790
1791
|
* ```
|
|
1791
1792
|
*/
|
|
1792
|
-
declare const
|
|
1793
|
+
declare const updateOrganizationThumbnail: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
|
|
1793
1794
|
/**
|
|
1794
1795
|
* Get the registered Webhooks for the caller's organization.
|
|
1795
1796
|
*/
|
|
@@ -2609,18 +2610,17 @@ declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
|
|
|
2609
2610
|
* ```typescript
|
|
2610
2611
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2611
2612
|
*
|
|
2612
|
-
* const profiles = await getCurrentProfile();
|
|
2613
|
+
* const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
|
|
2613
2614
|
* ```
|
|
2614
2615
|
*/
|
|
2615
2616
|
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
|
|
2616
2617
|
/**
|
|
2617
2618
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2618
|
-
* TODO: Add a "public" profile endpoint for public pages
|
|
2619
2619
|
*
|
|
2620
2620
|
* ```typescript
|
|
2621
2621
|
* import {getProfile} from '@verdocs/js-sdk';
|
|
2622
2622
|
*
|
|
2623
|
-
* const profile = await getProfile('PROFILEID');
|
|
2623
|
+
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2624
2624
|
* ```
|
|
2625
2625
|
*/
|
|
2626
2626
|
declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
@@ -2632,7 +2632,7 @@ declare const getProfile: (endpoint: VerdocsEndpoint, profileId: string) => Prom
|
|
|
2632
2632
|
* ```typescript
|
|
2633
2633
|
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2634
2634
|
*
|
|
2635
|
-
* const newProfile = await switchProfile('PROFILEID');
|
|
2635
|
+
* const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2636
2636
|
* ```
|
|
2637
2637
|
*/
|
|
2638
2638
|
declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse>;
|
|
@@ -2643,7 +2643,7 @@ declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2643
2643
|
* ```typescript
|
|
2644
2644
|
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2645
2645
|
*
|
|
2646
|
-
* const newProfile = await updateProfile('PROFILEID');
|
|
2646
|
+
* const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2647
2647
|
* ```
|
|
2648
2648
|
*/
|
|
2649
2649
|
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
|
|
@@ -2654,7 +2654,7 @@ declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, para
|
|
|
2654
2654
|
* ```typescript
|
|
2655
2655
|
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2656
2656
|
*
|
|
2657
|
-
* await deleteProfile('PROFILEID');
|
|
2657
|
+
* await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2658
2658
|
* ```
|
|
2659
2659
|
*/
|
|
2660
2660
|
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse | {
|
|
@@ -2679,7 +2679,7 @@ declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => P
|
|
|
2679
2679
|
* ```typescript
|
|
2680
2680
|
* import {createProfile} from '@verdocs/js-sdk';
|
|
2681
2681
|
*
|
|
2682
|
-
* const newSession = await createProfile({
|
|
2682
|
+
* const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
|
|
2683
2683
|
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2684
2684
|
* });
|
|
2685
2685
|
* ```
|
|
@@ -2698,4 +2698,4 @@ declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateAccountR
|
|
|
2698
2698
|
* ```
|
|
2699
2699
|
*/
|
|
2700
2700
|
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,
|
|
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, getOrganization, updateOrganization, updateOrganizationLogo, updateOrganizationThumbnail, 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,55 @@ 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
|
-
* Get
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
*
|
|
1781
|
+
* Get an organization by ID. Note that this endpoint will return only a subset of fields
|
|
1782
|
+
* if the caller is not a member of the organization (the public fields).
|
|
1783
|
+
*
|
|
1784
|
+
* ```typescript
|
|
1785
|
+
* import {getOrganization} from '@verdocs/js-sdk';
|
|
1786
|
+
*
|
|
1787
|
+
* const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
|
|
1788
|
+
* ```
|
|
1780
1789
|
*/
|
|
1781
1790
|
const getOrganization = (endpoint, organizationId) => endpoint.api //
|
|
1782
1791
|
.get(`/v2/organizations/${organizationId}`)
|
|
1783
1792
|
.then((r) => r.data);
|
|
1784
1793
|
/**
|
|
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.
|
|
1794
|
+
* Update an organization. This can only be called by an admin or owner.
|
|
1795
|
+
*
|
|
1796
|
+
* ```typescript
|
|
1797
|
+
* import {updateOrganization} from '@verdocs/js-sdk';
|
|
1798
|
+
*
|
|
1799
|
+
* const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
|
|
1800
|
+
* ```
|
|
1798
1801
|
*/
|
|
1799
1802
|
const updateOrganization = (endpoint, organizationId, params) => endpoint.api //
|
|
1800
1803
|
.patch(`/v2/organizations/${organizationId}`, params)
|
|
1801
1804
|
.then((r) => r.data);
|
|
1802
1805
|
/**
|
|
1803
|
-
* Update the organization's logo. This can only be called by an admin or owner
|
|
1806
|
+
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1804
1807
|
*
|
|
1805
1808
|
* ```typescript
|
|
1806
|
-
* import {
|
|
1809
|
+
* import {updateOrganizationLogo} from '@verdocs/js-sdk';
|
|
1807
1810
|
*
|
|
1808
|
-
* await
|
|
1811
|
+
* await updateOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1809
1812
|
* ```
|
|
1810
1813
|
*/
|
|
1811
|
-
const
|
|
1814
|
+
const updateOrganizationLogo = (endpoint, organizationId, file, onUploadProgress) => {
|
|
1812
1815
|
const formData = new FormData();
|
|
1813
|
-
formData.append('
|
|
1816
|
+
formData.append('logo', file, file.name);
|
|
1814
1817
|
return endpoint.api //
|
|
1815
|
-
.
|
|
1818
|
+
.patch(`/v2/organizations/${organizationId}`, formData, {
|
|
1816
1819
|
timeout: 120000,
|
|
1817
1820
|
onUploadProgress: (event) => {
|
|
1818
1821
|
const total = event.total || 1;
|
|
@@ -1823,19 +1826,19 @@ const uploadOrganizationLogo = (endpoint, file, onUploadProgress) => {
|
|
|
1823
1826
|
.then((r) => r.data);
|
|
1824
1827
|
};
|
|
1825
1828
|
/**
|
|
1826
|
-
* Update the organization's thumbnail. This can only be called by an admin or owner
|
|
1829
|
+
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1827
1830
|
*
|
|
1828
1831
|
* ```typescript
|
|
1829
|
-
* import {
|
|
1832
|
+
* import {updateOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1830
1833
|
*
|
|
1831
|
-
* await
|
|
1834
|
+
* await updateOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1832
1835
|
* ```
|
|
1833
1836
|
*/
|
|
1834
|
-
const
|
|
1837
|
+
const updateOrganizationThumbnail = (endpoint, organizationId, file, onUploadProgress) => {
|
|
1835
1838
|
const formData = new FormData();
|
|
1836
|
-
formData.append('
|
|
1839
|
+
formData.append('thumbnail', file, file.name);
|
|
1837
1840
|
return endpoint.api //
|
|
1838
|
-
.
|
|
1841
|
+
.patch(`/v2/organizations/${organizationId}`, formData, {
|
|
1839
1842
|
timeout: 120000,
|
|
1840
1843
|
onUploadProgress: (event) => {
|
|
1841
1844
|
const total = event.total || 1;
|
|
@@ -2662,7 +2665,7 @@ const getProfiles = (endpoint) => endpoint.api //
|
|
|
2662
2665
|
* ```typescript
|
|
2663
2666
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
2664
2667
|
*
|
|
2665
|
-
* const profiles = await getCurrentProfile();
|
|
2668
|
+
* const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
|
|
2666
2669
|
* ```
|
|
2667
2670
|
*/
|
|
2668
2671
|
const getCurrentProfile = (endpoint) => endpoint.api //
|
|
@@ -2670,12 +2673,11 @@ const getCurrentProfile = (endpoint) => endpoint.api //
|
|
|
2670
2673
|
.then((r) => (r.data || []).find((profile) => profile.current));
|
|
2671
2674
|
/**
|
|
2672
2675
|
* Get a profile. The caller must have admin access to the given profile.
|
|
2673
|
-
* TODO: Add a "public" profile endpoint for public pages
|
|
2674
2676
|
*
|
|
2675
2677
|
* ```typescript
|
|
2676
2678
|
* import {getProfile} from '@verdocs/js-sdk';
|
|
2677
2679
|
*
|
|
2678
|
-
* const profile = await getProfile('PROFILEID');
|
|
2680
|
+
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2679
2681
|
* ```
|
|
2680
2682
|
*/
|
|
2681
2683
|
const getProfile = (endpoint, profileId) => endpoint.api //
|
|
@@ -2689,7 +2691,7 @@ const getProfile = (endpoint, profileId) => endpoint.api //
|
|
|
2689
2691
|
* ```typescript
|
|
2690
2692
|
* import {switchProfile} from '@verdocs/js-sdk';
|
|
2691
2693
|
*
|
|
2692
|
-
* const newProfile = await switchProfile('PROFILEID');
|
|
2694
|
+
* const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2693
2695
|
* ```
|
|
2694
2696
|
*/
|
|
2695
2697
|
const switchProfile = (endpoint, profileId) => endpoint.api //
|
|
@@ -2702,7 +2704,7 @@ const switchProfile = (endpoint, profileId) => endpoint.api //
|
|
|
2702
2704
|
* ```typescript
|
|
2703
2705
|
* import {updateProfile} from '@verdocs/js-sdk/Users';
|
|
2704
2706
|
*
|
|
2705
|
-
* const newProfile = await updateProfile('PROFILEID');
|
|
2707
|
+
* const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2706
2708
|
* ```
|
|
2707
2709
|
*/
|
|
2708
2710
|
const updateProfile = (endpoint, profileId, params) => endpoint.api //
|
|
@@ -2715,7 +2717,7 @@ const updateProfile = (endpoint, profileId, params) => endpoint.api //
|
|
|
2715
2717
|
* ```typescript
|
|
2716
2718
|
* import {deleteProfile} from '@verdocs/js-sdk';
|
|
2717
2719
|
*
|
|
2718
|
-
* await deleteProfile('PROFILEID');
|
|
2720
|
+
* await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
2719
2721
|
* ```
|
|
2720
2722
|
*/
|
|
2721
2723
|
const deleteProfile = (endpoint, profileId) => endpoint.api //
|
|
@@ -2739,7 +2741,7 @@ const deleteProfile = (endpoint, profileId) => endpoint.api //
|
|
|
2739
2741
|
* ```typescript
|
|
2740
2742
|
* import {createProfile} from '@verdocs/js-sdk';
|
|
2741
2743
|
*
|
|
2742
|
-
* const newSession = await createProfile({
|
|
2744
|
+
* const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
|
|
2743
2745
|
* orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
|
2744
2746
|
* });
|
|
2745
2747
|
* ```
|
|
@@ -2790,7 +2792,6 @@ exports.createEnvelopeReminder = createEnvelopeReminder;
|
|
|
2790
2792
|
exports.createField = createField;
|
|
2791
2793
|
exports.createGroup = createGroup;
|
|
2792
2794
|
exports.createInitials = createInitials;
|
|
2793
|
-
exports.createOrganization = createOrganization;
|
|
2794
2795
|
exports.createOrganizationInvitation = createOrganizationInvitation;
|
|
2795
2796
|
exports.createProfile = createProfile;
|
|
2796
2797
|
exports.createSignature = createSignature;
|
|
@@ -2809,7 +2810,6 @@ exports.deleteEnvelopeFieldAttachment = deleteEnvelopeFieldAttachment;
|
|
|
2809
2810
|
exports.deleteEnvelopeReminder = deleteEnvelopeReminder;
|
|
2810
2811
|
exports.deleteField = deleteField;
|
|
2811
2812
|
exports.deleteGroupMember = deleteGroupMember;
|
|
2812
|
-
exports.deleteOrganization = deleteOrganization;
|
|
2813
2813
|
exports.deleteOrganizationInvitation = deleteOrganizationInvitation;
|
|
2814
2814
|
exports.deleteOrganizationMember = deleteOrganizationMember;
|
|
2815
2815
|
exports.deleteProfile = deleteProfile;
|
|
@@ -2860,7 +2860,6 @@ exports.getOrganization = getOrganization;
|
|
|
2860
2860
|
exports.getOrganizationInvitation = getOrganizationInvitation;
|
|
2861
2861
|
exports.getOrganizationInvitations = getOrganizationInvitations;
|
|
2862
2862
|
exports.getOrganizationMembers = getOrganizationMembers;
|
|
2863
|
-
exports.getOrganizations = getOrganizations;
|
|
2864
2863
|
exports.getPlusOneCountry = getPlusOneCountry;
|
|
2865
2864
|
exports.getProfile = getProfile;
|
|
2866
2865
|
exports.getProfiles = getProfiles;
|
|
@@ -2941,7 +2940,9 @@ exports.updateField = updateField;
|
|
|
2941
2940
|
exports.updateGroup = updateGroup;
|
|
2942
2941
|
exports.updateOrganization = updateOrganization;
|
|
2943
2942
|
exports.updateOrganizationInvitation = updateOrganizationInvitation;
|
|
2943
|
+
exports.updateOrganizationLogo = updateOrganizationLogo;
|
|
2944
2944
|
exports.updateOrganizationMember = updateOrganizationMember;
|
|
2945
|
+
exports.updateOrganizationThumbnail = updateOrganizationThumbnail;
|
|
2945
2946
|
exports.updateProfile = updateProfile;
|
|
2946
2947
|
exports.updateProfilePhoto = updateProfilePhoto;
|
|
2947
2948
|
exports.updateRecipient = updateRecipient;
|
|
@@ -2949,8 +2950,6 @@ exports.updateTemplate = updateTemplate;
|
|
|
2949
2950
|
exports.updateTemplateReminder = updateTemplateReminder;
|
|
2950
2951
|
exports.updateTemplateRole = updateTemplateRole;
|
|
2951
2952
|
exports.uploadEnvelopeFieldAttachment = uploadEnvelopeFieldAttachment;
|
|
2952
|
-
exports.uploadOrganizationLogo = uploadOrganizationLogo;
|
|
2953
|
-
exports.uploadOrganizationThumbnail = uploadOrganizationThumbnail;
|
|
2954
2953
|
exports.userCanAct = userCanAct;
|
|
2955
2954
|
exports.userCanBuildTemplate = userCanBuildTemplate;
|
|
2956
2955
|
exports.userCanCancelEnvelope = userCanCancelEnvelope;
|