retell-sdk 2.2.4 → 2.2.7
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 +19 -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 +4 -2
- package/sdk/audioWsClient.d.ts +10 -0
- package/sdk/audioWsClient.d.ts.map +1 -0
- package/sdk/audioWsClient.js +66 -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 +26 -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 +68 -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,64 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Phone number associated with the call. Only populated when call_type is `inbound_phone_call` or `outbound_phone_call`.
|
|
9
|
-
*/
|
|
10
|
-
export type CallPhoneNumber = {
|
|
11
|
-
/**
|
|
12
|
-
* Caller phone number in E.164 format.
|
|
13
|
-
*/
|
|
14
|
-
from: string;
|
|
15
|
-
/**
|
|
16
|
-
* Callee phone number in E.164 format.
|
|
17
|
-
*/
|
|
18
|
-
to: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @internal */
|
|
22
|
-
export namespace CallPhoneNumber$ {
|
|
23
|
-
export type Inbound = {
|
|
24
|
-
from: string;
|
|
25
|
-
to: string;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const inboundSchema: z.ZodType<
|
|
29
|
-
CallPhoneNumber,
|
|
30
|
-
z.ZodTypeDef,
|
|
31
|
-
Inbound
|
|
32
|
-
> = z
|
|
33
|
-
.object({
|
|
34
|
-
from: z.string(),
|
|
35
|
-
to: z.string(),
|
|
36
|
-
})
|
|
37
|
-
.transform((v) => {
|
|
38
|
-
return {
|
|
39
|
-
from: v.from,
|
|
40
|
-
to: v.to,
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export type Outbound = {
|
|
45
|
-
from: string;
|
|
46
|
-
to: string;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const outboundSchema: z.ZodType<
|
|
50
|
-
Outbound,
|
|
51
|
-
z.ZodTypeDef,
|
|
52
|
-
CallPhoneNumber
|
|
53
|
-
> = z
|
|
54
|
-
.object({
|
|
55
|
-
from: z.string(),
|
|
56
|
-
to: z.string(),
|
|
57
|
-
})
|
|
58
|
-
.transform((v) => {
|
|
59
|
-
return {
|
|
60
|
-
from: v.from,
|
|
61
|
-
to: v.to,
|
|
62
|
-
};
|
|
63
|
-
});
|
|
64
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
|
|
7
|
-
export type PhoneNumber = {
|
|
8
|
-
/**
|
|
9
|
-
* Unique agent id to associate with this phone number. Can be updated with [Update Phone Agent](/api/update-phone-agent).
|
|
10
|
-
*/
|
|
11
|
-
agentId: string;
|
|
12
|
-
/**
|
|
13
|
-
* The area code of the number. This is a 3 digit integer.
|
|
14
|
-
*/
|
|
15
|
-
areaCode: number;
|
|
16
|
-
/**
|
|
17
|
-
* Last modification timestamp (milliseconds since epoch). Either the time of last update or creation if no updates available.
|
|
18
|
-
*/
|
|
19
|
-
lastModificationTimestamp: number;
|
|
20
|
-
/**
|
|
21
|
-
* Unique phone number you purchased in E.164 format. This number is set up to handle inbound phone calls, and can be used for outbound phone calls with [Create Phone Call](/api/create-phone-call).
|
|
22
|
-
*/
|
|
23
|
-
phoneNumber: string;
|
|
24
|
-
/**
|
|
25
|
-
* Unique phone number you purchased in pretty human readable format. Example: (415) 909-5857.
|
|
26
|
-
*/
|
|
27
|
-
phoneNumberPretty: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/** @internal */
|
|
31
|
-
export namespace PhoneNumber$ {
|
|
32
|
-
export type Inbound = {
|
|
33
|
-
agent_id: string;
|
|
34
|
-
area_code: number;
|
|
35
|
-
last_modification_timestamp: number;
|
|
36
|
-
phone_number: string;
|
|
37
|
-
phone_number_pretty: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const inboundSchema: z.ZodType<PhoneNumber, z.ZodTypeDef, Inbound> = z
|
|
41
|
-
.object({
|
|
42
|
-
agent_id: z.string(),
|
|
43
|
-
area_code: z.number().int(),
|
|
44
|
-
last_modification_timestamp: z.number().int(),
|
|
45
|
-
phone_number: z.string(),
|
|
46
|
-
phone_number_pretty: z.string(),
|
|
47
|
-
})
|
|
48
|
-
.transform((v) => {
|
|
49
|
-
return {
|
|
50
|
-
agentId: v.agent_id,
|
|
51
|
-
areaCode: v.area_code,
|
|
52
|
-
lastModificationTimestamp: v.last_modification_timestamp,
|
|
53
|
-
phoneNumber: v.phone_number,
|
|
54
|
-
phoneNumberPretty: v.phone_number_pretty,
|
|
55
|
-
};
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
export type Outbound = {
|
|
59
|
-
agent_id: string;
|
|
60
|
-
area_code: number;
|
|
61
|
-
last_modification_timestamp: number;
|
|
62
|
-
phone_number: string;
|
|
63
|
-
phone_number_pretty: string;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, PhoneNumber> =
|
|
67
|
-
z
|
|
68
|
-
.object({
|
|
69
|
-
agentId: z.string(),
|
|
70
|
-
areaCode: z.number().int(),
|
|
71
|
-
lastModificationTimestamp: z.number().int(),
|
|
72
|
-
phoneNumber: z.string(),
|
|
73
|
-
phoneNumberPretty: z.string(),
|
|
74
|
-
})
|
|
75
|
-
.transform((v) => {
|
|
76
|
-
return {
|
|
77
|
-
agent_id: v.agentId,
|
|
78
|
-
area_code: v.areaCode,
|
|
79
|
-
last_modification_timestamp: v.lastModificationTimestamp,
|
|
80
|
-
phone_number: v.phoneNumber,
|
|
81
|
-
phone_number_pretty: v.phoneNumberPretty,
|
|
82
|
-
};
|
|
83
|
-
});
|
|
84
|
-
}
|
|
@@ -1,552 +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 CreatePhoneNumberResponse500ResponseBodyData = {
|
|
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 CreatePhoneNumberResponse500ResponseBody 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$: 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;
|
|
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
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Unprocessable Content
|
|
57
|
-
*/
|
|
58
|
-
export type CreatePhoneNumberResponse422ResponseBodyData = {
|
|
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 CreatePhoneNumberResponse422ResponseBody 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$: 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;
|
|
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
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Payment Required
|
|
105
|
-
*/
|
|
106
|
-
export type CreatePhoneNumberResponse402ResponseBodyData = {
|
|
107
|
-
/**
|
|
108
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
109
|
-
*/
|
|
110
|
-
rawResponse?: Response | undefined;
|
|
111
|
-
errorMessage?: string | undefined;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Payment Required
|
|
116
|
-
*/
|
|
117
|
-
export class CreatePhoneNumberResponse402ResponseBody 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$: 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;
|
|
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
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Unauthorized
|
|
153
|
-
*/
|
|
154
|
-
export type CreatePhoneNumberResponseResponseBodyData = {
|
|
155
|
-
/**
|
|
156
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
157
|
-
*/
|
|
158
|
-
rawResponse?: Response | undefined;
|
|
159
|
-
errorMessage?: string | undefined;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Unauthorized
|
|
164
|
-
*/
|
|
165
|
-
export class CreatePhoneNumberResponseResponseBody 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$: 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;
|
|
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
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Bad Request
|
|
201
|
-
*/
|
|
202
|
-
export type CreatePhoneNumberResponseBodyData = {
|
|
203
|
-
/**
|
|
204
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
205
|
-
*/
|
|
206
|
-
rawResponse?: Response | undefined;
|
|
207
|
-
errorMessage?: string | undefined;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Bad Request
|
|
212
|
-
*/
|
|
213
|
-
export class CreatePhoneNumberResponseBody extends Error {
|
|
214
|
-
/**
|
|
215
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
216
|
-
*/
|
|
217
|
-
rawResponse?: Response | undefined;
|
|
218
|
-
errorMessage?: string | undefined;
|
|
219
|
-
|
|
220
|
-
/** The original data that was passed to this error instance. */
|
|
221
|
-
data$: 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;
|
|
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
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/** @internal */
|
|
245
|
-
export namespace CreatePhoneNumberResponse500ResponseBody$ {
|
|
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
|
|
284
|
-
.object({
|
|
285
|
-
rawResponse: z
|
|
286
|
-
.instanceof(Response)
|
|
287
|
-
.transform(() => {
|
|
288
|
-
throw new Error("Response cannot be serialized");
|
|
289
|
-
})
|
|
290
|
-
.optional(),
|
|
291
|
-
errorMessage: z.string().optional(),
|
|
292
|
-
})
|
|
293
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** @internal */
|
|
307
|
-
export namespace CreatePhoneNumberResponse422ResponseBody$ {
|
|
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
|
|
346
|
-
.object({
|
|
347
|
-
rawResponse: z
|
|
348
|
-
.instanceof(Response)
|
|
349
|
-
.transform(() => {
|
|
350
|
-
throw new Error("Response cannot be serialized");
|
|
351
|
-
})
|
|
352
|
-
.optional(),
|
|
353
|
-
errorMessage: z.string().optional(),
|
|
354
|
-
})
|
|
355
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
/** @internal */
|
|
369
|
-
export namespace CreatePhoneNumberResponse402ResponseBody$ {
|
|
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
|
|
408
|
-
.object({
|
|
409
|
-
rawResponse: z
|
|
410
|
-
.instanceof(Response)
|
|
411
|
-
.transform(() => {
|
|
412
|
-
throw new Error("Response cannot be serialized");
|
|
413
|
-
})
|
|
414
|
-
.optional(),
|
|
415
|
-
errorMessage: z.string().optional(),
|
|
416
|
-
})
|
|
417
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/** @internal */
|
|
431
|
-
export namespace CreatePhoneNumberResponseResponseBody$ {
|
|
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
|
|
470
|
-
.object({
|
|
471
|
-
rawResponse: z
|
|
472
|
-
.instanceof(Response)
|
|
473
|
-
.transform(() => {
|
|
474
|
-
throw new Error("Response cannot be serialized");
|
|
475
|
-
})
|
|
476
|
-
.optional(),
|
|
477
|
-
errorMessage: z.string().optional(),
|
|
478
|
-
})
|
|
479
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
/** @internal */
|
|
493
|
-
export namespace CreatePhoneNumberResponseBody$ {
|
|
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
|
|
532
|
-
.object({
|
|
533
|
-
rawResponse: z
|
|
534
|
-
.instanceof(Response)
|
|
535
|
-
.transform(() => {
|
|
536
|
-
throw new Error("Response cannot be serialized");
|
|
537
|
-
})
|
|
538
|
-
.optional(),
|
|
539
|
-
errorMessage: z.string().optional(),
|
|
540
|
-
})
|
|
541
|
-
.transform((v) => {
|
|
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
|
-
);
|
|
552
|
-
}
|