import { AuthAndPublicApiTransports } from "../../shared/transports.js"; import { PolyesterMutationOptions, PolyesterRequestOptions } from "../../shared/request-options.js"; import { SubaccountResolver } from "../subaccount-resolver.js"; import { PolyesterRealtime } from "../../realtime/types.js"; import "../../realtime/index.js"; import { BaseSubscribeInput } from "../../shared/types.js"; import { ApiKey } from "../api-keys/api-keys.schemas.js"; import "../api-keys/index.js"; import { SubaccountPolicy } from "../policies/subaccount-policies/subaccount-policies.schemas.js"; import { SubaccountPoliciesService } from "../policies/subaccount-policies/subaccount-policies.js"; import "../policies/subaccount-policies/index.js"; import { CreateSubaccountChallengeInputSchema, CreateSubaccountInputSchema, CreateSubaccountResult, EffectiveSubaccountPermissions, InviteSubaccountMemberInputSchema, ListSubaccountInvitesInputSchema, RemoveSubaccountMemberInputSchema, RespondSubaccountInviteInputSchema, SetSubaccountMemberMfaRequirementInputSchema, Subaccount, SubaccountActivityInputSchema, SubaccountChallenge, SubaccountEvent, SubaccountIdInputSchema, SubaccountInvite, SubaccountMember, SubaccountMutationResult, SubaccountRoleCatalog, SubaccountSchema, UpdateSubaccountInputSchema, UpdateSubaccountMemberRoleInputSchema } from "./subaccounts.schemas.js"; import * as v from "valibot"; //#region src/services/subaccounts/subaccounts.d.ts interface SubscribeSubaccountsInput extends BaseSubscribeInput { accountId: string; } interface SubscribeApiKeysInput extends BaseSubscribeInput { accountId: string; } /** * Reads the public role catalog and creates, manages, shares, audits, and subscribes to subaccounts visible to the authenticated caller. */ declare class SubaccountsService { #private; readonly policies: SubaccountPoliciesService; constructor(transports: AuthAndPublicApiTransports, realtime: PolyesterRealtime, resolver?: SubaccountResolver); /** * Returns subaccounts owned by or shared with the caller plus totalCreated, including soft-deleted ones. Use `createChallenge` for the canonical next smart-account address and salt. */ list(options?: PolyesterRequestOptions): Promise<{ totalCreated: number; subaccounts: v.InferOutput[]; }>; /** * Fetches an aggregated subaccount dashboard view with subaccount details, policy, API keys, balances, members, and outgoing invites; throws if the subaccount is missing. */ get(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Requests the canonical next smart account and a short-lived EIP-191 authorization message * bound to the authenticated root and the selected owner EOA. Sign the exact message through * the returned smart account, then pass it to `create`. A new challenge replaces the previous one. */ createChallenge(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Creates a new subaccount under the caller's root account using the smart-account address, message, and smart-account signature from `createChallenge`. */ create(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Updates mutable subaccount display/status fields such as label and active/disabled status. */ update(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Creates or refreshes a pending invitation granting a role on a subaccount to another root account. */ inviteMember(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Removes delegated access for a subaccount member by grantee account ID. */ removeMember(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Changes an existing delegated member's role without sending a new invitation. */ updateMemberRole(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Enables or disables the owner-controlled MFA requirement for delegated interactive member actions on a subaccount. */ setMemberMfaRequirement(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Returns the caller's subaccount invitations, newest first. Omit `direction` to include both * incoming and outgoing invitations, or pass `"incoming"` or `"outgoing"` to filter. */ listInvites(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Returns the public built-in role and permission catalog with display metadata and per-role permission sets. */ listRoles(options?: PolyesterRequestOptions): Promise; /** * Returns the caller's current role, effective role-granted permissions, and attached policy ID for a subaccount. */ getEffectivePermissions(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Returns the owner and delegated members for a subaccount, including role and MFA enrollment status. */ listMembers(input: v.InferInput, options?: PolyesterRequestOptions): Promise; /** * Accepts or rejects an incoming invite, or cancels an outgoing invite, returning the updated invitation. */ respondInvite(input: v.InferInput, options?: PolyesterMutationOptions): Promise; /** * Returns paginated audit/activity events for a subaccount, newest first, with a non-negative integer limit from 0 through 200 and opaque cursor pagination. */ listEvents(input: v.InferInput, options?: PolyesterRequestOptions): Promise<{ events: SubaccountEvent[]; nextPageToken: string; }>; /** * Subscribes to private subaccount updates for an account and emits normalized subaccount records. */ subscribe(input: SubscribeSubaccountsInput): () => void; /** * Subscribes to private API key updates for an account through the subaccount realtime channel helper. */ subscribeApiKeys(input: SubscribeApiKeysInput): () => void; } //#endregion export { SubaccountsService }; //# sourceMappingURL=subaccounts.d.ts.map