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
|
@@ -8,376 +8,432 @@ import { z } from "zod";
|
|
|
8
8
|
* Internal Server Error
|
|
9
9
|
*/
|
|
10
10
|
export type GetAgentResponse500ResponseBodyData = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
13
|
+
*/
|
|
14
|
+
rawResponse?: Response | undefined;
|
|
15
|
+
errorMessage?: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal Server Error
|
|
20
20
|
*/
|
|
21
21
|
export class GetAgentResponse500ResponseBody extends Error {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
43
|
-
const { rawResponse, ...data } = err;
|
|
44
|
-
const content = JSON.stringify(data);
|
|
45
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
46
|
-
|
|
47
|
-
this.name = "GetAgentResponse500ResponseBody";
|
|
22
|
+
/**
|
|
23
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
24
|
+
*/
|
|
25
|
+
rawResponse?: Response | undefined;
|
|
26
|
+
errorMessage?: string | undefined;
|
|
27
|
+
|
|
28
|
+
/** The original data that was passed to this error instance. */
|
|
29
|
+
data$: GetAgentResponse500ResponseBodyData;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
err: GetAgentResponse500ResponseBodyData,
|
|
33
|
+
options?: ErrorOptions,
|
|
34
|
+
) {
|
|
35
|
+
super("", options);
|
|
36
|
+
this.data$ = err;
|
|
37
|
+
|
|
38
|
+
if (err.rawResponse != null) {
|
|
39
|
+
this.rawResponse = err.rawResponse;
|
|
48
40
|
}
|
|
41
|
+
if (err.errorMessage != null) {
|
|
42
|
+
this.errorMessage = err.errorMessage;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const msg =
|
|
46
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
47
|
+
const { rawResponse, ...data } = err;
|
|
48
|
+
const content = JSON.stringify(data);
|
|
49
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
50
|
+
|
|
51
|
+
this.name = "GetAgentResponse500ResponseBody";
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
/**
|
|
52
56
|
* Unprocessable Content
|
|
53
57
|
*/
|
|
54
58
|
export type GetAgentResponse422ResponseBodyData = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
61
|
+
*/
|
|
62
|
+
rawResponse?: Response | undefined;
|
|
63
|
+
errorMessage?: string | undefined;
|
|
60
64
|
};
|
|
61
65
|
|
|
62
66
|
/**
|
|
63
67
|
* Unprocessable Content
|
|
64
68
|
*/
|
|
65
69
|
export class GetAgentResponse422ResponseBody extends Error {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const { rawResponse, ...data } = err;
|
|
88
|
-
const content = JSON.stringify(data);
|
|
89
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
90
|
-
|
|
91
|
-
this.name = "GetAgentResponse422ResponseBody";
|
|
70
|
+
/**
|
|
71
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
72
|
+
*/
|
|
73
|
+
rawResponse?: Response | undefined;
|
|
74
|
+
errorMessage?: string | undefined;
|
|
75
|
+
|
|
76
|
+
/** The original data that was passed to this error instance. */
|
|
77
|
+
data$: GetAgentResponse422ResponseBodyData;
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
err: GetAgentResponse422ResponseBodyData,
|
|
81
|
+
options?: ErrorOptions,
|
|
82
|
+
) {
|
|
83
|
+
super("", options);
|
|
84
|
+
this.data$ = err;
|
|
85
|
+
|
|
86
|
+
if (err.rawResponse != null) {
|
|
87
|
+
this.rawResponse = err.rawResponse;
|
|
88
|
+
}
|
|
89
|
+
if (err.errorMessage != null) {
|
|
90
|
+
this.errorMessage = err.errorMessage;
|
|
92
91
|
}
|
|
92
|
+
|
|
93
|
+
const msg =
|
|
94
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
95
|
+
const { rawResponse, ...data } = err;
|
|
96
|
+
const content = JSON.stringify(data);
|
|
97
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
98
|
+
|
|
99
|
+
this.name = "GetAgentResponse422ResponseBody";
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
/**
|
|
96
104
|
* Unauthorized
|
|
97
105
|
*/
|
|
98
106
|
export type GetAgentResponseResponseBodyData = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
109
|
+
*/
|
|
110
|
+
rawResponse?: Response | undefined;
|
|
111
|
+
errorMessage?: string | undefined;
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
/**
|
|
107
115
|
* Unauthorized
|
|
108
116
|
*/
|
|
109
117
|
export class GetAgentResponseResponseBody extends Error {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
if (err.errorMessage != null) {
|
|
127
|
-
this.errorMessage = err.errorMessage;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
131
|
-
const { rawResponse, ...data } = err;
|
|
132
|
-
const content = JSON.stringify(data);
|
|
133
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
134
|
-
|
|
135
|
-
this.name = "GetAgentResponseResponseBody";
|
|
118
|
+
/**
|
|
119
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
120
|
+
*/
|
|
121
|
+
rawResponse?: Response | undefined;
|
|
122
|
+
errorMessage?: string | undefined;
|
|
123
|
+
|
|
124
|
+
/** The original data that was passed to this error instance. */
|
|
125
|
+
data$: GetAgentResponseResponseBodyData;
|
|
126
|
+
|
|
127
|
+
constructor(err: GetAgentResponseResponseBodyData, options?: ErrorOptions) {
|
|
128
|
+
super("", options);
|
|
129
|
+
this.data$ = err;
|
|
130
|
+
|
|
131
|
+
if (err.rawResponse != null) {
|
|
132
|
+
this.rawResponse = err.rawResponse;
|
|
136
133
|
}
|
|
134
|
+
if (err.errorMessage != null) {
|
|
135
|
+
this.errorMessage = err.errorMessage;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const msg =
|
|
139
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
140
|
+
const { rawResponse, ...data } = err;
|
|
141
|
+
const content = JSON.stringify(data);
|
|
142
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
143
|
+
|
|
144
|
+
this.name = "GetAgentResponseResponseBody";
|
|
145
|
+
}
|
|
137
146
|
}
|
|
138
147
|
|
|
139
148
|
/**
|
|
140
149
|
* Bad Request
|
|
141
150
|
*/
|
|
142
151
|
export type GetAgentResponseBodyData = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
154
|
+
*/
|
|
155
|
+
rawResponse?: Response | undefined;
|
|
156
|
+
errorMessage?: string | undefined;
|
|
148
157
|
};
|
|
149
158
|
|
|
150
159
|
/**
|
|
151
160
|
* Bad Request
|
|
152
161
|
*/
|
|
153
162
|
export class GetAgentResponseBody extends Error {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
175
|
-
const { rawResponse, ...data } = err;
|
|
176
|
-
const content = JSON.stringify(data);
|
|
177
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
178
|
-
|
|
179
|
-
this.name = "GetAgentResponseBody";
|
|
163
|
+
/**
|
|
164
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
165
|
+
*/
|
|
166
|
+
rawResponse?: Response | undefined;
|
|
167
|
+
errorMessage?: string | undefined;
|
|
168
|
+
|
|
169
|
+
/** The original data that was passed to this error instance. */
|
|
170
|
+
data$: GetAgentResponseBodyData;
|
|
171
|
+
|
|
172
|
+
constructor(err: GetAgentResponseBodyData, options?: ErrorOptions) {
|
|
173
|
+
super("", options);
|
|
174
|
+
this.data$ = err;
|
|
175
|
+
|
|
176
|
+
if (err.rawResponse != null) {
|
|
177
|
+
this.rawResponse = err.rawResponse;
|
|
178
|
+
}
|
|
179
|
+
if (err.errorMessage != null) {
|
|
180
|
+
this.errorMessage = err.errorMessage;
|
|
180
181
|
}
|
|
182
|
+
|
|
183
|
+
const msg =
|
|
184
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
185
|
+
const { rawResponse, ...data } = err;
|
|
186
|
+
const content = JSON.stringify(data);
|
|
187
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
188
|
+
|
|
189
|
+
this.name = "GetAgentResponseBody";
|
|
190
|
+
}
|
|
181
191
|
}
|
|
182
192
|
|
|
183
193
|
/** @internal */
|
|
184
194
|
export namespace GetAgentResponse500ResponseBody$ {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
export type Inbound = {
|
|
196
|
+
RawResponse?: Response | undefined;
|
|
197
|
+
error_message?: string | undefined;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export const inboundSchema: z.ZodType<
|
|
201
|
+
GetAgentResponse500ResponseBody,
|
|
202
|
+
z.ZodTypeDef,
|
|
203
|
+
Inbound
|
|
204
|
+
> = z
|
|
205
|
+
.object({
|
|
206
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
207
|
+
error_message: z.string().optional(),
|
|
208
|
+
})
|
|
209
|
+
.transform((v) => {
|
|
210
|
+
return new GetAgentResponse500ResponseBody({
|
|
211
|
+
...(v.RawResponse === undefined
|
|
212
|
+
? null
|
|
213
|
+
: { rawResponse: v.RawResponse }),
|
|
214
|
+
...(v.error_message === undefined
|
|
215
|
+
? null
|
|
216
|
+
: { errorMessage: v.error_message }),
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
export type Outbound = {
|
|
220
|
+
RawResponse?: never | undefined;
|
|
221
|
+
error_message?: string | undefined;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export const outboundSchema: z.ZodType<
|
|
225
|
+
Outbound,
|
|
226
|
+
z.ZodTypeDef,
|
|
227
|
+
GetAgentResponse500ResponseBody
|
|
228
|
+
> = z
|
|
229
|
+
.instanceof(GetAgentResponse500ResponseBody)
|
|
230
|
+
.transform((v) => v.data$)
|
|
231
|
+
.pipe(
|
|
232
|
+
z
|
|
233
|
+
.object({
|
|
234
|
+
rawResponse: z
|
|
235
|
+
.instanceof(Response)
|
|
236
|
+
.transform(() => {
|
|
237
|
+
throw new Error("Response cannot be serialized");
|
|
195
238
|
})
|
|
196
|
-
.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
GetAgentResponse500ResponseBody
|
|
211
|
-
> = z
|
|
212
|
-
.instanceof(GetAgentResponse500ResponseBody)
|
|
213
|
-
.transform((v) => v.data$)
|
|
214
|
-
.pipe(
|
|
215
|
-
z
|
|
216
|
-
.object({
|
|
217
|
-
rawResponse: z
|
|
218
|
-
.instanceof(Response)
|
|
219
|
-
.transform(() => {
|
|
220
|
-
throw new Error("Response cannot be serialized");
|
|
221
|
-
})
|
|
222
|
-
.optional(),
|
|
223
|
-
errorMessage: z.string().optional(),
|
|
224
|
-
})
|
|
225
|
-
.transform((v) => {
|
|
226
|
-
return {
|
|
227
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
228
|
-
...(v.errorMessage === undefined
|
|
229
|
-
? null
|
|
230
|
-
: { error_message: v.errorMessage }),
|
|
231
|
-
};
|
|
232
|
-
})
|
|
233
|
-
);
|
|
239
|
+
.optional(),
|
|
240
|
+
errorMessage: z.string().optional(),
|
|
241
|
+
})
|
|
242
|
+
.transform((v) => {
|
|
243
|
+
return {
|
|
244
|
+
...(v.rawResponse === undefined
|
|
245
|
+
? null
|
|
246
|
+
: { RawResponse: v.rawResponse }),
|
|
247
|
+
...(v.errorMessage === undefined
|
|
248
|
+
? null
|
|
249
|
+
: { error_message: v.errorMessage }),
|
|
250
|
+
};
|
|
251
|
+
}),
|
|
252
|
+
);
|
|
234
253
|
}
|
|
235
254
|
|
|
236
255
|
/** @internal */
|
|
237
256
|
export namespace GetAgentResponse422ResponseBody$ {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
257
|
+
export type Inbound = {
|
|
258
|
+
RawResponse?: Response | undefined;
|
|
259
|
+
error_message?: string | undefined;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
export const inboundSchema: z.ZodType<
|
|
263
|
+
GetAgentResponse422ResponseBody,
|
|
264
|
+
z.ZodTypeDef,
|
|
265
|
+
Inbound
|
|
266
|
+
> = z
|
|
267
|
+
.object({
|
|
268
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
269
|
+
error_message: z.string().optional(),
|
|
270
|
+
})
|
|
271
|
+
.transform((v) => {
|
|
272
|
+
return new GetAgentResponse422ResponseBody({
|
|
273
|
+
...(v.RawResponse === undefined
|
|
274
|
+
? null
|
|
275
|
+
: { rawResponse: v.RawResponse }),
|
|
276
|
+
...(v.error_message === undefined
|
|
277
|
+
? null
|
|
278
|
+
: { errorMessage: v.error_message }),
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
export type Outbound = {
|
|
282
|
+
RawResponse?: never | undefined;
|
|
283
|
+
error_message?: string | undefined;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
export const outboundSchema: z.ZodType<
|
|
287
|
+
Outbound,
|
|
288
|
+
z.ZodTypeDef,
|
|
289
|
+
GetAgentResponse422ResponseBody
|
|
290
|
+
> = z
|
|
291
|
+
.instanceof(GetAgentResponse422ResponseBody)
|
|
292
|
+
.transform((v) => v.data$)
|
|
293
|
+
.pipe(
|
|
294
|
+
z
|
|
295
|
+
.object({
|
|
296
|
+
rawResponse: z
|
|
297
|
+
.instanceof(Response)
|
|
298
|
+
.transform(() => {
|
|
299
|
+
throw new Error("Response cannot be serialized");
|
|
248
300
|
})
|
|
249
|
-
.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
GetAgentResponse422ResponseBody
|
|
264
|
-
> = z
|
|
265
|
-
.instanceof(GetAgentResponse422ResponseBody)
|
|
266
|
-
.transform((v) => v.data$)
|
|
267
|
-
.pipe(
|
|
268
|
-
z
|
|
269
|
-
.object({
|
|
270
|
-
rawResponse: z
|
|
271
|
-
.instanceof(Response)
|
|
272
|
-
.transform(() => {
|
|
273
|
-
throw new Error("Response cannot be serialized");
|
|
274
|
-
})
|
|
275
|
-
.optional(),
|
|
276
|
-
errorMessage: z.string().optional(),
|
|
277
|
-
})
|
|
278
|
-
.transform((v) => {
|
|
279
|
-
return {
|
|
280
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
281
|
-
...(v.errorMessage === undefined
|
|
282
|
-
? null
|
|
283
|
-
: { error_message: v.errorMessage }),
|
|
284
|
-
};
|
|
285
|
-
})
|
|
286
|
-
);
|
|
301
|
+
.optional(),
|
|
302
|
+
errorMessage: z.string().optional(),
|
|
303
|
+
})
|
|
304
|
+
.transform((v) => {
|
|
305
|
+
return {
|
|
306
|
+
...(v.rawResponse === undefined
|
|
307
|
+
? null
|
|
308
|
+
: { RawResponse: v.rawResponse }),
|
|
309
|
+
...(v.errorMessage === undefined
|
|
310
|
+
? null
|
|
311
|
+
: { error_message: v.errorMessage }),
|
|
312
|
+
};
|
|
313
|
+
}),
|
|
314
|
+
);
|
|
287
315
|
}
|
|
288
316
|
|
|
289
317
|
/** @internal */
|
|
290
318
|
export namespace GetAgentResponseResponseBody$ {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
319
|
+
export type Inbound = {
|
|
320
|
+
RawResponse?: Response | undefined;
|
|
321
|
+
error_message?: string | undefined;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export const inboundSchema: z.ZodType<
|
|
325
|
+
GetAgentResponseResponseBody,
|
|
326
|
+
z.ZodTypeDef,
|
|
327
|
+
Inbound
|
|
328
|
+
> = z
|
|
329
|
+
.object({
|
|
330
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
331
|
+
error_message: z.string().optional(),
|
|
332
|
+
})
|
|
333
|
+
.transform((v) => {
|
|
334
|
+
return new GetAgentResponseResponseBody({
|
|
335
|
+
...(v.RawResponse === undefined
|
|
336
|
+
? null
|
|
337
|
+
: { rawResponse: v.RawResponse }),
|
|
338
|
+
...(v.error_message === undefined
|
|
339
|
+
? null
|
|
340
|
+
: { errorMessage: v.error_message }),
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
export type Outbound = {
|
|
344
|
+
RawResponse?: never | undefined;
|
|
345
|
+
error_message?: string | undefined;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export const outboundSchema: z.ZodType<
|
|
349
|
+
Outbound,
|
|
350
|
+
z.ZodTypeDef,
|
|
351
|
+
GetAgentResponseResponseBody
|
|
352
|
+
> = z
|
|
353
|
+
.instanceof(GetAgentResponseResponseBody)
|
|
354
|
+
.transform((v) => v.data$)
|
|
355
|
+
.pipe(
|
|
356
|
+
z
|
|
297
357
|
.object({
|
|
298
|
-
|
|
299
|
-
|
|
358
|
+
rawResponse: z
|
|
359
|
+
.instanceof(Response)
|
|
360
|
+
.transform(() => {
|
|
361
|
+
throw new Error("Response cannot be serialized");
|
|
362
|
+
})
|
|
363
|
+
.optional(),
|
|
364
|
+
errorMessage: z.string().optional(),
|
|
300
365
|
})
|
|
301
366
|
.transform((v) => {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetAgentResponseResponseBody> = z
|
|
313
|
-
.instanceof(GetAgentResponseResponseBody)
|
|
314
|
-
.transform((v) => v.data$)
|
|
315
|
-
.pipe(
|
|
316
|
-
z
|
|
317
|
-
.object({
|
|
318
|
-
rawResponse: z
|
|
319
|
-
.instanceof(Response)
|
|
320
|
-
.transform(() => {
|
|
321
|
-
throw new Error("Response cannot be serialized");
|
|
322
|
-
})
|
|
323
|
-
.optional(),
|
|
324
|
-
errorMessage: z.string().optional(),
|
|
325
|
-
})
|
|
326
|
-
.transform((v) => {
|
|
327
|
-
return {
|
|
328
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
329
|
-
...(v.errorMessage === undefined
|
|
330
|
-
? null
|
|
331
|
-
: { error_message: v.errorMessage }),
|
|
332
|
-
};
|
|
333
|
-
})
|
|
334
|
-
);
|
|
367
|
+
return {
|
|
368
|
+
...(v.rawResponse === undefined
|
|
369
|
+
? null
|
|
370
|
+
: { RawResponse: v.rawResponse }),
|
|
371
|
+
...(v.errorMessage === undefined
|
|
372
|
+
? null
|
|
373
|
+
: { error_message: v.errorMessage }),
|
|
374
|
+
};
|
|
375
|
+
}),
|
|
376
|
+
);
|
|
335
377
|
}
|
|
336
378
|
|
|
337
379
|
/** @internal */
|
|
338
380
|
export namespace GetAgentResponseBody$ {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
381
|
+
export type Inbound = {
|
|
382
|
+
RawResponse?: Response | undefined;
|
|
383
|
+
error_message?: string | undefined;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export const inboundSchema: z.ZodType<
|
|
387
|
+
GetAgentResponseBody,
|
|
388
|
+
z.ZodTypeDef,
|
|
389
|
+
Inbound
|
|
390
|
+
> = z
|
|
391
|
+
.object({
|
|
392
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
393
|
+
error_message: z.string().optional(),
|
|
394
|
+
})
|
|
395
|
+
.transform((v) => {
|
|
396
|
+
return new GetAgentResponseBody({
|
|
397
|
+
...(v.RawResponse === undefined
|
|
398
|
+
? null
|
|
399
|
+
: { rawResponse: v.RawResponse }),
|
|
400
|
+
...(v.error_message === undefined
|
|
401
|
+
? null
|
|
402
|
+
: { errorMessage: v.error_message }),
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
export type Outbound = {
|
|
406
|
+
RawResponse?: never | undefined;
|
|
407
|
+
error_message?: string | undefined;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export const outboundSchema: z.ZodType<
|
|
411
|
+
Outbound,
|
|
412
|
+
z.ZodTypeDef,
|
|
413
|
+
GetAgentResponseBody
|
|
414
|
+
> = z
|
|
415
|
+
.instanceof(GetAgentResponseBody)
|
|
416
|
+
.transform((v) => v.data$)
|
|
417
|
+
.pipe(
|
|
418
|
+
z
|
|
345
419
|
.object({
|
|
346
|
-
|
|
347
|
-
|
|
420
|
+
rawResponse: z
|
|
421
|
+
.instanceof(Response)
|
|
422
|
+
.transform(() => {
|
|
423
|
+
throw new Error("Response cannot be serialized");
|
|
424
|
+
})
|
|
425
|
+
.optional(),
|
|
426
|
+
errorMessage: z.string().optional(),
|
|
348
427
|
})
|
|
349
428
|
.transform((v) => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetAgentResponseBody> = z
|
|
361
|
-
.instanceof(GetAgentResponseBody)
|
|
362
|
-
.transform((v) => v.data$)
|
|
363
|
-
.pipe(
|
|
364
|
-
z
|
|
365
|
-
.object({
|
|
366
|
-
rawResponse: z
|
|
367
|
-
.instanceof(Response)
|
|
368
|
-
.transform(() => {
|
|
369
|
-
throw new Error("Response cannot be serialized");
|
|
370
|
-
})
|
|
371
|
-
.optional(),
|
|
372
|
-
errorMessage: z.string().optional(),
|
|
373
|
-
})
|
|
374
|
-
.transform((v) => {
|
|
375
|
-
return {
|
|
376
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
377
|
-
...(v.errorMessage === undefined
|
|
378
|
-
? null
|
|
379
|
-
: { error_message: v.errorMessage }),
|
|
380
|
-
};
|
|
381
|
-
})
|
|
382
|
-
);
|
|
429
|
+
return {
|
|
430
|
+
...(v.rawResponse === undefined
|
|
431
|
+
? null
|
|
432
|
+
: { RawResponse: v.rawResponse }),
|
|
433
|
+
...(v.errorMessage === undefined
|
|
434
|
+
? null
|
|
435
|
+
: { error_message: v.errorMessage }),
|
|
436
|
+
};
|
|
437
|
+
}),
|
|
438
|
+
);
|
|
383
439
|
}
|