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,119 +6,139 @@ import * as components from "../../models/components";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
|
|
8
8
|
export type CreatePhoneNumberRequestBody = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Unique agent id to associate with this phone number. Can be updated.
|
|
11
|
+
*/
|
|
12
|
+
agentId: string;
|
|
13
|
+
/**
|
|
14
|
+
* The desired area code of the number. Must be valid US area code, which is a 3 digit integer.
|
|
15
|
+
*/
|
|
16
|
+
areaCode?: number | undefined;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export type CreatePhoneNumberResponse = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
/**
|
|
21
|
+
* HTTP response content type for this operation
|
|
22
|
+
*/
|
|
23
|
+
contentType: string;
|
|
24
|
+
/**
|
|
25
|
+
* Successfully created a new phone number.
|
|
26
|
+
*/
|
|
27
|
+
phoneNumber?: components.PhoneNumber | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* HTTP response status code for this operation
|
|
30
|
+
*/
|
|
31
|
+
statusCode: number;
|
|
32
|
+
/**
|
|
33
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
34
|
+
*/
|
|
35
|
+
rawResponse: Response;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/** @internal */
|
|
39
39
|
export namespace CreatePhoneNumberRequestBody$ {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
export type Inbound = {
|
|
41
|
+
agent_id: string;
|
|
42
|
+
area_code?: number | undefined;
|
|
43
|
+
};
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
export const inboundSchema: z.ZodType<
|
|
46
|
+
CreatePhoneNumberRequestBody,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
Inbound
|
|
49
|
+
> = z
|
|
50
|
+
.object({
|
|
51
|
+
agent_id: z.string(),
|
|
52
|
+
area_code: z.number().int().optional(),
|
|
53
|
+
})
|
|
54
|
+
.transform((v) => {
|
|
55
|
+
return {
|
|
56
|
+
agentId: v.agent_id,
|
|
57
|
+
...(v.area_code === undefined ? null : { areaCode: v.area_code }),
|
|
58
|
+
};
|
|
59
|
+
});
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
export type Outbound = {
|
|
62
|
+
agent_id: string;
|
|
63
|
+
area_code?: number | undefined;
|
|
64
|
+
};
|
|
61
65
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
export const outboundSchema: z.ZodType<
|
|
67
|
+
Outbound,
|
|
68
|
+
z.ZodTypeDef,
|
|
69
|
+
CreatePhoneNumberRequestBody
|
|
70
|
+
> = z
|
|
71
|
+
.object({
|
|
72
|
+
agentId: z.string(),
|
|
73
|
+
areaCode: z.number().int().optional(),
|
|
74
|
+
})
|
|
75
|
+
.transform((v) => {
|
|
76
|
+
return {
|
|
77
|
+
agent_id: v.agentId,
|
|
78
|
+
...(v.areaCode === undefined ? null : { area_code: v.areaCode }),
|
|
79
|
+
};
|
|
80
|
+
});
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
/** @internal */
|
|
76
84
|
export namespace CreatePhoneNumberResponse$ {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
export type Inbound = {
|
|
86
|
+
ContentType: string;
|
|
87
|
+
PhoneNumber?: components.PhoneNumber$.Inbound | undefined;
|
|
88
|
+
StatusCode: number;
|
|
89
|
+
RawResponse: Response;
|
|
90
|
+
};
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
export const inboundSchema: z.ZodType<
|
|
93
|
+
CreatePhoneNumberResponse,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
Inbound
|
|
96
|
+
> = z
|
|
97
|
+
.object({
|
|
98
|
+
ContentType: z.string(),
|
|
99
|
+
PhoneNumber: components.PhoneNumber$.inboundSchema.optional(),
|
|
100
|
+
StatusCode: z.number().int(),
|
|
101
|
+
RawResponse: z.instanceof(Response),
|
|
102
|
+
})
|
|
103
|
+
.transform((v) => {
|
|
104
|
+
return {
|
|
105
|
+
contentType: v.ContentType,
|
|
106
|
+
...(v.PhoneNumber === undefined
|
|
107
|
+
? null
|
|
108
|
+
: { phoneNumber: v.PhoneNumber }),
|
|
109
|
+
statusCode: v.StatusCode,
|
|
110
|
+
rawResponse: v.RawResponse,
|
|
111
|
+
};
|
|
112
|
+
});
|
|
99
113
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
export type Outbound = {
|
|
115
|
+
ContentType: string;
|
|
116
|
+
PhoneNumber?: components.PhoneNumber$.Outbound | undefined;
|
|
117
|
+
StatusCode: number;
|
|
118
|
+
RawResponse: never;
|
|
119
|
+
};
|
|
106
120
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
export const outboundSchema: z.ZodType<
|
|
122
|
+
Outbound,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
CreatePhoneNumberResponse
|
|
125
|
+
> = z
|
|
126
|
+
.object({
|
|
127
|
+
contentType: z.string(),
|
|
128
|
+
phoneNumber: components.PhoneNumber$.outboundSchema.optional(),
|
|
129
|
+
statusCode: z.number().int(),
|
|
130
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
131
|
+
throw new Error("Response cannot be serialized");
|
|
132
|
+
}),
|
|
133
|
+
})
|
|
134
|
+
.transform((v) => {
|
|
135
|
+
return {
|
|
136
|
+
ContentType: v.contentType,
|
|
137
|
+
...(v.phoneNumber === undefined
|
|
138
|
+
? null
|
|
139
|
+
: { PhoneNumber: v.phoneNumber }),
|
|
140
|
+
StatusCode: v.statusCode,
|
|
141
|
+
RawResponse: v.rawResponse,
|
|
142
|
+
};
|
|
143
|
+
});
|
|
124
144
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as components from "../../models/components";
|
|
2
2
|
|
|
3
3
|
export type CreateWebCallRequestBody = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
4
|
+
/**
|
|
5
|
+
* Unique agent id to associate with this phone number. Can be updated.
|
|
6
|
+
*/
|
|
7
|
+
agentId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Supply values to your agent prompt parameters. If the given key value cannot match any param in prompt, it would have have any effect.
|
|
10
|
+
*/
|
|
11
|
+
agentPromptParams?: Array<components.AgentPromptParams> | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Sample rate for the call.
|
|
14
|
+
*/
|
|
15
|
+
sampleRate?: number | undefined;
|
|
16
|
+
};
|
|
@@ -5,99 +5,115 @@
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export type DeleteAgentRequest = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Unique id of the agent to be deleted.
|
|
10
|
+
*/
|
|
11
|
+
agentId: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export type DeleteAgentResponse = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
/**
|
|
16
|
+
* HTTP response content type for this operation
|
|
17
|
+
*/
|
|
18
|
+
contentType: string;
|
|
19
|
+
/**
|
|
20
|
+
* HTTP response status code for this operation
|
|
21
|
+
*/
|
|
22
|
+
statusCode: number;
|
|
23
|
+
/**
|
|
24
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
25
|
+
*/
|
|
26
|
+
rawResponse: Response;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/** @internal */
|
|
30
30
|
export namespace DeleteAgentRequest$ {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
export type Inbound = {
|
|
32
|
+
agent_id: string;
|
|
33
|
+
};
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
export const inboundSchema: z.ZodType<
|
|
36
|
+
DeleteAgentRequest,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
Inbound
|
|
39
|
+
> = z
|
|
40
|
+
.object({
|
|
41
|
+
agent_id: z.string(),
|
|
42
|
+
})
|
|
43
|
+
.transform((v) => {
|
|
44
|
+
return {
|
|
45
|
+
agentId: v.agent_id,
|
|
46
|
+
};
|
|
47
|
+
});
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
export type Outbound = {
|
|
50
|
+
agent_id: string;
|
|
51
|
+
};
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
export const outboundSchema: z.ZodType<
|
|
54
|
+
Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
DeleteAgentRequest
|
|
57
|
+
> = z
|
|
58
|
+
.object({
|
|
59
|
+
agentId: z.string(),
|
|
60
|
+
})
|
|
61
|
+
.transform((v) => {
|
|
62
|
+
return {
|
|
63
|
+
agent_id: v.agentId,
|
|
64
|
+
};
|
|
65
|
+
});
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
/** @internal */
|
|
61
69
|
export namespace DeleteAgentResponse$ {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
export type Inbound = {
|
|
71
|
+
ContentType: string;
|
|
72
|
+
StatusCode: number;
|
|
73
|
+
RawResponse: Response;
|
|
74
|
+
};
|
|
67
75
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
export const inboundSchema: z.ZodType<
|
|
77
|
+
DeleteAgentResponse,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
Inbound
|
|
80
|
+
> = z
|
|
81
|
+
.object({
|
|
82
|
+
ContentType: z.string(),
|
|
83
|
+
StatusCode: z.number().int(),
|
|
84
|
+
RawResponse: z.instanceof(Response),
|
|
85
|
+
})
|
|
86
|
+
.transform((v) => {
|
|
87
|
+
return {
|
|
88
|
+
contentType: v.ContentType,
|
|
89
|
+
statusCode: v.StatusCode,
|
|
90
|
+
rawResponse: v.RawResponse,
|
|
91
|
+
};
|
|
92
|
+
});
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
export type Outbound = {
|
|
95
|
+
ContentType: string;
|
|
96
|
+
StatusCode: number;
|
|
97
|
+
RawResponse: never;
|
|
98
|
+
};
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
export const outboundSchema: z.ZodType<
|
|
101
|
+
Outbound,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
DeleteAgentResponse
|
|
104
|
+
> = z
|
|
105
|
+
.object({
|
|
106
|
+
contentType: z.string(),
|
|
107
|
+
statusCode: z.number().int(),
|
|
108
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
109
|
+
throw new Error("Response cannot be serialized");
|
|
110
|
+
}),
|
|
111
|
+
})
|
|
112
|
+
.transform((v) => {
|
|
113
|
+
return {
|
|
114
|
+
ContentType: v.contentType,
|
|
115
|
+
StatusCode: v.statusCode,
|
|
116
|
+
RawResponse: v.rawResponse,
|
|
117
|
+
};
|
|
118
|
+
});
|
|
103
119
|
}
|
|
@@ -5,99 +5,115 @@
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
|
|
7
7
|
export type DeletePhoneNumberRequest = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Phone number to delete in E.164 format.
|
|
10
|
+
*/
|
|
11
|
+
phoneNumber: string;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export type DeletePhoneNumberResponse = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
/**
|
|
16
|
+
* HTTP response content type for this operation
|
|
17
|
+
*/
|
|
18
|
+
contentType: string;
|
|
19
|
+
/**
|
|
20
|
+
* HTTP response status code for this operation
|
|
21
|
+
*/
|
|
22
|
+
statusCode: number;
|
|
23
|
+
/**
|
|
24
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
25
|
+
*/
|
|
26
|
+
rawResponse: Response;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/** @internal */
|
|
30
30
|
export namespace DeletePhoneNumberRequest$ {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
export type Inbound = {
|
|
32
|
+
phone_number: string;
|
|
33
|
+
};
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
export const inboundSchema: z.ZodType<
|
|
36
|
+
DeletePhoneNumberRequest,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
Inbound
|
|
39
|
+
> = z
|
|
40
|
+
.object({
|
|
41
|
+
phone_number: z.string(),
|
|
42
|
+
})
|
|
43
|
+
.transform((v) => {
|
|
44
|
+
return {
|
|
45
|
+
phoneNumber: v.phone_number,
|
|
46
|
+
};
|
|
47
|
+
});
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
export type Outbound = {
|
|
50
|
+
phone_number: string;
|
|
51
|
+
};
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
export const outboundSchema: z.ZodType<
|
|
54
|
+
Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
DeletePhoneNumberRequest
|
|
57
|
+
> = z
|
|
58
|
+
.object({
|
|
59
|
+
phoneNumber: z.string(),
|
|
60
|
+
})
|
|
61
|
+
.transform((v) => {
|
|
62
|
+
return {
|
|
63
|
+
phone_number: v.phoneNumber,
|
|
64
|
+
};
|
|
65
|
+
});
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
/** @internal */
|
|
61
69
|
export namespace DeletePhoneNumberResponse$ {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
export type Inbound = {
|
|
71
|
+
ContentType: string;
|
|
72
|
+
StatusCode: number;
|
|
73
|
+
RawResponse: Response;
|
|
74
|
+
};
|
|
67
75
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
export const inboundSchema: z.ZodType<
|
|
77
|
+
DeletePhoneNumberResponse,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
Inbound
|
|
80
|
+
> = z
|
|
81
|
+
.object({
|
|
82
|
+
ContentType: z.string(),
|
|
83
|
+
StatusCode: z.number().int(),
|
|
84
|
+
RawResponse: z.instanceof(Response),
|
|
85
|
+
})
|
|
86
|
+
.transform((v) => {
|
|
87
|
+
return {
|
|
88
|
+
contentType: v.ContentType,
|
|
89
|
+
statusCode: v.StatusCode,
|
|
90
|
+
rawResponse: v.RawResponse,
|
|
91
|
+
};
|
|
92
|
+
});
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
export type Outbound = {
|
|
95
|
+
ContentType: string;
|
|
96
|
+
StatusCode: number;
|
|
97
|
+
RawResponse: never;
|
|
98
|
+
};
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
export const outboundSchema: z.ZodType<
|
|
101
|
+
Outbound,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
DeletePhoneNumberResponse
|
|
104
|
+
> = z
|
|
105
|
+
.object({
|
|
106
|
+
contentType: z.string(),
|
|
107
|
+
statusCode: z.number().int(),
|
|
108
|
+
rawResponse: z.instanceof(Response).transform(() => {
|
|
109
|
+
throw new Error("Response cannot be serialized");
|
|
110
|
+
}),
|
|
111
|
+
})
|
|
112
|
+
.transform((v) => {
|
|
113
|
+
return {
|
|
114
|
+
ContentType: v.contentType,
|
|
115
|
+
StatusCode: v.statusCode,
|
|
116
|
+
RawResponse: v.rawResponse,
|
|
117
|
+
};
|
|
118
|
+
});
|
|
103
119
|
}
|