Skip to content
Draft
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
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/FactsCreateItem.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 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. */
Expand Down
2 changes: 1 addition & 1 deletion 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 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
5 changes: 2 additions & 3 deletions src/serialization/types/FactsBatchUpdateInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
import * as serializers from "../index.js";
import * as Corti from "../../api/index.js";
import * as core from "../../core/index.js";
import { Uuid } from "./Uuid.js";

export const FactsBatchUpdateInput: core.serialization.ObjectSchema<
serializers.FactsBatchUpdateInput.Raw,
Corti.FactsBatchUpdateInput
> = core.serialization.object({
factId: Uuid,
factId: core.serialization.string(),
isDiscarded: core.serialization.boolean().optional(),
text: core.serialization.string().optional(),
group: core.serialization.string().optional(),
});

export declare namespace FactsBatchUpdateInput {
export interface Raw {
factId: Uuid.Raw;
factId: string;
isDiscarded?: boolean | null;
text?: string | null;
group?: string | null;
Expand Down
4 changes: 2 additions & 2 deletions src/serialization/types/FactsBatchUpdateItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const FactsBatchUpdateItem: core.serialization.ObjectSchema<
serializers.FactsBatchUpdateItem.Raw,
Corti.FactsBatchUpdateItem
> = core.serialization.object({
id: Uuid,
id: core.serialization.string(),
text: core.serialization.string(),
group: core.serialization.string(),
groupId: Uuid,
Expand All @@ -24,7 +24,7 @@ export const FactsBatchUpdateItem: core.serialization.ObjectSchema<

export declare namespace FactsBatchUpdateItem {
export interface Raw {
id: Uuid.Raw;
id: string;
text: string;
group: string;
groupId: Uuid.Raw;
Expand Down
4 changes: 2 additions & 2 deletions src/serialization/types/FactsCreateItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CommonSourceEnum } from "./CommonSourceEnum.js";

export const FactsCreateItem: core.serialization.ObjectSchema<serializers.FactsCreateItem.Raw, Corti.FactsCreateItem> =
core.serialization.object({
id: Uuid.optional(),
id: core.serialization.string().optional(),
text: core.serialization.string().optional(),
group: core.serialization.string().optional(),
groupId: Uuid.optional(),
Expand All @@ -21,7 +21,7 @@ export const FactsCreateItem: core.serialization.ObjectSchema<serializers.FactsC

export declare namespace FactsCreateItem {
export interface Raw {
id?: Uuid.Raw | null;
id?: string | null;
text?: string | null;
group?: string | null;
groupId?: Uuid.Raw | null;
Expand Down
4 changes: 2 additions & 2 deletions src/serialization/types/FactsListItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FactsEvidence } from "./FactsEvidence.js";

export const FactsListItem: core.serialization.ObjectSchema<serializers.FactsListItem.Raw, Corti.FactsListItem> =
core.serialization.object({
id: Uuid.optional(),
id: core.serialization.string().optional(),
text: core.serialization.string().optional(),
group: core.serialization.string().optional(),
groupId: Uuid.optional(),
Expand All @@ -24,7 +24,7 @@ export const FactsListItem: core.serialization.ObjectSchema<serializers.FactsLis

export declare namespace FactsListItem {
export interface Raw {
id?: Uuid.Raw | null;
id?: string | null;
text?: string | null;
group?: string | null;
groupId?: Uuid.Raw | null;
Expand Down
4 changes: 2 additions & 2 deletions src/serialization/types/FactsUpdateResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const FactsUpdateResponse: core.serialization.ObjectSchema<
serializers.FactsUpdateResponse.Raw,
Corti.FactsUpdateResponse
> = core.serialization.object({
id: Uuid,
id: core.serialization.string(),
text: core.serialization.string(),
group: core.serialization.string(),
groupId: Uuid,
Expand All @@ -24,7 +24,7 @@ export const FactsUpdateResponse: core.serialization.ObjectSchema<

export declare namespace FactsUpdateResponse {
export interface Raw {
id: Uuid.Raw;
id: string;
text: string;
group: string;
groupId: Uuid.Raw;
Expand Down
Loading