/**
 * A business account — the top-level container that groups members (users who
 * can manage the account), signers (identities that hold key shares for the
 * account's wallets), and the wallets themselves. This is the summary shape
 * returned by list/create operations; fetch a single account with
 * `getBusinessAccount` to get the fully-expanded `BusinessAccountDetail`.
 *
 * @example
 * ```ts
 * const account: BusinessAccount = await createBusinessAccount({
 *   request: { name: 'Acme Treasury' },
 * });
 * console.log(account.id, account.name);
 * ```
 *
 * @see BusinessAccountDetail
 * @see createBusinessAccount
 * @see listBusinessAccounts
 */
export type BusinessAccount = {
    createdAt?: Date;
    externalRef?: string | null;
    id: string;
    metadata?: object;
    name?: string | null;
    projectEnvironmentId: string;
    updatedAt?: Date;
};
/**
 * A member of a business account: a user granted a management `role` on the
 * account (`owner` / `admin` / `viewer`). Members control the account; they are
 * distinct from signers, which hold the key shares used to sign transactions.
 * Returned in `BusinessAccountDetail.members` and by `addBusinessAccountMember`.
 *
 * @example
 * ```ts
 * const member: BusinessAccountMember = await addBusinessAccountMember({
 *   businessAccountId: account.id,
 *   identifier: 'ops@acme.example',
 *   identifierType: 'email',
 *   role: 'admin',
 * });
 * console.log(member.userId, member.role);
 * ```
 *
 * @see BusinessAccountDetail
 * @see BusinessAccountMemberRole
 * @see addBusinessAccountMember
 */
export type BusinessAccountMember = {
    addedByUserId?: string | null;
    businessAccountId: string;
    createdAt?: Date;
    id: string;
    role: string;
    userId: string;
};
/**
 * A signer attached to a business account's wallet: an identity (`endUser` or
 * `server`) that holds a key share (`shareSetId`) for a specific `walletId` and
 * can therefore participate in signing. Signers are distinct from members —
 * a signer signs, a member administers. Returned in
 * `BusinessAccountDetail.signers` and by `addBusinessAccountSigner`.
 *
 * @example
 * ```ts
 * const detail: BusinessAccountDetail = await getBusinessAccount({
 *   businessAccountId: account.id,
 * });
 * const signer: BusinessAccountSigner | undefined = detail.signers[0];
 * console.log(signer?.walletId, signer?.type);
 * ```
 *
 * @see BusinessAccountDetail
 * @see BusinessAccountSignerType
 * @see addBusinessAccountSigner
 */
export type BusinessAccountSigner = {
    businessAccountId: string;
    createdAt?: Date;
    id: string;
    shareSetId?: string | null;
    type: string;
    userId?: string | null;
    walletId: string;
};
/**
 * A compact summary of a wallet owned by a business account: just the wallet
 * `id`, its `chain`, and its `publicKey` (the on-chain address). Embedded in
 * `BusinessAccountDetail.wallets`; use `addWalletToBusinessAccount` to attach a
 * wallet to an account.
 *
 * @example
 * ```ts
 * const detail: BusinessAccountDetail = await getBusinessAccount({
 *   businessAccountId: account.id,
 * });
 * const wallet: BusinessAccountWalletSummary | undefined = detail.wallets?.[0];
 * console.log(wallet?.chain, wallet?.publicKey);
 * ```
 *
 * @see BusinessAccountDetail
 * @see addWalletToBusinessAccount
 */
export type BusinessAccountWalletSummary = {
    chain: string;
    id: string;
    publicKey: string;
};
/**
 * The fully-expanded view of a single business account: everything on
 * `BusinessAccount` plus its embedded `members`, `signers`, and (optionally)
 * `wallets`. Returned by `getBusinessAccount` and by the mutating operations
 * that need to hand back the refreshed account state (e.g.
 * `addWalletToBusinessAccount`).
 *
 * @example
 * ```ts
 * const detail: BusinessAccountDetail = await getBusinessAccount({
 *   businessAccountId: account.id,
 * });
 * console.log(detail.members.length, detail.signers.length);
 * ```
 *
 * @see BusinessAccount
 * @see getBusinessAccount
 * @see addWalletToBusinessAccount
 */
export type BusinessAccountDetail = BusinessAccount & {
    members: BusinessAccountMember[];
    signers: BusinessAccountSigner[];
    wallets?: BusinessAccountWalletSummary[];
};
/**
 * A page of business accounts: the `items` for the current page plus an
 * optional `nextCursor` to fetch the following page. This is the shape returned
 * by `listBusinessAccounts`; each item is a summary `BusinessAccount`.
 *
 * @example
 * ```ts
 * const page: BusinessAccountList = await listBusinessAccounts();
 * for (const account of page.items ?? []) {
 *   console.log(account.id, account.name);
 * }
 * ```
 *
 * @see BusinessAccount
 * @see listBusinessAccounts
 */
export type BusinessAccountList = {
    items?: BusinessAccount[];
    nextCursor?: string;
};
export type BusinessAccountMemberRole = 'owner' | 'admin' | 'viewer';
export type BusinessAccountSignerType = 'endUser' | 'server';
export type BusinessAccountSignerIdentifierType = 'email' | 'phoneNumber' | 'externalUserId' | 'socialUsername' | 'socialAccountId' | 'id';
export type TargetSignerIdentity = {
    identifier?: string;
    identifierType?: BusinessAccountSignerIdentifierType;
    userId?: string;
};
export type BusinessAccountsApi = {
    addMember: (params: {
        businessAccountId: string;
        identifier?: string;
        identifierType?: BusinessAccountSignerIdentifierType;
        role?: BusinessAccountMemberRole;
        userId?: string;
    }) => Promise<BusinessAccountMember>;
    addWalletToBusinessAccount: (params: {
        businessAccountId?: string;
        walletId: string;
    }) => Promise<BusinessAccountDetail>;
    createBusinessAccount: (args?: {
        request?: {
            name?: string | null;
        };
    }) => Promise<BusinessAccount>;
    getBusinessAccount: (params: {
        businessAccountId: string;
    }) => Promise<BusinessAccountDetail>;
    listBusinessAccounts: () => Promise<BusinessAccountList>;
};
//# sourceMappingURL=businessAccounts.types.d.ts.map