Skip to content
Open
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
12 changes: 6 additions & 6 deletions src/api/resources/facts/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export class Facts {
* @example
* await client.facts.batchUpdate("f47ac10b-58cc-4372-a567-0e02b2c3d479", {
* facts: [{
* factId: "f47ac10b-58cc-4372-a567-0e02b2c3d479"
* factId: "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08"
* }]
* })
*/
Expand Down Expand Up @@ -442,18 +442,18 @@ export class Facts {
* Updates an existing fact associated with a specific interaction.
*
* @param {Corti.Uuid} id - The unique identifier of the interaction. Must be a valid UUID.
* @param {Corti.Uuid} factId - The unique identifier of the fact to update. Must be a valid UUID.
* @param {string} factId - The unique identifier of the fact to update. Must be a valid UUID.
* @param {Corti.FactsUpdateRequest} request
* @param {Facts.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Corti.GatewayTimeoutError}
*
* @example
* await client.facts.update("f47ac10b-58cc-4372-a567-0e02b2c3d479", "f47ac10b-58cc-4372-a567-0e02b2c3d479")
* await client.facts.update("f47ac10b-58cc-4372-a567-0e02b2c3d479", "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08")
*/
public update(
id: Corti.Uuid,
factId: Corti.Uuid,
factId: string,
request: Corti.FactsUpdateRequest = {},
requestOptions?: Facts.RequestOptions,
): core.HttpResponsePromise<Corti.FactsUpdateResponse> {
Expand All @@ -462,15 +462,15 @@ export class Facts {

private async __update(
id: Corti.Uuid,
factId: Corti.Uuid,
factId: string,
request: Corti.FactsUpdateRequest = {},
requestOptions?: Facts.RequestOptions,
): Promise<core.WithRawResponse<Corti.FactsUpdateResponse>> {
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)).base,
`interactions/${encodeURIComponent(serializers.Uuid.jsonOrThrow(id, { omitUndefined: true }))}/facts/${encodeURIComponent(serializers.Uuid.jsonOrThrow(factId, { omitUndefined: true }))}`,
`interactions/${encodeURIComponent(serializers.Uuid.jsonOrThrow(id, { omitUndefined: true }))}/facts/${encodeURIComponent(factId)}`,
),
method: "PATCH",
headers: mergeHeaders(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Corti from "../../../../index.js";
* @example
* {
* facts: [{
* factId: "f47ac10b-58cc-4372-a567-0e02b2c3d479"
* factId: "3c9d8a12-7f44-4b3e-9e6f-9271c2bbfa08"
* }]
* }
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface FactsUpdateRequest {
text?: string;
/** The updated group key for the fact. */
group?: string;
/** The updated origin of the fact. Set to 'USER' to indicate a change by an end-user. */
/** To track the updated source of the fact. Set to 'user' to indicate a change by an end-user. */
source?: Corti.CommonSourceEnum;
/** Set this to true if discarded by an end-user, then filter out from the document generation request. */
isDiscarded?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/DocumentsCreateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export type DocumentsCreateRequest =
* Standard method for document generation: Use template key to generate document based on pre-defined template. */
| Corti.DocumentsCreateRequestWithTemplateKey
/**
* Advanced method for document generation: Define sectionKeys in the request to build a template dynamically. See a detailed example [here](/templates/documents-advanced#assemble-a-template-with-extra-instructions). */
* Advanced method for document generation: Define Sections in the request to build a template dynamically. See a detailed example [here](/templates/documents-advanced#assemble-a-template-with-extra-instructions). */
| Corti.DocumentsCreateRequestWithTemplate;
18 changes: 18 additions & 0 deletions src/api/types/DocumentsSectionOverride.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface DocumentsSectionOverride {
/** The key that references the section to use for document generation. */
key: string;
/** Overrides the section name used in document generation and response. */
nameOverride?: string;
/** Overrides the section's default writing style with your custom prompt. */
writingStyleOverride?: string;
/** Overrides the section's default format rule with your custom prompt. */
formatRuleOverride?: string;
/** Overrides and sets the section-level additional instructions with your custom prompt. */
additionalInstructionsOverride?: string;
/** Overrides the section's content prompt used for input assignment with documentationMode: routed_parallel, and section generation. */
contentOverride?: string;
}
8 changes: 7 additions & 1 deletion src/api/types/DocumentsTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@

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

export type DocumentsTemplate = Corti.DocumentsTemplateWithSectionKeys;
export type DocumentsTemplate =
/**
* Flexible sections to be used in document generation. */
| Corti.DocumentsTemplateWithSections
/**
* Section keys to be used in document generation, without overrides. */
| Corti.DocumentsTemplateWithSectionKeys;
13 changes: 13 additions & 0 deletions src/api/types/DocumentsTemplateWithSections.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

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

export interface DocumentsTemplateWithSections {
sections?: Corti.DocumentsSectionOverride[];
/** A brief description of the document that can help give the LLM some context. */
description?: string;
/** Overrides and sets template-level additional instructions. */
additionalInstructionsOverride?: string;
}
4 changes: 1 addition & 3 deletions src/api/types/FactsBatchUpdateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
* This file was auto-generated by Fern from our API Definition.
*/

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

export interface FactsBatchUpdateInput {
/** The unique identifier of the fact to be updated. */
factId: Corti.Uuid;
factId: string;
/** Set this to true for facts discarded by an end-user, then filter those out from the document generation request. */
isDiscarded?: boolean;
/** The updated text content of the fact. */
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/FactsBatchUpdateItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Corti from "../index.js";

export interface FactsBatchUpdateItem {
/** The unique identifier of the updated fact. */
id: Corti.Uuid;
id: string;
/** The updated text content of the fact. */
text: string;
/** The updated group key to which the fact belongs. */
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/FactsContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export interface FactsContext {
text: string;
/** The group to which the fact belongs. */
group?: string;
/** The source of the fact. 'USER' refers to facts provided by the user, while 'SYSTEM' refers to system-generated facts (e.g., EHR). */
/** Source 'core' indicates facts generated by the LLM, 'user' for facts added by the user, 'system' for system-derived facts (e.g. EHR). */
source: Corti.CommonSourceEnum;
}
2 changes: 1 addition & 1 deletion src/api/types/FactsCreateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export interface FactsCreateInput {
text: string;
/** The key identifying the group to which the fact belongs. */
group: string;
/** The origin of the fact, such as 'USER' or 'SYSTEM'. */
/** To track the source of a fact. Set 'user' for an end-user, 'system' for EHR-derived facts. 'core' is used for facts generated by the LLM. */
source?: Corti.CommonSourceEnum;
}
4 changes: 2 additions & 2 deletions src/api/types/FactsCreateItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import * as Corti from "../index.js";

export interface FactsCreateItem {
/** The unique identifier of the newly created fact. */
id?: Corti.Uuid;
id?: string;
/** The textual content of the created fact. */
text?: string;
/** The group key categorizing the fact. */
group?: string;
/** The unique identifier of the group to which the fact belongs. */
groupId?: Corti.Uuid;
/** The origin of the fact, such as 'USER' or 'SYSTEM'. */
/** To track the source of a fact. Set 'user' for an end-user, 'system' for EHR-derived facts. 'core' is used for facts generated by the LLM. */
source?: Corti.CommonSourceEnum;
/** Indicates whether the fact has been marked as discarded by an end-user. */
isDiscarded?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/api/types/FactsListItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Corti from "../index.js";

export interface FactsListItem {
/** The unique identifier of the fact. */
id?: Corti.Uuid;
id?: string;
/** The text content of the fact. */
text?: string;
/** The key identifying the group to which the fact belongs. */
Expand All @@ -15,7 +15,7 @@ export interface FactsListItem {
groupId?: Corti.Uuid;
/** Indicates whether the fact has been marked as discarded by an end-user. */
isDiscarded?: boolean;
/** The origin of the fact. */
/** Source 'core' indicates facts generated by the LLM, 'user' for facts added by the user, 'system' for system-derived facts (e.g. EHR). */
source?: Corti.CommonSourceEnum;
/** The timestamp when the fact was created. */
createdAt?: Date;
Expand Down
2 changes: 1 addition & 1 deletion src/api/types/FactsUpdateResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Corti from "../index.js";

export interface FactsUpdateResponse {
/** The unique identifier of the fact. */
id: Corti.Uuid;
id: string;
/** The updated text content of the fact. */
text: string;
/** The updated group key to which the fact belongs. */
Expand Down
12 changes: 12 additions & 0 deletions src/api/types/TemplatesDocumentationModeEnum.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.
*/

/**
* Configures the approach and underlying system prompt that govern how the LLM generates documentation.
*/
export type TemplatesDocumentationModeEnum = "global_sequential" | "routed_parallel";
export const TemplatesDocumentationModeEnum = {
GlobalSequential: "global_sequential",
RoutedParallel: "routed_parallel",
} as const;
1 change: 1 addition & 0 deletions src/api/types/TemplatesItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface TemplatesItem {
key: string;
/** Status of the template. */
status: string;
documentationMode?: Corti.TemplatesDocumentationModeEnum;
/** List of sections included in the template */
templateSections: Corti.TemplatesSectionSorted[];
/** Available translations for the template */
Expand Down
3 changes: 3 additions & 0 deletions src/api/types/TemplatesSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export interface TemplatesSection {
description: string;
/** Default writing style for the section */
defaultWritingStyle: Corti.TemplatesWritingStyle;
/** Used to guide input assignment in documentationMode: routed_parallel, and for section generation. */
content?: string;
documentationMode?: Corti.TemplatesDocumentationModeEnum;
/** Type of section */
sectionType: string;
/** Available translations for the section */
Expand Down
2 changes: 2 additions & 0 deletions src/api/types/TranscribeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ export interface TranscribeConfig {
automaticPunctuation?: boolean;
/** Commands that should be registered and detected */
commands?: Corti.TranscribeCommand[];
/** Formatting preferences */
formatting?: Corti.TranscribeFormatting[];
}
20 changes: 20 additions & 0 deletions src/api/types/TranscribeFormatting.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

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

export interface TranscribeFormatting {
/** Formatting for dates. */
dates?: Corti.TranscribeFormattingDates;
/** Formatting for times. */
times?: Corti.TranscribeFormattingTimes;
/** Formatting for numbers. */
numbers?: Corti.TranscribeFormattingNumbers;
/** Formatting for measurements. */
measurements?: Corti.TranscribeFormattingMeasurements;
/** Formatting for numeric ranges. */
numericRanges?: Corti.TranscribeFormattingNumericRanges;
/** Formatting for ordinals. */
ordinals?: Corti.TranscribeFormattingOrdinals;
}
15 changes: 15 additions & 0 deletions src/api/types/TranscribeFormattingDates.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

/**
* Formatting for dates.
*/
export type TranscribeFormattingDates = "as_dictated" | "eu_slash" | "iso_compact" | "long_text" | "us_slash";
export const TranscribeFormattingDates = {
AsDictated: "as_dictated",
EuSlash: "eu_slash",
IsoCompact: "iso_compact",
LongText: "long_text",
UsSlash: "us_slash",
} as const;
12 changes: 12 additions & 0 deletions src/api/types/TranscribeFormattingMeasurements.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.
*/

/**
* Formatting for measurements.
*/
export type TranscribeFormattingMeasurements = "abbreviated" | "as_dictated";
export const TranscribeFormattingMeasurements = {
Abbreviated: "abbreviated",
AsDictated: "as_dictated",
} as const;
13 changes: 13 additions & 0 deletions src/api/types/TranscribeFormattingNumbers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

/**
* Formatting for numbers.
*/
export type TranscribeFormattingNumbers = "as_dictated" | "numerals" | "numerals_above_nine";
export const TranscribeFormattingNumbers = {
AsDictated: "as_dictated",
Numerals: "numerals",
NumeralsAboveNine: "numerals_above_nine",
} as const;
12 changes: 12 additions & 0 deletions src/api/types/TranscribeFormattingNumericRanges.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.
*/

/**
* Formatting for numeric ranges.
*/
export type TranscribeFormattingNumericRanges = "as_dictated" | "numerals";
export const TranscribeFormattingNumericRanges = {
AsDictated: "as_dictated",
Numerals: "numerals",
} as const;
12 changes: 12 additions & 0 deletions src/api/types/TranscribeFormattingOrdinals.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.
*/

/**
* Formatting for ordinals.
*/
export type TranscribeFormattingOrdinals = "as_dictated" | "numerals";
export const TranscribeFormattingOrdinals = {
AsDictated: "as_dictated",
Numerals: "numerals",
} as const;
13 changes: 13 additions & 0 deletions src/api/types/TranscribeFormattingTimes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

/**
* Formatting for times.
*/
export type TranscribeFormattingTimes = "as_dictated" | "h12" | "h24";
export const TranscribeFormattingTimes = {
AsDictated: "as_dictated",
H12: "h12",
H24: "h24",
} as const;
10 changes: 10 additions & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ export * from "./DocumentsContextWithFacts.js";
export * from "./DocumentsContextWithTranscript.js";
export * from "./DocumentsContextWithString.js";
export * from "./DocumentsSection.js";
export * from "./DocumentsSectionOverride.js";
export * from "./DocumentsTemplate.js";
export * from "./DocumentsTemplateWithSectionKeys.js";
export * from "./DocumentsTemplateWithSections.js";
export * from "./InteractionsEncounterCreateRequest.js";
export * from "./InteractionsEncounterUpdateRequest.js";
export * from "./InteractionsEncounterResponse.js";
Expand Down Expand Up @@ -49,6 +51,7 @@ export * from "./TranscriptsListItem.js";
export * from "./TranscriptsData.js";
export * from "./TemplatesSection.js";
export * from "./CommonSortingDirectionEnum.js";
export * from "./TemplatesDocumentationModeEnum.js";
export * from "./TemplatesItem.js";
export * from "./TemplatesSectionSorted.js";
export * from "./CommonTranscriptRequest.js";
Expand Down Expand Up @@ -104,6 +107,13 @@ export * from "./TranscribeTranscriptData.js";
export * from "./TranscribeCommandData.js";
export * from "./TranscribeTranscriptMessage.js";
export * from "./TranscribeCommandMessage.js";
export * from "./TranscribeFormattingDates.js";
export * from "./TranscribeFormattingTimes.js";
export * from "./TranscribeFormattingNumbers.js";
export * from "./TranscribeFormattingMeasurements.js";
export * from "./TranscribeFormattingNumericRanges.js";
export * from "./TranscribeFormattingOrdinals.js";
export * from "./TranscribeFormatting.js";
export * from "./AgentsTaskStatusState.js";
export * from "./AgentsTaskStatus.js";
export * from "./AgentsTextPart.js";
Expand Down
Loading
Loading