From 6a0eb99dc4482169e4391281946c41c7da251987 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Sat, 26 Aug 2023 06:32:13 +0000 Subject: [PATCH] Release 0.0.16 --- package.json | 2 +- src/api/resources/actions/client/Client.ts | 8 ++--- src/api/resources/agents/client/Client.ts | 8 ++--- .../agents/client/requests/AgentParams.ts | 2 +- src/api/resources/calls/client/Client.ts | 10 +++--- src/api/resources/numbers/client/Client.ts | 10 +++--- src/api/resources/usage/client/Client.ts | 2 +- src/api/resources/voices/client/Client.ts | 8 ++--- src/api/resources/webhooks/client/Client.ts | 8 ++--- src/api/types/Agent.ts | 2 +- src/api/types/AgentParamsPrompt.ts | 7 ++++ src/api/types/AgentUpdateParamsPrompt.ts | 2 +- src/api/types/CollectField.ts | 12 +++++++ src/api/types/CollectFieldFieldType.ts | 10 ++++++ src/api/types/CreateCallAgentParams.ts | 2 +- src/api/types/CreateCallAgentParamsPrompt.ts | 7 ++++ src/api/types/NormalizedAgent.ts | 2 +- src/api/types/NormalizedAgentPrompt.ts | 7 ++++ src/api/types/Prompt.ts | 13 ++++++++ src/api/types/PromptParams.ts | 11 +++++++ src/api/types/PromptUpdateParams.ts | 11 +++++++ .../types/PromptUpdateParamsCollectFields.ts | 7 ++++ src/api/types/PromptUpdateParamsContent.ts | 7 ++++ .../PromptUpdateParamsContextEndpoint.ts | 7 ++++ src/api/types/index.ts | 11 +++++++ .../agents/client/requests/AgentParams.ts | 4 +-- src/serialization/types/Agent.ts | 4 +-- src/serialization/types/AgentParamsPrompt.ts | 17 ++++++++++ .../types/AgentUpdateParamsPrompt.ts | 3 +- src/serialization/types/CollectField.ts | 27 ++++++++++++++++ .../types/CollectFieldFieldType.ts | 16 ++++++++++ .../types/CreateCallAgentParams.ts | 4 +-- .../types/CreateCallAgentParamsPrompt.ts | 19 +++++++++++ src/serialization/types/NormalizedAgent.ts | 4 +-- .../types/NormalizedAgentPrompt.ts | 19 +++++++++++ src/serialization/types/Prompt.ts | 32 +++++++++++++++++++ src/serialization/types/PromptParams.ts | 27 ++++++++++++++++ src/serialization/types/PromptUpdateParams.ts | 30 +++++++++++++++++ .../types/PromptUpdateParamsCollectFields.ts | 19 +++++++++++ .../types/PromptUpdateParamsContent.ts | 19 +++++++++++ .../PromptUpdateParamsContextEndpoint.ts | 19 +++++++++++ src/serialization/types/index.ts | 11 +++++++ 42 files changed, 408 insertions(+), 42 deletions(-) create mode 100644 src/api/types/AgentParamsPrompt.ts create mode 100644 src/api/types/CollectField.ts create mode 100644 src/api/types/CollectFieldFieldType.ts create mode 100644 src/api/types/CreateCallAgentParamsPrompt.ts create mode 100644 src/api/types/NormalizedAgentPrompt.ts create mode 100644 src/api/types/Prompt.ts create mode 100644 src/api/types/PromptParams.ts create mode 100644 src/api/types/PromptUpdateParams.ts create mode 100644 src/api/types/PromptUpdateParamsCollectFields.ts create mode 100644 src/api/types/PromptUpdateParamsContent.ts create mode 100644 src/api/types/PromptUpdateParamsContextEndpoint.ts create mode 100644 src/serialization/types/AgentParamsPrompt.ts create mode 100644 src/serialization/types/CollectField.ts create mode 100644 src/serialization/types/CollectFieldFieldType.ts create mode 100644 src/serialization/types/CreateCallAgentParamsPrompt.ts create mode 100644 src/serialization/types/NormalizedAgentPrompt.ts create mode 100644 src/serialization/types/Prompt.ts create mode 100644 src/serialization/types/PromptParams.ts create mode 100644 src/serialization/types/PromptUpdateParams.ts create mode 100644 src/serialization/types/PromptUpdateParamsCollectFields.ts create mode 100644 src/serialization/types/PromptUpdateParamsContent.ts create mode 100644 src/serialization/types/PromptUpdateParamsContextEndpoint.ts diff --git a/package.json b/package.json index c23df06..a4279bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vocode/vocode-api", - "version": "0.0.15", + "version": "0.0.16", "private": false, "repository": "https://github.com/vocodedev/vocode-api-node", "main": "./index.js", diff --git a/src/api/resources/actions/client/Client.ts b/src/api/resources/actions/client/Client.ts index 5e5dda7..ab77104 100644 --- a/src/api/resources/actions/client/Client.ts +++ b/src/api/resources/actions/client/Client.ts @@ -37,7 +37,7 @@ export class Actions { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -110,7 +110,7 @@ export class Actions { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -173,7 +173,7 @@ export class Actions { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", body: await serializers.ActionParamsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -239,7 +239,7 @@ export class Actions { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/agents/client/Client.ts b/src/api/resources/agents/client/Client.ts index 4bf1f05..aaf1e53 100644 --- a/src/api/resources/agents/client/Client.ts +++ b/src/api/resources/agents/client/Client.ts @@ -37,7 +37,7 @@ export class Agents { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -110,7 +110,7 @@ export class Agents { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -173,7 +173,7 @@ export class Agents { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", body: await serializers.AgentParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -239,7 +239,7 @@ export class Agents { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/agents/client/requests/AgentParams.ts b/src/api/resources/agents/client/requests/AgentParams.ts index e33a883..a523105 100644 --- a/src/api/resources/agents/client/requests/AgentParams.ts +++ b/src/api/resources/agents/client/requests/AgentParams.ts @@ -5,7 +5,7 @@ import * as Vocode from "../../../.."; export interface AgentParams { - prompt: string; + prompt: Vocode.AgentParamsPrompt; language?: Vocode.Language; actions?: Vocode.AgentParamsActionsItem[]; voice: Vocode.AgentParamsVoice; diff --git a/src/api/resources/calls/client/Client.ts b/src/api/resources/calls/client/Client.ts index 02a3a1a..c5d26a2 100644 --- a/src/api/resources/calls/client/Client.ts +++ b/src/api/resources/calls/client/Client.ts @@ -47,7 +47,7 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -113,7 +113,7 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -179,7 +179,7 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -242,7 +242,7 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", body: await serializers.CreateCallRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -308,7 +308,7 @@ export class Calls { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/numbers/client/Client.ts b/src/api/resources/numbers/client/Client.ts index ab1f804..be1ff61 100644 --- a/src/api/resources/numbers/client/Client.ts +++ b/src/api/resources/numbers/client/Client.ts @@ -47,7 +47,7 @@ export class Numbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -113,7 +113,7 @@ export class Numbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -173,7 +173,7 @@ export class Numbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", timeoutMs: 60000, @@ -226,7 +226,7 @@ export class Numbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -293,7 +293,7 @@ export class Numbers { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/usage/client/Client.ts b/src/api/resources/usage/client/Client.ts index fd92aa9..afa5fd1 100644 --- a/src/api/resources/usage/client/Client.ts +++ b/src/api/resources/usage/client/Client.ts @@ -30,7 +30,7 @@ export class Usage { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", timeoutMs: 60000, diff --git a/src/api/resources/voices/client/Client.ts b/src/api/resources/voices/client/Client.ts index fed00c6..c8cf200 100644 --- a/src/api/resources/voices/client/Client.ts +++ b/src/api/resources/voices/client/Client.ts @@ -37,7 +37,7 @@ export class Voices { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -110,7 +110,7 @@ export class Voices { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -173,7 +173,7 @@ export class Voices { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", body: await serializers.VoiceParamsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -239,7 +239,7 @@ export class Voices { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts index 0d3a6dd..e6262ad 100644 --- a/src/api/resources/webhooks/client/Client.ts +++ b/src/api/resources/webhooks/client/Client.ts @@ -37,7 +37,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -110,7 +110,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, @@ -173,7 +173,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", body: await serializers.WebhookParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), @@ -239,7 +239,7 @@ export class Webhooks { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@vocode/vocode-api", - "X-Fern-SDK-Version": "0.0.15", + "X-Fern-SDK-Version": "0.0.16", }, contentType: "application/json", queryParameters: _queryParams, diff --git a/src/api/types/Agent.ts b/src/api/types/Agent.ts index ac6dfca..1ce53e1 100644 --- a/src/api/types/Agent.ts +++ b/src/api/types/Agent.ts @@ -7,7 +7,7 @@ import * as Vocode from ".."; export interface Agent { id: string; userId: string; - prompt: string; + prompt: Vocode.Prompt; language?: Vocode.Language; actions: Vocode.AgentActionsItem[]; voice: Vocode.AgentVoice; diff --git a/src/api/types/AgentParamsPrompt.ts b/src/api/types/AgentParamsPrompt.ts new file mode 100644 index 0000000..2863a84 --- /dev/null +++ b/src/api/types/AgentParamsPrompt.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export type AgentParamsPrompt = string | Vocode.PromptParams; diff --git a/src/api/types/AgentUpdateParamsPrompt.ts b/src/api/types/AgentUpdateParamsPrompt.ts index df7c56d..ac778a2 100644 --- a/src/api/types/AgentUpdateParamsPrompt.ts +++ b/src/api/types/AgentUpdateParamsPrompt.ts @@ -4,4 +4,4 @@ import * as Vocode from ".."; -export type AgentUpdateParamsPrompt = string | Vocode.Undefined; +export type AgentUpdateParamsPrompt = string | Vocode.PromptUpdateParams | Vocode.Undefined; diff --git a/src/api/types/CollectField.ts b/src/api/types/CollectField.ts new file mode 100644 index 0000000..4927896 --- /dev/null +++ b/src/api/types/CollectField.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export interface CollectField { + fieldType: Vocode.CollectFieldFieldType; + label: string; + name: string; + description?: string; +} diff --git a/src/api/types/CollectFieldFieldType.ts b/src/api/types/CollectFieldFieldType.ts new file mode 100644 index 0000000..44276dd --- /dev/null +++ b/src/api/types/CollectFieldFieldType.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CollectFieldFieldType = "field_type_email" | "field_type_address"; + +export const CollectFieldFieldType = { + FieldTypeEmail: "field_type_email", + FieldTypeAddress: "field_type_address", +} as const; diff --git a/src/api/types/CreateCallAgentParams.ts b/src/api/types/CreateCallAgentParams.ts index 64ee35c..689ef04 100644 --- a/src/api/types/CreateCallAgentParams.ts +++ b/src/api/types/CreateCallAgentParams.ts @@ -5,7 +5,7 @@ import * as Vocode from ".."; export interface CreateCallAgentParams { - prompt: string; + prompt: Vocode.CreateCallAgentParamsPrompt; language?: Vocode.Language; actions?: Vocode.CreateCallAgentParamsActionsItem[]; voice?: Vocode.CreateCallAgentParamsVoice; diff --git a/src/api/types/CreateCallAgentParamsPrompt.ts b/src/api/types/CreateCallAgentParamsPrompt.ts new file mode 100644 index 0000000..51c2792 --- /dev/null +++ b/src/api/types/CreateCallAgentParamsPrompt.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export type CreateCallAgentParamsPrompt = string | Vocode.PromptParams; diff --git a/src/api/types/NormalizedAgent.ts b/src/api/types/NormalizedAgent.ts index 28308e4..ca452af 100644 --- a/src/api/types/NormalizedAgent.ts +++ b/src/api/types/NormalizedAgent.ts @@ -7,7 +7,7 @@ import * as Vocode from ".."; export interface NormalizedAgent { id: string; userId: string; - prompt: string; + prompt: Vocode.NormalizedAgentPrompt; language?: Vocode.Language; actions: string[]; voice: string; diff --git a/src/api/types/NormalizedAgentPrompt.ts b/src/api/types/NormalizedAgentPrompt.ts new file mode 100644 index 0000000..fd224c0 --- /dev/null +++ b/src/api/types/NormalizedAgentPrompt.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export type NormalizedAgentPrompt = string | Vocode.PromptParams; diff --git a/src/api/types/Prompt.ts b/src/api/types/Prompt.ts new file mode 100644 index 0000000..632a97a --- /dev/null +++ b/src/api/types/Prompt.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export interface Prompt { + id: string; + userId: string; + content: string; + collectFields?: Vocode.CollectField[]; + contextEndpoint?: string; +} diff --git a/src/api/types/PromptParams.ts b/src/api/types/PromptParams.ts new file mode 100644 index 0000000..eabd400 --- /dev/null +++ b/src/api/types/PromptParams.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export interface PromptParams { + content: string; + collectFields?: Vocode.CollectField[]; + contextEndpoint?: string; +} diff --git a/src/api/types/PromptUpdateParams.ts b/src/api/types/PromptUpdateParams.ts new file mode 100644 index 0000000..8594dab --- /dev/null +++ b/src/api/types/PromptUpdateParams.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export interface PromptUpdateParams { + content?: Vocode.PromptUpdateParamsContent; + collectFields?: Vocode.PromptUpdateParamsCollectFields; + contextEndpoint?: Vocode.PromptUpdateParamsContextEndpoint; +} diff --git a/src/api/types/PromptUpdateParamsCollectFields.ts b/src/api/types/PromptUpdateParamsCollectFields.ts new file mode 100644 index 0000000..6cf0790 --- /dev/null +++ b/src/api/types/PromptUpdateParamsCollectFields.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export type PromptUpdateParamsCollectFields = Vocode.CollectField[] | Vocode.Undefined; diff --git a/src/api/types/PromptUpdateParamsContent.ts b/src/api/types/PromptUpdateParamsContent.ts new file mode 100644 index 0000000..13399a4 --- /dev/null +++ b/src/api/types/PromptUpdateParamsContent.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export type PromptUpdateParamsContent = string | Vocode.Undefined; diff --git a/src/api/types/PromptUpdateParamsContextEndpoint.ts b/src/api/types/PromptUpdateParamsContextEndpoint.ts new file mode 100644 index 0000000..b672e0b --- /dev/null +++ b/src/api/types/PromptUpdateParamsContextEndpoint.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vocode from ".."; + +export type PromptUpdateParamsContextEndpoint = string | Vocode.Undefined; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 448c66a..eec8936 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -3,6 +3,7 @@ export * from "./UpdateNumberRequestInboundAgent"; export * from "./CreateCallRequestAgent"; export * from "./ActionParamsRequest"; export * from "./ActionUpdateParamsRequest"; +export * from "./AgentParamsPrompt"; export * from "./AgentParamsActionsItem"; export * from "./AgentParamsActionsItemOne"; export * from "./AgentParamsVoice"; @@ -45,7 +46,10 @@ export * from "./AzureVoiceUpdateParamsRate"; export * from "./Call"; export * from "./CallPage"; export * from "./CallStatus"; +export * from "./CollectField"; +export * from "./CollectFieldFieldType"; export * from "./CreateCallAgentParams"; +export * from "./CreateCallAgentParamsPrompt"; export * from "./CreateCallAgentParamsActionsItem"; export * from "./CreateCallAgentParamsActionsItemOne"; export * from "./CreateCallAgentParamsVoice"; @@ -74,6 +78,7 @@ export * from "./HttpValidationError"; export * from "./InterruptSensitivity"; export * from "./Language"; export * from "./NormalizedAgent"; +export * from "./NormalizedAgentPrompt"; export * from "./NormalizedAgentVectorDatabase"; export * from "./NormalizedCall"; export * from "./NormalizedPhoneNumber"; @@ -92,6 +97,12 @@ export * from "./PlayHtVoiceUpdateParams"; export * from "./PlayHtVoiceUpdateParamsVoiceId"; export * from "./PlayHtVoiceUpdateParamsApiUserId"; export * from "./PlayHtVoiceUpdateParamsApiKey"; +export * from "./Prompt"; +export * from "./PromptParams"; +export * from "./PromptUpdateParams"; +export * from "./PromptUpdateParamsContent"; +export * from "./PromptUpdateParamsCollectFields"; +export * from "./PromptUpdateParamsContextEndpoint"; export * from "./RimeVoice"; export * from "./RimeVoiceParams"; export * from "./RimeVoiceUpdateParams"; diff --git a/src/serialization/resources/agents/client/requests/AgentParams.ts b/src/serialization/resources/agents/client/requests/AgentParams.ts index b2ef476..84a4faf 100644 --- a/src/serialization/resources/agents/client/requests/AgentParams.ts +++ b/src/serialization/resources/agents/client/requests/AgentParams.ts @@ -8,7 +8,7 @@ import * as core from "../../../../../core"; export const AgentParams: core.serialization.Schema = core.serialization.object({ - prompt: core.serialization.string(), + prompt: core.serialization.lazy(async () => (await import("../../../..")).AgentParamsPrompt), language: core.serialization.lazy(async () => (await import("../../../..")).Language).optional(), actions: core.serialization .list(core.serialization.lazy(async () => (await import("../../../..")).AgentParamsActionsItem)) @@ -29,7 +29,7 @@ export const AgentParams: core.serialization.Schema = core.serialization.object({ id: core.serialization.string(), userId: core.serialization.property("user_id", core.serialization.string()), - prompt: core.serialization.string(), + prompt: core.serialization.lazyObject(async () => (await import("..")).Prompt), language: core.serialization.lazy(async () => (await import("..")).Language).optional(), actions: core.serialization.list(core.serialization.lazy(async () => (await import("..")).AgentActionsItem)), voice: core.serialization.lazy(async () => (await import("..")).AgentVoice), @@ -30,7 +30,7 @@ export declare namespace Agent { interface Raw { id: string; user_id: string; - prompt: string; + prompt: serializers.Prompt.Raw; language?: serializers.Language.Raw | null; actions: serializers.AgentActionsItem.Raw[]; voice: serializers.AgentVoice.Raw; diff --git a/src/serialization/types/AgentParamsPrompt.ts b/src/serialization/types/AgentParamsPrompt.ts new file mode 100644 index 0000000..a8b7ac0 --- /dev/null +++ b/src/serialization/types/AgentParamsPrompt.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const AgentParamsPrompt: core.serialization.Schema = + core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(async () => (await import("..")).PromptParams), + ]); + +export declare namespace AgentParamsPrompt { + type Raw = string | serializers.PromptParams.Raw; +} diff --git a/src/serialization/types/AgentUpdateParamsPrompt.ts b/src/serialization/types/AgentUpdateParamsPrompt.ts index c06af09..099c432 100644 --- a/src/serialization/types/AgentUpdateParamsPrompt.ts +++ b/src/serialization/types/AgentUpdateParamsPrompt.ts @@ -11,9 +11,10 @@ export const AgentUpdateParamsPrompt: core.serialization.Schema< Vocode.AgentUpdateParamsPrompt > = core.serialization.undiscriminatedUnion([ core.serialization.string(), + core.serialization.lazyObject(async () => (await import("..")).PromptUpdateParams), core.serialization.lazyObject(async () => (await import("..")).Undefined), ]); export declare namespace AgentUpdateParamsPrompt { - type Raw = string | serializers.Undefined.Raw; + type Raw = string | serializers.PromptUpdateParams.Raw | serializers.Undefined.Raw; } diff --git a/src/serialization/types/CollectField.ts b/src/serialization/types/CollectField.ts new file mode 100644 index 0000000..88ae061 --- /dev/null +++ b/src/serialization/types/CollectField.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const CollectField: core.serialization.ObjectSchema = + core.serialization.object({ + fieldType: core.serialization.property( + "field_type", + core.serialization.lazy(async () => (await import("..")).CollectFieldFieldType) + ), + label: core.serialization.string(), + name: core.serialization.string(), + description: core.serialization.string().optional(), + }); + +export declare namespace CollectField { + interface Raw { + field_type: serializers.CollectFieldFieldType.Raw; + label: string; + name: string; + description?: string | null; + } +} diff --git a/src/serialization/types/CollectFieldFieldType.ts b/src/serialization/types/CollectFieldFieldType.ts new file mode 100644 index 0000000..ccf5983 --- /dev/null +++ b/src/serialization/types/CollectFieldFieldType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const CollectFieldFieldType: core.serialization.Schema< + serializers.CollectFieldFieldType.Raw, + Vocode.CollectFieldFieldType +> = core.serialization.enum_(["field_type_email", "field_type_address"]); + +export declare namespace CollectFieldFieldType { + type Raw = "field_type_email" | "field_type_address"; +} diff --git a/src/serialization/types/CreateCallAgentParams.ts b/src/serialization/types/CreateCallAgentParams.ts index b1a9b63..6ea13c5 100644 --- a/src/serialization/types/CreateCallAgentParams.ts +++ b/src/serialization/types/CreateCallAgentParams.ts @@ -10,7 +10,7 @@ export const CreateCallAgentParams: core.serialization.ObjectSchema< serializers.CreateCallAgentParams.Raw, Vocode.CreateCallAgentParams > = core.serialization.object({ - prompt: core.serialization.string(), + prompt: core.serialization.lazy(async () => (await import("..")).CreateCallAgentParamsPrompt), language: core.serialization.lazy(async () => (await import("..")).Language).optional(), actions: core.serialization .list(core.serialization.lazy(async () => (await import("..")).CreateCallAgentParamsActionsItem)) @@ -31,7 +31,7 @@ export const CreateCallAgentParams: core.serialization.ObjectSchema< export declare namespace CreateCallAgentParams { interface Raw { - prompt: string; + prompt: serializers.CreateCallAgentParamsPrompt.Raw; language?: serializers.Language.Raw | null; actions?: serializers.CreateCallAgentParamsActionsItem.Raw[] | null; voice?: serializers.CreateCallAgentParamsVoice.Raw | null; diff --git a/src/serialization/types/CreateCallAgentParamsPrompt.ts b/src/serialization/types/CreateCallAgentParamsPrompt.ts new file mode 100644 index 0000000..df43cee --- /dev/null +++ b/src/serialization/types/CreateCallAgentParamsPrompt.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const CreateCallAgentParamsPrompt: core.serialization.Schema< + serializers.CreateCallAgentParamsPrompt.Raw, + Vocode.CreateCallAgentParamsPrompt +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(async () => (await import("..")).PromptParams), +]); + +export declare namespace CreateCallAgentParamsPrompt { + type Raw = string | serializers.PromptParams.Raw; +} diff --git a/src/serialization/types/NormalizedAgent.ts b/src/serialization/types/NormalizedAgent.ts index 55b2780..bef6440 100644 --- a/src/serialization/types/NormalizedAgent.ts +++ b/src/serialization/types/NormalizedAgent.ts @@ -10,7 +10,7 @@ export const NormalizedAgent: core.serialization.ObjectSchema (await import("..")).NormalizedAgentPrompt), language: core.serialization.lazy(async () => (await import("..")).Language).optional(), actions: core.serialization.list(core.serialization.string()), voice: core.serialization.string(), @@ -31,7 +31,7 @@ export declare namespace NormalizedAgent { interface Raw { id: string; user_id: string; - prompt: string; + prompt: serializers.NormalizedAgentPrompt.Raw; language?: serializers.Language.Raw | null; actions: string[]; voice: string; diff --git a/src/serialization/types/NormalizedAgentPrompt.ts b/src/serialization/types/NormalizedAgentPrompt.ts new file mode 100644 index 0000000..c1167a4 --- /dev/null +++ b/src/serialization/types/NormalizedAgentPrompt.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const NormalizedAgentPrompt: core.serialization.Schema< + serializers.NormalizedAgentPrompt.Raw, + Vocode.NormalizedAgentPrompt +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(async () => (await import("..")).PromptParams), +]); + +export declare namespace NormalizedAgentPrompt { + type Raw = string | serializers.PromptParams.Raw; +} diff --git a/src/serialization/types/Prompt.ts b/src/serialization/types/Prompt.ts new file mode 100644 index 0000000..683d845 --- /dev/null +++ b/src/serialization/types/Prompt.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const Prompt: core.serialization.ObjectSchema = core.serialization.object( + { + id: core.serialization.string(), + userId: core.serialization.property("user_id", core.serialization.string()), + content: core.serialization.string(), + collectFields: core.serialization.property( + "collect_fields", + core.serialization + .list(core.serialization.lazyObject(async () => (await import("..")).CollectField)) + .optional() + ), + contextEndpoint: core.serialization.property("context_endpoint", core.serialization.string().optional()), + } +); + +export declare namespace Prompt { + interface Raw { + id: string; + user_id: string; + content: string; + collect_fields?: serializers.CollectField.Raw[] | null; + context_endpoint?: string | null; + } +} diff --git a/src/serialization/types/PromptParams.ts b/src/serialization/types/PromptParams.ts new file mode 100644 index 0000000..14511b6 --- /dev/null +++ b/src/serialization/types/PromptParams.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const PromptParams: core.serialization.ObjectSchema = + core.serialization.object({ + content: core.serialization.string(), + collectFields: core.serialization.property( + "collect_fields", + core.serialization + .list(core.serialization.lazyObject(async () => (await import("..")).CollectField)) + .optional() + ), + contextEndpoint: core.serialization.property("context_endpoint", core.serialization.string().optional()), + }); + +export declare namespace PromptParams { + interface Raw { + content: string; + collect_fields?: serializers.CollectField.Raw[] | null; + context_endpoint?: string | null; + } +} diff --git a/src/serialization/types/PromptUpdateParams.ts b/src/serialization/types/PromptUpdateParams.ts new file mode 100644 index 0000000..d1ebb15 --- /dev/null +++ b/src/serialization/types/PromptUpdateParams.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const PromptUpdateParams: core.serialization.ObjectSchema< + serializers.PromptUpdateParams.Raw, + Vocode.PromptUpdateParams +> = core.serialization.object({ + content: core.serialization.lazy(async () => (await import("..")).PromptUpdateParamsContent).optional(), + collectFields: core.serialization.property( + "collect_fields", + core.serialization.lazy(async () => (await import("..")).PromptUpdateParamsCollectFields).optional() + ), + contextEndpoint: core.serialization.property( + "context_endpoint", + core.serialization.lazy(async () => (await import("..")).PromptUpdateParamsContextEndpoint).optional() + ), +}); + +export declare namespace PromptUpdateParams { + interface Raw { + content?: serializers.PromptUpdateParamsContent.Raw | null; + collect_fields?: serializers.PromptUpdateParamsCollectFields.Raw | null; + context_endpoint?: serializers.PromptUpdateParamsContextEndpoint.Raw | null; + } +} diff --git a/src/serialization/types/PromptUpdateParamsCollectFields.ts b/src/serialization/types/PromptUpdateParamsCollectFields.ts new file mode 100644 index 0000000..08543c4 --- /dev/null +++ b/src/serialization/types/PromptUpdateParamsCollectFields.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const PromptUpdateParamsCollectFields: core.serialization.Schema< + serializers.PromptUpdateParamsCollectFields.Raw, + Vocode.PromptUpdateParamsCollectFields +> = core.serialization.undiscriminatedUnion([ + core.serialization.list(core.serialization.lazyObject(async () => (await import("..")).CollectField)), + core.serialization.lazyObject(async () => (await import("..")).Undefined), +]); + +export declare namespace PromptUpdateParamsCollectFields { + type Raw = serializers.CollectField.Raw[] | serializers.Undefined.Raw; +} diff --git a/src/serialization/types/PromptUpdateParamsContent.ts b/src/serialization/types/PromptUpdateParamsContent.ts new file mode 100644 index 0000000..b08fb5e --- /dev/null +++ b/src/serialization/types/PromptUpdateParamsContent.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const PromptUpdateParamsContent: core.serialization.Schema< + serializers.PromptUpdateParamsContent.Raw, + Vocode.PromptUpdateParamsContent +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(async () => (await import("..")).Undefined), +]); + +export declare namespace PromptUpdateParamsContent { + type Raw = string | serializers.Undefined.Raw; +} diff --git a/src/serialization/types/PromptUpdateParamsContextEndpoint.ts b/src/serialization/types/PromptUpdateParamsContextEndpoint.ts new file mode 100644 index 0000000..a597759 --- /dev/null +++ b/src/serialization/types/PromptUpdateParamsContextEndpoint.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from ".."; +import * as Vocode from "../../api"; +import * as core from "../../core"; + +export const PromptUpdateParamsContextEndpoint: core.serialization.Schema< + serializers.PromptUpdateParamsContextEndpoint.Raw, + Vocode.PromptUpdateParamsContextEndpoint +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(async () => (await import("..")).Undefined), +]); + +export declare namespace PromptUpdateParamsContextEndpoint { + type Raw = string | serializers.Undefined.Raw; +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 448c66a..eec8936 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -3,6 +3,7 @@ export * from "./UpdateNumberRequestInboundAgent"; export * from "./CreateCallRequestAgent"; export * from "./ActionParamsRequest"; export * from "./ActionUpdateParamsRequest"; +export * from "./AgentParamsPrompt"; export * from "./AgentParamsActionsItem"; export * from "./AgentParamsActionsItemOne"; export * from "./AgentParamsVoice"; @@ -45,7 +46,10 @@ export * from "./AzureVoiceUpdateParamsRate"; export * from "./Call"; export * from "./CallPage"; export * from "./CallStatus"; +export * from "./CollectField"; +export * from "./CollectFieldFieldType"; export * from "./CreateCallAgentParams"; +export * from "./CreateCallAgentParamsPrompt"; export * from "./CreateCallAgentParamsActionsItem"; export * from "./CreateCallAgentParamsActionsItemOne"; export * from "./CreateCallAgentParamsVoice"; @@ -74,6 +78,7 @@ export * from "./HttpValidationError"; export * from "./InterruptSensitivity"; export * from "./Language"; export * from "./NormalizedAgent"; +export * from "./NormalizedAgentPrompt"; export * from "./NormalizedAgentVectorDatabase"; export * from "./NormalizedCall"; export * from "./NormalizedPhoneNumber"; @@ -92,6 +97,12 @@ export * from "./PlayHtVoiceUpdateParams"; export * from "./PlayHtVoiceUpdateParamsVoiceId"; export * from "./PlayHtVoiceUpdateParamsApiUserId"; export * from "./PlayHtVoiceUpdateParamsApiKey"; +export * from "./Prompt"; +export * from "./PromptParams"; +export * from "./PromptUpdateParams"; +export * from "./PromptUpdateParamsContent"; +export * from "./PromptUpdateParamsCollectFields"; +export * from "./PromptUpdateParamsContextEndpoint"; export * from "./RimeVoice"; export * from "./RimeVoiceParams"; export * from "./RimeVoiceUpdateParams";