Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "4.86.1",
"cliVersion": "5.23.2",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.54.0",
"generatorConfig": {
Expand All @@ -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": {
Expand All @@ -32,6 +34,6 @@
}
}
},
"originGitCommit": "23bce53307f0836f2dcd50e82ef0aba136e7ec2f",
"originGitCommit": "fa99b5cb39aac519d84cefa0c94c9a9ab639d600",
"sdkVersion": "0.0.0-dev"
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ import type * as Corti from "../../../../index.js";
*/
export interface FactsExtractRequest {
context: Corti.CommonTextContext[];
/** The desired output language code for extracted facts. Check [languages page](/about/languages) for more. */
/** The desired output language code for extracted facts. Check [languages page](/stt/languages) for more. */
outputLanguage: string;
}
3 changes: 2 additions & 1 deletion src/api/resources/stream/client/Socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/api/resources/transcribe/client/Socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/transcripts/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class TranscriptsClient {
}

/**
* Create a transcript from an audio file attached, via `/recordings` endpoint, to the interaction.<br/><Note>Each interaction may have more than one audio file and transcript associated with it. While audio files up to 60min in total duration, or 150MB in total size, may be attached to an interaction, synchronous processing is only supported for audio files less than ~2min in duration.<br/><br/>If an audio file takes longer to transcribe than the 25sec synchronous processing timeout, then it will continue to process asynchronously. In this scenario, an incomplete or empty transcript with `status=processing` will be returned with a location header that can be used to retrieve the final transcript.<br/><br/>The client can poll the Get Transcript endpoint (`GET /interactions/{id}/transcripts/{transcriptId}/status`) for transcript status changes:<br/>- `200 OK` with status `processing`, `completed`, or `failed`<br/>- `404 Not Found` if the `interactionId` or `transcriptId` are invalid<br/><br/>The completed transcript can be retrieved via the Get Transcript endpoint (`GET /interactions/{id}/transcripts/{transcriptId}/`).</Note>
* Create a transcript from an audio file uploaded to the interaction via `/recordings` endpoint.<br/><Note>Each interaction may have more than one audio file and transcript associated with it. Audio files up to 60 min in total duration, or 150 MB in total size, may be used.<br/><br/>Requests will process synchronously for 25 seconds before timeout, upon which processing will continue asynchronously. In the latter scenario, a partial or empty transcript with `status=processing` will be returned with a location header that can be used to retrieve the completed transcript.<br/><br/>The client can poll the `/transcripts` endpoint (`GET /interactions/{id}/transcripts/{transcriptId}/status`) for transcript status monitoring:<br/>- `200 OK` with status `processing`, `completed`, or `failed`<br/>- `404 Not Found` if the `interactionId` or `transcriptId` are invalid<br/><br/>The completed transcript can be retrieved via the Get Transcript request (`GET /interactions/{id}/transcripts/{transcriptId}/`).</Note>
*
* @param {Corti.Uuid} id - The unique identifier of the interaction. Must be a valid UUID.
* @param {Corti.TranscriptsCreateRequest} request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type * as Corti from "../../../../index.js";
export interface TranscriptsCreateRequest {
/** The unique identifier for the recording. */
recordingId: Corti.Uuid;
/** The primary spoken language of the recording. Check https://docs.corti.ai/about/languages for more. */
/** The primary spoken language of the recording. Check https://docs.corti.ai/stt/languages for more. */
primaryLanguage: string;
/** Indicates whether spoken dictation commands should be converted to punctuation (e.g., 'comma' → ','). */
isDictation?: boolean;
Expand Down
2 changes: 2 additions & 0 deletions src/api/types/AgentsCreateExpertReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown>;
}
2 changes: 2 additions & 0 deletions src/api/types/AgentsExpertReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown>;
}
2 changes: 2 additions & 0 deletions src/api/types/AgentsRegistryExpert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown>;
}
2 changes: 1 addition & 1 deletion src/api/types/DocumentsCreateRequestWithTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface DocumentsCreateRequestWithTemplate {
template: Corti.DocumentsTemplate;
/** An optional name for the document. */
name?: string;
/** The language in which the document will be generated. Check [languages page](/about/languages) for more. */
/** The language in which the document will be generated. Check [languages page](/stt/languages) for more. */
outputLanguage: string;
/** Set to true to disable guardrails during document generation, default is false. */
disableGuardrails?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/DocumentsCreateRequestWithTemplateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface DocumentsCreateRequestWithTemplateKey {
templateKey: string;
/** An optional name for the document. */
name?: string;
/** The language in which the document will be generated. Check [languages page](/about/languages) for more. */
/** The language in which the document will be generated. Check [languages page](/stt/languages) for more. */
outputLanguage: string;
/** Set to true to disable guardrails during document generation, default is false. */
disableGuardrails?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/DocumentsGetResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface DocumentsGetResponse {
createdAt: Date;
/** The timestamp when the document was last updated. */
updatedAt: Date;
/** The language in which the document will be generated. Check https://docs.corti.ai/about/languages for more. */
/** The language in which the document will be generated. Check https://docs.corti.ai/stt/languages for more. */
outputLanguage: string;
usageInfo: Corti.CommonUsageInfo;
}
12 changes: 12 additions & 0 deletions src/api/types/StreamAudioEventData.ts
Original file line number Diff line number Diff line change
@@ -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;
}
10 changes: 10 additions & 0 deletions src/api/types/StreamAudioEventDataEvent.ts
Original file line number Diff line number Diff line change
@@ -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];
8 changes: 8 additions & 0 deletions src/api/types/StreamAudioEventMessage.ts
Original file line number Diff line number Diff line change
@@ -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;
}
6 changes: 6 additions & 0 deletions src/api/types/StreamAudioEventsConfig.ts
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions src/api/types/StreamConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 2 additions & 0 deletions src/api/types/StreamConfigMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
9 changes: 9 additions & 0 deletions src/api/types/StreamConfigModeFactGenerationInterval.ts
Original file line number Diff line number Diff line change
@@ -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];
12 changes: 12 additions & 0 deletions src/api/types/TranscribeAudioEventData.ts
Original file line number Diff line number Diff line change
@@ -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;
}
11 changes: 11 additions & 0 deletions src/api/types/TranscribeAudioEventDataEvent.ts
Original file line number Diff line number Diff line change
@@ -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];
8 changes: 8 additions & 0 deletions src/api/types/TranscribeAudioEventMessage.ts
Original file line number Diff line number Diff line change
@@ -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;
}
6 changes: 6 additions & 0 deletions src/api/types/TranscribeAudioEventsConfig.ts
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions src/api/types/TranscribeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
9 changes: 9 additions & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -22,6 +23,7 @@ export const StreamSocketResponse: core.serialization.Schema<
| Corti.StreamUsageMessage
| Corti.StreamErrorMessage
| Corti.StreamConfigStatusMessage
| Corti.StreamAudioEventMessage
> = core.serialization.undiscriminatedUnion([
StreamTranscriptMessage,
StreamFactsMessage,
Expand All @@ -31,6 +33,7 @@ export const StreamSocketResponse: core.serialization.Schema<
StreamUsageMessage,
StreamErrorMessage,
StreamConfigStatusMessage,
StreamAudioEventMessage,
]);

export declare namespace StreamSocketResponse {
Expand All @@ -42,5 +45,6 @@ export declare namespace StreamSocketResponse {
| StreamEndedMessage.Raw
| StreamUsageMessage.Raw
| StreamErrorMessage.Raw
| StreamConfigStatusMessage.Raw;
| StreamConfigStatusMessage.Raw
| StreamAudioEventMessage.Raw;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -22,6 +23,7 @@ export const TranscribeSocketResponse: core.serialization.Schema<
| Corti.TranscribeTranscriptMessage
| Corti.TranscribeCommandMessage
| Corti.TranscribeConfigStatusMessage
| Corti.TranscribeAudioEventMessage
> = core.serialization.undiscriminatedUnion([
TranscribeUsageMessage,
TranscribeFlushedMessage,
Expand All @@ -31,6 +33,7 @@ export const TranscribeSocketResponse: core.serialization.Schema<
TranscribeTranscriptMessage,
TranscribeCommandMessage,
TranscribeConfigStatusMessage,
TranscribeAudioEventMessage,
]);

export declare namespace TranscribeSocketResponse {
Expand All @@ -42,5 +45,6 @@ export declare namespace TranscribeSocketResponse {
| TranscribeErrorMessage.Raw
| TranscribeTranscriptMessage.Raw
| TranscribeCommandMessage.Raw
| TranscribeConfigStatusMessage.Raw;
| TranscribeConfigStatusMessage.Raw
| TranscribeAudioEventMessage.Raw;
}
2 changes: 2 additions & 0 deletions src/serialization/types/AgentsCreateExpertReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -21,5 +22,6 @@ export declare namespace AgentsCreateExpertReference {
id?: string | null;
name?: string | null;
systemPrompt?: string | null;
config?: Record<string, unknown> | null;
}
}
2 changes: 2 additions & 0 deletions src/serialization/types/AgentsExpertReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -21,5 +22,6 @@ export declare namespace AgentsExpertReference {
id: string;
name: string;
systemPrompt?: string | null;
resolvedConfig?: Record<string, unknown> | null;
}
}
Loading
Loading