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
|
@@ -1,597 +0,0 @@
|
|
|
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 CreatePhoneCallResponse500ResponseBodyData = {
|
|
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 CreatePhoneCallResponse500ResponseBody 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$: CreatePhoneCallResponse500ResponseBodyData;
|
|
30
|
-
|
|
31
|
-
constructor(err: CreatePhoneCallResponse500ResponseBodyData, options?: ErrorOptions) {
|
|
32
|
-
super("", options);
|
|
33
|
-
this.data$ = err;
|
|
34
|
-
|
|
35
|
-
if (err.rawResponse != null) {
|
|
36
|
-
this.rawResponse = err.rawResponse;
|
|
37
|
-
}
|
|
38
|
-
if (err.errorMessage != null) {
|
|
39
|
-
this.errorMessage = err.errorMessage;
|
|
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 = "CreatePhoneCallResponse500ResponseBody";
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Too Many Requests
|
|
53
|
-
*/
|
|
54
|
-
export type CreatePhoneCallResponse429ResponseBodyData = {
|
|
55
|
-
/**
|
|
56
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
57
|
-
*/
|
|
58
|
-
rawResponse?: Response | undefined;
|
|
59
|
-
errorMessage?: string | undefined;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Too Many Requests
|
|
64
|
-
*/
|
|
65
|
-
export class CreatePhoneCallResponse429ResponseBody extends Error {
|
|
66
|
-
/**
|
|
67
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
68
|
-
*/
|
|
69
|
-
rawResponse?: Response | undefined;
|
|
70
|
-
errorMessage?: string | undefined;
|
|
71
|
-
|
|
72
|
-
/** The original data that was passed to this error instance. */
|
|
73
|
-
data$: CreatePhoneCallResponse429ResponseBodyData;
|
|
74
|
-
|
|
75
|
-
constructor(err: CreatePhoneCallResponse429ResponseBodyData, options?: ErrorOptions) {
|
|
76
|
-
super("", options);
|
|
77
|
-
this.data$ = err;
|
|
78
|
-
|
|
79
|
-
if (err.rawResponse != null) {
|
|
80
|
-
this.rawResponse = err.rawResponse;
|
|
81
|
-
}
|
|
82
|
-
if (err.errorMessage != null) {
|
|
83
|
-
this.errorMessage = err.errorMessage;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
87
|
-
const { rawResponse, ...data } = err;
|
|
88
|
-
const content = JSON.stringify(data);
|
|
89
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
90
|
-
|
|
91
|
-
this.name = "CreatePhoneCallResponse429ResponseBody";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Unprocessable Content
|
|
97
|
-
*/
|
|
98
|
-
export type CreatePhoneCallResponse422ResponseBodyData = {
|
|
99
|
-
/**
|
|
100
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
101
|
-
*/
|
|
102
|
-
rawResponse?: Response | undefined;
|
|
103
|
-
errorMessage?: string | undefined;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Unprocessable Content
|
|
108
|
-
*/
|
|
109
|
-
export class CreatePhoneCallResponse422ResponseBody extends Error {
|
|
110
|
-
/**
|
|
111
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
112
|
-
*/
|
|
113
|
-
rawResponse?: Response | undefined;
|
|
114
|
-
errorMessage?: string | undefined;
|
|
115
|
-
|
|
116
|
-
/** The original data that was passed to this error instance. */
|
|
117
|
-
data$: CreatePhoneCallResponse422ResponseBodyData;
|
|
118
|
-
|
|
119
|
-
constructor(err: CreatePhoneCallResponse422ResponseBodyData, options?: ErrorOptions) {
|
|
120
|
-
super("", options);
|
|
121
|
-
this.data$ = err;
|
|
122
|
-
|
|
123
|
-
if (err.rawResponse != null) {
|
|
124
|
-
this.rawResponse = err.rawResponse;
|
|
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 = "CreatePhoneCallResponse422ResponseBody";
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Payment Required
|
|
141
|
-
*/
|
|
142
|
-
export type CreatePhoneCallResponse402ResponseBodyData = {
|
|
143
|
-
/**
|
|
144
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
145
|
-
*/
|
|
146
|
-
rawResponse?: Response | undefined;
|
|
147
|
-
errorMessage?: string | undefined;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Payment Required
|
|
152
|
-
*/
|
|
153
|
-
export class CreatePhoneCallResponse402ResponseBody extends Error {
|
|
154
|
-
/**
|
|
155
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
156
|
-
*/
|
|
157
|
-
rawResponse?: Response | undefined;
|
|
158
|
-
errorMessage?: string | undefined;
|
|
159
|
-
|
|
160
|
-
/** The original data that was passed to this error instance. */
|
|
161
|
-
data$: CreatePhoneCallResponse402ResponseBodyData;
|
|
162
|
-
|
|
163
|
-
constructor(err: CreatePhoneCallResponse402ResponseBodyData, options?: ErrorOptions) {
|
|
164
|
-
super("", options);
|
|
165
|
-
this.data$ = err;
|
|
166
|
-
|
|
167
|
-
if (err.rawResponse != null) {
|
|
168
|
-
this.rawResponse = err.rawResponse;
|
|
169
|
-
}
|
|
170
|
-
if (err.errorMessage != null) {
|
|
171
|
-
this.errorMessage = err.errorMessage;
|
|
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 = "CreatePhoneCallResponse402ResponseBody";
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Unauthorized
|
|
185
|
-
*/
|
|
186
|
-
export type CreatePhoneCallResponseResponseBodyData = {
|
|
187
|
-
/**
|
|
188
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
189
|
-
*/
|
|
190
|
-
rawResponse?: Response | undefined;
|
|
191
|
-
errorMessage?: string | undefined;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Unauthorized
|
|
196
|
-
*/
|
|
197
|
-
export class CreatePhoneCallResponseResponseBody extends Error {
|
|
198
|
-
/**
|
|
199
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
200
|
-
*/
|
|
201
|
-
rawResponse?: Response | undefined;
|
|
202
|
-
errorMessage?: string | undefined;
|
|
203
|
-
|
|
204
|
-
/** The original data that was passed to this error instance. */
|
|
205
|
-
data$: CreatePhoneCallResponseResponseBodyData;
|
|
206
|
-
|
|
207
|
-
constructor(err: CreatePhoneCallResponseResponseBodyData, options?: ErrorOptions) {
|
|
208
|
-
super("", options);
|
|
209
|
-
this.data$ = err;
|
|
210
|
-
|
|
211
|
-
if (err.rawResponse != null) {
|
|
212
|
-
this.rawResponse = err.rawResponse;
|
|
213
|
-
}
|
|
214
|
-
if (err.errorMessage != null) {
|
|
215
|
-
this.errorMessage = err.errorMessage;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
219
|
-
const { rawResponse, ...data } = err;
|
|
220
|
-
const content = JSON.stringify(data);
|
|
221
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
222
|
-
|
|
223
|
-
this.name = "CreatePhoneCallResponseResponseBody";
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Bad Request
|
|
229
|
-
*/
|
|
230
|
-
export type CreatePhoneCallResponseBodyData = {
|
|
231
|
-
/**
|
|
232
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
233
|
-
*/
|
|
234
|
-
rawResponse?: Response | undefined;
|
|
235
|
-
errorMessage?: string | undefined;
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Bad Request
|
|
240
|
-
*/
|
|
241
|
-
export class CreatePhoneCallResponseBody extends Error {
|
|
242
|
-
/**
|
|
243
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
244
|
-
*/
|
|
245
|
-
rawResponse?: Response | undefined;
|
|
246
|
-
errorMessage?: string | undefined;
|
|
247
|
-
|
|
248
|
-
/** The original data that was passed to this error instance. */
|
|
249
|
-
data$: CreatePhoneCallResponseBodyData;
|
|
250
|
-
|
|
251
|
-
constructor(err: CreatePhoneCallResponseBodyData, options?: ErrorOptions) {
|
|
252
|
-
super("", options);
|
|
253
|
-
this.data$ = err;
|
|
254
|
-
|
|
255
|
-
if (err.rawResponse != null) {
|
|
256
|
-
this.rawResponse = err.rawResponse;
|
|
257
|
-
}
|
|
258
|
-
if (err.errorMessage != null) {
|
|
259
|
-
this.errorMessage = err.errorMessage;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
263
|
-
const { rawResponse, ...data } = err;
|
|
264
|
-
const content = JSON.stringify(data);
|
|
265
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
266
|
-
|
|
267
|
-
this.name = "CreatePhoneCallResponseBody";
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/** @internal */
|
|
272
|
-
export namespace CreatePhoneCallResponse500ResponseBody$ {
|
|
273
|
-
export type Inbound = {
|
|
274
|
-
RawResponse?: Response | undefined;
|
|
275
|
-
error_message?: string | undefined;
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
export const inboundSchema: z.ZodType<
|
|
279
|
-
CreatePhoneCallResponse500ResponseBody,
|
|
280
|
-
z.ZodTypeDef,
|
|
281
|
-
Inbound
|
|
282
|
-
> = z
|
|
283
|
-
.object({
|
|
284
|
-
RawResponse: z.instanceof(Response).optional(),
|
|
285
|
-
error_message: z.string().optional(),
|
|
286
|
-
})
|
|
287
|
-
.transform((v) => {
|
|
288
|
-
return new CreatePhoneCallResponse500ResponseBody({
|
|
289
|
-
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
|
290
|
-
...(v.error_message === undefined ? null : { errorMessage: v.error_message }),
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
export type Outbound = {
|
|
294
|
-
RawResponse?: never | undefined;
|
|
295
|
-
error_message?: string | undefined;
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
export const outboundSchema: z.ZodType<
|
|
299
|
-
Outbound,
|
|
300
|
-
z.ZodTypeDef,
|
|
301
|
-
CreatePhoneCallResponse500ResponseBody
|
|
302
|
-
> = z
|
|
303
|
-
.instanceof(CreatePhoneCallResponse500ResponseBody)
|
|
304
|
-
.transform((v) => v.data$)
|
|
305
|
-
.pipe(
|
|
306
|
-
z
|
|
307
|
-
.object({
|
|
308
|
-
rawResponse: z
|
|
309
|
-
.instanceof(Response)
|
|
310
|
-
.transform(() => {
|
|
311
|
-
throw new Error("Response cannot be serialized");
|
|
312
|
-
})
|
|
313
|
-
.optional(),
|
|
314
|
-
errorMessage: z.string().optional(),
|
|
315
|
-
})
|
|
316
|
-
.transform((v) => {
|
|
317
|
-
return {
|
|
318
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
319
|
-
...(v.errorMessage === undefined
|
|
320
|
-
? null
|
|
321
|
-
: { error_message: v.errorMessage }),
|
|
322
|
-
};
|
|
323
|
-
})
|
|
324
|
-
);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/** @internal */
|
|
328
|
-
export namespace CreatePhoneCallResponse429ResponseBody$ {
|
|
329
|
-
export type Inbound = {
|
|
330
|
-
RawResponse?: Response | undefined;
|
|
331
|
-
error_message?: string | undefined;
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
export const inboundSchema: z.ZodType<
|
|
335
|
-
CreatePhoneCallResponse429ResponseBody,
|
|
336
|
-
z.ZodTypeDef,
|
|
337
|
-
Inbound
|
|
338
|
-
> = z
|
|
339
|
-
.object({
|
|
340
|
-
RawResponse: z.instanceof(Response).optional(),
|
|
341
|
-
error_message: z.string().optional(),
|
|
342
|
-
})
|
|
343
|
-
.transform((v) => {
|
|
344
|
-
return new CreatePhoneCallResponse429ResponseBody({
|
|
345
|
-
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
|
346
|
-
...(v.error_message === undefined ? null : { errorMessage: v.error_message }),
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
export type Outbound = {
|
|
350
|
-
RawResponse?: never | undefined;
|
|
351
|
-
error_message?: string | undefined;
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
export const outboundSchema: z.ZodType<
|
|
355
|
-
Outbound,
|
|
356
|
-
z.ZodTypeDef,
|
|
357
|
-
CreatePhoneCallResponse429ResponseBody
|
|
358
|
-
> = z
|
|
359
|
-
.instanceof(CreatePhoneCallResponse429ResponseBody)
|
|
360
|
-
.transform((v) => v.data$)
|
|
361
|
-
.pipe(
|
|
362
|
-
z
|
|
363
|
-
.object({
|
|
364
|
-
rawResponse: z
|
|
365
|
-
.instanceof(Response)
|
|
366
|
-
.transform(() => {
|
|
367
|
-
throw new Error("Response cannot be serialized");
|
|
368
|
-
})
|
|
369
|
-
.optional(),
|
|
370
|
-
errorMessage: z.string().optional(),
|
|
371
|
-
})
|
|
372
|
-
.transform((v) => {
|
|
373
|
-
return {
|
|
374
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
375
|
-
...(v.errorMessage === undefined
|
|
376
|
-
? null
|
|
377
|
-
: { error_message: v.errorMessage }),
|
|
378
|
-
};
|
|
379
|
-
})
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/** @internal */
|
|
384
|
-
export namespace CreatePhoneCallResponse422ResponseBody$ {
|
|
385
|
-
export type Inbound = {
|
|
386
|
-
RawResponse?: Response | undefined;
|
|
387
|
-
error_message?: string | undefined;
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
export const inboundSchema: z.ZodType<
|
|
391
|
-
CreatePhoneCallResponse422ResponseBody,
|
|
392
|
-
z.ZodTypeDef,
|
|
393
|
-
Inbound
|
|
394
|
-
> = z
|
|
395
|
-
.object({
|
|
396
|
-
RawResponse: z.instanceof(Response).optional(),
|
|
397
|
-
error_message: z.string().optional(),
|
|
398
|
-
})
|
|
399
|
-
.transform((v) => {
|
|
400
|
-
return new CreatePhoneCallResponse422ResponseBody({
|
|
401
|
-
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
|
402
|
-
...(v.error_message === undefined ? null : { 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
|
-
CreatePhoneCallResponse422ResponseBody
|
|
414
|
-
> = z
|
|
415
|
-
.instanceof(CreatePhoneCallResponse422ResponseBody)
|
|
416
|
-
.transform((v) => v.data$)
|
|
417
|
-
.pipe(
|
|
418
|
-
z
|
|
419
|
-
.object({
|
|
420
|
-
rawResponse: z
|
|
421
|
-
.instanceof(Response)
|
|
422
|
-
.transform(() => {
|
|
423
|
-
throw new Error("Response cannot be serialized");
|
|
424
|
-
})
|
|
425
|
-
.optional(),
|
|
426
|
-
errorMessage: z.string().optional(),
|
|
427
|
-
})
|
|
428
|
-
.transform((v) => {
|
|
429
|
-
return {
|
|
430
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
431
|
-
...(v.errorMessage === undefined
|
|
432
|
-
? null
|
|
433
|
-
: { error_message: v.errorMessage }),
|
|
434
|
-
};
|
|
435
|
-
})
|
|
436
|
-
);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/** @internal */
|
|
440
|
-
export namespace CreatePhoneCallResponse402ResponseBody$ {
|
|
441
|
-
export type Inbound = {
|
|
442
|
-
RawResponse?: Response | undefined;
|
|
443
|
-
error_message?: string | undefined;
|
|
444
|
-
};
|
|
445
|
-
|
|
446
|
-
export const inboundSchema: z.ZodType<
|
|
447
|
-
CreatePhoneCallResponse402ResponseBody,
|
|
448
|
-
z.ZodTypeDef,
|
|
449
|
-
Inbound
|
|
450
|
-
> = z
|
|
451
|
-
.object({
|
|
452
|
-
RawResponse: z.instanceof(Response).optional(),
|
|
453
|
-
error_message: z.string().optional(),
|
|
454
|
-
})
|
|
455
|
-
.transform((v) => {
|
|
456
|
-
return new CreatePhoneCallResponse402ResponseBody({
|
|
457
|
-
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
|
458
|
-
...(v.error_message === undefined ? null : { errorMessage: v.error_message }),
|
|
459
|
-
});
|
|
460
|
-
});
|
|
461
|
-
export type Outbound = {
|
|
462
|
-
RawResponse?: never | undefined;
|
|
463
|
-
error_message?: string | undefined;
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
export const outboundSchema: z.ZodType<
|
|
467
|
-
Outbound,
|
|
468
|
-
z.ZodTypeDef,
|
|
469
|
-
CreatePhoneCallResponse402ResponseBody
|
|
470
|
-
> = z
|
|
471
|
-
.instanceof(CreatePhoneCallResponse402ResponseBody)
|
|
472
|
-
.transform((v) => v.data$)
|
|
473
|
-
.pipe(
|
|
474
|
-
z
|
|
475
|
-
.object({
|
|
476
|
-
rawResponse: z
|
|
477
|
-
.instanceof(Response)
|
|
478
|
-
.transform(() => {
|
|
479
|
-
throw new Error("Response cannot be serialized");
|
|
480
|
-
})
|
|
481
|
-
.optional(),
|
|
482
|
-
errorMessage: z.string().optional(),
|
|
483
|
-
})
|
|
484
|
-
.transform((v) => {
|
|
485
|
-
return {
|
|
486
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
487
|
-
...(v.errorMessage === undefined
|
|
488
|
-
? null
|
|
489
|
-
: { error_message: v.errorMessage }),
|
|
490
|
-
};
|
|
491
|
-
})
|
|
492
|
-
);
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/** @internal */
|
|
496
|
-
export namespace CreatePhoneCallResponseResponseBody$ {
|
|
497
|
-
export type Inbound = {
|
|
498
|
-
RawResponse?: Response | undefined;
|
|
499
|
-
error_message?: string | undefined;
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
export const inboundSchema: z.ZodType<
|
|
503
|
-
CreatePhoneCallResponseResponseBody,
|
|
504
|
-
z.ZodTypeDef,
|
|
505
|
-
Inbound
|
|
506
|
-
> = z
|
|
507
|
-
.object({
|
|
508
|
-
RawResponse: z.instanceof(Response).optional(),
|
|
509
|
-
error_message: z.string().optional(),
|
|
510
|
-
})
|
|
511
|
-
.transform((v) => {
|
|
512
|
-
return new CreatePhoneCallResponseResponseBody({
|
|
513
|
-
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
|
514
|
-
...(v.error_message === undefined ? null : { errorMessage: v.error_message }),
|
|
515
|
-
});
|
|
516
|
-
});
|
|
517
|
-
export type Outbound = {
|
|
518
|
-
RawResponse?: never | undefined;
|
|
519
|
-
error_message?: string | undefined;
|
|
520
|
-
};
|
|
521
|
-
|
|
522
|
-
export const outboundSchema: z.ZodType<
|
|
523
|
-
Outbound,
|
|
524
|
-
z.ZodTypeDef,
|
|
525
|
-
CreatePhoneCallResponseResponseBody
|
|
526
|
-
> = z
|
|
527
|
-
.instanceof(CreatePhoneCallResponseResponseBody)
|
|
528
|
-
.transform((v) => v.data$)
|
|
529
|
-
.pipe(
|
|
530
|
-
z
|
|
531
|
-
.object({
|
|
532
|
-
rawResponse: z
|
|
533
|
-
.instanceof(Response)
|
|
534
|
-
.transform(() => {
|
|
535
|
-
throw new Error("Response cannot be serialized");
|
|
536
|
-
})
|
|
537
|
-
.optional(),
|
|
538
|
-
errorMessage: z.string().optional(),
|
|
539
|
-
})
|
|
540
|
-
.transform((v) => {
|
|
541
|
-
return {
|
|
542
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
543
|
-
...(v.errorMessage === undefined
|
|
544
|
-
? null
|
|
545
|
-
: { error_message: v.errorMessage }),
|
|
546
|
-
};
|
|
547
|
-
})
|
|
548
|
-
);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/** @internal */
|
|
552
|
-
export namespace CreatePhoneCallResponseBody$ {
|
|
553
|
-
export type Inbound = {
|
|
554
|
-
RawResponse?: Response | undefined;
|
|
555
|
-
error_message?: string | undefined;
|
|
556
|
-
};
|
|
557
|
-
|
|
558
|
-
export const inboundSchema: z.ZodType<CreatePhoneCallResponseBody, z.ZodTypeDef, Inbound> = z
|
|
559
|
-
.object({
|
|
560
|
-
RawResponse: z.instanceof(Response).optional(),
|
|
561
|
-
error_message: z.string().optional(),
|
|
562
|
-
})
|
|
563
|
-
.transform((v) => {
|
|
564
|
-
return new CreatePhoneCallResponseBody({
|
|
565
|
-
...(v.RawResponse === undefined ? null : { rawResponse: v.RawResponse }),
|
|
566
|
-
...(v.error_message === undefined ? null : { errorMessage: v.error_message }),
|
|
567
|
-
});
|
|
568
|
-
});
|
|
569
|
-
export type Outbound = {
|
|
570
|
-
RawResponse?: never | undefined;
|
|
571
|
-
error_message?: string | undefined;
|
|
572
|
-
};
|
|
573
|
-
|
|
574
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePhoneCallResponseBody> = z
|
|
575
|
-
.instanceof(CreatePhoneCallResponseBody)
|
|
576
|
-
.transform((v) => v.data$)
|
|
577
|
-
.pipe(
|
|
578
|
-
z
|
|
579
|
-
.object({
|
|
580
|
-
rawResponse: z
|
|
581
|
-
.instanceof(Response)
|
|
582
|
-
.transform(() => {
|
|
583
|
-
throw new Error("Response cannot be serialized");
|
|
584
|
-
})
|
|
585
|
-
.optional(),
|
|
586
|
-
errorMessage: z.string().optional(),
|
|
587
|
-
})
|
|
588
|
-
.transform((v) => {
|
|
589
|
-
return {
|
|
590
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
591
|
-
...(v.errorMessage === undefined
|
|
592
|
-
? null
|
|
593
|
-
: { error_message: v.errorMessage }),
|
|
594
|
-
};
|
|
595
|
-
})
|
|
596
|
-
);
|
|
597
|
-
}
|