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