diff --git a/.fern/metadata.json b/.fern/metadata.json index 72e5ce8b..2979a3bd 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,5 +1,5 @@ { - "cliVersion": "4.86.1", + "cliVersion": "5.17.0", "generatorName": "fernapi/fern-typescript-node-sdk", "generatorVersion": "3.54.0", "generatorConfig": { @@ -15,7 +15,9 @@ }, "packageJson": { "scripts": { - "test:integration": "vitest --config vitest.integration.config.mts" + "test:integration": "pnpm test:integration:main && pnpm test:integration:empty-state", + "test:integration:main": "vitest run --config vitest.integration.config.mts --project integration", + "test:integration:empty-state": "vitest run --config vitest.integration.config.mts --project integration-empty-state" }, "exports": { "./utils": { @@ -32,6 +34,6 @@ } } }, - "originGitCommit": "23bce53307f0836f2dcd50e82ef0aba136e7ec2f", + "originGitCommit": "1f12feddb4e52d5d77f67aa2f37c22a4d357a59a", "sdkVersion": "0.0.0-dev" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index afca55cf..5ee8b97c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: ws: specifier: ^8.16.0 - version: 8.20.0 + version: 8.20.1 devDependencies: '@biomejs/biome': specifier: 2.4.3 @@ -1146,8 +1146,8 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} - ws@8.20.0: - resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} + ws@8.20.1: + resolution: {integrity: sha512-It4dO0K5v//JtTXuPkfEOaI3uUN87iYPnqo/ZzqCoG3g8uhA66QUMs/SrM0YK7/NAu+r4LMh/9dq2A7k+rHs+w==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -2163,7 +2163,7 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 - ws@8.20.0: {} + ws@8.20.1: {} y18n@5.0.8: {} diff --git a/src/api/resources/stream/client/Socket.ts b/src/api/resources/stream/client/Socket.ts index 3a343680..6b76c77d 100644 --- a/src/api/resources/stream/client/Socket.ts +++ b/src/api/resources/stream/client/Socket.ts @@ -21,7 +21,8 @@ export declare namespace StreamSocket { | Corti.StreamEndedMessage | Corti.StreamUsageMessage | Corti.StreamErrorMessage - | Corti.StreamConfigStatusMessage; + | Corti.StreamConfigStatusMessage + | Corti.StreamAudioEventMessage; type EventHandlers = { open?: () => void; message?: (message: Response) => void; diff --git a/src/api/resources/transcribe/client/Socket.ts b/src/api/resources/transcribe/client/Socket.ts index 21d26868..51510d87 100644 --- a/src/api/resources/transcribe/client/Socket.ts +++ b/src/api/resources/transcribe/client/Socket.ts @@ -21,7 +21,8 @@ export declare namespace TranscribeSocket { | Corti.TranscribeErrorMessage | Corti.TranscribeTranscriptMessage | Corti.TranscribeCommandMessage - | Corti.TranscribeConfigStatusMessage; + | Corti.TranscribeConfigStatusMessage + | Corti.TranscribeAudioEventMessage; type EventHandlers = { open?: () => void; message?: (message: Response) => void; diff --git a/src/api/types/AgentsCreateExpertReference.ts b/src/api/types/AgentsCreateExpertReference.ts index 733a6184..faa939f2 100644 --- a/src/api/types/AgentsCreateExpertReference.ts +++ b/src/api/types/AgentsCreateExpertReference.ts @@ -13,4 +13,6 @@ export interface AgentsCreateExpertReference { name?: string; /** Optional. Additional system instructions appended to the default system prompt when creating an expert from the registry, extending the expert's behavior. */ systemPrompt?: string; + /** Optional configuration override for the registry expert. Values provided here are deep-merged with the schema defaults declared on the registry expert and validated against its `configSchema`. Ignored when the registry expert has no schema. */ + config?: Record; } diff --git a/src/api/types/AgentsExpertReference.ts b/src/api/types/AgentsExpertReference.ts index c5d5dd72..09c21b14 100644 --- a/src/api/types/AgentsExpertReference.ts +++ b/src/api/types/AgentsExpertReference.ts @@ -13,4 +13,6 @@ export interface AgentsExpertReference { name: string; /** Optional. Additional system instructions appended to the default system prompt when creating an expert from the registry, extending the expert's behavior. */ systemPrompt?: string; + /** The fully resolved configuration for this expert: schema defaults from the registry expert deep-merged with any `config` override supplied at creation. Present only when the source registry expert defined a `configSchema`. */ + resolvedConfig?: Record; } diff --git a/src/api/types/AgentsRegistryExpert.ts b/src/api/types/AgentsRegistryExpert.ts index ef98affa..6bb800f1 100644 --- a/src/api/types/AgentsRegistryExpert.ts +++ b/src/api/types/AgentsRegistryExpert.ts @@ -13,4 +13,6 @@ export interface AgentsRegistryExpert { description: string; /** A list of MCP servers the expert can call, including their authorization types. */ mcpServers?: Corti.AgentsRegistryMcpServer[]; + /** Optional JSON Schema describing the configuration this expert accepts. When present, callers may supply a matching `config` object on `AgentsCreateExpertReference`; values are deep-merged with schema defaults and validated against this schema. */ + configSchema?: Record; } diff --git a/src/api/types/StreamAudioEventData.ts b/src/api/types/StreamAudioEventData.ts new file mode 100644 index 00000000..48a14aa8 --- /dev/null +++ b/src/api/types/StreamAudioEventData.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../index.js"; + +export interface StreamAudioEventData { + /** The type of audio quality or speech activity event */ + event: Corti.StreamAudioEventDataEvent; + /** Audio channel identifier */ + channel: number; + /** Start time of the event in milliseconds */ + startTimeMs: number; +} diff --git a/src/api/types/StreamAudioEventDataEvent.ts b/src/api/types/StreamAudioEventDataEvent.ts new file mode 100644 index 00000000..36eae668 --- /dev/null +++ b/src/api/types/StreamAudioEventDataEvent.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of audio quality or speech activity event */ +export const StreamAudioEventDataEvent = { + SpeechQualityIssueDetected: "speechQualityIssueDetected", + SpeechQualityIssueRecovered: "speechQualityIssueRecovered", + LongSilenceDetected: "longSilenceDetected", + LongSilenceRecovered: "longSilenceRecovered", +} as const; +export type StreamAudioEventDataEvent = (typeof StreamAudioEventDataEvent)[keyof typeof StreamAudioEventDataEvent]; diff --git a/src/api/types/StreamAudioEventMessage.ts b/src/api/types/StreamAudioEventMessage.ts new file mode 100644 index 00000000..82d12a64 --- /dev/null +++ b/src/api/types/StreamAudioEventMessage.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../index.js"; + +export interface StreamAudioEventMessage { + type: "audioEvent"; + data: Corti.StreamAudioEventData; +} diff --git a/src/api/types/StreamAudioEventsConfig.ts b/src/api/types/StreamAudioEventsConfig.ts new file mode 100644 index 00000000..db971c8f --- /dev/null +++ b/src/api/types/StreamAudioEventsConfig.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface StreamAudioEventsConfig { + /** When true, enables audio quality and speech activity events to be sent over the WebSocket. Disabled by default. */ + enabled?: boolean; +} diff --git a/src/api/types/StreamConfig.ts b/src/api/types/StreamConfig.ts index 590dc285..6c8ceeed 100644 --- a/src/api/types/StreamConfig.ts +++ b/src/api/types/StreamConfig.ts @@ -7,6 +7,7 @@ export interface StreamConfig { mode: Corti.StreamConfigMode; /** Optional parameter to specify data retention policy for the generated transcripts and facts. Use value 'none' to indicate data should not be stored in the database. Use value 'retain' to indicate that the data should be retained according to standard retention policies. If configuration is not provided, then the default retention policy will apply. */ retentionPolicy?: Corti.StreamConfigRetentionPolicy; + audioEvents?: Corti.StreamAudioEventsConfig; /** The audio format of the incoming audio stream */ audioFormat?: string; } diff --git a/src/api/types/StreamConfigMode.ts b/src/api/types/StreamConfigMode.ts index 5ec39b72..50c85cbb 100644 --- a/src/api/types/StreamConfigMode.ts +++ b/src/api/types/StreamConfigMode.ts @@ -7,4 +7,6 @@ export interface StreamConfigMode { type: Corti.StreamConfigModeType; /** Output language locale specific to facts. */ outputLocale?: Corti.StreamSupportedLanguage; + /** Rate at which fact generation should process and return results. If no value is set, the default is `fixed` and will trigger fact generation at the standard interval of around 60s. With `fast_init`, fact generation will follow a logarithmic curve. */ + factGenerationInterval?: Corti.StreamConfigModeFactGenerationInterval; } diff --git a/src/api/types/StreamConfigModeFactGenerationInterval.ts b/src/api/types/StreamConfigModeFactGenerationInterval.ts new file mode 100644 index 00000000..1705cf81 --- /dev/null +++ b/src/api/types/StreamConfigModeFactGenerationInterval.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Rate at which fact generation should process and return results. If no value is set, the default is `fixed` and will trigger fact generation at the standard interval of around 60s. With `fast_init`, fact generation will follow a logarithmic curve. */ +export const StreamConfigModeFactGenerationInterval = { + Fixed: "fixed", + FastInit: "fast_init", +} as const; +export type StreamConfigModeFactGenerationInterval = + (typeof StreamConfigModeFactGenerationInterval)[keyof typeof StreamConfigModeFactGenerationInterval]; diff --git a/src/api/types/TranscribeAudioEventData.ts b/src/api/types/TranscribeAudioEventData.ts new file mode 100644 index 00000000..dd992404 --- /dev/null +++ b/src/api/types/TranscribeAudioEventData.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../index.js"; + +export interface TranscribeAudioEventData { + /** The type of audio quality or speech activity event */ + event: Corti.TranscribeAudioEventDataEvent; + /** Audio channel identifier */ + channel: number; + /** Start time of the event in milliseconds */ + startTimeMs: number; +} diff --git a/src/api/types/TranscribeAudioEventDataEvent.ts b/src/api/types/TranscribeAudioEventDataEvent.ts new file mode 100644 index 00000000..7fe8a279 --- /dev/null +++ b/src/api/types/TranscribeAudioEventDataEvent.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The type of audio quality or speech activity event */ +export const TranscribeAudioEventDataEvent = { + SpeechQualityIssueDetected: "speechQualityIssueDetected", + SpeechQualityIssueRecovered: "speechQualityIssueRecovered", + LongSilenceDetected: "longSilenceDetected", + LongSilenceRecovered: "longSilenceRecovered", +} as const; +export type TranscribeAudioEventDataEvent = + (typeof TranscribeAudioEventDataEvent)[keyof typeof TranscribeAudioEventDataEvent]; diff --git a/src/api/types/TranscribeAudioEventMessage.ts b/src/api/types/TranscribeAudioEventMessage.ts new file mode 100644 index 00000000..f7f69f06 --- /dev/null +++ b/src/api/types/TranscribeAudioEventMessage.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../index.js"; + +export interface TranscribeAudioEventMessage { + type: "audioEvent"; + data: Corti.TranscribeAudioEventData; +} diff --git a/src/api/types/TranscribeAudioEventsConfig.ts b/src/api/types/TranscribeAudioEventsConfig.ts new file mode 100644 index 00000000..c6802e7a --- /dev/null +++ b/src/api/types/TranscribeAudioEventsConfig.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface TranscribeAudioEventsConfig { + /** When true, enables audio quality and speech activity events to be sent over the WebSocket. Disabled by default. */ + enabled?: boolean; +} diff --git a/src/api/types/TranscribeConfig.ts b/src/api/types/TranscribeConfig.ts index e651492f..0cb6beea 100644 --- a/src/api/types/TranscribeConfig.ts +++ b/src/api/types/TranscribeConfig.ts @@ -14,6 +14,7 @@ export interface TranscribeConfig { /** Commands that should be registered and detected */ commands?: Corti.TranscribeCommand[]; formatting?: Corti.TranscribeFormatting; + audioEvents?: Corti.TranscribeAudioEventsConfig; /** The audio format of the incoming audio stream */ audioFormat?: string; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 66b9b853..ca66a9bd 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -127,9 +127,14 @@ export * from "./InteractionsPatient.js"; export * from "./OAuthTokenRequest.js"; export * from "./RecordingsCreateResponse.js"; export * from "./RecordingsListResponse.js"; +export * from "./StreamAudioEventData.js"; +export * from "./StreamAudioEventDataEvent.js"; +export * from "./StreamAudioEventMessage.js"; +export * from "./StreamAudioEventsConfig.js"; export * from "./StreamConfig.js"; export * from "./StreamConfigMessage.js"; export * from "./StreamConfigMode.js"; +export * from "./StreamConfigModeFactGenerationInterval.js"; export * from "./StreamConfigModeType.js"; export * from "./StreamConfigParticipant.js"; export * from "./StreamConfigParticipantRole.js"; @@ -162,6 +167,10 @@ export * from "./TemplatesSectionSorted.js"; export * from "./TemplatesSectionTranslation.js"; export * from "./TemplatesTranslation.js"; export * from "./TemplatesWritingStyle.js"; +export * from "./TranscribeAudioEventData.js"; +export * from "./TranscribeAudioEventDataEvent.js"; +export * from "./TranscribeAudioEventMessage.js"; +export * from "./TranscribeAudioEventsConfig.js"; export * from "./TranscribeCommand.js"; export * from "./TranscribeCommandData.js"; export * from "./TranscribeCommandMessage.js"; diff --git a/src/serialization/resources/stream/client/socket/StreamSocketResponse.ts b/src/serialization/resources/stream/client/socket/StreamSocketResponse.ts index 6a4bb9a0..a93b5a70 100644 --- a/src/serialization/resources/stream/client/socket/StreamSocketResponse.ts +++ b/src/serialization/resources/stream/client/socket/StreamSocketResponse.ts @@ -3,6 +3,7 @@ import type * as Corti from "../../../../../api/index.js"; import * as core from "../../../../../core/index.js"; import type * as serializers from "../../../../index.js"; +import { StreamAudioEventMessage } from "../../../../types/StreamAudioEventMessage.js"; import { StreamConfigStatusMessage } from "../../../../types/StreamConfigStatusMessage.js"; import { StreamDeltaUsageMessage } from "../../../../types/StreamDeltaUsageMessage.js"; import { StreamEndedMessage } from "../../../../types/StreamEndedMessage.js"; @@ -22,6 +23,7 @@ export const StreamSocketResponse: core.serialization.Schema< | Corti.StreamUsageMessage | Corti.StreamErrorMessage | Corti.StreamConfigStatusMessage + | Corti.StreamAudioEventMessage > = core.serialization.undiscriminatedUnion([ StreamTranscriptMessage, StreamFactsMessage, @@ -31,6 +33,7 @@ export const StreamSocketResponse: core.serialization.Schema< StreamUsageMessage, StreamErrorMessage, StreamConfigStatusMessage, + StreamAudioEventMessage, ]); export declare namespace StreamSocketResponse { @@ -42,5 +45,6 @@ export declare namespace StreamSocketResponse { | StreamEndedMessage.Raw | StreamUsageMessage.Raw | StreamErrorMessage.Raw - | StreamConfigStatusMessage.Raw; + | StreamConfigStatusMessage.Raw + | StreamAudioEventMessage.Raw; } diff --git a/src/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.ts b/src/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.ts index 32c21517..c530f75a 100644 --- a/src/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.ts +++ b/src/serialization/resources/transcribe/client/socket/TranscribeSocketResponse.ts @@ -3,6 +3,7 @@ import type * as Corti from "../../../../../api/index.js"; import * as core from "../../../../../core/index.js"; import type * as serializers from "../../../../index.js"; +import { TranscribeAudioEventMessage } from "../../../../types/TranscribeAudioEventMessage.js"; import { TranscribeCommandMessage } from "../../../../types/TranscribeCommandMessage.js"; import { TranscribeConfigStatusMessage } from "../../../../types/TranscribeConfigStatusMessage.js"; import { TranscribeDeltaUsageMessage } from "../../../../types/TranscribeDeltaUsageMessage.js"; @@ -22,6 +23,7 @@ export const TranscribeSocketResponse: core.serialization.Schema< | Corti.TranscribeTranscriptMessage | Corti.TranscribeCommandMessage | Corti.TranscribeConfigStatusMessage + | Corti.TranscribeAudioEventMessage > = core.serialization.undiscriminatedUnion([ TranscribeUsageMessage, TranscribeFlushedMessage, @@ -31,6 +33,7 @@ export const TranscribeSocketResponse: core.serialization.Schema< TranscribeTranscriptMessage, TranscribeCommandMessage, TranscribeConfigStatusMessage, + TranscribeAudioEventMessage, ]); export declare namespace TranscribeSocketResponse { @@ -42,5 +45,6 @@ export declare namespace TranscribeSocketResponse { | TranscribeErrorMessage.Raw | TranscribeTranscriptMessage.Raw | TranscribeCommandMessage.Raw - | TranscribeConfigStatusMessage.Raw; + | TranscribeConfigStatusMessage.Raw + | TranscribeAudioEventMessage.Raw; } diff --git a/src/serialization/types/AgentsCreateExpertReference.ts b/src/serialization/types/AgentsCreateExpertReference.ts index 535bdd16..db40af90 100644 --- a/src/serialization/types/AgentsCreateExpertReference.ts +++ b/src/serialization/types/AgentsCreateExpertReference.ts @@ -13,6 +13,7 @@ export const AgentsCreateExpertReference: core.serialization.ObjectSchema< id: core.serialization.string().optional(), name: core.serialization.string().optional(), systemPrompt: core.serialization.string().optional(), + config: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace AgentsCreateExpertReference { @@ -21,5 +22,6 @@ export declare namespace AgentsCreateExpertReference { id?: string | null; name?: string | null; systemPrompt?: string | null; + config?: Record | null; } } diff --git a/src/serialization/types/AgentsExpertReference.ts b/src/serialization/types/AgentsExpertReference.ts index 1dbdbf71..00a6167b 100644 --- a/src/serialization/types/AgentsExpertReference.ts +++ b/src/serialization/types/AgentsExpertReference.ts @@ -13,6 +13,7 @@ export const AgentsExpertReference: core.serialization.ObjectSchema< id: core.serialization.string(), name: core.serialization.string(), systemPrompt: core.serialization.string().optional(), + resolvedConfig: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace AgentsExpertReference { @@ -21,5 +22,6 @@ export declare namespace AgentsExpertReference { id: string; name: string; systemPrompt?: string | null; + resolvedConfig?: Record | null; } } diff --git a/src/serialization/types/AgentsRegistryExpert.ts b/src/serialization/types/AgentsRegistryExpert.ts index c29b3a23..674c9ced 100644 --- a/src/serialization/types/AgentsRegistryExpert.ts +++ b/src/serialization/types/AgentsRegistryExpert.ts @@ -14,6 +14,7 @@ export const AgentsRegistryExpert: core.serialization.ObjectSchema< displayDescription: core.serialization.string().optional(), description: core.serialization.string(), mcpServers: core.serialization.list(AgentsRegistryMcpServer).optional(), + configSchema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), }); export declare namespace AgentsRegistryExpert { @@ -23,5 +24,6 @@ export declare namespace AgentsRegistryExpert { displayDescription?: string | null; description: string; mcpServers?: AgentsRegistryMcpServer.Raw[] | null; + configSchema?: Record | null; } } diff --git a/src/serialization/types/StreamAudioEventData.ts b/src/serialization/types/StreamAudioEventData.ts new file mode 100644 index 00000000..debeecc7 --- /dev/null +++ b/src/serialization/types/StreamAudioEventData.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { StreamAudioEventDataEvent } from "./StreamAudioEventDataEvent.js"; + +export const StreamAudioEventData: core.serialization.ObjectSchema< + serializers.StreamAudioEventData.Raw, + Corti.StreamAudioEventData +> = core.serialization.object({ + event: StreamAudioEventDataEvent, + channel: core.serialization.number(), + startTimeMs: core.serialization.number(), +}); + +export declare namespace StreamAudioEventData { + export interface Raw { + event: StreamAudioEventDataEvent.Raw; + channel: number; + startTimeMs: number; + } +} diff --git a/src/serialization/types/StreamAudioEventDataEvent.ts b/src/serialization/types/StreamAudioEventDataEvent.ts new file mode 100644 index 00000000..b6fbbe55 --- /dev/null +++ b/src/serialization/types/StreamAudioEventDataEvent.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const StreamAudioEventDataEvent: core.serialization.Schema< + serializers.StreamAudioEventDataEvent.Raw, + Corti.StreamAudioEventDataEvent +> = core.serialization.enum_([ + "speechQualityIssueDetected", + "speechQualityIssueRecovered", + "longSilenceDetected", + "longSilenceRecovered", +]); + +export declare namespace StreamAudioEventDataEvent { + export type Raw = + | "speechQualityIssueDetected" + | "speechQualityIssueRecovered" + | "longSilenceDetected" + | "longSilenceRecovered"; +} diff --git a/src/serialization/types/StreamAudioEventMessage.ts b/src/serialization/types/StreamAudioEventMessage.ts new file mode 100644 index 00000000..48a44161 --- /dev/null +++ b/src/serialization/types/StreamAudioEventMessage.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { StreamAudioEventData } from "./StreamAudioEventData.js"; + +export const StreamAudioEventMessage: core.serialization.ObjectSchema< + serializers.StreamAudioEventMessage.Raw, + Corti.StreamAudioEventMessage +> = core.serialization.object({ + type: core.serialization.stringLiteral("audioEvent"), + data: StreamAudioEventData, +}); + +export declare namespace StreamAudioEventMessage { + export interface Raw { + type: "audioEvent"; + data: StreamAudioEventData.Raw; + } +} diff --git a/src/serialization/types/StreamAudioEventsConfig.ts b/src/serialization/types/StreamAudioEventsConfig.ts new file mode 100644 index 00000000..60c48234 --- /dev/null +++ b/src/serialization/types/StreamAudioEventsConfig.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const StreamAudioEventsConfig: core.serialization.ObjectSchema< + serializers.StreamAudioEventsConfig.Raw, + Corti.StreamAudioEventsConfig +> = core.serialization.object({ + enabled: core.serialization.boolean().optional(), +}); + +export declare namespace StreamAudioEventsConfig { + export interface Raw { + enabled?: boolean | null; + } +} diff --git a/src/serialization/types/StreamConfig.ts b/src/serialization/types/StreamConfig.ts index c01d12f1..e9c3b762 100644 --- a/src/serialization/types/StreamConfig.ts +++ b/src/serialization/types/StreamConfig.ts @@ -3,6 +3,7 @@ import type * as Corti from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; +import { StreamAudioEventsConfig } from "./StreamAudioEventsConfig.js"; import { StreamConfigMode } from "./StreamConfigMode.js"; import { StreamConfigRetentionPolicy } from "./StreamConfigRetentionPolicy.js"; import { StreamConfigTranscription } from "./StreamConfigTranscription.js"; @@ -12,6 +13,7 @@ export const StreamConfig: core.serialization.ObjectSchema = core.serialization.object({ type: StreamConfigModeType, outputLocale: StreamSupportedLanguage.optional(), + factGenerationInterval: StreamConfigModeFactGenerationInterval.optional(), }); export declare namespace StreamConfigMode { export interface Raw { type: StreamConfigModeType.Raw; outputLocale?: StreamSupportedLanguage.Raw | null; + factGenerationInterval?: StreamConfigModeFactGenerationInterval.Raw | null; } } diff --git a/src/serialization/types/StreamConfigModeFactGenerationInterval.ts b/src/serialization/types/StreamConfigModeFactGenerationInterval.ts new file mode 100644 index 00000000..01a0ccef --- /dev/null +++ b/src/serialization/types/StreamConfigModeFactGenerationInterval.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const StreamConfigModeFactGenerationInterval: core.serialization.Schema< + serializers.StreamConfigModeFactGenerationInterval.Raw, + Corti.StreamConfigModeFactGenerationInterval +> = core.serialization.enum_(["fixed", "fast_init"]); + +export declare namespace StreamConfigModeFactGenerationInterval { + export type Raw = "fixed" | "fast_init"; +} diff --git a/src/serialization/types/TranscribeAudioEventData.ts b/src/serialization/types/TranscribeAudioEventData.ts new file mode 100644 index 00000000..400347a2 --- /dev/null +++ b/src/serialization/types/TranscribeAudioEventData.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { TranscribeAudioEventDataEvent } from "./TranscribeAudioEventDataEvent.js"; + +export const TranscribeAudioEventData: core.serialization.ObjectSchema< + serializers.TranscribeAudioEventData.Raw, + Corti.TranscribeAudioEventData +> = core.serialization.object({ + event: TranscribeAudioEventDataEvent, + channel: core.serialization.number(), + startTimeMs: core.serialization.number(), +}); + +export declare namespace TranscribeAudioEventData { + export interface Raw { + event: TranscribeAudioEventDataEvent.Raw; + channel: number; + startTimeMs: number; + } +} diff --git a/src/serialization/types/TranscribeAudioEventDataEvent.ts b/src/serialization/types/TranscribeAudioEventDataEvent.ts new file mode 100644 index 00000000..4d27ca09 --- /dev/null +++ b/src/serialization/types/TranscribeAudioEventDataEvent.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const TranscribeAudioEventDataEvent: core.serialization.Schema< + serializers.TranscribeAudioEventDataEvent.Raw, + Corti.TranscribeAudioEventDataEvent +> = core.serialization.enum_([ + "speechQualityIssueDetected", + "speechQualityIssueRecovered", + "longSilenceDetected", + "longSilenceRecovered", +]); + +export declare namespace TranscribeAudioEventDataEvent { + export type Raw = + | "speechQualityIssueDetected" + | "speechQualityIssueRecovered" + | "longSilenceDetected" + | "longSilenceRecovered"; +} diff --git a/src/serialization/types/TranscribeAudioEventMessage.ts b/src/serialization/types/TranscribeAudioEventMessage.ts new file mode 100644 index 00000000..17efdee7 --- /dev/null +++ b/src/serialization/types/TranscribeAudioEventMessage.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; +import { TranscribeAudioEventData } from "./TranscribeAudioEventData.js"; + +export const TranscribeAudioEventMessage: core.serialization.ObjectSchema< + serializers.TranscribeAudioEventMessage.Raw, + Corti.TranscribeAudioEventMessage +> = core.serialization.object({ + type: core.serialization.stringLiteral("audioEvent"), + data: TranscribeAudioEventData, +}); + +export declare namespace TranscribeAudioEventMessage { + export interface Raw { + type: "audioEvent"; + data: TranscribeAudioEventData.Raw; + } +} diff --git a/src/serialization/types/TranscribeAudioEventsConfig.ts b/src/serialization/types/TranscribeAudioEventsConfig.ts new file mode 100644 index 00000000..bd2e793a --- /dev/null +++ b/src/serialization/types/TranscribeAudioEventsConfig.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Corti from "../../api/index.js"; +import * as core from "../../core/index.js"; +import type * as serializers from "../index.js"; + +export const TranscribeAudioEventsConfig: core.serialization.ObjectSchema< + serializers.TranscribeAudioEventsConfig.Raw, + Corti.TranscribeAudioEventsConfig +> = core.serialization.object({ + enabled: core.serialization.boolean().optional(), +}); + +export declare namespace TranscribeAudioEventsConfig { + export interface Raw { + enabled?: boolean | null; + } +} diff --git a/src/serialization/types/TranscribeConfig.ts b/src/serialization/types/TranscribeConfig.ts index 8f957e6d..fc2fe365 100644 --- a/src/serialization/types/TranscribeConfig.ts +++ b/src/serialization/types/TranscribeConfig.ts @@ -3,6 +3,7 @@ import type * as Corti from "../../api/index.js"; import * as core from "../../core/index.js"; import type * as serializers from "../index.js"; +import { TranscribeAudioEventsConfig } from "./TranscribeAudioEventsConfig.js"; import { TranscribeCommand } from "./TranscribeCommand.js"; import { TranscribeFormatting } from "./TranscribeFormatting.js"; import { TranscribeSupportedLanguage } from "./TranscribeSupportedLanguage.js"; @@ -17,6 +18,7 @@ export const TranscribeConfig: core.serialization.ObjectSchema< automaticPunctuation: core.serialization.boolean().optional(), commands: core.serialization.list(TranscribeCommand).optional(), formatting: TranscribeFormatting.optional(), + audioEvents: TranscribeAudioEventsConfig.optional(), audioFormat: core.serialization.string().optional(), }); @@ -28,6 +30,7 @@ export declare namespace TranscribeConfig { automaticPunctuation?: boolean | null; commands?: TranscribeCommand.Raw[] | null; formatting?: TranscribeFormatting.Raw | null; + audioEvents?: TranscribeAudioEventsConfig.Raw | null; audioFormat?: string | null; } } diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 66b9b853..ca66a9bd 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -127,9 +127,14 @@ export * from "./InteractionsPatient.js"; export * from "./OAuthTokenRequest.js"; export * from "./RecordingsCreateResponse.js"; export * from "./RecordingsListResponse.js"; +export * from "./StreamAudioEventData.js"; +export * from "./StreamAudioEventDataEvent.js"; +export * from "./StreamAudioEventMessage.js"; +export * from "./StreamAudioEventsConfig.js"; export * from "./StreamConfig.js"; export * from "./StreamConfigMessage.js"; export * from "./StreamConfigMode.js"; +export * from "./StreamConfigModeFactGenerationInterval.js"; export * from "./StreamConfigModeType.js"; export * from "./StreamConfigParticipant.js"; export * from "./StreamConfigParticipantRole.js"; @@ -162,6 +167,10 @@ export * from "./TemplatesSectionSorted.js"; export * from "./TemplatesSectionTranslation.js"; export * from "./TemplatesTranslation.js"; export * from "./TemplatesWritingStyle.js"; +export * from "./TranscribeAudioEventData.js"; +export * from "./TranscribeAudioEventDataEvent.js"; +export * from "./TranscribeAudioEventMessage.js"; +export * from "./TranscribeAudioEventsConfig.js"; export * from "./TranscribeCommand.js"; export * from "./TranscribeCommandData.js"; export * from "./TranscribeCommandMessage.js"; diff --git a/tests/wire/agents.test.ts b/tests/wire/agents.test.ts index acd362e9..4cc9e418 100644 --- a/tests/wire/agents.test.ts +++ b/tests/wire/agents.test.ts @@ -1793,6 +1793,7 @@ describe("AgentsClient", () => { displayDescription: "displayDescription", description: "description", mcpServers: [{ name: "name", authorizationType: "none" }], + configSchema: { key: "value" }, }, ], }; @@ -1822,6 +1823,9 @@ describe("AgentsClient", () => { authorizationType: "none", }, ], + configSchema: { + key: "value", + }, }, ], });