retell-sdk 2.2.4 → 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 +15 -4
- package/example.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 -221
- package/models/components/agent.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 +32 -31
- package/models/components/calldetail.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/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/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/operations/createagent.d.ts +3 -16
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +4 -22
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/getcall.d.ts +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/listcalls.d.ts +1 -7
- package/models/operations/listcalls.d.ts.map +1 -1
- package/models/operations/listcalls.js +0 -4
- package/models/operations/listcalls.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 +7 -25
- package/models/operations/updateagent.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/sdk.d.ts +1 -23
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +11 -437
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +18 -4
- package/src/models/components/agent.ts +8 -460
- package/src/models/components/calldetail.ts +47 -42
- package/src/models/components/index.ts +0 -3
- package/src/models/errors/index.ts +1 -6
- package/src/models/errors/{createphonecall.ts → registercall.ts} +60 -60
- package/src/models/operations/createagent.ts +8 -50
- package/src/models/operations/getcall.ts +1 -1
- package/src/models/operations/index.ts +1 -7
- package/src/models/operations/listcalls.ts +1 -11
- package/src/models/operations/registercall.ts +167 -0
- package/src/models/operations/updateagent.ts +11 -58
- package/src/sdk/audioWsClient.ts +63 -0
- package/src/sdk/index.ts +1 -1
- package/src/sdk/sdk.ts +13 -526
- package/src/models/components/agentpromptparams.ts +0 -61
- package/src/models/components/callphonenumber.ts +0 -64
- package/src/models/components/phonenumber.ts +0 -84
- package/src/models/errors/createphonenumber.ts +0 -552
- package/src/models/errors/deletephonenumber.ts +0 -442
- package/src/models/errors/getphonenumber.ts +0 -442
- package/src/models/errors/listphonenumbers.ts +0 -332
- package/src/models/errors/updatephoneagent.ts +0 -442
- package/src/models/operations/createphonecall.ts +0 -353
- package/src/models/operations/createphonenumber.ts +0 -144
- package/src/models/operations/createwebcall.ts +0 -16
- package/src/models/operations/deletephonenumber.ts +0 -119
- package/src/models/operations/getphonenumber.ts +0 -134
- package/src/models/operations/listphonenumbers.ts +0 -88
- package/src/models/operations/updatephoneagent.ts +0 -187
- package/src/sdk/liveClient.ts +0 -113
|
@@ -1,442 +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 UpdatePhoneAgentResponse500ResponseBodyData = {
|
|
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 UpdatePhoneAgentResponse500ResponseBody 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$: 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;
|
|
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
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Unprocessable Content
|
|
57
|
-
*/
|
|
58
|
-
export type UpdatePhoneAgentResponse422ResponseBodyData = {
|
|
59
|
-
/**
|
|
60
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
61
|
-
*/
|
|
62
|
-
rawResponse?: Response | undefined;
|
|
63
|
-
errorMessage?: string | undefined;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Unprocessable Content
|
|
68
|
-
*/
|
|
69
|
-
export class UpdatePhoneAgentResponse422ResponseBody extends Error {
|
|
70
|
-
/**
|
|
71
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
72
|
-
*/
|
|
73
|
-
rawResponse?: Response | undefined;
|
|
74
|
-
errorMessage?: string | undefined;
|
|
75
|
-
|
|
76
|
-
/** The original data that was passed to this error instance. */
|
|
77
|
-
data$: 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;
|
|
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
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Unauthorized
|
|
105
|
-
*/
|
|
106
|
-
export type UpdatePhoneAgentResponseResponseBodyData = {
|
|
107
|
-
/**
|
|
108
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
109
|
-
*/
|
|
110
|
-
rawResponse?: Response | undefined;
|
|
111
|
-
errorMessage?: string | undefined;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Unauthorized
|
|
116
|
-
*/
|
|
117
|
-
export class UpdatePhoneAgentResponseResponseBody extends Error {
|
|
118
|
-
/**
|
|
119
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
120
|
-
*/
|
|
121
|
-
rawResponse?: Response | undefined;
|
|
122
|
-
errorMessage?: string | undefined;
|
|
123
|
-
|
|
124
|
-
/** The original data that was passed to this error instance. */
|
|
125
|
-
data$: 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
|
-
}
|
|
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
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Bad Request
|
|
153
|
-
*/
|
|
154
|
-
export type UpdatePhoneAgentResponseBodyData = {
|
|
155
|
-
/**
|
|
156
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
157
|
-
*/
|
|
158
|
-
rawResponse?: Response | undefined;
|
|
159
|
-
errorMessage?: string | undefined;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Bad Request
|
|
164
|
-
*/
|
|
165
|
-
export class UpdatePhoneAgentResponseBody extends Error {
|
|
166
|
-
/**
|
|
167
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
168
|
-
*/
|
|
169
|
-
rawResponse?: Response | undefined;
|
|
170
|
-
errorMessage?: string | undefined;
|
|
171
|
-
|
|
172
|
-
/** The original data that was passed to this error instance. */
|
|
173
|
-
data$: 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;
|
|
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
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/** @internal */
|
|
197
|
-
export namespace UpdatePhoneAgentResponse500ResponseBody$ {
|
|
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
|
|
236
|
-
.object({
|
|
237
|
-
rawResponse: z
|
|
238
|
-
.instanceof(Response)
|
|
239
|
-
.transform(() => {
|
|
240
|
-
throw new Error("Response cannot be serialized");
|
|
241
|
-
})
|
|
242
|
-
.optional(),
|
|
243
|
-
errorMessage: z.string().optional(),
|
|
244
|
-
})
|
|
245
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/** @internal */
|
|
259
|
-
export namespace UpdatePhoneAgentResponse422ResponseBody$ {
|
|
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
|
|
298
|
-
.object({
|
|
299
|
-
rawResponse: z
|
|
300
|
-
.instanceof(Response)
|
|
301
|
-
.transform(() => {
|
|
302
|
-
throw new Error("Response cannot be serialized");
|
|
303
|
-
})
|
|
304
|
-
.optional(),
|
|
305
|
-
errorMessage: z.string().optional(),
|
|
306
|
-
})
|
|
307
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/** @internal */
|
|
321
|
-
export namespace UpdatePhoneAgentResponseResponseBody$ {
|
|
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
|
|
360
|
-
.object({
|
|
361
|
-
rawResponse: z
|
|
362
|
-
.instanceof(Response)
|
|
363
|
-
.transform(() => {
|
|
364
|
-
throw new Error("Response cannot be serialized");
|
|
365
|
-
})
|
|
366
|
-
.optional(),
|
|
367
|
-
errorMessage: z.string().optional(),
|
|
368
|
-
})
|
|
369
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/** @internal */
|
|
383
|
-
export namespace UpdatePhoneAgentResponseBody$ {
|
|
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
|
|
422
|
-
.object({
|
|
423
|
-
rawResponse: z
|
|
424
|
-
.instanceof(Response)
|
|
425
|
-
.transform(() => {
|
|
426
|
-
throw new Error("Response cannot be serialized");
|
|
427
|
-
})
|
|
428
|
-
.optional(),
|
|
429
|
-
errorMessage: z.string().optional(),
|
|
430
|
-
})
|
|
431
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
442
|
-
}
|