phonic
Version:
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [ • 3.57 kB
TypeScript
import { AgentsClient } from "./api/resources/agents/client/Client.js";
import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
import { AuthClient } from "./api/resources/auth/client/Client.js";
import { ConversationItemsClient } from "./api/resources/conversationItems/client/Client.js";
import { ConversationsClient } from "./api/resources/conversations/client/Client.js";
import { ExtractionSchemasClient } from "./api/resources/extractionSchemas/client/Client.js";
import { ProjectsClient } from "./api/resources/projects/client/Client.js";
import { ToolsClient } from "./api/resources/tools/client/Client.js";
import { TtsClient } from "./api/resources/tts/client/Client.js";
import { VoicesClient } from "./api/resources/voices/client/Client.js";
import { WorkspaceClient } from "./api/resources/workspace/client/Client.js";
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
import * as core from "./core/index.js";
export declare namespace PhonicClient {
type Options = BaseClientOptions & {
/**
* When `true`, conversation WebSockets automatically reconnect after an
* abnormal disconnect (WebSocket close code 1006) using `reconnect_conv_id`.
* Defaults to `false` until the behavior is broadly validated in production;
* set to `true` to opt in early.
*/
reconnectConversationOnAbnormalDisconnect?: boolean;
};
interface RequestOptions extends BaseRequestOptions {
}
}
export declare class PhonicClient {
protected readonly _options: NormalizedClientOptionsWithAuth<PhonicClient.Options>;
protected _agents: AgentsClient | undefined;
protected _apiKeys: ApiKeysClient | undefined;
protected _tools: ToolsClient | undefined;
protected _extractionSchemas: ExtractionSchemasClient | undefined;
protected _tts: TtsClient | undefined;
protected _voices: VoicesClient | undefined;
protected _conversations: ConversationsClient | undefined;
protected _conversationItems: ConversationItemsClient | undefined;
protected _auth: AuthClient | undefined;
protected _projects: ProjectsClient | undefined;
protected _workspace: WorkspaceClient | undefined;
constructor(options?: PhonicClient.Options);
get agents(): AgentsClient;
get apiKeys(): ApiKeysClient;
get tools(): ToolsClient;
get extractionSchemas(): ExtractionSchemasClient;
get tts(): TtsClient;
get voices(): VoicesClient;
get conversations(): ConversationsClient;
get conversationItems(): ConversationItemsClient;
get auth(): AuthClient;
get projects(): ProjectsClient;
get workspace(): WorkspaceClient;
/**
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
* This is useful for making requests to endpoints not yet supported in the SDK.
* The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
*
* @param {Request | string | URL} input - The URL, path, or Request object.
* @param {RequestInit} init - Standard fetch RequestInit options.
* @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
* @returns {Promise<Response>} A standard Response object.
*/
fetch(input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions): Promise<Response>;
}