diff --git a/src/api/types/DocumentsContextWithFacts.ts b/src/api/types/DocumentsContextWithFacts.ts index 52ef00c..9b9a0f7 100644 --- a/src/api/types/DocumentsContextWithFacts.ts +++ b/src/api/types/DocumentsContextWithFacts.ts @@ -7,6 +7,6 @@ import * as Corti from "../index.js"; export interface DocumentsContextWithFacts { /** The type of context data that will be used in the request: `Facts`, `Transcript`, or `String`. */ type: "facts"; - /** An array of facts. */ + /** An array of facts. See [guide](/textgen/documents-standard##generate-document-from-facts-as-input). */ data: Corti.FactsContext[]; } diff --git a/src/api/types/DocumentsContextWithTranscript.ts b/src/api/types/DocumentsContextWithTranscript.ts index e1a2383..4ad559d 100644 --- a/src/api/types/DocumentsContextWithTranscript.ts +++ b/src/api/types/DocumentsContextWithTranscript.ts @@ -7,6 +7,6 @@ import * as Corti from "../index.js"; export interface DocumentsContextWithTranscript { /** The type of context data that will be used in the request: `Facts`, `Transcript`, or `String`. */ type: "transcript"; - /** Transcript object can accept the full transcript in one string, or individual transcript segments. */ + /** The transcript `data.text` object can accept the full transcript in one string, alternatively pass each transcript segment into a `context` object - [see guide](/textgen/documents-standard#generate-document-from-transcript-as-input). */ data: Corti.CommonTranscriptRequest; } diff --git a/src/api/types/DocumentsCreateRequestWithTemplate.ts b/src/api/types/DocumentsCreateRequestWithTemplate.ts index b52285c..943aaa0 100644 --- a/src/api/types/DocumentsCreateRequestWithTemplate.ts +++ b/src/api/types/DocumentsCreateRequestWithTemplate.ts @@ -5,7 +5,7 @@ import * as Corti from "../index.js"; export interface DocumentsCreateRequestWithTemplate { - /** An array of context objects. Currently accepts exactly one context object to be used as input for document generation. */ + /** An array of context objects. Currently only accepts multiple objects when of type `transcript`. See [guide](/textgen/documents-standard#generate-document-from-transcript-as-input). */ context: Corti.DocumentsContext[]; /** Template details if the template should be generated during the request. */ template: Corti.DocumentsTemplate; diff --git a/src/api/types/DocumentsCreateRequestWithTemplateKey.ts b/src/api/types/DocumentsCreateRequestWithTemplateKey.ts index 2a1275b..d7a3a94 100644 --- a/src/api/types/DocumentsCreateRequestWithTemplateKey.ts +++ b/src/api/types/DocumentsCreateRequestWithTemplateKey.ts @@ -5,9 +5,9 @@ import * as Corti from "../index.js"; export interface DocumentsCreateRequestWithTemplateKey { - /** An array of context objects. Currently accepts exactly one context object to be used as input for document generation. */ + /** An array of context objects. Currently only accepts multiple objects when of type `transcript`. See [guide](/textgen/documents-standard#generate-document-from-transcript-as-input). */ context: Corti.DocumentsContext[]; - /** The key of the template that informs on what kind of document is to be generated. */ + /** The key of the template referencing the sections for generating a document. */ templateKey: string; /** An optional name for the document. */ name?: string; diff --git a/src/api/types/ErrorResponse.ts b/src/api/types/ErrorResponse.ts index 6de73fe..7733d0a 100644 --- a/src/api/types/ErrorResponse.ts +++ b/src/api/types/ErrorResponse.ts @@ -3,10 +3,9 @@ */ export interface ErrorResponse { - requestid?: string; + requestid: string; + status: number; type: string; - status?: number; - title?: string; - details?: string; - instance?: string; + detail: string; + validationErrors?: Record[]; } diff --git a/src/serialization/types/ErrorResponse.ts b/src/serialization/types/ErrorResponse.ts index 56585ee..4851d53 100644 --- a/src/serialization/types/ErrorResponse.ts +++ b/src/serialization/types/ErrorResponse.ts @@ -8,21 +8,21 @@ import * as core from "../../core/index.js"; export const ErrorResponse: core.serialization.ObjectSchema = core.serialization.object({ - requestid: core.serialization.string().optional(), + requestid: core.serialization.string(), + status: core.serialization.number(), type: core.serialization.string(), - status: core.serialization.number().optional(), - title: core.serialization.string().optional(), - details: core.serialization.string().optional(), - instance: core.serialization.string().optional(), + detail: core.serialization.string(), + validationErrors: core.serialization + .list(core.serialization.record(core.serialization.string(), core.serialization.string())) + .optional(), }); export declare namespace ErrorResponse { export interface Raw { - requestid?: string | null; + requestid: string; + status: number; type: string; - status?: number | null; - title?: string | null; - details?: string | null; - instance?: string | null; + detail: string; + validationErrors?: Record[] | null; } }