Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "4.45.0",
"cliVersion": "4.71.5",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.54.0",
"generatorConfig": {
Expand Down Expand Up @@ -32,6 +32,6 @@
}
}
},
"originGitCommit": "0398cf888d5d2150c19cbb4d7cd23100e43d4572",
"originGitCommit": "e81fbff1d4a5b7333f8cad28a585c647c6efaec3",
"sdkVersion": "0.0.0-dev"
}
2 changes: 1 addition & 1 deletion src/api/resources/codes/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CodesClient {
}

/**
* Predict medical codes from provided context.<br/><Note>This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, and CPT codes based on input text string or documentId.<br/><br/>More than one code system may be defined in a single request.<br/><br/>Code prediction requests have two possible values for context:<br/>- `text`: One set of code prediction results will be returned based on all input text defined.<br/>- `documentId`: Code prediction will be based on that defined document only.<br/><br/>The response includes two sets of results:<br/>- `Codes`: Codes predicted by the model.<br/>- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.<br/><br/>All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).</Note>
* Predict medical codes from provided context.<br/><Note>This is a stateless endpoint, designed to predict ICD-10-CM, ICD-10-PCS, ICD-10-UK and CPT codes based on input text string or documentId.<br/><br/>More than one code system may be defined in a single request.<br/><br/>Code prediction requests have two possible values for context:<br/>- `text`: One set of code prediction results will be returned based on all input text defined.<br/>- `documentId`: Code prediction will be based on that defined document only.<br/><br/>The response includes two sets of results:<br/>- `Codes`: Codes predicted by the model.<br/>- `Candidates`: Lower-confidence codes the model considered potentially relevant but excluded from the predicted set.<br/><br/>All predicted code results are based on input context defined in the request only (not other external data or assets associated with an interaction).</Note>
*
* @param {Corti.CodesGeneralPredictRequest} request
* @param {CodesClient.RequestOptions} requestOptions - Request-specific configuration.
Expand Down
4 changes: 2 additions & 2 deletions src/api/types/AgentsAgentCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export interface AgentsAgentCard {
iconUrl?: string | null;
/** A URL to documentation describing how to interact with the agent. */
documentationUrl?: string | null;
provider?: Corti.AgentsAgentProvider;
provider?: Corti.AgentsAgentProvider | null;
/** The version of the agent. */
version: string;
capabilities: Corti.AgentsAgentCapabilities;
capabilities: Corti.AgentsAgentCapabilities | null;
/** A declaration of the security schemes available to authorize requests. The key is the scheme name. Follows the OpenAPI 3.0 Security Scheme Object. */
securitySchemes?: Record<string, unknown> | null;
/** A list of security requirement objects that apply to all agent interactions. Each object lists security schemes that can be used. Follows the OpenAPI 3.0 Security Requirement Object. This list can be seen as an OR of ANDs. Each object in the list describes one possible set of security requirements that must be present on a request. This allows specifying, for example, "callers must either use OAuth OR an API Key AND mTLS." */
Expand Down
5 changes: 2 additions & 3 deletions src/api/types/AgentsErrorResponse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

import type * as Corti from "../index.js";

export interface AgentsErrorResponse {
/** A machine-readable error code that identifies the type of error. */
code: string;
Expand All @@ -11,5 +9,6 @@ export interface AgentsErrorResponse {
howToFix?: string;
/** An optional object containing additional details about the error. */
details?: Record<string, unknown>;
cause?: Corti.AgentsErrorResponse;
/** An optional object containing the cause of the error, following the same structure as the parent error response. */
cause?: Record<string, unknown>;
}
2 changes: 1 addition & 1 deletion src/api/types/CodesGeneralResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export interface CodesGeneralResponse {
codes: Corti.CodesGeneralReadResponse[];
/** Lower-confidence codes the model considered potentially relevant but excluded from the predicted set. */
candidates: Corti.CodesGeneralReadResponse[];
usageInfo?: Corti.CommonUsageInfo;
usageInfo: Corti.CommonUsageInfo;
}
4 changes: 4 additions & 0 deletions src/api/types/CommonCodingSystemEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ export const CommonCodingSystemEnum = {
Icd10CmOutpatient: "icd10cm-outpatient",
Icd10Pcs: "icd10pcs",
Cpt: "cpt",
Icd10IntInpatient: "icd10int-inpatient",
Icd10IntOutpatient: "icd10int-outpatient",
Icd10UkInpatient: "icd10uk-inpatient",
Icd10UkOutpatient: "icd10uk-outpatient",
} as const;
export type CommonCodingSystemEnum = (typeof CommonCodingSystemEnum)[keyof typeof CommonCodingSystemEnum];
2 changes: 2 additions & 0 deletions src/api/types/StreamConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ import type * as Corti from "../index.js";
export interface StreamConfig {
transcription: Corti.StreamConfigTranscription;
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. */
xCortiRetentionPolicy?: Corti.StreamConfigXCortiRetentionPolicy;
}
9 changes: 9 additions & 0 deletions src/api/types/StreamConfigXCortiRetentionPolicy.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.

/** 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. */
export const StreamConfigXCortiRetentionPolicy = {
Retain: "retain",
None: "none",
} as const;
export type StreamConfigXCortiRetentionPolicy =
(typeof StreamConfigXCortiRetentionPolicy)[keyof typeof StreamConfigXCortiRetentionPolicy];
1 change: 1 addition & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export * from "./StreamConfigParticipantRole.js";
export * from "./StreamConfigStatusMessage.js";
export * from "./StreamConfigStatusMessageType.js";
export * from "./StreamConfigTranscription.js";
export * from "./StreamConfigXCortiRetentionPolicy.js";
export * from "./StreamEndedMessage.js";
export * from "./StreamEndMessage.js";
export * from "./StreamErrorDetail.js";
Expand Down
8 changes: 4 additions & 4 deletions src/serialization/types/AgentsAgentCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const AgentsAgentCard: core.serialization.ObjectSchema<serializers.Agents
additionalInterfaces: core.serialization.list(AgentsAgentInterface).optionalNullable(),
iconUrl: core.serialization.string().optionalNullable(),
documentationUrl: core.serialization.string().optionalNullable(),
provider: AgentsAgentProvider.optional(),
provider: AgentsAgentProvider.optionalNullable(),
version: core.serialization.string(),
capabilities: AgentsAgentCapabilities,
capabilities: AgentsAgentCapabilities.nullable(),
securitySchemes: core.serialization
.record(core.serialization.string(), core.serialization.unknown())
.optionalNullable(),
Expand All @@ -45,9 +45,9 @@ export declare namespace AgentsAgentCard {
additionalInterfaces?: (AgentsAgentInterface.Raw[] | null | undefined) | null;
iconUrl?: (string | null | undefined) | null;
documentationUrl?: (string | null | undefined) | null;
provider?: AgentsAgentProvider.Raw | null;
provider?: (AgentsAgentProvider.Raw | null | undefined) | null;
version: string;
capabilities: AgentsAgentCapabilities.Raw;
capabilities?: AgentsAgentCapabilities.Raw | null;
securitySchemes?: (Record<string, unknown> | null | undefined) | null;
security?: (Record<string, unknown> | null | undefined) | null;
defaultInputModes: string[];
Expand Down
6 changes: 3 additions & 3 deletions src/serialization/types/AgentsErrorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import type * as Corti from "../../api/index.js";
import * as core from "../../core/index.js";
import * as serializers from "../index.js";
import type * as serializers from "../index.js";

export const AgentsErrorResponse: core.serialization.ObjectSchema<
serializers.AgentsErrorResponse.Raw,
Expand All @@ -12,7 +12,7 @@ export const AgentsErrorResponse: core.serialization.ObjectSchema<
description: core.serialization.string(),
howToFix: core.serialization.string().optional(),
details: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
cause: core.serialization.lazyObject(() => serializers.AgentsErrorResponse).optional(),
cause: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
});

export declare namespace AgentsErrorResponse {
Expand All @@ -21,6 +21,6 @@ export declare namespace AgentsErrorResponse {
description: string;
howToFix?: string | null;
details?: Record<string, unknown> | null;
cause?: serializers.AgentsErrorResponse.Raw | null;
cause?: Record<string, unknown> | null;
}
}
7 changes: 4 additions & 3 deletions src/serialization/types/AgentsValidationErrorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import type * as Corti from "../../api/index.js";
import * as core from "../../core/index.js";
import * as serializers from "../index.js";
import type * as serializers from "../index.js";
import { AgentsErrorResponse } from "./AgentsErrorResponse.js";
import { AgentsValidationError } from "./AgentsValidationError.js";

export const AgentsValidationErrorResponse: core.serialization.ObjectSchema<
Expand All @@ -12,10 +13,10 @@ export const AgentsValidationErrorResponse: core.serialization.ObjectSchema<
.object({
detail: core.serialization.list(AgentsValidationError).optional(),
})
.extend(core.serialization.lazyObject(() => serializers.AgentsErrorResponse));
.extend(AgentsErrorResponse);

export declare namespace AgentsValidationErrorResponse {
export interface Raw extends serializers.AgentsErrorResponse.Raw {
export interface Raw extends AgentsErrorResponse.Raw {
detail?: AgentsValidationError.Raw[] | null;
}
}
4 changes: 2 additions & 2 deletions src/serialization/types/CodesGeneralResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ export const CodesGeneralResponse: core.serialization.ObjectSchema<
> = core.serialization.object({
codes: core.serialization.list(CodesGeneralReadResponse),
candidates: core.serialization.list(CodesGeneralReadResponse),
usageInfo: CommonUsageInfo.optional(),
usageInfo: CommonUsageInfo,
});

export declare namespace CodesGeneralResponse {
export interface Raw {
codes: CodesGeneralReadResponse.Raw[];
candidates: CodesGeneralReadResponse.Raw[];
usageInfo?: CommonUsageInfo.Raw | null;
usageInfo: CommonUsageInfo.Raw;
}
}
21 changes: 19 additions & 2 deletions src/serialization/types/CommonCodingSystemEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,25 @@ import type * as serializers from "../index.js";
export const CommonCodingSystemEnum: core.serialization.Schema<
serializers.CommonCodingSystemEnum.Raw,
Corti.CommonCodingSystemEnum
> = core.serialization.enum_(["icd10cm-inpatient", "icd10cm-outpatient", "icd10pcs", "cpt"]);
> = core.serialization.enum_([
"icd10cm-inpatient",
"icd10cm-outpatient",
"icd10pcs",
"cpt",
"icd10int-inpatient",
"icd10int-outpatient",
"icd10uk-inpatient",
"icd10uk-outpatient",
]);

export declare namespace CommonCodingSystemEnum {
export type Raw = "icd10cm-inpatient" | "icd10cm-outpatient" | "icd10pcs" | "cpt";
export type Raw =
| "icd10cm-inpatient"
| "icd10cm-outpatient"
| "icd10pcs"
| "cpt"
| "icd10int-inpatient"
| "icd10int-outpatient"
| "icd10uk-inpatient"
| "icd10uk-outpatient";
}
6 changes: 6 additions & 0 deletions src/serialization/types/StreamConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ import * as core from "../../core/index.js";
import type * as serializers from "../index.js";
import { StreamConfigMode } from "./StreamConfigMode.js";
import { StreamConfigTranscription } from "./StreamConfigTranscription.js";
import { StreamConfigXCortiRetentionPolicy } from "./StreamConfigXCortiRetentionPolicy.js";

export const StreamConfig: core.serialization.ObjectSchema<serializers.StreamConfig.Raw, Corti.StreamConfig> =
core.serialization.object({
transcription: StreamConfigTranscription,
mode: StreamConfigMode,
xCortiRetentionPolicy: core.serialization.property(
"X-Corti-Retention-Policy",
StreamConfigXCortiRetentionPolicy.optional(),
),
});

export declare namespace StreamConfig {
export interface Raw {
transcription: StreamConfigTranscription.Raw;
mode: StreamConfigMode.Raw;
"X-Corti-Retention-Policy"?: StreamConfigXCortiRetentionPolicy.Raw | null;
}
}
14 changes: 14 additions & 0 deletions src/serialization/types/StreamConfigXCortiRetentionPolicy.ts
Original file line number Diff line number Diff line change
@@ -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 StreamConfigXCortiRetentionPolicy: core.serialization.Schema<
serializers.StreamConfigXCortiRetentionPolicy.Raw,
Corti.StreamConfigXCortiRetentionPolicy
> = core.serialization.enum_(["retain", "none"]);

export declare namespace StreamConfigXCortiRetentionPolicy {
export type Raw = "retain" | "none";
}
1 change: 1 addition & 0 deletions src/serialization/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export * from "./StreamConfigParticipantRole.js";
export * from "./StreamConfigStatusMessage.js";
export * from "./StreamConfigStatusMessageType.js";
export * from "./StreamConfigTranscription.js";
export * from "./StreamConfigXCortiRetentionPolicy.js";
export * from "./StreamEndedMessage.js";
export * from "./StreamEndMessage.js";
export * from "./StreamErrorDetail.js";
Expand Down
8 changes: 4 additions & 4 deletions tests/wire/codes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("CodesClient", () => {
],
},
],
usageInfo: { creditsConsumed: 1.1 },
usageInfo: { creditsConsumed: 123 },
};

server
Expand Down Expand Up @@ -121,7 +121,7 @@ describe("CodesClient", () => {
},
],
usageInfo: {
creditsConsumed: 1.1,
creditsConsumed: 123,
},
});
});
Expand Down Expand Up @@ -169,7 +169,7 @@ describe("CodesClient", () => {
],
},
],
usageInfo: { creditsConsumed: 1.1 },
usageInfo: { creditsConsumed: 123 },
};

server
Expand Down Expand Up @@ -246,7 +246,7 @@ describe("CodesClient", () => {
},
],
usageInfo: {
creditsConsumed: 1.1,
creditsConsumed: 123,
},
});
});
Expand Down
Loading