retell-sdk 2.2.1 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +3 -433
  2. package/example.d.ts +2 -0
  3. package/example.d.ts.map +1 -0
  4. package/example.js +74 -0
  5. package/example.js.map +1 -0
  6. package/models/components/agent.d.ts +131 -24
  7. package/models/components/agent.d.ts.map +1 -1
  8. package/models/components/agent.js +143 -27
  9. package/models/components/agent.js.map +1 -1
  10. package/models/components/index.d.ts +0 -1
  11. package/models/components/index.d.ts.map +1 -1
  12. package/models/components/index.js +0 -1
  13. package/models/components/index.js.map +1 -1
  14. package/models/operations/createagent.d.ts +8 -35
  15. package/models/operations/createagent.d.ts.map +1 -1
  16. package/models/operations/createagent.js +8 -32
  17. package/models/operations/createagent.js.map +1 -1
  18. package/models/operations/createphonecall.d.ts +12 -6
  19. package/models/operations/createphonecall.d.ts.map +1 -1
  20. package/models/operations/createphonecall.js +8 -8
  21. package/models/operations/createphonecall.js.map +1 -1
  22. package/models/operations/createphonenumber.d.ts +1 -1
  23. package/models/operations/createwebcall.d.ts +16 -0
  24. package/models/operations/createwebcall.d.ts.map +1 -0
  25. package/models/operations/createwebcall.js +3 -0
  26. package/models/operations/createwebcall.js.map +1 -0
  27. package/models/operations/index.d.ts +1 -0
  28. package/models/operations/index.d.ts.map +1 -1
  29. package/models/operations/index.js +1 -0
  30. package/models/operations/index.js.map +1 -1
  31. package/models/operations/listagents.d.ts +3 -3
  32. package/models/operations/listagents.d.ts.map +1 -1
  33. package/models/operations/listagents.js +4 -4
  34. package/models/operations/listagents.js.map +1 -1
  35. package/models/operations/listcalls.d.ts +3 -3
  36. package/models/operations/listcalls.d.ts.map +1 -1
  37. package/models/operations/listcalls.js +4 -4
  38. package/models/operations/listcalls.js.map +1 -1
  39. package/models/operations/listphonenumbers.d.ts +3 -3
  40. package/models/operations/listphonenumbers.d.ts.map +1 -1
  41. package/models/operations/listphonenumbers.js +4 -4
  42. package/models/operations/listphonenumbers.js.map +1 -1
  43. package/models/operations/updateagent.d.ts +35 -3
  44. package/models/operations/updateagent.d.ts.map +1 -1
  45. package/models/operations/updateagent.js +39 -5
  46. package/models/operations/updateagent.js.map +1 -1
  47. package/package.json +1 -1
  48. package/sdk/liveClient.d.ts +2 -4
  49. package/sdk/liveClient.d.ts.map +1 -1
  50. package/sdk/liveClient.js +9 -5
  51. package/sdk/liveClient.js.map +1 -1
  52. package/sdk/sdk.d.ts +2 -6
  53. package/sdk/sdk.d.ts.map +1 -1
  54. package/sdk/sdk.js +10 -10
  55. package/sdk/sdk.js.map +1 -1
  56. package/src/example.ts +79 -0
  57. package/src/models/components/agent.ts +275 -52
  58. package/src/models/components/index.ts +0 -1
  59. package/src/models/operations/createagent.ts +20 -67
  60. package/src/models/operations/createphonecall.ts +20 -14
  61. package/src/models/operations/createphonenumber.ts +1 -1
  62. package/src/models/operations/createwebcall.ts +16 -0
  63. package/src/models/operations/index.ts +1 -0
  64. package/src/models/operations/listagents.ts +7 -7
  65. package/src/models/operations/listcalls.ts +7 -7
  66. package/src/models/operations/listphonenumbers.ts +7 -7
  67. package/src/models/operations/updateagent.ts +76 -7
  68. package/src/sdk/liveClient.ts +11 -8
  69. package/src/sdk/sdk.ts +10 -17
  70. package/docs/sdks/retellclient/README.md +0 -713
  71. package/src/models/components/agentnodefaultnorequired.ts +0 -121
@@ -0,0 +1,16 @@
1
+ import * as components from "../../models/components";
2
+
3
+ export type CreateWebCallRequestBody = {
4
+ /**
5
+ * Unique agent id to associate with this phone number. Can be updated.
6
+ */
7
+ agentId: string;
8
+ /**
9
+ * Supply values to your agent prompt parameters. If the given key value cannot match any param in prompt, it would have have any effect.
10
+ */
11
+ agentPromptParams?: Array<components.AgentPromptParams> | undefined;
12
+ /**
13
+ * Sample rate for the call.
14
+ */
15
+ sampleRate?: number | undefined;
16
+ };
@@ -4,6 +4,7 @@
4
4
 
5
5
  export * from "./createagent";
6
6
  export * from "./createphonecall";
7
+ export * from "./createwebcall";
7
8
  export * from "./createphonenumber";
8
9
  export * from "./deleteagent";
9
10
  export * from "./deletephonenumber";
@@ -21,7 +21,7 @@ export type ListAgentsResponse = {
21
21
  /**
22
22
  * Successfully retrieved all agents.
23
23
  */
24
- classes?: Array<components.Agent> | undefined;
24
+ agents?: Array<components.Agent> | undefined;
25
25
  };
26
26
 
27
27
  /** @internal */
@@ -30,7 +30,7 @@ export namespace ListAgentsResponse$ {
30
30
  ContentType: string;
31
31
  StatusCode: number;
32
32
  RawResponse: Response;
33
- classes?: Array<components.Agent$.Inbound> | undefined;
33
+ agents?: Array<components.Agent$.Inbound> | undefined;
34
34
  };
35
35
 
36
36
  export const inboundSchema: z.ZodType<ListAgentsResponse, z.ZodTypeDef, Inbound> = z
@@ -38,14 +38,14 @@ export namespace ListAgentsResponse$ {
38
38
  ContentType: z.string(),
39
39
  StatusCode: z.number().int(),
40
40
  RawResponse: z.instanceof(Response),
41
- classes: z.array(components.Agent$.inboundSchema).optional(),
41
+ agents: z.array(components.Agent$.inboundSchema).optional(),
42
42
  })
43
43
  .transform((v) => {
44
44
  return {
45
45
  contentType: v.ContentType,
46
46
  statusCode: v.StatusCode,
47
47
  rawResponse: v.RawResponse,
48
- ...(v.classes === undefined ? null : { classes: v.classes }),
48
+ ...(v.agents === undefined ? null : { agents: v.agents }),
49
49
  };
50
50
  });
51
51
 
@@ -53,7 +53,7 @@ export namespace ListAgentsResponse$ {
53
53
  ContentType: string;
54
54
  StatusCode: number;
55
55
  RawResponse: never;
56
- classes?: Array<components.Agent$.Outbound> | undefined;
56
+ agents?: Array<components.Agent$.Outbound> | undefined;
57
57
  };
58
58
 
59
59
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListAgentsResponse> = z
@@ -63,14 +63,14 @@ export namespace ListAgentsResponse$ {
63
63
  rawResponse: z.instanceof(Response).transform(() => {
64
64
  throw new Error("Response cannot be serialized");
65
65
  }),
66
- classes: z.array(components.Agent$.outboundSchema).optional(),
66
+ agents: z.array(components.Agent$.outboundSchema).optional(),
67
67
  })
68
68
  .transform((v) => {
69
69
  return {
70
70
  ContentType: v.contentType,
71
71
  StatusCode: v.statusCode,
72
72
  RawResponse: v.rawResponse,
73
- ...(v.classes === undefined ? null : { classes: v.classes }),
73
+ ...(v.agents === undefined ? null : { agents: v.agents }),
74
74
  };
75
75
  });
76
76
  }
@@ -74,7 +74,7 @@ export type ListCallsResponse = {
74
74
  /**
75
75
  * Successfully retrieved all agents.
76
76
  */
77
- classes?: Array<components.CallDetail> | undefined;
77
+ calls?: Array<components.CallDetail> | undefined;
78
78
  };
79
79
 
80
80
  /** @internal */
@@ -209,7 +209,7 @@ export namespace ListCallsResponse$ {
209
209
  ContentType: string;
210
210
  StatusCode: number;
211
211
  RawResponse: Response;
212
- classes?: Array<components.CallDetail$.Inbound> | undefined;
212
+ calls?: Array<components.CallDetail$.Inbound> | undefined;
213
213
  };
214
214
 
215
215
  export const inboundSchema: z.ZodType<ListCallsResponse, z.ZodTypeDef, Inbound> = z
@@ -217,14 +217,14 @@ export namespace ListCallsResponse$ {
217
217
  ContentType: z.string(),
218
218
  StatusCode: z.number().int(),
219
219
  RawResponse: z.instanceof(Response),
220
- classes: z.array(components.CallDetail$.inboundSchema).optional(),
220
+ calls: z.array(components.CallDetail$.inboundSchema).optional(),
221
221
  })
222
222
  .transform((v) => {
223
223
  return {
224
224
  contentType: v.ContentType,
225
225
  statusCode: v.StatusCode,
226
226
  rawResponse: v.RawResponse,
227
- ...(v.classes === undefined ? null : { classes: v.classes }),
227
+ ...(v.calls === undefined ? null : { calls: v.calls }),
228
228
  };
229
229
  });
230
230
 
@@ -232,7 +232,7 @@ export namespace ListCallsResponse$ {
232
232
  ContentType: string;
233
233
  StatusCode: number;
234
234
  RawResponse: never;
235
- classes?: Array<components.CallDetail$.Outbound> | undefined;
235
+ calls?: Array<components.CallDetail$.Outbound> | undefined;
236
236
  };
237
237
 
238
238
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListCallsResponse> = z
@@ -242,14 +242,14 @@ export namespace ListCallsResponse$ {
242
242
  rawResponse: z.instanceof(Response).transform(() => {
243
243
  throw new Error("Response cannot be serialized");
244
244
  }),
245
- classes: z.array(components.CallDetail$.outboundSchema).optional(),
245
+ calls: z.array(components.CallDetail$.outboundSchema).optional(),
246
246
  })
247
247
  .transform((v) => {
248
248
  return {
249
249
  ContentType: v.contentType,
250
250
  StatusCode: v.statusCode,
251
251
  RawResponse: v.rawResponse,
252
- ...(v.classes === undefined ? null : { classes: v.classes }),
252
+ ...(v.calls === undefined ? null : { calls: v.calls }),
253
253
  };
254
254
  });
255
255
  }
@@ -21,7 +21,7 @@ export type ListPhoneNumbersResponse = {
21
21
  /**
22
22
  * Successfully retrieved all phone number objects.
23
23
  */
24
- classes?: Array<components.PhoneNumber> | undefined;
24
+ phoneNumbers?: Array<components.PhoneNumber> | undefined;
25
25
  };
26
26
 
27
27
  /** @internal */
@@ -30,7 +30,7 @@ export namespace ListPhoneNumbersResponse$ {
30
30
  ContentType: string;
31
31
  StatusCode: number;
32
32
  RawResponse: Response;
33
- classes?: Array<components.PhoneNumber$.Inbound> | undefined;
33
+ phoneNumbers?: Array<components.PhoneNumber$.Inbound> | undefined;
34
34
  };
35
35
 
36
36
  export const inboundSchema: z.ZodType<ListPhoneNumbersResponse, z.ZodTypeDef, Inbound> = z
@@ -38,14 +38,14 @@ export namespace ListPhoneNumbersResponse$ {
38
38
  ContentType: z.string(),
39
39
  StatusCode: z.number().int(),
40
40
  RawResponse: z.instanceof(Response),
41
- classes: z.array(components.PhoneNumber$.inboundSchema).optional(),
41
+ phoneNumbers: z.array(components.PhoneNumber$.inboundSchema).optional(),
42
42
  })
43
43
  .transform((v) => {
44
44
  return {
45
45
  contentType: v.ContentType,
46
46
  statusCode: v.StatusCode,
47
47
  rawResponse: v.RawResponse,
48
- ...(v.classes === undefined ? null : { classes: v.classes }),
48
+ ...(v.phoneNumbers === undefined ? null : { phoneNumbers: v.phoneNumbers }),
49
49
  };
50
50
  });
51
51
 
@@ -53,7 +53,7 @@ export namespace ListPhoneNumbersResponse$ {
53
53
  ContentType: string;
54
54
  StatusCode: number;
55
55
  RawResponse: never;
56
- classes?: Array<components.PhoneNumber$.Outbound> | undefined;
56
+ phoneNumbers?: Array<components.PhoneNumber$.Outbound> | undefined;
57
57
  };
58
58
 
59
59
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListPhoneNumbersResponse> = z
@@ -63,14 +63,14 @@ export namespace ListPhoneNumbersResponse$ {
63
63
  rawResponse: z.instanceof(Response).transform(() => {
64
64
  throw new Error("Response cannot be serialized");
65
65
  }),
66
- classes: z.array(components.PhoneNumber$.outboundSchema).optional(),
66
+ phoneNumbers: z.array(components.PhoneNumber$.outboundSchema).optional(),
67
67
  })
68
68
  .transform((v) => {
69
69
  return {
70
70
  ContentType: v.contentType,
71
71
  StatusCode: v.statusCode,
72
72
  RawResponse: v.rawResponse,
73
- ...(v.classes === undefined ? null : { classes: v.classes }),
73
+ ...(v.phoneNumbers === undefined ? null : { phoneNumbers: v.phoneNumbers }),
74
74
  };
75
75
  });
76
76
  }
@@ -5,8 +5,77 @@
5
5
  import * as components from "../../models/components";
6
6
  import { z } from "zod";
7
7
 
8
+ export type UpdateAgentRequestBody = {
9
+ /**
10
+ * The name of the agent. Only used for your own reference.
11
+ */
12
+ agentName?: string | undefined;
13
+ /*
14
+ * Determines how to generate the response in the call. Currently supports using our in-house LLM response system or your own custom
15
+ * response generation system.
16
+ */
17
+ llmSetting?: components.RetellLlmSetting | components.CustomLlmSetting | undefined;
18
+ /**
19
+ * Setting combination that controls interaction flow, like begin and end logic.
20
+ */
21
+ interactionSetting?: components.InteractionSettingRequest | undefined;
22
+ /**
23
+ * Unique voice id used for the agent. Find list of available voices in documentation.
24
+ */
25
+ voiceId?: string | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export namespace UpdateAgentRequestBody$ {
30
+ export type Inbound = {
31
+ agent_name?: string | undefined;
32
+ llm_setting?: components.RetellLlmSetting$.Inbound | components.CustomLlmSetting$.Inbound | undefined;
33
+ interaction_setting?: components.InteractionSettingRequest$.Inbound | undefined;
34
+ voice_id?: string | undefined;
35
+ };
36
+
37
+ export const inboundSchema: z.ZodType<UpdateAgentRequestBody, z.ZodTypeDef, Inbound> = z
38
+ .object({
39
+ agent_name: z.string().optional(),
40
+ llm_setting: z.union([components.RetellLlmSetting$.inboundSchema, components.CustomLlmSetting$.inboundSchema]).optional(),
41
+ interaction_setting: components.InteractionSettingRequest$.inboundSchema.optional(),
42
+ voice_id: z.string().optional(),
43
+ })
44
+ .transform((v) => {
45
+ return {
46
+ ...(v.agent_name === undefined ? null : { agentName: v.agent_name }),
47
+ ...(v.llm_setting === undefined ? null : { llmSetting: v.llm_setting }),
48
+ ...(v.interaction_setting === undefined ? null : { interactionSetting: v.interaction_setting }),
49
+ ...(v.voice_id === undefined ? null : { voiceId: v.voice_id }),
50
+ };
51
+ });
52
+
53
+ export type Outbound = {
54
+ agent_name?: string | undefined;
55
+ llm_setting?: components.RetellLlmSetting$.Outbound | components.CustomLlmSetting$.Outbound | undefined;
56
+ interaction_setting?: components.InteractionSettingRequest$.Outbound | undefined;
57
+ voice_id?: string | undefined;
58
+ };
59
+
60
+ export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateAgentRequestBody> = z
61
+ .object({
62
+ agentName: z.string().optional(),
63
+ llmSetting: z.union([components.RetellLlmSetting$.outboundSchema, components.CustomLlmSetting$.outboundSchema]).optional(),
64
+ interactionSetting: components.InteractionSettingRequest$.outboundSchema.optional(),
65
+ voiceId: z.string().optional(),
66
+ })
67
+ .transform((v) => {
68
+ return {
69
+ ...(v.agentName === undefined ? null : { agent_name: v.agentName }),
70
+ ...(v.llmSetting === undefined ? null : { llm_setting: v.llmSetting }),
71
+ ...(v.interactionSetting === undefined ? null : { interaction_setting: v.interactionSetting }),
72
+ ...(v.voiceId === undefined ? null : { voice_id: v.voiceId }),
73
+ };
74
+ });
75
+ }
76
+
8
77
  export type UpdateAgentRequest = {
9
- agentNoDefaultNoRequired: components.AgentNoDefaultNoRequired;
78
+ requestBody: UpdateAgentRequestBody;
10
79
  /**
11
80
  * Unique id of the agent to be updated.
12
81
  */
@@ -35,35 +104,35 @@ export type UpdateAgentResponse = {
35
104
  /** @internal */
36
105
  export namespace UpdateAgentRequest$ {
37
106
  export type Inbound = {
38
- AgentNoDefaultNoRequired: components.AgentNoDefaultNoRequired$.Inbound;
107
+ RequestBody: UpdateAgentRequestBody$.Inbound;
39
108
  agent_id: string;
40
109
  };
41
110
 
42
111
  export const inboundSchema: z.ZodType<UpdateAgentRequest, z.ZodTypeDef, Inbound> = z
43
112
  .object({
44
- AgentNoDefaultNoRequired: components.AgentNoDefaultNoRequired$.inboundSchema,
113
+ RequestBody: UpdateAgentRequestBody$.inboundSchema,
45
114
  agent_id: z.string(),
46
115
  })
47
116
  .transform((v) => {
48
117
  return {
49
- agentNoDefaultNoRequired: v.AgentNoDefaultNoRequired,
118
+ requestBody: v.RequestBody,
50
119
  agentId: v.agent_id,
51
120
  };
52
121
  });
53
122
 
54
123
  export type Outbound = {
55
- AgentNoDefaultNoRequired: components.AgentNoDefaultNoRequired$.Outbound;
124
+ RequestBody: UpdateAgentRequestBody$.Outbound;
56
125
  agent_id: string;
57
126
  };
58
127
 
59
128
  export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateAgentRequest> = z
60
129
  .object({
61
- agentNoDefaultNoRequired: components.AgentNoDefaultNoRequired$.outboundSchema,
130
+ requestBody: UpdateAgentRequestBody$.outboundSchema,
62
131
  agentId: z.string(),
63
132
  })
64
133
  .transform((v) => {
65
134
  return {
66
- AgentNoDefaultNoRequired: v.agentNoDefaultNoRequired,
135
+ RequestBody: v.requestBody,
67
136
  agent_id: v.agentId,
68
137
  };
69
138
  });
@@ -1,5 +1,8 @@
1
1
  import { EventEmitter } from "eventemitter3";
2
2
  import WebSocket, { MessageEvent } from "isomorphic-ws";
3
+ import * as operations from "../models/operations";
4
+
5
+ const baseEndpoint = "wss://api.re-tell.ai";
3
6
 
4
7
  export class LiveClient extends EventEmitter {
5
8
  private ws: WebSocket;
@@ -7,10 +10,7 @@ export class LiveClient extends EventEmitter {
7
10
 
8
11
  constructor(
9
12
  apiKey: string,
10
- agentId: string,
11
- sampleRate: number,
12
- agentPromptParams: { name: string; value: string }[],
13
- baseEndpoint: string
13
+ input: operations.CreateWebCallRequestBody
14
14
  ) {
15
15
  super();
16
16
 
@@ -19,10 +19,13 @@ export class LiveClient extends EventEmitter {
19
19
  "/create-web-call?api_key=" +
20
20
  apiKey +
21
21
  "&agent_id=" +
22
- agentId +
23
- "&sample_rate=" +
24
- sampleRate;
25
- endpoint += "&agent_prompt_params=" + encodeURIComponent(JSON.stringify(agentPromptParams));
22
+ input.agentId;
23
+ if (input.sampleRate != null) {
24
+ endpoint += "&sample_rate=" + input.sampleRate;
25
+ }
26
+ if (input.agentPromptParams != null) {
27
+ endpoint += "&agent_prompt_params=" + encodeURIComponent(JSON.stringify(input.agentPromptParams));
28
+ }
26
29
  this.ws = new WebSocket(endpoint);
27
30
  this.ws.binaryType = "arraybuffer";
28
31
  }
package/src/sdk/sdk.ts CHANGED
@@ -6,7 +6,6 @@ import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "../lib/config";
6
6
  import * as enc$ from "../lib/encodings";
7
7
  import { HTTPClient } from "../lib/http";
8
8
  import { ClientSDK, RequestOptions } from "../lib/sdks";
9
- import * as components from "../models/components";
10
9
  import * as errors from "../models/errors";
11
10
  import * as operations from "../models/operations";
12
11
  import { LiveClient } from "./liveClient";
@@ -25,17 +24,11 @@ export class RetellClient extends ClientSDK {
25
24
  }
26
25
 
27
26
  async createWebCall(
28
- agentId: string,
29
- sampleRate = 16000,
30
- agentPromptParams: { name: string; value: string }[] = [],
31
- websocketEndpoint: string = "wss://api.re-tell.ai"
27
+ input: operations.CreateWebCallRequestBody
32
28
  ): Promise<LiveClient> {
33
29
  const liveClient = new LiveClient(
34
30
  this.options$.apiKey as unknown as string,
35
- agentId,
36
- sampleRate,
37
- agentPromptParams,
38
- websocketEndpoint
31
+ input
39
32
  );
40
33
  await liveClient.waitForReady();
41
34
  return liveClient;
@@ -174,7 +167,7 @@ export class RetellClient extends ClientSDK {
174
167
  const responseBody = await response.json();
175
168
  const result = operations.CreatePhoneCallResponse$.inboundSchema.parse({
176
169
  ...responseFields$,
177
- object: responseBody,
170
+ callDetail: responseBody,
178
171
  });
179
172
  return result;
180
173
  } else if (this.matchResponse(response, 400, "application/json")) {
@@ -813,7 +806,7 @@ export class RetellClient extends ClientSDK {
813
806
  const responseBody = await response.json();
814
807
  const result = operations.ListAgentsResponse$.inboundSchema.parse({
815
808
  ...responseFields$,
816
- classes: responseBody,
809
+ agents: responseBody,
817
810
  });
818
811
  return result;
819
812
  } else if (this.matchResponse(response, 401, "application/json")) {
@@ -860,7 +853,7 @@ export class RetellClient extends ClientSDK {
860
853
  const path$ = this.templateURLComponent("/list-calls")();
861
854
 
862
855
  const query$ = [
863
- enc$.encodeForm("filter_criteria", payload$.filter_criteria, {
856
+ enc$.encodeForm("filter_criteria", JSON.stringify(payload$.filter_criteria), {
864
857
  explode: true,
865
858
  charEncoding: "percent",
866
859
  }),
@@ -905,7 +898,7 @@ export class RetellClient extends ClientSDK {
905
898
  const responseBody = await response.json();
906
899
  const result = operations.ListCallsResponse$.inboundSchema.parse({
907
900
  ...responseFields$,
908
- classes: responseBody,
901
+ calls: responseBody,
909
902
  });
910
903
  return result;
911
904
  } else if (this.matchResponse(response, 400, "application/json")) {
@@ -970,7 +963,7 @@ export class RetellClient extends ClientSDK {
970
963
  const responseBody = await response.json();
971
964
  const result = operations.ListPhoneNumbersResponse$.inboundSchema.parse({
972
965
  ...responseFields$,
973
- classes: responseBody,
966
+ phoneNumbers: responseBody,
974
967
  });
975
968
  return result;
976
969
  } else if (this.matchResponse(response, 400, "application/json")) {
@@ -1004,12 +997,12 @@ export class RetellClient extends ClientSDK {
1004
997
  * Update an existing agent
1005
998
  */
1006
999
  async updateAgent(
1007
- agentNoDefaultNoRequired: components.AgentNoDefaultNoRequired,
1000
+ requestBody: operations.UpdateAgentRequestBody,
1008
1001
  agentId: string,
1009
1002
  options?: RequestOptions
1010
1003
  ): Promise<operations.UpdateAgentResponse> {
1011
1004
  const input$: operations.UpdateAgentRequest = {
1012
- agentNoDefaultNoRequired: agentNoDefaultNoRequired,
1005
+ requestBody: requestBody,
1013
1006
  agentId: agentId,
1014
1007
  };
1015
1008
  const headers$ = new Headers();
@@ -1019,7 +1012,7 @@ export class RetellClient extends ClientSDK {
1019
1012
 
1020
1013
  const payload$ = operations.UpdateAgentRequest$.outboundSchema.parse(input$);
1021
1014
 
1022
- const body$ = enc$.encodeJSON("body", payload$.AgentNoDefaultNoRequired, { explode: true });
1015
+ const body$ = enc$.encodeJSON("body", payload$.RequestBody, { explode: true });
1023
1016
 
1024
1017
  const pathParams$ = {
1025
1018
  agent_id: enc$.encodeSimple("agent_id", payload$.agent_id, {