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 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;
16 changes: 16 additions & 0 deletions src/api/types/DocumentsSectionOverride.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface DocumentsSectionOverride {
/** The key of the section to be used during document generation. */
key: string;
/** Override to use as the name for the section during document generation. */
nameOverride?: string;
/** Override to use for the section-level writing style. */
writingStyleOverride?: string;
/** Override to use for the section-level format rule. */
formatRuleOverride?: string;
/** Override to use for the section-level additional instructions. */
additionalInstructionsOverride?: 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;
/** Override to use for the template-level additional instructions. */
additionalInstructionsOverride?: string;
}
2 changes: 2 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
28 changes: 28 additions & 0 deletions src/serialization/types/DocumentsSectionOverride.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

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

export const DocumentsSectionOverride: core.serialization.ObjectSchema<
serializers.DocumentsSectionOverride.Raw,
Corti.DocumentsSectionOverride
> = core.serialization.object({
key: core.serialization.string(),
nameOverride: core.serialization.string().optional(),
writingStyleOverride: core.serialization.string().optional(),
formatRuleOverride: core.serialization.string().optional(),
additionalInstructionsOverride: core.serialization.string().optional(),
});

export declare namespace DocumentsSectionOverride {
export interface Raw {
key: string;
nameOverride?: string | null;
writingStyleOverride?: string | null;
formatRuleOverride?: string | null;
additionalInstructionsOverride?: string | null;
}
}
9 changes: 4 additions & 5 deletions src/serialization/types/DocumentsTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
import * as serializers from "../index.js";
import * as Corti from "../../api/index.js";
import * as core from "../../core/index.js";
import { DocumentsTemplateWithSections } from "./DocumentsTemplateWithSections.js";
import { DocumentsTemplateWithSectionKeys } from "./DocumentsTemplateWithSectionKeys.js";

export const DocumentsTemplate: core.serialization.ObjectSchema<
serializers.DocumentsTemplate.Raw,
Corti.DocumentsTemplate
> = DocumentsTemplateWithSectionKeys;
export const DocumentsTemplate: core.serialization.Schema<serializers.DocumentsTemplate.Raw, Corti.DocumentsTemplate> =
core.serialization.undiscriminatedUnion([DocumentsTemplateWithSections, DocumentsTemplateWithSectionKeys]);

export declare namespace DocumentsTemplate {
export type Raw = DocumentsTemplateWithSectionKeys.Raw;
export type Raw = DocumentsTemplateWithSections.Raw | DocumentsTemplateWithSectionKeys.Raw;
}
25 changes: 25 additions & 0 deletions src/serialization/types/DocumentsTemplateWithSections.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

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

export const DocumentsTemplateWithSections: core.serialization.ObjectSchema<
serializers.DocumentsTemplateWithSections.Raw,
Corti.DocumentsTemplateWithSections
> = core.serialization.object({
sections: core.serialization.list(DocumentsSectionOverride).optional(),
description: core.serialization.string().optional(),
additionalInstructionsOverride: core.serialization.string().optional(),
});

export declare namespace DocumentsTemplateWithSections {
export interface Raw {
sections?: DocumentsSectionOverride.Raw[] | null;
description?: string | null;
additionalInstructionsOverride?: string | null;
}
}
2 changes: 2 additions & 0 deletions src/serialization/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
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1300,9 +1300,9 @@ decimal.js@^10.4.2:
integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==

dedent@^1.0.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca"
integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==
version "1.7.1"
resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.1.tgz#364661eea3d73f3faba7089214420ec2f8f13e15"
integrity sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg==

deepmerge@^4.2.2:
version "4.3.1"
Expand Down
Loading