telnyx 2.0.0-alpha.3 → 2.0.0-alpha.5

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/VERSION +1 -1
  3. package/dist/resources/AuditEvents.js +5 -0
  4. package/dist/resources/AutorespConfigs.js +1 -1
  5. package/dist/resources/Brands.js +1 -5
  6. package/dist/resources/CallControlApplications.js +1 -5
  7. package/dist/resources/CallRecordings.js +8 -10
  8. package/dist/resources/Calls.js +5 -0
  9. package/dist/resources/CdrUsageReports.js +4 -4
  10. package/dist/resources/Channelzones.js +20 -12
  11. package/dist/resources/Conferences.js +11 -2
  12. package/dist/resources/Connections.js +5 -0
  13. package/dist/resources/CustomerServiceRecords.js +15 -0
  14. package/dist/resources/DetailRecords.js +1 -1
  15. package/dist/resources/DialogflowConnections.js +26 -0
  16. package/dist/resources/Documents.js +2 -29
  17. package/dist/resources/ExternalConnections.js +44 -40
  18. package/dist/resources/FaxApplications.js +0 -1
  19. package/dist/resources/Faxes.js +0 -1
  20. package/dist/resources/FqdnConnections.js +0 -1
  21. package/dist/resources/Fqdns.js +0 -1
  22. package/dist/resources/InventoryCoverage.js +4 -0
  23. package/dist/resources/Messages.js +20 -4
  24. package/dist/resources/MessagingHostedNumbers.js +2 -2
  25. package/dist/resources/NotificationEvents.js +5 -0
  26. package/dist/resources/OutboundVoiceProfiles.js +1 -9
  27. package/dist/resources/PhoneNumbersCsvDownloads.js +5 -0
  28. package/dist/resources/PortingEvents.js +11 -0
  29. package/dist/resources/PortoutEvents.js +11 -0
  30. package/dist/resources/RegulatoryRequirements.js +1 -1
  31. package/dist/resources/TelephonyCredentials.js +10 -8
  32. package/dist/resources/VerifyProfiles.js +2 -14
  33. package/dist/telnyx.js +14 -38
  34. package/dist/types/AuditEventsResource.d.ts +18 -0
  35. package/dist/types/AuthenticationProvidersResource.d.ts +72 -0
  36. package/dist/types/BrandsResource.d.ts +12 -5
  37. package/dist/types/CallControlApplicationsResource.d.ts +93 -0
  38. package/dist/types/CallEventsResource.d.ts +18 -0
  39. package/dist/types/CallRecordingsResource.d.ts +59 -0
  40. package/dist/types/CdrUsageReportsResource.d.ts +18 -0
  41. package/dist/types/ChannelzonesResource.d.ts +92 -0
  42. package/dist/types/ConferencesResource.d.ts +202 -0
  43. package/dist/types/ConnectionsResource.d.ts +44 -0
  44. package/dist/types/CredentialConnectionsResource.d.ts +69 -0
  45. package/dist/types/CustomerServiceRecordsResource.d.ts +55 -0
  46. package/dist/types/DetailRecordsResource.d.ts +18 -0
  47. package/dist/types/DialogflowConnectionsResource.d.ts +61 -0
  48. package/dist/types/DocumentLinksResource.d.ts +18 -0
  49. package/dist/types/DocumentsResource.d.ts +80 -0
  50. package/dist/types/DynamicEmergencyAddressesResource.d.ts +61 -0
  51. package/dist/types/DynamicEmergencyEndpointsResource.d.ts +58 -0
  52. package/dist/types/DynamicEmergencyResource.d.ts +8 -0
  53. package/dist/types/ExternalConnectionsResource.d.ts +303 -0
  54. package/dist/types/FaxApplicationsResource.d.ts +93 -0
  55. package/dist/types/FaxesResource.d.ts +82 -0
  56. package/dist/types/FqdnConnectionsResource.d.ts +93 -0
  57. package/dist/types/FqdnsResource.d.ts +94 -0
  58. package/dist/types/InventoryCoverageResource.d.ts +23 -0
  59. package/dist/types/IpConnectionsResource.d.ts +93 -0
  60. package/dist/types/IpsResource.d.ts +72 -0
  61. package/dist/types/MessagesResource.d.ts +93 -0
  62. package/dist/types/NotificationEventsResource.d.ts +18 -0
  63. package/dist/types/PhoneNumbersCsvDownloadsResource.d.ts +44 -0
  64. package/dist/types/PortingEventsResource.d.ts +43 -0
  65. package/dist/types/PortoutEventsResource.d.ts +43 -0
  66. package/dist/types/TelephonyCredentialsResource.d.ts +99 -0
  67. package/dist/types/TelnyxAPI.d.ts +3 -4
  68. package/dist/types/TexmlApplicationsResource.d.ts +72 -0
  69. package/dist/types/index.d.ts +69 -2
  70. package/package.json +1 -1
  71. package/dist/resources/BusinessIdentity.js +0 -15
  72. package/dist/resources/CallInformation.js +0 -10
  73. package/dist/resources/ClientStateUpdate.js +0 -5
  74. package/dist/resources/Credentials.js +0 -24
  75. package/dist/resources/CsvDownloads.js +0 -15
  76. package/dist/resources/CustomerServiceRecord.js +0 -18
  77. package/dist/resources/Debugging.js +0 -10
  78. package/dist/resources/DialogflowIntegration.js +0 -10
  79. package/dist/resources/Events.js +0 -5
  80. package/dist/resources/InboundChannels.js +0 -10
  81. package/dist/resources/InventoryLevel.js +0 -10
  82. package/dist/resources/IpAddresses.js +0 -15
  83. package/dist/resources/IpRanges.js +0 -15
  84. package/dist/resources/MessagesAlphanumericSenderId.js +0 -5
  85. package/dist/resources/MessagingHostedNumber.js +0 -25
  86. package/dist/resources/MessagingPhoneNumbers.js +0 -5
  87. package/dist/resources/MessagingSenderIds.js +0 -5
  88. package/dist/resources/PublicKey.js +0 -8
  89. package/dist/resources/UpdateClientState.js +0 -14
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  ## v2
4
4
 
5
+ ### v2.0.0-alpha.5
6
+
7
+ - Remove `ClientStateUpdate` resource
8
+ - Remove `MessagesAlphanumericSenderId` resource
9
+ - Remove `MessagingHostedNumber` resource
10
+ - Remove `MessagingPhoneNumbers` resource
11
+ - Remove `MessagingSenderIds` resource
12
+ - Remove `PublicKey` resource
13
+ - Remove `UpdateClientState` resource
14
+ - Remove `Debugging` dupe resource
15
+ - Update syntax on `Events` resources
16
+ - Update `ExternalConnections` stale resource
17
+ - Update `Messages` stale resource
18
+ - Update `Ip`s stale resources
19
+ - Update `AutorespConfigs` stale resource
20
+ - Update `DetailRecords` stale resource
21
+ - Update `InventoryCoverage` stale resource
22
+
23
+ ### v2.0.0-alpha.4
24
+
25
+ - Add `Addresses` example
26
+ - Remove `BusinessIdentity` resource
27
+ - Remove `CallInformation` resource
28
+ - Remove duplicated `Credentials` resource
29
+ - Fixed `Conferences`, `Documents` and `TelephonyCredentials` method names
30
+ - Add missing resource types defs
31
+
5
32
  ### v2.0.0-alpha.3
6
33
 
7
34
  - Update typing on Nested Resources
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0-alpha.3
1
+ 2.0.0-alpha.5
@@ -0,0 +1,5 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ export const AuditEvents = TelnyxResource.extend({
3
+ path: 'audit_events',
4
+ includeBasic: ['list'],
5
+ });
@@ -5,7 +5,7 @@ export const AutorespConfigs = TelnyxResource.extend({
5
5
  includeBasic: ['del', 'list', 'create', 'retrieve'],
6
6
  update: telnyxMethod({
7
7
  method: 'PUT',
8
- path: '/messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}',
8
+ path: '/{autoresp_cfg_id}',
9
9
  urlParams: ['profile_id', 'autoresp_cfg_id'],
10
10
  }),
11
11
  });
@@ -24,15 +24,11 @@ export const Brands = TelnyxResource.extend({
24
24
  path: '/brand/{brandId}/2faEmail',
25
25
  urlParams: ['brandId'],
26
26
  }),
27
- externalVettings: telnyxMethod({
28
- method: 'GET',
29
- path: '/brand/{brandId}/externalVetting',
30
- urlParams: ['brandId'],
31
- }),
32
27
  listExternalVettings: telnyxMethod({
33
28
  method: 'GET',
34
29
  path: '/brand/{brandId}/externalVetting',
35
30
  urlParams: ['brandId'],
31
+ methodType: 'list',
36
32
  }),
37
33
  exportExternalVettings: telnyxMethod({
38
34
  method: 'PUT',
@@ -21,11 +21,7 @@ function transformResponseData(response, telnyx) {
21
21
  }
22
22
  export const CallControlApplications = TelnyxResource.extend({
23
23
  path: 'call_control_applications',
24
- list: telnyxMethod({
25
- method: 'GET',
26
- methodType: 'list',
27
- transformResponseData: transformResponseData,
28
- }),
24
+ includeBasic: ['list', 'update'],
29
25
  create: telnyxMethod({
30
26
  method: 'POST',
31
27
  transformResponseData: transformResponseData,
@@ -2,21 +2,19 @@ import TelnyxResource from '../TelnyxResource';
2
2
  const telnyxMethod = TelnyxResource.method;
3
3
  export const CallRecordings = TelnyxResource.extend({
4
4
  path: 'recordings',
5
- includeBasic: ['list', 'retrieve', 'del'],
6
- GetRecordings: telnyxMethod({
5
+ includeBasic: ['list'],
6
+ retrieve: telnyxMethod({
7
7
  method: 'GET',
8
- path: '/recordings',
8
+ path: '/{recording_id}',
9
+ urlParams: ['recording_id'],
9
10
  }),
10
- DeleteRecording: telnyxMethod({
11
+ del: telnyxMethod({
11
12
  method: 'DELETE',
12
- path: '/recordings/{recording/id}',
13
+ path: '/{recording_id}',
14
+ urlParams: ['recording_id'],
13
15
  }),
14
- DeleteRecordings: telnyxMethod({
16
+ bulkDel: telnyxMethod({
15
17
  method: 'DELETE',
16
18
  path: '/recordings/actions/delete',
17
19
  }),
18
- DeleteCustomStorageCredentials: telnyxMethod({
19
- method: 'DELETE',
20
- path: '/custom/storage/credentials/{connection/id}',
21
- }),
22
20
  });
@@ -60,5 +60,10 @@ export const Calls = TelnyxResource.extend({
60
60
  return utils.addResourceToResponseData(response, telnyx, 'calls', utils.createNestedMethods(telnyxMethod, CALL_COMMANDS, getSpec(response.data.call_control_id)));
61
61
  },
62
62
  }),
63
+ updateClientState: telnyxMethod({
64
+ path: '/{call_control_id}/actions/client_state_update',
65
+ urlParams: ['call_control_id'],
66
+ method: 'PUT',
67
+ }),
63
68
  instanceMethods: utils.createNestedMethods(telnyxMethod, CALL_COMMANDS, getSpec()),
64
69
  });
@@ -1,10 +1,10 @@
1
1
  import TelnyxResource from '../TelnyxResource';
2
2
  const telnyxMethod = TelnyxResource.method;
3
3
  export const CdrUsageReports = TelnyxResource.extend({
4
- path: 'cdr_usage_reports',
5
- includeBasic: ['list', 'retrieve'],
6
- GetUsageReportSync: telnyxMethod({
4
+ path: 'reports/cdr_usage_reports',
5
+ retrieveUsageReportSync: telnyxMethod({
6
+ path: '/sync',
7
7
  method: 'GET',
8
- path: '/reports/cdr_usage_reports/sync',
8
+ urlParams: [],
9
9
  }),
10
10
  });
@@ -1,22 +1,30 @@
1
1
  import TelnyxResource from '../TelnyxResource';
2
2
  const telnyxMethod = TelnyxResource.method;
3
3
  export const Channelzones = TelnyxResource.extend({
4
- path: 'channelzones',
5
- includeBasic: ['list', 'retrieve', 'delete'],
6
- GetChannelZone: telnyxMethod({
4
+ path: 'channel_zones',
5
+ includeBasic: ['list'],
6
+ update: telnyxMethod({
7
+ method: 'PATCH',
8
+ path: '/{channel_zone_id}',
9
+ urlParams: ['channel_zone_id'],
10
+ }),
11
+ retrieve: telnyxMethod({
7
12
  method: 'GET',
8
- path: '/channel_zones/{channel/zone/id}',
13
+ path: '/{channel_zone_id}',
14
+ urlParams: ['channel_zone_id'],
9
15
  }),
10
- UnassignPhoneNumber: telnyxMethod({
11
- method: 'DELETE',
12
- path: '/channel_zones/{channel/zone/id}/channel_zone_phone_numbers/{phone_number}',
16
+ createPhoneNumber: telnyxMethod({
17
+ method: 'POST',
18
+ path: '/{channel_zone_id}/channel_zone_phone_numbers',
19
+ urlParams: ['channel_zone_id'],
13
20
  }),
14
- GetChannelZones: telnyxMethod({
21
+ listPhoneNumbers: telnyxMethod({
15
22
  method: 'GET',
16
- path: '/channel/zones',
23
+ path: '/{channel_zone_id}/channel_zone_phone_numbers',
17
24
  }),
18
- GetPhoneNumbers: telnyxMethod({
19
- method: 'GET',
20
- path: '/channel_zones/{channel_zone_id}/channel_zone_phone_numbers',
25
+ delPhoneNumber: telnyxMethod({
26
+ method: 'DELETE',
27
+ path: '/{channel_zone_id}/channel_zone_phone_numbers/{phone_number}',
28
+ urlParams: ['channel_zone_id', 'phone_number'],
21
29
  }),
22
30
  });
@@ -14,7 +14,8 @@ const CONFERENCES = [
14
14
  'record_stop',
15
15
  'update',
16
16
  'leave',
17
- 'resume',
17
+ 'record_resume',
18
+ 'record_pause',
18
19
  ];
19
20
  function getSpec(conferenceId) {
20
21
  return function (methodName) {
@@ -30,7 +31,15 @@ function getSpec(conferenceId) {
30
31
  }
31
32
  export const Conferences = TelnyxResource.extend({
32
33
  path: 'conferences',
33
- includeBasic: ['list', 'retrieve'],
34
+ includeBasic: ['list'],
35
+ retrieve: telnyxMethod({
36
+ method: 'GET',
37
+ path: '/{id}',
38
+ urlParams: ['id'],
39
+ transformResponseData: function (response, telnyx) {
40
+ return utils.addResourceToResponseData(response, telnyx, 'conferences', utils.createNestedMethods(telnyxMethod, CONFERENCES, getSpec(response.data.id)));
41
+ },
42
+ }),
34
43
  create: telnyxMethod({
35
44
  method: 'POST',
36
45
  transformResponseData: function (response, telnyx) {
@@ -1,5 +1,10 @@
1
1
  import TelnyxResource from '../TelnyxResource';
2
+ const telnyxMethod = TelnyxResource.method;
2
3
  export const Connections = TelnyxResource.extend({
3
4
  path: 'connections',
4
5
  includeBasic: ['list', 'retrieve'],
6
+ listActiveCalls: telnyxMethod({
7
+ method: 'GET',
8
+ path: '/{connection_id}/active_calls',
9
+ }),
5
10
  });
@@ -0,0 +1,15 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ const telnyxMethod = TelnyxResource.method;
3
+ export const CustomerServiceRecords = TelnyxResource.extend({
4
+ path: 'customer_service_records',
5
+ includeBasic: ['list', 'create'],
6
+ retrieve: telnyxMethod({
7
+ method: 'GET',
8
+ path: '/{customer_service_record_id}',
9
+ urlParams: ['customer_service_record_id'],
10
+ }),
11
+ verifyPhoneNumbersCoverage: telnyxMethod({
12
+ method: 'POST',
13
+ path: '/phone_number_coverages',
14
+ }),
15
+ });
@@ -2,7 +2,7 @@ import TelnyxResource from '../TelnyxResource';
2
2
  const telnyxMethod = TelnyxResource.method;
3
3
  export const DetailRecords = TelnyxResource.extend({
4
4
  path: 'detail_records',
5
- query: telnyxMethod({
5
+ search: telnyxMethod({
6
6
  method: 'GET',
7
7
  methodType: 'list',
8
8
  }),
@@ -0,0 +1,26 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ const telnyxMethod = TelnyxResource.method;
3
+ export const DialogflowConnections = TelnyxResource.extend({
4
+ path: 'dialogflow_connections',
5
+ retrieve: telnyxMethod({
6
+ method: 'GET',
7
+ path: '/{connection_id}',
8
+ urlParams: ['connection_id'],
9
+ methodType: 'retrieve',
10
+ }),
11
+ create: telnyxMethod({
12
+ method: 'POST',
13
+ path: '/{connection_id}',
14
+ urlParams: ['connection_id'],
15
+ }),
16
+ update: telnyxMethod({
17
+ method: 'PUT',
18
+ path: '/{connection_id}',
19
+ urlParams: ['connection_id'],
20
+ }),
21
+ del: telnyxMethod({
22
+ method: 'DELETE',
23
+ path: '/{connection_id}',
24
+ urlParams: ['connection_id'],
25
+ }),
26
+ });
@@ -1,44 +1,17 @@
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, 'documents', {});
6
- }
7
3
  export const Documents = TelnyxResource.extend({
8
4
  path: 'documents',
9
- list: telnyxMethod({
10
- method: 'GET',
11
- transformResponseData: transformResponseData,
12
- }),
13
- update: telnyxMethod({
14
- method: 'PATCH',
15
- path: '/{id}',
16
- urlParams: ['id'],
17
- transformResponseData: transformResponseData,
18
- }),
19
- del: telnyxMethod({
20
- method: 'DELETE',
21
- path: '{id}',
22
- urlParams: ['id'],
23
- transformResponseData: transformResponseData,
24
- }),
5
+ includeBasic: ['list', 'update', 'del', 'create', 'retrieve'],
25
6
  upload: telnyxMethod({
26
7
  method: 'POST',
27
- transformResponseData: transformResponseData,
28
- }),
29
- retrieveDocumentId: telnyxMethod({
30
- method: 'GET',
31
- path: '/{id}',
32
- urlParams: ['id'],
33
- transformResponseData: transformResponseData,
34
8
  }),
35
- retrieveDownloadDocument: telnyxMethod({
9
+ download: telnyxMethod({
36
10
  method: 'GET',
37
11
  path: '/{id}/download',
38
12
  urlParams: ['id'],
39
13
  headers: {
40
14
  'Content-Type': '*',
41
15
  },
42
- transformResponseData: transformResponseData,
43
16
  }),
44
17
  });
@@ -2,70 +2,74 @@ import TelnyxResource from '../TelnyxResource';
2
2
  const telnyxMethod = TelnyxResource.method;
3
3
  export const ExternalConnections = TelnyxResource.extend({
4
4
  path: 'external_connections',
5
- includeBasic: ['list', 'retrieve', 'create', 'delete'],
6
- GetExternalConnectionUploadsStatus: telnyxMethod({
5
+ includeBasic: ['list', 'retrieve', 'create', 'update', 'del'],
6
+ listLogMessages: telnyxMethod({
7
7
  method: 'GET',
8
- path: '/external_connections/{id}/uploads/status',
8
+ path: '/log/messages',
9
9
  }),
10
- ListExternalConnectionReleases: telnyxMethod({
10
+ retrieveLogMessage: telnyxMethod({
11
11
  method: 'GET',
12
- path: '/external_connections/{id}/releases',
12
+ path: '/log/messages/{id}',
13
+ urlParams: ['id'],
13
14
  }),
14
- RetryUpload: telnyxMethod({
15
- method: 'POST',
16
- path: '/external_connections/{id}/uploads/{ticketIid}/retry',
17
- }),
18
- DeleteExternalConnection: telnyxMethod({
15
+ delLogMessage: telnyxMethod({
19
16
  method: 'DELETE',
20
- path: '/external_connections/{id}',
17
+ path: '/log/messages/{id}',
18
+ urlParams: ['id'],
21
19
  }),
22
- updateLocation: telnyxMethod({
23
- method: 'PATCH',
24
- path: '/v2/external_connections/{id}/locations/{location_id}',
25
- urlParams: ['id', 'location_id'],
26
- }),
27
- DeleteExternalConnectionLogMessage: telnyxMethod({
28
- method: 'DELETE',
29
- path: '/external_connections/log/messages/{id}',
20
+ listCivicAddresses: telnyxMethod({
21
+ method: 'GET',
22
+ path: '/{id}/civic_addresses',
23
+ urlParams: ['id'],
30
24
  }),
31
- GetExternalConnectionCivicAddress: telnyxMethod({
25
+ retrieveCivicAddress: telnyxMethod({
32
26
  method: 'GET',
33
- path: '/external_connections/{id}/civic/addresses/{address_id}',
27
+ path: '/{id}/civic_addresses/{address_id}',
28
+ urlParams: ['id', 'address_id'],
34
29
  }),
35
- ListExternalConnectionPhoneNumbers: telnyxMethod({
30
+ listPhoneNumbers: telnyxMethod({
36
31
  method: 'GET',
37
- path: '/external_connections/{id}/phone/numbers',
32
+ path: '/{id}/phone_numbers',
33
+ urlParams: ['id'],
38
34
  }),
39
- ListExternalConnections: telnyxMethod({
35
+ retrievePhoneNumber: telnyxMethod({
40
36
  method: 'GET',
41
- path: '/external_connections',
37
+ path: '/{id}/phone_numbers/{phone_number_id}',
38
+ urlParams: ['id', 'phone_number_id'],
42
39
  }),
43
- GetExternalConnectionPhoneNumber: telnyxMethod({
40
+ listReleases: telnyxMethod({
44
41
  method: 'GET',
45
- path: '/external_connections/{id}/phone/numbers/{phone_number_id}',
42
+ path: '/{id}/releases',
43
+ urlParams: ['id'],
46
44
  }),
47
- ListCivicAddresses: telnyxMethod({
45
+ retrieveRelease: telnyxMethod({
48
46
  method: 'GET',
49
- path: '/external_connections/{id}/civic_addresses',
47
+ path: '/{id}/releases/{release_id}',
48
+ urlParams: ['id', 'release_id'],
50
49
  }),
51
- ListExternalConnectionLogMessages: telnyxMethod({
50
+ listUploads: telnyxMethod({
52
51
  method: 'GET',
53
- path: '/external_connections/log/messages',
52
+ path: '/{id}/uploads',
53
+ urlParams: ['id'],
54
54
  }),
55
- GetExternalConnectionUpload: telnyxMethod({
55
+ retrieveUpload: telnyxMethod({
56
56
  method: 'GET',
57
- path: '/external_connections/{id}/uploads/{ticket_id}',
57
+ path: '/{id}/uploads/{ticket_id}',
58
+ urlParams: ['id', 'ticket_id'],
58
59
  }),
59
- RefreshExternalConnectionUploads: telnyxMethod({
60
+ refreshUploads: telnyxMethod({
60
61
  method: 'POST',
61
- path: '/external_connections/{id}/uploads/refresh',
62
+ path: '/{id}/uploads/refresh',
63
+ urlParams: ['id'],
62
64
  }),
63
- GetExternalConnectionRelease: telnyxMethod({
65
+ retrieveUploadsStatus: telnyxMethod({
64
66
  method: 'GET',
65
- path: '/external_connections/{id}/releases/{release_id}',
67
+ path: '/{id}/uploads/status',
68
+ urlParams: ['id'],
66
69
  }),
67
- ListExternalConnectionUploads: telnyxMethod({
68
- method: 'GET',
69
- path: '/external_connections/{id}/uploads',
70
+ retryUpload: telnyxMethod({
71
+ method: 'POST',
72
+ path: '/{id}/uploads/{ticket_id}/retry',
73
+ urlParams: ['id', 'ticket_id'],
70
74
  }),
71
75
  });
@@ -24,7 +24,6 @@ export const FaxApplications = TelnyxResource.extend({
24
24
  list: telnyxMethod({
25
25
  method: 'GET',
26
26
  methodType: 'list',
27
- transformResponseData: transformResponseData,
28
27
  }),
29
28
  create: telnyxMethod({
30
29
  method: 'POST',
@@ -17,7 +17,6 @@ export const Faxes = TelnyxResource.extend({
17
17
  list: telnyxMethod({
18
18
  method: 'GET',
19
19
  methodType: 'list',
20
- transformResponseData: transformResponseData,
21
20
  }),
22
21
  create: telnyxMethod({
23
22
  method: 'POST',
@@ -24,7 +24,6 @@ export const FqdnConnections = TelnyxResource.extend({
24
24
  list: telnyxMethod({
25
25
  method: 'GET',
26
26
  methodType: 'list',
27
- transformResponseData: transformResponseData,
28
27
  }),
29
28
  create: telnyxMethod({
30
29
  method: 'POST',
@@ -24,7 +24,6 @@ export const Fqdns = TelnyxResource.extend({
24
24
  list: telnyxMethod({
25
25
  method: 'GET',
26
26
  methodType: 'list',
27
- transformResponseData: transformResponseData,
28
27
  }),
29
28
  create: telnyxMethod({
30
29
  method: 'POST',
@@ -2,6 +2,10 @@ import TelnyxResource from '../TelnyxResource';
2
2
  const telnyxMethod = TelnyxResource.method;
3
3
  export const InventoryCoverage = TelnyxResource.extend({
4
4
  path: 'inventory_coverage',
5
+ list: telnyxMethod({
6
+ method: 'GET',
7
+ methodType: 'list',
8
+ }),
5
9
  request: telnyxMethod({
6
10
  method: 'GET',
7
11
  methodType: 'list',
@@ -1,9 +1,25 @@
1
1
  import TelnyxResource from '../TelnyxResource';
2
- import { MessagesAlphanumericSenderId } from './MessagesAlphanumericSenderId';
2
+ const telnyxMethod = TelnyxResource.method;
3
3
  export const Messages = TelnyxResource.extend({
4
4
  path: 'messages',
5
5
  includeBasic: ['create', 'retrieve'],
6
- nestedResources: {
7
- AlphanumericSenderId: MessagesAlphanumericSenderId,
8
- },
6
+ send: telnyxMethod({
7
+ method: 'POST',
8
+ }),
9
+ sendGroupMms: telnyxMethod({
10
+ method: 'POST',
11
+ path: '/group_mms',
12
+ }),
13
+ sendLongCode: telnyxMethod({
14
+ method: 'POST',
15
+ path: '/long_code',
16
+ }),
17
+ sendNumberPool: telnyxMethod({
18
+ method: 'POST',
19
+ path: '/number_pool',
20
+ }),
21
+ sendShortCode: telnyxMethod({
22
+ method: 'POST',
23
+ path: '/short_code',
24
+ }),
9
25
  });
@@ -1,5 +1,5 @@
1
1
  import TelnyxResource from '../TelnyxResource';
2
2
  export const MessagingHostedNumbers = TelnyxResource.extend({
3
- path: '../id/actions/file_upload',
4
- includeBasic: ['retrieve'],
3
+ path: 'messaging_hosted_numbers',
4
+ includeBasic: ['del'],
5
5
  });
@@ -0,0 +1,5 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ export const NotificationEvents = TelnyxResource.extend({
3
+ path: 'notification_events',
4
+ includeBasic: ['list'],
5
+ });
@@ -21,11 +21,7 @@ function transformResponseData(response, telnyx) {
21
21
  }
22
22
  export const OutboundVoiceProfiles = TelnyxResource.extend({
23
23
  path: 'outbound_voice_profiles',
24
- list: telnyxMethod({
25
- method: 'GET',
26
- methodType: 'list',
27
- transformResponseData: transformResponseData,
28
- }),
24
+ includeBasic: ['list', 'update', 'del'],
29
25
  create: telnyxMethod({
30
26
  method: 'POST',
31
27
  transformResponseData: transformResponseData,
@@ -36,8 +32,4 @@ export const OutboundVoiceProfiles = TelnyxResource.extend({
36
32
  urlParams: ['id'],
37
33
  transformResponseData: transformResponseData,
38
34
  }),
39
- del: telnyxMethod({
40
- method: 'DELETE',
41
- path: '/{id}',
42
- }),
43
35
  });
@@ -0,0 +1,5 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ export const PhoneNumbersCsvDownloads = TelnyxResource.extend({
3
+ path: '/phone_numbers/csv_downloads',
4
+ includeBasic: ['list', 'create', 'retrieve'],
5
+ });
@@ -0,0 +1,11 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ const telnyxMethod = TelnyxResource.method;
3
+ export const PortingEvents = TelnyxResource.extend({
4
+ path: 'porting/events',
5
+ includeBasic: ['list', 'retrieve'],
6
+ republish: telnyxMethod({
7
+ method: 'POST',
8
+ path: '/{id}/republish',
9
+ urlParams: ['id'],
10
+ }),
11
+ });
@@ -0,0 +1,11 @@
1
+ import TelnyxResource from '../TelnyxResource';
2
+ const telnyxMethod = TelnyxResource.method;
3
+ export const PortoutEvents = TelnyxResource.extend({
4
+ path: 'portout/events',
5
+ includeBasic: ['list', 'retrieve'],
6
+ republish: telnyxMethod({
7
+ method: 'POST',
8
+ path: '/{id}/republish',
9
+ urlParams: ['id'],
10
+ }),
11
+ });
@@ -1,5 +1,5 @@
1
1
  import TelnyxResource from '../TelnyxResource';
2
2
  export const RegulatoryRequirements = TelnyxResource.extend({
3
3
  path: 'regulatory_requirements',
4
- includeBasic: ['list', 'retrieve'],
4
+ includeBasic: ['list'],
5
5
  });
@@ -12,7 +12,7 @@ function transformResponseData(response, telnyx) {
12
12
  }),
13
13
  });
14
14
  }
15
- const telephonyCredentialResource = {
15
+ export const TelephonyCredentials = TelnyxResource.extend({
16
16
  path: 'telephony_credentials',
17
17
  includeBasic: ['del', 'list', 'update'],
18
18
  create: telnyxMethod({
@@ -20,16 +20,18 @@ const telephonyCredentialResource = {
20
20
  transformResponseData: transformResponseData,
21
21
  }),
22
22
  retrieve: telnyxMethod({
23
+ method: 'GET',
24
+ path: '/{id}',
25
+ urlParams: ['id'],
26
+ transformResponseData: transformResponseData,
27
+ }),
28
+ createToken: telnyxMethod({
23
29
  method: 'POST',
24
30
  path: '/{id}/token',
25
31
  urlParams: ['id'],
26
- transformResponseData: transformResponseData,
27
32
  }),
28
- retrieveCredential: telnyxMethod({
33
+ listTags: telnyxMethod({
29
34
  method: 'GET',
30
- path: '/{id}',
31
- urlParams: ['id'],
32
- transformResponseData: transformResponseData,
35
+ path: '/tags',
33
36
  }),
34
- };
35
- export const TelephonyCredentials = TelnyxResource.extend(telephonyCredentialResource);
37
+ });