retell-sdk 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example.js +34 -2
- package/example.js.map +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +5 -1
- package/lib/security.js.map +1 -1
- package/models/components/agent.d.ts +3 -3
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +60 -26
- package/models/components/agent.js.map +1 -1
- package/models/components/agentpromptparams.d.ts.map +1 -1
- package/models/components/agentpromptparams.js.map +1 -1
- package/models/components/calldetail.d.ts.map +1 -1
- package/models/components/calldetail.js +18 -6
- package/models/components/calldetail.js.map +1 -1
- package/models/components/callphonenumber.d.ts.map +1 -1
- package/models/components/callphonenumber.js.map +1 -1
- package/models/components/phonenumber.d.ts.map +1 -1
- package/models/components/phonenumber.js.map +1 -1
- package/models/components/security.d.ts.map +1 -1
- package/models/errors/createagent.d.ts.map +1 -1
- package/models/errors/createagent.js +36 -12
- package/models/errors/createagent.js.map +1 -1
- package/models/errors/createphonecall.d.ts.map +1 -1
- package/models/errors/createphonecall.js +54 -18
- package/models/errors/createphonecall.js.map +1 -1
- package/models/errors/createphonenumber.d.ts.map +1 -1
- package/models/errors/createphonenumber.js +42 -14
- package/models/errors/createphonenumber.js.map +1 -1
- package/models/errors/deleteagent.d.ts.map +1 -1
- package/models/errors/deleteagent.js +36 -12
- package/models/errors/deleteagent.js.map +1 -1
- package/models/errors/deletephonenumber.d.ts.map +1 -1
- package/models/errors/deletephonenumber.js +33 -11
- package/models/errors/deletephonenumber.js.map +1 -1
- package/models/errors/getagent.d.ts.map +1 -1
- package/models/errors/getagent.js +36 -12
- package/models/errors/getagent.js.map +1 -1
- package/models/errors/getcall.d.ts.map +1 -1
- package/models/errors/getcall.js +30 -10
- package/models/errors/getcall.js.map +1 -1
- package/models/errors/getphonenumber.d.ts.map +1 -1
- package/models/errors/getphonenumber.js +36 -12
- package/models/errors/getphonenumber.js.map +1 -1
- package/models/errors/listagents.d.ts.map +1 -1
- package/models/errors/listagents.js +15 -5
- package/models/errors/listagents.js.map +1 -1
- package/models/errors/listcalls.d.ts.map +1 -1
- package/models/errors/listcalls.js +24 -8
- package/models/errors/listcalls.js.map +1 -1
- package/models/errors/listphonenumbers.d.ts.map +1 -1
- package/models/errors/listphonenumbers.js +27 -9
- package/models/errors/listphonenumbers.js.map +1 -1
- package/models/errors/updateagent.d.ts.map +1 -1
- package/models/errors/updateagent.js +36 -12
- package/models/errors/updateagent.js.map +1 -1
- package/models/errors/updatephoneagent.d.ts.map +1 -1
- package/models/errors/updatephoneagent.js +36 -12
- package/models/errors/updatephoneagent.js.map +1 -1
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +16 -6
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/createphonecall.d.ts.map +1 -1
- package/models/operations/createphonecall.js +18 -6
- package/models/operations/createphonecall.js.map +1 -1
- package/models/operations/createphonenumber.d.ts.map +1 -1
- package/models/operations/createphonenumber.js +6 -2
- package/models/operations/createphonenumber.js.map +1 -1
- package/models/operations/createwebcall.d.ts.map +1 -1
- package/models/operations/deleteagent.d.ts.map +1 -1
- package/models/operations/deleteagent.js.map +1 -1
- package/models/operations/deletephonenumber.d.ts.map +1 -1
- package/models/operations/deletephonenumber.js.map +1 -1
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getcall.d.ts.map +1 -1
- package/models/operations/getcall.js.map +1 -1
- package/models/operations/getphonenumber.d.ts.map +1 -1
- package/models/operations/getphonenumber.js +6 -2
- package/models/operations/getphonenumber.js.map +1 -1
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listcalls.d.ts.map +1 -1
- package/models/operations/listcalls.js +6 -2
- package/models/operations/listcalls.js.map +1 -1
- package/models/operations/listphonenumbers.d.ts.map +1 -1
- package/models/operations/listphonenumbers.js +6 -2
- package/models/operations/listphonenumbers.js.map +1 -1
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +18 -4
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatephoneagent.d.ts.map +1 -1
- package/models/operations/updatephoneagent.js +6 -2
- package/models/operations/updatephoneagent.js.map +1 -1
- package/package.json +1 -1
- package/sdk/liveClient.d.ts.map +1 -1
- package/sdk/liveClient.js +7 -2
- package/sdk/liveClient.js.map +1 -1
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +22 -5
- package/sdk/sdk.js.map +1 -1
- package/src/example.ts +121 -87
- package/src/lib/config.ts +32 -32
- package/src/lib/sdks.ts +91 -82
- package/src/lib/security.ts +133 -118
- package/src/models/components/agent.ts +459 -387
- package/src/models/components/agentpromptparams.ts +46 -38
- package/src/models/components/calldetail.ts +137 -125
- package/src/models/components/callphonenumber.ts +46 -38
- package/src/models/components/phonenumber.ts +69 -68
- package/src/models/components/security.ts +1 -1
- package/src/models/errors/createagent.ts +359 -311
- package/src/models/errors/createphonecall.ts +537 -472
- package/src/models/errors/createphonenumber.ts +447 -395
- package/src/models/errors/deleteagent.ts +359 -311
- package/src/models/errors/deletephonenumber.ts +357 -315
- package/src/models/errors/getagent.ts +358 -302
- package/src/models/errors/getcall.ts +348 -294
- package/src/models/errors/getphonenumber.ts +357 -312
- package/src/models/errors/listagents.ts +174 -147
- package/src/models/errors/listcalls.ts +251 -211
- package/src/models/errors/listphonenumbers.ts +252 -217
- package/src/models/errors/updateagent.ts +359 -311
- package/src/models/errors/updatephoneagent.ts +357 -312
- package/src/models/operations/createagent.ts +165 -129
- package/src/models/operations/createphonecall.ts +283 -238
- package/src/models/operations/createphonenumber.ts +118 -98
- package/src/models/operations/createwebcall.ts +13 -13
- package/src/models/operations/deleteagent.ts +94 -78
- package/src/models/operations/deletephonenumber.ts +94 -78
- package/src/models/operations/getagent.ts +104 -88
- package/src/models/operations/getcall.ts +101 -88
- package/src/models/operations/getphonenumber.ts +108 -88
- package/src/models/operations/listagents.ts +68 -60
- package/src/models/operations/listcalls.ts +238 -213
- package/src/models/operations/listphonenumbers.ts +72 -60
- package/src/models/operations/updateagent.ts +226 -173
- package/src/models/operations/updatephoneagent.ts +160 -132
- package/src/sdk/liveClient.ts +11 -7
- package/src/sdk/sdk.ts +1313 -1160
|
@@ -6,71 +6,79 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export type ListAgentsResponse = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
/**
|
|
10
|
+
* HTTP response content type for this operation
|
|
11
|
+
*/
|
|
12
|
+
contentType: string;
|
|
13
|
+
/**
|
|
14
|
+
* HTTP response status code for this operation
|
|
15
|
+
*/
|
|
16
|
+
statusCode: number;
|
|
17
|
+
/**
|
|
18
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
19
|
+
*/
|
|
20
|
+
rawResponse: Response;
|
|
21
|
+
/**
|
|
22
|
+
* Successfully retrieved all agents.
|
|
23
|
+
*/
|
|
24
|
+
agents?: Array<components.Agent> | undefined;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/** @internal */
|
|
28
28
|
export namespace ListAgentsResponse$ {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
export type Inbound = {
|
|
30
|
+
ContentType: string;
|
|
31
|
+
StatusCode: number;
|
|
32
|
+
RawResponse: Response;
|
|
33
|
+
agents?: Array<components.Agent$.Inbound> | undefined;
|
|
34
|
+
};
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
export const inboundSchema: z.ZodType<
|
|
37
|
+
ListAgentsResponse,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
Inbound
|
|
40
|
+
> = z
|
|
41
|
+
.object({
|
|
42
|
+
ContentType: z.string(),
|
|
43
|
+
StatusCode: z.number().int(),
|
|
44
|
+
RawResponse: z.instanceof(Response),
|
|
45
|
+
agents: z.array(components.Agent$.inboundSchema).optional(),
|
|
46
|
+
})
|
|
47
|
+
.transform((v) => {
|
|
48
|
+
return {
|
|
49
|
+
contentType: v.ContentType,
|
|
50
|
+
statusCode: v.StatusCode,
|
|
51
|
+
rawResponse: v.RawResponse,
|
|
52
|
+
...(v.agents === undefined ? null : { agents: v.agents }),
|
|
53
|
+
};
|
|
54
|
+
});
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
export type Outbound = {
|
|
57
|
+
ContentType: string;
|
|
58
|
+
StatusCode: number;
|
|
59
|
+
RawResponse: never;
|
|
60
|
+
agents?: Array<components.Agent$.Outbound> | undefined;
|
|
61
|
+
};
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
export const outboundSchema: z.ZodType<
|
|
64
|
+
Outbound,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
ListAgentsResponse
|
|
67
|
+
> = z
|
|
68
|
+
.object({
|
|
69
|
+
contentType: z.string(),
|
|
70
|
+
statusCode: z.number().int(),
|
|
71
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
72
|
+
throw new Error("Response cannot be serialized");
|
|
73
|
+
}),
|
|
74
|
+
agents: z.array(components.Agent$.outboundSchema).optional(),
|
|
75
|
+
})
|
|
76
|
+
.transform((v) => {
|
|
77
|
+
return {
|
|
78
|
+
ContentType: v.contentType,
|
|
79
|
+
StatusCode: v.statusCode,
|
|
80
|
+
RawResponse: v.rawResponse,
|
|
81
|
+
...(v.agents === undefined ? null : { agents: v.agents }),
|
|
82
|
+
};
|
|
83
|
+
});
|
|
76
84
|
}
|
|
@@ -6,75 +6,75 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export enum CallType {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
InboundPhoneCall = "inbound_phone_call",
|
|
10
|
+
OutboundPhoneCall = "outbound_phone_call",
|
|
11
|
+
WebCall = "web_call",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export type FilterCriteria = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Inclusive. Filter calls that end on or after this timestamp.
|
|
17
|
+
*/
|
|
18
|
+
afterEndTimestamp?: number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Inclusive. Filter calls that start on or after this timestamp.
|
|
21
|
+
*/
|
|
22
|
+
afterStartTimestamp?: number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Only retrieve calls that are made with specific agent(s).
|
|
25
|
+
*/
|
|
26
|
+
agentId?: Array<string> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Exclusive. Filter calls that end before this timestamp.
|
|
29
|
+
*/
|
|
30
|
+
beforeEndTimestamp?: number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Exclusive. Filter calls that start before this timestamp.
|
|
33
|
+
*/
|
|
34
|
+
beforeStartTimestamp?: number | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Only retrieve calls of specific type(s).
|
|
37
|
+
*/
|
|
38
|
+
callType?: Array<CallType> | undefined;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The calls will be sorted by `start_timestamp`, whether to return the calls in ascending or descending order.
|
|
43
43
|
*/
|
|
44
44
|
export enum SortOrder {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
Ascending = "ascending",
|
|
46
|
+
Descending = "descending",
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export type ListCallsRequest = {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
filterCriteria?: FilterCriteria | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Limit the number of calls returned.
|
|
53
|
+
*/
|
|
54
|
+
limit?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The calls will be sorted by `start_timestamp`, whether to return the calls in ascending or descending order.
|
|
57
|
+
*/
|
|
58
|
+
sortOrder?: SortOrder | undefined;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
export type ListCallsResponse = {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
/**
|
|
63
|
+
* HTTP response content type for this operation
|
|
64
|
+
*/
|
|
65
|
+
contentType: string;
|
|
66
|
+
/**
|
|
67
|
+
* HTTP response status code for this operation
|
|
68
|
+
*/
|
|
69
|
+
statusCode: number;
|
|
70
|
+
/**
|
|
71
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
72
|
+
*/
|
|
73
|
+
rawResponse: Response;
|
|
74
|
+
/**
|
|
75
|
+
* Successfully retrieved all agents.
|
|
76
|
+
*/
|
|
77
|
+
calls?: Array<components.CallDetail> | undefined;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
/** @internal */
|
|
@@ -82,79 +82,84 @@ export const CallType$ = z.nativeEnum(CallType);
|
|
|
82
82
|
|
|
83
83
|
/** @internal */
|
|
84
84
|
export namespace FilterCriteria$ {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
85
|
+
export type Inbound = {
|
|
86
|
+
after_end_timestamp?: number | undefined;
|
|
87
|
+
after_start_timestamp?: number | undefined;
|
|
88
|
+
agent_id?: Array<string> | undefined;
|
|
89
|
+
before_end_timestamp?: number | undefined;
|
|
90
|
+
before_start_timestamp?: number | undefined;
|
|
91
|
+
call_type?: Array<CallType> | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const inboundSchema: z.ZodType<FilterCriteria, z.ZodTypeDef, Inbound> =
|
|
95
|
+
z
|
|
96
|
+
.object({
|
|
97
|
+
after_end_timestamp: z.number().int().optional(),
|
|
98
|
+
after_start_timestamp: z.number().int().optional(),
|
|
99
|
+
agent_id: z.array(z.string()).optional(),
|
|
100
|
+
before_end_timestamp: z.number().int().optional(),
|
|
101
|
+
before_start_timestamp: z.number().int().optional(),
|
|
102
|
+
call_type: z.array(CallType$).optional(),
|
|
103
|
+
})
|
|
104
|
+
.transform((v) => {
|
|
105
|
+
return {
|
|
106
|
+
...(v.after_end_timestamp === undefined
|
|
107
|
+
? null
|
|
108
|
+
: { afterEndTimestamp: v.after_end_timestamp }),
|
|
109
|
+
...(v.after_start_timestamp === undefined
|
|
110
|
+
? null
|
|
111
|
+
: { afterStartTimestamp: v.after_start_timestamp }),
|
|
112
|
+
...(v.agent_id === undefined ? null : { agentId: v.agent_id }),
|
|
113
|
+
...(v.before_end_timestamp === undefined
|
|
114
|
+
? null
|
|
115
|
+
: { beforeEndTimestamp: v.before_end_timestamp }),
|
|
116
|
+
...(v.before_start_timestamp === undefined
|
|
117
|
+
? null
|
|
118
|
+
: { beforeStartTimestamp: v.before_start_timestamp }),
|
|
119
|
+
...(v.call_type === undefined ? null : { callType: v.call_type }),
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export type Outbound = {
|
|
124
|
+
after_end_timestamp?: number | undefined;
|
|
125
|
+
after_start_timestamp?: number | undefined;
|
|
126
|
+
agent_id?: Array<string> | undefined;
|
|
127
|
+
before_end_timestamp?: number | undefined;
|
|
128
|
+
before_start_timestamp?: number | undefined;
|
|
129
|
+
call_type?: Array<CallType> | undefined;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export const outboundSchema: z.ZodType<
|
|
133
|
+
Outbound,
|
|
134
|
+
z.ZodTypeDef,
|
|
135
|
+
FilterCriteria
|
|
136
|
+
> = z
|
|
137
|
+
.object({
|
|
138
|
+
afterEndTimestamp: z.number().int().optional(),
|
|
139
|
+
afterStartTimestamp: z.number().int().optional(),
|
|
140
|
+
agentId: z.array(z.string()).optional(),
|
|
141
|
+
beforeEndTimestamp: z.number().int().optional(),
|
|
142
|
+
beforeStartTimestamp: z.number().int().optional(),
|
|
143
|
+
callType: z.array(CallType$).optional(),
|
|
144
|
+
})
|
|
145
|
+
.transform((v) => {
|
|
146
|
+
return {
|
|
147
|
+
...(v.afterEndTimestamp === undefined
|
|
148
|
+
? null
|
|
149
|
+
: { after_end_timestamp: v.afterEndTimestamp }),
|
|
150
|
+
...(v.afterStartTimestamp === undefined
|
|
151
|
+
? null
|
|
152
|
+
: { after_start_timestamp: v.afterStartTimestamp }),
|
|
153
|
+
...(v.agentId === undefined ? null : { agent_id: v.agentId }),
|
|
154
|
+
...(v.beforeEndTimestamp === undefined
|
|
155
|
+
? null
|
|
156
|
+
: { before_end_timestamp: v.beforeEndTimestamp }),
|
|
157
|
+
...(v.beforeStartTimestamp === undefined
|
|
158
|
+
? null
|
|
159
|
+
: { before_start_timestamp: v.beforeStartTimestamp }),
|
|
160
|
+
...(v.callType === undefined ? null : { call_type: v.callType }),
|
|
161
|
+
};
|
|
162
|
+
});
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
/** @internal */
|
|
@@ -162,94 +167,114 @@ export const SortOrder$ = z.nativeEnum(SortOrder);
|
|
|
162
167
|
|
|
163
168
|
/** @internal */
|
|
164
169
|
export namespace ListCallsRequest$ {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
170
|
+
export type Inbound = {
|
|
171
|
+
filter_criteria?: FilterCriteria$.Inbound | undefined;
|
|
172
|
+
limit?: number | undefined;
|
|
173
|
+
sort_order?: SortOrder | undefined;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const inboundSchema: z.ZodType<
|
|
177
|
+
ListCallsRequest,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
Inbound
|
|
180
|
+
> = z
|
|
181
|
+
.object({
|
|
182
|
+
filter_criteria: z.lazy(() => FilterCriteria$.inboundSchema).optional(),
|
|
183
|
+
limit: z.number().int().optional(),
|
|
184
|
+
sort_order: SortOrder$.optional(),
|
|
185
|
+
})
|
|
186
|
+
.transform((v) => {
|
|
187
|
+
return {
|
|
188
|
+
...(v.filter_criteria === undefined
|
|
189
|
+
? null
|
|
190
|
+
: { filterCriteria: v.filter_criteria }),
|
|
191
|
+
...(v.limit === undefined ? null : { limit: v.limit }),
|
|
192
|
+
...(v.sort_order === undefined ? null : { sortOrder: v.sort_order }),
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export type Outbound = {
|
|
197
|
+
filter_criteria?: FilterCriteria$.Outbound | undefined;
|
|
198
|
+
limit?: number | undefined;
|
|
199
|
+
sort_order?: SortOrder | undefined;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export const outboundSchema: z.ZodType<
|
|
203
|
+
Outbound,
|
|
204
|
+
z.ZodTypeDef,
|
|
205
|
+
ListCallsRequest
|
|
206
|
+
> = z
|
|
207
|
+
.object({
|
|
208
|
+
filterCriteria: z.lazy(() => FilterCriteria$.outboundSchema).optional(),
|
|
209
|
+
limit: z.number().int().optional(),
|
|
210
|
+
sortOrder: SortOrder$.optional(),
|
|
211
|
+
})
|
|
212
|
+
.transform((v) => {
|
|
213
|
+
return {
|
|
214
|
+
...(v.filterCriteria === undefined
|
|
215
|
+
? null
|
|
216
|
+
: { filter_criteria: v.filterCriteria }),
|
|
217
|
+
...(v.limit === undefined ? null : { limit: v.limit }),
|
|
218
|
+
...(v.sortOrder === undefined ? null : { sort_order: v.sortOrder }),
|
|
219
|
+
};
|
|
220
|
+
});
|
|
204
221
|
}
|
|
205
222
|
|
|
206
223
|
/** @internal */
|
|
207
224
|
export namespace ListCallsResponse$ {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
225
|
+
export type Inbound = {
|
|
226
|
+
ContentType: string;
|
|
227
|
+
StatusCode: number;
|
|
228
|
+
RawResponse: Response;
|
|
229
|
+
calls?: Array<components.CallDetail$.Inbound> | undefined;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export const inboundSchema: z.ZodType<
|
|
233
|
+
ListCallsResponse,
|
|
234
|
+
z.ZodTypeDef,
|
|
235
|
+
Inbound
|
|
236
|
+
> = z
|
|
237
|
+
.object({
|
|
238
|
+
ContentType: z.string(),
|
|
239
|
+
StatusCode: z.number().int(),
|
|
240
|
+
RawResponse: z.instanceof(Response),
|
|
241
|
+
calls: z.array(components.CallDetail$.inboundSchema).optional(),
|
|
242
|
+
})
|
|
243
|
+
.transform((v) => {
|
|
244
|
+
return {
|
|
245
|
+
contentType: v.ContentType,
|
|
246
|
+
statusCode: v.StatusCode,
|
|
247
|
+
rawResponse: v.RawResponse,
|
|
248
|
+
...(v.calls === undefined ? null : { calls: v.calls }),
|
|
249
|
+
};
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export type Outbound = {
|
|
253
|
+
ContentType: string;
|
|
254
|
+
StatusCode: number;
|
|
255
|
+
RawResponse: never;
|
|
256
|
+
calls?: Array<components.CallDetail$.Outbound> | undefined;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const outboundSchema: z.ZodType<
|
|
260
|
+
Outbound,
|
|
261
|
+
z.ZodTypeDef,
|
|
262
|
+
ListCallsResponse
|
|
263
|
+
> = z
|
|
264
|
+
.object({
|
|
265
|
+
contentType: z.string(),
|
|
266
|
+
statusCode: z.number().int(),
|
|
267
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
268
|
+
throw new Error("Response cannot be serialized");
|
|
269
|
+
}),
|
|
270
|
+
calls: z.array(components.CallDetail$.outboundSchema).optional(),
|
|
271
|
+
})
|
|
272
|
+
.transform((v) => {
|
|
273
|
+
return {
|
|
274
|
+
ContentType: v.contentType,
|
|
275
|
+
StatusCode: v.statusCode,
|
|
276
|
+
RawResponse: v.rawResponse,
|
|
277
|
+
...(v.calls === undefined ? null : { calls: v.calls }),
|
|
278
|
+
};
|
|
279
|
+
});
|
|
255
280
|
}
|