UNPKG

phonic

Version:

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [![npm shield](htt

65 lines (64 loc) 3.59 kB
import { AgentsClient } from "./api/resources/agents/client/Client.mjs"; import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.mjs"; import { AuthClient } from "./api/resources/auth/client/Client.mjs"; import { ConversationItemsClient } from "./api/resources/conversationItems/client/Client.mjs"; import { ConversationsClient } from "./api/resources/conversations/client/Client.mjs"; import { ExtractionSchemasClient } from "./api/resources/extractionSchemas/client/Client.mjs"; import { ProjectsClient } from "./api/resources/projects/client/Client.mjs"; import { ToolsClient } from "./api/resources/tools/client/Client.mjs"; import { TtsClient } from "./api/resources/tts/client/Client.mjs"; import { VoicesClient } from "./api/resources/voices/client/Client.mjs"; import { WorkspaceClient } from "./api/resources/workspace/client/Client.mjs"; import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs"; import * as core from "./core/index.mjs"; 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>; }