retell-sdk 2.2.3 → 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 +48 -5
- 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 -205
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +5 -187
- 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 +33 -22
- package/models/components/calldetail.d.ts.map +1 -1
- package/models/components/calldetail.js +44 -31
- 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/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/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/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/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/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/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 +3 -16
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +4 -12
- 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 +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/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/listagents.d.ts.map +1 -1
- package/models/operations/listagents.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 +6 -6
- 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/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 +9 -13
- 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/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/liveClient.d.ts.map +1 -1
- package/sdk/liveClient.js +7 -2
- package/sdk/liveClient.js.map +1 -1
- package/sdk/sdk.d.ts +1 -23
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +21 -430
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +136 -88
- 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 +71 -451
- package/src/models/components/calldetail.ts +147 -130
- package/src/models/components/index.ts +0 -3
- package/src/models/components/security.ts +1 -1
- package/src/models/errors/createagent.ts +359 -311
- package/src/models/errors/deleteagent.ts +359 -311
- package/src/models/errors/getagent.ts +358 -302
- package/src/models/errors/getcall.ts +348 -294
- package/src/models/errors/index.ts +1 -6
- package/src/models/errors/listagents.ts +174 -147
- package/src/models/errors/listcalls.ts +251 -211
- package/src/models/errors/registercall.ts +662 -0
- package/src/models/errors/updateagent.ts +359 -311
- package/src/models/operations/createagent.ts +124 -130
- package/src/models/operations/deleteagent.ts +94 -78
- package/src/models/operations/getagent.ts +104 -88
- package/src/models/operations/getcall.ts +101 -88
- package/src/models/operations/index.ts +1 -7
- package/src/models/operations/listagents.ts +68 -60
- package/src/models/operations/listcalls.ts +228 -213
- package/src/models/operations/registercall.ts +167 -0
- package/src/models/operations/updateagent.ts +180 -174
- package/src/sdk/audioWsClient.ts +63 -0
- package/src/sdk/index.ts +1 -1
- package/src/sdk/sdk.ts +802 -1162
- package/src/models/components/agentpromptparams.ts +0 -53
- package/src/models/components/callphonenumber.ts +0 -56
- package/src/models/components/phonenumber.ts +0 -83
- package/src/models/errors/createphonecall.ts +0 -597
- package/src/models/errors/createphonenumber.ts +0 -500
- package/src/models/errors/deletephonenumber.ts +0 -400
- package/src/models/errors/getphonenumber.ts +0 -397
- package/src/models/errors/listphonenumbers.ts +0 -297
- package/src/models/errors/updatephoneagent.ts +0 -397
- package/src/models/operations/createphonecall.ts +0 -308
- package/src/models/operations/createphonenumber.ts +0 -124
- package/src/models/operations/createwebcall.ts +0 -16
- package/src/models/operations/deletephonenumber.ts +0 -103
- package/src/models/operations/getphonenumber.ts +0 -114
- package/src/models/operations/listphonenumbers.ts +0 -76
- package/src/models/operations/updatephoneagent.ts +0 -159
- package/src/sdk/liveClient.ts +0 -109
|
@@ -8,372 +8,426 @@ import { z } from "zod";
|
|
|
8
8
|
* Internal Server Error
|
|
9
9
|
*/
|
|
10
10
|
export type GetCallResponse500ResponseBodyData = {
|
|
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 GetCallResponse500ResponseBody 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 = "GetCallResponse500ResponseBody";
|
|
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$: GetCallResponse500ResponseBodyData;
|
|
30
|
+
|
|
31
|
+
constructor(err: GetCallResponse500ResponseBodyData, options?: ErrorOptions) {
|
|
32
|
+
super("", options);
|
|
33
|
+
this.data$ = err;
|
|
34
|
+
|
|
35
|
+
if (err.rawResponse != null) {
|
|
36
|
+
this.rawResponse = err.rawResponse;
|
|
37
|
+
}
|
|
38
|
+
if (err.errorMessage != null) {
|
|
39
|
+
this.errorMessage = err.errorMessage;
|
|
48
40
|
}
|
|
41
|
+
|
|
42
|
+
const msg =
|
|
43
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
44
|
+
const { rawResponse, ...data } = err;
|
|
45
|
+
const content = JSON.stringify(data);
|
|
46
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
47
|
+
|
|
48
|
+
this.name = "GetCallResponse500ResponseBody";
|
|
49
|
+
}
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* Unprocessable Content
|
|
53
54
|
*/
|
|
54
55
|
export type GetCallResponse422ResponseBodyData = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
58
|
+
*/
|
|
59
|
+
rawResponse?: Response | undefined;
|
|
60
|
+
errorMessage?: string | undefined;
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
64
|
* Unprocessable Content
|
|
64
65
|
*/
|
|
65
66
|
export class GetCallResponse422ResponseBody extends Error {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
if (err.errorMessage != null) {
|
|
83
|
-
this.errorMessage = err.errorMessage;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const msg = "message" in err && typeof err.message === "string" ? err.message : "";
|
|
87
|
-
const { rawResponse, ...data } = err;
|
|
88
|
-
const content = JSON.stringify(data);
|
|
89
|
-
this.message = [msg, content].filter(Boolean).join("\n");
|
|
90
|
-
|
|
91
|
-
this.name = "GetCallResponse422ResponseBody";
|
|
67
|
+
/**
|
|
68
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
69
|
+
*/
|
|
70
|
+
rawResponse?: Response | undefined;
|
|
71
|
+
errorMessage?: string | undefined;
|
|
72
|
+
|
|
73
|
+
/** The original data that was passed to this error instance. */
|
|
74
|
+
data$: GetCallResponse422ResponseBodyData;
|
|
75
|
+
|
|
76
|
+
constructor(err: GetCallResponse422ResponseBodyData, options?: ErrorOptions) {
|
|
77
|
+
super("", options);
|
|
78
|
+
this.data$ = err;
|
|
79
|
+
|
|
80
|
+
if (err.rawResponse != null) {
|
|
81
|
+
this.rawResponse = err.rawResponse;
|
|
92
82
|
}
|
|
83
|
+
if (err.errorMessage != null) {
|
|
84
|
+
this.errorMessage = err.errorMessage;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const msg =
|
|
88
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
89
|
+
const { rawResponse, ...data } = err;
|
|
90
|
+
const content = JSON.stringify(data);
|
|
91
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
92
|
+
|
|
93
|
+
this.name = "GetCallResponse422ResponseBody";
|
|
94
|
+
}
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
/**
|
|
96
98
|
* Unauthorized
|
|
97
99
|
*/
|
|
98
100
|
export type GetCallResponseResponseBodyData = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
/**
|
|
102
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
103
|
+
*/
|
|
104
|
+
rawResponse?: Response | undefined;
|
|
105
|
+
errorMessage?: string | undefined;
|
|
104
106
|
};
|
|
105
107
|
|
|
106
108
|
/**
|
|
107
109
|
* Unauthorized
|
|
108
110
|
*/
|
|
109
111
|
export class GetCallResponseResponseBody 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 = "GetCallResponseResponseBody";
|
|
112
|
+
/**
|
|
113
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
114
|
+
*/
|
|
115
|
+
rawResponse?: Response | undefined;
|
|
116
|
+
errorMessage?: string | undefined;
|
|
117
|
+
|
|
118
|
+
/** The original data that was passed to this error instance. */
|
|
119
|
+
data$: GetCallResponseResponseBodyData;
|
|
120
|
+
|
|
121
|
+
constructor(err: GetCallResponseResponseBodyData, options?: ErrorOptions) {
|
|
122
|
+
super("", options);
|
|
123
|
+
this.data$ = err;
|
|
124
|
+
|
|
125
|
+
if (err.rawResponse != null) {
|
|
126
|
+
this.rawResponse = err.rawResponse;
|
|
127
|
+
}
|
|
128
|
+
if (err.errorMessage != null) {
|
|
129
|
+
this.errorMessage = err.errorMessage;
|
|
136
130
|
}
|
|
131
|
+
|
|
132
|
+
const msg =
|
|
133
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
134
|
+
const { rawResponse, ...data } = err;
|
|
135
|
+
const content = JSON.stringify(data);
|
|
136
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
137
|
+
|
|
138
|
+
this.name = "GetCallResponseResponseBody";
|
|
139
|
+
}
|
|
137
140
|
}
|
|
138
141
|
|
|
139
142
|
/**
|
|
140
143
|
* Bad Request
|
|
141
144
|
*/
|
|
142
145
|
export type GetCallResponseBodyData = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
148
|
+
*/
|
|
149
|
+
rawResponse?: Response | undefined;
|
|
150
|
+
errorMessage?: string | undefined;
|
|
148
151
|
};
|
|
149
152
|
|
|
150
153
|
/**
|
|
151
154
|
* Bad Request
|
|
152
155
|
*/
|
|
153
156
|
export class GetCallResponseBody 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 = "GetCallResponseBody";
|
|
157
|
+
/**
|
|
158
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
159
|
+
*/
|
|
160
|
+
rawResponse?: Response | undefined;
|
|
161
|
+
errorMessage?: string | undefined;
|
|
162
|
+
|
|
163
|
+
/** The original data that was passed to this error instance. */
|
|
164
|
+
data$: GetCallResponseBodyData;
|
|
165
|
+
|
|
166
|
+
constructor(err: GetCallResponseBodyData, options?: ErrorOptions) {
|
|
167
|
+
super("", options);
|
|
168
|
+
this.data$ = err;
|
|
169
|
+
|
|
170
|
+
if (err.rawResponse != null) {
|
|
171
|
+
this.rawResponse = err.rawResponse;
|
|
180
172
|
}
|
|
173
|
+
if (err.errorMessage != null) {
|
|
174
|
+
this.errorMessage = err.errorMessage;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const msg =
|
|
178
|
+
"message" in err && typeof err.message === "string" ? err.message : "";
|
|
179
|
+
const { rawResponse, ...data } = err;
|
|
180
|
+
const content = JSON.stringify(data);
|
|
181
|
+
this.message = [msg, content].filter(Boolean).join("\n");
|
|
182
|
+
|
|
183
|
+
this.name = "GetCallResponseBody";
|
|
184
|
+
}
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
/** @internal */
|
|
184
188
|
export namespace GetCallResponse500ResponseBody$ {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
export type Inbound = {
|
|
190
|
+
RawResponse?: Response | undefined;
|
|
191
|
+
error_message?: string | undefined;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export const inboundSchema: z.ZodType<
|
|
195
|
+
GetCallResponse500ResponseBody,
|
|
196
|
+
z.ZodTypeDef,
|
|
197
|
+
Inbound
|
|
198
|
+
> = z
|
|
199
|
+
.object({
|
|
200
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
201
|
+
error_message: z.string().optional(),
|
|
202
|
+
})
|
|
203
|
+
.transform((v) => {
|
|
204
|
+
return new GetCallResponse500ResponseBody({
|
|
205
|
+
...(v.RawResponse === undefined
|
|
206
|
+
? null
|
|
207
|
+
: { rawResponse: v.RawResponse }),
|
|
208
|
+
...(v.error_message === undefined
|
|
209
|
+
? null
|
|
210
|
+
: { errorMessage: v.error_message }),
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
export type Outbound = {
|
|
214
|
+
RawResponse?: never | undefined;
|
|
215
|
+
error_message?: string | undefined;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export const outboundSchema: z.ZodType<
|
|
219
|
+
Outbound,
|
|
220
|
+
z.ZodTypeDef,
|
|
221
|
+
GetCallResponse500ResponseBody
|
|
222
|
+
> = z
|
|
223
|
+
.instanceof(GetCallResponse500ResponseBody)
|
|
224
|
+
.transform((v) => v.data$)
|
|
225
|
+
.pipe(
|
|
226
|
+
z
|
|
191
227
|
.object({
|
|
192
|
-
|
|
193
|
-
|
|
228
|
+
rawResponse: z
|
|
229
|
+
.instanceof(Response)
|
|
230
|
+
.transform(() => {
|
|
231
|
+
throw new Error("Response cannot be serialized");
|
|
232
|
+
})
|
|
233
|
+
.optional(),
|
|
234
|
+
errorMessage: z.string().optional(),
|
|
194
235
|
})
|
|
195
236
|
.transform((v) => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCallResponse500ResponseBody> =
|
|
207
|
-
z
|
|
208
|
-
.instanceof(GetCallResponse500ResponseBody)
|
|
209
|
-
.transform((v) => v.data$)
|
|
210
|
-
.pipe(
|
|
211
|
-
z
|
|
212
|
-
.object({
|
|
213
|
-
rawResponse: z
|
|
214
|
-
.instanceof(Response)
|
|
215
|
-
.transform(() => {
|
|
216
|
-
throw new Error("Response cannot be serialized");
|
|
217
|
-
})
|
|
218
|
-
.optional(),
|
|
219
|
-
errorMessage: z.string().optional(),
|
|
220
|
-
})
|
|
221
|
-
.transform((v) => {
|
|
222
|
-
return {
|
|
223
|
-
...(v.rawResponse === undefined
|
|
224
|
-
? null
|
|
225
|
-
: { RawResponse: v.rawResponse }),
|
|
226
|
-
...(v.errorMessage === undefined
|
|
227
|
-
? null
|
|
228
|
-
: { error_message: v.errorMessage }),
|
|
229
|
-
};
|
|
230
|
-
})
|
|
231
|
-
);
|
|
237
|
+
return {
|
|
238
|
+
...(v.rawResponse === undefined
|
|
239
|
+
? null
|
|
240
|
+
: { RawResponse: v.rawResponse }),
|
|
241
|
+
...(v.errorMessage === undefined
|
|
242
|
+
? null
|
|
243
|
+
: { error_message: v.errorMessage }),
|
|
244
|
+
};
|
|
245
|
+
}),
|
|
246
|
+
);
|
|
232
247
|
}
|
|
233
248
|
|
|
234
249
|
/** @internal */
|
|
235
250
|
export namespace GetCallResponse422ResponseBody$ {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
251
|
+
export type Inbound = {
|
|
252
|
+
RawResponse?: Response | undefined;
|
|
253
|
+
error_message?: string | undefined;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
export const inboundSchema: z.ZodType<
|
|
257
|
+
GetCallResponse422ResponseBody,
|
|
258
|
+
z.ZodTypeDef,
|
|
259
|
+
Inbound
|
|
260
|
+
> = z
|
|
261
|
+
.object({
|
|
262
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
263
|
+
error_message: z.string().optional(),
|
|
264
|
+
})
|
|
265
|
+
.transform((v) => {
|
|
266
|
+
return new GetCallResponse422ResponseBody({
|
|
267
|
+
...(v.RawResponse === undefined
|
|
268
|
+
? null
|
|
269
|
+
: { rawResponse: v.RawResponse }),
|
|
270
|
+
...(v.error_message === undefined
|
|
271
|
+
? null
|
|
272
|
+
: { errorMessage: v.error_message }),
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
export type Outbound = {
|
|
276
|
+
RawResponse?: never | undefined;
|
|
277
|
+
error_message?: string | undefined;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
export const outboundSchema: z.ZodType<
|
|
281
|
+
Outbound,
|
|
282
|
+
z.ZodTypeDef,
|
|
283
|
+
GetCallResponse422ResponseBody
|
|
284
|
+
> = z
|
|
285
|
+
.instanceof(GetCallResponse422ResponseBody)
|
|
286
|
+
.transform((v) => v.data$)
|
|
287
|
+
.pipe(
|
|
288
|
+
z
|
|
242
289
|
.object({
|
|
243
|
-
|
|
244
|
-
|
|
290
|
+
rawResponse: z
|
|
291
|
+
.instanceof(Response)
|
|
292
|
+
.transform(() => {
|
|
293
|
+
throw new Error("Response cannot be serialized");
|
|
294
|
+
})
|
|
295
|
+
.optional(),
|
|
296
|
+
errorMessage: z.string().optional(),
|
|
245
297
|
})
|
|
246
298
|
.transform((v) => {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCallResponse422ResponseBody> =
|
|
258
|
-
z
|
|
259
|
-
.instanceof(GetCallResponse422ResponseBody)
|
|
260
|
-
.transform((v) => v.data$)
|
|
261
|
-
.pipe(
|
|
262
|
-
z
|
|
263
|
-
.object({
|
|
264
|
-
rawResponse: z
|
|
265
|
-
.instanceof(Response)
|
|
266
|
-
.transform(() => {
|
|
267
|
-
throw new Error("Response cannot be serialized");
|
|
268
|
-
})
|
|
269
|
-
.optional(),
|
|
270
|
-
errorMessage: z.string().optional(),
|
|
271
|
-
})
|
|
272
|
-
.transform((v) => {
|
|
273
|
-
return {
|
|
274
|
-
...(v.rawResponse === undefined
|
|
275
|
-
? null
|
|
276
|
-
: { RawResponse: v.rawResponse }),
|
|
277
|
-
...(v.errorMessage === undefined
|
|
278
|
-
? null
|
|
279
|
-
: { error_message: v.errorMessage }),
|
|
280
|
-
};
|
|
281
|
-
})
|
|
282
|
-
);
|
|
299
|
+
return {
|
|
300
|
+
...(v.rawResponse === undefined
|
|
301
|
+
? null
|
|
302
|
+
: { RawResponse: v.rawResponse }),
|
|
303
|
+
...(v.errorMessage === undefined
|
|
304
|
+
? null
|
|
305
|
+
: { error_message: v.errorMessage }),
|
|
306
|
+
};
|
|
307
|
+
}),
|
|
308
|
+
);
|
|
283
309
|
}
|
|
284
310
|
|
|
285
311
|
/** @internal */
|
|
286
312
|
export namespace GetCallResponseResponseBody$ {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
313
|
+
export type Inbound = {
|
|
314
|
+
RawResponse?: Response | undefined;
|
|
315
|
+
error_message?: string | undefined;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export const inboundSchema: z.ZodType<
|
|
319
|
+
GetCallResponseResponseBody,
|
|
320
|
+
z.ZodTypeDef,
|
|
321
|
+
Inbound
|
|
322
|
+
> = z
|
|
323
|
+
.object({
|
|
324
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
325
|
+
error_message: z.string().optional(),
|
|
326
|
+
})
|
|
327
|
+
.transform((v) => {
|
|
328
|
+
return new GetCallResponseResponseBody({
|
|
329
|
+
...(v.RawResponse === undefined
|
|
330
|
+
? null
|
|
331
|
+
: { rawResponse: v.RawResponse }),
|
|
332
|
+
...(v.error_message === undefined
|
|
333
|
+
? null
|
|
334
|
+
: { errorMessage: v.error_message }),
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
export type Outbound = {
|
|
338
|
+
RawResponse?: never | undefined;
|
|
339
|
+
error_message?: string | undefined;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export const outboundSchema: z.ZodType<
|
|
343
|
+
Outbound,
|
|
344
|
+
z.ZodTypeDef,
|
|
345
|
+
GetCallResponseResponseBody
|
|
346
|
+
> = z
|
|
347
|
+
.instanceof(GetCallResponseResponseBody)
|
|
348
|
+
.transform((v) => v.data$)
|
|
349
|
+
.pipe(
|
|
350
|
+
z
|
|
293
351
|
.object({
|
|
294
|
-
|
|
295
|
-
|
|
352
|
+
rawResponse: z
|
|
353
|
+
.instanceof(Response)
|
|
354
|
+
.transform(() => {
|
|
355
|
+
throw new Error("Response cannot be serialized");
|
|
356
|
+
})
|
|
357
|
+
.optional(),
|
|
358
|
+
errorMessage: z.string().optional(),
|
|
296
359
|
})
|
|
297
360
|
.transform((v) => {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCallResponseResponseBody> = z
|
|
309
|
-
.instanceof(GetCallResponseResponseBody)
|
|
310
|
-
.transform((v) => v.data$)
|
|
311
|
-
.pipe(
|
|
312
|
-
z
|
|
313
|
-
.object({
|
|
314
|
-
rawResponse: z
|
|
315
|
-
.instanceof(Response)
|
|
316
|
-
.transform(() => {
|
|
317
|
-
throw new Error("Response cannot be serialized");
|
|
318
|
-
})
|
|
319
|
-
.optional(),
|
|
320
|
-
errorMessage: z.string().optional(),
|
|
321
|
-
})
|
|
322
|
-
.transform((v) => {
|
|
323
|
-
return {
|
|
324
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
325
|
-
...(v.errorMessage === undefined
|
|
326
|
-
? null
|
|
327
|
-
: { error_message: v.errorMessage }),
|
|
328
|
-
};
|
|
329
|
-
})
|
|
330
|
-
);
|
|
361
|
+
return {
|
|
362
|
+
...(v.rawResponse === undefined
|
|
363
|
+
? null
|
|
364
|
+
: { RawResponse: v.rawResponse }),
|
|
365
|
+
...(v.errorMessage === undefined
|
|
366
|
+
? null
|
|
367
|
+
: { error_message: v.errorMessage }),
|
|
368
|
+
};
|
|
369
|
+
}),
|
|
370
|
+
);
|
|
331
371
|
}
|
|
332
372
|
|
|
333
373
|
/** @internal */
|
|
334
374
|
export namespace GetCallResponseBody$ {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
375
|
+
export type Inbound = {
|
|
376
|
+
RawResponse?: Response | undefined;
|
|
377
|
+
error_message?: string | undefined;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
export const inboundSchema: z.ZodType<
|
|
381
|
+
GetCallResponseBody,
|
|
382
|
+
z.ZodTypeDef,
|
|
383
|
+
Inbound
|
|
384
|
+
> = z
|
|
385
|
+
.object({
|
|
386
|
+
RawResponse: z.instanceof(Response).optional(),
|
|
387
|
+
error_message: z.string().optional(),
|
|
388
|
+
})
|
|
389
|
+
.transform((v) => {
|
|
390
|
+
return new GetCallResponseBody({
|
|
391
|
+
...(v.RawResponse === undefined
|
|
392
|
+
? null
|
|
393
|
+
: { rawResponse: v.RawResponse }),
|
|
394
|
+
...(v.error_message === undefined
|
|
395
|
+
? null
|
|
396
|
+
: { errorMessage: v.error_message }),
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
export type Outbound = {
|
|
400
|
+
RawResponse?: never | undefined;
|
|
401
|
+
error_message?: string | undefined;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export const outboundSchema: z.ZodType<
|
|
405
|
+
Outbound,
|
|
406
|
+
z.ZodTypeDef,
|
|
407
|
+
GetCallResponseBody
|
|
408
|
+
> = z
|
|
409
|
+
.instanceof(GetCallResponseBody)
|
|
410
|
+
.transform((v) => v.data$)
|
|
411
|
+
.pipe(
|
|
412
|
+
z
|
|
341
413
|
.object({
|
|
342
|
-
|
|
343
|
-
|
|
414
|
+
rawResponse: z
|
|
415
|
+
.instanceof(Response)
|
|
416
|
+
.transform(() => {
|
|
417
|
+
throw new Error("Response cannot be serialized");
|
|
418
|
+
})
|
|
419
|
+
.optional(),
|
|
420
|
+
errorMessage: z.string().optional(),
|
|
344
421
|
})
|
|
345
422
|
.transform((v) => {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetCallResponseBody> = z
|
|
357
|
-
.instanceof(GetCallResponseBody)
|
|
358
|
-
.transform((v) => v.data$)
|
|
359
|
-
.pipe(
|
|
360
|
-
z
|
|
361
|
-
.object({
|
|
362
|
-
rawResponse: z
|
|
363
|
-
.instanceof(Response)
|
|
364
|
-
.transform(() => {
|
|
365
|
-
throw new Error("Response cannot be serialized");
|
|
366
|
-
})
|
|
367
|
-
.optional(),
|
|
368
|
-
errorMessage: z.string().optional(),
|
|
369
|
-
})
|
|
370
|
-
.transform((v) => {
|
|
371
|
-
return {
|
|
372
|
-
...(v.rawResponse === undefined ? null : { RawResponse: v.rawResponse }),
|
|
373
|
-
...(v.errorMessage === undefined
|
|
374
|
-
? null
|
|
375
|
-
: { error_message: v.errorMessage }),
|
|
376
|
-
};
|
|
377
|
-
})
|
|
378
|
-
);
|
|
423
|
+
return {
|
|
424
|
+
...(v.rawResponse === undefined
|
|
425
|
+
? null
|
|
426
|
+
: { RawResponse: v.rawResponse }),
|
|
427
|
+
...(v.errorMessage === undefined
|
|
428
|
+
? null
|
|
429
|
+
: { error_message: v.errorMessage }),
|
|
430
|
+
};
|
|
431
|
+
}),
|
|
432
|
+
);
|
|
379
433
|
}
|