@verdocs/js-sdk 4.2.51 → 4.2.53

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 CHANGED
@@ -612,15 +612,15 @@ interface IRecipient {
612
612
  profile_id: string;
613
613
  status: TRecipientStatus;
614
614
  email: string;
615
- phone: string | null;
615
+ phone?: string | null;
616
616
  full_name?: string | null;
617
617
  first_name: string;
618
618
  last_name: string;
619
- address: string;
620
- city: string;
621
- state: string;
622
- zip: string;
623
- ssn_last_4: string;
619
+ address?: string | null;
620
+ city?: string | null;
621
+ state?: string | null;
622
+ zip?: string | null;
623
+ ssn_last_4?: string | null;
624
624
  /**
625
625
  * The sequence number indicates the order in which Recipients act. Multiple recipients may have the same sequence
626
626
  * number, in which case they may act in parallel. (e.g. all Recipients at sequence 2 will receive invites once
@@ -640,16 +640,16 @@ interface IRecipient {
640
640
  claimed: boolean;
641
641
  agreed: boolean;
642
642
  key_used_to_conclude?: string;
643
- environment: string;
643
+ environment?: string;
644
644
  created_at: string;
645
645
  updated_at: string;
646
- last_attempt_at: string;
646
+ last_attempt_at?: string;
647
647
  /**
648
648
  * If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
649
649
  * created from this template. For privacy reasons, this field will only be visible to the creator
650
650
  * of the envelope and the recipient referenced.
651
651
  */
652
- kba_method: "pin" | "identity" | null;
652
+ kba_method?: "pin" | "identity" | null;
653
653
  /**
654
654
  * If KBA is set to "PIN" this will be set to the PIN code required. For security reasons, this
655
655
  * field will only be visible to the creator of the envelope.
@@ -659,13 +659,13 @@ interface IRecipient {
659
659
  * If KBA has been completed successfully, this will be set to true. For privacy reasons, this
660
660
  * field will only be visible to the creator of the envelope and the recipient referenced.
661
661
  */
662
- kba_completed: boolean;
662
+ kba_completed?: boolean;
663
663
  /**
664
664
  * If KBA has been completed (or partially successfully, this will contain metadata related to
665
665
  * the questions and answers from the process. For privacy reasons, this field will only be visible
666
666
  * to the recipient referenced.
667
667
  */
668
- kba_details: Record<string, any>;
668
+ kba_details?: Record<string, any>;
669
669
  envelope?: IEnvelope;
670
670
  profile?: IProfile;
671
671
  }
@@ -1707,6 +1707,53 @@ declare const updateApiKey: (endpoint: VerdocsEndpoint, clientId: string, params
1707
1707
  * ```
1708
1708
  */
1709
1709
  declare const deleteApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<any>;
1710
+ /**
1711
+ * An Organization Contact (aka Profile) is an individual user with no access to an organization. These entries
1712
+ * appear only in contact lists, usually to populate quick-search dropdowns when sending envelopes.
1713
+ *
1714
+ * @module
1715
+ */
1716
+ /**
1717
+ * Get a list of the contacts in the caller's organization.
1718
+ *
1719
+ * ```typescript
1720
+ * import {getOrganizationContacts} from '@verdocs/js-sdk';
1721
+ *
1722
+ * const members = await getOrganizationContacts(VerdocsEndpoint.getDefault()});
1723
+ * ```
1724
+ */
1725
+ declare const getOrganizationContacts: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
1726
+ /**
1727
+ * Delete a contact from the caller's organization. Note that the caller must be an admin or owner,
1728
+ * may not delete him/herself.
1729
+ *
1730
+ * ```typescript
1731
+ * import {deleteOrganizationContact} from '@verdocs/js-sdk';
1732
+ *
1733
+ * await deleteOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID'});
1734
+ * ```
1735
+ */
1736
+ declare const deleteOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
1737
+ /**
1738
+ * Update a member.
1739
+ *
1740
+ * ```typescript
1741
+ * import {createOrganizationContact} from '@verdocs/js-sdk';
1742
+ *
1743
+ * const result = await createOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'First', last_name:'Last', email:'a@b.com'});
1744
+ * ```
1745
+ */
1746
+ declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
1747
+ /**
1748
+ * Update a member.
1749
+ *
1750
+ * ```typescript
1751
+ * import {updateOrganizationContact} from '@verdocs/js-sdk';
1752
+ *
1753
+ * const result = await updateOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'NewFirst'});
1754
+ * ```
1755
+ */
1756
+ declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
1710
1757
  /**
1711
1758
  * Get a list of groups for a given organization. The caller must have admin access to the organization.
1712
1759
  *
@@ -2671,4 +2718,4 @@ declare const decodeJWTBody: (token: string) => any;
2671
2718
  * the presence of the `document_id` field, which will only be present for signing sessions.
2672
2719
  */
2673
2720
  declare const decodeAccessTokenBody: (token: string) => TSession;
2674
- export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, IDocumentSearchOptions, ICreateEnvelopeRecipient, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, 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, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, 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, 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 };
2721
+ export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, IDocumentSearchOptions, ICreateEnvelopeRecipient, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, 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, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -612,15 +612,15 @@ interface IRecipient {
612
612
  profile_id: string;
613
613
  status: TRecipientStatus;
614
614
  email: string;
615
- phone: string | null;
615
+ phone?: string | null;
616
616
  full_name?: string | null;
617
617
  first_name: string;
618
618
  last_name: string;
619
- address: string;
620
- city: string;
621
- state: string;
622
- zip: string;
623
- ssn_last_4: string;
619
+ address?: string | null;
620
+ city?: string | null;
621
+ state?: string | null;
622
+ zip?: string | null;
623
+ ssn_last_4?: string | null;
624
624
  /**
625
625
  * The sequence number indicates the order in which Recipients act. Multiple recipients may have the same sequence
626
626
  * number, in which case they may act in parallel. (e.g. all Recipients at sequence 2 will receive invites once
@@ -640,16 +640,16 @@ interface IRecipient {
640
640
  claimed: boolean;
641
641
  agreed: boolean;
642
642
  key_used_to_conclude?: string;
643
- environment: string;
643
+ environment?: string;
644
644
  created_at: string;
645
645
  updated_at: string;
646
- last_attempt_at: string;
646
+ last_attempt_at?: string;
647
647
  /**
648
648
  * If set, "KBA required" will carry through to automatically enable the same setting in Envelopes
649
649
  * created from this template. For privacy reasons, this field will only be visible to the creator
650
650
  * of the envelope and the recipient referenced.
651
651
  */
652
- kba_method: "pin" | "identity" | null;
652
+ kba_method?: "pin" | "identity" | null;
653
653
  /**
654
654
  * If KBA is set to "PIN" this will be set to the PIN code required. For security reasons, this
655
655
  * field will only be visible to the creator of the envelope.
@@ -659,13 +659,13 @@ interface IRecipient {
659
659
  * If KBA has been completed successfully, this will be set to true. For privacy reasons, this
660
660
  * field will only be visible to the creator of the envelope and the recipient referenced.
661
661
  */
662
- kba_completed: boolean;
662
+ kba_completed?: boolean;
663
663
  /**
664
664
  * If KBA has been completed (or partially successfully, this will contain metadata related to
665
665
  * the questions and answers from the process. For privacy reasons, this field will only be visible
666
666
  * to the recipient referenced.
667
667
  */
668
- kba_details: Record<string, any>;
668
+ kba_details?: Record<string, any>;
669
669
  envelope?: IEnvelope;
670
670
  profile?: IProfile;
671
671
  }
@@ -1707,6 +1707,53 @@ declare const updateApiKey: (endpoint: VerdocsEndpoint, clientId: string, params
1707
1707
  * ```
1708
1708
  */
1709
1709
  declare const deleteApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<any>;
1710
+ /**
1711
+ * An Organization Contact (aka Profile) is an individual user with no access to an organization. These entries
1712
+ * appear only in contact lists, usually to populate quick-search dropdowns when sending envelopes.
1713
+ *
1714
+ * @module
1715
+ */
1716
+ /**
1717
+ * Get a list of the contacts in the caller's organization.
1718
+ *
1719
+ * ```typescript
1720
+ * import {getOrganizationContacts} from '@verdocs/js-sdk';
1721
+ *
1722
+ * const members = await getOrganizationContacts(VerdocsEndpoint.getDefault()});
1723
+ * ```
1724
+ */
1725
+ declare const getOrganizationContacts: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
1726
+ /**
1727
+ * Delete a contact from the caller's organization. Note that the caller must be an admin or owner,
1728
+ * may not delete him/herself.
1729
+ *
1730
+ * ```typescript
1731
+ * import {deleteOrganizationContact} from '@verdocs/js-sdk';
1732
+ *
1733
+ * await deleteOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID'});
1734
+ * ```
1735
+ */
1736
+ declare const deleteOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
1737
+ /**
1738
+ * Update a member.
1739
+ *
1740
+ * ```typescript
1741
+ * import {createOrganizationContact} from '@verdocs/js-sdk';
1742
+ *
1743
+ * const result = await createOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'First', last_name:'Last', email:'a@b.com'});
1744
+ * ```
1745
+ */
1746
+ declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
1747
+ /**
1748
+ * Update a member.
1749
+ *
1750
+ * ```typescript
1751
+ * import {updateOrganizationContact} from '@verdocs/js-sdk';
1752
+ *
1753
+ * const result = await updateOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'NewFirst'});
1754
+ * ```
1755
+ */
1756
+ declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
1710
1757
  /**
1711
1758
  * Get a list of groups for a given organization. The caller must have admin access to the organization.
1712
1759
  *
@@ -2671,4 +2718,4 @@ declare const decodeJWTBody: (token: string) => any;
2671
2718
  * the presence of the `document_id` field, which will only be present for signing sessions.
2672
2719
  */
2673
2720
  declare const decodeAccessTokenBody: (token: string) => TSession;
2674
- export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, IDocumentSearchOptions, ICreateEnvelopeRecipient, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, 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, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, 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, 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 };
2721
+ export { TRequestStatus, TTemplateSenderType, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IReminder, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, 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, IDocumentSearchOptions, ICreateEnvelopeRecipient, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, 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, ITemplateSortBy, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, 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, 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 };
package/dist/index.js CHANGED
@@ -1830,6 +1830,62 @@ const deleteApiKey = (endpoint, clientId) => endpoint.api //
1830
1830
  .delete(`/v2/api-keys/${clientId}`)
1831
1831
  .then((r) => r.data);
1832
1832
 
1833
+ /**
1834
+ * An Organization Contact (aka Profile) is an individual user with no access to an organization. These entries
1835
+ * appear only in contact lists, usually to populate quick-search dropdowns when sending envelopes.
1836
+ *
1837
+ * @module
1838
+ */
1839
+ /**
1840
+ * Get a list of the contacts in the caller's organization.
1841
+ *
1842
+ * ```typescript
1843
+ * import {getOrganizationContacts} from '@verdocs/js-sdk';
1844
+ *
1845
+ * const members = await getOrganizationContacts(VerdocsEndpoint.getDefault()});
1846
+ * ```
1847
+ */
1848
+ const getOrganizationContacts = (endpoint) => endpoint.api //
1849
+ .get(`/v2/organization-contacts`)
1850
+ .then((r) => r.data);
1851
+ /**
1852
+ * Delete a contact from the caller's organization. Note that the caller must be an admin or owner,
1853
+ * may not delete him/herself.
1854
+ *
1855
+ * ```typescript
1856
+ * import {deleteOrganizationContact} from '@verdocs/js-sdk';
1857
+ *
1858
+ * await deleteOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID'});
1859
+ * ```
1860
+ */
1861
+ const deleteOrganizationContact = (endpoint, profileId) => endpoint.api //
1862
+ .delete(`/v2/organization-contacts/${profileId}`)
1863
+ .then((r) => r.data);
1864
+ /**
1865
+ * Update a member.
1866
+ *
1867
+ * ```typescript
1868
+ * import {createOrganizationContact} from '@verdocs/js-sdk';
1869
+ *
1870
+ * const result = await createOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'First', last_name:'Last', email:'a@b.com'});
1871
+ * ```
1872
+ */
1873
+ const createOrganizationContact = (endpoint, params) => endpoint.api //
1874
+ .post(`/v2/organization-contacts`, params)
1875
+ .then((r) => r.data);
1876
+ /**
1877
+ * Update a member.
1878
+ *
1879
+ * ```typescript
1880
+ * import {updateOrganizationContact} from '@verdocs/js-sdk';
1881
+ *
1882
+ * const result = await updateOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'NewFirst'});
1883
+ * ```
1884
+ */
1885
+ const updateOrganizationContact = (endpoint, profileId, params) => endpoint.api //
1886
+ .patch(`/v2/organization-contacts/${profileId}`, params)
1887
+ .then((r) => r.data);
1888
+
1833
1889
  /**
1834
1890
  * Organizations may contain "Groups" of user profiles, called Members. Groups may have permissions assigned that
1835
1891
  * apply to all Members, making it easy to configure role-based access control (RBAC) within an Organization. Note
@@ -2816,6 +2872,7 @@ exports.createEnvelopeReminder = createEnvelopeReminder;
2816
2872
  exports.createField = createField;
2817
2873
  exports.createGroup = createGroup;
2818
2874
  exports.createInitials = createInitials;
2875
+ exports.createOrganizationContact = createOrganizationContact;
2819
2876
  exports.createOrganizationInvitation = createOrganizationInvitation;
2820
2877
  exports.createProfile = createProfile;
2821
2878
  exports.createSignature = createSignature;
@@ -2833,6 +2890,7 @@ exports.deleteEnvelopeFieldAttachment = deleteEnvelopeFieldAttachment;
2833
2890
  exports.deleteEnvelopeReminder = deleteEnvelopeReminder;
2834
2891
  exports.deleteField = deleteField;
2835
2892
  exports.deleteGroupMember = deleteGroupMember;
2893
+ exports.deleteOrganizationContact = deleteOrganizationContact;
2836
2894
  exports.deleteOrganizationInvitation = deleteOrganizationInvitation;
2837
2895
  exports.deleteOrganizationMember = deleteOrganizationMember;
2838
2896
  exports.deleteProfile = deleteProfile;
@@ -2879,6 +2937,7 @@ exports.getMyUser = getMyUser;
2879
2937
  exports.getNextRecipient = getNextRecipient;
2880
2938
  exports.getNotifications = getNotifications;
2881
2939
  exports.getOrganization = getOrganization;
2940
+ exports.getOrganizationContacts = getOrganizationContacts;
2882
2941
  exports.getOrganizationInvitation = getOrganizationInvitation;
2883
2942
  exports.getOrganizationInvitations = getOrganizationInvitations;
2884
2943
  exports.getOrganizationMembers = getOrganizationMembers;
@@ -2948,6 +3007,7 @@ exports.updateEnvelopeReminder = updateEnvelopeReminder;
2948
3007
  exports.updateField = updateField;
2949
3008
  exports.updateGroup = updateGroup;
2950
3009
  exports.updateOrganization = updateOrganization;
3010
+ exports.updateOrganizationContact = updateOrganizationContact;
2951
3011
  exports.updateOrganizationInvitation = updateOrganizationInvitation;
2952
3012
  exports.updateOrganizationLogo = updateOrganizationLogo;
2953
3013
  exports.updateOrganizationMember = updateOrganizationMember;