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
|
@@ -2,26 +2,33 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { AgentPromptParams, AgentPromptParams$ } from "./agentpromptparams";
|
|
6
|
-
import { CallPhoneNumber, CallPhoneNumber$ } from "./callphonenumber";
|
|
7
5
|
import { z } from "zod";
|
|
8
6
|
|
|
9
7
|
/**
|
|
10
8
|
* Status of call.
|
|
11
9
|
*/
|
|
12
10
|
export enum CallStatus {
|
|
11
|
+
Registered = "registered",
|
|
13
12
|
Ongoing = "ongoing",
|
|
14
13
|
Ended = "ended",
|
|
15
14
|
Error = "error",
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* The audio encoding of the call.
|
|
20
19
|
*/
|
|
21
|
-
export enum
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
export enum AudioEncoding {
|
|
21
|
+
S16le = "s16le",
|
|
22
|
+
Mulaw = "mulaw",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The protocol how audio websocket read and send audio bytes.
|
|
27
|
+
*/
|
|
28
|
+
export enum AudioWebsocketProtocol {
|
|
29
|
+
Web = "web",
|
|
30
|
+
Twilio = "twilio",
|
|
31
|
+
Vonage = "vonage",
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
export type CallDetail = {
|
|
@@ -30,11 +37,7 @@ export type CallDetail = {
|
|
|
30
37
|
*/
|
|
31
38
|
agentId: string;
|
|
32
39
|
/**
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
agentPromptParams?: Array<AgentPromptParams> | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Unique id of the call.
|
|
40
|
+
* Unique id of the call. Used to identify in LLM websocket and used to authenticate in audio websocket.
|
|
38
41
|
*/
|
|
39
42
|
callId: string;
|
|
40
43
|
/**
|
|
@@ -42,14 +45,21 @@ export type CallDetail = {
|
|
|
42
45
|
*/
|
|
43
46
|
callStatus: CallStatus;
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
48
|
+
* The audio encoding of the call.
|
|
49
|
+
*/
|
|
50
|
+
audioEncoding: AudioEncoding;
|
|
51
|
+
/**
|
|
52
|
+
* Sample rate of the conversation, the input and output audio bytes will all conform to this rate. Check the audio source, audio format, and voice used for the agent to select one that works.
|
|
46
53
|
*/
|
|
47
|
-
|
|
54
|
+
sampleRate: number;
|
|
55
|
+
/**
|
|
56
|
+
* The protocol how audio websocket read and send audio bytes.
|
|
57
|
+
*/
|
|
58
|
+
audioWebsocketProtocol: AudioWebsocketProtocol;
|
|
48
59
|
/**
|
|
49
60
|
* End timestamp (milliseconds since epoch) of the call. Available after call ends.
|
|
50
61
|
*/
|
|
51
62
|
endTimestamp?: number | undefined;
|
|
52
|
-
phoneNumber?: CallPhoneNumber | undefined;
|
|
53
63
|
/**
|
|
54
64
|
* Recording of the call. Available after call ends.
|
|
55
65
|
*/
|
|
@@ -68,18 +78,21 @@ export type CallDetail = {
|
|
|
68
78
|
export const CallStatus$ = z.nativeEnum(CallStatus);
|
|
69
79
|
|
|
70
80
|
/** @internal */
|
|
71
|
-
export const
|
|
81
|
+
export const AudioWebsocketProtocol$ = z.nativeEnum(AudioWebsocketProtocol);
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const AudioEncoding$ = z.nativeEnum(AudioEncoding);
|
|
72
85
|
|
|
73
86
|
/** @internal */
|
|
74
87
|
export namespace CallDetail$ {
|
|
75
88
|
export type Inbound = {
|
|
76
89
|
agent_id: string;
|
|
77
|
-
agent_prompt_params?: Array<AgentPromptParams$.Inbound> | undefined;
|
|
78
90
|
call_id: string;
|
|
79
91
|
call_status: CallStatus;
|
|
80
|
-
|
|
92
|
+
audio_encoding: AudioEncoding;
|
|
93
|
+
sample_rate: number;
|
|
94
|
+
audio_websocket_protocol: AudioWebsocketProtocol;
|
|
81
95
|
end_timestamp?: number | undefined;
|
|
82
|
-
phone_number?: CallPhoneNumber$.Inbound | undefined;
|
|
83
96
|
recording_url?: string | undefined;
|
|
84
97
|
start_timestamp: number;
|
|
85
98
|
transcript?: string | undefined;
|
|
@@ -88,12 +101,12 @@ export namespace CallDetail$ {
|
|
|
88
101
|
export const inboundSchema: z.ZodType<CallDetail, z.ZodTypeDef, Inbound> = z
|
|
89
102
|
.object({
|
|
90
103
|
agent_id: z.string(),
|
|
91
|
-
agent_prompt_params: z.array(AgentPromptParams$.inboundSchema).optional(),
|
|
92
104
|
call_id: z.string(),
|
|
93
105
|
call_status: CallStatus$,
|
|
94
|
-
|
|
106
|
+
audio_encoding: AudioEncoding$,
|
|
107
|
+
sample_rate: z.number().int(),
|
|
108
|
+
audio_websocket_protocol: AudioWebsocketProtocol$,
|
|
95
109
|
end_timestamp: z.number().int().optional(),
|
|
96
|
-
phone_number: CallPhoneNumber$.inboundSchema.optional(),
|
|
97
110
|
recording_url: z.string().optional(),
|
|
98
111
|
start_timestamp: z.number().int(),
|
|
99
112
|
transcript: z.string().optional(),
|
|
@@ -101,18 +114,14 @@ export namespace CallDetail$ {
|
|
|
101
114
|
.transform((v) => {
|
|
102
115
|
return {
|
|
103
116
|
agentId: v.agent_id,
|
|
104
|
-
...(v.agent_prompt_params === undefined
|
|
105
|
-
? null
|
|
106
|
-
: { agentPromptParams: v.agent_prompt_params }),
|
|
107
117
|
callId: v.call_id,
|
|
108
118
|
callStatus: v.call_status,
|
|
109
|
-
|
|
119
|
+
audioEncoding: v.audio_encoding,
|
|
120
|
+
sampleRate: v.sample_rate,
|
|
121
|
+
audioWebsocketProtocol: v.audio_websocket_protocol,
|
|
110
122
|
...(v.end_timestamp === undefined
|
|
111
123
|
? null
|
|
112
124
|
: { endTimestamp: v.end_timestamp }),
|
|
113
|
-
...(v.phone_number === undefined
|
|
114
|
-
? null
|
|
115
|
-
: { phoneNumber: v.phone_number }),
|
|
116
125
|
...(v.recording_url === undefined
|
|
117
126
|
? null
|
|
118
127
|
: { recordingUrl: v.recording_url }),
|
|
@@ -123,12 +132,12 @@ export namespace CallDetail$ {
|
|
|
123
132
|
|
|
124
133
|
export type Outbound = {
|
|
125
134
|
agent_id: string;
|
|
126
|
-
agent_prompt_params?: Array<AgentPromptParams$.Outbound> | undefined;
|
|
127
135
|
call_id: string;
|
|
128
136
|
call_status: CallStatus;
|
|
129
|
-
|
|
137
|
+
audio_encoding: AudioEncoding;
|
|
138
|
+
sample_rate: number;
|
|
139
|
+
audio_websocket_protocol: AudioWebsocketProtocol;
|
|
130
140
|
end_timestamp?: number | undefined;
|
|
131
|
-
phone_number?: CallPhoneNumber$.Outbound | undefined;
|
|
132
141
|
recording_url?: string | undefined;
|
|
133
142
|
start_timestamp: number;
|
|
134
143
|
transcript?: string | undefined;
|
|
@@ -137,12 +146,12 @@ export namespace CallDetail$ {
|
|
|
137
146
|
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CallDetail> = z
|
|
138
147
|
.object({
|
|
139
148
|
agentId: z.string(),
|
|
140
|
-
agentPromptParams: z.array(AgentPromptParams$.outboundSchema).optional(),
|
|
141
149
|
callId: z.string(),
|
|
142
150
|
callStatus: CallStatus$,
|
|
143
|
-
|
|
151
|
+
audioEncoding: AudioEncoding$,
|
|
152
|
+
sampleRate: z.number().int(),
|
|
153
|
+
audioWebsocketProtocol: AudioWebsocketProtocol$,
|
|
144
154
|
endTimestamp: z.number().int().optional(),
|
|
145
|
-
phoneNumber: CallPhoneNumber$.outboundSchema.optional(),
|
|
146
155
|
recordingUrl: z.string().optional(),
|
|
147
156
|
startTimestamp: z.number().int(),
|
|
148
157
|
transcript: z.string().optional(),
|
|
@@ -150,18 +159,14 @@ export namespace CallDetail$ {
|
|
|
150
159
|
.transform((v) => {
|
|
151
160
|
return {
|
|
152
161
|
agent_id: v.agentId,
|
|
153
|
-
...(v.agentPromptParams === undefined
|
|
154
|
-
? null
|
|
155
|
-
: { agent_prompt_params: v.agentPromptParams }),
|
|
156
162
|
call_id: v.callId,
|
|
157
163
|
call_status: v.callStatus,
|
|
158
|
-
|
|
164
|
+
audio_encoding: v.audioEncoding,
|
|
165
|
+
sample_rate: v.sampleRate,
|
|
166
|
+
audio_websocket_protocol: v.audioWebsocketProtocol,
|
|
159
167
|
...(v.endTimestamp === undefined
|
|
160
168
|
? null
|
|
161
169
|
: { end_timestamp: v.endTimestamp }),
|
|
162
|
-
...(v.phoneNumber === undefined
|
|
163
|
-
? null
|
|
164
|
-
: { phone_number: v.phoneNumber }),
|
|
165
170
|
...(v.recordingUrl === undefined
|
|
166
171
|
? null
|
|
167
172
|
: { recording_url: v.recordingUrl }),
|
|
@@ -3,16 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export * from "./createagent";
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./createphonenumber";
|
|
6
|
+
export * from "./registercall";
|
|
8
7
|
export * from "./deleteagent";
|
|
9
|
-
export * from "./deletephonenumber";
|
|
10
8
|
export * from "./getagent";
|
|
11
9
|
export * from "./getcall";
|
|
12
|
-
export * from "./getphonenumber";
|
|
13
10
|
export * from "./listagents";
|
|
14
11
|
export * from "./listcalls";
|
|
15
|
-
export * from "./listphonenumbers";
|
|
16
12
|
export * from "./sdkerror";
|
|
17
13
|
export * from "./updateagent";
|
|
18
|
-
export * from "./updatephoneagent";
|
|
@@ -7,7 +7,7 @@ import { z } from "zod";
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal Server Error
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
10
|
+
export type RegisterCallResponse500ResponseBodyData = {
|
|
11
11
|
/**
|
|
12
12
|
* Raw HTTP response; suitable for custom response parsing
|
|
13
13
|
*/
|
|
@@ -18,7 +18,7 @@ export type CreatePhoneCallResponse500ResponseBodyData = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal Server Error
|
|
20
20
|
*/
|
|
21
|
-
export class
|
|
21
|
+
export class RegisterCallResponse500ResponseBody extends Error {
|
|
22
22
|
/**
|
|
23
23
|
* Raw HTTP response; suitable for custom response parsing
|
|
24
24
|
*/
|
|
@@ -26,10 +26,10 @@ export class CreatePhoneCallResponse500ResponseBody extends Error {
|
|
|
26
26
|
errorMessage?: string | undefined;
|
|
27
27
|
|
|
28
28
|
/** The original data that was passed to this error instance. */
|
|
29
|
-
data$:
|
|
29
|
+
data$: RegisterCallResponse500ResponseBodyData;
|
|
30
30
|
|
|
31
31
|
constructor(
|
|
32
|
-
err:
|
|
32
|
+
err: RegisterCallResponse500ResponseBodyData,
|
|
33
33
|
options?: ErrorOptions,
|
|
34
34
|
) {
|
|
35
35
|
super("", options);
|
|
@@ -48,14 +48,14 @@ export class CreatePhoneCallResponse500ResponseBody extends Error {
|
|
|
48
48
|
const content = JSON.stringify(data);
|
|
49
49
|
this.message = [msg, content].filter(Boolean).join("\n");
|
|
50
50
|
|
|
51
|
-
this.name = "
|
|
51
|
+
this.name = "RegisterCallResponse500ResponseBody";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Too Many Requests
|
|
57
57
|
*/
|
|
58
|
-
export type
|
|
58
|
+
export type RegisterCallResponse429ResponseBodyData = {
|
|
59
59
|
/**
|
|
60
60
|
* Raw HTTP response; suitable for custom response parsing
|
|
61
61
|
*/
|
|
@@ -66,7 +66,7 @@ export type CreatePhoneCallResponse429ResponseBodyData = {
|
|
|
66
66
|
/**
|
|
67
67
|
* Too Many Requests
|
|
68
68
|
*/
|
|
69
|
-
export class
|
|
69
|
+
export class RegisterCallResponse429ResponseBody extends Error {
|
|
70
70
|
/**
|
|
71
71
|
* Raw HTTP response; suitable for custom response parsing
|
|
72
72
|
*/
|
|
@@ -74,10 +74,10 @@ export class CreatePhoneCallResponse429ResponseBody extends Error {
|
|
|
74
74
|
errorMessage?: string | undefined;
|
|
75
75
|
|
|
76
76
|
/** The original data that was passed to this error instance. */
|
|
77
|
-
data$:
|
|
77
|
+
data$: RegisterCallResponse429ResponseBodyData;
|
|
78
78
|
|
|
79
79
|
constructor(
|
|
80
|
-
err:
|
|
80
|
+
err: RegisterCallResponse429ResponseBodyData,
|
|
81
81
|
options?: ErrorOptions,
|
|
82
82
|
) {
|
|
83
83
|
super("", options);
|
|
@@ -96,14 +96,14 @@ export class CreatePhoneCallResponse429ResponseBody extends Error {
|
|
|
96
96
|
const content = JSON.stringify(data);
|
|
97
97
|
this.message = [msg, content].filter(Boolean).join("\n");
|
|
98
98
|
|
|
99
|
-
this.name = "
|
|
99
|
+
this.name = "RegisterCallResponse429ResponseBody";
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Unprocessable Content
|
|
105
105
|
*/
|
|
106
|
-
export type
|
|
106
|
+
export type RegisterCallResponse422ResponseBodyData = {
|
|
107
107
|
/**
|
|
108
108
|
* Raw HTTP response; suitable for custom response parsing
|
|
109
109
|
*/
|
|
@@ -114,7 +114,7 @@ export type CreatePhoneCallResponse422ResponseBodyData = {
|
|
|
114
114
|
/**
|
|
115
115
|
* Unprocessable Content
|
|
116
116
|
*/
|
|
117
|
-
export class
|
|
117
|
+
export class RegisterCallResponse422ResponseBody extends Error {
|
|
118
118
|
/**
|
|
119
119
|
* Raw HTTP response; suitable for custom response parsing
|
|
120
120
|
*/
|
|
@@ -122,10 +122,10 @@ export class CreatePhoneCallResponse422ResponseBody extends Error {
|
|
|
122
122
|
errorMessage?: string | undefined;
|
|
123
123
|
|
|
124
124
|
/** The original data that was passed to this error instance. */
|
|
125
|
-
data$:
|
|
125
|
+
data$: RegisterCallResponse422ResponseBodyData;
|
|
126
126
|
|
|
127
127
|
constructor(
|
|
128
|
-
err:
|
|
128
|
+
err: RegisterCallResponse422ResponseBodyData,
|
|
129
129
|
options?: ErrorOptions,
|
|
130
130
|
) {
|
|
131
131
|
super("", options);
|
|
@@ -144,14 +144,14 @@ export class CreatePhoneCallResponse422ResponseBody extends Error {
|
|
|
144
144
|
const content = JSON.stringify(data);
|
|
145
145
|
this.message = [msg, content].filter(Boolean).join("\n");
|
|
146
146
|
|
|
147
|
-
this.name = "
|
|
147
|
+
this.name = "RegisterCallResponse422ResponseBody";
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Payment Required
|
|
153
153
|
*/
|
|
154
|
-
export type
|
|
154
|
+
export type RegisterCallResponse402ResponseBodyData = {
|
|
155
155
|
/**
|
|
156
156
|
* Raw HTTP response; suitable for custom response parsing
|
|
157
157
|
*/
|
|
@@ -162,7 +162,7 @@ export type CreatePhoneCallResponse402ResponseBodyData = {
|
|
|
162
162
|
/**
|
|
163
163
|
* Payment Required
|
|
164
164
|
*/
|
|
165
|
-
export class
|
|
165
|
+
export class RegisterCallResponse402ResponseBody extends Error {
|
|
166
166
|
/**
|
|
167
167
|
* Raw HTTP response; suitable for custom response parsing
|
|
168
168
|
*/
|
|
@@ -170,10 +170,10 @@ export class CreatePhoneCallResponse402ResponseBody extends Error {
|
|
|
170
170
|
errorMessage?: string | undefined;
|
|
171
171
|
|
|
172
172
|
/** The original data that was passed to this error instance. */
|
|
173
|
-
data$:
|
|
173
|
+
data$: RegisterCallResponse402ResponseBodyData;
|
|
174
174
|
|
|
175
175
|
constructor(
|
|
176
|
-
err:
|
|
176
|
+
err: RegisterCallResponse402ResponseBodyData,
|
|
177
177
|
options?: ErrorOptions,
|
|
178
178
|
) {
|
|
179
179
|
super("", options);
|
|
@@ -192,14 +192,14 @@ export class CreatePhoneCallResponse402ResponseBody extends Error {
|
|
|
192
192
|
const content = JSON.stringify(data);
|
|
193
193
|
this.message = [msg, content].filter(Boolean).join("\n");
|
|
194
194
|
|
|
195
|
-
this.name = "
|
|
195
|
+
this.name = "RegisterCallResponse402ResponseBody";
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Unauthorized
|
|
201
201
|
*/
|
|
202
|
-
export type
|
|
202
|
+
export type RegisterCallResponseResponseBodyData = {
|
|
203
203
|
/**
|
|
204
204
|
* Raw HTTP response; suitable for custom response parsing
|
|
205
205
|
*/
|
|
@@ -210,7 +210,7 @@ export type CreatePhoneCallResponseResponseBodyData = {
|
|
|
210
210
|
/**
|
|
211
211
|
* Unauthorized
|
|
212
212
|
*/
|
|
213
|
-
export class
|
|
213
|
+
export class RegisterCallResponseResponseBody extends Error {
|
|
214
214
|
/**
|
|
215
215
|
* Raw HTTP response; suitable for custom response parsing
|
|
216
216
|
*/
|
|
@@ -218,10 +218,10 @@ export class CreatePhoneCallResponseResponseBody extends Error {
|
|
|
218
218
|
errorMessage?: string | undefined;
|
|
219
219
|
|
|
220
220
|
/** The original data that was passed to this error instance. */
|
|
221
|
-
data$:
|
|
221
|
+
data$: RegisterCallResponseResponseBodyData;
|
|
222
222
|
|
|
223
223
|
constructor(
|
|
224
|
-
err:
|
|
224
|
+
err: RegisterCallResponseResponseBodyData,
|
|
225
225
|
options?: ErrorOptions,
|
|
226
226
|
) {
|
|
227
227
|
super("", options);
|
|
@@ -240,14 +240,14 @@ export class CreatePhoneCallResponseResponseBody extends Error {
|
|
|
240
240
|
const content = JSON.stringify(data);
|
|
241
241
|
this.message = [msg, content].filter(Boolean).join("\n");
|
|
242
242
|
|
|
243
|
-
this.name = "
|
|
243
|
+
this.name = "RegisterCallResponseResponseBody";
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* Bad Request
|
|
249
249
|
*/
|
|
250
|
-
export type
|
|
250
|
+
export type RegisterCallResponseBodyData = {
|
|
251
251
|
/**
|
|
252
252
|
* Raw HTTP response; suitable for custom response parsing
|
|
253
253
|
*/
|
|
@@ -258,7 +258,7 @@ export type CreatePhoneCallResponseBodyData = {
|
|
|
258
258
|
/**
|
|
259
259
|
* Bad Request
|
|
260
260
|
*/
|
|
261
|
-
export class
|
|
261
|
+
export class RegisterCallResponseBody extends Error {
|
|
262
262
|
/**
|
|
263
263
|
* Raw HTTP response; suitable for custom response parsing
|
|
264
264
|
*/
|
|
@@ -266,9 +266,9 @@ export class CreatePhoneCallResponseBody extends Error {
|
|
|
266
266
|
errorMessage?: string | undefined;
|
|
267
267
|
|
|
268
268
|
/** The original data that was passed to this error instance. */
|
|
269
|
-
data$:
|
|
269
|
+
data$: RegisterCallResponseBodyData;
|
|
270
270
|
|
|
271
|
-
constructor(err:
|
|
271
|
+
constructor(err: RegisterCallResponseBodyData, options?: ErrorOptions) {
|
|
272
272
|
super("", options);
|
|
273
273
|
this.data$ = err;
|
|
274
274
|
|
|
@@ -285,19 +285,19 @@ export class CreatePhoneCallResponseBody extends Error {
|
|
|
285
285
|
const content = JSON.stringify(data);
|
|
286
286
|
this.message = [msg, content].filter(Boolean).join("\n");
|
|
287
287
|
|
|
288
|
-
this.name = "
|
|
288
|
+
this.name = "RegisterCallResponseBody";
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
/** @internal */
|
|
293
|
-
export namespace
|
|
293
|
+
export namespace RegisterCallResponse500ResponseBody$ {
|
|
294
294
|
export type Inbound = {
|
|
295
295
|
RawResponse?: Response | undefined;
|
|
296
296
|
error_message?: string | undefined;
|
|
297
297
|
};
|
|
298
298
|
|
|
299
299
|
export const inboundSchema: z.ZodType<
|
|
300
|
-
|
|
300
|
+
RegisterCallResponse500ResponseBody,
|
|
301
301
|
z.ZodTypeDef,
|
|
302
302
|
Inbound
|
|
303
303
|
> = z
|
|
@@ -306,7 +306,7 @@ export namespace CreatePhoneCallResponse500ResponseBody$ {
|
|
|
306
306
|
error_message: z.string().optional(),
|
|
307
307
|
})
|
|
308
308
|
.transform((v) => {
|
|
309
|
-
return new
|
|
309
|
+
return new RegisterCallResponse500ResponseBody({
|
|
310
310
|
...(v.RawResponse === undefined
|
|
311
311
|
? null
|
|
312
312
|
: { rawResponse: v.RawResponse }),
|
|
@@ -323,9 +323,9 @@ export namespace CreatePhoneCallResponse500ResponseBody$ {
|
|
|
323
323
|
export const outboundSchema: z.ZodType<
|
|
324
324
|
Outbound,
|
|
325
325
|
z.ZodTypeDef,
|
|
326
|
-
|
|
326
|
+
RegisterCallResponse500ResponseBody
|
|
327
327
|
> = z
|
|
328
|
-
.instanceof(
|
|
328
|
+
.instanceof(RegisterCallResponse500ResponseBody)
|
|
329
329
|
.transform((v) => v.data$)
|
|
330
330
|
.pipe(
|
|
331
331
|
z
|
|
@@ -352,14 +352,14 @@ export namespace CreatePhoneCallResponse500ResponseBody$ {
|
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
/** @internal */
|
|
355
|
-
export namespace
|
|
355
|
+
export namespace RegisterCallResponse429ResponseBody$ {
|
|
356
356
|
export type Inbound = {
|
|
357
357
|
RawResponse?: Response | undefined;
|
|
358
358
|
error_message?: string | undefined;
|
|
359
359
|
};
|
|
360
360
|
|
|
361
361
|
export const inboundSchema: z.ZodType<
|
|
362
|
-
|
|
362
|
+
RegisterCallResponse429ResponseBody,
|
|
363
363
|
z.ZodTypeDef,
|
|
364
364
|
Inbound
|
|
365
365
|
> = z
|
|
@@ -368,7 +368,7 @@ export namespace CreatePhoneCallResponse429ResponseBody$ {
|
|
|
368
368
|
error_message: z.string().optional(),
|
|
369
369
|
})
|
|
370
370
|
.transform((v) => {
|
|
371
|
-
return new
|
|
371
|
+
return new RegisterCallResponse429ResponseBody({
|
|
372
372
|
...(v.RawResponse === undefined
|
|
373
373
|
? null
|
|
374
374
|
: { rawResponse: v.RawResponse }),
|
|
@@ -385,9 +385,9 @@ export namespace CreatePhoneCallResponse429ResponseBody$ {
|
|
|
385
385
|
export const outboundSchema: z.ZodType<
|
|
386
386
|
Outbound,
|
|
387
387
|
z.ZodTypeDef,
|
|
388
|
-
|
|
388
|
+
RegisterCallResponse429ResponseBody
|
|
389
389
|
> = z
|
|
390
|
-
.instanceof(
|
|
390
|
+
.instanceof(RegisterCallResponse429ResponseBody)
|
|
391
391
|
.transform((v) => v.data$)
|
|
392
392
|
.pipe(
|
|
393
393
|
z
|
|
@@ -414,14 +414,14 @@ export namespace CreatePhoneCallResponse429ResponseBody$ {
|
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
/** @internal */
|
|
417
|
-
export namespace
|
|
417
|
+
export namespace RegisterCallResponse422ResponseBody$ {
|
|
418
418
|
export type Inbound = {
|
|
419
419
|
RawResponse?: Response | undefined;
|
|
420
420
|
error_message?: string | undefined;
|
|
421
421
|
};
|
|
422
422
|
|
|
423
423
|
export const inboundSchema: z.ZodType<
|
|
424
|
-
|
|
424
|
+
RegisterCallResponse422ResponseBody,
|
|
425
425
|
z.ZodTypeDef,
|
|
426
426
|
Inbound
|
|
427
427
|
> = z
|
|
@@ -430,7 +430,7 @@ export namespace CreatePhoneCallResponse422ResponseBody$ {
|
|
|
430
430
|
error_message: z.string().optional(),
|
|
431
431
|
})
|
|
432
432
|
.transform((v) => {
|
|
433
|
-
return new
|
|
433
|
+
return new RegisterCallResponse422ResponseBody({
|
|
434
434
|
...(v.RawResponse === undefined
|
|
435
435
|
? null
|
|
436
436
|
: { rawResponse: v.RawResponse }),
|
|
@@ -447,9 +447,9 @@ export namespace CreatePhoneCallResponse422ResponseBody$ {
|
|
|
447
447
|
export const outboundSchema: z.ZodType<
|
|
448
448
|
Outbound,
|
|
449
449
|
z.ZodTypeDef,
|
|
450
|
-
|
|
450
|
+
RegisterCallResponse422ResponseBody
|
|
451
451
|
> = z
|
|
452
|
-
.instanceof(
|
|
452
|
+
.instanceof(RegisterCallResponse422ResponseBody)
|
|
453
453
|
.transform((v) => v.data$)
|
|
454
454
|
.pipe(
|
|
455
455
|
z
|
|
@@ -476,14 +476,14 @@ export namespace CreatePhoneCallResponse422ResponseBody$ {
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
/** @internal */
|
|
479
|
-
export namespace
|
|
479
|
+
export namespace RegisterCallResponse402ResponseBody$ {
|
|
480
480
|
export type Inbound = {
|
|
481
481
|
RawResponse?: Response | undefined;
|
|
482
482
|
error_message?: string | undefined;
|
|
483
483
|
};
|
|
484
484
|
|
|
485
485
|
export const inboundSchema: z.ZodType<
|
|
486
|
-
|
|
486
|
+
RegisterCallResponse402ResponseBody,
|
|
487
487
|
z.ZodTypeDef,
|
|
488
488
|
Inbound
|
|
489
489
|
> = z
|
|
@@ -492,7 +492,7 @@ export namespace CreatePhoneCallResponse402ResponseBody$ {
|
|
|
492
492
|
error_message: z.string().optional(),
|
|
493
493
|
})
|
|
494
494
|
.transform((v) => {
|
|
495
|
-
return new
|
|
495
|
+
return new RegisterCallResponse402ResponseBody({
|
|
496
496
|
...(v.RawResponse === undefined
|
|
497
497
|
? null
|
|
498
498
|
: { rawResponse: v.RawResponse }),
|
|
@@ -509,9 +509,9 @@ export namespace CreatePhoneCallResponse402ResponseBody$ {
|
|
|
509
509
|
export const outboundSchema: z.ZodType<
|
|
510
510
|
Outbound,
|
|
511
511
|
z.ZodTypeDef,
|
|
512
|
-
|
|
512
|
+
RegisterCallResponse402ResponseBody
|
|
513
513
|
> = z
|
|
514
|
-
.instanceof(
|
|
514
|
+
.instanceof(RegisterCallResponse402ResponseBody)
|
|
515
515
|
.transform((v) => v.data$)
|
|
516
516
|
.pipe(
|
|
517
517
|
z
|
|
@@ -538,14 +538,14 @@ export namespace CreatePhoneCallResponse402ResponseBody$ {
|
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
/** @internal */
|
|
541
|
-
export namespace
|
|
541
|
+
export namespace RegisterCallResponseResponseBody$ {
|
|
542
542
|
export type Inbound = {
|
|
543
543
|
RawResponse?: Response | undefined;
|
|
544
544
|
error_message?: string | undefined;
|
|
545
545
|
};
|
|
546
546
|
|
|
547
547
|
export const inboundSchema: z.ZodType<
|
|
548
|
-
|
|
548
|
+
RegisterCallResponseResponseBody,
|
|
549
549
|
z.ZodTypeDef,
|
|
550
550
|
Inbound
|
|
551
551
|
> = z
|
|
@@ -554,7 +554,7 @@ export namespace CreatePhoneCallResponseResponseBody$ {
|
|
|
554
554
|
error_message: z.string().optional(),
|
|
555
555
|
})
|
|
556
556
|
.transform((v) => {
|
|
557
|
-
return new
|
|
557
|
+
return new RegisterCallResponseResponseBody({
|
|
558
558
|
...(v.RawResponse === undefined
|
|
559
559
|
? null
|
|
560
560
|
: { rawResponse: v.RawResponse }),
|
|
@@ -571,9 +571,9 @@ export namespace CreatePhoneCallResponseResponseBody$ {
|
|
|
571
571
|
export const outboundSchema: z.ZodType<
|
|
572
572
|
Outbound,
|
|
573
573
|
z.ZodTypeDef,
|
|
574
|
-
|
|
574
|
+
RegisterCallResponseResponseBody
|
|
575
575
|
> = z
|
|
576
|
-
.instanceof(
|
|
576
|
+
.instanceof(RegisterCallResponseResponseBody)
|
|
577
577
|
.transform((v) => v.data$)
|
|
578
578
|
.pipe(
|
|
579
579
|
z
|
|
@@ -600,14 +600,14 @@ export namespace CreatePhoneCallResponseResponseBody$ {
|
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
/** @internal */
|
|
603
|
-
export namespace
|
|
603
|
+
export namespace RegisterCallResponseBody$ {
|
|
604
604
|
export type Inbound = {
|
|
605
605
|
RawResponse?: Response | undefined;
|
|
606
606
|
error_message?: string | undefined;
|
|
607
607
|
};
|
|
608
608
|
|
|
609
609
|
export const inboundSchema: z.ZodType<
|
|
610
|
-
|
|
610
|
+
RegisterCallResponseBody,
|
|
611
611
|
z.ZodTypeDef,
|
|
612
612
|
Inbound
|
|
613
613
|
> = z
|
|
@@ -616,7 +616,7 @@ export namespace CreatePhoneCallResponseBody$ {
|
|
|
616
616
|
error_message: z.string().optional(),
|
|
617
617
|
})
|
|
618
618
|
.transform((v) => {
|
|
619
|
-
return new
|
|
619
|
+
return new RegisterCallResponseBody({
|
|
620
620
|
...(v.RawResponse === undefined
|
|
621
621
|
? null
|
|
622
622
|
: { rawResponse: v.RawResponse }),
|
|
@@ -633,9 +633,9 @@ export namespace CreatePhoneCallResponseBody$ {
|
|
|
633
633
|
export const outboundSchema: z.ZodType<
|
|
634
634
|
Outbound,
|
|
635
635
|
z.ZodTypeDef,
|
|
636
|
-
|
|
636
|
+
RegisterCallResponseBody
|
|
637
637
|
> = z
|
|
638
|
-
.instanceof(
|
|
638
|
+
.instanceof(RegisterCallResponseBody)
|
|
639
639
|
.transform((v) => v.data$)
|
|
640
640
|
.pipe(
|
|
641
641
|
z
|