retell-sdk 2.2.3 → 2.2.6
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 +48 -5
- 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 +3 -205
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +5 -187
- 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 +33 -22
- package/models/components/calldetail.d.ts.map +1 -1
- package/models/components/calldetail.js +44 -31
- 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/index.d.ts +0 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -3
- package/models/components/index.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/index.d.ts +1 -6
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -6
- package/models/errors/index.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/registercall.d.ts +218 -0
- package/models/errors/registercall.d.ts.map +1 -0
- package/models/errors/registercall.js +386 -0
- package/models/errors/registercall.js.map +1 -0
- 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 +3 -16
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +4 -12
- 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 +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/index.d.ts +1 -7
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -7
- package/models/operations/index.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 +1 -7
- package/models/operations/listcalls.d.ts.map +1 -1
- package/models/operations/listcalls.js +6 -6
- 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/registercall.d.ts +74 -0
- package/models/operations/registercall.d.ts.map +1 -0
- package/models/operations/registercall.js +104 -0
- package/models/operations/registercall.js.map +1 -0
- package/models/operations/updateagent.d.ts +3 -16
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +9 -13
- 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/audioWsClient.d.ts +10 -0
- package/sdk/audioWsClient.d.ts.map +1 -0
- package/sdk/audioWsClient.js +60 -0
- package/sdk/audioWsClient.js.map +1 -0
- package/sdk/index.d.ts +1 -1
- package/sdk/index.d.ts.map +1 -1
- package/sdk/index.js +1 -1
- package/sdk/index.js.map +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 +1 -23
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +21 -430
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +136 -88
- 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 +71 -451
- package/src/models/components/calldetail.ts +147 -130
- package/src/models/components/index.ts +0 -3
- package/src/models/components/security.ts +1 -1
- package/src/models/errors/createagent.ts +359 -311
- package/src/models/errors/deleteagent.ts +359 -311
- package/src/models/errors/getagent.ts +358 -302
- package/src/models/errors/getcall.ts +348 -294
- package/src/models/errors/index.ts +1 -6
- package/src/models/errors/listagents.ts +174 -147
- package/src/models/errors/listcalls.ts +251 -211
- package/src/models/errors/registercall.ts +662 -0
- package/src/models/errors/updateagent.ts +359 -311
- package/src/models/operations/createagent.ts +124 -130
- package/src/models/operations/deleteagent.ts +94 -78
- package/src/models/operations/getagent.ts +104 -88
- package/src/models/operations/getcall.ts +101 -88
- package/src/models/operations/index.ts +1 -7
- package/src/models/operations/listagents.ts +68 -60
- package/src/models/operations/listcalls.ts +228 -213
- package/src/models/operations/registercall.ts +167 -0
- package/src/models/operations/updateagent.ts +180 -174
- package/src/sdk/audioWsClient.ts +63 -0
- package/src/sdk/index.ts +1 -1
- package/src/sdk/sdk.ts +802 -1162
- package/src/models/components/agentpromptparams.ts +0 -53
- package/src/models/components/callphonenumber.ts +0 -56
- package/src/models/components/phonenumber.ts +0 -83
- package/src/models/errors/createphonecall.ts +0 -597
- package/src/models/errors/createphonenumber.ts +0 -500
- package/src/models/errors/deletephonenumber.ts +0 -400
- package/src/models/errors/getphonenumber.ts +0 -397
- package/src/models/errors/listphonenumbers.ts +0 -297
- package/src/models/errors/updatephoneagent.ts +0 -397
- package/src/models/operations/createphonecall.ts +0 -308
- package/src/models/operations/createphonenumber.ts +0 -124
- package/src/models/operations/createwebcall.ts +0 -16
- package/src/models/operations/deletephonenumber.ts +0 -103
- package/src/models/operations/getphonenumber.ts +0 -114
- package/src/models/operations/listphonenumbers.ts +0 -76
- package/src/models/operations/updatephoneagent.ts +0 -159
- package/src/sdk/liveClient.ts +0 -109
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal Server Error
|
|
9
|
+
*/
|
|
10
|
+
export type RegisterCallResponse500ResponseBodyData = {
|
|
11
|
+
/**
|
|
12
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
13
|
+
*/
|
|
14
|
+
rawResponse?: Response | undefined;
|
|
15
|
+
errorMessage?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Internal Server Error
|
|
20
|
+
*/
|
|
21
|
+
export class RegisterCallResponse500ResponseBody extends Error {
|
|
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$: RegisterCallResponse500ResponseBodyData;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
err: RegisterCallResponse500ResponseBodyData,
|
|
33
|
+
options?: ErrorOptions,
|
|
34
|
+
) {
|
|
35
|
+
super("", options);
|
|
36
|
+
this.data$ = err;
|
|
37
|
+
|
|
38
|
+
if (err.rawResponse != null) {
|
|
39
|
+
this.rawResponse = err.rawResponse;
|
|
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 = "RegisterCallResponse500ResponseBody";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Too Many Requests
|
|
57
|
+
*/
|
|
58
|
+
export type RegisterCallResponse429ResponseBodyData = {
|
|
59
|
+
/**
|
|
60
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
61
|
+
*/
|
|
62
|
+
rawResponse?: Response | undefined;
|
|
63
|
+
errorMessage?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Too Many Requests
|
|
68
|
+
*/
|
|
69
|
+
export class RegisterCallResponse429ResponseBody extends Error {
|
|
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$: RegisterCallResponse429ResponseBodyData;
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
err: RegisterCallResponse429ResponseBodyData,
|
|
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;
|
|
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 = "RegisterCallResponse429ResponseBody";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Unprocessable Content
|
|
105
|
+
*/
|
|
106
|
+
export type RegisterCallResponse422ResponseBodyData = {
|
|
107
|
+
/**
|
|
108
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
109
|
+
*/
|
|
110
|
+
rawResponse?: Response | undefined;
|
|
111
|
+
errorMessage?: string | undefined;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Unprocessable Content
|
|
116
|
+
*/
|
|
117
|
+
export class RegisterCallResponse422ResponseBody extends Error {
|
|
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$: RegisterCallResponse422ResponseBodyData;
|
|
126
|
+
|
|
127
|
+
constructor(
|
|
128
|
+
err: RegisterCallResponse422ResponseBodyData,
|
|
129
|
+
options?: ErrorOptions,
|
|
130
|
+
) {
|
|
131
|
+
super("", options);
|
|
132
|
+
this.data$ = err;
|
|
133
|
+
|
|
134
|
+
if (err.rawResponse != null) {
|
|
135
|
+
this.rawResponse = err.rawResponse;
|
|
136
|
+
}
|
|
137
|
+
if (err.errorMessage != null) {
|
|
138
|
+
this.errorMessage = err.errorMessage;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const msg =
|
|
142
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
143
|
+
const { rawResponse, ...data } = err;
|
|
144
|
+
const content = JSON.stringify(data);
|
|
145
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
146
|
+
|
|
147
|
+
this.name = "RegisterCallResponse422ResponseBody";
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Payment Required
|
|
153
|
+
*/
|
|
154
|
+
export type RegisterCallResponse402ResponseBodyData = {
|
|
155
|
+
/**
|
|
156
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
157
|
+
*/
|
|
158
|
+
rawResponse?: Response | undefined;
|
|
159
|
+
errorMessage?: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Payment Required
|
|
164
|
+
*/
|
|
165
|
+
export class RegisterCallResponse402ResponseBody extends Error {
|
|
166
|
+
/**
|
|
167
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
168
|
+
*/
|
|
169
|
+
rawResponse?: Response | undefined;
|
|
170
|
+
errorMessage?: string | undefined;
|
|
171
|
+
|
|
172
|
+
/** The original data that was passed to this error instance. */
|
|
173
|
+
data$: RegisterCallResponse402ResponseBodyData;
|
|
174
|
+
|
|
175
|
+
constructor(
|
|
176
|
+
err: RegisterCallResponse402ResponseBodyData,
|
|
177
|
+
options?: ErrorOptions,
|
|
178
|
+
) {
|
|
179
|
+
super("", options);
|
|
180
|
+
this.data$ = err;
|
|
181
|
+
|
|
182
|
+
if (err.rawResponse != null) {
|
|
183
|
+
this.rawResponse = err.rawResponse;
|
|
184
|
+
}
|
|
185
|
+
if (err.errorMessage != null) {
|
|
186
|
+
this.errorMessage = err.errorMessage;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const msg =
|
|
190
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
191
|
+
const { rawResponse, ...data } = err;
|
|
192
|
+
const content = JSON.stringify(data);
|
|
193
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
194
|
+
|
|
195
|
+
this.name = "RegisterCallResponse402ResponseBody";
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Unauthorized
|
|
201
|
+
*/
|
|
202
|
+
export type RegisterCallResponseResponseBodyData = {
|
|
203
|
+
/**
|
|
204
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
205
|
+
*/
|
|
206
|
+
rawResponse?: Response | undefined;
|
|
207
|
+
errorMessage?: string | undefined;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Unauthorized
|
|
212
|
+
*/
|
|
213
|
+
export class RegisterCallResponseResponseBody extends Error {
|
|
214
|
+
/**
|
|
215
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
216
|
+
*/
|
|
217
|
+
rawResponse?: Response | undefined;
|
|
218
|
+
errorMessage?: string | undefined;
|
|
219
|
+
|
|
220
|
+
/** The original data that was passed to this error instance. */
|
|
221
|
+
data$: RegisterCallResponseResponseBodyData;
|
|
222
|
+
|
|
223
|
+
constructor(
|
|
224
|
+
err: RegisterCallResponseResponseBodyData,
|
|
225
|
+
options?: ErrorOptions,
|
|
226
|
+
) {
|
|
227
|
+
super("", options);
|
|
228
|
+
this.data$ = err;
|
|
229
|
+
|
|
230
|
+
if (err.rawResponse != null) {
|
|
231
|
+
this.rawResponse = err.rawResponse;
|
|
232
|
+
}
|
|
233
|
+
if (err.errorMessage != null) {
|
|
234
|
+
this.errorMessage = err.errorMessage;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const msg =
|
|
238
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
239
|
+
const { rawResponse, ...data } = err;
|
|
240
|
+
const content = JSON.stringify(data);
|
|
241
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
242
|
+
|
|
243
|
+
this.name = "RegisterCallResponseResponseBody";
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Bad Request
|
|
249
|
+
*/
|
|
250
|
+
export type RegisterCallResponseBodyData = {
|
|
251
|
+
/**
|
|
252
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
253
|
+
*/
|
|
254
|
+
rawResponse?: Response | undefined;
|
|
255
|
+
errorMessage?: string | undefined;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Bad Request
|
|
260
|
+
*/
|
|
261
|
+
export class RegisterCallResponseBody extends Error {
|
|
262
|
+
/**
|
|
263
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
264
|
+
*/
|
|
265
|
+
rawResponse?: Response | undefined;
|
|
266
|
+
errorMessage?: string | undefined;
|
|
267
|
+
|
|
268
|
+
/** The original data that was passed to this error instance. */
|
|
269
|
+
data$: RegisterCallResponseBodyData;
|
|
270
|
+
|
|
271
|
+
constructor(err: RegisterCallResponseBodyData, options?: ErrorOptions) {
|
|
272
|
+
super("", options);
|
|
273
|
+
this.data$ = err;
|
|
274
|
+
|
|
275
|
+
if (err.rawResponse != null) {
|
|
276
|
+
this.rawResponse = err.rawResponse;
|
|
277
|
+
}
|
|
278
|
+
if (err.errorMessage != null) {
|
|
279
|
+
this.errorMessage = err.errorMessage;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const msg =
|
|
283
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
284
|
+
const { rawResponse, ...data } = err;
|
|
285
|
+
const content = JSON.stringify(data);
|
|
286
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
287
|
+
|
|
288
|
+
this.name = "RegisterCallResponseBody";
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** @internal */
|
|
293
|
+
export namespace RegisterCallResponse500ResponseBody$ {
|
|
294
|
+
export type Inbound = {
|
|
295
|
+
RawResponse?: Response | undefined;
|
|
296
|
+
error_message?: string | undefined;
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
export const inboundSchema: z.ZodType<
|
|
300
|
+
RegisterCallResponse500ResponseBody,
|
|
301
|
+
z.ZodTypeDef,
|
|
302
|
+
Inbound
|
|
303
|
+
> = z
|
|
304
|
+
.object({
|
|
305
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
306
|
+
error_message: z.string().optional(),
|
|
307
|
+
})
|
|
308
|
+
.transform((v) => {
|
|
309
|
+
return new RegisterCallResponse500ResponseBody({
|
|
310
|
+
...(v.RawResponse === undefined
|
|
311
|
+
? null
|
|
312
|
+
: { rawResponse: v.RawResponse }),
|
|
313
|
+
...(v.error_message === undefined
|
|
314
|
+
? null
|
|
315
|
+
: { errorMessage: v.error_message }),
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
export type Outbound = {
|
|
319
|
+
RawResponse?: never | undefined;
|
|
320
|
+
error_message?: string | undefined;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export const outboundSchema: z.ZodType<
|
|
324
|
+
Outbound,
|
|
325
|
+
z.ZodTypeDef,
|
|
326
|
+
RegisterCallResponse500ResponseBody
|
|
327
|
+
> = z
|
|
328
|
+
.instanceof(RegisterCallResponse500ResponseBody)
|
|
329
|
+
.transform((v) => v.data$)
|
|
330
|
+
.pipe(
|
|
331
|
+
z
|
|
332
|
+
.object({
|
|
333
|
+
rawResponse: z
|
|
334
|
+
.instanceof(Response)
|
|
335
|
+
.transform(() => {
|
|
336
|
+
throw new Error("Response cannot be serialized");
|
|
337
|
+
})
|
|
338
|
+
.optional(),
|
|
339
|
+
errorMessage: z.string().optional(),
|
|
340
|
+
})
|
|
341
|
+
.transform((v) => {
|
|
342
|
+
return {
|
|
343
|
+
...(v.rawResponse === undefined
|
|
344
|
+
? null
|
|
345
|
+
: { RawResponse: v.rawResponse }),
|
|
346
|
+
...(v.errorMessage === undefined
|
|
347
|
+
? null
|
|
348
|
+
: { error_message: v.errorMessage }),
|
|
349
|
+
};
|
|
350
|
+
}),
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/** @internal */
|
|
355
|
+
export namespace RegisterCallResponse429ResponseBody$ {
|
|
356
|
+
export type Inbound = {
|
|
357
|
+
RawResponse?: Response | undefined;
|
|
358
|
+
error_message?: string | undefined;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
export const inboundSchema: z.ZodType<
|
|
362
|
+
RegisterCallResponse429ResponseBody,
|
|
363
|
+
z.ZodTypeDef,
|
|
364
|
+
Inbound
|
|
365
|
+
> = z
|
|
366
|
+
.object({
|
|
367
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
368
|
+
error_message: z.string().optional(),
|
|
369
|
+
})
|
|
370
|
+
.transform((v) => {
|
|
371
|
+
return new RegisterCallResponse429ResponseBody({
|
|
372
|
+
...(v.RawResponse === undefined
|
|
373
|
+
? null
|
|
374
|
+
: { rawResponse: v.RawResponse }),
|
|
375
|
+
...(v.error_message === undefined
|
|
376
|
+
? null
|
|
377
|
+
: { errorMessage: v.error_message }),
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
export type Outbound = {
|
|
381
|
+
RawResponse?: never | undefined;
|
|
382
|
+
error_message?: string | undefined;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
export const outboundSchema: z.ZodType<
|
|
386
|
+
Outbound,
|
|
387
|
+
z.ZodTypeDef,
|
|
388
|
+
RegisterCallResponse429ResponseBody
|
|
389
|
+
> = z
|
|
390
|
+
.instanceof(RegisterCallResponse429ResponseBody)
|
|
391
|
+
.transform((v) => v.data$)
|
|
392
|
+
.pipe(
|
|
393
|
+
z
|
|
394
|
+
.object({
|
|
395
|
+
rawResponse: z
|
|
396
|
+
.instanceof(Response)
|
|
397
|
+
.transform(() => {
|
|
398
|
+
throw new Error("Response cannot be serialized");
|
|
399
|
+
})
|
|
400
|
+
.optional(),
|
|
401
|
+
errorMessage: z.string().optional(),
|
|
402
|
+
})
|
|
403
|
+
.transform((v) => {
|
|
404
|
+
return {
|
|
405
|
+
...(v.rawResponse === undefined
|
|
406
|
+
? null
|
|
407
|
+
: { RawResponse: v.rawResponse }),
|
|
408
|
+
...(v.errorMessage === undefined
|
|
409
|
+
? null
|
|
410
|
+
: { error_message: v.errorMessage }),
|
|
411
|
+
};
|
|
412
|
+
}),
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/** @internal */
|
|
417
|
+
export namespace RegisterCallResponse422ResponseBody$ {
|
|
418
|
+
export type Inbound = {
|
|
419
|
+
RawResponse?: Response | undefined;
|
|
420
|
+
error_message?: string | undefined;
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
export const inboundSchema: z.ZodType<
|
|
424
|
+
RegisterCallResponse422ResponseBody,
|
|
425
|
+
z.ZodTypeDef,
|
|
426
|
+
Inbound
|
|
427
|
+
> = z
|
|
428
|
+
.object({
|
|
429
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
430
|
+
error_message: z.string().optional(),
|
|
431
|
+
})
|
|
432
|
+
.transform((v) => {
|
|
433
|
+
return new RegisterCallResponse422ResponseBody({
|
|
434
|
+
...(v.RawResponse === undefined
|
|
435
|
+
? null
|
|
436
|
+
: { rawResponse: v.RawResponse }),
|
|
437
|
+
...(v.error_message === undefined
|
|
438
|
+
? null
|
|
439
|
+
: { errorMessage: v.error_message }),
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
export type Outbound = {
|
|
443
|
+
RawResponse?: never | undefined;
|
|
444
|
+
error_message?: string | undefined;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export const outboundSchema: z.ZodType<
|
|
448
|
+
Outbound,
|
|
449
|
+
z.ZodTypeDef,
|
|
450
|
+
RegisterCallResponse422ResponseBody
|
|
451
|
+
> = z
|
|
452
|
+
.instanceof(RegisterCallResponse422ResponseBody)
|
|
453
|
+
.transform((v) => v.data$)
|
|
454
|
+
.pipe(
|
|
455
|
+
z
|
|
456
|
+
.object({
|
|
457
|
+
rawResponse: z
|
|
458
|
+
.instanceof(Response)
|
|
459
|
+
.transform(() => {
|
|
460
|
+
throw new Error("Response cannot be serialized");
|
|
461
|
+
})
|
|
462
|
+
.optional(),
|
|
463
|
+
errorMessage: z.string().optional(),
|
|
464
|
+
})
|
|
465
|
+
.transform((v) => {
|
|
466
|
+
return {
|
|
467
|
+
...(v.rawResponse === undefined
|
|
468
|
+
? null
|
|
469
|
+
: { RawResponse: v.rawResponse }),
|
|
470
|
+
...(v.errorMessage === undefined
|
|
471
|
+
? null
|
|
472
|
+
: { error_message: v.errorMessage }),
|
|
473
|
+
};
|
|
474
|
+
}),
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/** @internal */
|
|
479
|
+
export namespace RegisterCallResponse402ResponseBody$ {
|
|
480
|
+
export type Inbound = {
|
|
481
|
+
RawResponse?: Response | undefined;
|
|
482
|
+
error_message?: string | undefined;
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
export const inboundSchema: z.ZodType<
|
|
486
|
+
RegisterCallResponse402ResponseBody,
|
|
487
|
+
z.ZodTypeDef,
|
|
488
|
+
Inbound
|
|
489
|
+
> = z
|
|
490
|
+
.object({
|
|
491
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
492
|
+
error_message: z.string().optional(),
|
|
493
|
+
})
|
|
494
|
+
.transform((v) => {
|
|
495
|
+
return new RegisterCallResponse402ResponseBody({
|
|
496
|
+
...(v.RawResponse === undefined
|
|
497
|
+
? null
|
|
498
|
+
: { rawResponse: v.RawResponse }),
|
|
499
|
+
...(v.error_message === undefined
|
|
500
|
+
? null
|
|
501
|
+
: { errorMessage: v.error_message }),
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
export type Outbound = {
|
|
505
|
+
RawResponse?: never | undefined;
|
|
506
|
+
error_message?: string | undefined;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
export const outboundSchema: z.ZodType<
|
|
510
|
+
Outbound,
|
|
511
|
+
z.ZodTypeDef,
|
|
512
|
+
RegisterCallResponse402ResponseBody
|
|
513
|
+
> = z
|
|
514
|
+
.instanceof(RegisterCallResponse402ResponseBody)
|
|
515
|
+
.transform((v) => v.data$)
|
|
516
|
+
.pipe(
|
|
517
|
+
z
|
|
518
|
+
.object({
|
|
519
|
+
rawResponse: z
|
|
520
|
+
.instanceof(Response)
|
|
521
|
+
.transform(() => {
|
|
522
|
+
throw new Error("Response cannot be serialized");
|
|
523
|
+
})
|
|
524
|
+
.optional(),
|
|
525
|
+
errorMessage: z.string().optional(),
|
|
526
|
+
})
|
|
527
|
+
.transform((v) => {
|
|
528
|
+
return {
|
|
529
|
+
...(v.rawResponse === undefined
|
|
530
|
+
? null
|
|
531
|
+
: { RawResponse: v.rawResponse }),
|
|
532
|
+
...(v.errorMessage === undefined
|
|
533
|
+
? null
|
|
534
|
+
: { error_message: v.errorMessage }),
|
|
535
|
+
};
|
|
536
|
+
}),
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** @internal */
|
|
541
|
+
export namespace RegisterCallResponseResponseBody$ {
|
|
542
|
+
export type Inbound = {
|
|
543
|
+
RawResponse?: Response | undefined;
|
|
544
|
+
error_message?: string | undefined;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
export const inboundSchema: z.ZodType<
|
|
548
|
+
RegisterCallResponseResponseBody,
|
|
549
|
+
z.ZodTypeDef,
|
|
550
|
+
Inbound
|
|
551
|
+
> = z
|
|
552
|
+
.object({
|
|
553
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
554
|
+
error_message: z.string().optional(),
|
|
555
|
+
})
|
|
556
|
+
.transform((v) => {
|
|
557
|
+
return new RegisterCallResponseResponseBody({
|
|
558
|
+
...(v.RawResponse === undefined
|
|
559
|
+
? null
|
|
560
|
+
: { rawResponse: v.RawResponse }),
|
|
561
|
+
...(v.error_message === undefined
|
|
562
|
+
? null
|
|
563
|
+
: { errorMessage: v.error_message }),
|
|
564
|
+
});
|
|
565
|
+
});
|
|
566
|
+
export type Outbound = {
|
|
567
|
+
RawResponse?: never | undefined;
|
|
568
|
+
error_message?: string | undefined;
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
export const outboundSchema: z.ZodType<
|
|
572
|
+
Outbound,
|
|
573
|
+
z.ZodTypeDef,
|
|
574
|
+
RegisterCallResponseResponseBody
|
|
575
|
+
> = z
|
|
576
|
+
.instanceof(RegisterCallResponseResponseBody)
|
|
577
|
+
.transform((v) => v.data$)
|
|
578
|
+
.pipe(
|
|
579
|
+
z
|
|
580
|
+
.object({
|
|
581
|
+
rawResponse: z
|
|
582
|
+
.instanceof(Response)
|
|
583
|
+
.transform(() => {
|
|
584
|
+
throw new Error("Response cannot be serialized");
|
|
585
|
+
})
|
|
586
|
+
.optional(),
|
|
587
|
+
errorMessage: z.string().optional(),
|
|
588
|
+
})
|
|
589
|
+
.transform((v) => {
|
|
590
|
+
return {
|
|
591
|
+
...(v.rawResponse === undefined
|
|
592
|
+
? null
|
|
593
|
+
: { RawResponse: v.rawResponse }),
|
|
594
|
+
...(v.errorMessage === undefined
|
|
595
|
+
? null
|
|
596
|
+
: { error_message: v.errorMessage }),
|
|
597
|
+
};
|
|
598
|
+
}),
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/** @internal */
|
|
603
|
+
export namespace RegisterCallResponseBody$ {
|
|
604
|
+
export type Inbound = {
|
|
605
|
+
RawResponse?: Response | undefined;
|
|
606
|
+
error_message?: string | undefined;
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
export const inboundSchema: z.ZodType<
|
|
610
|
+
RegisterCallResponseBody,
|
|
611
|
+
z.ZodTypeDef,
|
|
612
|
+
Inbound
|
|
613
|
+
> = z
|
|
614
|
+
.object({
|
|
615
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
616
|
+
error_message: z.string().optional(),
|
|
617
|
+
})
|
|
618
|
+
.transform((v) => {
|
|
619
|
+
return new RegisterCallResponseBody({
|
|
620
|
+
...(v.RawResponse === undefined
|
|
621
|
+
? null
|
|
622
|
+
: { rawResponse: v.RawResponse }),
|
|
623
|
+
...(v.error_message === undefined
|
|
624
|
+
? null
|
|
625
|
+
: { errorMessage: v.error_message }),
|
|
626
|
+
});
|
|
627
|
+
});
|
|
628
|
+
export type Outbound = {
|
|
629
|
+
RawResponse?: never | undefined;
|
|
630
|
+
error_message?: string | undefined;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
export const outboundSchema: z.ZodType<
|
|
634
|
+
Outbound,
|
|
635
|
+
z.ZodTypeDef,
|
|
636
|
+
RegisterCallResponseBody
|
|
637
|
+
> = z
|
|
638
|
+
.instanceof(RegisterCallResponseBody)
|
|
639
|
+
.transform((v) => v.data$)
|
|
640
|
+
.pipe(
|
|
641
|
+
z
|
|
642
|
+
.object({
|
|
643
|
+
rawResponse: z
|
|
644
|
+
.instanceof(Response)
|
|
645
|
+
.transform(() => {
|
|
646
|
+
throw new Error("Response cannot be serialized");
|
|
647
|
+
})
|
|
648
|
+
.optional(),
|
|
649
|
+
errorMessage: z.string().optional(),
|
|
650
|
+
})
|
|
651
|
+
.transform((v) => {
|
|
652
|
+
return {
|
|
653
|
+
...(v.rawResponse === undefined
|
|
654
|
+
? null
|
|
655
|
+
: { RawResponse: v.rawResponse }),
|
|
656
|
+
...(v.errorMessage === undefined
|
|
657
|
+
? null
|
|
658
|
+
: { error_message: v.errorMessage }),
|
|
659
|
+
};
|
|
660
|
+
}),
|
|
661
|
+
);
|
|
662
|
+
}
|