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/DocumentsContextWithFacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
}
2 changes: 1 addition & 1 deletion src/api/types/DocumentsContextWithTranscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/api/types/DocumentsCreateRequestWithTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/api/types/DocumentsCreateRequestWithTemplateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 4 additions & 5 deletions src/api/types/ErrorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>[];
}
20 changes: 10 additions & 10 deletions src/serialization/types/ErrorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import * as core from "../../core/index.js";

export const ErrorResponse: core.serialization.ObjectSchema<serializers.ErrorResponse.Raw, Corti.ErrorResponse> =
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<string, string>[] | null;
}
}