telnyx 2.0.0-beta.1 → 2.0.0-beta.3
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/CHANGELOG.md +12 -0
- package/README.md +8 -3
- package/VERSION +1 -1
- package/dist/resources/AvailablePhoneNumbersBlocks.js +5 -0
- package/dist/resources/CallControlApplications.js +1 -1
- package/dist/resources/NumberOrders.js +24 -1
- package/dist/resources/PhoneNumbers.js +62 -13
- package/dist/resources/PhoneNumbersInboundChannels.js +4 -17
- package/dist/resources/{PhoneNumberRegulatoryRequirements.js → PhoneNumbersRegulatoryRequirements.js} +1 -1
- package/dist/resources/PhoneNumbersSlim.js +5 -0
- package/dist/resources/Texml.js +23 -0
- package/dist/resources/TexmlApplications.js +31 -1
- package/dist/telnyx.js +8 -4
- package/dist/types/AvailablePhoneNumbersBlocksResource.d.ts +20 -0
- package/dist/types/Errors.d.ts +1 -1
- package/dist/types/NumberOrdersResource.d.ts +78 -0
- package/dist/types/PhoneNumbersInboundChannelsResource.d.ts +33 -0
- package/dist/types/PhoneNumbersMessagingResource.d.ts +18 -0
- package/dist/types/PhoneNumbersRegulatoryRequirementsResource.d.ts +20 -0
- package/dist/types/PhoneNumbersResource.d.ts +195 -0
- package/dist/types/PhoneNumbersSlimResource.d.ts +18 -0
- package/dist/types/PhoneNumbersVoiceResource.d.ts +18 -0
- package/dist/types/RegulatoryRequirementsResource.d.ts +18 -0
- package/dist/types/TexmlApplicationsResource.d.ts +30 -2
- package/dist/types/TexmlResource.d.ts +48 -0
- package/dist/types/index.d.ts +20 -0
- package/package.json +6 -4
- package/dist/resources/PhoneNumberSearch.js +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## v2
|
|
4
4
|
|
|
5
|
+
### v2.0.0-beta.3
|
|
6
|
+
|
|
7
|
+
- Add `Errors` type declaration
|
|
8
|
+
- Add `VERSIONS.md` information
|
|
9
|
+
- Update package dependencies for runtime usage
|
|
10
|
+
|
|
11
|
+
### v2.0.0-beta.2
|
|
12
|
+
|
|
13
|
+
- Add missing `Texml` resource methods
|
|
14
|
+
- Add missing `PhoneNumbers`, `NumberOrders` and `RegulatoryRequirements` resource methods
|
|
15
|
+
- Update types on stale resources methods
|
|
16
|
+
|
|
5
17
|
### v2.0.0-beta.1
|
|
6
18
|
|
|
7
19
|
- Fix `Queues` resource nested methods
|
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@ applications written in server-side JavaScript.
|
|
|
14
14
|
|
|
15
15
|
See the [Node API docs](https://developers.telnyx.com/docs/api/v2/overview?lang=node#getting-started).
|
|
16
16
|
|
|
17
|
+
## Versions
|
|
18
|
+
|
|
19
|
+
`telnyx-node` uses a slightly modified version of [Semantic Versioning](https://semver.org) for all changes. [See this document](VERSIONS.md) for details.
|
|
20
|
+
|
|
17
21
|
## Installation
|
|
18
22
|
|
|
19
23
|
Install the package with:
|
|
@@ -43,9 +47,10 @@ callback:
|
|
|
43
47
|
|
|
44
48
|
```typescript
|
|
45
49
|
// Create a new messaging profile and then send a message using that profile:
|
|
46
|
-
telnyx.messagingProfiles
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
telnyx.messagingProfiles
|
|
51
|
+
.create({
|
|
52
|
+
name: 'Summer Campaign',
|
|
53
|
+
})
|
|
49
54
|
.then((messagingProfile) => {
|
|
50
55
|
return telnyx.messagingPhoneNumbers.update('+18005554000', {
|
|
51
56
|
messaging_profile_id: messagingProfile.data.id,
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.0-beta.
|
|
1
|
+
2.0.0-beta.3
|
|
@@ -21,7 +21,7 @@ function transformResponseData(response, telnyx) {
|
|
|
21
21
|
}
|
|
22
22
|
export const CallControlApplications = TelnyxResource.extend({
|
|
23
23
|
path: 'call_control_applications',
|
|
24
|
-
includeBasic: ['list', 'update'],
|
|
24
|
+
includeBasic: ['list', 'update', 'del'],
|
|
25
25
|
create: telnyxMethod({
|
|
26
26
|
method: 'POST',
|
|
27
27
|
transformResponseData: transformResponseData,
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import TelnyxResource from '../TelnyxResource';
|
|
2
|
+
import * as utils from '../utils';
|
|
3
|
+
const telnyxMethod = TelnyxResource.method;
|
|
4
|
+
function transformResponseData(response, telnyx) {
|
|
5
|
+
return utils.addResourceToResponseData(response, telnyx, 'numberOrders', {
|
|
6
|
+
update: telnyxMethod({
|
|
7
|
+
method: 'PATCH',
|
|
8
|
+
path: '/{number_order_id}',
|
|
9
|
+
urlParams: ['number_order_id'],
|
|
10
|
+
paramsValues: [response.data.id],
|
|
11
|
+
paramsNames: ['number_order_id'],
|
|
12
|
+
}),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
2
15
|
export const NumberOrders = TelnyxResource.extend({
|
|
3
16
|
path: 'number_orders',
|
|
4
|
-
includeBasic: ['list', '
|
|
17
|
+
includeBasic: ['list', 'update'],
|
|
18
|
+
create: telnyxMethod({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
transformResponseData: transformResponseData,
|
|
21
|
+
}),
|
|
22
|
+
retrieve: telnyxMethod({
|
|
23
|
+
method: 'GET',
|
|
24
|
+
path: '/{number_order_id}',
|
|
25
|
+
urlParams: ['number_order_id'],
|
|
26
|
+
transformResponseData: transformResponseData,
|
|
27
|
+
}),
|
|
5
28
|
});
|
|
@@ -1,41 +1,90 @@
|
|
|
1
1
|
import TelnyxResource from '../TelnyxResource';
|
|
2
|
-
|
|
2
|
+
import * as utils from '../utils';
|
|
3
3
|
import { PhoneNumbersMessaging } from './PhoneNumbersMessaging';
|
|
4
4
|
import { PhoneNumbersVoice } from './PhoneNumbersVoice';
|
|
5
5
|
import { PhoneNumbersInboundChannels } from './PhoneNumbersInboundChannels';
|
|
6
|
+
const telnyxMethod = TelnyxResource.method;
|
|
7
|
+
function transformResponseData(response, telnyx) {
|
|
8
|
+
return utils.addResourceToResponseData(response, telnyx, 'phoneNumbers', {
|
|
9
|
+
del: telnyxMethod({
|
|
10
|
+
method: 'DELETE',
|
|
11
|
+
path: '/{intId}',
|
|
12
|
+
urlParams: ['intId'],
|
|
13
|
+
paramsValues: [response.data.id],
|
|
14
|
+
paramsNames: ['intId'],
|
|
15
|
+
}),
|
|
16
|
+
update: telnyxMethod({
|
|
17
|
+
method: 'PATCH',
|
|
18
|
+
path: '/{intId}',
|
|
19
|
+
urlParams: ['intId'],
|
|
20
|
+
paramsValues: [response.data.id],
|
|
21
|
+
paramsNames: ['intId'],
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
6
25
|
export const PhoneNumbers = TelnyxResource.extend({
|
|
7
26
|
path: 'phone_numbers',
|
|
8
|
-
includeBasic: ['list', '
|
|
27
|
+
includeBasic: ['list', 'update', 'del'],
|
|
9
28
|
nestedResources: {
|
|
10
29
|
Messaging: PhoneNumbersMessaging,
|
|
11
30
|
Voice: PhoneNumbersVoice,
|
|
12
31
|
Inbound: PhoneNumbersInboundChannels,
|
|
13
32
|
},
|
|
14
|
-
|
|
33
|
+
retrieve: telnyxMethod({
|
|
15
34
|
method: 'GET',
|
|
16
|
-
path: '/{id}
|
|
35
|
+
path: '/{id}',
|
|
17
36
|
urlParams: ['id'],
|
|
37
|
+
transformResponseData: transformResponseData,
|
|
38
|
+
}),
|
|
39
|
+
retrieveVoiceSettings: telnyxMethod({
|
|
40
|
+
method: 'GET',
|
|
41
|
+
path: '/{intId}/voice',
|
|
42
|
+
urlParams: ['intId'],
|
|
43
|
+
paramsNames: ['intId'],
|
|
18
44
|
methodType: 'retrieve',
|
|
19
45
|
}),
|
|
20
46
|
updateVoiceSettings: telnyxMethod({
|
|
21
47
|
method: 'PATCH',
|
|
22
|
-
path: '/{
|
|
23
|
-
urlParams: ['
|
|
48
|
+
path: '/{intId}/voice',
|
|
49
|
+
urlParams: ['intId'],
|
|
50
|
+
paramsNames: ['intId'],
|
|
24
51
|
}),
|
|
25
52
|
retrieveMessagingSettings: telnyxMethod({
|
|
26
53
|
method: 'GET',
|
|
27
|
-
path: '/{
|
|
28
|
-
urlParams: ['
|
|
54
|
+
path: '/{intId}/messaging',
|
|
55
|
+
urlParams: ['intId'],
|
|
56
|
+
paramsNames: ['intId'],
|
|
29
57
|
methodType: 'retrieve',
|
|
30
58
|
}),
|
|
31
59
|
updateMessagingSettings: telnyxMethod({
|
|
32
60
|
method: 'PATCH',
|
|
33
|
-
path: '/{
|
|
34
|
-
urlParams: ['
|
|
61
|
+
path: '/{intId}/messaging',
|
|
62
|
+
urlParams: ['intId'],
|
|
63
|
+
paramsNames: ['intId'],
|
|
35
64
|
}),
|
|
36
|
-
|
|
65
|
+
enableEmergencySettings: telnyxMethod({
|
|
37
66
|
method: 'POST',
|
|
38
|
-
path: '/{
|
|
39
|
-
urlParams: ['
|
|
67
|
+
path: '/{intId}/actions/enable_emergency',
|
|
68
|
+
urlParams: ['intId'],
|
|
69
|
+
paramsNames: ['intId'],
|
|
70
|
+
}),
|
|
71
|
+
retrieveVoicemail: telnyxMethod({
|
|
72
|
+
method: 'GET',
|
|
73
|
+
path: '/{phone_number_id}/voicemail',
|
|
74
|
+
urlParams: ['phone_number_id'],
|
|
75
|
+
paramsNames: ['phone_number_id'],
|
|
76
|
+
methodType: 'retrieve',
|
|
77
|
+
}),
|
|
78
|
+
createVoicemail: telnyxMethod({
|
|
79
|
+
method: 'POST',
|
|
80
|
+
path: '/{phone_number_id}/voicemail',
|
|
81
|
+
urlParams: ['phone_number_id'],
|
|
82
|
+
paramsNames: ['phone_number_id'],
|
|
83
|
+
}),
|
|
84
|
+
updateVoicemail: telnyxMethod({
|
|
85
|
+
method: 'PATCH',
|
|
86
|
+
path: '/{phone_number_id}/voicemail',
|
|
87
|
+
urlParams: ['phone_number_id'],
|
|
88
|
+
paramsNames: ['phone_number_id'],
|
|
40
89
|
}),
|
|
41
90
|
});
|
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import TelnyxResource from '../TelnyxResource';
|
|
2
|
-
import * as utils from '../utils';
|
|
3
2
|
const telnyxMethod = TelnyxResource.method;
|
|
4
|
-
function transformResponseData(response, telnyx) {
|
|
5
|
-
return utils.addResourceToResponseData(response, telnyx, 'phoneNumbersInboundChannels', {
|
|
6
|
-
update: telnyxMethod({
|
|
7
|
-
method: 'PATCH',
|
|
8
|
-
path: '',
|
|
9
|
-
urlParams: ['channels'],
|
|
10
|
-
paramsValues: [response.data.id],
|
|
11
|
-
paramsNames: ['channels'],
|
|
12
|
-
}),
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
3
|
export const PhoneNumbersInboundChannels = TelnyxResource.extend({
|
|
16
4
|
path: 'phone_numbers/inbound_channels',
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
transformResponseData: transformResponseData,
|
|
5
|
+
includeBasic: ['list'],
|
|
6
|
+
update: telnyxMethod({
|
|
7
|
+
method: 'PATCH',
|
|
8
|
+
methodType: 'update',
|
|
22
9
|
}),
|
|
23
10
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import TelnyxResource from '../TelnyxResource';
|
|
2
|
-
export const
|
|
2
|
+
export const PhoneNumbersRegulatoryRequirements = TelnyxResource.extend({
|
|
3
3
|
path: 'phone_numbers_regulatory_requirements',
|
|
4
4
|
includeBasic: ['list'],
|
|
5
5
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import TelnyxResource from '../TelnyxResource';
|
|
2
|
+
const telnyxMethod = TelnyxResource.method;
|
|
3
|
+
export const Texml = TelnyxResource.extend({
|
|
4
|
+
path: 'texml',
|
|
5
|
+
createSecret: telnyxMethod({
|
|
6
|
+
method: 'POST',
|
|
7
|
+
path: '/secrets',
|
|
8
|
+
methodType: 'create',
|
|
9
|
+
}),
|
|
10
|
+
createCall: telnyxMethod({
|
|
11
|
+
method: 'POST',
|
|
12
|
+
path: '/calls/{application_id}',
|
|
13
|
+
urlParams: ['application_id'],
|
|
14
|
+
paramsNames: ['application_id'],
|
|
15
|
+
methodType: 'create',
|
|
16
|
+
}),
|
|
17
|
+
updateCall: telnyxMethod({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
path: '/calls/{call_sid}/update',
|
|
20
|
+
urlParams: ['call_sid'],
|
|
21
|
+
paramsNames: ['call_sid'],
|
|
22
|
+
}),
|
|
23
|
+
});
|
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import TelnyxResource from '../TelnyxResource';
|
|
2
|
+
import * as utils from '../utils';
|
|
3
|
+
const telnyxMethod = TelnyxResource.method;
|
|
4
|
+
function transformResponseData(response, telnyx) {
|
|
5
|
+
return utils.addResourceToResponseData(response, telnyx, 'texmlApplications', {
|
|
6
|
+
del: telnyxMethod({
|
|
7
|
+
method: 'DELETE',
|
|
8
|
+
path: '/{texmlApplicationId}',
|
|
9
|
+
urlParams: ['texmlApplicationId'],
|
|
10
|
+
paramsValues: [response.data.id],
|
|
11
|
+
paramsNames: ['texmlApplicationId'],
|
|
12
|
+
}),
|
|
13
|
+
update: telnyxMethod({
|
|
14
|
+
method: 'PATCH',
|
|
15
|
+
path: '/{texmlApplicationId}',
|
|
16
|
+
urlParams: ['texmlApplicationId'],
|
|
17
|
+
paramsValues: [response.data.id],
|
|
18
|
+
paramsNames: ['texmlApplicationId'],
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
2
22
|
export const TexmlApplications = TelnyxResource.extend({
|
|
3
23
|
path: 'texml_applications',
|
|
4
|
-
includeBasic: ['list', '
|
|
24
|
+
includeBasic: ['list', 'update', 'del'],
|
|
25
|
+
create: telnyxMethod({
|
|
26
|
+
method: 'POST',
|
|
27
|
+
transformResponseData: transformResponseData,
|
|
28
|
+
}),
|
|
29
|
+
retrieve: telnyxMethod({
|
|
30
|
+
method: 'GET',
|
|
31
|
+
path: '/{id}',
|
|
32
|
+
urlParams: ['id'],
|
|
33
|
+
transformResponseData: transformResponseData,
|
|
34
|
+
}),
|
|
5
35
|
});
|
package/dist/telnyx.js
CHANGED
|
@@ -88,11 +88,11 @@ import { PhoneNumberBlockOrders } from './resources/PhoneNumberBlockOrders';
|
|
|
88
88
|
import { PhoneNumberBlocksBackgroundJobs } from './resources/PhoneNumberBlocksBackgroundJobs';
|
|
89
89
|
import { PhoneNumberCampaigns } from './resources/PhoneNumberCampaigns';
|
|
90
90
|
import { PhoneNumberOrderDocuments } from './resources/PhoneNumberOrderDocuments';
|
|
91
|
-
import { PhoneNumberRegulatoryRequirements } from './resources/PhoneNumberRegulatoryRequirements';
|
|
92
91
|
import { PhoneNumbers } from './resources/PhoneNumbers';
|
|
93
|
-
import { PhoneNumberSearch } from './resources/PhoneNumberSearch';
|
|
94
92
|
import { PhoneNumbersInboundChannels } from './resources/PhoneNumbersInboundChannels';
|
|
95
93
|
import { PhoneNumbersMessaging } from './resources/PhoneNumbersMessaging';
|
|
94
|
+
import { PhoneNumbersRegulatoryRequirements } from './resources/PhoneNumbersRegulatoryRequirements';
|
|
95
|
+
import { PhoneNumbersSlim } from './resources/PhoneNumbersSlim';
|
|
96
96
|
import { PhoneNumbersVoice } from './resources/PhoneNumbersVoice';
|
|
97
97
|
import { PortabilityChecks } from './resources/PortabilityChecks';
|
|
98
98
|
import { PortingEvents } from './resources/PortingEvents';
|
|
@@ -129,6 +129,7 @@ import { SimCardOrders } from './resources/SimCardOrders';
|
|
|
129
129
|
import { SimCards } from './resources/SimCards';
|
|
130
130
|
import { StorageBuckets } from './resources/StorageBuckets';
|
|
131
131
|
import { TelephonyCredentials } from './resources/TelephonyCredentials';
|
|
132
|
+
import { Texml } from './resources/Texml';
|
|
132
133
|
import { TexmlApplications } from './resources/TexmlApplications';
|
|
133
134
|
import { Verifications } from './resources/Verifications';
|
|
134
135
|
import { VerifiedNumbers } from './resources/VerifiedNumbers';
|
|
@@ -142,6 +143,7 @@ import { WirelessDetailRecordReports } from './resources/WirelessDetailRecordRep
|
|
|
142
143
|
import TelnyxResource from './TelnyxResource';
|
|
143
144
|
import * as _Error from './Error';
|
|
144
145
|
import Webhooks from './Webhooks';
|
|
146
|
+
import { AvailablePhoneNumbersBlocks } from './resources/AvailablePhoneNumbersBlocks';
|
|
145
147
|
export function createTelnyx() {
|
|
146
148
|
Telnyx.DEFAULT_HOST = process.env.TELNYX_API_BASE || 'api.telnyx.com';
|
|
147
149
|
Telnyx.DEFAULT_PORT = '443';
|
|
@@ -181,6 +183,7 @@ export function createTelnyx() {
|
|
|
181
183
|
AiSummarize,
|
|
182
184
|
AuthenticationProviders,
|
|
183
185
|
AvailablePhoneNumbers,
|
|
186
|
+
AvailablePhoneNumbersBlocks,
|
|
184
187
|
Balance,
|
|
185
188
|
BillingGroups,
|
|
186
189
|
Brands,
|
|
@@ -248,9 +251,9 @@ export function createTelnyx() {
|
|
|
248
251
|
PhoneNumberBlocksBackgroundJobs,
|
|
249
252
|
PhoneNumberCampaigns,
|
|
250
253
|
PhoneNumberOrderDocuments,
|
|
251
|
-
|
|
254
|
+
PhoneNumbersRegulatoryRequirements,
|
|
255
|
+
PhoneNumbersSlim,
|
|
252
256
|
PhoneNumbers,
|
|
253
|
-
PhoneNumberSearch,
|
|
254
257
|
PhoneNumbersInboundChannels,
|
|
255
258
|
PhoneNumbersMessaging,
|
|
256
259
|
PhoneNumbersVoice,
|
|
@@ -290,6 +293,7 @@ export function createTelnyx() {
|
|
|
290
293
|
SimCards,
|
|
291
294
|
StorageBuckets,
|
|
292
295
|
TelephonyCredentials,
|
|
296
|
+
Texml,
|
|
293
297
|
TexmlApplications,
|
|
294
298
|
Verifications,
|
|
295
299
|
VerifiedNumbers,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type AvailablePhoneNumbersBlocksListParams =
|
|
6
|
+
paths['/available_phone_number_blocks']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type AvailablePhoneNumbersBlocksListResponse =
|
|
9
|
+
paths['/available_phone_number_blocks']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
class AvailablePhoneNumbersBlocksResource {
|
|
12
|
+
list(
|
|
13
|
+
params?: AvailablePhoneNumbersBlocksListParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): Promise<
|
|
16
|
+
Telnyx.Response<Telnyx.AvailablePhoneNumbersBlocksListResponse>
|
|
17
|
+
>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/types/Errors.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ declare module 'telnyx' {
|
|
|
42
42
|
| 'TelnyxServiceUnavailableError'
|
|
43
43
|
| 'TelnyxConnectionError'
|
|
44
44
|
| 'TelnyxSignatureVerificationError';
|
|
45
|
-
readonly raw:
|
|
45
|
+
readonly raw: TelnyxRawError;
|
|
46
46
|
readonly headers?: TelnyxRawError['headers'];
|
|
47
47
|
readonly requestId?: string;
|
|
48
48
|
readonly detail?: string | Error;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type NumberOrdersListParams =
|
|
6
|
+
paths['/number_orders']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type NumberOrdersListResponse =
|
|
9
|
+
paths['/number_orders']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
type NumberOrdersCreateParams =
|
|
12
|
+
paths['/number_orders']['post']['requestBody']['content']['application/json'];
|
|
13
|
+
|
|
14
|
+
type NumberOrdersCreateResponse =
|
|
15
|
+
paths['/number_orders']['post']['responses']['200']['content']['application/json'];
|
|
16
|
+
|
|
17
|
+
type NumberOrdersRetrieveId =
|
|
18
|
+
paths['/number_orders/{number_order_id}']['get']['parameters']['path']['number_order_id'];
|
|
19
|
+
|
|
20
|
+
type NumberOrdersRetrieveResponse =
|
|
21
|
+
paths['/number_orders/{number_order_id}']['get']['responses']['200']['content']['application/json'];
|
|
22
|
+
|
|
23
|
+
type NumberOrdersUpdateId =
|
|
24
|
+
paths['/number_orders/{number_order_id}']['patch']['parameters']['path']['number_order_id'];
|
|
25
|
+
|
|
26
|
+
type NumberOrdersUpdateParams =
|
|
27
|
+
paths['/number_orders/{number_order_id}']['patch']['requestBody']['content']['application/json'];
|
|
28
|
+
|
|
29
|
+
type NumberOrdersUpdateResponse =
|
|
30
|
+
paths['/number_orders/{number_order_id}']['patch']['responses']['200']['content']['application/json'];
|
|
31
|
+
|
|
32
|
+
type NumberOrdersNestedMethods = {
|
|
33
|
+
update(
|
|
34
|
+
params: NumberOrdersUpdateParams,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): Promise<Telnyx.Response<Telnyx.NumberOrdersUpdateResponse>>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
class NumberOrdersResource {
|
|
40
|
+
list(
|
|
41
|
+
params?: NumberOrdersListParams,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): Promise<Telnyx.Response<Telnyx.NumberOrdersListResponse>>;
|
|
44
|
+
|
|
45
|
+
create(
|
|
46
|
+
params: NumberOrdersCreateParams,
|
|
47
|
+
options?: RequestOptions,
|
|
48
|
+
): Promise<
|
|
49
|
+
Telnyx.Response<
|
|
50
|
+
Telnyx.NumberOrdersCreateResponse &
|
|
51
|
+
NestedResponseData<
|
|
52
|
+
NumberOrdersCreateResponse['data'],
|
|
53
|
+
NumberOrdersNestedMethods
|
|
54
|
+
>
|
|
55
|
+
>
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
retrieve(
|
|
59
|
+
id: NumberOrdersRetrieveId,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
Telnyx.Response<
|
|
63
|
+
Telnyx.NumberOrdersRetrieveResponse &
|
|
64
|
+
NestedResponseData<
|
|
65
|
+
NumberOrdersRetrieveResponse['data'],
|
|
66
|
+
NumberOrdersNestedMethods
|
|
67
|
+
>
|
|
68
|
+
>
|
|
69
|
+
>;
|
|
70
|
+
|
|
71
|
+
update(
|
|
72
|
+
id: NumberOrdersUpdateId,
|
|
73
|
+
params: NumberOrdersUpdateParams,
|
|
74
|
+
options?: RequestOptions,
|
|
75
|
+
): Promise<Telnyx.Response<Telnyx.NumberOrdersUpdateResponse>>;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type PhoneNumbersInboundChannelsListParams =
|
|
6
|
+
paths['/phone_numbers/inbound_channels']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type PhoneNumbersInboundChannelsListResponse =
|
|
9
|
+
paths['/phone_numbers/inbound_channels']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
type PhoneNumbersInboundChannelsUpdateParams =
|
|
12
|
+
paths['/phone_numbers/inbound_channels']['patch']['requestBody']['content']['application/json'];
|
|
13
|
+
|
|
14
|
+
type PhoneNumbersInboundChannelsUpdateResponse =
|
|
15
|
+
paths['/phone_numbers/inbound_channels']['patch']['responses']['200']['content']['application/json'];
|
|
16
|
+
|
|
17
|
+
class PhoneNumbersInboundChannelsResource {
|
|
18
|
+
list(
|
|
19
|
+
params?: PhoneNumbersInboundChannelsListParams,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<
|
|
22
|
+
Telnyx.Response<Telnyx.PhoneNumbersInboundChannelsListResponse>
|
|
23
|
+
>;
|
|
24
|
+
|
|
25
|
+
update(
|
|
26
|
+
params: PhoneNumbersInboundChannelsUpdateParams,
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): Promise<
|
|
29
|
+
Telnyx.Response<Telnyx.PhoneNumbersInboundChannelsUpdateResponse>
|
|
30
|
+
>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type PhoneNumbersMessagingListParams =
|
|
6
|
+
paths['/phone_numbers/messaging']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type PhoneNumbersMessagingListResponse =
|
|
9
|
+
paths['/phone_numbers/messaging']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
class PhoneNumbersMessagingResource {
|
|
12
|
+
list(
|
|
13
|
+
params?: PhoneNumbersMessagingListParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersMessagingListResponse>>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type PhoneNumbersRegulatoryRequirementsListParams =
|
|
6
|
+
paths['/phone_numbers_regulatory_requirements']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type PhoneNumbersRegulatoryRequirementsListResponse =
|
|
9
|
+
paths['/phone_numbers_regulatory_requirements']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
class PhoneNumbersRegulatoryRequirementsResource {
|
|
12
|
+
list(
|
|
13
|
+
params?: PhoneNumbersRegulatoryRequirementsListParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): Promise<
|
|
16
|
+
Telnyx.Response<Telnyx.PhoneNumbersRegulatoryRequirementsListResponse>
|
|
17
|
+
>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type PhoneNumbersListParams =
|
|
6
|
+
paths['/phone_numbers']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type PhoneNumbersListResponse =
|
|
9
|
+
paths['/phone_numbers']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
type PhoneNumbersRetrieveId =
|
|
12
|
+
paths['/phone_numbers/{id}']['get']['parameters']['path']['id'];
|
|
13
|
+
|
|
14
|
+
type PhoneNumbersRetrieveResponse =
|
|
15
|
+
paths['/phone_numbers/{id}']['get']['responses']['200']['content']['application/json'];
|
|
16
|
+
|
|
17
|
+
type PhoneNumbersDelId =
|
|
18
|
+
paths['/phone_numbers/{id}']['delete']['parameters']['path']['id'];
|
|
19
|
+
|
|
20
|
+
type PhoneNumbersDelParams =
|
|
21
|
+
paths['/phone_numbers/{id}']['delete']['parameters']['query'];
|
|
22
|
+
|
|
23
|
+
type PhoneNumbersDelResponse =
|
|
24
|
+
paths['/phone_numbers/{id}']['delete']['responses']['200']['content']['application/json'];
|
|
25
|
+
|
|
26
|
+
type PhoneNumbersUpdateId =
|
|
27
|
+
paths['/phone_numbers/{id}']['patch']['parameters']['path']['id'];
|
|
28
|
+
|
|
29
|
+
type PhoneNumbersUpdateParams =
|
|
30
|
+
paths['/phone_numbers/{id}']['patch']['requestBody']['content']['application/json'];
|
|
31
|
+
|
|
32
|
+
type PhoneNumbersUpdateResponse =
|
|
33
|
+
paths['/phone_numbers/{id}']['patch']['responses']['200']['content']['application/json'];
|
|
34
|
+
|
|
35
|
+
type PhoneNumbersRetrieveVoiceSettingsId =
|
|
36
|
+
paths['/phone_numbers/{id}/voice']['get']['parameters']['path']['id'];
|
|
37
|
+
|
|
38
|
+
type PhoneNumbersRetrieveVoiceSettingsResponse =
|
|
39
|
+
paths['/phone_numbers/{id}/voice']['get']['responses']['200']['content']['application/json'];
|
|
40
|
+
|
|
41
|
+
type PhoneNumbersRetrieveMessagingSettingsId =
|
|
42
|
+
paths['/phone_numbers/{id}/messaging']['get']['parameters']['path']['id'];
|
|
43
|
+
|
|
44
|
+
type PhoneNumbersRetrieveMessagingSettingsResponse =
|
|
45
|
+
paths['/phone_numbers/{id}/messaging']['get']['responses']['200']['content']['application/json'];
|
|
46
|
+
|
|
47
|
+
type PhoneNumbersRetrieveVoicemailId =
|
|
48
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['get']['parameters']['path']['phone_number_id'];
|
|
49
|
+
|
|
50
|
+
type PhoneNumbersRetrieveVoicemailResponse =
|
|
51
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['get']['responses']['200']['content']['application/json'];
|
|
52
|
+
|
|
53
|
+
type PhoneNumbersVoiceSettingsUpdateId =
|
|
54
|
+
paths['/phone_numbers/{id}/voice']['patch']['parameters']['path']['id'];
|
|
55
|
+
|
|
56
|
+
type PhoneNumbersVoiceSettingsUpdateParams =
|
|
57
|
+
paths['/phone_numbers/{id}/voice']['patch']['requestBody']['content']['application/json'];
|
|
58
|
+
|
|
59
|
+
type PhoneNumbersVoiceSettingsUpdateResponse =
|
|
60
|
+
paths['/phone_numbers/{id}/voice']['patch']['responses']['200']['content']['application/json'];
|
|
61
|
+
|
|
62
|
+
type PhoneNumbersMessagingSettingsUpdateId =
|
|
63
|
+
paths['/phone_numbers/{id}/messaging']['patch']['parameters']['path']['id'];
|
|
64
|
+
|
|
65
|
+
type PhoneNumbersMessagingSettingsUpdateParams =
|
|
66
|
+
paths['/phone_numbers/{id}/messaging']['patch']['requestBody']['content']['application/json'];
|
|
67
|
+
|
|
68
|
+
type PhoneNumbersMessagingSettingsUpdateResponse =
|
|
69
|
+
paths['/phone_numbers/{id}/messaging']['patch']['responses']['200']['content']['application/json'];
|
|
70
|
+
|
|
71
|
+
type PhoneNumbersVoicemailUpdateId =
|
|
72
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['patch']['parameters']['path']['phone_number_id'];
|
|
73
|
+
|
|
74
|
+
type PhoneNumbersVoicemailUpdateParams =
|
|
75
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['patch']['requestBody']['content']['application/json'];
|
|
76
|
+
|
|
77
|
+
type PhoneNumbersVoicemailUpdateResponse =
|
|
78
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['patch']['responses']['200']['content']['application/json'];
|
|
79
|
+
|
|
80
|
+
type PhoneNumbersMessagingSettingsEnableId =
|
|
81
|
+
paths['/phone_numbers/{id}/actions/enable_emergency']['post']['parameters']['path']['id'];
|
|
82
|
+
|
|
83
|
+
type PhoneNumbersMessagingSettingsEnableParams =
|
|
84
|
+
paths['/phone_numbers/{id}/actions/enable_emergency']['post']['requestBody']['content']['application/json'];
|
|
85
|
+
|
|
86
|
+
type PhoneNumbersMessagingSettingsEnableResponse =
|
|
87
|
+
paths['/phone_numbers/{id}/actions/enable_emergency']['post']['responses']['200']['content']['application/json'];
|
|
88
|
+
|
|
89
|
+
type PhoneNumbersVoicemailCreateId =
|
|
90
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['post']['parameters']['path']['phone_number_id'];
|
|
91
|
+
|
|
92
|
+
type PhoneNumbersVoicemailCreateParams =
|
|
93
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['post']['requestBody']['content']['application/json'];
|
|
94
|
+
|
|
95
|
+
type PhoneNumbersVoicemailCreateResponse =
|
|
96
|
+
paths['/phone_numbers/{phone_number_id}/voicemail']['post']['responses']['200']['content']['application/json'];
|
|
97
|
+
|
|
98
|
+
type PhoneNumbersNestedMethods = {
|
|
99
|
+
del(
|
|
100
|
+
options?: RequestOptions,
|
|
101
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersDelResponse>>;
|
|
102
|
+
|
|
103
|
+
update(
|
|
104
|
+
params: PhoneNumbersUpdateParams,
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersUpdateResponse>>;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
class PhoneNumbersResource {
|
|
110
|
+
list(
|
|
111
|
+
params?: PhoneNumbersListParams,
|
|
112
|
+
options?: RequestOptions,
|
|
113
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersListResponse>>;
|
|
114
|
+
|
|
115
|
+
retrieve(
|
|
116
|
+
id: PhoneNumbersRetrieveId,
|
|
117
|
+
options?: RequestOptions,
|
|
118
|
+
): Promise<
|
|
119
|
+
Telnyx.Response<
|
|
120
|
+
Telnyx.PhoneNumbersRetrieveResponse &
|
|
121
|
+
NestedResponseData<
|
|
122
|
+
PhoneNumbersRetrieveResponse['data'],
|
|
123
|
+
PhoneNumbersNestedMethods
|
|
124
|
+
>
|
|
125
|
+
>
|
|
126
|
+
>;
|
|
127
|
+
|
|
128
|
+
del(
|
|
129
|
+
id: PhoneNumbersDelId,
|
|
130
|
+
options?: RequestOptions,
|
|
131
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersDelResponse>>;
|
|
132
|
+
|
|
133
|
+
update(
|
|
134
|
+
id: PhoneNumbersUpdateId,
|
|
135
|
+
params: PhoneNumbersUpdateParams,
|
|
136
|
+
options?: RequestOptions,
|
|
137
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersUpdateResponse>>;
|
|
138
|
+
|
|
139
|
+
retrieveVoiceSettings(
|
|
140
|
+
id: PhoneNumbersRetrieveVoiceSettingsId,
|
|
141
|
+
options?: RequestOptions,
|
|
142
|
+
): Promise<
|
|
143
|
+
Telnyx.Response<Telnyx.PhoneNumbersRetrieveVoiceSettingsResponse>
|
|
144
|
+
>;
|
|
145
|
+
|
|
146
|
+
retrieveMessagingSettings(
|
|
147
|
+
id: PhoneNumbersRetrieveMessagingSettingsId,
|
|
148
|
+
options?: RequestOptions,
|
|
149
|
+
): Promise<
|
|
150
|
+
Telnyx.Response<Telnyx.PhoneNumbersRetrieveMessagingSettingsResponse>
|
|
151
|
+
>;
|
|
152
|
+
|
|
153
|
+
retrieveVoicemail(
|
|
154
|
+
id: PhoneNumbersRetrieveVoicemailId,
|
|
155
|
+
options?: RequestOptions,
|
|
156
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersRetrieveVoicemailResponse>>;
|
|
157
|
+
|
|
158
|
+
updateVoiceSettings(
|
|
159
|
+
id: PhoneNumbersVoiceSettingsUpdateId,
|
|
160
|
+
params: PhoneNumbersVoiceSettingsUpdateParams,
|
|
161
|
+
options?: RequestOptions,
|
|
162
|
+
): Promise<
|
|
163
|
+
Telnyx.Response<Telnyx.PhoneNumbersVoiceSettingsUpdateResponse>
|
|
164
|
+
>;
|
|
165
|
+
|
|
166
|
+
updateMessagingSettings(
|
|
167
|
+
id: PhoneNumbersMessagingSettingsUpdateId,
|
|
168
|
+
params: PhoneNumbersMessagingSettingsUpdateParams,
|
|
169
|
+
options?: RequestOptions,
|
|
170
|
+
): Promise<
|
|
171
|
+
Telnyx.Response<Telnyx.PhoneNumbersMessagingSettingsUpdateResponse>
|
|
172
|
+
>;
|
|
173
|
+
|
|
174
|
+
updateVoicemail(
|
|
175
|
+
id: PhoneNumbersVoicemailUpdateId,
|
|
176
|
+
params: PhoneNumbersVoicemailUpdateParams,
|
|
177
|
+
options?: RequestOptions,
|
|
178
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersVoicemailUpdateResponse>>;
|
|
179
|
+
|
|
180
|
+
enableEmergencySettings(
|
|
181
|
+
id: PhoneNumbersMessagingSettingsEnableId,
|
|
182
|
+
params: PhoneNumbersMessagingSettingsEnableParams,
|
|
183
|
+
options?: RequestOptions,
|
|
184
|
+
): Promise<
|
|
185
|
+
Telnyx.Response<Telnyx.PhoneNumbersMessagingSettingsEnableResponse>
|
|
186
|
+
>;
|
|
187
|
+
|
|
188
|
+
createVoicemail(
|
|
189
|
+
id: PhoneNumbersVoicemailCreateId,
|
|
190
|
+
params: PhoneNumbersVoicemailCreateParams,
|
|
191
|
+
options?: RequestOptions,
|
|
192
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersVoicemailCreateResponse>>;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type PhoneNumbersSlimListParams =
|
|
6
|
+
paths['/phone_numbers/slim']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type PhoneNumbersSlimListResponse =
|
|
9
|
+
paths['/phone_numbers/slim']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
class PhoneNumbersSlimResource {
|
|
12
|
+
list(
|
|
13
|
+
params?: PhoneNumbersSlimListParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersSlimListResponse>>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type PhoneNumbersVoiceListParams =
|
|
6
|
+
paths['/phone_numbers/voice']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type PhoneNumbersVoiceListResponse =
|
|
9
|
+
paths['/phone_numbers/voice']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
class PhoneNumbersVoiceResource {
|
|
12
|
+
list(
|
|
13
|
+
params?: PhoneNumbersVoiceListParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): Promise<Telnyx.Response<Telnyx.PhoneNumbersVoiceListResponse>>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type RegulatoryRequirementsListParams =
|
|
6
|
+
paths['/regulatory_requirements']['get']['parameters']['query'];
|
|
7
|
+
|
|
8
|
+
type RegulatoryRequirementsListResponse =
|
|
9
|
+
paths['/regulatory_requirements']['get']['responses']['200']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
class RegulatoryRequirementsResource {
|
|
12
|
+
list(
|
|
13
|
+
params?: RegulatoryRequirementsListParams,
|
|
14
|
+
options?: RequestOptions,
|
|
15
|
+
): Promise<Telnyx.Response<Telnyx.RegulatoryRequirementsListResponse>>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -41,6 +41,17 @@ declare module 'telnyx' {
|
|
|
41
41
|
type TexmlApplicationsUpdateResponse =
|
|
42
42
|
paths['/texml_applications/{id}']['patch']['responses']['200']['content']['application/json'];
|
|
43
43
|
|
|
44
|
+
type TexmlApplicationsNestedMethods = {
|
|
45
|
+
del(
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): Promise<Telnyx.Response<Telnyx.TexmlApplicationsDelResponse>>;
|
|
48
|
+
|
|
49
|
+
update(
|
|
50
|
+
params: TexmlApplicationsUpdateParams,
|
|
51
|
+
options?: RequestOptions,
|
|
52
|
+
): Promise<Telnyx.Response<Telnyx.TexmlApplicationsUpdateResponse>>;
|
|
53
|
+
};
|
|
54
|
+
|
|
44
55
|
class TexmlApplicationsResource {
|
|
45
56
|
del(
|
|
46
57
|
id: TexmlApplicationsDelId,
|
|
@@ -50,12 +61,29 @@ declare module 'telnyx' {
|
|
|
50
61
|
create(
|
|
51
62
|
params: TexmlApplicationsCreateParams,
|
|
52
63
|
options?: RequestOptions,
|
|
53
|
-
): Promise<
|
|
64
|
+
): Promise<
|
|
65
|
+
Telnyx.Response<
|
|
66
|
+
Telnyx.TexmlApplicationsCreateResponse &
|
|
67
|
+
NestedResponseData<
|
|
68
|
+
TexmlApplicationsCreateResponse['data'],
|
|
69
|
+
TexmlApplicationsNestedMethods
|
|
70
|
+
>
|
|
71
|
+
>
|
|
72
|
+
>;
|
|
54
73
|
|
|
55
74
|
retrieve(
|
|
56
75
|
id: TexmlApplicationsRetrieveId,
|
|
57
76
|
options?: RequestOptions,
|
|
58
|
-
): Promise<
|
|
77
|
+
): Promise<
|
|
78
|
+
Telnyx.Response<
|
|
79
|
+
Telnyx.TexmlApplicationsRetrieveResponse &
|
|
80
|
+
NestedResponseData<
|
|
81
|
+
TexmlApplicationsRetrieveResponse['data'],
|
|
82
|
+
TexmlApplicationsNestedMethods
|
|
83
|
+
>
|
|
84
|
+
>
|
|
85
|
+
>;
|
|
86
|
+
// ): Promise<Telnyx.Response<Telnyx.TexmlApplicationsRetrieveResponse>>;
|
|
59
87
|
|
|
60
88
|
list(
|
|
61
89
|
params?: TexmlApplicationsListParams,
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {paths} from './TelnyxAPI.js';
|
|
2
|
+
|
|
3
|
+
declare module 'telnyx' {
|
|
4
|
+
namespace Telnyx {
|
|
5
|
+
type TexmlCreateSecretParams =
|
|
6
|
+
paths['/texml/secrets']['post']['requestBody']['content']['application/json'];
|
|
7
|
+
|
|
8
|
+
type TexmlCreateSecretResponse =
|
|
9
|
+
paths['/texml/secrets']['post']['responses']['201']['content']['application/json'];
|
|
10
|
+
|
|
11
|
+
type TexmlCreateCallApplicationId =
|
|
12
|
+
paths['/texml/calls/{application_id}']['post']['parameters']['path']['application_id'];
|
|
13
|
+
|
|
14
|
+
type TexmlCreateCallParams =
|
|
15
|
+
paths['/texml/calls/{application_id}']['post']['requestBody']['content']['application/json'];
|
|
16
|
+
|
|
17
|
+
type TexmlCreateCallResponse =
|
|
18
|
+
paths['/texml/calls/{application_id}']['post']['responses']['200']['content']['application/json'];
|
|
19
|
+
|
|
20
|
+
type TexmlUpdateCallCallSid =
|
|
21
|
+
paths['/texml/calls/{call_sid}/update']['post']['parameters']['path']['call_sid'];
|
|
22
|
+
|
|
23
|
+
type TexmlUpdateCallParams =
|
|
24
|
+
paths['/texml/calls/{call_sid}/update']['post']['requestBody']['content']['application/json'];
|
|
25
|
+
|
|
26
|
+
type TexmlUpdateCallResponse =
|
|
27
|
+
paths['/texml/calls/{call_sid}/update']['post']['responses']['200']['content']['application/json'];
|
|
28
|
+
|
|
29
|
+
class TexmlResource {
|
|
30
|
+
createSecret(
|
|
31
|
+
params: TexmlCreateSecretParams,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<Telnyx.Response<Telnyx.TexmlCreateSecretResponse>>;
|
|
34
|
+
|
|
35
|
+
createCall(
|
|
36
|
+
applicationId: TexmlCreateCallApplicationId,
|
|
37
|
+
params: TexmlCreateCallParams,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): Promise<Telnyx.Response<Telnyx.TexmlCreateSecretResponse>>;
|
|
40
|
+
|
|
41
|
+
updateCall(
|
|
42
|
+
callSid: TexmlUpdateCallCallSid,
|
|
43
|
+
params: TexmlUpdateCallParams,
|
|
44
|
+
options?: RequestOptions,
|
|
45
|
+
): Promise<Telnyx.Response<Telnyx.TexmlUpdateCallResponse>>;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
///<reference path='./AuthenticationProvidersResource.d.ts' />
|
|
23
23
|
///<reference path='./AddressesResource.d.ts' />
|
|
24
24
|
///<reference path='./AvailablePhoneNumbersResource.d.ts' />
|
|
25
|
+
///<reference path='./AvailablePhoneNumbersBlocksResource.d.ts' />
|
|
25
26
|
///<reference path='./BalanceResource.d.ts' />
|
|
26
27
|
///<reference path='./BillingGroupsResource.d.ts' />
|
|
27
28
|
///<reference path='./BrandsResource.d.ts' />
|
|
@@ -54,11 +55,20 @@
|
|
|
54
55
|
///<reference path='./MessagingProfilesResource.d.ts' />
|
|
55
56
|
///<reference path='./MessagingProfileMetricsResource.d.ts' />
|
|
56
57
|
///<reference path='./NotificationEventsResource.d.ts' />
|
|
58
|
+
///<reference path='./NumberOrdersResource.d.ts' />
|
|
57
59
|
///<reference path='./PhoneNumberAssignmentByProfileResource.d.ts' />
|
|
58
60
|
///<reference path='./PhoneNumbersCsvDownloadsResource.d.ts' />
|
|
61
|
+
///<reference path='./PhoneNumbersInboundChannelsResource.d.ts' />
|
|
62
|
+
///<reference path='./PhoneNumbersMessagingResource.d.ts' />
|
|
63
|
+
///<reference path='./PhoneNumbersVoiceResource.d.ts' />
|
|
64
|
+
///<reference path='./PhoneNumbersSlimResource.d.ts' />
|
|
65
|
+
///<reference path='./PhoneNumbersRegulatoryRequirementsResource.d.ts' />
|
|
66
|
+
///<reference path='./PhoneNumbersResource.d.ts' />
|
|
59
67
|
///<reference path='./PortingEventsResource.d.ts' />
|
|
60
68
|
///<reference path='./PortoutEventsResource.d.ts' />
|
|
69
|
+
///<reference path='./RegulatoryRequirementsResource.d.ts' />
|
|
61
70
|
///<reference path='./TelephonyCredentialsResource.d.ts' />
|
|
71
|
+
///<reference path='./TexmlResource.d.ts' />
|
|
62
72
|
///<reference path='./TexmlApplicationsResource.d.ts' />
|
|
63
73
|
///<reference path='./StorageBucketsResource.d.ts' />
|
|
64
74
|
///<reference path='./VerificationsResource.d.ts' />
|
|
@@ -94,6 +104,7 @@ declare module 'telnyx' {
|
|
|
94
104
|
authenticationProviders: Telnyx.AuthenticationProvidersResource;
|
|
95
105
|
addresses: Telnyx.AddressesResource;
|
|
96
106
|
availablePhoneNumbers: Telnyx.AvailablePhoneNumbersResource;
|
|
107
|
+
availablePhoneNumbersBlocks: Telnyx.AvailablePhoneNumbersBlocksResource;
|
|
97
108
|
balance: Telnyx.BalanceResource;
|
|
98
109
|
brands: Telnyx.BrandsResource;
|
|
99
110
|
billingGroups: Telnyx.BillingGroupsResource;
|
|
@@ -126,11 +137,20 @@ declare module 'telnyx' {
|
|
|
126
137
|
messagingProfileMetrics: Telnyx.MessagingProfileMetricsResource;
|
|
127
138
|
messagingProfiles: Telnyx.MessagingProfilesResource;
|
|
128
139
|
notificationEvents: Telnyx.NotificationEventsResource;
|
|
140
|
+
numberOrders: Telnyx.NumberOrdersResource;
|
|
129
141
|
phoneNumberAssignmentByProfile: Telnyx.PhoneNumberAssignmentByProfileResource;
|
|
130
142
|
phoneNumbersCsvDownloads: Telnyx.PhoneNumbersCsvDownloadsResource;
|
|
143
|
+
phoneNumbersInboundChannels: Telnyx.PhoneNumbersInboundChannelsResource;
|
|
144
|
+
phoneNumbersMessaging: Telnyx.PhoneNumbersMessagingResource;
|
|
145
|
+
phoneNumbersVoice: Telnyx.PhoneNumbersVoiceResource;
|
|
146
|
+
phoneNumbersSlim: Telnyx.PhoneNumbersSlimResource;
|
|
147
|
+
phoneNumbersRegulatoryRequirements: Telnyx.PhoneNumbersRegulatoryRequirementsResource;
|
|
148
|
+
phoneNumbers: Telnyx.PhoneNumbersResource;
|
|
131
149
|
portingEvents: Telnyx.PortingEventsResource;
|
|
132
150
|
portoutEvents: Telnyx.PortoutEventsResource;
|
|
151
|
+
regulatoryRequirements: Telnyx.RegulatoryRequirementsResource;
|
|
133
152
|
telephonyCredentials: Telnyx.TelephonyCredentialsResource;
|
|
153
|
+
texml: Telnyx.TexmlResource;
|
|
134
154
|
texmlApplications: Telnyx.TexmlApplicationsResource;
|
|
135
155
|
storageBuckets: Telnyx.StorageBucketsResource;
|
|
136
156
|
verifications: Telnyx.VerificationsResource;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "telnyx",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"description": "Telnyx API Node SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telnyx",
|
|
@@ -47,12 +47,14 @@
|
|
|
47
47
|
"nyc": "^15.1.0",
|
|
48
48
|
"plop": "^4.0.1",
|
|
49
49
|
"prettier": "^3.0.0",
|
|
50
|
-
"qs": "^6.11.2",
|
|
51
50
|
"ts-jest": "^29.2.5",
|
|
52
51
|
"ts-node": "^10.9.2",
|
|
53
|
-
"tweetnacl": "^1.0.3",
|
|
54
52
|
"typescript": "^5.6.2",
|
|
55
|
-
"typescript-eslint": "^8.8.0"
|
|
53
|
+
"typescript-eslint": "^8.8.0"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"qs": "^6.13.0",
|
|
57
|
+
"tweetnacl": "^1.0.3",
|
|
56
58
|
"uuid": "^9.0.1"
|
|
57
59
|
},
|
|
58
60
|
"overrides": {
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import TelnyxResource from '../TelnyxResource';
|
|
2
|
-
const telnyxMethod = TelnyxResource.method;
|
|
3
|
-
export const PhoneNumberSearch = TelnyxResource.extend({
|
|
4
|
-
path: 'phone_number_search',
|
|
5
|
-
includeBasic: ['list', 'retrieve'],
|
|
6
|
-
ListAvailablePhoneNumbers: telnyxMethod({
|
|
7
|
-
method: 'GET',
|
|
8
|
-
path: '/available_phone_numbers',
|
|
9
|
-
}),
|
|
10
|
-
ListAvailablePhoneNumberBlocks: telnyxMethod({
|
|
11
|
-
method: 'GET',
|
|
12
|
-
path: '/available_phone_number_blocks',
|
|
13
|
-
}),
|
|
14
|
-
});
|