@verdocs/js-sdk 6.8.1 → 6.8.2
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 +54 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -1
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +4 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -409,19 +409,32 @@ interface IProfile {
|
|
|
409
409
|
}
|
|
410
410
|
interface IUser {
|
|
411
411
|
id: string;
|
|
412
|
+
/** Email address. */
|
|
412
413
|
email: string;
|
|
414
|
+
/** If true, the email has been verified in some way (e.g. OTP verification or trusted third party. */
|
|
413
415
|
email_verified: boolean;
|
|
416
|
+
/** Password hash, present only for type consistency. Marked optional, but will never be returned by the backend. */
|
|
414
417
|
pass_hash?: string;
|
|
415
418
|
first_name: string | null;
|
|
416
419
|
last_name: string | null;
|
|
417
420
|
phone: string | null;
|
|
418
421
|
picture: string | null;
|
|
422
|
+
/** If set, the Azure B2C ID for the user. Generally set only for Teams/PowerAutomate users. */
|
|
419
423
|
b2cId: string | null;
|
|
424
|
+
/** If set, the Google account ID for the user. Set only for users logging in via Google. */
|
|
420
425
|
googleId: string | null;
|
|
426
|
+
/** If set, the Apple account ID for the user. Set only for users logging in via Apple. */
|
|
421
427
|
appleId: string | null;
|
|
428
|
+
/** If set, the Github account ID for the user. Set only for users logging in via Github. */
|
|
422
429
|
githubId?: string | null;
|
|
423
430
|
created_at: string;
|
|
424
431
|
updated_at: string;
|
|
432
|
+
/** True if the account is locked, typically due to failed sign-in attempts. Only visible to admins or owners. */
|
|
433
|
+
locked?: boolean;
|
|
434
|
+
/** Reason the account is locked. Only visible to admins or owners. */
|
|
435
|
+
lock_reason?: string | null;
|
|
436
|
+
/** Consecutive failed sign-in attempts. Only visible to admins or owners. */
|
|
437
|
+
login_failures?: number;
|
|
425
438
|
}
|
|
426
439
|
type IWebhookEvents = Record<TWebhookEvent, boolean>;
|
|
427
440
|
interface IWebhook {
|
|
@@ -609,6 +622,7 @@ interface IEnvelopeField {
|
|
|
609
622
|
required: boolean | null;
|
|
610
623
|
/** If true, the field will be not be editable by the participant(s). NOTE: Fields may not be both required and readonly. */
|
|
611
624
|
readonly: boolean | null;
|
|
625
|
+
// TODO: In the future, let's decide on the fate of the `settings` object
|
|
612
626
|
/** @deprecated. Use top-level fields instead. */
|
|
613
627
|
settings: IEnvelopeFieldSettings | null;
|
|
614
628
|
validator: string | null;
|
|
@@ -680,6 +694,8 @@ interface IEnvelopeFieldSettings {
|
|
|
680
694
|
/** Checkbox settings */
|
|
681
695
|
minimum_checked?: number;
|
|
682
696
|
maximum_checked?: number;
|
|
697
|
+
canvasHeight?: number;
|
|
698
|
+
canvasWidth?: number;
|
|
683
699
|
}
|
|
684
700
|
interface IEnvelopeHistory {
|
|
685
701
|
id: string;
|
|
@@ -3037,6 +3053,43 @@ declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: s
|
|
|
3037
3053
|
* @apiSuccess IProfile . The updated profile for the member.
|
|
3038
3054
|
*/
|
|
3039
3055
|
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Partial<Pick<IProfile, "roles" | "first_name" | "last_name">>) => Promise<IProfile>;
|
|
3056
|
+
/**
|
|
3057
|
+
* Lock an organization member's account. The member will be unable to sign in until an admin
|
|
3058
|
+
* unlocks them or they complete the password-reset flow. Caller must be an admin or owner,
|
|
3059
|
+
* may not lock him/herself, and the target must have a linked user account.
|
|
3060
|
+
*
|
|
3061
|
+
* ```typescript
|
|
3062
|
+
* import {lockOrganizationMember} from '@verdocs/js-sdk';
|
|
3063
|
+
*
|
|
3064
|
+
* const result = await lockOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID', 'Departed employee');
|
|
3065
|
+
* ```
|
|
3066
|
+
*
|
|
3067
|
+
* @group Organization Members
|
|
3068
|
+
* @api PUT /v2/organization-members/:profile_id Perform an operation on an organization member.
|
|
3069
|
+
* @apiParam string(format:uuid) profile_id The Profile ID to operate on.
|
|
3070
|
+
* @apiBody string(enum:'lock') action Action to perform
|
|
3071
|
+
* @apiBody string reason Reason the account is being locked. Stored on the user record and shown to admins.
|
|
3072
|
+
* @apiSuccess IProfile . The updated profile for the member, with the joined user record.
|
|
3073
|
+
*/
|
|
3074
|
+
declare const lockOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, reason: string) => Promise<IProfile>;
|
|
3075
|
+
/**
|
|
3076
|
+
* Unlock a member whose account has been locked (typically after too many failed sign-in attempts
|
|
3077
|
+
* or via an earlier admin lock). Caller must be an admin or owner, may not unlock him/herself, and
|
|
3078
|
+
* the target must have a linked user account. Clears `locked`, `lock_reason`, and `login_failures`.
|
|
3079
|
+
*
|
|
3080
|
+
* ```typescript
|
|
3081
|
+
* import {unlockOrganizationMember} from '@verdocs/js-sdk';
|
|
3082
|
+
*
|
|
3083
|
+
* const result = await unlockOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
3084
|
+
* ```
|
|
3085
|
+
*
|
|
3086
|
+
* @group Organization Members
|
|
3087
|
+
* @api PUT /v2/organization-members/:profile_id Perform an operation on an organization member.
|
|
3088
|
+
* @apiParam string(format:uuid) profile_id The Profile ID to operate on.
|
|
3089
|
+
* @apiBody string(enum:'unlock') action Action to perform
|
|
3090
|
+
* @apiSuccess IProfile . The updated profile for the member, with the joined user record.
|
|
3091
|
+
*/
|
|
3092
|
+
declare const unlockOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
3040
3093
|
/**
|
|
3041
3094
|
* Get all notification templates for the caller's organization.
|
|
3042
3095
|
*
|
|
@@ -4057,4 +4110,4 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
4057
4110
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
4058
4111
|
*/
|
|
4059
4112
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
4060
|
-
export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, WEBHOOK_EVENTS, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, TUsageType, TWebhookAuthMethod, TNotificationType, TEventName, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, INotificationTemplate, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IKBAQuestion, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TOrganizationUsage, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, downloadEnvelopeDocument, getEnvelopeDocumentDownloadLink, getEnvelopeDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, getEnvelopesZip, sortFields, sortDocuments, sortRecipients, isFieldFilled, isFieldValid, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, startSigningSession, getInPersonLink, verifySigner, delegateRecipient, updateRecipient, remindRecipient, resetRecipient, askQuestion, isEnvelopeOwner, isEnvelopeRecipient, canAccessEnvelope, userIsEnvelopeOwner, userIsEnvelopeRecipient, useCanAccessEnvelope, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, getRecipient, getRecipientWithActions, userCanSignNow, getNextRecipient, createSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipientFromTemplate, ICreateEnvelopeRecipientDirectly, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientStatus, ICreateEnvelopeReminderRequest, IUpdateRecipientParams, ICreateEnvelopeDocumentFromData, ICreateEnvelopeDocumentFromUri, ICreateEnvelopeDocumentFromFile, ICreateEnvelopeFieldFromTemplate, ICreateEnvelopeFieldDirectly, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, DEFAULT_DISCLOSURES, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getNotificationTemplates, getNotificationTemplate, createNotificationTemplate, updateNotificationTemplate, deleteNotificationTemplate, getOrganization, getOrganizationChildren, getOrganizationUsage, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, ICreateNotificationTemplateRequest, IUpdateNotificationTemplateRequest, getWebhooks, setWebhooks, rotateWebhookSecret, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, toggleTemplateStar, createTemplateDocument, deleteTemplateDocument, getTemplateDocument, downloadTemplateDocument, getTemplateDocumentDownloadLink, getTemplateDocumentPreviewLink, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, isValidInput, getValidators, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|
|
4113
|
+
export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, WEBHOOK_EVENTS, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, TUsageType, TWebhookAuthMethod, TNotificationType, TEventName, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, INotificationTemplate, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IKBAQuestion, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TOrganizationUsage, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, downloadEnvelopeDocument, getEnvelopeDocumentDownloadLink, getEnvelopeDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, getEnvelopesZip, sortFields, sortDocuments, sortRecipients, isFieldFilled, isFieldValid, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, startSigningSession, getInPersonLink, verifySigner, delegateRecipient, updateRecipient, remindRecipient, resetRecipient, askQuestion, isEnvelopeOwner, isEnvelopeRecipient, canAccessEnvelope, userIsEnvelopeOwner, userIsEnvelopeRecipient, useCanAccessEnvelope, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, getRecipient, getRecipientWithActions, userCanSignNow, getNextRecipient, createSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipientFromTemplate, ICreateEnvelopeRecipientDirectly, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientStatus, ICreateEnvelopeReminderRequest, IUpdateRecipientParams, ICreateEnvelopeDocumentFromData, ICreateEnvelopeDocumentFromUri, ICreateEnvelopeDocumentFromFile, ICreateEnvelopeFieldFromTemplate, ICreateEnvelopeFieldDirectly, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, DEFAULT_DISCLOSURES, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, lockOrganizationMember, unlockOrganizationMember, getNotificationTemplates, getNotificationTemplate, createNotificationTemplate, updateNotificationTemplate, deleteNotificationTemplate, getOrganization, getOrganizationChildren, getOrganizationUsage, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, ICreateNotificationTemplateRequest, IUpdateNotificationTemplateRequest, getWebhooks, setWebhooks, rotateWebhookSecret, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, toggleTemplateStar, createTemplateDocument, deleteTemplateDocument, getTemplateDocument, downloadTemplateDocument, getTemplateDocumentDownloadLink, getTemplateDocumentPreviewLink, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, isValidInput, getValidators, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|
package/dist/index.d.ts
CHANGED
|
@@ -409,19 +409,32 @@ interface IProfile {
|
|
|
409
409
|
}
|
|
410
410
|
interface IUser {
|
|
411
411
|
id: string;
|
|
412
|
+
/** Email address. */
|
|
412
413
|
email: string;
|
|
414
|
+
/** If true, the email has been verified in some way (e.g. OTP verification or trusted third party. */
|
|
413
415
|
email_verified: boolean;
|
|
416
|
+
/** Password hash, present only for type consistency. Marked optional, but will never be returned by the backend. */
|
|
414
417
|
pass_hash?: string;
|
|
415
418
|
first_name: string | null;
|
|
416
419
|
last_name: string | null;
|
|
417
420
|
phone: string | null;
|
|
418
421
|
picture: string | null;
|
|
422
|
+
/** If set, the Azure B2C ID for the user. Generally set only for Teams/PowerAutomate users. */
|
|
419
423
|
b2cId: string | null;
|
|
424
|
+
/** If set, the Google account ID for the user. Set only for users logging in via Google. */
|
|
420
425
|
googleId: string | null;
|
|
426
|
+
/** If set, the Apple account ID for the user. Set only for users logging in via Apple. */
|
|
421
427
|
appleId: string | null;
|
|
428
|
+
/** If set, the Github account ID for the user. Set only for users logging in via Github. */
|
|
422
429
|
githubId?: string | null;
|
|
423
430
|
created_at: string;
|
|
424
431
|
updated_at: string;
|
|
432
|
+
/** True if the account is locked, typically due to failed sign-in attempts. Only visible to admins or owners. */
|
|
433
|
+
locked?: boolean;
|
|
434
|
+
/** Reason the account is locked. Only visible to admins or owners. */
|
|
435
|
+
lock_reason?: string | null;
|
|
436
|
+
/** Consecutive failed sign-in attempts. Only visible to admins or owners. */
|
|
437
|
+
login_failures?: number;
|
|
425
438
|
}
|
|
426
439
|
type IWebhookEvents = Record<TWebhookEvent, boolean>;
|
|
427
440
|
interface IWebhook {
|
|
@@ -609,6 +622,7 @@ interface IEnvelopeField {
|
|
|
609
622
|
required: boolean | null;
|
|
610
623
|
/** If true, the field will be not be editable by the participant(s). NOTE: Fields may not be both required and readonly. */
|
|
611
624
|
readonly: boolean | null;
|
|
625
|
+
// TODO: In the future, let's decide on the fate of the `settings` object
|
|
612
626
|
/** @deprecated. Use top-level fields instead. */
|
|
613
627
|
settings: IEnvelopeFieldSettings | null;
|
|
614
628
|
validator: string | null;
|
|
@@ -680,6 +694,8 @@ interface IEnvelopeFieldSettings {
|
|
|
680
694
|
/** Checkbox settings */
|
|
681
695
|
minimum_checked?: number;
|
|
682
696
|
maximum_checked?: number;
|
|
697
|
+
canvasHeight?: number;
|
|
698
|
+
canvasWidth?: number;
|
|
683
699
|
}
|
|
684
700
|
interface IEnvelopeHistory {
|
|
685
701
|
id: string;
|
|
@@ -3037,6 +3053,43 @@ declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: s
|
|
|
3037
3053
|
* @apiSuccess IProfile . The updated profile for the member.
|
|
3038
3054
|
*/
|
|
3039
3055
|
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Partial<Pick<IProfile, "roles" | "first_name" | "last_name">>) => Promise<IProfile>;
|
|
3056
|
+
/**
|
|
3057
|
+
* Lock an organization member's account. The member will be unable to sign in until an admin
|
|
3058
|
+
* unlocks them or they complete the password-reset flow. Caller must be an admin or owner,
|
|
3059
|
+
* may not lock him/herself, and the target must have a linked user account.
|
|
3060
|
+
*
|
|
3061
|
+
* ```typescript
|
|
3062
|
+
* import {lockOrganizationMember} from '@verdocs/js-sdk';
|
|
3063
|
+
*
|
|
3064
|
+
* const result = await lockOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID', 'Departed employee');
|
|
3065
|
+
* ```
|
|
3066
|
+
*
|
|
3067
|
+
* @group Organization Members
|
|
3068
|
+
* @api PUT /v2/organization-members/:profile_id Perform an operation on an organization member.
|
|
3069
|
+
* @apiParam string(format:uuid) profile_id The Profile ID to operate on.
|
|
3070
|
+
* @apiBody string(enum:'lock') action Action to perform
|
|
3071
|
+
* @apiBody string reason Reason the account is being locked. Stored on the user record and shown to admins.
|
|
3072
|
+
* @apiSuccess IProfile . The updated profile for the member, with the joined user record.
|
|
3073
|
+
*/
|
|
3074
|
+
declare const lockOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, reason: string) => Promise<IProfile>;
|
|
3075
|
+
/**
|
|
3076
|
+
* Unlock a member whose account has been locked (typically after too many failed sign-in attempts
|
|
3077
|
+
* or via an earlier admin lock). Caller must be an admin or owner, may not unlock him/herself, and
|
|
3078
|
+
* the target must have a linked user account. Clears `locked`, `lock_reason`, and `login_failures`.
|
|
3079
|
+
*
|
|
3080
|
+
* ```typescript
|
|
3081
|
+
* import {unlockOrganizationMember} from '@verdocs/js-sdk';
|
|
3082
|
+
*
|
|
3083
|
+
* const result = await unlockOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
3084
|
+
* ```
|
|
3085
|
+
*
|
|
3086
|
+
* @group Organization Members
|
|
3087
|
+
* @api PUT /v2/organization-members/:profile_id Perform an operation on an organization member.
|
|
3088
|
+
* @apiParam string(format:uuid) profile_id The Profile ID to operate on.
|
|
3089
|
+
* @apiBody string(enum:'unlock') action Action to perform
|
|
3090
|
+
* @apiSuccess IProfile . The updated profile for the member, with the joined user record.
|
|
3091
|
+
*/
|
|
3092
|
+
declare const unlockOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IProfile>;
|
|
3040
3093
|
/**
|
|
3041
3094
|
* Get all notification templates for the caller's organization.
|
|
3042
3095
|
*
|
|
@@ -4057,4 +4110,4 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
4057
4110
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
4058
4111
|
*/
|
|
4059
4112
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
4060
|
-
export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, WEBHOOK_EVENTS, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, TUsageType, TWebhookAuthMethod, TNotificationType, TEventName, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, INotificationTemplate, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IKBAQuestion, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TOrganizationUsage, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, downloadEnvelopeDocument, getEnvelopeDocumentDownloadLink, getEnvelopeDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, getEnvelopesZip, sortFields, sortDocuments, sortRecipients, isFieldFilled, isFieldValid, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, startSigningSession, getInPersonLink, verifySigner, delegateRecipient, updateRecipient, remindRecipient, resetRecipient, askQuestion, isEnvelopeOwner, isEnvelopeRecipient, canAccessEnvelope, userIsEnvelopeOwner, userIsEnvelopeRecipient, useCanAccessEnvelope, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, getRecipient, getRecipientWithActions, userCanSignNow, getNextRecipient, createSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipientFromTemplate, ICreateEnvelopeRecipientDirectly, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientStatus, ICreateEnvelopeReminderRequest, IUpdateRecipientParams, ICreateEnvelopeDocumentFromData, ICreateEnvelopeDocumentFromUri, ICreateEnvelopeDocumentFromFile, ICreateEnvelopeFieldFromTemplate, ICreateEnvelopeFieldDirectly, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, DEFAULT_DISCLOSURES, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getNotificationTemplates, getNotificationTemplate, createNotificationTemplate, updateNotificationTemplate, deleteNotificationTemplate, getOrganization, getOrganizationChildren, getOrganizationUsage, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, ICreateNotificationTemplateRequest, IUpdateNotificationTemplateRequest, getWebhooks, setWebhooks, rotateWebhookSecret, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, toggleTemplateStar, createTemplateDocument, deleteTemplateDocument, getTemplateDocument, downloadTemplateDocument, getTemplateDocumentDownloadLink, getTemplateDocumentPreviewLink, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, isValidInput, getValidators, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|
|
4113
|
+
export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, WEBHOOK_EVENTS, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, TUsageType, TWebhookAuthMethod, TNotificationType, TEventName, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, INotificationTemplate, IApiKey, IGroup, IGroupProfile, IOAuth2App, IEntitlement, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IKBAQuestion, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TOrganizationUsage, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, downloadEnvelopeDocument, getEnvelopeDocumentDownloadLink, getEnvelopeDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, getEnvelopesZip, sortFields, sortDocuments, sortRecipients, isFieldFilled, isFieldValid, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, startSigningSession, getInPersonLink, verifySigner, delegateRecipient, updateRecipient, remindRecipient, resetRecipient, askQuestion, isEnvelopeOwner, isEnvelopeRecipient, canAccessEnvelope, userIsEnvelopeOwner, userIsEnvelopeRecipient, useCanAccessEnvelope, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, getRecipient, getRecipientWithActions, userCanSignNow, getNextRecipient, createSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipientFromTemplate, ICreateEnvelopeRecipientDirectly, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientStatus, ICreateEnvelopeReminderRequest, IUpdateRecipientParams, ICreateEnvelopeDocumentFromData, ICreateEnvelopeDocumentFromUri, ICreateEnvelopeDocumentFromFile, ICreateEnvelopeFieldFromTemplate, ICreateEnvelopeFieldDirectly, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, DEFAULT_DISCLOSURES, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, lockOrganizationMember, unlockOrganizationMember, getNotificationTemplates, getNotificationTemplate, createNotificationTemplate, updateNotificationTemplate, deleteNotificationTemplate, getOrganization, getOrganizationChildren, getOrganizationUsage, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, ICreateNotificationTemplateRequest, IUpdateNotificationTemplateRequest, getWebhooks, setWebhooks, rotateWebhookSecret, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, toggleTemplateStar, createTemplateDocument, deleteTemplateDocument, getTemplateDocument, downloadTemplateDocument, getTemplateDocumentDownloadLink, getTemplateDocumentPreviewLink, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, isValidInput, getValidators, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|
package/dist/index.js
CHANGED
|
@@ -3506,6 +3506,47 @@ const deleteOrganizationMember = (endpoint, profileId) => endpoint.api //
|
|
|
3506
3506
|
const updateOrganizationMember = (endpoint, profileId, params) => endpoint.api //
|
|
3507
3507
|
.patch(`/v2/organization-members/${profileId}`, params)
|
|
3508
3508
|
.then((r) => r.data);
|
|
3509
|
+
/**
|
|
3510
|
+
* Lock an organization member's account. The member will be unable to sign in until an admin
|
|
3511
|
+
* unlocks them or they complete the password-reset flow. Caller must be an admin or owner,
|
|
3512
|
+
* may not lock him/herself, and the target must have a linked user account.
|
|
3513
|
+
*
|
|
3514
|
+
* ```typescript
|
|
3515
|
+
* import {lockOrganizationMember} from '@verdocs/js-sdk';
|
|
3516
|
+
*
|
|
3517
|
+
* const result = await lockOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID', 'Departed employee');
|
|
3518
|
+
* ```
|
|
3519
|
+
*
|
|
3520
|
+
* @group Organization Members
|
|
3521
|
+
* @api PUT /v2/organization-members/:profile_id Perform an operation on an organization member.
|
|
3522
|
+
* @apiParam string(format:uuid) profile_id The Profile ID to operate on.
|
|
3523
|
+
* @apiBody string(enum:'lock') action Action to perform
|
|
3524
|
+
* @apiBody string reason Reason the account is being locked. Stored on the user record and shown to admins.
|
|
3525
|
+
* @apiSuccess IProfile . The updated profile for the member, with the joined user record.
|
|
3526
|
+
*/
|
|
3527
|
+
const lockOrganizationMember = (endpoint, profileId, reason) => endpoint.api //
|
|
3528
|
+
.put(`/v2/organization-members/${profileId}`, { action: 'lock', reason })
|
|
3529
|
+
.then((r) => r.data);
|
|
3530
|
+
/**
|
|
3531
|
+
* Unlock a member whose account has been locked (typically after too many failed sign-in attempts
|
|
3532
|
+
* or via an earlier admin lock). Caller must be an admin or owner, may not unlock him/herself, and
|
|
3533
|
+
* the target must have a linked user account. Clears `locked`, `lock_reason`, and `login_failures`.
|
|
3534
|
+
*
|
|
3535
|
+
* ```typescript
|
|
3536
|
+
* import {unlockOrganizationMember} from '@verdocs/js-sdk';
|
|
3537
|
+
*
|
|
3538
|
+
* const result = await unlockOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID');
|
|
3539
|
+
* ```
|
|
3540
|
+
*
|
|
3541
|
+
* @group Organization Members
|
|
3542
|
+
* @api PUT /v2/organization-members/:profile_id Perform an operation on an organization member.
|
|
3543
|
+
* @apiParam string(format:uuid) profile_id The Profile ID to operate on.
|
|
3544
|
+
* @apiBody string(enum:'unlock') action Action to perform
|
|
3545
|
+
* @apiSuccess IProfile . The updated profile for the member, with the joined user record.
|
|
3546
|
+
*/
|
|
3547
|
+
const unlockOrganizationMember = (endpoint, profileId) => endpoint.api //
|
|
3548
|
+
.put(`/v2/organization-members/${profileId}`, { action: 'unlock' })
|
|
3549
|
+
.then((r) => r.data);
|
|
3509
3550
|
|
|
3510
3551
|
/**
|
|
3511
3552
|
* Notification Templates allow organizations to customize the email and SMS notifications
|
|
@@ -4057,6 +4098,7 @@ exports.isValidInput = isValidInput;
|
|
|
4057
4098
|
exports.isValidPhone = isValidPhone;
|
|
4058
4099
|
exports.isValidRoleName = isValidRoleName;
|
|
4059
4100
|
exports.isValidTag = isValidTag;
|
|
4101
|
+
exports.lockOrganizationMember = lockOrganizationMember;
|
|
4060
4102
|
exports.nameToRGBA = nameToRGBA;
|
|
4061
4103
|
exports.randomString = randomString;
|
|
4062
4104
|
exports.recipientCanAct = recipientCanAct;
|
|
@@ -4080,6 +4122,7 @@ exports.submitKbaIdentity = submitKbaIdentity;
|
|
|
4080
4122
|
exports.submitKbaPin = submitKbaPin;
|
|
4081
4123
|
exports.switchProfile = switchProfile;
|
|
4082
4124
|
exports.toggleTemplateStar = toggleTemplateStar;
|
|
4125
|
+
exports.unlockOrganizationMember = unlockOrganizationMember;
|
|
4083
4126
|
exports.updateApiKey = updateApiKey;
|
|
4084
4127
|
exports.updateEnvelope = updateEnvelope;
|
|
4085
4128
|
exports.updateEnvelopeField = updateEnvelopeField;
|