retell-sdk 2.2.3 → 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 +34 -2
- 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 -3
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +60 -26
- 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.map +1 -1
- package/models/operations/createagent.js +16 -6
- 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.map +1 -1
- package/models/operations/updateagent.js +18 -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 +121 -87
- 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 +459 -387
- 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 +165 -129
- 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 +226 -173
- package/src/models/operations/updatephoneagent.ts +160 -132
- package/src/sdk/liveClient.ts +11 -7
- package/src/sdk/sdk.ts +1313 -1160
|
@@ -8,493 +8,545 @@ import { z } from "zod";
|
|
|
8
8
|
* Internal Server Error
|
|
9
9
|
*/
|
|
10
10
|
export type CreatePhoneNumberResponse500ResponseBodyData = {
|
|
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 CreatePhoneNumberResponse500ResponseBody 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 = "CreatePhoneNumberResponse500ResponseBody";
|
|
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$: CreatePhoneNumberResponse500ResponseBodyData;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
err: CreatePhoneNumberResponse500ResponseBodyData,
|
|
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 = "CreatePhoneNumberResponse500ResponseBody";
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
/**
|
|
52
56
|
* Unprocessable Content
|
|
53
57
|
*/
|
|
54
58
|
export type CreatePhoneNumberResponse422ResponseBodyData = {
|
|
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 CreatePhoneNumberResponse422ResponseBody extends Error {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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 = "CreatePhoneNumberResponse422ResponseBody";
|
|
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$: CreatePhoneNumberResponse422ResponseBodyData;
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
err: CreatePhoneNumberResponse422ResponseBodyData,
|
|
81
|
+
options?: ErrorOptions,
|
|
82
|
+
) {
|
|
83
|
+
super("", options);
|
|
84
|
+
this.data$ = err;
|
|
85
|
+
|
|
86
|
+
if (err.rawResponse != null) {
|
|
87
|
+
this.rawResponse = err.rawResponse;
|
|
92
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 = "CreatePhoneNumberResponse422ResponseBody";
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
/**
|
|
96
104
|
* Payment Required
|
|
97
105
|
*/
|
|
98
106
|
export type CreatePhoneNumberResponse402ResponseBodyData = {
|
|
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
|
* Payment Required
|
|
108
116
|
*/
|
|
109
117
|
export class CreatePhoneNumberResponse402ResponseBody extends Error {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const { rawResponse, ...data } = err;
|
|
132
|
-
const content = JSON.stringify(data);
|
|
133
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
134
|
-
|
|
135
|
-
this.name = "CreatePhoneNumberResponse402ResponseBody";
|
|
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$: CreatePhoneNumberResponse402ResponseBodyData;
|
|
126
|
+
|
|
127
|
+
constructor(
|
|
128
|
+
err: CreatePhoneNumberResponse402ResponseBodyData,
|
|
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;
|
|
136
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 = "CreatePhoneNumberResponse402ResponseBody";
|
|
148
|
+
}
|
|
137
149
|
}
|
|
138
150
|
|
|
139
151
|
/**
|
|
140
152
|
* Unauthorized
|
|
141
153
|
*/
|
|
142
154
|
export type CreatePhoneNumberResponseResponseBodyData = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
157
|
+
*/
|
|
158
|
+
rawResponse?: Response | undefined;
|
|
159
|
+
errorMessage?: string | undefined;
|
|
148
160
|
};
|
|
149
161
|
|
|
150
162
|
/**
|
|
151
163
|
* Unauthorized
|
|
152
164
|
*/
|
|
153
165
|
export class CreatePhoneNumberResponseResponseBody extends Error {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const { rawResponse, ...data } = err;
|
|
176
|
-
const content = JSON.stringify(data);
|
|
177
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
178
|
-
|
|
179
|
-
this.name = "CreatePhoneNumberResponseResponseBody";
|
|
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$: CreatePhoneNumberResponseResponseBodyData;
|
|
174
|
+
|
|
175
|
+
constructor(
|
|
176
|
+
err: CreatePhoneNumberResponseResponseBodyData,
|
|
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;
|
|
180
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 = "CreatePhoneNumberResponseResponseBody";
|
|
196
|
+
}
|
|
181
197
|
}
|
|
182
198
|
|
|
183
199
|
/**
|
|
184
200
|
* Bad Request
|
|
185
201
|
*/
|
|
186
202
|
export type CreatePhoneNumberResponseBodyData = {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
205
|
+
*/
|
|
206
|
+
rawResponse?: Response | undefined;
|
|
207
|
+
errorMessage?: string | undefined;
|
|
192
208
|
};
|
|
193
209
|
|
|
194
210
|
/**
|
|
195
211
|
* Bad Request
|
|
196
212
|
*/
|
|
197
213
|
export class CreatePhoneNumberResponseBody extends Error {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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 = "CreatePhoneNumberResponseBody";
|
|
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$: CreatePhoneNumberResponseBodyData;
|
|
222
|
+
|
|
223
|
+
constructor(err: CreatePhoneNumberResponseBodyData, options?: ErrorOptions) {
|
|
224
|
+
super("", options);
|
|
225
|
+
this.data$ = err;
|
|
226
|
+
|
|
227
|
+
if (err.rawResponse != null) {
|
|
228
|
+
this.rawResponse = err.rawResponse;
|
|
224
229
|
}
|
|
230
|
+
if (err.errorMessage != null) {
|
|
231
|
+
this.errorMessage = err.errorMessage;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const msg =
|
|
235
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
236
|
+
const { rawResponse, ...data } = err;
|
|
237
|
+
const content = JSON.stringify(data);
|
|
238
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
239
|
+
|
|
240
|
+
this.name = "CreatePhoneNumberResponseBody";
|
|
241
|
+
}
|
|
225
242
|
}
|
|
226
243
|
|
|
227
244
|
/** @internal */
|
|
228
245
|
export namespace CreatePhoneNumberResponse500ResponseBody$ {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
246
|
+
export type Inbound = {
|
|
247
|
+
RawResponse?: Response | undefined;
|
|
248
|
+
error_message?: string | undefined;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const inboundSchema: z.ZodType<
|
|
252
|
+
CreatePhoneNumberResponse500ResponseBody,
|
|
253
|
+
z.ZodTypeDef,
|
|
254
|
+
Inbound
|
|
255
|
+
> = z
|
|
256
|
+
.object({
|
|
257
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
258
|
+
error_message: z.string().optional(),
|
|
259
|
+
})
|
|
260
|
+
.transform((v) => {
|
|
261
|
+
return new CreatePhoneNumberResponse500ResponseBody({
|
|
262
|
+
...(v.RawResponse === undefined
|
|
263
|
+
? null
|
|
264
|
+
: { rawResponse: v.RawResponse }),
|
|
265
|
+
...(v.error_message === undefined
|
|
266
|
+
? null
|
|
267
|
+
: { errorMessage: v.error_message }),
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
export type Outbound = {
|
|
271
|
+
RawResponse?: never | undefined;
|
|
272
|
+
error_message?: string | undefined;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export const outboundSchema: z.ZodType<
|
|
276
|
+
Outbound,
|
|
277
|
+
z.ZodTypeDef,
|
|
278
|
+
CreatePhoneNumberResponse500ResponseBody
|
|
279
|
+
> = z
|
|
280
|
+
.instanceof(CreatePhoneNumberResponse500ResponseBody)
|
|
281
|
+
.transform((v) => v.data$)
|
|
282
|
+
.pipe(
|
|
283
|
+
z
|
|
239
284
|
.object({
|
|
240
|
-
|
|
241
|
-
|
|
285
|
+
rawResponse: z
|
|
286
|
+
.instanceof(Response)
|
|
287
|
+
.transform(() => {
|
|
288
|
+
throw new Error("Response cannot be serialized");
|
|
289
|
+
})
|
|
290
|
+
.optional(),
|
|
291
|
+
errorMessage: z.string().optional(),
|
|
242
292
|
})
|
|
243
293
|
.transform((v) => {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
export const outboundSchema: z.ZodType<
|
|
255
|
-
Outbound,
|
|
256
|
-
z.ZodTypeDef,
|
|
257
|
-
CreatePhoneNumberResponse500ResponseBody
|
|
258
|
-
> = z
|
|
259
|
-
.instanceof(CreatePhoneNumberResponse500ResponseBody)
|
|
260
|
-
.transform((v) => v.data$)
|
|
261
|
-
.pipe(
|
|
262
|
-
z
|
|
263
|
-
.object({
|
|
264
|
-
rawResponse: z
|
|
265
|
-
.instanceof(Response)
|
|
266
|
-
.transform(() => {
|
|
267
|
-
throw new Error("Response cannot be serialized");
|
|
268
|
-
})
|
|
269
|
-
.optional(),
|
|
270
|
-
errorMessage: z.string().optional(),
|
|
271
|
-
})
|
|
272
|
-
.transform((v) => {
|
|
273
|
-
return {
|
|
274
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
275
|
-
...(v.errorMessage === undefined
|
|
276
|
-
? null
|
|
277
|
-
: { error_message: v.errorMessage }),
|
|
278
|
-
};
|
|
279
|
-
})
|
|
280
|
-
);
|
|
294
|
+
return {
|
|
295
|
+
...(v.rawResponse === undefined
|
|
296
|
+
? null
|
|
297
|
+
: { RawResponse: v.rawResponse }),
|
|
298
|
+
...(v.errorMessage === undefined
|
|
299
|
+
? null
|
|
300
|
+
: { error_message: v.errorMessage }),
|
|
301
|
+
};
|
|
302
|
+
}),
|
|
303
|
+
);
|
|
281
304
|
}
|
|
282
305
|
|
|
283
306
|
/** @internal */
|
|
284
307
|
export namespace CreatePhoneNumberResponse422ResponseBody$ {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
308
|
+
export type Inbound = {
|
|
309
|
+
RawResponse?: Response | undefined;
|
|
310
|
+
error_message?: string | undefined;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
export const inboundSchema: z.ZodType<
|
|
314
|
+
CreatePhoneNumberResponse422ResponseBody,
|
|
315
|
+
z.ZodTypeDef,
|
|
316
|
+
Inbound
|
|
317
|
+
> = z
|
|
318
|
+
.object({
|
|
319
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
320
|
+
error_message: z.string().optional(),
|
|
321
|
+
})
|
|
322
|
+
.transform((v) => {
|
|
323
|
+
return new CreatePhoneNumberResponse422ResponseBody({
|
|
324
|
+
...(v.RawResponse === undefined
|
|
325
|
+
? null
|
|
326
|
+
: { rawResponse: v.RawResponse }),
|
|
327
|
+
...(v.error_message === undefined
|
|
328
|
+
? null
|
|
329
|
+
: { errorMessage: v.error_message }),
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
export type Outbound = {
|
|
333
|
+
RawResponse?: never | undefined;
|
|
334
|
+
error_message?: string | undefined;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export const outboundSchema: z.ZodType<
|
|
338
|
+
Outbound,
|
|
339
|
+
z.ZodTypeDef,
|
|
340
|
+
CreatePhoneNumberResponse422ResponseBody
|
|
341
|
+
> = z
|
|
342
|
+
.instanceof(CreatePhoneNumberResponse422ResponseBody)
|
|
343
|
+
.transform((v) => v.data$)
|
|
344
|
+
.pipe(
|
|
345
|
+
z
|
|
295
346
|
.object({
|
|
296
|
-
|
|
297
|
-
|
|
347
|
+
rawResponse: z
|
|
348
|
+
.instanceof(Response)
|
|
349
|
+
.transform(() => {
|
|
350
|
+
throw new Error("Response cannot be serialized");
|
|
351
|
+
})
|
|
352
|
+
.optional(),
|
|
353
|
+
errorMessage: z.string().optional(),
|
|
298
354
|
})
|
|
299
355
|
.transform((v) => {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
export const outboundSchema: z.ZodType<
|
|
311
|
-
Outbound,
|
|
312
|
-
z.ZodTypeDef,
|
|
313
|
-
CreatePhoneNumberResponse422ResponseBody
|
|
314
|
-
> = z
|
|
315
|
-
.instanceof(CreatePhoneNumberResponse422ResponseBody)
|
|
316
|
-
.transform((v) => v.data$)
|
|
317
|
-
.pipe(
|
|
318
|
-
z
|
|
319
|
-
.object({
|
|
320
|
-
rawResponse: z
|
|
321
|
-
.instanceof(Response)
|
|
322
|
-
.transform(() => {
|
|
323
|
-
throw new Error("Response cannot be serialized");
|
|
324
|
-
})
|
|
325
|
-
.optional(),
|
|
326
|
-
errorMessage: z.string().optional(),
|
|
327
|
-
})
|
|
328
|
-
.transform((v) => {
|
|
329
|
-
return {
|
|
330
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
331
|
-
...(v.errorMessage === undefined
|
|
332
|
-
? null
|
|
333
|
-
: { error_message: v.errorMessage }),
|
|
334
|
-
};
|
|
335
|
-
})
|
|
336
|
-
);
|
|
356
|
+
return {
|
|
357
|
+
...(v.rawResponse === undefined
|
|
358
|
+
? null
|
|
359
|
+
: { RawResponse: v.rawResponse }),
|
|
360
|
+
...(v.errorMessage === undefined
|
|
361
|
+
? null
|
|
362
|
+
: { error_message: v.errorMessage }),
|
|
363
|
+
};
|
|
364
|
+
}),
|
|
365
|
+
);
|
|
337
366
|
}
|
|
338
367
|
|
|
339
368
|
/** @internal */
|
|
340
369
|
export namespace CreatePhoneNumberResponse402ResponseBody$ {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
370
|
+
export type Inbound = {
|
|
371
|
+
RawResponse?: Response | undefined;
|
|
372
|
+
error_message?: string | undefined;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export const inboundSchema: z.ZodType<
|
|
376
|
+
CreatePhoneNumberResponse402ResponseBody,
|
|
377
|
+
z.ZodTypeDef,
|
|
378
|
+
Inbound
|
|
379
|
+
> = z
|
|
380
|
+
.object({
|
|
381
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
382
|
+
error_message: z.string().optional(),
|
|
383
|
+
})
|
|
384
|
+
.transform((v) => {
|
|
385
|
+
return new CreatePhoneNumberResponse402ResponseBody({
|
|
386
|
+
...(v.RawResponse === undefined
|
|
387
|
+
? null
|
|
388
|
+
: { rawResponse: v.RawResponse }),
|
|
389
|
+
...(v.error_message === undefined
|
|
390
|
+
? null
|
|
391
|
+
: { errorMessage: v.error_message }),
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
export type Outbound = {
|
|
395
|
+
RawResponse?: never | undefined;
|
|
396
|
+
error_message?: string | undefined;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export const outboundSchema: z.ZodType<
|
|
400
|
+
Outbound,
|
|
401
|
+
z.ZodTypeDef,
|
|
402
|
+
CreatePhoneNumberResponse402ResponseBody
|
|
403
|
+
> = z
|
|
404
|
+
.instanceof(CreatePhoneNumberResponse402ResponseBody)
|
|
405
|
+
.transform((v) => v.data$)
|
|
406
|
+
.pipe(
|
|
407
|
+
z
|
|
351
408
|
.object({
|
|
352
|
-
|
|
353
|
-
|
|
409
|
+
rawResponse: z
|
|
410
|
+
.instanceof(Response)
|
|
411
|
+
.transform(() => {
|
|
412
|
+
throw new Error("Response cannot be serialized");
|
|
413
|
+
})
|
|
414
|
+
.optional(),
|
|
415
|
+
errorMessage: z.string().optional(),
|
|
354
416
|
})
|
|
355
417
|
.transform((v) => {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
export const outboundSchema: z.ZodType<
|
|
367
|
-
Outbound,
|
|
368
|
-
z.ZodTypeDef,
|
|
369
|
-
CreatePhoneNumberResponse402ResponseBody
|
|
370
|
-
> = z
|
|
371
|
-
.instanceof(CreatePhoneNumberResponse402ResponseBody)
|
|
372
|
-
.transform((v) => v.data$)
|
|
373
|
-
.pipe(
|
|
374
|
-
z
|
|
375
|
-
.object({
|
|
376
|
-
rawResponse: z
|
|
377
|
-
.instanceof(Response)
|
|
378
|
-
.transform(() => {
|
|
379
|
-
throw new Error("Response cannot be serialized");
|
|
380
|
-
})
|
|
381
|
-
.optional(),
|
|
382
|
-
errorMessage: z.string().optional(),
|
|
383
|
-
})
|
|
384
|
-
.transform((v) => {
|
|
385
|
-
return {
|
|
386
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
387
|
-
...(v.errorMessage === undefined
|
|
388
|
-
? null
|
|
389
|
-
: { error_message: v.errorMessage }),
|
|
390
|
-
};
|
|
391
|
-
})
|
|
392
|
-
);
|
|
418
|
+
return {
|
|
419
|
+
...(v.rawResponse === undefined
|
|
420
|
+
? null
|
|
421
|
+
: { RawResponse: v.rawResponse }),
|
|
422
|
+
...(v.errorMessage === undefined
|
|
423
|
+
? null
|
|
424
|
+
: { error_message: v.errorMessage }),
|
|
425
|
+
};
|
|
426
|
+
}),
|
|
427
|
+
);
|
|
393
428
|
}
|
|
394
429
|
|
|
395
430
|
/** @internal */
|
|
396
431
|
export namespace CreatePhoneNumberResponseResponseBody$ {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
432
|
+
export type Inbound = {
|
|
433
|
+
RawResponse?: Response | undefined;
|
|
434
|
+
error_message?: string | undefined;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
export const inboundSchema: z.ZodType<
|
|
438
|
+
CreatePhoneNumberResponseResponseBody,
|
|
439
|
+
z.ZodTypeDef,
|
|
440
|
+
Inbound
|
|
441
|
+
> = z
|
|
442
|
+
.object({
|
|
443
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
444
|
+
error_message: z.string().optional(),
|
|
445
|
+
})
|
|
446
|
+
.transform((v) => {
|
|
447
|
+
return new CreatePhoneNumberResponseResponseBody({
|
|
448
|
+
...(v.RawResponse === undefined
|
|
449
|
+
? null
|
|
450
|
+
: { rawResponse: v.RawResponse }),
|
|
451
|
+
...(v.error_message === undefined
|
|
452
|
+
? null
|
|
453
|
+
: { errorMessage: v.error_message }),
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
export type Outbound = {
|
|
457
|
+
RawResponse?: never | undefined;
|
|
458
|
+
error_message?: string | undefined;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
export const outboundSchema: z.ZodType<
|
|
462
|
+
Outbound,
|
|
463
|
+
z.ZodTypeDef,
|
|
464
|
+
CreatePhoneNumberResponseResponseBody
|
|
465
|
+
> = z
|
|
466
|
+
.instanceof(CreatePhoneNumberResponseResponseBody)
|
|
467
|
+
.transform((v) => v.data$)
|
|
468
|
+
.pipe(
|
|
469
|
+
z
|
|
407
470
|
.object({
|
|
408
|
-
|
|
409
|
-
|
|
471
|
+
rawResponse: z
|
|
472
|
+
.instanceof(Response)
|
|
473
|
+
.transform(() => {
|
|
474
|
+
throw new Error("Response cannot be serialized");
|
|
475
|
+
})
|
|
476
|
+
.optional(),
|
|
477
|
+
errorMessage: z.string().optional(),
|
|
410
478
|
})
|
|
411
479
|
.transform((v) => {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
export const outboundSchema: z.ZodType<
|
|
423
|
-
Outbound,
|
|
424
|
-
z.ZodTypeDef,
|
|
425
|
-
CreatePhoneNumberResponseResponseBody
|
|
426
|
-
> = z
|
|
427
|
-
.instanceof(CreatePhoneNumberResponseResponseBody)
|
|
428
|
-
.transform((v) => v.data$)
|
|
429
|
-
.pipe(
|
|
430
|
-
z
|
|
431
|
-
.object({
|
|
432
|
-
rawResponse: z
|
|
433
|
-
.instanceof(Response)
|
|
434
|
-
.transform(() => {
|
|
435
|
-
throw new Error("Response cannot be serialized");
|
|
436
|
-
})
|
|
437
|
-
.optional(),
|
|
438
|
-
errorMessage: z.string().optional(),
|
|
439
|
-
})
|
|
440
|
-
.transform((v) => {
|
|
441
|
-
return {
|
|
442
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
443
|
-
...(v.errorMessage === undefined
|
|
444
|
-
? null
|
|
445
|
-
: { error_message: v.errorMessage }),
|
|
446
|
-
};
|
|
447
|
-
})
|
|
448
|
-
);
|
|
480
|
+
return {
|
|
481
|
+
...(v.rawResponse === undefined
|
|
482
|
+
? null
|
|
483
|
+
: { RawResponse: v.rawResponse }),
|
|
484
|
+
...(v.errorMessage === undefined
|
|
485
|
+
? null
|
|
486
|
+
: { error_message: v.errorMessage }),
|
|
487
|
+
};
|
|
488
|
+
}),
|
|
489
|
+
);
|
|
449
490
|
}
|
|
450
491
|
|
|
451
492
|
/** @internal */
|
|
452
493
|
export namespace CreatePhoneNumberResponseBody$ {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
494
|
+
export type Inbound = {
|
|
495
|
+
RawResponse?: Response | undefined;
|
|
496
|
+
error_message?: string | undefined;
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
export const inboundSchema: z.ZodType<
|
|
500
|
+
CreatePhoneNumberResponseBody,
|
|
501
|
+
z.ZodTypeDef,
|
|
502
|
+
Inbound
|
|
503
|
+
> = z
|
|
504
|
+
.object({
|
|
505
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
506
|
+
error_message: z.string().optional(),
|
|
507
|
+
})
|
|
508
|
+
.transform((v) => {
|
|
509
|
+
return new CreatePhoneNumberResponseBody({
|
|
510
|
+
...(v.RawResponse === undefined
|
|
511
|
+
? null
|
|
512
|
+
: { rawResponse: v.RawResponse }),
|
|
513
|
+
...(v.error_message === undefined
|
|
514
|
+
? null
|
|
515
|
+
: { errorMessage: v.error_message }),
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
|
+
export type Outbound = {
|
|
519
|
+
RawResponse?: never | undefined;
|
|
520
|
+
error_message?: string | undefined;
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
export const outboundSchema: z.ZodType<
|
|
524
|
+
Outbound,
|
|
525
|
+
z.ZodTypeDef,
|
|
526
|
+
CreatePhoneNumberResponseBody
|
|
527
|
+
> = z
|
|
528
|
+
.instanceof(CreatePhoneNumberResponseBody)
|
|
529
|
+
.transform((v) => v.data$)
|
|
530
|
+
.pipe(
|
|
531
|
+
z
|
|
459
532
|
.object({
|
|
460
|
-
|
|
461
|
-
|
|
533
|
+
rawResponse: z
|
|
534
|
+
.instanceof(Response)
|
|
535
|
+
.transform(() => {
|
|
536
|
+
throw new Error("Response cannot be serialized");
|
|
537
|
+
})
|
|
538
|
+
.optional(),
|
|
539
|
+
errorMessage: z.string().optional(),
|
|
462
540
|
})
|
|
463
541
|
.transform((v) => {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreatePhoneNumberResponseBody> =
|
|
475
|
-
z
|
|
476
|
-
.instanceof(CreatePhoneNumberResponseBody)
|
|
477
|
-
.transform((v) => v.data$)
|
|
478
|
-
.pipe(
|
|
479
|
-
z
|
|
480
|
-
.object({
|
|
481
|
-
rawResponse: z
|
|
482
|
-
.instanceof(Response)
|
|
483
|
-
.transform(() => {
|
|
484
|
-
throw new Error("Response cannot be serialized");
|
|
485
|
-
})
|
|
486
|
-
.optional(),
|
|
487
|
-
errorMessage: z.string().optional(),
|
|
488
|
-
})
|
|
489
|
-
.transform((v) => {
|
|
490
|
-
return {
|
|
491
|
-
...(v.rawResponse === undefined
|
|
492
|
-
? null
|
|
493
|
-
: { RawResponse: v.rawResponse }),
|
|
494
|
-
...(v.errorMessage === undefined
|
|
495
|
-
? null
|
|
496
|
-
: { error_message: v.errorMessage }),
|
|
497
|
-
};
|
|
498
|
-
})
|
|
499
|
-
);
|
|
542
|
+
return {
|
|
543
|
+
...(v.rawResponse === undefined
|
|
544
|
+
? null
|
|
545
|
+
: { RawResponse: v.rawResponse }),
|
|
546
|
+
...(v.errorMessage === undefined
|
|
547
|
+
? null
|
|
548
|
+
: { error_message: v.errorMessage }),
|
|
549
|
+
};
|
|
550
|
+
}),
|
|
551
|
+
);
|
|
500
552
|
}
|