import { APIResource } from "../../core/resource.js"; import * as Shared from "../shared.js"; import * as ContactsAPI from "./contacts.js"; import { BaseContacts, ContactListParams, ContactSearchParams, ContactSearchResponse, Contacts } from "./contacts.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Manage connected chat accounts */ export declare class BaseAccounts extends APIResource { static readonly _key: readonly ['accounts']; /** * Get one chat account connected to this Beeper Client API server. * * @example * ```ts * const account = await client.accounts.retrieve('accountID'); * ``` */ retrieve(accountID: string, options?: RequestOptions): APIPromise; /** * List chat accounts connected to this Beeper Client API server, including bridge, * network, user identity, and connection status. * * @example * ```ts * const accounts = await client.accounts.list(); * ``` */ list(options?: RequestOptions): APIPromise; } /** * Manage connected chat accounts */ export declare class Accounts extends BaseAccounts { contacts: ContactsAPI.Contacts; } /** * A chat account added to Beeper. */ export interface Account { /** * Chat account added to Beeper. Use this to route account-scoped actions. Examples * include matrix for Beeper/Matrix, discordgo for a cloud bridge, * slackgo.TEAM-USER for workspace-scoped cloud bridges, and local-whatsapp*ba*... * for local bridges. */ accountID: string; /** * Bridge metadata for the account. Available in Beeper Desktop v4.2.785+. */ bridge: AccountBridge; /** * Current connection status for this account. */ status: 'connected' | 'connecting' | 'backfilling' | 'connection_required' | 'reconnect_required' | 'attention_required' | 'disconnected' | 'disabled'; /** * User the account belongs to. */ user: Shared.User; /** * Runtime chat/message capabilities for this connected account, when available. */ capabilities?: { [key: string]: unknown; }; /** * Bridge login ID for this account, when known. One bridge login can contain * multiple chat accounts. */ loginID?: string; /** * Human-friendly network name for the account. Omitted when the network is * unknown. */ network?: string; /** * Human-friendly account status text. */ statusText?: string; } /** * Bridge metadata for the account. Available in Beeper Desktop v4.2.785+. */ export interface AccountBridge { /** * Bridge identifier. Beeper Cloud accounts often use the network type (for example * matrix or discordgo); on-device accounts use a local bridge ID (for example * local-whatsapp). Available in Beeper Desktop v4.2.785+. */ id: string; /** * Where this account runs: on this device or in Beeper Cloud. Available in Beeper * Desktop v4.2.785+. */ provider: 'cloud' | 'self-hosted' | 'local' | 'platform-sdk'; /** * Bridge type, such as matrix, discordgo, slackgo, whatsapp, telegram, or twitter. * Available in Beeper Desktop v4.2.785+. */ type: string; } /** * A chat account added to Beeper. */ export interface AccountRetrieveResponse { /** * Chat account added to Beeper. Use this to route account-scoped actions. Examples * include matrix for Beeper/Matrix, discordgo for a cloud bridge, * slackgo.TEAM-USER for workspace-scoped cloud bridges, and local-whatsapp*ba*... * for local bridges. */ accountID: string; /** * Bridge metadata for the account. Available in Beeper Desktop v4.2.785+. */ bridge: AccountBridge; /** * Current connection status for this account. */ status: 'connected' | 'connecting' | 'backfilling' | 'connection_required' | 'reconnect_required' | 'attention_required' | 'disconnected' | 'disabled'; /** * User the account belongs to. */ user: Shared.User; /** * Runtime chat/message capabilities for this connected account, when available. */ capabilities?: { [key: string]: unknown; }; /** * Bridge login ID for this account, when known. One bridge login can contain * multiple chat accounts. */ loginID?: string; /** * Human-friendly network name for the account. Omitted when the network is * unknown. */ network?: string; /** * Human-friendly account status text. */ statusText?: string; } /** * Chat accounts configured on this device. Includes accountID, bridge metadata, * optional network name, and user identity. */ export type AccountListResponse = Array; export declare namespace Accounts { export { type Account as Account, type AccountBridge as AccountBridge, type AccountRetrieveResponse as AccountRetrieveResponse, type AccountListResponse as AccountListResponse, }; export { Contacts as Contacts, BaseContacts as BaseContacts, type ContactSearchResponse as ContactSearchResponse, type ContactListParams as ContactListParams, type ContactSearchParams as ContactSearchParams, }; } //# sourceMappingURL=accounts.d.ts.map