retell-sdk 2.2.2 → 2.2.4
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.
- package/example.js +61 -7
- package/example.js.map +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +5 -1
- package/lib/security.js.map +1 -1
- package/models/components/agent.d.ts +62 -0
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +95 -15
- package/models/components/agent.js.map +1 -1
- package/models/components/agentpromptparams.d.ts.map +1 -1
- package/models/components/agentpromptparams.js.map +1 -1
- package/models/components/calldetail.d.ts.map +1 -1
- package/models/components/calldetail.js +18 -6
- package/models/components/calldetail.js.map +1 -1
- package/models/components/callphonenumber.d.ts.map +1 -1
- package/models/components/callphonenumber.js.map +1 -1
- package/models/components/phonenumber.d.ts.map +1 -1
- package/models/components/phonenumber.js.map +1 -1
- package/models/components/security.d.ts.map +1 -1
- package/models/errors/createagent.d.ts.map +1 -1
- package/models/errors/createagent.js +36 -12
- package/models/errors/createagent.js.map +1 -1
- package/models/errors/createphonecall.d.ts.map +1 -1
- package/models/errors/createphonecall.js +54 -18
- package/models/errors/createphonecall.js.map +1 -1
- package/models/errors/createphonenumber.d.ts.map +1 -1
- package/models/errors/createphonenumber.js +42 -14
- package/models/errors/createphonenumber.js.map +1 -1
- package/models/errors/deleteagent.d.ts.map +1 -1
- package/models/errors/deleteagent.js +36 -12
- package/models/errors/deleteagent.js.map +1 -1
- package/models/errors/deletephonenumber.d.ts.map +1 -1
- package/models/errors/deletephonenumber.js +33 -11
- package/models/errors/deletephonenumber.js.map +1 -1
- package/models/errors/getagent.d.ts.map +1 -1
- package/models/errors/getagent.js +36 -12
- package/models/errors/getagent.js.map +1 -1
- package/models/errors/getcall.d.ts.map +1 -1
- package/models/errors/getcall.js +30 -10
- package/models/errors/getcall.js.map +1 -1
- package/models/errors/getphonenumber.d.ts.map +1 -1
- package/models/errors/getphonenumber.js +36 -12
- package/models/errors/getphonenumber.js.map +1 -1
- package/models/errors/listagents.d.ts.map +1 -1
- package/models/errors/listagents.js +15 -5
- package/models/errors/listagents.js.map +1 -1
- package/models/errors/listcalls.d.ts.map +1 -1
- package/models/errors/listcalls.js +24 -8
- package/models/errors/listcalls.js.map +1 -1
- package/models/errors/listphonenumbers.d.ts.map +1 -1
- package/models/errors/listphonenumbers.js +27 -9
- package/models/errors/listphonenumbers.js.map +1 -1
- package/models/errors/updateagent.d.ts.map +1 -1
- package/models/errors/updateagent.js +36 -12
- package/models/errors/updateagent.js.map +1 -1
- package/models/errors/updatephoneagent.d.ts.map +1 -1
- package/models/errors/updatephoneagent.js +36 -12
- package/models/errors/updatephoneagent.js.map +1 -1
- package/models/operations/createagent.d.ts +7 -0
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +18 -4
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/createphonecall.d.ts.map +1 -1
- package/models/operations/createphonecall.js +18 -6
- package/models/operations/createphonecall.js.map +1 -1
- package/models/operations/createphonenumber.d.ts.map +1 -1
- package/models/operations/createphonenumber.js +6 -2
- package/models/operations/createphonenumber.js.map +1 -1
- package/models/operations/createwebcall.d.ts.map +1 -1
- package/models/operations/deleteagent.d.ts.map +1 -1
- package/models/operations/deleteagent.js.map +1 -1
- package/models/operations/deletephonenumber.d.ts.map +1 -1
- package/models/operations/deletephonenumber.js.map +1 -1
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getcall.d.ts.map +1 -1
- package/models/operations/getcall.js.map +1 -1
- package/models/operations/getphonenumber.d.ts.map +1 -1
- package/models/operations/getphonenumber.js +6 -2
- package/models/operations/getphonenumber.js.map +1 -1
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listcalls.d.ts.map +1 -1
- package/models/operations/listcalls.js +6 -2
- package/models/operations/listcalls.js.map +1 -1
- package/models/operations/listphonenumbers.d.ts.map +1 -1
- package/models/operations/listphonenumbers.js +6 -2
- package/models/operations/listphonenumbers.js.map +1 -1
- package/models/operations/updateagent.d.ts +7 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +22 -4
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatephoneagent.d.ts.map +1 -1
- package/models/operations/updatephoneagent.js +6 -2
- package/models/operations/updatephoneagent.js.map +1 -1
- package/package.json +1 -1
- package/sdk/liveClient.d.ts.map +1 -1
- package/sdk/liveClient.js +7 -2
- package/sdk/liveClient.js.map +1 -1
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +22 -5
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +122 -65
- package/src/lib/config.ts +32 -32
- package/src/lib/sdks.ts +91 -82
- package/src/lib/security.ts +133 -118
- package/src/models/components/agent.ts +482 -303
- package/src/models/components/agentpromptparams.ts +46 -38
- package/src/models/components/calldetail.ts +137 -125
- package/src/models/components/callphonenumber.ts +46 -38
- package/src/models/components/phonenumber.ts +69 -68
- package/src/models/components/security.ts +1 -1
- package/src/models/errors/createagent.ts +359 -311
- package/src/models/errors/createphonecall.ts +537 -472
- package/src/models/errors/createphonenumber.ts +447 -395
- package/src/models/errors/deleteagent.ts +359 -311
- package/src/models/errors/deletephonenumber.ts +357 -315
- package/src/models/errors/getagent.ts +358 -302
- package/src/models/errors/getcall.ts +348 -294
- package/src/models/errors/getphonenumber.ts +357 -312
- package/src/models/errors/listagents.ts +174 -147
- package/src/models/errors/listcalls.ts +251 -211
- package/src/models/errors/listphonenumbers.ts +252 -217
- package/src/models/errors/updateagent.ts +359 -311
- package/src/models/errors/updatephoneagent.ts +357 -312
- package/src/models/operations/createagent.ts +166 -119
- package/src/models/operations/createphonecall.ts +283 -238
- package/src/models/operations/createphonenumber.ts +118 -98
- package/src/models/operations/createwebcall.ts +13 -13
- package/src/models/operations/deleteagent.ts +94 -78
- package/src/models/operations/deletephonenumber.ts +94 -78
- package/src/models/operations/getagent.ts +104 -88
- package/src/models/operations/getcall.ts +101 -88
- package/src/models/operations/getphonenumber.ts +108 -88
- package/src/models/operations/listagents.ts +68 -60
- package/src/models/operations/listcalls.ts +238 -213
- package/src/models/operations/listphonenumbers.ts +72 -60
- package/src/models/operations/updateagent.ts +227 -163
- package/src/models/operations/updatephoneagent.ts +160 -132
- package/src/sdk/liveClient.ts +11 -7
- package/src/sdk/sdk.ts +1313 -1160
|
@@ -6,71 +6,83 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export type ListPhoneNumbersResponse = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
/**
|
|
10
|
+
* HTTP response content type for this operation
|
|
11
|
+
*/
|
|
12
|
+
contentType: string;
|
|
13
|
+
/**
|
|
14
|
+
* HTTP response status code for this operation
|
|
15
|
+
*/
|
|
16
|
+
statusCode: number;
|
|
17
|
+
/**
|
|
18
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
19
|
+
*/
|
|
20
|
+
rawResponse: Response;
|
|
21
|
+
/**
|
|
22
|
+
* Successfully retrieved all phone number objects.
|
|
23
|
+
*/
|
|
24
|
+
phoneNumbers?: Array<components.PhoneNumber> | undefined;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/** @internal */
|
|
28
28
|
export namespace ListPhoneNumbersResponse$ {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
export type Inbound = {
|
|
30
|
+
ContentType: string;
|
|
31
|
+
StatusCode: number;
|
|
32
|
+
RawResponse: Response;
|
|
33
|
+
phoneNumbers?: Array<components.PhoneNumber$.Inbound> | undefined;
|
|
34
|
+
};
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
export const inboundSchema: z.ZodType<
|
|
37
|
+
ListPhoneNumbersResponse,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
Inbound
|
|
40
|
+
> = z
|
|
41
|
+
.object({
|
|
42
|
+
ContentType: z.string(),
|
|
43
|
+
StatusCode: z.number().int(),
|
|
44
|
+
RawResponse: z.instanceof(Response),
|
|
45
|
+
phoneNumbers: z.array(components.PhoneNumber$.inboundSchema).optional(),
|
|
46
|
+
})
|
|
47
|
+
.transform((v) => {
|
|
48
|
+
return {
|
|
49
|
+
contentType: v.ContentType,
|
|
50
|
+
statusCode: v.StatusCode,
|
|
51
|
+
rawResponse: v.RawResponse,
|
|
52
|
+
...(v.phoneNumbers === undefined
|
|
53
|
+
? null
|
|
54
|
+
: { phoneNumbers: v.phoneNumbers }),
|
|
55
|
+
};
|
|
56
|
+
});
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
export type Outbound = {
|
|
59
|
+
ContentType: string;
|
|
60
|
+
StatusCode: number;
|
|
61
|
+
RawResponse: never;
|
|
62
|
+
phoneNumbers?: Array<components.PhoneNumber$.Outbound> | undefined;
|
|
63
|
+
};
|
|
58
64
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
export const outboundSchema: z.ZodType<
|
|
66
|
+
Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
ListPhoneNumbersResponse
|
|
69
|
+
> = z
|
|
70
|
+
.object({
|
|
71
|
+
contentType: z.string(),
|
|
72
|
+
statusCode: z.number().int(),
|
|
73
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
74
|
+
throw new Error("Response cannot be serialized");
|
|
75
|
+
}),
|
|
76
|
+
phoneNumbers: z.array(components.PhoneNumber$.outboundSchema).optional(),
|
|
77
|
+
})
|
|
78
|
+
.transform((v) => {
|
|
79
|
+
return {
|
|
80
|
+
ContentType: v.contentType,
|
|
81
|
+
StatusCode: v.statusCode,
|
|
82
|
+
RawResponse: v.rawResponse,
|
|
83
|
+
...(v.phoneNumbers === undefined
|
|
84
|
+
? null
|
|
85
|
+
: { phoneNumbers: v.phoneNumbers }),
|
|
86
|
+
};
|
|
87
|
+
});
|
|
76
88
|
}
|
|
@@ -3,188 +3,252 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as components from "../../models/components";
|
|
6
|
+
import { Function } from "../../models/components";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
|
|
8
9
|
export type UpdateAgentRequestBody = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The name of the agent. Only used for your own reference.
|
|
12
|
+
*/
|
|
13
|
+
agentName?: string | undefined;
|
|
14
|
+
/*
|
|
15
|
+
* Determines how to generate the response in the call. Currently supports using our in-house LLM response system or your own custom
|
|
16
|
+
* response generation system.
|
|
17
|
+
*/
|
|
18
|
+
llmSetting?:
|
|
19
|
+
| components.RetellLlmSetting
|
|
20
|
+
| components.CustomLlmSetting
|
|
21
|
+
| undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Setting combination that controls interaction flow, like begin and end logic.
|
|
24
|
+
*/
|
|
25
|
+
interactionSetting?: components.InteractionSettingRequest | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Unique voice id used for the agent. Find list of available voices in documentation.
|
|
28
|
+
*/
|
|
29
|
+
voiceId?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Functions are the actions that the agent can perform, like booking appointments, retriving information, etc. By setting this field, either OpenAI's function calling feature or your own custom LLM's logic would determine when the function shall get called, and our server would make the call.
|
|
32
|
+
*/
|
|
33
|
+
functions?: Function[] | undefined;
|
|
26
34
|
};
|
|
27
35
|
|
|
28
36
|
/** @internal */
|
|
29
37
|
export namespace UpdateAgentRequestBody$ {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
38
|
+
export type Inbound = {
|
|
39
|
+
agent_name?: string | undefined;
|
|
40
|
+
llm_setting?:
|
|
41
|
+
| components.RetellLlmSetting$.Inbound
|
|
42
|
+
| components.CustomLlmSetting$.Inbound
|
|
43
|
+
| undefined;
|
|
44
|
+
interaction_setting?:
|
|
45
|
+
| components.InteractionSettingRequest$.Inbound
|
|
46
|
+
| undefined;
|
|
47
|
+
voice_id?: string | undefined;
|
|
48
|
+
functions?: Function[] | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const inboundSchema: z.ZodType<
|
|
52
|
+
UpdateAgentRequestBody,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
Inbound
|
|
55
|
+
> = z
|
|
56
|
+
.object({
|
|
57
|
+
agent_name: z.string().optional(),
|
|
58
|
+
llm_setting: z
|
|
59
|
+
.union([
|
|
60
|
+
components.RetellLlmSetting$.inboundSchema,
|
|
61
|
+
components.CustomLlmSetting$.inboundSchema,
|
|
62
|
+
])
|
|
63
|
+
.optional(),
|
|
64
|
+
interaction_setting:
|
|
65
|
+
components.InteractionSettingRequest$.inboundSchema.optional(),
|
|
66
|
+
voice_id: z.string().optional(),
|
|
67
|
+
functions: z.array(components.Function$.inboundSchema).optional(),
|
|
68
|
+
})
|
|
69
|
+
.transform((v) => {
|
|
70
|
+
return {
|
|
71
|
+
...(v.agent_name === undefined ? null : { agentName: v.agent_name }),
|
|
72
|
+
...(v.llm_setting === undefined ? null : { llmSetting: v.llm_setting }),
|
|
73
|
+
...(v.interaction_setting === undefined
|
|
74
|
+
? null
|
|
75
|
+
: { interactionSetting: v.interaction_setting }),
|
|
76
|
+
...(v.voice_id === undefined ? null : { voiceId: v.voice_id }),
|
|
77
|
+
...(v.functions === undefined ? null : { functions: v.functions }),
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export type Outbound = {
|
|
82
|
+
agent_name?: string | undefined;
|
|
83
|
+
llm_setting?:
|
|
84
|
+
| components.RetellLlmSetting$.Outbound
|
|
85
|
+
| components.CustomLlmSetting$.Outbound
|
|
86
|
+
| undefined;
|
|
87
|
+
interaction_setting?:
|
|
88
|
+
| components.InteractionSettingRequest$.Outbound
|
|
89
|
+
| undefined;
|
|
90
|
+
voice_id?: string | undefined;
|
|
91
|
+
functions?: Function[] | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const outboundSchema: z.ZodType<
|
|
95
|
+
Outbound,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
UpdateAgentRequestBody
|
|
98
|
+
> = z
|
|
99
|
+
.object({
|
|
100
|
+
agentName: z.string().optional(),
|
|
101
|
+
llmSetting: z
|
|
102
|
+
.union([
|
|
103
|
+
components.RetellLlmSetting$.outboundSchema,
|
|
104
|
+
components.CustomLlmSetting$.outboundSchema,
|
|
105
|
+
])
|
|
106
|
+
.optional(),
|
|
107
|
+
interactionSetting:
|
|
108
|
+
components.InteractionSettingRequest$.outboundSchema.optional(),
|
|
109
|
+
voiceId: z.string().optional(),
|
|
110
|
+
functions: z.array(components.Function$.inboundSchema).optional(),
|
|
111
|
+
})
|
|
112
|
+
.transform((v) => {
|
|
113
|
+
return {
|
|
114
|
+
...(v.agentName === undefined ? null : { agent_name: v.agentName }),
|
|
115
|
+
...(v.llmSetting === undefined ? null : { llm_setting: v.llmSetting }),
|
|
116
|
+
...(v.interactionSetting === undefined
|
|
117
|
+
? null
|
|
118
|
+
: { interaction_setting: v.interactionSetting }),
|
|
119
|
+
...(v.voiceId === undefined ? null : { voice_id: v.voiceId }),
|
|
120
|
+
...(v.functions === undefined ? null : { functions: v.functions }),
|
|
121
|
+
};
|
|
122
|
+
});
|
|
75
123
|
}
|
|
76
124
|
|
|
77
125
|
export type UpdateAgentRequest = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
126
|
+
requestBody: UpdateAgentRequestBody;
|
|
127
|
+
/**
|
|
128
|
+
* Unique id of the agent to be updated.
|
|
129
|
+
*/
|
|
130
|
+
agentId: string;
|
|
83
131
|
};
|
|
84
132
|
|
|
85
133
|
export type UpdateAgentResponse = {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Successfully updated an agent.
|
|
136
|
+
*/
|
|
137
|
+
agent?: components.Agent | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* HTTP response content type for this operation
|
|
140
|
+
*/
|
|
141
|
+
contentType: string;
|
|
142
|
+
/**
|
|
143
|
+
* HTTP response status code for this operation
|
|
144
|
+
*/
|
|
145
|
+
statusCode: number;
|
|
146
|
+
/**
|
|
147
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
148
|
+
*/
|
|
149
|
+
rawResponse: Response;
|
|
102
150
|
};
|
|
103
151
|
|
|
104
152
|
/** @internal */
|
|
105
153
|
export namespace UpdateAgentRequest$ {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
154
|
+
export type Inbound = {
|
|
155
|
+
RequestBody: UpdateAgentRequestBody$.Inbound;
|
|
156
|
+
agent_id: string;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export const inboundSchema: z.ZodType<
|
|
160
|
+
UpdateAgentRequest,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
Inbound
|
|
163
|
+
> = z
|
|
164
|
+
.object({
|
|
165
|
+
RequestBody: UpdateAgentRequestBody$.inboundSchema,
|
|
166
|
+
agent_id: z.string(),
|
|
167
|
+
})
|
|
168
|
+
.transform((v) => {
|
|
169
|
+
return {
|
|
170
|
+
requestBody: v.RequestBody,
|
|
171
|
+
agentId: v.agent_id,
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export type Outbound = {
|
|
176
|
+
RequestBody: UpdateAgentRequestBody$.Outbound;
|
|
177
|
+
agent_id: string;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export const outboundSchema: z.ZodType<
|
|
181
|
+
Outbound,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
UpdateAgentRequest
|
|
184
|
+
> = z
|
|
185
|
+
.object({
|
|
186
|
+
requestBody: UpdateAgentRequestBody$.outboundSchema,
|
|
187
|
+
agentId: z.string(),
|
|
188
|
+
})
|
|
189
|
+
.transform((v) => {
|
|
190
|
+
return {
|
|
191
|
+
RequestBody: v.requestBody,
|
|
192
|
+
agent_id: v.agentId,
|
|
193
|
+
};
|
|
194
|
+
});
|
|
139
195
|
}
|
|
140
196
|
|
|
141
197
|
/** @internal */
|
|
142
198
|
export namespace UpdateAgentResponse$ {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
199
|
+
export type Inbound = {
|
|
200
|
+
Agent?: components.Agent$.Inbound | undefined;
|
|
201
|
+
ContentType: string;
|
|
202
|
+
StatusCode: number;
|
|
203
|
+
RawResponse: Response;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const inboundSchema: z.ZodType<
|
|
207
|
+
UpdateAgentResponse,
|
|
208
|
+
z.ZodTypeDef,
|
|
209
|
+
Inbound
|
|
210
|
+
> = z
|
|
211
|
+
.object({
|
|
212
|
+
Agent: components.Agent$.inboundSchema.optional(),
|
|
213
|
+
ContentType: z.string(),
|
|
214
|
+
StatusCode: z.number().int(),
|
|
215
|
+
RawResponse: z.instanceof(Response),
|
|
216
|
+
})
|
|
217
|
+
.transform((v) => {
|
|
218
|
+
return {
|
|
219
|
+
...(v.Agent === undefined ? null : { agent: v.Agent }),
|
|
220
|
+
contentType: v.ContentType,
|
|
221
|
+
statusCode: v.StatusCode,
|
|
222
|
+
rawResponse: v.RawResponse,
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
export type Outbound = {
|
|
227
|
+
Agent?: components.Agent$.Outbound | undefined;
|
|
228
|
+
ContentType: string;
|
|
229
|
+
StatusCode: number;
|
|
230
|
+
RawResponse: never;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export const outboundSchema: z.ZodType<
|
|
234
|
+
Outbound,
|
|
235
|
+
z.ZodTypeDef,
|
|
236
|
+
UpdateAgentResponse
|
|
237
|
+
> = z
|
|
238
|
+
.object({
|
|
239
|
+
agent: components.Agent$.outboundSchema.optional(),
|
|
240
|
+
contentType: z.string(),
|
|
241
|
+
statusCode: z.number().int(),
|
|
242
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
243
|
+
throw new Error("Response cannot be serialized");
|
|
244
|
+
}),
|
|
245
|
+
})
|
|
246
|
+
.transform((v) => {
|
|
247
|
+
return {
|
|
248
|
+
...(v.agent === undefined ? null : { Agent: v.agent }),
|
|
249
|
+
ContentType: v.contentType,
|
|
250
|
+
StatusCode: v.statusCode,
|
|
251
|
+
RawResponse: v.rawResponse,
|
|
252
|
+
};
|
|
253
|
+
});
|
|
190
254
|
}
|