import { type AccountInfo, type AccountRole, type AccountUuid, type BackupStatus, Data, type Person, type PersonId, type PersonInfo, type PersonUuid, type SocialIdType, Version, type UsageStatus, type WorkspaceInfoWithStatus, type WorkspaceMemberInfo, WorkspaceMode, type WorkspaceUserOperation, type WorkspaceUuid } from '@hcengineering/core';
import type { AccountAggregatedInfo, Integration, IntegrationKey, IntegrationSecret, IntegrationSecretKey, LoginInfo, LoginInfoByToken, LoginInfoRequestData, LoginInfoWithWorkspaces, MailboxInfo, MailboxOptions, MailboxSecret, OtpInfo, PersonWithProfile, ProviderInfo, RegionInfo, SocialId, Subscription, SubscriptionData, UserProfile, WorkspaceLoginInfo, WorkspaceOperation } from './types';
/** @public */
export interface AccountClient {
    getProviders: () => Promise<ProviderInfo[]>;
    getUserWorkspaces: () => Promise<WorkspaceInfoWithStatus[]>;
    selectWorkspace: (workspaceUrl: string, kind?: 'external' | 'internal' | 'byregion', externalRegions?: string[]) => Promise<WorkspaceLoginInfo>;
    validateOtp: (email: string, code: string, password?: string, action?: 'verify') => Promise<LoginInfo>;
    loginOtp: (email: string) => Promise<OtpInfo>;
    getLoginInfoByToken: (data?: LoginInfoRequestData) => Promise<LoginInfoByToken>;
    getLoginWithWorkspaceInfo: () => Promise<LoginInfoWithWorkspaces>;
    restorePassword: (password: string) => Promise<LoginInfo>;
    confirm: () => Promise<LoginInfo>;
    requestPasswordReset: (email: string) => Promise<void>;
    sendInvite: (email: string, role: AccountRole) => Promise<void>;
    resendInvite: (email: string, role: AccountRole) => Promise<void>;
    createInviteLink: (email: string, role: AccountRole, autoJoin: boolean, firstName: string, lastName: string, navigateUrl?: string, expHours?: number) => Promise<string>;
    leaveWorkspace: (account: AccountUuid) => Promise<LoginInfo | null>;
    changeUsername: (first: string, last: string) => Promise<void>;
    changePassword: (oldPassword: string, newPassword: string) => Promise<void>;
    signUpJoin: (email: string, password: string, first: string, last: string, inviteId: string, workspaceUrl: string) => Promise<WorkspaceLoginInfo>;
    join: (email: string, password: string, inviteId: string, workspaceUrl: string) => Promise<WorkspaceLoginInfo>;
    createInvite: (exp: number, emailMask: string, limit: number, role: AccountRole) => Promise<string>;
    /**
     * @param options.personalized
     * If true, will generate a link with a personalized token for one person access
     * If false, will generate a link with an open-ended account in the token. Every token use will generate a new account.
     * When false, notBefore and expiration parameters are mandatory.
     * @param options.notBefore - not valid before; timestamp in seconds
     * @param options.expiration - expires after; timestamp in seconds
     */
    createAccessLink: (role: AccountRole, options?: {
        firstName?: string;
        lastName?: string;
        navigateUrl?: string;
        extra?: Record<string, any>;
        spaces?: string[];
        notBefore?: number;
        expiration?: number;
        personalized?: boolean;
    }) => Promise<string>;
    checkJoin: (inviteId: string) => Promise<WorkspaceLoginInfo>;
    checkAutoJoin: (inviteId: string, firstName?: string, lastName?: string) => Promise<WorkspaceLoginInfo>;
    getWorkspaceInfo: (updateLastVisit?: boolean) => Promise<WorkspaceInfoWithStatus>;
    getWorkspacesInfo: (workspaces: WorkspaceUuid[]) => Promise<WorkspaceInfoWithStatus[]>;
    updateLastVisit: (workspaces: WorkspaceUuid[]) => Promise<void>;
    getRegionInfo: () => Promise<RegionInfo[]>;
    createWorkspace: (name: string, region?: string) => Promise<WorkspaceLoginInfo>;
    signUpOtp: (email: string, first: string, last: string) => Promise<OtpInfo>;
    /**
     * Deprecated. Only to be used for dev setups without mail service.
     */
    signUp: (email: string, password: string, first: string, last: string) => Promise<LoginInfo>;
    login: (email: string, password: string) => Promise<LoginInfo>;
    loginAsGuest: () => Promise<LoginInfo>;
    isReadOnlyGuest: () => Promise<boolean>;
    getPerson: () => Promise<Person>;
    getPersonInfo: (account: PersonUuid) => Promise<PersonInfo>;
    getSocialIds: (includeDeleted?: boolean) => Promise<SocialId[]>;
    getWorkspaceMembers: () => Promise<WorkspaceMemberInfo[]>;
    updateWorkspaceRole: (account: string, role: AccountRole) => Promise<void>;
    updateAllowReadOnlyGuests: (readOnlyGuestsAllowed: boolean) => Promise<{
        guestPerson: Person;
        guestSocialIds: SocialId[];
    } | undefined>;
    updateAllowGuestSignUp: (guestSignUpAllowed: boolean) => Promise<void>;
    updateWorkspaceName: (name: string) => Promise<void>;
    deleteWorkspace: () => Promise<void>;
    findPersonBySocialKey: (socialKey: string, requireAccount?: boolean) => Promise<PersonUuid | undefined>;
    findPersonBySocialId: (socialId: PersonId, requireAccount?: boolean) => Promise<PersonUuid | undefined>;
    findSocialIdBySocialKey: (socialKey: string) => Promise<PersonId | undefined>;
    findFullSocialIdBySocialKey: (socialKey: string) => Promise<SocialId | undefined>;
    findFullSocialIds: (socialIds: PersonId[]) => Promise<SocialId[]>;
    getMailboxOptions: () => Promise<MailboxOptions>;
    getMailboxSecret: (mailbox: string) => Promise<MailboxSecret | undefined>;
    createMailbox: (name: string, domain: string) => Promise<{
        mailbox: string;
        socialId: PersonId;
    }>;
    getMailboxes: () => Promise<MailboxInfo[]>;
    deleteMailbox: (mailbox: string) => Promise<void>;
    listAccounts: (search?: string, skip?: number, limit?: number) => Promise<AccountAggregatedInfo[]>;
    deleteAccount: (uuid: AccountUuid) => Promise<void>;
    workerHandshake: (region: string, version: Data<Version>, operation: WorkspaceOperation) => Promise<void>;
    getPendingWorkspace: (region: string, version: Data<Version>, operation: WorkspaceOperation) => Promise<WorkspaceInfoWithStatus | null>;
    updateWorkspaceInfo: (wsUuid: string, event: string, version: Data<Version>, progress: number, message?: string) => Promise<void>;
    listWorkspaces: (region?: string | null, mode?: WorkspaceMode | null) => Promise<WorkspaceInfoWithStatus[]>;
    performWorkspaceOperation: (workspaceId: string | string[], event: WorkspaceUserOperation, ...params: any) => Promise<boolean>;
    assignWorkspace: (email: string, workspaceUuid: string, role: AccountRole) => Promise<void>;
    updateBackupInfo: (info: BackupStatus) => Promise<void>;
    updateUsageInfo: (info: UsageStatus) => Promise<void>;
    updateWorkspaceRoleBySocialKey: (socialKey: string, targetRole: AccountRole) => Promise<void>;
    ensurePerson: (socialType: SocialIdType, socialValue: string, firstName: string, lastName: string) => Promise<{
        uuid: PersonUuid;
        socialId: PersonId;
    }>;
    addSocialIdToPerson: (person: PersonUuid, type: SocialIdType, value: string, confirmed: boolean, displayValue?: string) => Promise<PersonId>;
    updateSocialId: (personId: PersonId, displayValue: string) => Promise<PersonId>;
    exchangeGuestToken: (token: string) => Promise<string>;
    /**
     * Releases the target social id for the target account.
     * If called with user's token it releases the social id for the user's account.
     * @param personUuid Required for services
     * @param type Social id type
     * @param value Social id value
     * @param deleteIntegrations Deletes associated integrations if true. Otherwise, throws an error if any.
     * @returns Deleted social id with updated isDeleted flag and key/value
     */
    releaseSocialId: (personUuid: PersonUuid | undefined, type: SocialIdType, value: string, deleteIntegrations?: boolean) => Promise<SocialId>;
    createIntegration: (integration: Integration) => Promise<void>;
    updateIntegration: (integration: Integration) => Promise<void>;
    deleteIntegration: (integrationKey: IntegrationKey) => Promise<void>;
    getIntegration: (integrationKey: IntegrationKey) => Promise<Integration | null>;
    listIntegrations: (filter: Partial<IntegrationKey>) => Promise<Integration[]>;
    addIntegrationSecret: (integrationSecret: IntegrationSecret) => Promise<void>;
    updateIntegrationSecret: (integrationSecret: IntegrationSecret) => Promise<void>;
    deleteIntegrationSecret: (integrationSecretKey: IntegrationSecretKey) => Promise<void>;
    getIntegrationSecret: (integrationSecretKey: IntegrationSecretKey) => Promise<IntegrationSecret | null>;
    listIntegrationsSecrets: (filter: Partial<IntegrationSecretKey>) => Promise<IntegrationSecret[]>;
    getAccountInfo: (uuid: AccountUuid) => Promise<AccountInfo>;
    canMergeSpecifiedPersons: (primaryPerson: PersonUuid, secondaryPerson: PersonUuid) => Promise<boolean>;
    mergeSpecifiedPersons: (primaryPerson: PersonUuid, secondaryPerson: PersonUuid) => Promise<void>;
    mergeSpecifiedAccounts: (primaryAccount: AccountUuid, secondaryAccount: AccountUuid) => Promise<void>;
    addEmailSocialId: (email: string) => Promise<OtpInfo>;
    addHulyAssistantSocialId: () => Promise<PersonId>;
    refreshHulyAssistantToken: () => Promise<void>;
    updatePasswordAgingRule: (days: number) => Promise<void>;
    checkPasswordAging: () => Promise<boolean>;
    setMyProfile: (profile: Partial<Omit<UserProfile, 'personUuid'>>) => Promise<void>;
    getUserProfile: (personUuid?: PersonUuid) => Promise<PersonWithProfile | null>;
    getSubscriptions: (workspaceUuid?: WorkspaceUuid | undefined, activeOnly?: boolean) => Promise<Subscription[]>;
    getSubscriptionByProviderId: (provider: string, providerSubscriptionId: string) => Promise<Subscription | null>;
    getSubscriptionById: (subscriptionId: string) => Promise<Subscription | null>;
    upsertSubscription: (subscription: SubscriptionData) => Promise<void>;
    setCookie: () => Promise<void>;
    deleteCookie: () => Promise<void>;
}
/** @public */
export declare function getClient(accountsUrl?: string, token?: string, retryTimeoutMs?: number): AccountClient;
//# sourceMappingURL=client.d.ts.map