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,109 +6,125 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export type GetAgentRequest = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Unique id of the agent to be retrieved.
|
|
11
|
+
*/
|
|
12
|
+
agentId: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export type GetAgentResponse = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Successfully retrieved an agent.
|
|
18
|
+
*/
|
|
19
|
+
agent?: components.Agent | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* HTTP response content type for this operation
|
|
22
|
+
*/
|
|
23
|
+
contentType: string;
|
|
24
|
+
/**
|
|
25
|
+
* HTTP response status code for this operation
|
|
26
|
+
*/
|
|
27
|
+
statusCode: number;
|
|
28
|
+
/**
|
|
29
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
30
|
+
*/
|
|
31
|
+
rawResponse: Response;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/** @internal */
|
|
35
35
|
export namespace GetAgentRequest$ {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
export type Inbound = {
|
|
37
|
+
agent_id: string;
|
|
38
|
+
};
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
export const inboundSchema: z.ZodType<
|
|
41
|
+
GetAgentRequest,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
Inbound
|
|
44
|
+
> = z
|
|
45
|
+
.object({
|
|
46
|
+
agent_id: z.string(),
|
|
47
|
+
})
|
|
48
|
+
.transform((v) => {
|
|
49
|
+
return {
|
|
50
|
+
agentId: v.agent_id,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
export type Outbound = {
|
|
55
|
+
agent_id: string;
|
|
56
|
+
};
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
export const outboundSchema: z.ZodType<
|
|
59
|
+
Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
GetAgentRequest
|
|
62
|
+
> = z
|
|
63
|
+
.object({
|
|
64
|
+
agentId: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.transform((v) => {
|
|
67
|
+
return {
|
|
68
|
+
agent_id: v.agentId,
|
|
69
|
+
};
|
|
70
|
+
});
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
/** @internal */
|
|
66
74
|
export namespace GetAgentResponse$ {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
export type Inbound = {
|
|
76
|
+
Agent?: components.Agent$.Inbound | undefined;
|
|
77
|
+
ContentType: string;
|
|
78
|
+
StatusCode: number;
|
|
79
|
+
RawResponse: Response;
|
|
80
|
+
};
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
export const inboundSchema: z.ZodType<
|
|
83
|
+
GetAgentResponse,
|
|
84
|
+
z.ZodTypeDef,
|
|
85
|
+
Inbound
|
|
86
|
+
> = z
|
|
87
|
+
.object({
|
|
88
|
+
Agent: components.Agent$.inboundSchema.optional(),
|
|
89
|
+
ContentType: z.string(),
|
|
90
|
+
StatusCode: z.number().int(),
|
|
91
|
+
RawResponse: z.instanceof(Response),
|
|
92
|
+
})
|
|
93
|
+
.transform((v) => {
|
|
94
|
+
return {
|
|
95
|
+
...(v.Agent === undefined ? null : { agent: v.Agent }),
|
|
96
|
+
contentType: v.ContentType,
|
|
97
|
+
statusCode: v.StatusCode,
|
|
98
|
+
rawResponse: v.RawResponse,
|
|
99
|
+
};
|
|
100
|
+
});
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
102
|
+
export type Outbound = {
|
|
103
|
+
Agent?: components.Agent$.Outbound | undefined;
|
|
104
|
+
ContentType: string;
|
|
105
|
+
StatusCode: number;
|
|
106
|
+
RawResponse: never;
|
|
107
|
+
};
|
|
96
108
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
export const outboundSchema: z.ZodType<
|
|
110
|
+
Outbound,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
GetAgentResponse
|
|
113
|
+
> = z
|
|
114
|
+
.object({
|
|
115
|
+
agent: components.Agent$.outboundSchema.optional(),
|
|
116
|
+
contentType: z.string(),
|
|
117
|
+
statusCode: z.number().int(),
|
|
118
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
119
|
+
throw new Error("Response cannot be serialized");
|
|
120
|
+
}),
|
|
121
|
+
})
|
|
122
|
+
.transform((v) => {
|
|
123
|
+
return {
|
|
124
|
+
...(v.agent === undefined ? null : { Agent: v.agent }),
|
|
125
|
+
ContentType: v.contentType,
|
|
126
|
+
StatusCode: v.statusCode,
|
|
127
|
+
RawResponse: v.rawResponse,
|
|
128
|
+
};
|
|
129
|
+
});
|
|
114
130
|
}
|
|
@@ -6,109 +6,122 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export type GetCallRequest = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The call id to retrieve call history for.
|
|
11
|
+
*/
|
|
12
|
+
callId: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export type GetCallResponse = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Successfully retrieved an agent.
|
|
18
|
+
*/
|
|
19
|
+
callDetail?: components.CallDetail | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* HTTP response content type for this operation
|
|
22
|
+
*/
|
|
23
|
+
contentType: string;
|
|
24
|
+
/**
|
|
25
|
+
* HTTP response status code for this operation
|
|
26
|
+
*/
|
|
27
|
+
statusCode: number;
|
|
28
|
+
/**
|
|
29
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
30
|
+
*/
|
|
31
|
+
rawResponse: Response;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/** @internal */
|
|
35
35
|
export namespace GetCallRequest$ {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
export type Inbound = {
|
|
37
|
+
call_id: string;
|
|
38
|
+
};
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
40
|
+
export const inboundSchema: z.ZodType<GetCallRequest, z.ZodTypeDef, Inbound> =
|
|
41
|
+
z
|
|
42
|
+
.object({
|
|
43
|
+
call_id: z.string(),
|
|
44
|
+
})
|
|
45
|
+
.transform((v) => {
|
|
46
|
+
return {
|
|
47
|
+
callId: v.call_id,
|
|
48
|
+
};
|
|
49
|
+
});
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
export type Outbound = {
|
|
52
|
+
call_id: string;
|
|
53
|
+
};
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
export const outboundSchema: z.ZodType<
|
|
56
|
+
Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
GetCallRequest
|
|
59
|
+
> = z
|
|
60
|
+
.object({
|
|
61
|
+
callId: z.string(),
|
|
62
|
+
})
|
|
63
|
+
.transform((v) => {
|
|
64
|
+
return {
|
|
65
|
+
call_id: v.callId,
|
|
66
|
+
};
|
|
67
|
+
});
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
/** @internal */
|
|
66
71
|
export namespace GetCallResponse$ {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
export type Inbound = {
|
|
73
|
+
CallDetail?: components.CallDetail$.Inbound | undefined;
|
|
74
|
+
ContentType: string;
|
|
75
|
+
StatusCode: number;
|
|
76
|
+
RawResponse: Response;
|
|
77
|
+
};
|
|
73
78
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
export const inboundSchema: z.ZodType<
|
|
80
|
+
GetCallResponse,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
Inbound
|
|
83
|
+
> = z
|
|
84
|
+
.object({
|
|
85
|
+
CallDetail: components.CallDetail$.inboundSchema.optional(),
|
|
86
|
+
ContentType: z.string(),
|
|
87
|
+
StatusCode: z.number().int(),
|
|
88
|
+
RawResponse: z.instanceof(Response),
|
|
89
|
+
})
|
|
90
|
+
.transform((v) => {
|
|
91
|
+
return {
|
|
92
|
+
...(v.CallDetail === undefined ? null : { callDetail: v.CallDetail }),
|
|
93
|
+
contentType: v.ContentType,
|
|
94
|
+
statusCode: v.StatusCode,
|
|
95
|
+
rawResponse: v.RawResponse,
|
|
96
|
+
};
|
|
97
|
+
});
|
|
89
98
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
export type Outbound = {
|
|
100
|
+
CallDetail?: components.CallDetail$.Outbound | undefined;
|
|
101
|
+
ContentType: string;
|
|
102
|
+
StatusCode: number;
|
|
103
|
+
RawResponse: never;
|
|
104
|
+
};
|
|
96
105
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
export const outboundSchema: z.ZodType<
|
|
107
|
+
Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
GetCallResponse
|
|
110
|
+
> = z
|
|
111
|
+
.object({
|
|
112
|
+
callDetail: components.CallDetail$.outboundSchema.optional(),
|
|
113
|
+
contentType: z.string(),
|
|
114
|
+
statusCode: z.number().int(),
|
|
115
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
116
|
+
throw new Error("Response cannot be serialized");
|
|
117
|
+
}),
|
|
118
|
+
})
|
|
119
|
+
.transform((v) => {
|
|
120
|
+
return {
|
|
121
|
+
...(v.callDetail === undefined ? null : { CallDetail: v.callDetail }),
|
|
122
|
+
ContentType: v.contentType,
|
|
123
|
+
StatusCode: v.statusCode,
|
|
124
|
+
RawResponse: v.rawResponse,
|
|
125
|
+
};
|
|
126
|
+
});
|
|
114
127
|
}
|
|
@@ -6,109 +6,129 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export type GetPhoneNumberRequest = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Phone number in E.164 format to retreive more information.
|
|
11
|
+
*/
|
|
12
|
+
phoneNumber: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export type GetPhoneNumberResponse = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
/**
|
|
17
|
+
* HTTP response content type for this operation
|
|
18
|
+
*/
|
|
19
|
+
contentType: string;
|
|
20
|
+
/**
|
|
21
|
+
* Successfully retrieved a phone number.
|
|
22
|
+
*/
|
|
23
|
+
phoneNumber?: components.PhoneNumber | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* HTTP response status code for this operation
|
|
26
|
+
*/
|
|
27
|
+
statusCode: number;
|
|
28
|
+
/**
|
|
29
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
30
|
+
*/
|
|
31
|
+
rawResponse: Response;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/** @internal */
|
|
35
35
|
export namespace GetPhoneNumberRequest$ {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
export type Inbound = {
|
|
37
|
+
phone_number: string;
|
|
38
|
+
};
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
export const inboundSchema: z.ZodType<
|
|
41
|
+
GetPhoneNumberRequest,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
Inbound
|
|
44
|
+
> = z
|
|
45
|
+
.object({
|
|
46
|
+
phone_number: z.string(),
|
|
47
|
+
})
|
|
48
|
+
.transform((v) => {
|
|
49
|
+
return {
|
|
50
|
+
phoneNumber: v.phone_number,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
export type Outbound = {
|
|
55
|
+
phone_number: string;
|
|
56
|
+
};
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
export const outboundSchema: z.ZodType<
|
|
59
|
+
Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
GetPhoneNumberRequest
|
|
62
|
+
> = z
|
|
63
|
+
.object({
|
|
64
|
+
phoneNumber: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.transform((v) => {
|
|
67
|
+
return {
|
|
68
|
+
phone_number: v.phoneNumber,
|
|
69
|
+
};
|
|
70
|
+
});
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
/** @internal */
|
|
66
74
|
export namespace GetPhoneNumberResponse$ {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
export type Inbound = {
|
|
76
|
+
ContentType: string;
|
|
77
|
+
PhoneNumber?: components.PhoneNumber$.Inbound | undefined;
|
|
78
|
+
StatusCode: number;
|
|
79
|
+
RawResponse: Response;
|
|
80
|
+
};
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
export const inboundSchema: z.ZodType<
|
|
83
|
+
GetPhoneNumberResponse,
|
|
84
|
+
z.ZodTypeDef,
|
|
85
|
+
Inbound
|
|
86
|
+
> = z
|
|
87
|
+
.object({
|
|
88
|
+
ContentType: z.string(),
|
|
89
|
+
PhoneNumber: components.PhoneNumber$.inboundSchema.optional(),
|
|
90
|
+
StatusCode: z.number().int(),
|
|
91
|
+
RawResponse: z.instanceof(Response),
|
|
92
|
+
})
|
|
93
|
+
.transform((v) => {
|
|
94
|
+
return {
|
|
95
|
+
contentType: v.ContentType,
|
|
96
|
+
...(v.PhoneNumber === undefined
|
|
97
|
+
? null
|
|
98
|
+
: { phoneNumber: v.PhoneNumber }),
|
|
99
|
+
statusCode: v.StatusCode,
|
|
100
|
+
rawResponse: v.RawResponse,
|
|
101
|
+
};
|
|
102
|
+
});
|
|
89
103
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
export type Outbound = {
|
|
105
|
+
ContentType: string;
|
|
106
|
+
PhoneNumber?: components.PhoneNumber$.Outbound | undefined;
|
|
107
|
+
StatusCode: number;
|
|
108
|
+
RawResponse: never;
|
|
109
|
+
};
|
|
96
110
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
export const outboundSchema: z.ZodType<
|
|
112
|
+
Outbound,
|
|
113
|
+
z.ZodTypeDef,
|
|
114
|
+
GetPhoneNumberResponse
|
|
115
|
+
> = z
|
|
116
|
+
.object({
|
|
117
|
+
contentType: z.string(),
|
|
118
|
+
phoneNumber: components.PhoneNumber$.outboundSchema.optional(),
|
|
119
|
+
statusCode: z.number().int(),
|
|
120
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
121
|
+
throw new Error("Response cannot be serialized");
|
|
122
|
+
}),
|
|
123
|
+
})
|
|
124
|
+
.transform((v) => {
|
|
125
|
+
return {
|
|
126
|
+
ContentType: v.contentType,
|
|
127
|
+
...(v.phoneNumber === undefined
|
|
128
|
+
? null
|
|
129
|
+
: { PhoneNumber: v.phoneNumber }),
|
|
130
|
+
StatusCode: v.statusCode,
|
|
131
|
+
RawResponse: v.rawResponse,
|
|
132
|
+
};
|
|
133
|
+
});
|
|
114
134
|
}
|