import { inspect, InspectOptions } from "util"; import TokenPage, { TokenPaginationPayload } from "../../../base/TokenPage"; import Response from "../../../http/response"; import V3 from "../V3"; import { ApiResponse } from "../../../base/ApiResponse"; export declare class CreateV3TranscriptionsRequest { /** * The ID of the transcription configuration to use */ "transcriptionConfigurationId": string; /** * Discriminator indicating the input source type */ "inputSource"?: string; /** * The SID or TTID of the source audio to transcribe (e.g. a Twilio Recording SID). When provided, audioStartedAt is inferred from the recording\'s start time and does not need to be supplied by the caller. */ "sourceId": string; /** * Participants in the conversation. If omitted or partially specified, defaults from the transcription configuration will be applied. */ "participants"?: Array; /** * URL to the media file to transcribe */ "mediaUrl"?: string; /** * The start time of the audio recording */ "audioStartedAt"?: Date; constructor(payload: any); } export declare class VoiceV3TranscriptionParticipant { /** * The role of this participant in the conversation. */ "type"?: string; /** * The phone number or identifier for this participant (E.164 format for phone numbers). Used to correlate this participant with their profile and conversation history. */ "address"?: string; /** * User-defined name for this participant */ "name"?: string; /** * One-based index of the audio channel in a multi-channel recording */ "audioChannelIndex": number; constructor(payload: any); } export declare class VoiceV3TranscriptionResolvedConfiguration { /** * The engine used for transcription (Deepgram, Google, or auto) */ "transcriptionEngine"?: string; /** * The speech model used for transcription (e.g., nova-2, nova-3, chirp_2) */ "speechModel"?: string; /** * The language code for transcription */ "language"?: string; "transcriptionStatusCallback"?: VoiceV3TranscriptionTranscriptionStatusCallback; /** * Maestro conversation configuration ID */ "conversationConfigurationId"?: string | null; /** * Default participant configurations for the transcription */ "participantDefaults"?: Array; constructor(payload: any); } export declare class VoiceV3TranscriptionResolvedConfigurationParticipantDefaults { /** * One-based index of the audio channel */ "audioChannelIndex": number; /** * The participant role type */ "type": string; constructor(payload: any); } export declare class VoiceV3TranscriptionTranscription { /** * Unique identifier for a Transcription. This is also the transcriptionId returned in the LRO 202 response. */ "id": string; /** * Twilio Account SID */ "accountId": string; /** * The current status of the transcription operation */ "status": string; /** * Unique identifier for a Transcription configuration. */ "transcriptionConfigurationId": string; /** * The third party media URL */ "mediaUrl"?: string | null; /** * The source ID (recording ID) - used for tracking only */ "sourceId"?: string | null; /** * The call/recording start time. When the transcription was created using a sourceId, this value is inferred from the recording resource\'s start time. When created using a mediaUrl, this reflects the value supplied by the caller. */ "audioStartedAt"?: Date; /** * Maestro conversation ID, populated once the transcription has been stored in Maestro. */ "conversationId"?: string | null; /** * Array of participants in the conversation */ "participants"?: Array; /** * Audio duration in seconds */ "duration"?: number | null; "resolvedConfiguration"?: VoiceV3TranscriptionResolvedConfiguration; /** * When this transcript was created */ "createdAt": Date; /** * When this transcript was last updated */ "updatedAt": Date; /** * The URL of this resource */ "url": string; /** * Absolute URLs of resources related to this Transcription. Includes `conversation`, the Conversations API resource for this Transcription\'s `conversationId`, once the transcript has been stored. Omitted entirely when there is no related resource to link to. */ "links"?: Record | null; constructor(payload: any); } export declare class VoiceV3TranscriptionTranscriptionStatusCallback { /** * The URL to call when transcription status changes */ "url"?: string; /** * The HTTP method to use for the callback, currently only POST is supported */ "method"?: string; /** * The transcription events that will trigger the callback */ "events"?: Array | null; constructor(payload: any); } /** * Options to pass to create a TranscriptionInstance */ export interface TranscriptionListInstanceCreateOptions { /** */ createV3TranscriptionsRequest: CreateV3TranscriptionsRequest; /** A unique key to ensure idempotency. We recommend using UUID v7. Requests with the same key within the idempotency window return the original response. */ idempotencyKey?: string; } /** * Options to pass to each */ export interface TranscriptionListInstanceEachOptions { /** Only include transcriptions created at or after this time (inclusive) */ createdAfter?: Date; /** Only include transcriptions created strictly before this time (exclusive) */ createdBefore?: Date; /** Only include transcriptions whose resolved language matches this value exactly. The comparison is case sensitive, so use the stored form, for example en-US. */ languageCode?: string; /** Only include transcriptions for this source audio. Must be a Recording SID in lowercase hex; anything else is rejected with a 400. */ sourceId?: string; /** Only include transcriptions in this status */ status?: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"; /** Number of results per page. This endpoint caps at 100, which is lower than the shared pagination component\'s ceiling and matches what the service enforces. */ pageSize?: number; /** Opaque cursor for retrieving the next or previous page of results */ pageToken?: string; /** Function to process each record. If this and a positional callback are passed, this one will be used */ callback?: (item: TranscriptionInstance, done: (err?: Error) => void) => void; /** Function to be called upon completion of streaming */ done?: Function; /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to list */ export interface TranscriptionListInstanceOptions { /** Only include transcriptions created at or after this time (inclusive) */ createdAfter?: Date; /** Only include transcriptions created strictly before this time (exclusive) */ createdBefore?: Date; /** Only include transcriptions whose resolved language matches this value exactly. The comparison is case sensitive, so use the stored form, for example en-US. */ languageCode?: string; /** Only include transcriptions for this source audio. Must be a Recording SID in lowercase hex; anything else is rejected with a 400. */ sourceId?: string; /** Only include transcriptions in this status */ status?: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"; /** Number of results per page. This endpoint caps at 100, which is lower than the shared pagination component\'s ceiling and matches what the service enforces. */ pageSize?: number; /** Opaque cursor for retrieving the next or previous page of results */ pageToken?: string; /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */ limit?: number; } /** * Options to pass to page */ export interface TranscriptionListInstancePageOptions { /** Only include transcriptions created at or after this time (inclusive) */ createdAfter?: Date; /** Only include transcriptions created strictly before this time (exclusive) */ createdBefore?: Date; /** Only include transcriptions whose resolved language matches this value exactly. The comparison is case sensitive, so use the stored form, for example en-US. */ languageCode?: string; /** Only include transcriptions for this source audio. Must be a Recording SID in lowercase hex; anything else is rejected with a 400. */ sourceId?: string; /** Only include transcriptions in this status */ status?: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"; /** Number of results per page. This endpoint caps at 100, which is lower than the shared pagination component\'s ceiling and matches what the service enforces. */ pageSize?: number; /** Opaque cursor for retrieving the next or previous page of results */ pageToken?: string; } export interface TranscriptionContext { /** * Fetch a TranscriptionInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed TranscriptionInstance */ fetch(callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise; /** * Fetch a TranscriptionInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed TranscriptionInstance with HTTP metadata */ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export interface TranscriptionContextSolution { transcriptionId: string; } export declare class TranscriptionContextImpl implements TranscriptionContext { protected _version: V3; protected _solution: TranscriptionContextSolution; protected _uri: string; constructor(_version: V3, transcriptionId: string); fetch(callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise; fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): TranscriptionContextSolution; [inspect.custom](_depth: any, options: InspectOptions): string; } /** * Nested model for CreateV3TranscriptionsRequest */ export interface CreateV3TranscriptionsRequest { transcriptionConfigurationId: string; inputSource?: string; sourceId: string; participants?: Array; mediaUrl?: string; audioStartedAt?: Date; } /** * Nested model for VoiceV3TranscriptionParticipant */ export interface VoiceV3TranscriptionParticipant { type?: string; address?: string; name?: string; audioChannelIndex: number; } /** * Nested model for VoiceV3TranscriptionResolvedConfiguration */ export interface VoiceV3TranscriptionResolvedConfiguration { transcriptionEngine?: string; speechModel?: string; language?: string; transcriptionStatusCallback?: VoiceV3TranscriptionTranscriptionStatusCallback; conversationConfigurationId?: string | null; participantDefaults?: Array; } /** * Nested model for VoiceV3TranscriptionResolvedConfigurationParticipantDefaults */ export interface VoiceV3TranscriptionResolvedConfigurationParticipantDefaults { audioChannelIndex: number; type: string; } /** * Nested model for VoiceV3TranscriptionTranscription */ export interface VoiceV3TranscriptionTranscription { id: string; accountId: string; status: string; transcriptionConfigurationId: string; mediaUrl?: string | null; sourceId?: string | null; audioStartedAt?: Date; conversationId?: string | null; participants?: Array; duration?: number | null; resolvedConfiguration?: VoiceV3TranscriptionResolvedConfiguration; createdAt: Date; updatedAt: Date; url: string; links?: Record | null; } /** * Nested model for VoiceV3TranscriptionTranscriptionStatusCallback */ export interface VoiceV3TranscriptionTranscriptionStatusCallback { url?: string; method?: string; events?: Array | null; } interface TranscriptionPayload extends TokenPaginationPayload { transcriptions: TranscriptionResource[]; } /** * Response model for VoiceV3TranscriptionLongRunningOperation202Response operations */ interface VoiceV3TranscriptionLongRunningOperation202Response_ResponseResource { status: string; statusUrl: string; transcription: VoiceV3TranscriptionTranscription; } /** * Response model for VoiceV3TranscriptionLongRunningOperationResponse operations */ interface VoiceV3TranscriptionLongRunningOperationResponse_ResponseResource { operationId: string; status: string; statusUrl: string; transcription: VoiceV3TranscriptionTranscription; } /** * Response model for VoiceV3TranscriptionTranscription operations */ interface VoiceV3TranscriptionTranscription_ResponseResource { id: string; accountId: string; status: string; transcriptionConfigurationId: string; mediaUrl?: string; sourceId?: string; audioStartedAt?: Date; conversationId?: string; participants?: Array; duration?: number; resolvedConfiguration?: VoiceV3TranscriptionResolvedConfiguration; createdAt: Date; updatedAt: Date; url: string; links?: Record; } /** * Union type for all possible response models */ type TranscriptionResource = VoiceV3TranscriptionLongRunningOperation202Response_ResponseResource | VoiceV3TranscriptionLongRunningOperationResponse_ResponseResource | VoiceV3TranscriptionTranscription_ResponseResource; /** * Response envelope for long-running operations (202 Accepted pattern). Returned immediately on acceptance and on each status poll. Extensible to allow additional fields in future versions. */ export declare class TranscriptionInstance { protected _version: V3; protected _solution: TranscriptionContextSolution; protected _context?: TranscriptionContext; constructor(_version: V3, _payload: TranscriptionResource, transcriptionId?: string); /** * Current status of the long-running operation. PENDING: accepted but not yet started. RUNNING: currently in progress. COMPLETED: successfully completed. FAILED: failed and cannot be completed. */ status?: string; /** * URI to poll for operation status. Mirrors the Location response header. Provided as a body field for programmatic access by JSON-parsing clients (RFC 9110 Section 15.3.3). */ statusUrl?: string; transcription?: VoiceV3TranscriptionTranscription; /** * Unique identifier for the transcription operation. */ operationId?: string; /** * Unique identifier for a Transcription. This is also the transcriptionId returned in the LRO 202 response. */ id?: string; /** * Twilio Account SID */ accountId?: string; /** * Unique identifier for a Transcription configuration. */ transcriptionConfigurationId?: string; /** * The third party media URL */ mediaUrl?: string; /** * The source ID (recording ID) - used for tracking only */ sourceId?: string; /** * The call/recording start time. When the transcription was created using a sourceId, this value is inferred from the recording resource\'s start time. When created using a mediaUrl, this reflects the value supplied by the caller. */ audioStartedAt?: Date; /** * Maestro conversation ID, populated once the transcription has been stored in Maestro. */ conversationId?: string; /** * Array of participants in the conversation */ participants?: Array; /** * Audio duration in seconds */ duration?: number; resolvedConfiguration?: VoiceV3TranscriptionResolvedConfiguration; /** * When this transcript was created */ createdAt?: Date; /** * When this transcript was last updated */ updatedAt?: Date; /** * The URL of this resource */ url?: string; /** * Absolute URLs of resources related to this Transcription. Includes `conversation`, the Conversations API resource for this Transcription\'s `conversationId`, once the transcript has been stored. Omitted entirely when there is no related resource to link to. */ links?: Record; private get _proxy(); /** * Fetch a TranscriptionInstance * * @param callback - Callback to handle processed record * * @returns Resolves to processed TranscriptionInstance */ fetch(callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise; /** * Fetch a TranscriptionInstance and return HTTP info * * @param callback - Callback to handle processed record * * @returns Resolves to processed TranscriptionInstance with HTTP metadata */ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation * * @returns Object */ toJSON(): { status: string; statusUrl: string; transcription: VoiceV3TranscriptionTranscription; operationId: string; id: string; accountId: string; transcriptionConfigurationId: string; mediaUrl: string; sourceId: string; audioStartedAt: Date; conversationId: string; participants: VoiceV3TranscriptionParticipant[]; duration: number; resolvedConfiguration: VoiceV3TranscriptionResolvedConfiguration; createdAt: Date; updatedAt: Date; url: string; links: Record; }; [inspect.custom](_depth: any, options: InspectOptions): string; } export interface TranscriptionSolution { } export interface TranscriptionListInstance { _version: V3; _solution: TranscriptionSolution; _uri: string; (transcriptionId: string): TranscriptionContext; get(transcriptionId: string): TranscriptionContext; /** * Create a TranscriptionInstance * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed TranscriptionInstance */ create(params: CreateV3TranscriptionsRequest, headers?: any, callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise; /** * Create a TranscriptionInstance and return HTTP info * * @param params - Body for request * @param headers - header params for request * @param callback - Callback to handle processed record * * @returns Resolves to processed TranscriptionInstance with HTTP metadata */ createWithHttpInfo(params: CreateV3TranscriptionsRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse) => any): Promise>; /** * Streams TranscriptionInstance records from the API. * * This operation lazily loads records as efficiently as possible until the limit * is reached. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { TranscriptionListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ each(callback?: (item: TranscriptionInstance, done: (err?: Error) => void) => void): void; each(params: TranscriptionListInstanceEachOptions, callback?: (item: TranscriptionInstance, done: (err?: Error) => void) => void): void; /** * Streams TranscriptionInstance records from the API with HTTP metadata captured per page. * * This operation lazily loads records as efficiently as possible until the limit * is reached. HTTP metadata (status code, headers) is captured for each page request. * * The results are passed into the callback function, so this operation is memory * efficient. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { TranscriptionListInstanceEachOptions } [params] - Options for request * @param { function } [callback] - Function to process each record */ eachWithHttpInfo(callback?: (item: TranscriptionInstance, done: (err?: Error) => void) => void): void; eachWithHttpInfo(params: TranscriptionListInstanceEachOptions, callback?: (item: TranscriptionInstance, done: (err?: Error) => void) => void): void; /** * Retrieve a single target page of TranscriptionInstance records from the API. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records */ getPage(targetUrl: string, callback?: (error: Error | null, items: TranscriptionPage) => any): Promise; /** * Retrieve a single target page of TranscriptionInstance records from the API with HTTP metadata. * * The request is executed immediately. * * @param { string } [targetUrl] - API-generated URL for the requested results page * @param { function } [callback] - Callback to handle list of records with metadata */ getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Lists TranscriptionInstance records from the API as a list. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { TranscriptionListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ list(callback?: (error: Error | null, items: TranscriptionInstance[]) => any): Promise; list(params: TranscriptionListInstanceOptions, callback?: (error: Error | null, items: TranscriptionInstance[]) => any): Promise; /** * Lists TranscriptionInstance records from the API as a list with HTTP metadata. * * Returns all records along with HTTP metadata from the first page fetched. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { TranscriptionListInstanceOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; listWithHttpInfo(params: TranscriptionListInstanceOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Retrieve a single page of TranscriptionInstance records from the API. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { TranscriptionListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records */ page(callback?: (error: Error | null, items: TranscriptionPage) => any): Promise; page(params: TranscriptionListInstancePageOptions, callback?: (error: Error | null, items: TranscriptionPage) => any): Promise; /** * Retrieve a single page of TranscriptionInstance records from the API with HTTP metadata. * * The request is executed immediately. * * If a function is passed as the first argument, it will be used as the callback * function. * * @param { TranscriptionListInstancePageOptions } [params] - Options for request * @param { function } [callback] - Callback to handle list of records with metadata */ pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse) => any): Promise>; pageWithHttpInfo(params: TranscriptionListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse) => any): Promise>; /** * Provide a user-friendly representation */ toJSON(): any; [inspect.custom](_depth: any, options: InspectOptions): any; } export declare function TranscriptionListInstance(version: V3): TranscriptionListInstance; export declare class TranscriptionPage extends TokenPage { /** * Initialize the TranscriptionPage * * @param version - Version of the resource * @param response - Response from the API * @param uri - URI of the resource * @param params - Query parameters * @param solution - Path solution */ constructor(version: V3, response: Response, uri: string, params: any, solution: TranscriptionSolution); /** * Build an instance of TranscriptionInstance * * @param payload - Payload response from the API */ getInstance(payload: TranscriptionResource): TranscriptionInstance; [inspect.custom](depth: any, options: InspectOptions): string; } export {};