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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Corti.
Copyright (c) 2026 Corti.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@corti/sdk",
"version": "0.8.0",
"version": "0.9.0-rc",
"private": false,
"repository": "github:corticph/corti-sdk-javascript",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export class CortiClient {
"Tenant-Name": _options?.tenantName,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@corti/sdk",
"X-Fern-SDK-Version": "0.8.0",
"User-Agent": "@corti/sdk/0.8.0",
"X-Fern-SDK-Version": "0.9.0-rc",
"User-Agent": "@corti/sdk/0.9.0-rc",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
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;
1 change: 1 addition & 0 deletions src/api/types/DocumentsCreateRequestWithTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export interface DocumentsCreateRequestWithTemplate {
outputLanguage: string;
/** Set to true to disable guardrails during document generation, default is false. */
disableGuardrails?: boolean;
documentationMode?: Corti.TemplatesDocumentationModeEnum;
}
1 change: 1 addition & 0 deletions src/api/types/DocumentsCreateRequestWithTemplateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export interface DocumentsCreateRequestWithTemplateKey {
outputLanguage: string;
/** Set to true to disable guardrails during document generation, default is false. */
disableGuardrails?: boolean;
documentationMode?: Corti.TemplatesDocumentationModeEnum;
}
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;
8 changes: 8 additions & 0 deletions src/api/types/TemplatesFormatRule.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.
*/

export interface TemplatesFormatRule {
/** Name of the format rule. */
name?: string | null;
}
15 changes: 9 additions & 6 deletions src/api/types/TemplatesItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ import * as Corti from "../index.js";

export interface TemplatesItem {
/** The timestamp when the template was updated. */
dateUpdated?: Date | null;
/** Name of the template */
updatedAt?: Date | null;
/** Name of the template. */
name: string;
/** Description of the template */
/** Description of the template. */
description: string;
/** Unique key for the template */
/** Instructions or context for all template sections. */
additionalInstructions?: string | null;
/** Unique key for the template. */
key: string;
/** Status of the template. */
status: string;
/** List of sections included in the template */
documentationMode?: Corti.TemplatesDocumentationModeEnum;
/** List of sections included in the template. */
templateSections: Corti.TemplatesSectionSorted[];
/** Available translations for the template */
/** Available translations for the template. */
translations: Corti.TemplatesTranslation[];
}
27 changes: 17 additions & 10 deletions src/api/types/TemplatesSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,26 @@ import * as Corti from "../index.js";

export interface TemplatesSection {
/** The timestamp when the section was updated. */
dateUpdated?: Date | null;
/** Name of the section */
updatedAt?: Date | null;
/** Name of the section. */
name: string;
/** Alternate names for the section */
alternateNames?: string[] | null;
/** Unique key for the section */
/** Alternate name for the section. Not used by LLM response. */
alternateName?: string;
/** Unique key for the section. */
key: string;
/** Description of the section */
/** Description of the section. */
description: string;
/** Default writing style for the section */
/** Default writing style for the section. */
defaultWritingStyle: Corti.TemplatesWritingStyle;
/** Type of section */
sectionType: string;
/** Available translations for the section */
/** Default format rule for the section. */
defaultFormatRule?: Corti.TemplatesFormatRule;
/** Additional instructions or context for the section. */
additionalInstructions?: string;
/** Used to guide input assignment in documentationMode: routed_parallel, and for section generation. */
content?: string;
documentationMode?: Corti.TemplatesDocumentationModeEnum;
/** Type of section. */
type: string;
/** Available translations for the section. */
translations: Corti.TemplatesSectionTranslation[];
}
6 changes: 3 additions & 3 deletions src/api/types/TemplatesSectionSorted.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import * as Corti from "../index.js";

export interface TemplatesSectionSorted {
/** Sort order of the section within the template */
/** Sort order of the section within the template. */
sort: number;
/** The section details */
sectionsId: Corti.TemplatesSection;
/** The section details. */
section: Corti.TemplatesSection;
}
8 changes: 4 additions & 4 deletions src/api/types/TemplatesSectionTranslation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*/

export interface TemplatesSectionTranslation {
/** Language identifier */
languagesId: string;
/** Localized name */
/** Language code. */
languageId: string;
/** Localized name. */
name?: string | null;
/** Localized description */
/** Localized description. */
description?: string | null;
}
8 changes: 4 additions & 4 deletions src/api/types/TemplatesTranslation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*/

export interface TemplatesTranslation {
/** Language identifier */
languagesId: string;
/** Localized name */
/** Language code. */
languageId: string;
/** Localized name. */
name?: string;
/** Localized description */
/** Localized description. */
description?: string;
}
2 changes: 1 addition & 1 deletion src/api/types/TemplatesWritingStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
*/

export interface TemplatesWritingStyle {
/** Name of the writing style */
/** Name of the writing style. */
name: string;
}
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[];
}
Loading