@verdocs/js-sdk 4.2.22 → 4.2.23
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 +4 -12
- package/dist/index.d.ts +4 -12
- package/dist/index.js +6 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -14
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -884,6 +884,9 @@ const resendVerification = (endpoint, accessToken) => endpoint.api //
|
|
|
884
884
|
const verifyPassword = (endpoint, params) => endpoint.api //
|
|
885
885
|
.post('/v2/users/verify', params)
|
|
886
886
|
.then((r) => r.data);
|
|
887
|
+
const getMyUser = (endpoint) => endpoint.api //
|
|
888
|
+
.get('/v2/users/me')
|
|
889
|
+
.then((r) => r.data);
|
|
887
890
|
|
|
888
891
|
const getNotifications = async (endpoint) => endpoint.api //
|
|
889
892
|
.get('/v2/notifications')
|
|
@@ -902,7 +905,8 @@ const getProfiles = (endpoint) => endpoint.api //
|
|
|
902
905
|
.get('/v2/profiles')
|
|
903
906
|
.then((r) => r.data);
|
|
904
907
|
/**
|
|
905
|
-
* Get the user's
|
|
908
|
+
* Get the user's current profile. This is just a convenience accessor that calls `getProfiles()`
|
|
909
|
+
* and returns the first `current: true` entry.
|
|
906
910
|
*
|
|
907
911
|
* ```typescript
|
|
908
912
|
* import {getCurrentProfile} from '@verdocs/js-sdk';
|
|
@@ -913,18 +917,6 @@ const getProfiles = (endpoint) => endpoint.api //
|
|
|
913
917
|
const getCurrentProfile = (endpoint) => endpoint.api //
|
|
914
918
|
.get('/v2/profiles')
|
|
915
919
|
.then((r) => (r.data || []).find((profile) => profile.current));
|
|
916
|
-
/**
|
|
917
|
-
* Get a profile. The caller must have admin access to the given profile.
|
|
918
|
-
*
|
|
919
|
-
* ```typescript
|
|
920
|
-
* import {getProfile} from '@verdocs/js-sdk';
|
|
921
|
-
*
|
|
922
|
-
* const profile = await getProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
923
|
-
* ```
|
|
924
|
-
*/
|
|
925
|
-
const getProfile = (endpoint, profileId) => endpoint.api //
|
|
926
|
-
.get(`/v2/profiles/${profileId}`)
|
|
927
|
-
.then((r) => r.data);
|
|
928
920
|
/**
|
|
929
921
|
* Switch the caller's "current" profile. The current profile is used for permissions checking
|
|
930
922
|
* and profile_id field settings for most operations in Verdocs. It is important to select the
|
|
@@ -2864,5 +2856,5 @@ const isValidRoleName = (value, roles) => roles.findIndex((role) => role.name ==
|
|
|
2864
2856
|
const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
|
|
2865
2857
|
const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
|
|
2866
2858
|
|
|
2867
|
-
export { AtoB, Countries, RolePermissions, VerdocsEndpoint, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, convertToE164, createApiKey, createEnvelope, createEnvelopeReminder, createField, createGroup, createInitials, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateReminder, createTemplateRole, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, deleteApiKey, deleteEnvelopeFieldAttachment, deleteEnvelopeReminder, deleteField, deleteGroupMember, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateReminder, deleteTemplateRole, deleteTemplateTag, downloadBlob, envelopeIsActive, envelopeIsComplete, envelopeRecipientAgree, envelopeRecipientChangeOwner, envelopeRecipientDecline, envelopeRecipientPrepare, envelopeRecipientSubmit, envelopeRecipientUpdateName, fileToDataUrl, formatFullName, formatInitials, formatShortTimeAgo, fullNameToInitials, getAllTags, getApiKeys, getCountryByCode, getCurrentProfile, getDocumentDownloadLink, getDocumentPreviewLink, getEnvelope, getEnvelopeDocument, getEnvelopeDocumentPageDisplayUri, getEnvelopeFile, getEnvelopeRecipients, getEnvelopeReminder, getEnvelopes, getEnvelopesSummary, getFieldAttachment, getFieldsForRole, getGroup, getGroups, getInPersonLink, getKbaStep, getMatchingCountry, getNextRecipient, getNotifications, getOrganization, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getPlusOneCountry,
|
|
2859
|
+
export { AtoB, Countries, RolePermissions, VerdocsEndpoint, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, convertToE164, createApiKey, createEnvelope, createEnvelopeReminder, createField, createGroup, createInitials, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateReminder, createTemplateRole, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, deleteApiKey, deleteEnvelopeFieldAttachment, deleteEnvelopeReminder, deleteField, deleteGroupMember, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateReminder, deleteTemplateRole, deleteTemplateTag, downloadBlob, envelopeIsActive, envelopeIsComplete, envelopeRecipientAgree, envelopeRecipientChangeOwner, envelopeRecipientDecline, envelopeRecipientPrepare, envelopeRecipientSubmit, envelopeRecipientUpdateName, fileToDataUrl, formatFullName, formatInitials, formatShortTimeAgo, fullNameToInitials, getAllTags, getApiKeys, getCountryByCode, getCurrentProfile, getDocumentDownloadLink, getDocumentPreviewLink, getEnvelope, getEnvelopeDocument, getEnvelopeDocumentPageDisplayUri, getEnvelopeFile, getEnvelopeRecipients, getEnvelopeReminder, getEnvelopes, getEnvelopesSummary, getFieldAttachment, getFieldsForRole, getGroup, getGroups, getInPersonLink, getKbaStep, getMatchingCountry, getMyUser, getNextRecipient, getNotifications, getOrganization, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getPlusOneCountry, getProfiles, getRGB, getRGBA, getRLeft, getRTop, getRValue, getRecipientsWithActions, getRoleColor, getSignature, getSignatures, getSignerToken, getSigningSession, getStars, getTag, getTemplate, getTemplateDocument, getTemplateDocumentFile, getTemplateDocumentPageDisplayUri, getTemplateDocumentThumbnail, getTemplateDocuments, getTemplateReminder, getTemplateTags, getTemplates, getValidator, getValidators, getWebhooks, hasRequiredPermissions, integerSequence, isAmericanSamoa, isCanada, isDominicanRepublic, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, isPuertoRico, isValidEmail, isValidPhone, isValidRoleName, isValidTag, listTemplates, nameToRGBA, recipientCanAct, recipientHasAction, refreshToken, rescale, resendInvitation, resendOrganizationInvitation, resendVerification, resetPassword, rotateApiKey, searchTemplates, sendDelegate, setWebhooks, submitKbaChallengeResponse, submitKbaIdentity, submitKbaPin, switchProfile, timePeriod, toggleStar, updateApiKey, updateEnvelopeField, updateEnvelopeFieldInitials, updateEnvelopeFieldSignature, updateEnvelopeReminder, updateField, updateGroup, updateOrganization, updateOrganizationInvitation, updateOrganizationLogo, updateOrganizationMember, updateOrganizationThumbnail, updateProfile, updateProfilePhoto, updateRecipient, updateTemplate, updateTemplateReminder, updateTemplateRole, uploadEnvelopeFieldAttachment, userCanAct, userCanBuildTemplate, userCanCancelEnvelope, userCanChangeOrgVisibility, userCanCreateOrgTemplate, userCanCreatePersonalTemplate, userCanCreatePublicTemplate, userCanCreateTemplate, userCanDeleteTemplate, userCanFinishEnvelope, userCanMakeTemplatePrivate, userCanMakeTemplatePublic, userCanMakeTemplateShared, userCanPreviewTemplate, userCanReadTemplate, userCanSendTemplate, userCanSignNow, userCanUpdateTemplate, userHasPermissions, userHasSharedTemplate, userIsEnvelopeOwner, userIsEnvelopeRecipient, userIsTemplateCreator, verifyPassword };
|
|
2868
2860
|
//# sourceMappingURL=index.mjs.map
|