import { AxiosInstance } from "axios";
/**
 * Create public templates. Public templates are still owned and managed by the creator,
 * but may be searched for and used to create envelopes by other users.
 */
type TTemplatePermissionCreatePublic = "template:creator:create:public";
/**
 * Create templates shared with other users of the same organization.
 */
type TTemplatePermissionCreateOrg = "template:creator:create:org";
/**
 * Create templates private to the creator.
 */
type TTemplatePermissionCreatePersonal = "template:creator:create:personal";
/**
 * Create templates private to the creator.
 */
type TTemplatePermissionDelete = "template:creator:delete";
/**
 * Alter the visiiblity settings on a template.
 */
type TTemplatePermissionVisibility = "template:creator:visibility";
/**
 * View templates shared by other members of the same organization. Those templates must also
 * have `is_personal` set to false to be visible.
 */
type TTemplateMemberRead = "template:member:read";
/**
 * Edit templates shared by other members of the same organization. Those templates must also
 * have `is_personal` set to false to be editable.
 */
type TTemplateMemberWrite = "template:member:write";
/**
 * Edit templates shared by other members of the same organization. Those templates must also
 * have `is_personal` set to false to be editable.
 */
type TTemplateMemberDelete = "template:member:delete";
/**
 * Edit templates shared by other members of the same organization. Those templates must also
 * have `is_personal` set to false to be editable.
 */
type TTemplateMemberVisibility = "template:member:visibility";
type TTemplatePermission = TTemplatePermissionCreatePublic | TTemplatePermissionCreateOrg | TTemplatePermissionCreatePersonal | TTemplatePermissionDelete | TTemplatePermissionVisibility | TTemplateMemberRead | TTemplateMemberWrite | TTemplateMemberDelete | TTemplateMemberVisibility;
/**
 * Grant the "owner" role to other organization members.
 */
type TAccountPermissionOwnerAdd = "owner:add";
/**
 * Remove the "owner" role from other organization members.
 */
type TAccountPermissionOwnerRemove = "owner:remove";
/**
 * Grant the "admin" role to other organization members.
 */
type TAccountPermissionAdminAdd = "admin:add";
/**
 * Remove the "admin" role from other organization members.
 */
type TAccountPermissionAdminRemove = "admin:remove";
/**
 * View the members of an organization.
 */
type TAccountPermissionMemberView = "member:view";
/**
 * Grant the "member" role to other organization members.
 */
type TAccountPermissionMemberAdd = "member:add";
/**
 * Remove the "member" role from other organization members.
 */
type TAccountPermissionMemberRemove = "member:remove";
type TAccountPermission = TAccountPermissionOwnerAdd | TAccountPermissionOwnerRemove | TAccountPermissionAdminAdd | TAccountPermissionAdminRemove | TAccountPermissionMemberAdd | TAccountPermissionMemberRemove | TAccountPermissionMemberView;
/**
 * Create a new organization.
 * @deprecated This is a system-wide setting and organization owners cannot prevent their
 * members from listing other organizations that they may have separate profiles in.
 */
type TOrgPermissionCreate = "org:create";
/**
 * View the organization.
 */
type TOrgPermissionView = "org:view";
/**
 * Update the organization.
 */
type TOrgPermissionUpdate = "org:update";
/**
 * Delete the organization.
 */
type TOrgPermissionDelete = "org:delete";
/**
 * Transfer ownership of the organization. This primarily allows the holder to remove his/her own
 * Owner role or add new Owners even if the holder is not one themselves. This is primarily intended
 * to be used for reseller scenarios.
 */
type TOrgPermissionTransfer = "org:transfer";
/**
 * List organizations.
 * @deprecated This is a system-wide setting and organization owners cannot prevent their
 * members from listing other organizations that they may have separate profiles in.
 */
type TOrgPermissionList = "org:list";
type TOrgPermission = TOrgPermissionCreate | TOrgPermissionView | TOrgPermissionUpdate | TOrgPermissionDelete | TOrgPermissionTransfer | TOrgPermissionList;
/**
 * Create envelopes.
 */
type TEnvelopePermissionCreate = "envelope:create";
/**
 * Cancel envelopes. This is a default permission for most users, but it may be removed for
 * highly regulated environments where envelope activities must be audited, and should not
 * be canceled.
 */
type TEnvelopePermissionCancel = "envelope:cancel";
/**
 * View envelopes. This is a default permission for most users, but it may be removed for
 * highly regulated environments where once sent, envelopes may only be viewed by specific
 * users.
 */
type TEnvelopePermissionView = "envelope:view";
/**
 * View envelopes created by other members of the same organization. By default, only templates
 * having sharing settings controlled by their creators. Envelopes are usually private to the
 * callers who created them. In some organizations it may be useful to have users who can see
 * "all activity" by all organization members. This is particularly useful when applied to API
 * keys to develop applications that can access all data across the organization.
 */
type TEnvelopePermissionOrg = "envelope:org:view";
type TEnvelopePermission = TEnvelopePermissionCreate | TEnvelopePermissionCancel | TEnvelopePermissionView | TEnvelopePermissionOrg;
/**
 * Operation within Verdocs that users may perform.
 */
type TPermission = TTemplatePermission | TOrgPermission | TAccountPermission | TEnvelopePermission;
/**
 * Roles provide access to groups of permissions. Note that for historical reasons there is some overlap in the
 * use of the term "role". TRole refers to a user type. A "Role" (IRole) is a Template participant placeholder.
 */
type TRole = "contact" | "basic_user" | "member" | "admin" | "owner";
/**
 * A map of the permissions each role confers.
 */
declare const RolePermissions: Record<TRole, TPermission[]>;
/**
 * Confirm whether the user has all of the specified permissions.
 */
declare const userHasPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
/**
 * A Signing Session connects a caller to a role within an envelope, and can be used only for calls related to signing that envelope.
 */
interface ISigningSession {
    aud: string;
    iss: string;
    sub: string; // Verdocs access key ID
    email: string;
    iat: number;
    exp: number;
    ["https://verdocs.com/session_type"]: "signing";
    ["https://verdocs.com/key_type"]: TAccessKeyType;
    ["https://verdocs.com/envelope_id"]: string;
    ["https://verdocs.com/role_name"]: string;
}
/**
 * A User Session connects a caller to a Verdocs profile, and can be used for any operations that profile may perform.
 */
interface IUserSession {
    jti: string;
    aud: string;
    iss: string;
    sub: string; // Verdocs user_id
    email: string;
    iat: number;
    exp: number;
    ["https://verdocs.com/session_type"]: "user";
    ["https://verdocs.com/profile_id"]: string;
    ["https://verdocs.com/organization_id"]: string;
    ["https://verdocs.com/global_admin"]: boolean;
}
interface IIdToken {
    aud: string;
    iss: string;
    sub: string; // Verdocs user_id
    email: string;
    organization_id: string;
    first_name: string;
    last_name: string;
    phone: string;
}
/**
 * Verdocs supports two types of authenticated sessions: User and Signing. Both behave similarly and have similar
 * properties, but signing sessions only have access to a small set of signing-related functions.
 */
type TSessionType = "user" | "signing";
/**
 * Represents a possibly-authenticated session within Verdocs, either for signing or regular user-based operations.
 */
type TSession = IUserSession | ISigningSession | null;
/**
 * An active authenticated session within Verdocs, either for signing or regular user-based operations.
 */
type TActiveSession = IUserSession | ISigningSession;
/////////////////////////////// NOTIFICATIONS /////////////////////////////
interface IChannel {
    id: string;
    channel_type: string;
    event_name: string;
    disabled_channels?: IDisabledChannel[];
}
interface IDisabledChannel {
    channel_id: string;
    profile_id: string;
    profile?: IProfile;
    channel?: IChannel;
}
interface INotification {
    id: string;
    profile_id: string;
    event_name: string;
    data: any;
    read: boolean;
    deleted: boolean;
    message: string;
    time: string;
    profile?: IProfile;
}
//////////////////////////////////////// IAM //////////////////////////////
interface IApiKey {
    client_id: string;
    name: string;
    organization_id: string;
    profile_id: string;
    global_admin: boolean;
    client_secret?: string | null;
    permission: TApiKeyPermission;
    profile?: IProfile;
    organization?: IOrganization;
}
interface IGroup {
    id: string;
    name: string;
    organization_id: string;
    permissions: TPermission[];
    organization?: IOrganization;
    profiles?: IGroupProfile[];
}
interface IGroupProfile {
    group_id: string;
    profile_id: string;
    organization_id: string;
    group?: IGroup;
    profile?: IProfile;
    organization?: IOrganization;
}
interface IOAuth2App {
    id: string;
    profile_id: string;
    organization_id: string;
    name: string;
    client_id: string;
    client_secret?: string | null;
    redirect_uris: string;
    origins: string;
    friendly_name: string;
    logo_uri: string;
    public_key: string;
    private_key: string;
    created_at: string;
    updated_at: string;
    organization?: IOrganization;
    profile?: IProfile;
}
interface IEntitlement {
    id: string;
    organization_id: string;
    feature: TEntitlement;
    contract_id?: string | null;
    notes?: string | null;
    starts_at: string;
    ends_at: string;
    monthly_max: number;
    yearly_max: number;
    created_at: string;
    organization?: IOrganization;
}
interface IOrganization {
    /** The unique ID of the organization */
    id: string;
    /** The organization's name. */
    name: string;
    address: string | null;
    address2: string | null;
    phone: string | null;
    /** If the organization is a business, its name. Note that a business name can be different from an organization name. */
    contact_email: string | null;
    slug?: string | null;
    /** Web site URL */
    url?: string | null;
    full_logo_url?: string | null;
    thumbnail_url?: string | null;
    primary_color?: string | null;
    secondary_color?: string | null;
    disclaimer?: string | null;
    data?: Record<string, any> | null;
    /** Creation date/time. */
    created_at: string;
    /** Last-update date/time. */
    updated_at: string;
    api_keys?: IApiKey[];
    groups?: IGroup[];
    oauth2_apps?: IOAuth2App[];
    entitlements?: IEntitlement[];
    organization_invitations?: IOrganizationInvitation[];
    profiles?: IProfile[];
    webhooks?: IWebhook[];
    envelopes?: IEnvelope[];
    templates?: ITemplate[];
    group_profiles?: IGroupProfile[];
    pending_webhooks?: IPendingWebhook[];
}
interface IOrganizationInvitation {
    organization_id: string;
    email: string;
    first_name: string;
    last_name: string;
    status: "pending";
    role: TRole;
    generated_at: string;
    token?: string | null;
    organization?: IOrganization;
}
interface IPendingWebhook {
    id: string;
    webhook_id: string;
    organization_id: string;
    url: string;
    body: any;
    created_at: string;
    delivered_at: string | null;
    last_attempt_at: string | null;
    last_status: number | null;
    last_result: string | null;
    webhook?: IWebhook;
    organization?: IOrganization;
}
interface IProfile {
    /** The unique ID of the profile */
    id: string;
    /**
     * In Verdocs, a user may have multiple profiles. A user represents a single person. A profile
     * represents that person within an organization. Some profiles may have no user atached, typically
     * Contacts and Signers. This can change if that person registers for a user later.
     */
    user_id: string | null;
    /** The profile's organization ID, or a global "Verdocs" organization that all personal profiles are members of. */
    organization_id: string;
    first_name: string;
    last_name: string;
    email: string;
    phone: string | null;
    picture: string | null;
    /** If true, this is the caller's "currently selected" profile. All operations will performed "as" this profile. */
    current: boolean;
    permissions: TPermission[];
    roles: TRole[];
    // Creation date/time.
    created_at: string;
    // Last-update date/time.
    updated_at: string;
    user?: IUser;
    organization?: IOrganization;
    api_keys?: IApiKey[];
    group_profiles?: IGroupProfile[];
    groups?: IGroup[];
    notifications?: INotification[];
    oauth2_apps?: IOAuth2App[];
    signatures?: ISignature[];
    initials?: IInitial[];
}
interface IUser {
    id: string;
    email: string;
    email_verified: boolean;
    pass_hash?: string;
    first_name: string | null;
    last_name: string | null;
    phone: string | null;
    picture: string | null;
    b2cId: string | null;
    googleId: string | null;
    appleId: string | null;
    githubId?: string | null;
    created_at: string;
    updated_at: string;
}
interface IWebhookEvents {
    envelope_created: boolean;
    envelope_completed: boolean;
    envelope_updated: boolean;
    envelope_canceled: boolean;
    template_created: boolean;
    template_updated: boolean;
    template_deleted: boolean;
    template_used: boolean;
}
interface IWebhook {
    id: string;
    organization_id: string;
    url: string;
    active: boolean;
    events: IWebhookEvents;
    status: string | null;
    last_success: string | null;
    last_failure: string | null;
    organization?: IOrganization;
    pending_webhooks?: IPendingWebhook[];
}
//////////////////////////////// FORMS ////////////////////////////////////
interface IInPersonAccessKey {
    id: string;
    type: "in_person_link";
    authentication?: string | null;
    role_name: string;
    envelope_id: string;
    key: string;
    expiration_date: string | null;
    created_at: string;
    first_used: string | null;
    last_used: string | null;
    envelope?: IEnvelope;
}
interface IInAppAccessKey {
    id: string;
    type: "in_app";
    authentication?: string | null;
    recipient_name: string;
    envelope_id: string;
    key: string;
    expiration_date: string | null;
    created_at: string;
    first_used: string | null;
    last_used: string | null;
    envelope?: IEnvelope;
}
interface IEmailAccessKey {
    id: string;
    type: "email";
    authentication?: string | null;
    recipient_name: string;
    envelope_id: string;
    key: string;
    expiration_date: string | null;
    created_at: string;
    first_used: string | null;
    last_used: string | null;
    envelope?: IEnvelope;
}
interface ISMSAccessKey {
    id: string;
    type: "sms";
    authentication?: string | null;
    recipient_name: string;
    envelope_id: string;
    key: string;
    expiration_date: string | null;
    created_at: string;
    first_used: string | null;
    last_used: string | null;
    envelope?: IEnvelope;
}
type TAccessKey = IInPersonAccessKey | IInAppAccessKey | IEmailAccessKey | ISMSAccessKey;
/**
 * An Envelope is a workflow wrapper that shepherds one or more Documents through the various recipients in a signing
 * process.
 */
interface IEnvelope {
    /** Unique identifier for the envelope (UUID) */
    id: string;
    /** Current status of the envelope. Note that 'complete', 'declined', and 'canceled' are immutable/permanent end states. */
    status: TEnvelopeStatus;
    /** ID of the envelope's creator. */
    profile_id: string;
    /** ID of the template from which the envelope was created. */
    template_id: string | null;
    /** ID of the organization to which the envelope belongs. */
    organization_id: string;
    /** Name of the envelope. By defaut, inherited from the envelope's template, but may be overridden when the envelope is created. */
    name: string;
    /** If set to true, no email or SMS messages will be sent to any of the envelope's recipients. */
    no_contact?: boolean;
    /** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
    initial_reminder: number | null;
    /** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
    followup_reminders: number | null;
    /** When the next reminder is scheduled to be sent. */
    next_reminder: string | null;
    /** Date/time when the envelope was created. */
    created_at: string;
    /** Date/time when the envelope was created. */
    updated_at: string;
    /** Date/time when the envelope was canceled, or null. */
    canceled_at: string;
    /** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
    visibility: "private" | "shared";
    search_key?: string | null;
    /**
     * Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Envelopes back to
     * internal systems/applications.
     */
    data?: Record<string, any> | null;
    profile?: IProfile;
    template?: ITemplate | null;
    organization?: IOrganization;
    access_keys?: TAccessKey[];
    fields?: IEnvelopeField[];
    history_entries?: IEnvelopeHistory[];
    recipients: IRecipient[];
    /** Documents attached to this envelope */
    documents?: IEnvelopeDocument[] | null;
}
interface IEnvelopeDocument {
    id: string;
    envelope_id: string;
    template_document_id: string | null;
    order: number;
    type: "attachment" | "certificate";
    name: string;
    pages: number;
    mime: string;
    size: number;
    page_sizes: {
        width: number;
        height: number;
    }[];
    created_at: string;
    updated_at: string;
}
interface IDropdownOption {
    id: string;
    label: string;
}
interface IEnvelopeField {
    /** The ID of the envelope the field is for. */
    envelope_id: string;
    /** The ID of the document the field is for. */
    document_id: string;
    /** The machine name of the field, e.g. `Buyer-textbox-1` */
    name: string;
    /** The ID of the role in the recipients list, e.g. `Recipient 2` */
    role_name: string;
    /** The type of the field */
    type: TFieldType;
    /** If true, the field will be required */
    required: boolean | null;
    /** If true, the field will be not be editable by the participant(s). NOTE: Fields may not be both required and readonly. */
    readonly: boolean | null;
    /** @deprecated. Use top-level fields instead. */
    settings: IEnvelopeFieldSettings | null;
    validator: string | null;
    /** If set, the placeholder/label for the field. */
    label: string | null;
    /** Not sent by the server. Used in the UI to identify prepared fields. */
    prepared: boolean | null;
    /** The 1-based page number the field is displayed on. "Self-placed" fields that the user must apply will be on page 0. */
    page: number;
    /** The X position of the field. */
    x: number;
    /** The Y position of the field. */
    y: number;
    /** The width of the field. */
    width: number;
    /** The height of the field. */
    height: number;
    /** The default value for the field. */
    default: string | null;
    /** The placeholder to show in the field. */
    placeholder: string | null;
    /** For text boxes, allows more than one line of text to be entered. */
    multiline: boolean;
    /** For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name. */
    group: string | null;
    /** For dropdowns, the options that are selectable. */
    options: IDropdownOption[] | null;
    value: string | null;
    is_valid: boolean;
}
interface IEnvelopeFieldOptions {
    /** The unique ID of the field */
    id: string;
    /** The X position of the field on the page. Self-placed fields will have an X value of 0. */
    x: number;
    /** The Y position of the field on the page. Self-placed fields will have an X value of 0. */
    y: number;
    /** For checkboxes, whether it is currently checked */
    checked: boolean | null;
    /** For radio buttons, whether it is currently selected */
    selected: boolean | null;
    /** The visible label for the field e.g. 'Not Applicable' */
    value: string;
}
interface IEnvelopeFieldSettings {
    type?: string;
    x?: number;
    y?: number;
    width?: number;
    height?: number;
    value?: number | string;
    /** If the field has been filled in, this contains the current value */
    result?: any;
    /** Text field settings */
    leading?: number;
    alignment?: number;
    upperCase?: boolean;
    /** Dropdowns, checkboxes, radio groups */
    options?: IEnvelopeFieldOptions[];
    /** Signatures and Initials, result will be "signed" */
    base64?: string;
    hash?: string;
    ip_address?: string;
    signature_id?: string;
    signed_at?: string;
    /** Checkbox settings */
    minimum_checked?: number;
    maximum_checked?: number;
}
interface IEnvelopeHistory {
    id: string;
    envelope_id: string;
    role_name: string;
    event: THistoryEvent;
    event_detail: TEventDetail;
    created_at: string;
    envelope?: IEnvelope;
}
interface IInitial {
    id: string | null;
    profile_id: string;
    created_at: string | null;
    updated_at: string | null;
    deleted_at: string | null;
    profile?: IProfile;
}
interface IKbaPINRequired {
    type: "pin";
}
interface IKBAQuestion {
    type: string;
    answer: string[];
    prompt: string;
}
interface IRecipient {
    /** Used only by the Web SDK during builder processes. Not stored in the backend. */
    id?: string | null;
    envelope_id: string;
    role_name: string;
    profile_id?: string | null;
    status: TRecipientStatus;
    first_name: string;
    last_name: string;
    /** @deprecated. Use first_name/last_name instead. */
    full_name?: string | null;
    email: string;
    /** Phone number for SMS invites */
    phone?: string | null;
    /** Street address. Only used in KBA workflows. Combine two-line addresses into a single string. */
    address?: string | null;
    /** Zip code. Only used in KBA workflows. */
    city?: string | null;
    /** Zip code. Only used in KBA workflows. */
    state?: string | null;
    /** Zip code. Only used in KBA workflows. */
    zip?: string | null;
    /** @deprecated. Use dob instead. */
    ssn_last_4?: string | null;
    /** Date of birth. Only used in KBA workflows. */
    dob?: string | null;
    /**
     * The sequence number indicates the order in which Recipients act. Multiple recipients may have the same sequence
     * number, in which case they may act in parallel. (e.g. all Recipients at sequence 2 will receive invites once
     * all Recipients at sequence 1 have signed.)
     */
    sequence: number;
    /**
     * The order indicates the order in which recipients are listed in a single "level" of the workflow. Note that
     * recipients at the same level may act in parallel despite this value. However, it can often be useful to visually
     * arrange recipients to match related business processes so this field allows for that.
     */
    order: number;
    type: TRecipientType;
    delegator: boolean;
    delegated_to: string | null;
    message: string | null;
    claimed: boolean;
    agreed: boolean;
    key_used_to_conclude?: string;
    environment?: string;
    created_at: string;
    updated_at: string;
    last_attempt_at?: string;
    /**
     * Only returned in creation/getEnvelopeById requests by the creator. May be used for in-person signing. Note that
     * signing sessions started with this key will be marked as "In App" authenticated. For higher authentication levels,
     * e.g. email, the signer must follow a link send via the appropriate channel (email).
     */
    in_app_key?: string;
    /**
     * The next verification step that must be performed.
     */
    auth_step?: TRecipientAuthStep | null;
    /** The types of authentication/verification required for this recipient. */
    auth_methods?: TRecipientAuthMethod[] | null;
    /** The status of each auth method enabled. */
    auth_method_states?: Record<TRecipientAuthMethod, "complete" | "failed" | "challenge" | "questions" | "differentiator" | null> | null;
    /**
     * If auth_method is set to "passcode" this is the passcode required. For security reasons, this
     * field will only be visible to the creator of the envelope.
     */
    passcode?: string | null;
    /**
     * If a KBA step requires the user to answer a challenge/differentiator question, the
     * question(s) to ask.
     */
    kba_questions?: IKBAQuestion[] | null;
    envelope?: IEnvelope;
    profile?: IProfile;
}
/**
 * A placeholder for an individual recipient, CC, or other party in a signing flow. Roles may be "known" or "unknown."
 * "Known" roles will have their email address supplied in the template which will get copied to envelopes created from
 * it. This is used when a certain party will always be the same, e.g. a leasing agent counter-signing a lease.
 * "Unknown" roles are dynamic, and will be filled in later when the envelope is created.
 */
interface IRole {
    /** Used only by the Web SDK during builder processes. Not stored in the backend. */
    id?: string | null;
    template_id: string;
    // The name of the recipient. Note that recipients do not have a separate ID - they are uniquely identified by name.
    name: string;
    type: TRecipientType;
    full_name: string | null;
    first_name: string | null;
    last_name: string | null;
    email: string | null;
    phone: string | null;
    message: string | null;
    /**
     * The sequence number indicates the order in which Roles act. Multiple roles may have the same sequence
     * number, in which case they may act in parallel. (e.g. all Roles at sequence 2 will receive invites once
     * all Recipients at sequence 1 have signed.)
     */
    sequence: number;
    /**
     * The order indicates the order in which recipients are listed in a single "level" of the workflow. Note that
     * recipients at the same level may act in parallel despite this value. However, it can often be useful to visually
     * arrange recipients to match related business processes so this field allows for that.
     */
    order: number;
    delegator: boolean | null;
}
interface ISignature {
    id: string;
    profile_id: string;
    created_at: string;
    updated_at: string;
    deleted_at: string | null;
    profile?: IProfile;
}
/**
 * A reusable template for creating signable instruments. Templates are used to create Envelopes which contain
 * Documents to sign.
 */
interface ITemplate {
    /**
     * The unique ID of the template.
     */
    id: string;
    /**
     * The template's owner/creator.
     */
    profile_id: string;
    /**
     * Organization the template lives in.
     */
    organization_id: string;
    /**
     * Who will "own" envelopes created from this template. Note that while either option is
     * technically allowed for all visibility settings, "template_owner" only has an effect if
     * visibility is "shared" or "public".
     */
    sender: TTemplateSender;
    /*
    The user-supplied name of the template.
    */
    name: string;
    /**
     * Optional description for the template.
     */
    description?: string;
    /**
     * Number of times the template has been used.
     */
    counter: number;
    /**
     * Number of times the template has been "starred".
     */
    star_counter: number;
    /** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
    initial_reminder: number | null;
    /** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
    followup_reminders: number | null;
    /**
     * If true, the template is only visible to the creator. If false, the template will also be visible to the user's
     * organization, if any.
     * @deprecated. See "visibility".
     */
    is_personal: boolean;
    /**
     * If true, the template is visible publicly. Note that this does not necessarily mean it is also visible to the
     * user's organization. It may be desirable to create documents that are public but that do not appear in the
     * organization's shared templates list. To achieve this, set both `is_personal` and `is_public` to TRUE.
     * @deprecated. See "visibility".
     */
    is_public: boolean;
    /**
     * If set, the visibility level for the template.
     */
    visibility?: TTemplateVisibility;
    /**
     * If true, the template is considered "sendable" (it has at least one signer, and every signer has at least one field.)
     */
    is_sendable: boolean;
    /**
     * Creation date/time.
     */
    created_at: string;
    /**
     * Last-update date/time.
     */
    updated_at: string;
    /**
     * Last-used date/time (when the template was used to create a document).
     */
    last_used_at: string | null;
    search_key: string;
    /**
     * Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Templates back to
     * internal systems/applications.
     */
    data: Record<string, any> | null;
    tags?: string[];
    profile?: IProfile;
    organization?: IOrganization;
    roles?: IRole[];
    documents?: ITemplateDocument[];
    fields?: ITemplateField[];
    // @deprecated. Use documents instead.
    template_documents?: ITemplateDocument[];
}
/**
 * A file attached to the template for display/signing.
 */
interface ITemplateDocument {
    id: string;
    name: string;
    template_id: string;
    order: number;
    pages: number;
    mime: string;
    size: number;
    page_sizes: {
        width: number;
        height: number;
    }[];
    created_at: string | null;
    updated_at: string | null;
    // @deprecated. Use pages instead.
    page_numbers?: number;
    template?: ITemplate;
}
interface ITemplateField {
    /** The machine name of the field, e.g. `Buyer-textbox-1` */
    name: string;
    /** The ID of the role in the recipients list, e.g. `Recipient 2` */
    role_name: string;
    /** The ID of the template the field is for. */
    template_id: string;
    /** The ID of the document the field is for. */
    document_id: string;
    type: TFieldType;
    required: boolean;
    /** If true, the field will be not be editable by the participant(s). NOTE: Fields may not be both required and readonly. */
    readonly: boolean | null;
    /** @deprecated. Use top-level fields instead. */
    settings: ITemplateFieldSetting | null;
    page: number;
    validator: string | null;
    label: string | null;
    /** The X position of the field. */
    x: number;
    /** The Y position of the field. */
    y: number;
    /** The width of the field. */
    width: number;
    /** The height of the field. */
    height: number;
    /** The default value for the field. */
    default: string | null;
    /** The placeholder to show in the field. */
    placeholder: string | null;
    /** For text boxes, allows more than one line of text to be entered. */
    multiline: boolean;
    /** For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name. */
    group: string | null;
    /** For dropdowns, the options that are selectable. */
    options: IDropdownOption[] | null;
    value?: string | null;
    is_valid?: boolean;
}
interface ITextFieldSetting {
    x: number;
    y: number;
    width: number;
    height: number;
    result: string;
    leading: number;
    alignment: number;
    upperCase: boolean;
}
interface ITemplateFieldSetting {
    x?: number;
    y?: number;
    result?: string;
    width?: number;
    height?: number;
    // Text field settings
    leading?: number;
    alignment?: number;
    upperCase?: boolean;
    // Dropdowns, checkboxes, radio groups
    options?: any[];
    [key: string]: any;
}
type TRequestStatus = "OK" | "ERROR";
type TTemplateSender = "envelope_creator" | "template_owner";
type TTemplateAction = "create_personal" | "create_org" | "create_public" | "read" | "write" | "delete" | "change_visibility_personal" | "change_visibility_org" | "change_visibility_public";
type TRecipientAction = "submit" | "decline" | "prepare" | "update";
type TEnvelopeStatus = "complete" | "pending" | "in progress" | "declined" | "canceled";
type TRecipientStatus = "invited" | "opened" | "signed" | "submitted" | "canceled" | "pending" | "declined";
type TRecipientType = "signer" | "cc" | "approver";
/**
 * Plans provide access to Verdocs product features.
 */
// export type TPlan = 'env:essential' | 'org:standard';
type TSortTemplateBy = "created_at" | "updated_at" | "name" | "last_used_at" | "counter" | "star_counter";
type TAccessKeyType = "email" | "in_app" | "in_person_link" | "sms";
type TApiKeyPermission = "personal" | "global_read" | "global_write";
/** @deprecated. See envelope.created_at, .updated_at, and .canceled_at. */
type TDeprecatedHistoryEvent = "envelope:created" | "envelope:completed";
type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submitted" | "recipient:prepared" | "recipient:claimed" | "recipient:agreed" | "recipient:invited" | "recipient:reminder" | "recipient:delegated" | "recipient:updated_info" | "recipient:declined" | "recipient:kba_verified" | "recipient:kba_failed" | "recipient:id_verified" | "recipient:id_failed" | "recipient:pin_verified" | "recipient:pin_failed" | "invitation:resent" | "envelope:cc" | "envelope:canceled" | "owner:updated_recipient_info" | "owner:get_in_person_link" | TDeprecatedHistoryEvent;
type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
// Modification events have a string description
type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "template_created" | "template_updated" | "template_deleted" | "template_used";
type TTemplateVisibility = "private" | "shared" | "public";
type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
/**
 * The authentication method(s) required for a recipient to access an envelope. "Passcode" will require a
 * PIN or passcode to be entered, which is intended to be known to the sender and recipient ahead of time
 * and communicated by means of their choosing. "SMS" and "Email" will send a one-time-code via the respective
 * channel for the recipient to enter. "KBA" will require the recipient to confirm personal information such
 * as prior addresses, phone numbers, etc. "ID" will require the recipient to perform full ID-based verification.
 */
type TRecipientAuthMethod = "kba" | "passcode" | "sms" | "email" | "id";
type TRecipientAuthStep = TRecipientAuthMethod | null;
declare const FIELD_TYPES: TFieldType[];
declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
declare const WEBHOOK_EVENTS: string[];
declare const ALL_PERMISSIONS: string[];
type TEnvironment = "" | "beta";
type TSessionChangedListener = (endpoint: VerdocsEndpoint, session: TSession, profile: IProfile | null) => void;
interface VerdocsEndpointOptions {
    baseURL?: string;
    timeout?: number;
    environment?: TEnvironment;
    sessionType?: TSessionType;
    clientID?: string;
    /** By default, sessions will be persisted to localStorage. Set `persist` to false to bypass this. */
    persist?: boolean;
}
/**
 * VerdocsEndpoint is a class wrapper for a specific connection and authorization context for calling the Verdocs APIs.
 * Endpoints can be used for isolated session tasks.
 *
 * For instance, ephemeral signing sessions may be created independently of a caller's status as an authenticated user.
 * In that case, an Endpoint can be created and authenticated, used for calls related to signing operations, then
 * discarded once signing is complete.
 *
 * Note that endpoint configuration functions return the instance, so they can be chained, e.g.
 *
 * ```typescript
 * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
 *
 * const endpoint = new VerdocsEndpoint();
 * endpoint
 *     .setSessionType('signing')
 *     .logRequests(true)
 *     .setClientID('1234)
 *     .setTimeout(30000);
 * ```
 */
declare class VerdocsEndpoint {
    private environment;
    private sessionType;
    private persist;
    private baseURL;
    private clientID;
    private timeout;
    private token;
    private nextListenerId;
    private sessionListeners;
    private requestLoggerId;
    endpointId: string;
    /**
     * The current user's userId (NOT profileId), or null if not authenticated.
     */
    sub: string | null;
    /**
     * The current user session, or null if not authenticated. May be either a User or Signing session. If set, the
     * presence of the `document_id` field can be used to differentiate the types. Only signing sessions are associated
     * with Envelopes.
     */
    session: TSession;
    /**
     * The current user's profile, if known. Note that while sessions are loaded and handled synchronously,
     * profiles are loaded asynchronously and may not be available immediately after a session is loaded.
     * To ensure both are available, developers should subscribe to the `onSessionChanged` event, which
     * will not be fired until the profile is loaded and verified.
     */
    profile: IProfile | null;
    api: AxiosInstance;
    /**
     * Create a new VerdocsEndpoint to call Verdocs platform services.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     * const endpoint = new VerdocsEndpoint();
     * ```
     */
    constructor(options?: VerdocsEndpointOptions);
    setDefault(): void;
    static getDefault(): VerdocsEndpoint;
    /**
     * Get the current environment.
     */
    getEnvironment(): TEnvironment;
    /**
     * Get the current session type.
     */
    getSessionType(): TSessionType;
    /**
     * Get the current base URL. This should rarely be anything other than 'https://api.verdocs.com'.
     */
    getBaseURL(): string;
    /**
     * Get the current client ID, if set.
     */
    getClientID(): string;
    /**
     * Get the current timeout.
     */
    getTimeout(): number;
    /**
     * Get the current session, if any.
     */
    getSession(): TSession;
    /**
     * Set the operating environment. This should rarely be anything other than 'verdocs'.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.setEnvironment('verdocs-stage');
     * ```
     */
    setEnvironment(environment: TEnvironment): VerdocsEndpoint;
    /**
     * Set the session type. In general this should be done immediately when the endpoint is created. Changing the
     * session type may be done at any time, but may have unintended consequences if the endpoint is shared between
     * multiple widgets.
     *
     * Changing the session type will clear/reload the action session. This may trigger notifications to session state
     * observers. Apps that use observers to trigger UI updates such as logging the user out should be prepared to
     * handle this event.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.setEnvironment('verdocs-stage');
     * ```
     */
    setSessionType(sessionType: TSessionType): VerdocsEndpoint;
    /**
     * Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.setBaseURL('https://api.verdocs.com');
     * ```
     */
    setBaseURL(url: string): VerdocsEndpoint;
    /**
     * Set the Client ID for Verdocs API calls.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.setClientID('1234);
     * ```
     */
    setClientID(clientID: string): VerdocsEndpoint;
    /**
     * Set the timeout for API calls in milliseconds. 5000-20000ms is recommended for most purposes. 15000ms is the default.
     * Note that some calls may involve rendering operations that require some time to complete, so very short timeouts
     * are not recommended.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.setTimeout(3000);
     * ```
     */
    setTimeout(timeout: number): VerdocsEndpoint;
    /**
     * Enable or disable request logging. This may expose sensitive data in the console log, so it should only be used for debugging.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.logRequests(true);
     * ```
     */
    logRequests(enable: boolean): VerdocsEndpoint;
    /**
     * Set the authorization token that will be used for Verdocs API calls. This will also set the session metadata
     * and notify any listeners of the new data.
     *
     * If this Endpoint will be used for non-default purposes (e.g. signing, or in an alternate environment) those
     * settings should be made before calling this. Sessions are persisted to localStorage, and the environment and
     * type become part of the storage key.
     *
     * ```typescript
     * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
     *
     * const endpoint = new VerdocsEndpoint();
     * endpoint.setToken(accessToken);
     * ```
     */
    setToken(token: string | null, sessionType?: TSessionType): VerdocsEndpoint;
    /**
     * Retrieves the current session token, if any. Tokens should rarely be used for direct actions, but this is
     * required by the `<VerdocsView>` and other components to authorize requests to raw PDF files.
     */
    getToken(): string | null;
    private sessionStorageKey;
    /**
     * Clear the active session.
     */
    clearSession(): this;
    /**
     * Clear the active signing session.
     */
    clearSignerSession(): this;
    private notifySessionListeners;
    /**
     * Subscribe to session state change events.
     */
    onSessionChanged(listener: TSessionChangedListener): () => void;
    /**
     * Load a persisted session from localStorage. Typically called once after the endpoint is configured
     * when the app or component starts. Ignored if the endpoint is configured to not persist sessions.
     */
    loadSession(): VerdocsEndpoint;
}
interface IEnvelopesSearchResult {
    page: number;
    total: number;
    result: IEnvelope[];
}
interface IDocumentSearchOptions {
    rows?: number;
    page?: number;
    sort_by?: "updated_at" | "created_at";
    ascending?: boolean;
    is_owner?: boolean;
    is_recipient?: boolean;
    envelope_status?: TEnvelopeStatus[];
    recipient_status?: TEnvelopeStatus[];
}
interface ICreateEnvelopeRecipient {
    /** The type of role to create. Most participants in standard flows will be "signer" recipients. */
    type: TRecipientType;
    /**
     * The Role name of the recipient. Please note this is not the person's name. It is the ID of the role, e.g.
     * 'Recipient 1', 'Seller', etc. This must match one of the pre-defined roles in the template's Recipients list.
     */
    role_name: string;
    /** The name of the recipient as it will be displayed in reports and queries, e.g. 'Paige Turner'. */
    first_name: string;
    last_name: string;
    /** The email address of the recipient. One of `email` or `phone` must be provided. */
    email?: string;
    /**
     * The phone number of the recipient. One of `email` or `phone` must be provided. If `phone` is included, the
     * recipient will receive an SMS notification for the document.
     */
    phone?: string;
    /**
     * The 1-based sequence number for the recipient. This can be used to override the template's workflow. Recipients
     * are processed in parallel for each matching sequence number (e.g. all recipients at level "1" may act in parallel)
     * and in series between sequence numbers (e.g. all recipients at level "1" must complete their tasks before
     * recipients at level "2" may act).
     */
    sequence: number;
    /**
     * The 1-based order within the sequence for the recipient. Recipients at the same sequence act in parallel, so
     * this is only for display purposes.
     */
    order: number;
    /** Whether the recipient may delegate their tasks to others. Should be false for most standard workflows. */
    delegator?: boolean;
    /** A custom message to include in the email or SMS invitation. May be left blank for a default message. */
    message?: string;
    /** To enable authentication for the recipient, set to 'pin' or 'identity'. */
    auth_method?: TRecipientAuthMethod;
    /** If Passcode-based authentication is used, the passcode to challenge the user to enter. */
    passcode?: string;
    /**
     * If SMS-based authentication is used, the phone number to which one-time codes should be sent.
     * NOTE: This may be different from the phone number used for notifications, but leaving it blank
     * will trigger an error rather than defaulting to the notifications phone number to avoid mistaken
     * assumptions (e.g. if SMS notifications are not enabled for the organization, but SMS authentication
     * is).
     */
    phone_auth?: string;
    /*
    * Pre-fill data for the recipient, if known. NOTE: Even when pre-filling these fields for a recipient, if
    * KBA is enabled, the recipient must be provided with the option to confirm those details before proceeding,
    * provide at least one data point themselves (typically date of birth). Providing every value here will
    trigger an error.
    */
    address?: string;
    city?: string;
    state?: string;
    zip?: string;
    dob?: string;
}
interface ISignerTokenResponse {
    /**
     * An access token that may be used with a VerdocsEndpoint to perform signing operations.
     * When signing, the caller's "authentication" status will be recorded as "in-person".
     */
    access_token: string;
    /**
     * A copy of the envelope related to the signing session. This is almost always needed when
     * a signing session is being started, so it is included here for convenience.
     */
    envelope: IEnvelope;
    /**
     * A copy of the recipient record related to the signing session. This is almost always needed when
     * a signing session is being started, so it is included here for convenience.
     */
    recipient: IRecipient;
}
interface IInPersonLinkResponse {
    /** A valid Verdocs Web URL that hosts a signing experience. */
    link: string;
    /**
     * An access token that may be used with a VerdocsEndpoint to perform signing operations.
     * When signing, the caller's "authentication" status will be recorded as "in-person".
     */
    access_token: string;
    /**
     * The access key that matches the signing session. May be used for later initiation requests
     * if in-person signing was desired, but not necessarily instant (e.g. to hand-off to a
     * companion application. **NOTE: Access keys are as sensitive as Bearer Tokens and must be
     * protected from theft and unauthorized sharing!**
     */
    access_key: TAccessKey;
    /**
     * A copy of the envelope related to the signing session. This is almost always needed when
     * a signing session is being started, so it is included here for convenience.
     */
    envelope: IEnvelope;
    /**
     * A copy of the recipient record related to the signing session. This is almost always needed when
     * a signing session is being started, so it is included here for convenience.
     */
    recipient: IRecipient;
}
interface IUpdateRecipientSubmitParams {
    action: "submit";
}
interface IUpdateRecipientDeclineParams {
    action: "decline";
}
interface IUpdateRecipientClaimEnvelope {
    action: "owner_update";
    first_name: string;
    last_name: string;
    email: string;
}
interface IUpdateRecipientStatus {
    first_name?: string;
    last_name?: string;
    agreed?: boolean;
    action?: "prepare" | "update";
}
interface IUpdateRecipientAgreedParams {
    action: "update";
    agreed: boolean;
}
interface IUpdateRecipientNameParams {
    action: "update";
    first_name: string;
    last_name: string;
}
interface IUpdateRecipientPrepareParams {
    action: "prepare";
    recipients: IRecipient[];
}
interface ICreateEnvelopeReminderRequest {
    setup_time: number;
    interval_time: number;
}
interface ICreateEnvelopeFromTemplateRequest {
    template_id: string;
    recipients: ICreateEnvelopeRecipient[];
    name?: string;
    description?: string;
    fields?: Pick<IEnvelopeField, "name" | "role_name" | "default">[];
    environment?: string;
    no_contact?: boolean;
    /** Override the sender name of the envelope in email and other notifications. NOTE: To prevent spam filters from blocking messages, only the NAME may be overidden. The "from" email address will be notifications@verdocs.com and cannot be changed. */
    sender_name?: string;
    /** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
    initial_reminder?: number;
    /** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
    followup_reminders?: number;
}
interface ICreateEnvelopeDirectlyRequest {
    name: string;
    description?: string;
    visiblity?: "private" | "shared";
    recipients: ICreateEnvelopeRecipient[];
    documents: IEnvelopeDocument[];
    fields: Pick<IEnvelopeField, "name" | "role_name" | "default">[];
    environment?: string;
    no_contact?: boolean;
    /** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
    initial_reminder: number;
    /** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
    followup_reminders: number;
}
type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelopeDirectlyRequest;
interface IAuthenticateRecipientViaPasscodeRequest {
    auth_method: "passcode";
    code: string;
}
interface IAuthenticateRecipientViaEmailRequest {
    auth_method: "email";
    code: string;
    resend?: boolean;
}
interface IAuthenticateRecipientViaSMSRequest {
    auth_method: "sms";
    code: string;
    resend?: boolean;
}
interface IKBAResponse {
    type: string;
    answer: string | number;
}
interface IAuthenticateRecipientViaKBARequest {
    auth_method: "kba";
    first_name?: string;
    last_name?: string;
    address?: string;
    city?: string;
    state?: string;
    zip?: string;
    ssn_last_4?: string;
    dob?: string;
    responses?: IKBAResponse[];
}
type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest | IAuthenticateRecipientViaEmailRequest | IAuthenticateRecipientViaSMSRequest | IAuthenticateRecipientViaKBARequest;
/**
 * Create an envelope
 *
 * ```typescript
 * import {Envelopes, ICreateEnvelopeRole, ICreateEnvelopeRequest} from '@verdocs/js-sdk/Envelopes';
 *
 * const role1: ICreateEnvelopeRole = {
 *   type: 'signer',
 *   name: 'Seller',
 *   first_name: 'Paige',
 *   last_name: 'Turner',
 *   email: 'paige.turner@nomail.com',
 *   phone: '',
 *   sequence: 1,
 *   delegator: false,
 *   message: '',
 * };
 *
 * const role2: ICreateEnvelopeRole = {
 *   type: 'signer',
 *   name: 'Buyer',
 *   first_name: 'Power',
 *   last_name: 'Power',
 *   email: 'will.power@nomail.com',
 *   phone: '',
 *   sequence: 2,
 *   delegator: false,
 *   message: '',
 * };
 *
 * const request: ICreateEnvelopeRequest = {template_id: 'd2338742-f3a1-465b-8592-806587413cc1', name: 'Bill of Sale', roles: [role1, role2]};
 * const {id, recipients} = await Envelopes.createEnvelope(VerdocsEndpoint.getDefault(), request);
 * ```
 *
 * @group Envelopes
 * @api POST /v2/envelopes Create Envelope From Template
 * @apiBody string(format:uuid) template_id The ID of the template to copy
 * @apiBody array(items:ICreateEnvelopeRecipient) recipients A list of recipients to include in the workflow. Must specify one recipient to match each template Role.
 * @apiBody string name? Override the name of the envelope (defaults to the template name).
 * @apiBody string description? Override the description of the envelope (defaults to the template description).
 * @apiBody array(items:IEnvelopeField) fields? Provide default values for fields in the envelope. Note that only "name", "role_name", and "default" should be set in this array.
 * @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
 * @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
 * @apiBody integer(min: 0) followup_reminders? Override the template initial-reminder setting.
 * @apiSuccess IEnvelope . The newly-created envelope.
 */
declare const createEnvelope: (endpoint: VerdocsEndpoint, request: TCreateEnvelopeRequest) => Promise<IEnvelope>;
/**
 * Get all metadata for an envelope. Note that when called by non-creators (e.g. Recipients)
 * this will return only the **metadata** the caller is allowed to view.
 *
 * @group Envelopes
 * @api GET /v2/envelopes/:id Get envelope details
 * @apiParam string(format: 'uuid') id The ID of the envelope to retrieve.
 * @apiSuccess IEnvelope . The detailed metadata for the envelope requested
 */
declare const getEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<IEnvelope>;
/**
 * Get all metadata for an envelope document. Note that when called by non-creators (e.g. Recipients)
 * this will return only the **metadata** the caller is allowed to view.
 *
 * @group Envelope Documents
 * @api GET /envelopes/:id Get envelope document
 * @apiParam string(format: 'uuid') id The ID of the document to retrieve.
 * @apiSuccess IEnvelopeDocument . The detailed metadata for the document requested
 */
declare const getEnvelopeDocument: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
/**
 * Get a pre-signed download link for an Envelope Document. This link expires quickly, so it should
 * be accessed immediately and never shared. Content-Disposition will be set to "download".
 *
 * @group Envelope Documents
 * @api GET /envelopes/:envelope_id/envelope_documents/:document_id Preview, Download, or Link to a Document
 * @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
 * @apiParam string(format: 'uuid') document_id The ID of the document to retrieve.
 * @apiQuery boolean download? Set to true to generate a download link (content-disposition: download).
 * @apiQuery boolean preview? Set to true to generate a preview link (content-disposition: inline).
 * @apiQuery boolean file? Set to true to return the raw binary BLOB data of the file rather than a link.
 * @apiSuccess string . The generated link.
 */
declare const getDocumentDownloadLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
/**
 * Get a pre-signed preview link for an Envelope Document. This link expires quickly, so it should
 * be accessed immediately and never shared. Content-Disposition will be set to "inline".
 */
declare const getDocumentPreviewLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
/**
 * Cancel an Envelope.
 *
 * @group Envelopes
 * @api PUT /v2/envelopes/:id Cancel envelope
 * @apiParam string(format: 'uuid') id The ID of the envelope to cancel.
 * @apiBody string(enum: 'cancel') action The action to perform (currently only "cancel" is supported).
 * @apiSuccess IEnvelope . The updated envelope.
 */
declare const cancelEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<TEnvelopeUpdateResult>;
/**
 * Get (binary download) a file attached to an Envelope. It is important to use this method
 * rather than a direct A HREF or similar link to set the authorization headers for the
 * request.
 */
declare const getEnvelopeFile: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<any>;
/**
 * Update an envelope. Currently, only reminder settings may be changed.
 *
 * @group Envelopes
 * @api PATCH /v2/envelopes/:id Update Envelope
 * @apiParam string(format: 'uuid') id The ID of the envelope to update.
 * @apiBody IEnvelope . Set of fields to update. Omit (leave undefined) any fields that should not be changed.
 * @apiSuccess IEnvelope . A copy of the newly-updated envelope.
 */
declare const updateEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string, params: Pick<IEnvelope, "initial_reminder" | "followup_reminders">) => Promise<IEnvelope>;
/**
 * Update a Document field. Typically called during the signing process as a Recipient fills in fields.
 *
 * @group Envelopes
 * @api PUT /envelopes/:envelope_id/fields/:field_name Update Envelope Field
 * @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
 * @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
 * @apiBody IEnvelopeFieldSettings . Set of properties to update. Leave undefined any properties that should not be changed.
 * @apiSuccess IEnvelope . A copy of the newly-updated field.
 */
declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, value: any) => Promise<IEnvelopeFieldSettings>;
/**
 * Apply a signature to a signature field. Signature fields are ID-driven. Call `createSignature()`
 * first to create a signature for a Recipient, then call `updateEnvelopeFieldSignature()` to
 * attach it to a field.
 *
 * @group Envelopes
 * @api PUT /envelopes/:envelope_id/fields/:field_name/signature/:signature_id Update Envelope
 * @apiParam string(format: 'uuid') envelope_id The ID of the envelope to update.
 * @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
 * @apiParam string(format: 'uuid') signature_id The ID of the signature to attach.
 * @apiSuccess IEnvelopeFieldSettings . A copy of the newly-updated field.
 */
declare const updateEnvelopeFieldSignature: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, signatureId: string) => Promise<IEnvelopeFieldSettings>;
/**
 * Apply an initial to an initials field. Initial fields are ID-driven. Call `createInitial()`
 * first to create an initial block for a Recipient, then call `supdateEnvelopeFieldInitials()` to
 * attach it to a field.
 *
 * @group Envelopes
 * @api PUT /envelopes/:envelope_id/fields/:field_name/initial/:initial_id Update Envelope
 * @apiParam string(format: 'uuid') envelope_id The ID of the envelope to update.
 * @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
 * @apiParam string(format: 'uuid') initial_id The ID of the initial block to attach.
 * @apiSuccess IEnvelopeFieldSettings . A copy of the newly-updated field.
 */
declare const updateEnvelopeFieldInitials: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, initialId: string) => Promise<IEnvelopeFieldSettings>;
/**
 * Upload an attachment to an attachment field
 *
 * @group Envelopes
 * @api PUT /envelopes/:envelope_id/fields/:field_name Upload or Delete Attachment
 * @apiParam string(format: 'uuid') envelope_id The ID of the envelope to update.
 * @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
 * @apiBody string document The file to attach. Must contain standard File object fields. If omitted, the attachment will be deleted instead.
 * @apiSuccess IEnvelopeFieldSettings . A copy of the newly-updated field.
 */
declare const uploadEnvelopeFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IEnvelopeFieldSettings>;
/**
 * Delete an attachment. Note that this is not a DELETE endpoint because the field itself is not
 * being deleted. Instead, it is a similar operation to uploading a new attachment, but the
 * omission of the attachment signals the server to delete the current entry.
 */
declare const deleteEnvelopeFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<IEnvelopeFieldSettings>;
/**
 * Get the attached file for an attachment field (if any).
 *
 * @group Envelopes
 * @api GET /envelopes/:envelope_id/fields/:field_name/document Download attachment in binary format
 * @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
 * @apiParam string field_name The name of the field from which to download the attachment.
 * @apiSuccess string . The file binary data.
 */
declare const getFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<any>;
/**
 * Get a display URI for a given page in a file attached to an envelope document. These pages are rendered server-side
 * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
 * for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
 *
 * @group Envelopes
 * @api GET /v2/envelope-documnets/page-image/:document_id/:variant/:page Get envelope document page display URI
 * @apiParam string(format: 'uuid') document_id The ID of the document to retrieve.
 * @apiParam string(enum: 'original'|'filled') variant The variant of the document to retrieve.
 * @apiParam integer page The page number to retrieve
 * @apiSuccess string . The page display URI. Note that this is a signed URL with a short expiration. It should be used immediately and never databased or cached.
 */
declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, documentId: string, page: number, variant?: "original" | "filled" | "certificate") => Promise<string>;
interface ITimeRange {
    start: string;
    end: string;
}
interface IListEnvelopesParams {
    q?: string;
    view?: "inbox" | "sent" | "action" | "waiting" | "completed";
    status?: ("complete" | "pending" | "in progress" | "declined" | "canceled")[];
    include_org?: boolean;
    template_id?: string;
    created_before?: string;
    created_after?: string;
    sort_by?: "name" | "created_at" | "updated_at" | "canceled_at" | "status";
    ascending?: boolean;
    rows?: number;
    page?: number;
}
/**
 * Lists all envelopes accessible by the caller, with optional filters.
 *
 * ```typescript
 * import {getEnvelopes} from '@verdocs/js-sdk/Envelopes';
 *
 * const {count, envelopes} = await getEnvelopes((VerdocsEndpoint.getDefault(), { q: 'test' });
 * ```
 *
 * @group Envelopes
 * @api GET /v2/envelopes List envelopes
 * @apiQuery string q? Match envelopes whose name contains this string
 * @apiQuery string(enum: 'inbox' | 'sent' | 'action' | 'waiting' | 'completed') view? Request pre-defined view. `inbox` returns envelopes where action is required by the caller. `sent` returns envelopes created by the caller. `action` returns envelopes where action is required by the caller. `waiting` returns envelopes where action is required by anyone. `completed` returns envelopes where all actions are complete.
 * @apiQuery array(items: 'complete' | 'pending' | 'in progress' | 'declined' | 'canceled') status? Match envelopes in one of the specified states.
 * @apiQuery boolean(default: false) include_org? If true, include organizations-shared envelopes
 * @apiQuery string(format: uuid) template_id? Match envelopes created from the specified template ID
 * @apiQuery string(format: date-time) created_before? Match envelopes created before this date
 * @apiQuery string(format: date-time) created_after? Match envelopes created after this date
 * @apiQuery string(enum: 'name' | 'created_at' | 'updated_at' | 'canceled_at' | 'status') sort_by? Return results sorted by this criteria
 * @apiQuery boolean ascending? Set true/false to override the sort direction. Note that the default depends on `sort_by`. Date-based sorts default to descending, while name and status default to ascending.
 * @apiQuery integer(default: 20) rows? Limit the number of rows returned
 * @apiQuery integer(default: 0) page? Specify which page of results to return
 * @apiSuccess integer(format: int32) count The total number of records matching the query, helpful for pagination
 * @apiSuccess integer(format: int32) rows The number of rows returned in this response page
 * @apiSuccess integer(format: int32) page The page number of this response
 * @apiSuccess array(items: IEnvelope) envelopes List of envelopes found
 */
declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesParams) => Promise<{
    count: number;
    rows: number;
    page: number;
    envelopes: IEnvelope[];
}>;
/**
 * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
 * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
 * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field
 * to be "stamped" by the user.
 *
 * @group Signatures and Initials
 * @api POST /initials Create Initial Block
 * @apiBody string initial Blob containing initials image to store.
 * @apiSuccess IInitial . The newly-created initial block.
 */
declare const createInitials: (endpoint: VerdocsEndpoint, name: string, initials: Blob) => Promise<IInitial>;
/**
 * KBA is not required at this time.
 */
interface IRecipientKbaStepNone {
    envelope_id: string;
    role_name: string;
    kba_step: "none";
}
/**
 * KBA has been completed and no further action is required.
 */
interface IRecipientKbaStepComplete {
    envelope_id: string;
    role_name: string;
    kba_step: "complete";
}
/**
 * A PIN code is required. Prompt the user to enter this PIN, and submit it via `submitKbaPin()`.
 */
interface IRecipientKbaStepPin {
    envelope_id: string;
    role_name: string;
    kba_step: "pin";
}
/**
 * A full identity verification is required. Prompt the user for their address and other (optional)
 * details and submit them via `submitKbaIdentity()`.
 */
interface IRecipientKbaStepIdentity {
    envelope_id: string;
    role_name: string;
    kba_step: "identity";
}
/**
 * If a positive identification was not possible, the user may be asked to answer 1 or more
 * challenge questions via this response. They should be submitted via `submitKbaChallengeResponse()`.
 */
interface IRecipientKbaStepChallenge {
    envelope_id: string;
    role_name: string;
    kba_step: "challenge";
    questions: {
        type: string;
        message: string;
        options: (string | number)[];
    }[];
}
/**
 * Identity verification has failed. The user should be shown the message included. No further
 * signing operations may be performed.
 */
interface IRecipientKbaStepFailed {
    envelope_id: string;
    role_name: string;
    kba_step: "failed";
    message: string;
}
type TRecipientKbaStep = IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed;
/**
 * Get the current KBA status. Note that this may only be called by the recipient and requires a
 * valid signing session to proceed. Although the Recipient object itself contains indications of
 * whether KBA is required, it will not contain the current status of the process. If
 * `recipient.auth_methods` is set (not empty), and `recipient.kba_completed` is false, this endpoint
 * should be called to determine the next KBA step required.
 */
declare const getKbaStep: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
/**
 * Submit a response to a KBA PIN challenge.
 */
declare const submitKbaPin: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, pin: string) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
interface IKbaIdentity {
    firstName: string;
    lastName: string;
    address: string;
    city?: string;
    state?: string;
    zip?: string;
    ssnLast4?: string;
    email?: string;
}
/**
 * Submit an identity response to a KBA challenge.
 */
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
interface IKbaChallengeResponse {
    type: string;
    answer: string | number;
}
/**
 * Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
 * the challenges were listed in `IRecipientKbaStepChallenge.questions`.
 */
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, responses: IKbaChallengeResponse[]) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
/**
 * Update a recipient's status.
 *
 * @group Recipients
 * @api PUT /envelopes/:envelope_id/recipients/:role_name Update Recipient Status
 * @apiParam string(format:uuid) envelope_id The envelope to operate on.
 * @apiParam string role_name The role to adjust.
 * @apiBody string(enum:'submit'|'decline'|'owner_update'|'update'|'prepare') action The action to take. Adjusts the status, and may also perform other operations.
 * @apiBody string first_name? Ignored unless action is 'owner_update' or 'update'. The new owner's or recipient's first name.
 * @apiBody string last_name? Ignored unless action is 'owner_update' or 'update'. The new owner's or recipient's last name.
 * @apiBody string email? Ignored unless action is 'owner_update'. The new owner's email address.
 * @apiBody boolean agreed? Ignored unless action is 'update'. Set to true to accept the e-signing disclosures.
 * @apiBody array(items:IRecipient) recipients? Ignored unless action is 'prepare'. A list of recipients and their fields to set defaults for.
 * @apiSuccess IRecipient . The updated Recipient.
 */
declare const updateRecipient: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, params: IUpdateRecipientSubmitParams | IUpdateRecipientClaimEnvelope | IUpdateRecipientAgreedParams | IUpdateRecipientNameParams | IUpdateRecipientDeclineParams | IUpdateRecipientPrepareParams) => Promise<IRecipient>;
/**
 * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.
 */
declare const envelopeRecipientSubmit: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IRecipient>;
/**
 * Decline to complete an envelope (signing will not terminated).
 */
declare const envelopeRecipientDecline: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IRecipient>;
/**
 * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.
 */
declare const envelopeRecipientChangeOwner: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, email: string, first_name: string, last_name: string) => Promise<IRecipient>;
/**
 * Agree to electronic signing.
 */
declare const envelopeRecipientAgree: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, agreed: boolean) => Promise<IRecipient>;
/**
 * Change a recipient's name.
 */
declare const envelopeRecipientUpdateName: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, first_name: string, last_name: string) => Promise<IRecipient>;
/**
 * Change a recipient's name.
 */
declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, recipients: IRecipient[]) => Promise<IRecipient>;
/**
 * Begin a signing session for an Envelope. This path requires an invite code, and should generally
 * be called with a NON-default Endpoint to avoid conflicting with any active user session the user
 * may have. To initiate in-person signing by an authenticated user (e.g. self-signing), call
 * getInPersonLink() instead. The response from that call includes both a link for direct signing
 * via a Web browser as well as an in-person access_key. That access_key.key may be used here as well.
 *
 * @group Recipients
 * @api POST /v2/sign/unauth/:envelope_id/:role_name/:key Start Signing Session
 * @apiParam string(format:uuid) envelope_id The envelope to operate on.
 * @apiParam string role_name The role to request.
 * @apiParam string key Access key generated by the envelope creator or email/SMS invite.
 * @apiSuccess ISignerTokenResponse . Signing session token and envelope/recipient metadata.
 */
declare const startSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
/**
 * Get an in-person signing link. Must be called by the owner/creator of the envelope. The response
 * also includes the raw access key that may be used to directly initiate a signing session (see
 * `startSigningSession`) as well as an access token representing a valid signing session for
 * immediate use in embeds or other applications. Note that in-person signing is considered a
 * lower-security operation than authenticated signing, and the final envelope certificate will
 * reflect this.
 *
 * @group Recipients
 * @api POST /v2/sign/in-person/:envelope_id/:role_name Get In-Person Signing Link
 * @apiParam string(format:uuid) envelope_id The envelope to operate on.
 * @apiParam string role_name The role to request.
 * @apiSuccess IInPersonLinkResponse . Signing session token and envelope/recipient metadata.
 */
declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IInPersonLinkResponse>;
/**
 * Verify a recipient within a signing session. All signing sessions use an invite code at a minimum,
 * but many scenarios require more robust verification of recipients, so one or more verification
 * methods may be attached to each recipient. If an authentication method is enabled, the
 * signer must first accept the e-signature disclosures, then complete each verification step
 * before attempting to view/display documents, complete any fields, or submit the envelope.
 * This endpoint should be called to complete each step. If the call fails an error will be
 * thrown.
 *
 * @group Recipients
 * @api POST /v2/sign/verify Verify recipient/signer
 * @apiParam string(enum:'passcode'|'email'|'sms'|'kba'|'id') auth_method The authentication method being completed
 * @apiParam string code? The passcode or OTP entered. Required for passcode, email, and SMS methods.
 * @apiParam boolean resend? For SMS or email methods, set to send a new code.
 * @apiParam boolean first_name? For KBA, the recipient's first name
 * @apiParam boolean last_name? For KBA, the recipient's last name
 * @apiParam boolean address? For KBA, the recipient's address
 * @apiParam boolean city? For KBA, the recipient's city
 * @apiParam boolean state? For KBA, the recipient's state
 * @apiParam boolean zip? For KBA, the recipient's zip code
 * @apiParam boolean ssn_last_4? For KBA, the last 4 digits of the recipient's SSN
 * @apiParam boolean dob? For KBA, the recipient's date of birth
 * @apiParam array(items:IKBAResponse) responses? For KBA, responses to any challenge questions presented
 * @apiSuccess ISignerTokenResponse . Updated signing session.
 */
declare const verifySigner: (endpoint: VerdocsEndpoint, params: TAuthenticateRecipientRequest) => Promise<ISignerTokenResponse>;
/**
 * Send a delegation request.
 */
declare const sendDelegate: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IEnvelope>;
/**
 * Resend a recipient's invitation. NOTE: User interfaces should rate-limit this operation to
 * avoid spamming recipients. Excessive use of this endpoint may result in Verdocs rate-limiting
 * the calling application to prevent abuse. This endpoint will return a 200 OK even if the
 * no_contact flag is set on the envelope (in which case the call will be ignored).
 *
 * @group Recipients
 * @api PUT /v2/envelopes/:envelope_id/recipients/:role_name Resend Invitation
 * @apiParam string(format:uuid) envelope_id The envelope to operate on.
 * @apiParam string role_name The role to operate on.
 * @apiBody string(enum:'resend') action The operation to perform.
 * @apiSuccess string . Success message.
 */
declare const resendInvitation: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<any>;
/**
 * Check to see if the user owns the envelope.
 */
declare const userIsEnvelopeOwner: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
/**
 * Check to see if the user owns the envelope.
 */
declare const userIsEnvelopeRecipient: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
/**
 * Check to see if the envelope has pending actions.
 */
declare const envelopeIsActive: (envelope: IEnvelope) => boolean;
/**
 * Check to see if the envelope has been completed.
 */
declare const envelopeIsComplete: (envelope: IEnvelope) => boolean;
/**
 * Check to see if the user owns the envelope.
 */
declare const userCanCancelEnvelope: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
/**
 * Check to see if the user owns the envelope.
 */
declare const userCanFinishEnvelope: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean;
/**
 * Returns true if the recipient has a pending action. Note that this does not necessarily mean the recipient can act (yet).
 */
declare const recipientHasAction: (recipient: IRecipient) => boolean;
/**
 * Returns the recipients who still have a pending action. Note that not all of these recipients may be able to act (yet).
 */
declare const getRecipientsWithActions: (envelope: IEnvelope) => IRecipient[];
/**
 * Returns true if the recipient can act.
 */
declare const recipientCanAct: (recipient: IRecipient, recipientsWithActions: IRecipient[]) => boolean;
/**
 * Returns true if the user can act.
 */
declare const userCanAct: (email: string, recipientsWithActions: IRecipient[]) => boolean | undefined;
/**
 * Returns true if the user can act.
 */
declare const userCanSignNow: (profile: IProfile | null | undefined, envelope: IEnvelope) => boolean | undefined;
declare const getNextRecipient: (envelope: IEnvelope) => IRecipient;
/**
 * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to "adopt"
 * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
 * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
 * to be "stamped" by the user.
 *
 * @group Signatures and Initials
 * @api POST /signatures Create Signature Block
 *
 * @apiBody string signature Blob containing signature image to store.
 * @apiSuccess ISignature . The newly-created signature block.
 */
declare const createSignature: (endpoint: VerdocsEndpoint, name: string, signature: Blob) => Promise<ISignature>;
/**
 * Get the available signatures for a user.
 *
 * @group Signatures and Initials
 * @api GET /signatures Create Signature Block
 *
 * @apiSuccess array(items:ISignature) . A list of signatures previously stored for the user.
 */
declare const getSignatures: (endpoint: VerdocsEndpoint) => Promise<ISignature[]>;
/**
 * Get a user's signature by ID.
 *
 * @group Signatures and Initials
 * @api GET /signatures/:id Delete Signature Block
 * @apiParam string(format: 'uuid') id The ID of the signature to delete.
 * @apiSuccess ISignature . The signature metadata requested.
 */
declare const getSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
/**
 * Delete a user's signature.
 *
 * @group Signatures and Initials
 * @api DELETE /signatures/:id Delete Signature Block
 * @apiParam string(format: 'uuid') id The ID of the signature to delete.
 * @apiSuccess string . OK
 */
declare const deleteSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
interface ICreateApiKeyRequest {
    name: string;
    profile_id: string;
    permission: TApiKeyPermission;
}
interface IUpdateApiKeyRequest {
    name?: string;
    permission?: TApiKeyPermission;
}
interface ICreateInvitationRequest {
    email: string;
    first_name: string;
    last_name: string;
    role: TRole;
}
interface IAcceptOrganizationInvitationRequest {
    email: string;
    token: string;
    first_name: string;
    last_name: string;
    password: string;
}
interface ISetWebhookRequest {
    url: string;
    active: boolean;
    events: Record<TWebhookEvent, boolean>;
}
/**
 * Get a list of keys for a given organization. The caller must have admin access to the organization.
 *
 * ```typescript
 * import {getApiKeys} from '@verdocs/js-sdk';
 *
 * const keys = await getApiKeys(ORGID);
 * ```
 *
 * @group API Keys
 * @api GET /v2/api-keys Get API keys
 * @apiSuccess array(items: IApiKey) . A list of the API keys for the caller's organization. Secrets will not be included.
 */
declare const getApiKeys: (endpoint: VerdocsEndpoint) => Promise<IApiKey[]>;
/**
 * Create an API key.
 *
 * ```typescript
 * import {createApiKey} from '@verdocs/js-sdk';
 *
 * await createApiKey(ORGID, {name: NEWNAME});
 * ```
 *
 * @group API Keys
 * @api POST /v2/api-keys Create API key
 * @apiBody string name A name used to identify the key in the Verdocs Web App
 * @apiBody string(format:uuid) profile_id The profile ID that calls made using the key will act as
 * @apiBody array(items:string) permission An array of permissions to assign to the new key. Extends (but does not override) the API key's profile permissions.
 * @apiSuccess IApiKey . The newly-created API key, including its secret.
 */
declare const createApiKey: (endpoint: VerdocsEndpoint, params: ICreateApiKeyRequest) => Promise<IApiKey>;
/**
 * Rotate the secret for an API key. The caller must have admin access to the organization.
 *
 * ```typescript
 * import {rotateApiKey} from '@verdocs/js-sdk';
 *
 * const {client_secret: newSecret} = await rotateApiKey(ORGID, CLIENTID);
 * ```
 *
 * @group API Keys
 * @api POST /v2/api-keys/:client_id/rotate Rotate API key
 * @apiParam string(format:uuid) client_id The client ID of the key to rotate
 * @apiSuccess IApiKey . The updated API key with its new secret.
 */
declare const rotateApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<IApiKey>;
/**
 * Update an API key to change its assigned Profile ID or Name.
 *
 * ```typescript
 * import {updateApiKey} from '@verdocs/js-sdk';
 *
 * await updateApiKey(ORGID, CLIENTID, {name: NEWNAME});
 * ```
 *
 * @group API Keys
 * @api PATCH /v2/api-keys/:client_id Update API key
 * @apiBody string name? New name for the API key
 * @apiBody array(items:string) permission New array of permissions to assign to the new key. Extends (but does not override) the API key's profile permissions.
 * @apiSuccess IApiKey . The updated API key. The secret will not be included.
 */
declare const updateApiKey: (endpoint: VerdocsEndpoint, clientId: string, params: IUpdateApiKeyRequest) => Promise<IApiKey>;
/**
 * Delete an API key.
 *
 * ```typescript
 * import {deleteApiKey} from '@verdocs/js-sdk';
 *
 * await deleteApiKey(ORGID, CLIENTID);
 * ```
 *
 * @group API Keys
 * @api DELETE /v2/api-keys/:client_id Delete API key
 * @apiSuccess string . Success.
 */
declare const deleteApiKey: (endpoint: VerdocsEndpoint, clientId: string) => Promise<any>;
/**
 * An Organization Contact (aka Profile) is an individual user with no access to an organization. These entries
 * appear only in contact lists, usually to populate quick-search dropdowns when sending envelopes.
 *
 * @module
 */
/**
 * Get a list of the contacts in the caller's organization.
 *
 * ```typescript
 * import {getOrganizationContacts} from '@verdocs/js-sdk';
 *
 * const members = await getOrganizationContacts(VerdocsEndpoint.getDefault()});
 * ```
 *
 * @group Organization Contacts
 * @api GET /v2/organization-contacts Get a list of organization contacts
 * @apiBody string email Email address for the invitee
 * @apiBody string token Invite token for the invitee
 * @apiSuccess string . Success. The invitation will be marked declined and the token will be invalidated.
 */
declare const getOrganizationContacts: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
/**
 * Delete a contact from the caller's organization. Note that the caller must be an admin or owner.
 *
 * ```typescript
 * import {deleteOrganizationContact} from '@verdocs/js-sdk';
 *
 * await deleteOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID'});
 * ```
 *
 * @group Organization Contacts
 * @api POST /v2/organization-invitations/decline GET a list of pending invitations
 * @apiBody string email Email address for the invitee
 * @apiBody string token Invite token for the invitee
 * @apiSuccess string . Success. The invitation will be marked declined and the token will be invalidated.
 */
declare const deleteOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
/**
 * Update a member.
 *
 * ```typescript
 * import {createOrganizationContact} from '@verdocs/js-sdk';
 *
 * const result = await createOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'First', last_name:'Last', email:'a@b.com'});
 * ```
 */
declare const createOrganizationContact: (endpoint: VerdocsEndpoint, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
/**
 * Update a member.
 *
 * ```typescript
 * import {updateOrganizationContact} from '@verdocs/js-sdk';
 *
 * const result = await updateOrganizationContact(VerdocsEndpoint.getDefault(), 'PROFILEID', {first_name:'NewFirst'});
 * ```
 */
declare const updateOrganizationContact: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "first_name" | "last_name" | "email" | "phone">) => Promise<any>;
/**
 * Get a list of groups for the caller's organization. NOTE: Any organization member may request
 * the list of groups, but only Owners and Admins may update them.
 *
 * ```typescript
 * import {getGroups} from '@verdocs/js-sdk';
 *
 * const groups = await getGroups();
 * ```
 */
declare const getGroups: (endpoint: VerdocsEndpoint) => Promise<IGroup[]>;
/**
 * Get the details for a group, including its member profiles and list of permissions.
 *
 * ```typescript
 * import {getGroup} from '@verdocs/js-sdk/v2/organization-groups';
 *
 * const group = await getGroup(GROUPID);
 * ```
 */
declare const getGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<IGroup>;
/**
 * Create a group. Note that "everyone" is a reserved name and may not be created.
 *
 * ```typescript
 * import {createGroup} from '@verdocs/js-sdk';
 *
 * const group = await createGroup(VerdocsEndpoint.getDefault(), {name:'newgroup'});
 * ```
 */
declare const createGroup: (endpoint: VerdocsEndpoint, params: {
    name: string;
    permissions: TPermission[];
}) => Promise<any>;
/**
 * Update a group. Note that "everyone" is a reserved name and may not be changed.
 *
 * ```typescript
 * import {updateGroup} from '@verdocs/js-sdk';
 *
 * const updated = await updateGroup(VerdocsEndpoint.getDefault(), {name:'newname'});
 * ```
 */
declare const updateGroup: (endpoint: VerdocsEndpoint, groupId: string, params: {
    name: string;
    permissions: TPermission[];
}) => Promise<any>;
/**
 * Get an organization by ID. Note that the "everyone" group cannot be deleted.
 *
 * ```typescript
 * import {deleteGroup} from '@verdocs/js-sdk';
 *
 * await deleteGroup(VerdocsEndpoint.getDefault(), 'ORGID');
 * ```
 */
declare const deleteGroup: (endpoint: VerdocsEndpoint, groupId: string) => Promise<any>;
/**
 * Add a member to a group.
 *
 * ```typescript
 * import {addGroupMember} from '@verdocs/js-sdk';
 *
 * await addGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
 * ```
 */
declare const addGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
/**
 * Remove a member from a group.
 *
 * ```typescript
 * import {deleteGroupMember} from '@verdocs/js-sdk';
 *
 * await deleteGroupMember(VerdocsEndpoint.getDefault(), 'GROUPID', 'PROFILEID');
 * ```
 */
declare const deleteGroupMember: (endpoint: VerdocsEndpoint, groupId: string, profile_id: string) => Promise<any>;
interface ICreateProfileRequest {
    email: string;
    password: string;
    first_name: string;
    last_name: string;
    org_name: string;
}
interface IUpdateProfileRequest {
    first_name?: string;
    last_name?: string;
    // email?: string;
    phone?: string;
    permissions?: TPermission[];
    roles?: TRole[];
}
interface IAuthenticateResponse {
    access_token: string;
    id_token: string;
    refresh_token: string;
    expires_in: number;
    access_token_exp: number;
    refresh_token_exp: number;
    intercom_key: string;
}
interface IChangePasswordRequest {
    old_password: string;
    new_password: string;
}
interface IChangePasswordResponse {
    status: TRequestStatus;
    message: string;
}
interface IResetPasswordRequest {
    email: string;
}
interface IResetPasswordResponse {
    status: "OK";
}
interface IVerifyEmailRequest {
    email: string;
    token: string;
}
interface IROPCRequest {
    grant_type: "password";
    username: string;
    password: string;
    client_id?: string;
    scope?: string;
}
interface IClientCredentialsRequest {
    grant_type: "client_credentials";
    client_id: string;
    client_secret: string;
    scope?: string;
}
interface IRefreshTokenRequest {
    grant_type: "refresh_token";
    refresh_token: string;
    client_id?: string;
    scope?: string;
}
type TAuthenticationRequest = IROPCRequest | IClientCredentialsRequest | IRefreshTokenRequest;
/**
 * Authenticate to Verdocs.
 *
 * ```typescript
 * import {authenticate, VerdocsEndpoint} from '@verdocs/js-sdk';
 *
 * // Client-side call, suitable for Web and mobile apps:
 * const {access_token} = await Auth.authenticate({ username: 'test@test.com', password: 'PASSWORD', grant_type:'password' });
 * VerdocsEndpoint.getDefault().setAuthToken(access_token);
 *
 * // Server-side call, suitable for server apps. NEVER EXPOSE client_secret IN FRONT-END CODE:
 * const {access_token} = await Auth.authenticate({ client_id: '...', client_secret: '...', grant_type:'client_credentials' });
 * VerdocsEndpoint.getDefault().setAuthToken(access_token);
 * ```
 *
 * @group Authentication
 * @api POST /v2/oauth2/token Authenticate
 * @apiBody string(enum: 'client_credentials'|'refresh_token'|'password') grant_type The type of grant to request. API callers should nearly always use 'client_credentials'.
 * @apiBody string(format: 'uuid') client_id? If grant_type is client_credentials or refresh_token, the client ID of the API key to use.
 * @apiBody string(format: 'uuid') client_secret? If grant_type is client_credentials, the secret key of the API key to use.
 * @apiBody string username? If grant_type is password, the username to authenticate with.
 * @apiBody string password? If grant_type is password, the password to authenticate with.
 * @apiBody string password? If grant_type is password, the password to authenticate with.
 * @apiBody string scope? Optional scope to limit the auth token to. Do not specify this unless you are instructed to by a Verdocs Support rep.
 * @apiSuccess IAuthenticateResponse . The detailed metadata for the envelope requested
 */
declare const authenticate: (endpoint: VerdocsEndpoint, params: TAuthenticationRequest) => Promise<IAuthenticateResponse>;
/**
 * If called before the session expires, this will refresh the caller's session and tokens.
 *
 * ```typescript
 * import {Auth, VerdocsEndpoint} from '@verdocs/js-sdk';
 *
 * const {accessToken} = await Auth.refreshTokens();
 * VerdocsEndpoint.setAuthToken(accessToken);
 * ```
 */
declare const refreshToken: (endpoint: VerdocsEndpoint, refreshToken: string) => Promise<IAuthenticateResponse>;
/**
 * Update the caller's password when the old password is known (typically for logged-in users).
 *
 * ```typescript
 * import {changePassword} from '@verdocs/js-sdk';
 *
 * const {status, message} = await changePassword({ old_password, new_password });
 * if (status !== 'OK') {
 *   window.alert(`Password reset error: ${message}`);
 * }
 * ```
 *
 * @group Authentication
 * @api POST /v2/users/change-password Change the caller's password
 * @apiBody string old_password Current password for the caller
 * @apiBody string new_password New password to set for the caller. Must meet strength requirements.
 * @apiSuccess string . Success
 */
declare const changePassword: (endpoint: VerdocsEndpoint, params: IChangePasswordRequest) => Promise<IChangePasswordResponse>;
/**
 * Request a password reset, when the old password is not known (typically in login forms).
 *
 * ```typescript
 * import {resetPassword} from '@verdocs/js-sdk';
 *
 * const {success} = await resetPassword({ email });
 * if (status !== 'OK') {
 *   window.alert(`Please check your email for instructions on how to reset your password.`);
 * }
 *
 * // Collect code and new password from the user, then call:
 *
 * const {success} = await resetPassword({ email, code, new_password });
 * if (status !== 'OK') {
 *   window.alert(`Please check your verification code and try again.`);
 * }
 * ```
 *
 * @group Authentication
 * @api POST /v2/users/reset-password Reset a password for a user
 * @apiBody string email Email address for the user account
 * @apiBody string code? To initiate a reset request, omit this field. To complete it, provide the emailed code received by the user.
 * @apiBody string new_password? To initiate a reset request, omit this field. To complete it, provide the new password the user wishes to use.
 * @apiSuccess string . Success
 */
declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
    email: string;
    code?: string;
    new_password?: string;
}) => Promise<{
    success: boolean;
}>;
/**
 * Resend the email verification request if the email or token are unknown. Instead, an accessToken
 * may be supplied through which the user will be identified. This is intended to be used in post-signup
 * cases where the user is "partially" authenticated (has a session, but is not yet verified).
 *
 * ```typescript
 * import {resendVerification} from '@verdocs/js-sdk';
 *
 * const result = await resendVerification();
 * ```
 *
 * @group Authentication
 * @api POST /v2/users/verify Resend an email verification request for a "partially" authenticated user (authenticated, but not yet verified)
 * @apiSuccess string . Success
 */
declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
    result: "done";
}>;
/**
 * Resend the email verification request if the user is unauthenticated, but the email and token are known.
 * Used if the token is valid but has expired.
 *
 * ```typescript
 * import {resendVerification} from '@verdocs/js-sdk';
 *
 * const result = await resendVerification();
 * ```
 *
 * @group Authentication
 * @api POST /v2/users/verify Resend the email verification request if both the email and token are known. Used if the token is valid but has expired.
 * @apiSuccess IAuthenticateResponse . Updated authentication details
 */
declare const verifyEmail: (endpoint: VerdocsEndpoint, params: IVerifyEmailRequest) => Promise<IAuthenticateResponse>;
/**
 * Get the caller's current user record.
 *
 * @group Authentication
 * @api GET /v2/users/me Get the caller's user record.
 * @apiSuccess IUser . User record
 */
declare const getMyUser: (endpoint: VerdocsEndpoint) => Promise<IUser>;
declare const getNotifications: (endpoint: VerdocsEndpoint) => Promise<any>;
/**
 * Get the caller's available profiles. The current profile will be marked with `current: true`.
 *
 * ```typescript
 * import {getProfiles} from '@verdocs/js-sdk';
 *
 * const profiles = await getProfiles();
 * ```
 *
 * @group Profiles
 * @api GET /v2/profiles Get the caller's profiles
 * @apiDescription A user may have multiple profiles, one for each organization of which they are a member. Only one profile may be "current" at a time.
 * @apiSuccess array(items: IProfile) . The caller's profiles
 */
declare const getProfiles: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
/**
 * Get the caller's current profile. This is just a convenience accessor that calls `getProfiles()`
 * and returns the first `current: true` entry.
 *
 * ```typescript
 * import {getCurrentProfile} from '@verdocs/js-sdk';
 *
 * const profiles = await getCurrentProfile(VerdocsEndpoint.getDefault());
 * ```
 */
declare const getCurrentProfile: (endpoint: VerdocsEndpoint) => Promise<IProfile | undefined>;
/**
 * Switch the caller's "current" profile. The current profile is used for permissions checking
 * and profile_id field settings for most operations in Verdocs. It is important to select the
 * appropropriate profile before calling other API functions.
 *
 * ```typescript
 * import {switchProfile} from '@verdocs/js-sdk';
 *
 * const newProfile = await switchProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
 * ```
 *
 * @group Profiles
 * @api POST /v2/profiles/:profile_id/switch Change the "current" profile for the caller
 * @apiSuccess IAuthenticateResponse . New authentication credentials
 */
declare const switchProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse>;
/**
 * Update a profile. For future expansion, the profile ID to update is required, but currently
 * this must also be the "current" profile for the caller.
 *
 * ```typescript
 * import {updateProfile} from '@verdocs/js-sdk/Users';
 *
 * const newProfile = await updateProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
 * ```
 *
 * @group Profiles
 * @api PATCH /v2/profiles/:profile_id Update a profile
 * @apiBody string first_name? First name
 * @apiBody string last_name? Last name
 * @apiBody string phone? Phone number
 * @apiBody array(items:TPermission) permissions? New permissions to directly apply to the profile
 * @apiBody array(items:TRole) roles? New roles to assign to the profile
 * @apiSuccess IProfile . The updated profile
 */
declare const updateProfile: (endpoint: VerdocsEndpoint, profileId: string, params: IUpdateProfileRequest) => Promise<IProfile>;
/**
 * Delete a profile. If the requested profile is the caller's curent profile, the next
 * available profile will be selected.
 *
 * ```typescript
 * import {deleteProfile} from '@verdocs/js-sdk';
 *
 * await deleteProfile(VerdocsEndpoint.getDefault(), 'PROFILEID');
 * ```
 *
 * @group Profiles
 * @api DELETE /v2/profiles/:profile_id Delete a profile
 * @apiSuccess IAuthenticateResponse . New session tokens for the next available profile for the caller, or null if none.
 */
declare const deleteProfile: (endpoint: VerdocsEndpoint, profileId: string) => Promise<IAuthenticateResponse | {
    status: "OK";
    message: "Your last profile has been deleted. You are now logged out.";
}>;
/**
 * Create a new profile. Note that there are two registration paths for creation:
 *   - Get invited to an organization, by an admin or owner of that org.
 *   - Created a new organization. The caller will become the first owner of the new org.
 *
 * This endpoint is for the second path, so an organization name is required. It is NOT
 * required to be unique because it is very common for businesses to have the same names,
 * without conflicting (e.g. "Delta" could be Delta Faucet or Delta Airlines).
 *
 * The new profile will automatically be set as the user's "current" profile, and new
 * session tokens will be returned to the caller. However, the caller's email may not yet
 * be verified. In that case, the caller will not yet be able to call other endpoints in
 * the Verdocs API. The caller will need to check their email for a verification code,
 * which should be submitted via the `verifyEmail` endpoint.
 *
 * ```typescript
 * import {createProfile} from '@verdocs/js-sdk';
 *
 * const newSession = await createProfile(VerdocsEndpoint.getDefault(), {
 *   orgName: 'NEW ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
 * });
 * ```
 */
declare const createProfile: (endpoint: VerdocsEndpoint, params: ICreateProfileRequest) => Promise<IAuthenticateResponse>;
/**
 * Update the caller's profile photo. This can only be called for the user's "current" profile.
 *
 * ```typescript
 * import {uploadProfilePhoto} from '@verdocs/js-sdk';
 *
 * await uploadProfilePhoto((VerdocsEndpoint.getDefault(), profileId, file);
 * ```
 *
 * @group Profiles
 * @api PATCH /v2/templates/:template_id Change a profile's photo
 * @apiBody string(format:binary) file File to upload
 * @apiSuccess IProfile . The updated profile
 */
declare const updateProfilePhoto: (endpoint: VerdocsEndpoint, profileId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IProfile>;
/**
 * An invitation represents an opportunity for a Member to join an Organization.
 *
 * @module
 */
/**
 * Get a list of invitations pending for the caller's organization. The caller must be an admin or owner.
 *
 * @group Organization Invitations
 * @api GET /v2/organization-invitations Get a list of pending invitations
 * @apiBody array(items:TRole) roles URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
 * @apiBody string first_name First name. The user may override this after accepting the invitation.
 * @apiBody string last_name Last name. The user may override this after accepting the invitation.
 * @apiSuccess array(items:IProfile) . List of caller's current organization's members
 */
declare const getOrganizationInvitations: (endpoint: VerdocsEndpoint) => Promise<IOrganizationInvitation[]>;
/**
 * Invite a new user to join the organization.
 *
 * @group Organization Invitations
 * @api POST /v2/organization-invitations Invite a new user to join the organization
 * @apiBody string email Email address to send the invitation to
 * @apiBody string first_name First name. The user may override this after accepting the invitation.
 * @apiBody string last_name Last name. The user may override this after accepting the invitation.
 * @apiBody TRole role Initial role to assign to the user once they accept.
 * @apiSuccess IOrganizationInvitation . The newly-created invitation.
 */
declare const createOrganizationInvitation: (endpoint: VerdocsEndpoint, params: ICreateInvitationRequest) => Promise<IOrganizationInvitation>;
/**
 * Delete an invitation. Note that no cancellation message will be sent. Invitations are also one-time-use.
 * If the invitee attempts to join after the invitation is deleted, accepted, or decline, they will be
 * shown an error.
 *
 * @group Organization Invitations
 * @api DELETE /v2/organization-invitations/:email Delete a pending invitation
 * @apiSuccess string . Success
 */
declare const deleteOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<any>;
/**
 * Update an invitation. Note that email may not be changed after the invite is sent. To change
 * an invitee's email, delete the incorrect entry and create one with the correct value.
 *
 * @group Organization Invitations
 * @api PATCH /v2/organization-invitations/:email Update a pending invitation
 * @apiBody string first_name First name. The user may override this after accepting the invitation.
 * @apiBody string last_name Last name. The user may override this after accepting the invitation.
 * @apiBody TRole role Initial role to assign to the user once they accept.
 * @apiSuccess IOrganizationInvitation . The updated invitation.
 */
declare const updateOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, params: Pick<ICreateInvitationRequest, "role" | "first_name" | "last_name">) => Promise<IOrganizationInvitation>;
/**
 * Send a reminder to the invitee to join the organization.
 *
 * @group Organization Invitations
 * @api POST /v2/organization-invitations/resend Send a reminder to a pending invitee
 * @apiBody string email The recipient to send the reminder to
 * @apiSuccess IOrganizationInvitation . The updated invitation
 */
declare const resendOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string) => Promise<IOrganizationInvitation>;
/**
 * Get an invitation's details. This is generally used as the first step of accepting the invite.
 * A successful response will indicate that the invite token is still valid, and include some
 * metadata for the organization to style the acceptance screen.
 *
 * @group Organization Invitations
 * @api GET /v2/organization-invitations/:email/:token Get a pending invitation (_Authenticated via invite token, not an active session._). Intended to be called by the invitee to get details about the invitation they are about to accept.
 * @apiSuccess IOrganizationInvitation . Requested invitation's details. Will always include summary details for the organization, to be used for branding the accept-invite view.
 */
declare const getOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<IOrganizationInvitation>;
/**
 * Accept an invitation. This will automatically create a user record for the caller as well as a profile
 * with the appropriate role as specified in the invite. The profile will be set as "current" for the caller,
 * and session tokens will be returned to access the new profile. The profile's email_verified flag will
 * also be set to true.
 *
 * @group Organization Invitations
 * @api POST /v2/organization-invitations/accept Accept an invitation
 * @apiBody string email Email address for the invitee
 * @apiBody string token Invite token for the invitee
 * @apiBody string first_name First name
 * @apiBody string last_name Last name
 * @apiBody string password Password
 * @apiSuccess IAuthenticateResponse . Session credentials for the newly-created user's profile. If the user already had a profile for another organization, the new profile will be made "current" automatically.
 */
declare const acceptOrganizationInvitation: (endpoint: VerdocsEndpoint, params: IAcceptOrganizationInvitationRequest) => Promise<IAuthenticateResponse>;
/**
 * Decline an invitation. This will mark the status "declined," providing a visual indication to the
 * organization's admins that the invite was declined, preventing further invites from being created
 * to the same email address, and also preventing the invitee from receiving reminders to join.
 *
 * @group Organization Invitations
 * @api POST /v2/organization-invitations/decline Decline an invitation
 * @apiDescription Mark the status "declined," providing a visual indication to the organization's admins that the invite was declined, preventing further invites from being created to the same email address, and also preventing the invitee from receiving reminders to join.
 * @apiBody string email Email address for the invitee
 * @apiBody string token Invite token for the invitee
 * @apiSuccess string . Success. The invitation will be marked declined and the token will be invalidated.
 */
declare const declineOrganizationInvitation: (endpoint: VerdocsEndpoint, email: string, token: string) => Promise<{
    status: "OK";
}>;
/**
 * An Organization Member (aka Profile) is an individual user with access to an organization.
 *
 * @module
 */
/**
 * Get a list of the members in the caller's organization.
 *
 * ```typescript
 * import {getOrganizationMembers} from '@verdocs/js-sdk';
 *
 * const members = await getOrganizationMembers(VerdocsEndpoint.getDefault()});
 * ```
 *
 * @group Organization Members
 * @api GET /v2/organization-members List current organization's members
 * @apiSuccess array(items:IProfile) . List of caller's current organization's members
 */
declare const getOrganizationMembers: (endpoint: VerdocsEndpoint) => Promise<IProfile[]>;
/**
 * Delete a member from the caller's organization. Note that the caller must be an admin or owner,
 * may not delete him/herself.
 *
 * ```typescript
 * import {deleteOrganizationMember} from '@verdocs/js-sdk';
 *
 * await deleteOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID'});
 * ```
 *
 * @group Organization Members
 * @api DELETE /v2/organization-members/:profile_id Delete a member from the organization
 * @apiSuccess string . Success
 */
declare const deleteOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string) => Promise<any>;
/**
 * Update a member.
 *
 * ```typescript
 * import {updateOrganizationMember} from '@verdocs/js-sdk';
 *
 * const result = await updateOrganizationMember(VerdocsEndpoint.getDefault(), 'PROFILEID', {roles:['member']});
 * ```
 *
 * @group Organization Members
 * @api PATCH /v2/organization-members/:profile_id Update an organization member.
 * @apiBody array(items:TRole) roles URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
 * @apiBody string first_name Set to true to enable Webhooks calls.
 * @apiBody string last_name Record<TWebhookEvent, boolean> map of events to enable/disable.
 * @apiSuccess array(items:IProfile) . List of caller's current organization's members
 */
declare const updateOrganizationMember: (endpoint: VerdocsEndpoint, profileId: string, params: Pick<IProfile, "roles" | "first_name" | "last_name">) => Promise<any>;
/**
 * Get an organization by ID. Note that this endpoint will return only a subset of fields
 * if the caller is not a member of the organization (the public fields).
 *
 * ```typescript
 * import {getOrganization} from '@verdocs/js-sdk';
 *
 * const organizations = await getOrganization(VerdocsEndpoint.getDefault(), 'ORGID');
 * ```
 *
 * @group Organizations
 * @api GET /v2/organizations/:organization_id Get organization
 * @apiSuccess IOrganization . The requested organization. The caller must be a member.
 */
declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
/**
 * Create an organization. The caller will be assigned an "Owner" profile in the new organization,
 * and it will be set to "current" automatically. A new set of session tokens will be issued to
 * the caller, and the caller should update their endpoint to use the new tokens.
 *
 * ```typescript
 * import {createOrganization} from '@verdocs/js-sdk';
 *
 * const organization = await createOrganization(VerdocsEndpoint.getDefault(), {name: 'NewOrg'});
 * ```
 *
 * @group Organizations
 * @api POST /v2/organizations Create organization
 * @apiDescription The caller will be assigned an "Owner" profile in the new organization, and it will be set to "current" automatically. A new set of session tokens will be issued to  the caller, and the caller should update their endpoint to use the new tokens.
 * @apiBody string name The name of the new organization
 * @apiBody string contact_email? Contact email for the new organization
 * @apiBody string url? URL for the new organization
 * @apiBody string full_logo_url? URL of a large-format PNG logo
 * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
 * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
 * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
 * @apiSuccess IAuthenticateResponse . Authentication credentials for user in the new organization. The user will be made an Owner automatically.
 */
declare const createOrganization: (endpoint: VerdocsEndpoint, params: Pick<IOrganization, "name" | "address" | "address2" | "phone" | "contact_email" | "url" | "full_logo_url" | "thumbnail_url" | "primary_color" | "secondary_color">) => Promise<IAuthenticateResponse & {
    profile: IProfile;
    organization: IOrganization;
}>;
/**
 * Update an organization. This can only be called by an admin or owner.
 *
 * ```typescript
 * import {updateOrganization} from '@verdocs/js-sdk';
 *
 * const organizations = await updateOrganization(VerdocsEndpoint.getDefault(), organizationId, {name:'ORGNAME'});
 * ```
 *
 * @group Organizations
 * @api PATCH /v2/organizations/:organization_id Update organization
 * @apiBody string name The name of the new organization
 * @apiBody string contact_email? Contact email for the new organization
 * @apiBody string url? URL for the new organization
 * @apiBody string full_logo_url? URL of a large-format PNG logo
 * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
 * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
 * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
 * @apiSuccess IOrganization . The details for the updated organization
 */
declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
/**
 * Delete an organization. This can only be called by an owner. Inclusion of the organization ID to delete
 * is just a safety check. The caller may only delete the organization they have currently selected.
 *
 * ```typescript
 * import {deleteOrganization} from '@verdocs/js-sdk';
 *
 * const newSession = await deleteOrganization(VerdocsEndpoint.getDefault(), organizationId);
 * ```
 *
 * @group Organizations
 * @api DELETE /v2/organizations/:organization_id Delete organization
 * @apiSuccess IAuthenticateResponse . If the caller is a member of another organization, authentication credentials for the next organization available. If not, this will be null and the caller will be logged out.
 */
declare const deleteOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IAuthenticateResponse | null>;
/**
 * Update the organization's full or thumbnail logo. This can only be called by an admin or owner.
 *
 * ```typescript
 * import {updateOrganizationLogo} from '@verdocs/js-sdk';
 *
 * await updateOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
 * ```
 *
 * @group Organizations
 * @api PATCH /v2/organizations/:organization_id Update organization full or thumbnail logo.
 * @apiBody image/png logo? Form-url-encoded file to upload
 * @apiBody image/png thumbnail? Form-url-encoded file to upload
 * @apiSuccess IOrganization . The updated organization.
 */
declare const updateOrganizationLogo: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IOrganization>;
/**
 * Update the organization's thumbnail. This can only be called by an admin or owner.
 *
 * ```typescript
 * import {updateOrganizationThumbnail} from '@verdocs/js-sdk';
 *
 * await updateOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
 * ```
 */
declare const updateOrganizationThumbnail: (endpoint: VerdocsEndpoint, organizationId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IOrganization>;
declare const getEntitlements: (endpoint: VerdocsEndpoint) => Promise<IEntitlement[]>;
/**
 * Largely intended to be used internally by Web SDK components but may be informative for other cases.
 * Entitlements are feature grants such as "ID-based KBA" that require paid contracts to enable, typically
 * because the underlying services that support them are fee-based. Entitlements may run concurrently,
 * and may have different start/end dates e.g. "ID-based KBA" may run 1/1/2026-12/31/2026 while
 * "SMS Authentication" may be added later and run 6/1/2026-5/31/2027. The entitlements list is a simple
 * array of enablements and may include entries that are not YET enabled or have now expired.
 *
 * In client code it is helpful to simply know "is XYZ feature currently enabled?" This function collapses
 * the entitlements list to a simplified dictionary of current/active entitlements. Note that it is async
 * because it calls the server to obtain the "most current" entitlements list. Existence of an entry in the
 * resulting dictionary implies the feature is active. Metadata inside each entry can be used to determine
 * limits, etc.
 *
 * ```typescript
 * import {getActiveEntitlements} from '@verdocs/js-sdk';
 *
 * const activeEntitlements = await getActiveEntitlements((VerdocsEndpoint.getDefault());
 * const isSMSEnabled = !!activeEntitlements.sms_auth;
 * const monthlyKBALimit = activeEntitlements.kba_auth?.monthly_max;
 * ```
 */
declare const getActiveEntitlements: (endpoint: VerdocsEndpoint) => Promise<Partial<Record<TEntitlement, IEntitlement>>>;
/**
 * Get the registered Webhook configuration for the caller's organization.
 *
 * ```typescript
 * import {getWebhooks} from '@verdocs/js-sdk';
 *
 * await getWebhooks(ORGID, params);
 * ```
 *
 * @group Webhooks
 * @api GET /v2/webhooks Get organization Webhooks config
 * @apiSuccess IWebhook . The current Webhooks config for the caller's organization.
 */
declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
/**
 * Update the registered Webhook configuration for the caller's organization. Note that
 * Webhooks cannot currently be deleted, but may be easily disabled by setting `active`
 * to `false` and/or setting the `url` to an empty string.
 *
 * ```typescript
 * import {setWebhooks} from '@verdocs/js-sdk';
 *
 * await setWebhooks(ORGID, params);
 * ```
 *
 * @group Webhooks
 * @api PATCH /v2/webhooks Update organization Webhooks config
 * @apiDescription Note that Webhooks cannot currently be deleted, but may be easily disabled by setting `active` to `false` and/or setting the `url` to an empty string.
 * @apiBody string url URL to send Webhook events to. An empty or invalid URL will disable Webhook calls.
 * @apiBody boolean active Set to true to enable Webhooks calls.
 * @apiBody object events Record<TWebhookEvent, boolean> map of events to enable/disable.
 * @apiSuccess IWebhook . The updated Webhooks config for the caller's organization.
 */
declare const setWebhooks: (endpoint: VerdocsEndpoint, params: ISetWebhookRequest) => Promise<IWebhook>;
declare const canPerformTemplateAction: (profile: IProfile | null | undefined, action: TTemplateAction, template?: ITemplate) => {
    canPerform: boolean;
    message: string;
};
declare const hasRequiredPermissions: (profile: IProfile | null | undefined, permissions: TPermission[]) => boolean;
/**
 * Add a field to a template.
 *
 * ```typescript
 * import {createField} from '@verdocs/js-sdk/Templates';
 *
 * await createField((VerdocsEndpoint.getDefault(), template_id, { ... });
 * ```
 *
 * @group Fields
 * @api POST /v2/fields/:template_id Add a field to a template
 * @apiBody string name Name for the new field. Field names must be unique within a template. Although special characters are allowed, they must be URL-encoded in subsequent requests, so it is recommended to use only alphanumeric characters and hyphens if possible.
 * @apiBody string role_name Role to assign to the field. Role names must be valid, so it is recommended to create roles before fields.
 * @apiBody string document_id ID of the document upon which to place the field.
 * @apiBody string(enum: 'signature' | 'initial' | 'checkbox' | 'radio' | 'textbox' | 'timestamp' | 'date' | 'dropdown' | 'textarea' | 'attachment' | 'payment') type Type of field to create
 * @apiBody boolean(default: false) required Whether the field is required
 * @apiBody integer(min: 0) page 0-based page number upon which to place the field
 * @apiBody integer(min: 0) x X position for the field (left to right)
 * @apiBody integer(min: 0) y Y position for the field (_bottom to top!_)
 * @apiBody string label? Optional label to display above the field
 * @apiBody integer(min: 50) width? Width of the field. Note that all fields have built-in defaults, and it is recommended that this only be set on text fields.
 * @apiBody integer(min: 15) height? Height of the field. Note that all fields have built-in defaults, and it is recommended that this only be set on text fields.
 * @apiBody string placeholder? Optional placeholder to display in text fields
 * @apiBody string group? For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name
 * @apiBody array(items:IDropdownOption) options? For dropdown fields, the options to display
 * @apiBody string value? Optional default value to set on the field
 * @apiSuccess ITemplateField . Template field
 */
declare const createField: (endpoint: VerdocsEndpoint, templateId: string, params: ITemplateField) => Promise<ITemplateField>;
/**
 * Update a template field.
 *
 * ```typescript
 * import {updateField} from '@verdocs/js-sdk/Templates';
 *
 * await updateField((VerdocsEndpoint.getDefault(), template_id, field_name, { ... });
 * ```
 *
 * @group Fields
 * @api PATCH /v2/fields/:template_id/:field_name Update a field. See createField for additional details on the supported parameters.
 * @apiBody string name? Rename the field. Note that template field names must be unique within a template.
 * @apiBody string role_name Role to assign to the field.
 * @apiBody string document_id ID of the document upon which to place the field.
 * @apiBody string(enum: 'signature' | 'initial' | 'checkbox' | 'radio' | 'textbox' | 'timestamp' | 'date' | 'dropdown' | 'textarea' | 'attachment' | 'payment') type? Change the field type. Note that while this is technically allowed, fields have different behaviors, validators, default sizes, etc. It is usually easier to add a new field and delete the old one.
 * @apiBody boolean(default: false) required? Whether the field is required
 * @apiBody integer(min: 0) page? 0-based page number upon which to place the field
 * @apiBody integer(min: 0) x? X position for the field (left to right)
 * @apiBody integer(min: 0) y? Y position for the field (_bottom to top!_)
 * @apiBody string label? Optional label to display above the field
 * @apiBody integer(min: 50) width? Width of the field. Note that all fields have built-in defaults, and it is recommended that this only be set on text fields.
 * @apiBody integer(min: 15) height? Height of the field. Note that all fields have built-in defaults, and it is recommended that this only be set on text fields.
 * @apiBody string placeholder? Optional placeholder to display in text fields
 * @apiBody string group? For fields that support grouping (radio buttons and check boxes) the value selected will be stored under this name
 * @apiBody array(items:IDropdownOption) options? For dropdown fields, the options to display
 * @apiBody string value? Optional default value to set on the field
 * @apiSuccess ITemplateField . Updated template field
 */
declare const updateField: (endpoint: VerdocsEndpoint, templateId: string, name: string, params: Partial<ITemplateField>) => Promise<ITemplateField>;
/**
 * Remove a field from a template.
 *
 * ```typescript
 * import {deleteField} from '@verdocs/js-sdk/Templates';
 *
 * await deleteField((VerdocsEndpoint.getDefault(), template_id, field_name);
 * ```
 *
 * @group Fields
 * @api DELETE /v2/fields/:template_id/:field_name Delete a field
 * @apiSuccess string . Success
 */
declare const deleteField: (endpoint: VerdocsEndpoint, templateId: string, name: string) => Promise<any>;
/**
 * Check to see if the user created the template.
 */
declare const userIsTemplateCreator: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Check to see if a template is "shared" with the user.
 */
declare const userHasSharedTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Check to see if the user can create a personal/private template.
 */
declare const userCanCreatePersonalTemplate: (profile: IProfile | null | undefined) => boolean;
/**
 * Check to see if the user can create an org-shared template.
 */
declare const userCanCreateOrgTemplate: (profile: IProfile | null | undefined) => boolean;
/**
 * Check to see if the user can create a public template.
 */
declare const userCanCreatePublicTemplate: (profile: IProfile | null | undefined) => boolean;
/**
 * Check to see if the user can read/view a template.
 */
declare const userCanReadTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Check to see if the user can update a tempate.
 */
declare const userCanUpdateTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Check to see if the user can change whether a template is personal vs org-shared.
 */
declare const userCanMakeTemplatePrivate: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
/**
 * Check to see if the user can change whether a template is personal vs org-shared.
 */
declare const userCanMakeTemplateShared: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
/**
 * Check to see if the user can change whether a template is personal vs org-shared.
 */
declare const userCanMakeTemplatePublic: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
/**
 * Check to see if the user can change whether a template is personal vs org-shared.
 */
declare const userCanChangeOrgVisibility: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Check to see if the user can change whether a template is personal vs org-shared.
 */
declare const userCanDeleteTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean;
/**
 * Confirm whether the user can create an envelope using the specified template.
 */
declare const userCanSendTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Confirm whether the user can create a new template.
 */
declare const userCanCreateTemplate: (profile: IProfile | null | undefined) => boolean;
/**
 * Check to see if the user can "build" the template (use the field builder). The user must have write access to the
 * template, and the template must have at least one signer role.
 */
declare const userCanBuildTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
declare const getFieldsForRole: (template: ITemplate, role_name: string) => ITemplateField[];
/**
 * Check to see if the user can preview the template. The user must have read access to the template, the template must
 * have at least one signer, and every signer must have at least one field.
 */
declare const userCanPreviewTemplate: (profile: IProfile | null | undefined, template: ITemplate) => boolean | null | undefined;
/**
 * Create a role.
 *
 * ```typescript
 * import {createTemplateRole} from '@verdocs/js-sdk';
 *
 * const role = await createTemplateRole(VerdocsEndpoint.getDefault(), template_id, params...);
 * ```
 *
 * @group Roles
 * @api POST /v2/roles/:template_id Add a role to a template
 * @apiBody string name Name for the new role. Must be unique within the template. May include spaces, but later calls must URL-encode any references to this role, so it is recomended that special characters be avoided.
 * @apiBody string(enum:'signer' | 'cc' | 'approver') type Type of role to create. Signers act on documents by filling and signing fields. CC recipients receive a copy but do not act on the document. Approvers control the final submission of a document, but do not have fields of their own to fill out.
 * @apiBody string full_name? Default full name for the role. May be completed/overridden later, when envelopes are made from the template.
 * @apiBody string email? Default email address for the role. May be completed/overridden later, when envelopes are made from the template.
 * @apiBody string phone? Default (SMS-capable) phone number for the role. May be completed/overridden later, when envelopes are made from the template.
 * @apiBody string message? Optional message to include in email and SMS signing invitations.
 * @apiBody integer(min: 1, default: 1) sequence? Optional 1-based sequence number for the role. Roles that share the same sequence number act in parallel, and will receive invitations at the same time.
 * @apiBody integer(min: 1, default: 1) order? Optional 1-based order number for the role. Controls the left-to-right display order of roles at the same sequence number in the UI components e.g. `<verdocs-template-roles />`.
 * @apiBody boolean delegator? If true, the role may delegate their signing responsibility to another party.
 * @apiSuccess IRole . The newly-created role
 */
declare const createTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, params: IRole) => Promise<IRole>;
/**
 * Update a role.
 *
 * ```typescript
 * import {updateTemplateRole} from '@verdocs/js-sdk';
 *
 * const role = await updateTemplateRole(VerdocsEndpoint.getDefault(), template_id, name, params...);
 * ```
 *
 * @group Roles
 * @api PATCH /v2/roles/:template_id/:role_id Update a role. See createRole for additional details on the parameters available.
 * @apiBody string name? Rename the role. Note that role names must be unique within a template, so this may fail if the new name is already in use.
 * @apiBody string(enum:'signer' | 'cc' | 'approver') type? Type of role.
 * @apiBody string full_name? Default full name for the role.
 * @apiBody string email? Default email address for the role.
 * @apiBody string phone? Default (SMS-capable) phone number for the role.
 * @apiBody string message? Optional message to include in email and SMS signing invitations.
 * @apiBody integer(min: 1, default: 1) sequence? Optional 1-based sequence number for the role.
 * @apiBody integer(min: 1, default: 1) order? Optional 1-based order number for the role.
 * @apiBody boolean delegator? If true, the role may delegate their signing responsibility to another party.
 * @apiBody string(enum:'pin'|'identity'|'') kba_method? Active PIN- or Identity-based KBA for the role.
 * @apiSuccess IRole . The newly-created role
 */
declare const updateTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, name: string, params: Partial<IRole>) => Promise<IRole>;
/**
 * Delete a role.
 *
 * ```typescript
 * import {deleteTemplateRole} from '@verdocs/js-sdk';
 *
 * const profiles = await deleteTemplateRole(VerdocsEndpoint.getDefault(), template_id, name);
 * ```
 *
 * @group Roles
 * @api DELETE /v2/roles/:template_id/:role_id Delete a role.
 * @apiSuccess string . Success
 */
declare const deleteTemplateRole: (endpoint: VerdocsEndpoint, template_id: string, name: string) => Promise<any>;
interface ITemplateTag {
    tag_name: string;
    template_id: string;
}
interface ITag {
    name: string;
    featured?: boolean;
    organization_id?: string;
    created_at?: string;
}
interface IStar {
    template_id: string;
    profile_id: string;
}
interface ITemplateSearchResult {
    page: number;
    row: number;
    total: number;
    result: ITemplate[];
}
/**
 * Get the template stars for a template.
 */
declare const getStars: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IStar[]>;
/**
 * Toggle the template star for a template.
 */
declare const toggleStar: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
/**
 * Apply a tag to a template.
 */
declare const addTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, params: ITag) => Promise<ITemplateTag>;
/**
 * Get all tags for a template.
 */
declare const getTemplateTags: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateTag[]>;
/**
 * Remove a tag from a template.
 */
declare const deleteTemplateTag: (endpoint: VerdocsEndpoint, templateId: string, tagName: string) => Promise<any>;
/**
 * Create an Organization-wide tag.
 */
declare const createTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
/**
 * Get an Organization-wide tag.
 */
declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>;
/**
 * Get all tags available for use by an Organization.
 */
declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
type ITemplateSortBy = "created_at" | "updated_at" | "name" | "last_used_at" | "counter" | "star_counter";
type TTemplateVisibilityFilter = "private_shared" | "private" | "shared" | "public";
interface IGetTemplatesParams {
    /** List only those templates whose names, descriptions, etc contain this search term. */
    q?: string;
    /** List only those templates with at least one "star". */
    is_starred?: boolean;
    /** List only those templates created by the caller. */
    is_creator?: boolean;
    /** Visibility status of templates to include. private_shared is the default (private + shared) */
    visibility?: TTemplateVisibilityFilter;
    /** Sort order */
    sort_by?: TSortTemplateBy;
    /** Set to true or false to control the sort order. Omit this field to sort dates descending, names ascending. */
    ascending?: boolean;
    /** Number of rows to retrieve. Defaults to 10. */
    rows?: number;
    /** Page to retrieve (0-based). Defaults to 0. */
    page?: number;
}
/**
 * Get all templates accessible by the caller, with optional filters.
 *
 * ```typescript
 * import {getTemplates} from '@verdocs/js-sdk/Templates';
 *
 * await getTemplates((VerdocsEndpoint.getDefault());
 * await getTemplates((VerdocsEndpoint.getDefault(), { is_starred: true });
 * await getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
 * await getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
 * ```
 *
 * @group Templates
 * @api GET /v2/templates Get Templates
 * @apiQuery string q? Find templates whose names/descriptions contain the specified query string
 * @apiQuery boolean is_starred? If true, returns only templates with at least one "star".
 * @apiQuery boolean is_creator? If true, returns only templates that the caller created.
 * @apiQuery string(enum: 'private_shared' | 'private' | 'shared' | 'public') visibility? Return only templates with the specified visibility.
 * @apiQuery string(enum: 'created_at' | 'updated_at' | 'name' | 'last_used_at' | 'counter' | 'star_counter') sort_by? Return results sorted by this criteria
 * @apiQuery boolean ascending? Set true/false to override the sort direction. Note that the default depends on `sort_by`. Date-based sorts default to descending, while name defaults to ascending.
 * @apiQuery integer(default: 20) rows? Limit the number of rows returned
 * @apiQuery integer(default: 0) page? Specify which page of results to return
 * @apiSuccess integer(format: int32) count The total number of records matching the query, helpful for pagination
 * @apiSuccess integer(format: int32) rows The number of rows returned in this response page
 * @apiSuccess integer(format: int32) page The page number of this response
 * @apiSuccess array(items: ITemplate) templates List of templates found
 */
declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<{
    count: number;
    rows: number;
    page: number;
    templates: ITemplate[];
}>;
/**
 * Get one template by its ID.
 *
 * ```typescript
 * import {getTemplate} from '@verdocs/js-sdk/Templates';
 *
 * const template = await getTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
 * ```
 *
 * @group Templates
 * @api GET /v2/templates/:template_id Get a template. Note that the caller must have at least View access to the template.
 * @apiSuccess ITemplate . The requested template
 */
declare const getTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplate>;
/**
 * Represents a document to be attached to a template via an externally-accessible URI. A copy of the document will be
 * downloaded from the specified URI. Note that the URI will be accessed without headers or other authorization methods
 * set, so the URI itself must encode any security tokens or keys required to access the file.
 */
interface IDocumentFromUri {
    /** The URI to retrieve the file from. */
    uri: string;
    /** A name for the attachment. */
    name: string;
}
/**
 * Represents a document to be attached to a template via a Base64-encoded string attachment. This is the best option
 * for maximum security but there is a 10MB size limit for the entire creation request. Requests attaching larger files
 * should use `IDocumentFromUri` or add attachments via `createTemplateDocument` after creating the template.
 */
interface IDocumentFromData {
    /** Base64-encoded file data. */
    data: string;
    /** A name for the attachment. */
    name: string;
}
interface ITemplateCreateParams {
    /** Name for the template to create. */
    name: string;
    /**
     * If set, the visibility level for the template.
     */
    visibility?: TTemplateVisibility;
    /**
     * Optional (defaults to true). Personal templates are only visible to the owner. Non-personal templates are shared
     * within the user's organization.
     * @deprecated. See visibility.
     */
    is_personal?: boolean;
    /**
     * Optional (defaults to false). Public templates may be found (via search) and viewed by anyone.
     * @deprecated. See visibility.
     */
    is_public?: boolean;
    /** Optional (defaults to EVERYONE_AS_CREATOR). Who may create and send envelopes using this template. */
    sender?: TTemplateSender;
    /** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
    initial_reminder?: number;
    /** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
    followup_reminders?: number;
    /** Optional description for the template to help identify it. */
    description?: string;
    /**
     * Optional list of roles to create. Documents are required if roles or fields will also be specified. Files may
     * be attached via a number of methods (browser File object, remote URI reference, or Base64-encoded string) but
     * all entries must of of the same type. If browser File objects are provided, the request will use a FORM POST
     * call, otherwise it will use traditional XHR.
     */
    documents?: File[] | IDocumentFromUri[] | IDocumentFromData[];
    /**
     * Optional list of roles to create. Note that if roles are not included in the request, fields will be ignored.
     */
    roles?: IRole[];
    /**
     * Optional list of fields to create.
     */
    fields?: ITemplateField[];
}
/**
 * Create a template.
 *
 * ```typescript
 * import {createTemplate} from '@verdocs/js-sdk/Templates';
 *
 * const newTemplate = await createTemplate((VerdocsEndpoint.getDefault(), {...});
 * ```
 *
 * @group Templates
 * @api POST /v2/templates Create a template
 * @apiBody string name Template name
 * @apiBody string description? Optional description
 * @apiBody TTemplateVisibility visibility? Visibility setting
 * @apiBody boolean is_personal? Deprecated. If true, the template is personal and can only be seen by the caller. (Use "visibility" for new calls.)
 * @apiBody boolean is_public? Deprecated. If true, the template is public and can be seen by anybody. (Use "visibility" for new calls.)
 * @apiBody TTemplateSender sender? Who may send envelopes using this template
 * @apiBody number initial_reminder? Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable.
 * @apiBody number followup_reminders? Delay (in seconds) before the subsequent reminders are sent (min: 12hrs). Set to 0 or null to disable.
 * @apiBody array(items:object) documents? Optional list of documents to attach to the template
 * @apiBody array(items:IRole) roles? Optional list of roles to create. Note that if roles are not included in the request, fields will be ignored.
 * @apiBody array(fields:ITemplateField) fields? Optional list of fields to create. Note that if fields that do not match a role will be ignored.
 * @apiSuccess ITemplate . The newly-created template
 */
declare const createTemplate: (endpoint: VerdocsEndpoint, params: ITemplateCreateParams, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplate>;
/**
 * Duplicate a template. Creates a complete clone, including all settings (e.g. reminders), fields,
 * roles, and documents.
 *
 * ```typescript
 * import {duplicateTemplate} from '@verdocs/js-sdk/Templates';
 *
 * const newTemplate = await duplicateTemplate((VerdocsEndpoint.getDefault(), originalTemplateId, 'My Template Copy');
 * ```
 *
 * @group Templates
 * @api PUT /v2/templates/:template_id Perform an operation on a template
 * @apiBody string(enum:'duplicate') action Action to perform
 * @apiBody string name? If duplicating the template, a name for the new copy
 * @apiSuccess ITemplate . The newly-copied template
 */
declare const duplicateTemplate: (endpoint: VerdocsEndpoint, templateId: string, name: string) => Promise<ITemplate>;
interface ITemplateCreateFromSharepointParams {
    /** Name for the template to create. */
    name: string;
    /** The site ID the source file is in. */
    siteId: string;
    /** The item ID of the source file. */
    itemId: string;
    /**
     * On-Behalf-Of access token generated for the request. This must have an audience of "https://graph.microsoft.com"
     * with Read access to the source file. This token is used ephemerally and discarded after the request, but it is
     * still recommended that you generate it with the minimal permissions possible.
     */
    oboToken: string;
}
/**
 * Create a template from a Sharepoint asset.
 *
 * ```typescript
 * import {createTemplateFromSharepoint} from '@verdocs/js-sdk/Templates';
 *
 * const newTemplate = await createTemplateFromSharepoint((VerdocsEndpoint.getDefault(), {...});
 * ```
 *
 * @group Templates
 * @api POST /v2/templates/from-sharepoint Create a template from an asset in Sharepoint
 * @apiBody string name Name for the new template
 * @apiBody string siteId Name for the new template
 * @apiBody string itemId Name for the new template
 * @apiBody string oboToken On-Behalf-Of token for calls to Sharepoint. Should be generated as a short-expiration token with at least Read privileges to the siteId/itemId. This token will be discarded after being used.
 * @apiSuccess ITemplate . The newly-created template
 */
declare const createTemplateFromSharepoint: (endpoint: VerdocsEndpoint, params: ITemplateCreateFromSharepointParams) => Promise<ITemplate>;
/**
 * Update a template.
 *
 * ```typescript
 * import {updateTemplate} from '@verdocs/js-sdk/Templates';
 *
 * const updatedTemplate = await updateTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9', { name: 'New Name' });
 * ```
 *
 * @group Templates
 * @api PATCH /v2/templates/:template_id Update a template
 * @apiBody string name? Template name
 * @apiBody string description? Optional description
 * @apiBody TTemplateVisibility visibility? Visibility setting
 * @apiBody boolean is_personal? Deprecated. If true, the template is personal and can only be seen by the caller. (Use "visibility" for new calls.)
 * @apiBody boolean is_public? Deprecated. If true, the template is public and can be seen by anybody. (Use "visibility" for new calls.)
 * @apiBody TTemplateSender sender? Who may send envelopes using this template
 * @apiBody number initial_reminder? Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable.
 * @apiBody number followup_reminders? Delay (in seconds) before the subsequent reminders are sent (min: 12hrs). Set to 0 or null to disable.
 * @apiSuccess ITemplate . The updated template
 */
declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: string, params: Partial<ITemplateCreateParams>) => Promise<ITemplate>;
/**
 * Delete a template.
 *
 * ```typescript
 * import {deleteTemplate} from '@verdocs/js-sdk/Templates';
 *
 * await deleteTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
 * ```
 *
 * @group Templates
 * @api DELETE /v2/templates/:template_id Delete a template
 * @apiSuccess string . Success
 */
declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<string>;
/**
 * Get all the Template Documents associated to a particular Template.
 *
 * ```typescript
 * import {TemplateDocument} from '@verdocs/js-sdk/Templates';
 *
 * await TemplateDocument.geTemplateDocuments((VerdocsEndpoint.getDefault(), templateId);
 * ```
 *
 * @group Template Documents
 * @api GET /v2/templates/:template_id/documents List the documents assigned to a template
 * @apiSuccess array(items: ITemplateDocument) . Template documents
 */
declare const getTemplateDocuments: (endpoint: VerdocsEndpoint, templateId: string) => Promise<ITemplateDocument[]>;
/**
 * Get a specific Document.
 *
 * ```typescript
 * import {TemplateDocument} from '@verdocs/js-sdk/Templates';
 *
 * await TemplateDocument.geTemplateDocument((VerdocsEndpoint.getDefault(), templateId,documentId);
 * ```
 *
 * @group Template Documents
 * @api GET /v2/templates/:template_id/documents/:document_id Get an individual template document
 * @apiSuccess ITemplateDocument . Template document
 */
declare const getTemplateDocument: (endpoint: VerdocsEndpoint, templateId: string, documentId: string) => Promise<ITemplateDocument>;
/**
 * Create a Document for a particular Template.
 *
 * ```typescript
 * import {TemplateDocument} from '@verdocs/js-sdk/Templates';
 *
 * await TemplateDocument.createDocument((VerdocsEndpoint.getDefault(), templateID, params);
 * ```
 *
 * @group Template Documents
 * @api POST /v2/templates/:template_id/documents Attach a document to a template
 * @apiBody string(format:binary) file Document file to attach. The file name will automatically be used as the document name.
 * @apiSuccess ITemplateDocument . Template document
 */
declare const createTemplateDocument: (endpoint: VerdocsEndpoint, templateId: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplateDocument>;
/**
 * Delete a specific Document.
 *
 * ```typescript
 * import {TemplateDocument} from '@verdocs/js-sdk/Templates';
 *
 * await TemplateDocument.deleteDocument((VerdocsEndpoint.getDefault(), templateID, documentID);
 * ```
 *
 * @group Template Documents
 * @api DELETE /v2/templates/:temlate_id/documents/:document_id Delete a template document
 * @apiSuccess string . Success
 */
declare const deleteTemplateDocument: (endpoint: VerdocsEndpoint, templateId: string, documentId: string) => Promise<any>;
/**
 * Get (binary download) a file attached to a Template. It is important to use this method
 * rather than a direct A HREF or similar link to set the authorization headers for the
 * request.
 */
declare const getTemplateDocumentFile: (endpoint: VerdocsEndpoint, templateId: string, documentId: string) => Promise<any>;
/**
 * Get (binary download) a file attached to a Template. It is important to use this method
 * rather than a direct A HREF or similar link to set the authorization headers for the
 * request.
 */
declare const getTemplateDocumentThumbnail: (endpoint: VerdocsEndpoint, templateId: string, documentId: string) => Promise<any>;
/**
 * Get a display URI for a given page in a file attached to a template document. These pages are rendered server-side
 * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
 * for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants. The
 * original asset may be obtained by calling `getTemplateDocumentFile()` or similar.
 */
declare const getTemplateDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, documentId: string, page: number, variant?: "original" | "tagged") => Promise<string>;
interface IValidator {
    name: string;
    regex: string;
}
/**
 * Get all defined validators
 *
 * ```typescript
 * import {Documents} from '@verdocs/js-sdk/Templates';
 *
 * await Documents.getDocuments(templateID);
 * ```
 */
declare const getValidators: (endpoint: VerdocsEndpoint) => Promise<IValidator[]>;
declare const getValidator: (endpoint: VerdocsEndpoint, validatorName: string) => Promise<IValidator>;
declare const isValidEmail: (email: string | undefined) => boolean;
declare const isValidPhone: (phone: string | undefined) => boolean;
declare const isValidRoleName: (value: string, roles: IRole[]) => boolean;
declare const isValidTag: (value: string, tags: string[]) => boolean;
/**
 * Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
 */
declare function getRGB(rgba: string): string;
/**
 * Given a signer role index, return the color code for that signer.
 */
declare function getRGBA(roleIndex: number): "rgba(255, 193, 7, 0.4)" | "rgba(134, 134, 134, 0.3)" | "rgba(156, 39, 176, .4)" | "rgba(33, 150, 243, .4)" | "rgba(220, 231, 117, 0.3)" | "rgba(121, 134, 203, 0.3)" | "rgba(77, 182, 172, 0.3)" | "rgba(255, 202, 165, 0.3)" | "rgba(2, 247, 190, 0.3)" | "rgba(255, 138, 101, 0.3)" | "rgba(82, 255, 79, 0.3)" | "rgba(229, 115, 155, 0.3)";
/**
 * Given a role name, return a color code for it. This works by computing a hash code so the specific color returned
 * is not specified explicitly, but will be the same for every call with the same input value.
 */
declare function nameToRGBA(str: string): string | undefined;
/**
 * Helper function to obtain a color code given a role name given various possible inputs.
 */
declare function getRoleColor(name: string, roles: TRole[], index?: number): string | undefined;
declare const formatShortTimeAgo: (val: any) => string;
declare const collapseEntitlements: (entitlements: IEntitlement[]) => Partial<Record<TEntitlement, IEntitlement>>;
declare function getRTop(y: number, fieldHeight: number, iTextHeight: number, yRatio: number): number;
declare function getRLeft(x: number, ratio: number): number;
declare function getRValue(y: number, ratio: number): number;
declare function blobToBase64(image: Blob): Promise<unknown>;
declare function rescale(r: number, n: number): number;
/**
 * Utility function to sort fields by page, then by Y coordinate, then by X coordinate.
 * NOTE: This function mutates the input array.
 */
declare function sortFields(fields: ITemplateField[] | IEnvelopeField[]): IEnvelopeField[] | ITemplateField[];
interface IFileWithData {
    lastModified: number;
    size: number;
    type: string;
    name: string;
    data: string;
}
interface ICountry {
    code: string;
    name: string;
    value: string;
}
/**
 * Given a File, extract the file's content as a base64 encoded data URL. The response will have a prefix that
 * includes the MIME type of the file, e.g. "data:image/jpeg;base64,iVBORw0K......"
 */
declare const fileToDataUrl: (file: File) => Promise<IFileWithData>;
/**
 * Trigger a download dialog to save a blob as a file on disk.
 */
declare const downloadBlob: (blob: Blob, name?: string) => void;
declare const Countries: ICountry[];
declare function getCountryByCode(code: string): ICountry | null;
declare function isFrenchGuiana(code: string): boolean;
declare function isGuadeloupe(code: string): boolean;
declare function isMartinique(code: string): boolean;
declare function isMayotte(code: string): boolean;
declare function getPlusOneCountry(code: string): ICountry | null;
declare function isCanada(code: string): boolean;
declare function isAmericanSamoa(code: string): boolean;
declare function isDominicanRepublic(code: string): boolean;
declare function isPuertoRico(code: string): boolean;
// need to finish
declare function getMatchingCountry(code: string, substrings: number): number;
/**
 * Create an array containing a sequence of integers, e.g. [START, START+1, START+2, ...] This is frequently useful
 * in rendering operations when there is no source array to .map() across.
 */
declare const integerSequence: (start: number, count: number) => number[];
/**
 * Format a profile's full name
 */
declare const formatFullName: (source?: {
    first_name?: string | null;
    last_name?: string | null;
    [key: string]: any;
} | null) => string;
/**
 * Format a profile's initials
 */
declare const formatInitials: (profile?: IProfile) => string;
/**
 * Generate suggested initials for a full name, e.g. "John Doe" will yield "JD".
 */
declare const fullNameToInitials: (name: string) => string;
/**
 * Capitalize the first letter of a string.
 */
declare const capitalize: (str: string) => string;
/**
 * Convert a phone-number-like string to E164 format.
 * @see https://46elks.com/kb/e164
 */
declare const convertToE164: (input: string) => string;
// Generate a random string of a given length. This is NOT cryptographically strong. It is meant for light-duty
// uses such as assigning IDs to DOM elements.
declare const randomString: (length: number) => string;
/**
 * Simplified, Node/Browser-safe alternative to atob() for base64 decoding.
 * Modified from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
 */
declare const AtoB: (str: string) => string;
/**
 * Decode the body of a JWT. This helper may allow front-end applications to avoid a dependency on `jsonwebtoken` in
 * many cases. Note that this should only be used for true JWTs. Opaque tokens will cause this to throw.
 */
declare const decodeJWTBody: (token: string) => any;
/**
 * Decode the body of an Verdocs access token. Note that raw tokens contain namespaced fields, e.g.
 * `https://verdocs.com/profile_id`. To make these tokens easier to use in front-end code, this name-spacing
 * will be removed. Note that user and signing sessions have different access token formats. The calling
 * application should distinguish between the two based on the context of the authenticated session, or by
 * the presence of the `document_id` field, which will only be present for signing sessions.
 */
declare const decodeAccessTokenBody: (token: string) => TSession;
export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, TTemplateVisibility, TEntitlement, TRecipientAuthMethod, TRecipientAuthStep, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, 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, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, 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, startSigningSession, getInPersonLink, verifySigner, sendDelegate, resendInvitation, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, IAuthenticateRecipientViaPasscodeRequest, IAuthenticateRecipientViaEmailRequest, IAuthenticateRecipientViaSMSRequest, IKBAResponse, IAuthenticateRecipientViaKBARequest, TAuthenticateRecipientRequest, 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, getOrganization, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, getEntitlements, getActiveEntitlements, 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, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, 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, collapseEntitlements, getRTop, getRLeft, getRValue, blobToBase64, rescale, sortFields, 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 };
