import { r as ChannelAccountSnapshot } from "./types.core-CuC3Nb15.js"; import { i as OpenClawConfig } from "./types.openclaw-CpnoYlBx.js"; //#region src/channels/plugins/account-helpers.d.ts /** * Creates reusable account id listing and default-account resolution helpers for a channel. */ declare function createAccountListHelpers(channelKey: string, options?: { normalizeAccountId?: (id: string) => string; allowUnlistedDefaultAccount?: boolean; implicitDefaultAccount?: { channelKeys?: readonly string[]; envVars?: readonly string[]; }; hasImplicitDefaultAccount?: (cfg: OpenClawConfig) => boolean; }): { listConfiguredAccountIds: (cfg: OpenClawConfig) => string[]; listAccountIds: (cfg: OpenClawConfig) => string[]; resolveDefaultAccountId: (cfg: OpenClawConfig) => string; }; /** * Checks whether a config/env value should count as an account being configured. */ declare function hasConfiguredAccountValue(value: unknown): boolean; /** * Combines configured, additional, implicit, and fallback account ids into stable order. */ declare function listCombinedAccountIds(params: { configuredAccountIds: Iterable; additionalAccountIds?: Iterable; implicitAccountId?: string | undefined; fallbackAccountIdWhenEmpty?: string | undefined; }): string[]; /** * Resolves the default account id from a listed account set and optional configured preference. */ declare function resolveListedDefaultAccountId(params: { accountIds: readonly string[]; configuredDefaultAccountId?: string | undefined; allowUnlistedDefaultAccount?: boolean; ambiguousFallbackAccountId?: string | undefined; normalizeListedAccountId?: ((accountId: string) => string) | undefined; }): string; /** * Merges channel-level config with account-level overrides. */ declare function mergeAccountConfig>(params: { channelConfig: TConfig | undefined; accountConfig: Partial | undefined; omitKeys?: string[]; nestedObjectKeys?: string[]; }): TConfig; /** * Resolves an account config by id, then merges it over channel-level defaults. */ declare function resolveMergedAccountConfig>(params: { channelConfig: TConfig | undefined; accounts: Record> | undefined; accountId: string; omitKeys?: string[]; normalizeAccountId?: (accountId: string) => string; nestedObjectKeys?: string[]; }): TConfig; type AccountSnapshotInput = { accountId?: string | null; enabled?: boolean | null; name?: string | null | undefined; }; /** * Builds a safe account snapshot for status/setup surfaces. */ declare function describeAccountSnapshot(params: { account: AccountSnapshotInput; configured?: boolean | undefined; extra?: Record | undefined; }): ChannelAccountSnapshot; /** * Builds a webhook-mode account snapshot with the standard mode field. */ declare function describeWebhookAccountSnapshot(params: { account: AccountSnapshotInput; configured?: boolean | undefined; mode?: string | undefined; extra?: Record | undefined; }): ChannelAccountSnapshot; //#endregion export { listCombinedAccountIds as a, resolveMergedAccountConfig as c, hasConfiguredAccountValue as i, describeAccountSnapshot as n, mergeAccountConfig as o, describeWebhookAccountSnapshot as r, resolveListedDefaultAccountId as s, createAccountListHelpers as t };