@verdocs/js-sdk 4.2.25 → 4.2.27
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 +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +85 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -7
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -892,7 +892,11 @@ type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submit
|
|
|
892
892
|
type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
|
|
893
893
|
// Modification events have a string description
|
|
894
894
|
type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
|
|
895
|
-
type TFieldType = "signature" | "initial" | "checkbox_group" | "radio_button_group" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
|
|
895
|
+
type TFieldType = "signature" | "initial" | "checkbox_group" | "checkbox" | "radio_button_group" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
|
|
896
|
+
declare const FIELD_TYPES: TFieldType[];
|
|
897
|
+
declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
|
|
898
|
+
declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
|
|
899
|
+
declare const DEFAULT_FIELD_SETTINGS: Record<TFieldType, ITemplateFieldSetting>;
|
|
896
900
|
type TEnvironment = "verdocs" | "verdocs-stage";
|
|
897
901
|
type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession, profile: IProfile | null) => void;
|
|
898
902
|
interface VerdocsEndpointOptions {
|
|
@@ -2706,4 +2710,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2706
2710
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2707
2711
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2708
2712
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2709
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, 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, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, 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 };
|
|
2713
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_SETTINGS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, 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, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, 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
|
@@ -892,7 +892,11 @@ type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submit
|
|
|
892
892
|
type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
|
|
893
893
|
// Modification events have a string description
|
|
894
894
|
type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
|
|
895
|
-
type TFieldType = "signature" | "initial" | "checkbox_group" | "radio_button_group" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
|
|
895
|
+
type TFieldType = "signature" | "initial" | "checkbox_group" | "checkbox" | "radio_button_group" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
|
|
896
|
+
declare const FIELD_TYPES: TFieldType[];
|
|
897
|
+
declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
|
|
898
|
+
declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
|
|
899
|
+
declare const DEFAULT_FIELD_SETTINGS: Record<TFieldType, ITemplateFieldSetting>;
|
|
896
900
|
type TEnvironment = "verdocs" | "verdocs-stage";
|
|
897
901
|
type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession, profile: IProfile | null) => void;
|
|
898
902
|
interface VerdocsEndpointOptions {
|
|
@@ -2706,4 +2710,4 @@ declare const isValidEmail: (email: string | undefined) => boolean;
|
|
|
2706
2710
|
declare const isValidPhone: (phone: string | undefined) => boolean;
|
|
2707
2711
|
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
|
|
2708
2712
|
declare const isValidTag: (value: string, tags: string[]) => boolean;
|
|
2709
|
-
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, 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, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, 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 };
|
|
2713
|
+
export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_SETTINGS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelopesSummary, getEnvelopeRecipients, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, ISignerTokenResponse, getSigningSession, getSignerToken, getInPersonLink, sendDelegate, resendInvitation, createEnvelopeReminder, getEnvelopeReminder, updateEnvelopeReminder, deleteEnvelopeReminder, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IEnvelopesSummary, IDocumentSearchOptions, ICreateEnvelopeRole, IEnvelopeSummaries, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeRequest, 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, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, ICreateTemplateReminderRequest, createTemplateReminder, getTemplateReminder, updateTemplateReminder, deleteTemplateReminder, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, searchTemplates, ISearchTimeRange, IGetTemplateSummarySortBy, IGetTemplateSummaryParams, ITemplateListParams, listTemplates, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateSearchParams, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, 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
|
@@ -2,6 +2,81 @@
|
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
4
|
|
|
5
|
+
const FIELD_TYPES = [
|
|
6
|
+
'textbox',
|
|
7
|
+
'signature',
|
|
8
|
+
'initial',
|
|
9
|
+
'date',
|
|
10
|
+
'dropdown',
|
|
11
|
+
'timestamp',
|
|
12
|
+
'textarea',
|
|
13
|
+
'checkbox',
|
|
14
|
+
'radio',
|
|
15
|
+
'attachment',
|
|
16
|
+
'payment',
|
|
17
|
+
];
|
|
18
|
+
const DEFAULT_FIELD_WIDTHS = {
|
|
19
|
+
signature: 71,
|
|
20
|
+
initial: 71,
|
|
21
|
+
date: 75,
|
|
22
|
+
timestamp: 130,
|
|
23
|
+
textbox: 150,
|
|
24
|
+
textarea: 150,
|
|
25
|
+
checkbox: 14,
|
|
26
|
+
checkbox_group: 14,
|
|
27
|
+
radio_button_group: 14,
|
|
28
|
+
radio: 14,
|
|
29
|
+
dropdown: 85,
|
|
30
|
+
attachment: 24,
|
|
31
|
+
payment: 24,
|
|
32
|
+
};
|
|
33
|
+
const DEFAULT_FIELD_HEIGHTS = {
|
|
34
|
+
signature: 36,
|
|
35
|
+
initial: 36,
|
|
36
|
+
date: 15,
|
|
37
|
+
timestamp: 15,
|
|
38
|
+
textbox: 15,
|
|
39
|
+
textarea: 41,
|
|
40
|
+
checkbox: 14,
|
|
41
|
+
checkbox_group: 14,
|
|
42
|
+
radio_button_group: 14,
|
|
43
|
+
radio: 14,
|
|
44
|
+
dropdown: 20,
|
|
45
|
+
attachment: 24,
|
|
46
|
+
payment: 24,
|
|
47
|
+
};
|
|
48
|
+
const DEFAULT_FIELD_SETTINGS = {
|
|
49
|
+
signature: { result: '' },
|
|
50
|
+
initial: { result: '' },
|
|
51
|
+
date: { width: 75, height: 15, result: '' },
|
|
52
|
+
timestamp: { width: 130, height: 15 },
|
|
53
|
+
textbox: { width: 150, height: 15, result: '', leading: 0, alignment: 0, upperCase: false },
|
|
54
|
+
textarea: { width: 150, height: 15, result: '', leading: 16, alignment: 0, upperCase: false },
|
|
55
|
+
checkbox: {},
|
|
56
|
+
checkbox_group: {
|
|
57
|
+
minimum_checked: 0,
|
|
58
|
+
maximum_checked: 1000,
|
|
59
|
+
options: [
|
|
60
|
+
// { id: `${field.name}-1`, value: 'Option 1', checked: false, x, y },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
radio_button_group: {
|
|
64
|
+
options: [
|
|
65
|
+
// { id: `${field.name}-1`, value: 'Option 1', selected: false, x, y }
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
radio: {},
|
|
69
|
+
dropdown: {
|
|
70
|
+
width: 85,
|
|
71
|
+
height: 20,
|
|
72
|
+
value: null,
|
|
73
|
+
placeholder: 'Choose',
|
|
74
|
+
options: [{ id: 'option-1', value: 'Option 1' }],
|
|
75
|
+
},
|
|
76
|
+
attachment: {},
|
|
77
|
+
payment: {},
|
|
78
|
+
};
|
|
79
|
+
|
|
5
80
|
/**
|
|
6
81
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
7
82
|
*/
|
|
@@ -1074,12 +1149,12 @@ class VerdocsEndpoint {
|
|
|
1074
1149
|
* ```
|
|
1075
1150
|
*/
|
|
1076
1151
|
constructor(options) {
|
|
1077
|
-
this.baseURL = options?.baseURL
|
|
1078
|
-
this.timeout = options?.timeout
|
|
1079
|
-
this.environment = options?.environment
|
|
1080
|
-
this.sessionType = options?.sessionType
|
|
1081
|
-
this.clientID = options?.clientID
|
|
1082
|
-
this.persist = options?.persist
|
|
1152
|
+
this.baseURL = options?.baseURL ?? this.baseURL;
|
|
1153
|
+
this.timeout = options?.timeout ?? this.timeout;
|
|
1154
|
+
this.environment = options?.environment ?? this.environment;
|
|
1155
|
+
this.sessionType = options?.sessionType ?? this.sessionType;
|
|
1156
|
+
this.clientID = options?.clientID ?? this.clientID;
|
|
1157
|
+
this.persist = options?.persist ?? this.persist;
|
|
1083
1158
|
this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
|
|
1084
1159
|
}
|
|
1085
1160
|
setDefault() {
|
|
@@ -2846,6 +2921,10 @@ const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag)
|
|
|
2846
2921
|
|
|
2847
2922
|
exports.AtoB = AtoB;
|
|
2848
2923
|
exports.Countries = Countries;
|
|
2924
|
+
exports.DEFAULT_FIELD_HEIGHTS = DEFAULT_FIELD_HEIGHTS;
|
|
2925
|
+
exports.DEFAULT_FIELD_SETTINGS = DEFAULT_FIELD_SETTINGS;
|
|
2926
|
+
exports.DEFAULT_FIELD_WIDTHS = DEFAULT_FIELD_WIDTHS;
|
|
2927
|
+
exports.FIELD_TYPES = FIELD_TYPES;
|
|
2849
2928
|
exports.RolePermissions = RolePermissions;
|
|
2850
2929
|
exports.VerdocsEndpoint = VerdocsEndpoint;
|
|
2851
2930
|
exports.acceptOrganizationInvitation = acceptOrganizationInvitation;
|