@sinch/elastic-sip-trunking 1.1.0

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 (161) hide show
  1. package/README.md +121 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +33 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/models/index.d.ts +1 -0
  6. package/dist/models/index.js +18 -0
  7. package/dist/models/index.js.map +1 -0
  8. package/dist/models/v1/access-control-list/access-control-list.d.ts +19 -0
  9. package/dist/models/v1/access-control-list/access-control-list.js +3 -0
  10. package/dist/models/v1/access-control-list/access-control-list.js.map +1 -0
  11. package/dist/models/v1/access-control-list/index.d.ts +1 -0
  12. package/dist/models/v1/access-control-list/index.js +3 -0
  13. package/dist/models/v1/access-control-list/index.js.map +1 -0
  14. package/dist/models/v1/add-access-control-list-to-trunk/add-access-control-list-to-trunk.d.ts +4 -0
  15. package/dist/models/v1/add-access-control-list-to-trunk/add-access-control-list-to-trunk.js +3 -0
  16. package/dist/models/v1/add-access-control-list-to-trunk/add-access-control-list-to-trunk.js.map +1 -0
  17. package/dist/models/v1/add-access-control-list-to-trunk/index.d.ts +1 -0
  18. package/dist/models/v1/add-access-control-list-to-trunk/index.js +3 -0
  19. package/dist/models/v1/add-access-control-list-to-trunk/index.js.map +1 -0
  20. package/dist/models/v1/call/call.d.ts +35 -0
  21. package/dist/models/v1/call/call.js +3 -0
  22. package/dist/models/v1/call/call.js.map +1 -0
  23. package/dist/models/v1/call/index.d.ts +1 -0
  24. package/dist/models/v1/call/index.js +3 -0
  25. package/dist/models/v1/call/index.js.map +1 -0
  26. package/dist/models/v1/country-permission/country-permission.d.ts +15 -0
  27. package/dist/models/v1/country-permission/country-permission.js +3 -0
  28. package/dist/models/v1/country-permission/country-permission.js.map +1 -0
  29. package/dist/models/v1/country-permission/index.d.ts +1 -0
  30. package/dist/models/v1/country-permission/index.js +3 -0
  31. package/dist/models/v1/country-permission/index.js.map +1 -0
  32. package/dist/models/v1/enum.d.ts +2 -0
  33. package/dist/models/v1/enum.js +3 -0
  34. package/dist/models/v1/enum.js.map +1 -0
  35. package/dist/models/v1/index.d.ts +14 -0
  36. package/dist/models/v1/index.js +31 -0
  37. package/dist/models/v1/index.js.map +1 -0
  38. package/dist/models/v1/ip-range/index.d.ts +1 -0
  39. package/dist/models/v1/ip-range/index.js +3 -0
  40. package/dist/models/v1/ip-range/index.js.map +1 -0
  41. package/dist/models/v1/ip-range/ip-range.d.ts +21 -0
  42. package/dist/models/v1/ip-range/ip-range.js +3 -0
  43. package/dist/models/v1/ip-range/ip-range.js.map +1 -0
  44. package/dist/models/v1/list-country-permissions-response/index.d.ts +1 -0
  45. package/dist/models/v1/list-country-permissions-response/index.js +3 -0
  46. package/dist/models/v1/list-country-permissions-response/index.js.map +1 -0
  47. package/dist/models/v1/list-country-permissions-response/list-country-permissions-response.d.ts +5 -0
  48. package/dist/models/v1/list-country-permissions-response/list-country-permissions-response.js +3 -0
  49. package/dist/models/v1/list-country-permissions-response/list-country-permissions-response.js.map +1 -0
  50. package/dist/models/v1/money/index.d.ts +1 -0
  51. package/dist/models/v1/money/index.js +3 -0
  52. package/dist/models/v1/money/index.js.map +1 -0
  53. package/dist/models/v1/money/money.d.ts +9 -0
  54. package/dist/models/v1/money/money.js +3 -0
  55. package/dist/models/v1/money/money.js.map +1 -0
  56. package/dist/models/v1/phoneNumber/index.d.ts +1 -0
  57. package/dist/models/v1/phoneNumber/index.js +3 -0
  58. package/dist/models/v1/phoneNumber/index.js.map +1 -0
  59. package/dist/models/v1/phoneNumber/phoneNumber.d.ts +17 -0
  60. package/dist/models/v1/phoneNumber/phoneNumber.js +3 -0
  61. package/dist/models/v1/phoneNumber/phoneNumber.js.map +1 -0
  62. package/dist/models/v1/requests/access-control-list/access-control-list-request-data.d.ts +43 -0
  63. package/dist/models/v1/requests/access-control-list/access-control-list-request-data.js +3 -0
  64. package/dist/models/v1/requests/access-control-list/access-control-list-request-data.js.map +1 -0
  65. package/dist/models/v1/requests/calls-history/calls-history-request-data.d.ts +19 -0
  66. package/dist/models/v1/requests/calls-history/calls-history-request-data.js +3 -0
  67. package/dist/models/v1/requests/calls-history/calls-history-request-data.js.map +1 -0
  68. package/dist/models/v1/requests/country-permissions/country-permissions-request-data.d.ts +13 -0
  69. package/dist/models/v1/requests/country-permissions/country-permissions-request-data.js +3 -0
  70. package/dist/models/v1/requests/country-permissions/country-permissions-request-data.js.map +1 -0
  71. package/dist/models/v1/requests/index.d.ts +5 -0
  72. package/dist/models/v1/requests/index.js +22 -0
  73. package/dist/models/v1/requests/index.js.map +1 -0
  74. package/dist/models/v1/requests/sip-endpoints/sip-endpoints-request-data.d.ts +35 -0
  75. package/dist/models/v1/requests/sip-endpoints/sip-endpoints-request-data.js +3 -0
  76. package/dist/models/v1/requests/sip-endpoints/sip-endpoints-request-data.js.map +1 -0
  77. package/dist/models/v1/requests/sip-trunks/sip-trunks-request-data.d.ts +44 -0
  78. package/dist/models/v1/requests/sip-trunks/sip-trunks-request-data.js +3 -0
  79. package/dist/models/v1/requests/sip-trunks/sip-trunks-request-data.js.map +1 -0
  80. package/dist/models/v1/sip-endpoint/index.d.ts +1 -0
  81. package/dist/models/v1/sip-endpoint/index.js +3 -0
  82. package/dist/models/v1/sip-endpoint/index.js.map +1 -0
  83. package/dist/models/v1/sip-endpoint/sip-endpoint.d.ts +25 -0
  84. package/dist/models/v1/sip-endpoint/sip-endpoint.js +3 -0
  85. package/dist/models/v1/sip-endpoint/sip-endpoint.js.map +1 -0
  86. package/dist/models/v1/sip-trunk/index.d.ts +1 -0
  87. package/dist/models/v1/sip-trunk/index.js +3 -0
  88. package/dist/models/v1/sip-trunk/index.js.map +1 -0
  89. package/dist/models/v1/sip-trunk/sip-trunk.d.ts +25 -0
  90. package/dist/models/v1/sip-trunk/sip-trunk.js +3 -0
  91. package/dist/models/v1/sip-trunk/sip-trunk.js.map +1 -0
  92. package/dist/models/v1/update-access-control-list-request/index.d.ts +1 -0
  93. package/dist/models/v1/update-access-control-list-request/index.js +3 -0
  94. package/dist/models/v1/update-access-control-list-request/index.js.map +1 -0
  95. package/dist/models/v1/update-access-control-list-request/update-access-control-list-request.d.ts +9 -0
  96. package/dist/models/v1/update-access-control-list-request/update-access-control-list-request.js +3 -0
  97. package/dist/models/v1/update-access-control-list-request/update-access-control-list-request.js.map +1 -0
  98. package/dist/models/v1/update-country-permission-request/index.d.ts +1 -0
  99. package/dist/models/v1/update-country-permission-request/index.js +3 -0
  100. package/dist/models/v1/update-country-permission-request/index.js.map +1 -0
  101. package/dist/models/v1/update-country-permission-request/update-country-permission-request.d.ts +4 -0
  102. package/dist/models/v1/update-country-permission-request/update-country-permission-request.js +3 -0
  103. package/dist/models/v1/update-country-permission-request/update-country-permission-request.js.map +1 -0
  104. package/dist/rest/index.d.ts +1 -0
  105. package/dist/rest/index.js +18 -0
  106. package/dist/rest/index.js.map +1 -0
  107. package/dist/rest/v1/access-control-list/access-control-list-api.d.ts +81 -0
  108. package/dist/rest/v1/access-control-list/access-control-list-api.jest.fixture.d.ts +50 -0
  109. package/dist/rest/v1/access-control-list/access-control-list-api.jest.fixture.js +53 -0
  110. package/dist/rest/v1/access-control-list/access-control-list-api.jest.fixture.js.map +1 -0
  111. package/dist/rest/v1/access-control-list/access-control-list-api.js +244 -0
  112. package/dist/rest/v1/access-control-list/access-control-list-api.js.map +1 -0
  113. package/dist/rest/v1/access-control-list/index.d.ts +2 -0
  114. package/dist/rest/v1/access-control-list/index.js +19 -0
  115. package/dist/rest/v1/access-control-list/index.js.map +1 -0
  116. package/dist/rest/v1/calls-history/calls-history-api.d.ts +18 -0
  117. package/dist/rest/v1/calls-history/calls-history-api.jest.fixture.d.ts +10 -0
  118. package/dist/rest/v1/calls-history/calls-history-api.jest.fixture.js +13 -0
  119. package/dist/rest/v1/calls-history/calls-history-api.jest.fixture.js.map +1 -0
  120. package/dist/rest/v1/calls-history/calls-history-api.js +48 -0
  121. package/dist/rest/v1/calls-history/calls-history-api.js.map +1 -0
  122. package/dist/rest/v1/calls-history/index.d.ts +2 -0
  123. package/dist/rest/v1/calls-history/index.js +19 -0
  124. package/dist/rest/v1/calls-history/index.js.map +1 -0
  125. package/dist/rest/v1/country-permissions/country-permissions-api.d.ts +29 -0
  126. package/dist/rest/v1/country-permissions/country-permissions-api.jest.fixture.d.ts +21 -0
  127. package/dist/rest/v1/country-permissions/country-permissions-api.jest.fixture.js +21 -0
  128. package/dist/rest/v1/country-permissions/country-permissions-api.jest.fixture.js.map +1 -0
  129. package/dist/rest/v1/country-permissions/country-permissions-api.js +87 -0
  130. package/dist/rest/v1/country-permissions/country-permissions-api.js.map +1 -0
  131. package/dist/rest/v1/country-permissions/index.d.ts +2 -0
  132. package/dist/rest/v1/country-permissions/index.js +19 -0
  133. package/dist/rest/v1/country-permissions/index.js.map +1 -0
  134. package/dist/rest/v1/elastic-sip-trunking-domain-api.d.ts +25 -0
  135. package/dist/rest/v1/elastic-sip-trunking-domain-api.js +58 -0
  136. package/dist/rest/v1/elastic-sip-trunking-domain-api.js.map +1 -0
  137. package/dist/rest/v1/elastic-sip-trunking-service.d.ts +20 -0
  138. package/dist/rest/v1/elastic-sip-trunking-service.js +31 -0
  139. package/dist/rest/v1/elastic-sip-trunking-service.js.map +1 -0
  140. package/dist/rest/v1/index.d.ts +6 -0
  141. package/dist/rest/v1/index.js +23 -0
  142. package/dist/rest/v1/index.js.map +1 -0
  143. package/dist/rest/v1/sip-endpoints/index.d.ts +2 -0
  144. package/dist/rest/v1/sip-endpoints/index.js +19 -0
  145. package/dist/rest/v1/sip-endpoints/index.js.map +1 -0
  146. package/dist/rest/v1/sip-endpoints/sip-endpoints-api.d.ts +42 -0
  147. package/dist/rest/v1/sip-endpoints/sip-endpoints-api.jest.fixture.d.ts +26 -0
  148. package/dist/rest/v1/sip-endpoints/sip-endpoints-api.jest.fixture.js +29 -0
  149. package/dist/rest/v1/sip-endpoints/sip-endpoints-api.jest.fixture.js.map +1 -0
  150. package/dist/rest/v1/sip-endpoints/sip-endpoints-api.js +143 -0
  151. package/dist/rest/v1/sip-endpoints/sip-endpoints-api.js.map +1 -0
  152. package/dist/rest/v1/sip-trunks/index.d.ts +2 -0
  153. package/dist/rest/v1/sip-trunks/index.js +19 -0
  154. package/dist/rest/v1/sip-trunks/index.js.map +1 -0
  155. package/dist/rest/v1/sip-trunks/sip-trunks-api.d.ts +61 -0
  156. package/dist/rest/v1/sip-trunks/sip-trunks-api.jest.fixture.d.ts +42 -0
  157. package/dist/rest/v1/sip-trunks/sip-trunks-api.jest.fixture.js +41 -0
  158. package/dist/rest/v1/sip-trunks/sip-trunks-api.jest.fixture.js.map +1 -0
  159. package/dist/rest/v1/sip-trunks/sip-trunks-api.js +219 -0
  160. package/dist/rest/v1/sip-trunks/sip-trunks-api.js.map +1 -0
  161. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,121 @@
1
+ # Sinch Elastic SIP Trunking SDK for Node.js
2
+
3
+ This package contains the Sinch Elastic SIP Trunking SDK for Node.js for use with [Sinch APIs](https://developers.sinch.com/). To use it, you will need a Sinch account. Please [sign up](https://dashboard.sinch.com/signup) or [log in](https://dashboard.sinch.com/login) if you already have one.
4
+
5
+ ## Installation
6
+
7
+ We recommend to use this SDK as part of the `@sinch/sdk-core` package as it will take care about the authentication plugins to use.
8
+
9
+ However, it's still possible to use this SDK standalone is you need to access the Elastic SIP Trunking API only.
10
+
11
+ ### With NPM
12
+
13
+ ```bash
14
+ npm install @sinch/elastic-sip-trunking
15
+ ```
16
+
17
+ ### With Yarn
18
+
19
+ ```bash
20
+ yarn add @sinch/elastic-sip-trunking
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ### Credentials
26
+
27
+ The `Elastic SIP Trunking` API uses the Sinch unified authentication with OAuth2. You will need to provide the following credentials:
28
+ - projectId: can be found in the [Account Dashboard](https://dashboard.sinch.com/settings/access-keys)
29
+ - keyId:: can be found in your Access key list in the [Account Dashboard](https://dashboard.sinch.com/settings/access-keys)
30
+ - keySecret: can be found **ONLY** when generating a new access key: keep it safe!
31
+
32
+ ### As part of the Sinch SDK
33
+
34
+ If you are using this SDK as part of the Sinch SDK (`@sinch/sdk-core`) you can access it as the `elasticSipTrunking` property of the client that you would have instantiated.
35
+
36
+ ```typescript
37
+ import {
38
+ ElasticSipTrunkingService,
39
+ ElasticSipTrunking,
40
+ SinchClient,
41
+ UnifiedCredentials,
42
+ } from '@sinch/sdk-core';
43
+
44
+ const credentials: UnifiedCredentials = {
45
+ projectId: 'PROJECT_ID',
46
+ keyId: 'KEY_ID',
47
+ keySecret: 'KEY_SECRET',
48
+ };
49
+
50
+ // Access the 'elasticSipTrunking' service registered on the Sinch Client
51
+ const sinch = new SinchClient(credentials);
52
+ const elasticSipTrunkingService: ElasticSipTrunkingService = sinch.elasticSipTrunking;
53
+
54
+ // Build the request data
55
+ const requestData: ElasticSipTrunking.CreateSipTrunkRequestData = {
56
+ createSipTrunkRequestBody: {
57
+ name: 'Acme Trunk',
58
+ hostName: 'acme-domain-1',
59
+ }
60
+ };
61
+
62
+ // Use the 'elasticSipTrunking' service registered on the Sinch Client
63
+ const result = await sinch.elasticSipTrunking.sipTrunks.create(requestData);
64
+ ```
65
+
66
+ ### Standalone
67
+
68
+ The SDK can be used standalone if you need to use only the Elastic SIP Trunking APIs.
69
+
70
+ ```typescript
71
+ import {
72
+ UnifiedCredentials,
73
+ } from '@sinch/sdk-client';
74
+ import {
75
+ ElasticSipTrunkingService,
76
+ ElasticSipTrunking,
77
+ } from '@sinch/elastic-sip-trunking';
78
+
79
+ const credentials: UnifiedCredentials = {
80
+ projectId: 'PROJECT_ID',
81
+ keyId: 'KEY_ID',
82
+ keySecret: 'KEY_SECRET',
83
+ };
84
+
85
+ // Declare the 'elasticSipTrunking' service in a standalone way
86
+ const elasticSipTrunkingService = new ElasticSipTrunkingService(options);
87
+
88
+ // Build the request data
89
+ const requestData: ElasticSipTrunking.CreateSipTrunkRequestData = {
90
+ createSipTrunkRequestBody: {
91
+ name: 'Acme Trunk',
92
+ hostName: 'acme-domain-1',
93
+ }
94
+ };
95
+
96
+ // Use the standalone declaration of the 'elasticSipTrunking' service
97
+ const result = await elasticSipTrunkingService.sipTrunks.create(requestData);
98
+ ```
99
+
100
+ ## Promises
101
+
102
+ All the methods that interact with the Sinch APIs use Promises. You can use `await` in an `async` method to wait for the response or you can resolve them yourself with `then()` / `catch()`.
103
+
104
+ ```typescript
105
+ // Method 1: Wait for the Promise to complete
106
+ let result: ElasticSipTrunking.SipTrunk;
107
+ try {
108
+ result = await elasticSipTrunkingService.sipTrunks.create(requestData);
109
+ console.log(`SIP trunk successfully created at '${response.createTime.toISOString()}' with the id '${response.id}'`);
110
+ } catch (error: any) {
111
+ console.error(`ERROR ${error.statusCode}: Impossible to create a SIP Trunk with the hostname '${requestData.hostName}'`);
112
+ }
113
+
114
+ // Method 2: Resolve the promise
115
+ elasticSipTrunkingService.sipTrunks.create(requestData)
116
+ .then(response => console.log(`SIP trunk successfully created at '${response.createTime.toISOString()}' with the id '${response.id}'`))
117
+ .catch(error => console.error(`ERROR ${error.statusCode}: Impossible to create a SIP Trunk with the hostname '${requestData.hostName}'`));
118
+ ```
119
+
120
+ ## Contact
121
+ Developer Experience team: [devexp@sinch.com](mailto:devexp@sinch.com)
@@ -0,0 +1,3 @@
1
+ export * as ElasticSipTrunking from './models';
2
+ export * from './rest';
3
+ export * from '@sinch/sdk-client';
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ElasticSipTrunking = void 0;
30
+ exports.ElasticSipTrunking = __importStar(require("./models"));
31
+ __exportStar(require("./rest"), exports);
32
+ __exportStar(require("@sinch/sdk-client"), exports);
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA+C;AAC/C,yCAAuB;AACvB,oDAAkC"}
@@ -0,0 +1 @@
1
+ export * from './v1';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./v1"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB"}
@@ -0,0 +1,19 @@
1
+ import { IpRange } from '../ip-range';
2
+ export interface AccessControlList {
3
+ /** The ID of the access control list entry. */
4
+ id?: string;
5
+ /** Your name for the access control list entry. */
6
+ name: string;
7
+ /** Whether the access control list entry is enabled. You can use this to disable an list temporarily without deleting it. */
8
+ enabled?: boolean;
9
+ /** The associated IP ranges. When creating you need to submit at least one IP range. */
10
+ ipRanges: IpRange[];
11
+ /** The associated SIP trunks ID. */
12
+ trunks?: string[];
13
+ /** The time the access control list was created. */
14
+ createTime?: Date;
15
+ /** The time the access control list was created. */
16
+ updateTime?: Date | null;
17
+ /** The ID of the project. */
18
+ projectId?: string;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=access-control-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-control-list.js","sourceRoot":"","sources":["../../../../src/models/v1/access-control-list/access-control-list.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { AccessControlList } from './access-control-list';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/access-control-list/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface AddAccessControlListToTrunk {
2
+ /** Array of AccessControlList ids */
3
+ accessControlListIds?: string[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=add-access-control-list-to-trunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-access-control-list-to-trunk.js","sourceRoot":"","sources":["../../../../src/models/v1/add-access-control-list-to-trunk/add-access-control-list-to-trunk.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { AddAccessControlListToTrunk } from './add-access-control-list-to-trunk';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/add-access-control-list-to-trunk/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { Money } from '../money';
2
+ import { CallResult, DirectionEnum } from '../enum';
3
+ /**
4
+ * The call resource represents an inbound or outbound connection between Sinch and a supported device
5
+ */
6
+ export interface Call {
7
+ /** The unique identifier of the call. */
8
+ callId?: string;
9
+ /** For `INBOUND` calls, this is the Sinch number the phone dialed. For `OUTBOUND` calls, this is the phone number you want to make a call to. Formatted according e164 format. */
10
+ to?: string;
11
+ /** For `INBOUND` calls, this is the number of the person calling. When making an outbound call set this to the your Sinch number you want to show up as Caller Id. The call\'s origination, formatted according to the call\'s `callType`. For calls in the telephone network, this is a phone number in [E.164](/docs/voice/api-reference/call-types) format, including the leading `+`. More info see [Call types](/docs/voice/api-reference/call-types) */
12
+ from?: string;
13
+ /** Describes whether the call was `INBOUND` *to* your Sinch number or was `OUTBOUND` and made *from* your Sinch number. */
14
+ direction?: DirectionEnum;
15
+ /** Time when call was answered */
16
+ answerTime?: Date;
17
+ /** The time the call ended */
18
+ endTime?: Date;
19
+ /** The duration of the call in seconds. For inbound calls, this is the time from when the call started until the call ended. For outbound calls, this is the time from when the call was answered until the call ended. */
20
+ durationSeconds?: number;
21
+ /** The result of the call */
22
+ callResult?: CallResult;
23
+ /** @see Money */
24
+ pricePerMinute?: Money;
25
+ /** The duration of the call adjusted with the billing period. */
26
+ billingDurationSeconds?: number;
27
+ /** @see Money */
28
+ price?: Money;
29
+ /** The time the call was created. */
30
+ createTime?: Date;
31
+ /** The ID of the project that the call belongs to. */
32
+ projectId?: string;
33
+ /** The ID of the trunk that the call was made through. */
34
+ trunkId?: string;
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=call.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call.js","sourceRoot":"","sources":["../../../../src/models/v1/call/call.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { Call } from './call';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/call/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * With country permissions you can control which countries can be dialed from your account. For beta only, countries supported are US,CA and * if you would like to allow international dialing.
3
+ */
4
+ export interface CountryPermission {
5
+ /** The [ISO code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country */
6
+ isoCode?: string;
7
+ /** Country name in english */
8
+ name?: string;
9
+ /** Continent of the country */
10
+ continent?: string;
11
+ /** The country calling codes as an array, most countries have only one but some have multiple like the San Marino, China, and a few others. */
12
+ countryDialingCodes?: string[];
13
+ /** If the country is enabled or not. When this is enabled regular numbers can be dialed from the account. */
14
+ enabled: boolean;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=country-permission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-permission.js","sourceRoot":"","sources":["../../../../src/models/v1/country-permission/country-permission.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { CountryPermission } from './country-permission';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/country-permission/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type DirectionEnum = 'INBOUND' | 'OUTBOUND';
2
+ export type CallResult = 'COMPLETED' | 'NO_ANSWER' | 'CANCEL' | 'BUSY' | 'FAILED';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/models/v1/enum.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export * from './access-control-list';
2
+ export * from './add-access-control-list-to-trunk';
3
+ export * from './call';
4
+ export * from './country-permission';
5
+ export * from './ip-range';
6
+ export * from './list-country-permissions-response';
7
+ export * from './money';
8
+ export * from './phoneNumber';
9
+ export * from './sip-endpoint';
10
+ export * from './sip-trunk';
11
+ export * from './update-access-control-list-request';
12
+ export * from './update-country-permission-request';
13
+ export * from './enum';
14
+ export * from './requests';
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./access-control-list"), exports);
18
+ __exportStar(require("./add-access-control-list-to-trunk"), exports);
19
+ __exportStar(require("./call"), exports);
20
+ __exportStar(require("./country-permission"), exports);
21
+ __exportStar(require("./ip-range"), exports);
22
+ __exportStar(require("./list-country-permissions-response"), exports);
23
+ __exportStar(require("./money"), exports);
24
+ __exportStar(require("./phoneNumber"), exports);
25
+ __exportStar(require("./sip-endpoint"), exports);
26
+ __exportStar(require("./sip-trunk"), exports);
27
+ __exportStar(require("./update-access-control-list-request"), exports);
28
+ __exportStar(require("./update-country-permission-request"), exports);
29
+ __exportStar(require("./enum"), exports);
30
+ __exportStar(require("./requests"), exports);
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,qEAAmD;AACnD,yCAAuB;AACvB,uDAAqC;AACrC,6CAA2B;AAC3B,sEAAoD;AACpD,0CAAwB;AACxB,gDAA8B;AAC9B,iDAA+B;AAC/B,8CAA4B;AAC5B,uEAAqD;AACrD,sEAAoD;AACpD,yCAAuB;AACvB,6CAA2B"}
@@ -0,0 +1 @@
1
+ export type { IpRange } from './ip-range';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/ip-range/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A single or range of IP addresses.
3
+ */
4
+ export interface IpRange {
5
+ /** The ID of the IP range. */
6
+ id?: string;
7
+ /** A description of the IP range. */
8
+ description?: string;
9
+ /** The start of the IP range. */
10
+ ipAddress?: string;
11
+ /** A range, also known as a CIDR, represents the number of leading bits that define the network portion of an IP address in CIDR notation. The range is specified after a slash (/) at the end of the IP address. The remaining bits define specific hosts within the network. - 10.0.0.0/8: Represents all IP addresses from 10.0.0.0 to 10.255.255.255, allowing for over 16 million unique host addresses. - 172.16.0.0/16: Includes all IP addresses from 172.16.0.0 to 172.16.255.255, providing up to 65,536 unique host addresses. - 192.168.1.0/24: Encompasses all IP addresses from 192.168.1.0 to 192.168.1.255, offering 256 unique host addresses. - 192.168.1.0/32: Encompasses one ip address */
12
+ range?: number;
13
+ /** The time the call was created. */
14
+ createTime?: Date;
15
+ /** The time the call was updated. */
16
+ updateTime?: Date | null;
17
+ /** The ID of the project. */
18
+ projectId?: string;
19
+ /** The ID of the access control list. */
20
+ accessControlListId?: string;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ip-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ip-range.js","sourceRoot":"","sources":["../../../../src/models/v1/ip-range/ip-range.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { ListCountryPermissionsResponse } from './list-country-permissions-response';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/list-country-permissions-response/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { CountryPermission } from '../country-permission';
2
+ export interface ListCountryPermissionsResponse {
3
+ /** List of CountryPermissions */
4
+ countryPermissions?: CountryPermission[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=list-country-permissions-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-country-permissions-response.js","sourceRoot":"","sources":["../../../../src/models/v1/list-country-permissions-response/list-country-permissions-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { Money } from './money';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/money/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This is where we need description to be overridden by `$ref:` description
3
+ */
4
+ export interface Money {
5
+ /** The 3-letter currency code defined in ISO 4217. */
6
+ currencyCode?: string;
7
+ /** The amount with 4 decimals and decimal delimiter `.`. */
8
+ amount?: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=money.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"money.js","sourceRoot":"","sources":["../../../../src/models/v1/money/money.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { PhoneNumber } from './phoneNumber';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/phoneNumber/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A Sinch phone number assigned to a SIP trunk. This must be a number you own and configured for Elastic SIP Trunking.
3
+ */
4
+ export interface PhoneNumber {
5
+ /** The ID of the phone number. */
6
+ id?: string;
7
+ /** The ID of the SIP trunk to which the phone number is assigned. */
8
+ sipTrunkId?: string;
9
+ /** A phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format, including the leading \'+\'. */
10
+ phoneNumber?: string;
11
+ /** The country code of the phone number in ISO 3166-1 alpha-2 format. */
12
+ countryCode?: string;
13
+ /** The date and time that the number was assigned to the SIP trunk. */
14
+ createTime?: Date;
15
+ /** The date and time that the phone number was last modified. */
16
+ updateTime?: Date;
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=phoneNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phoneNumber.js","sourceRoot":"","sources":["../../../../src/models/v1/phoneNumber/phoneNumber.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import { AccessControlList } from '../../access-control-list';
2
+ import { IpRange } from '../../ip-range';
3
+ import { UpdateAccessControlListRequest } from '../../update-access-control-list-request';
4
+ export interface AddIpRangeToAccessControlListRequestData {
5
+ /** The ID of the access control list entry. that you want to work with */
6
+ 'accessControlListId': string;
7
+ /** */
8
+ 'addIpRangeRequestBody': IpRange;
9
+ }
10
+ export interface CreateAccessControlListRequestData {
11
+ /** The Access Control List details used to create an Access Control List */
12
+ 'createAccessControlListBody': AccessControlList;
13
+ }
14
+ export interface DeleteAccessControlListRequestData {
15
+ /** The ID of the access control list entry. */
16
+ 'id': string;
17
+ }
18
+ export interface DeleteIpRangeFromAccessControlListRequestData {
19
+ /** The ID of the access control list entry that you want to update. */
20
+ 'accessControlListId': string;
21
+ /** The ID of the IP range that you want to update. */
22
+ 'ipRangeId': string;
23
+ }
24
+ export interface ListAccessControlListRequestData {
25
+ }
26
+ export interface ListIpRangesForAccessControlListRequestData {
27
+ /** The ID of the access control list entry. that you want to work with */
28
+ 'accessControlListId': string;
29
+ }
30
+ export interface UpdateAccessControlListRequestData {
31
+ /** The ID of the access control list entry. */
32
+ 'id': string;
33
+ /** The Access Control List details used to update an Access Control List */
34
+ 'updateAccessControlListRequestBody': UpdateAccessControlListRequest;
35
+ }
36
+ export interface UpdateIpRangeFromAccessControlListRequestData {
37
+ /** The ID of the access control list entry that you want to update. */
38
+ 'accessControlListId': string;
39
+ /** The ID of the IP range that you want to update. */
40
+ 'ipRangeId': string;
41
+ /** The IP range details used to update the IP range property from an Access Control List */
42
+ 'updateIpRangeRequestBody': IpRange;
43
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=access-control-list-request-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-control-list-request-data.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/access-control-list/access-control-list-request-data.ts"],"names":[],"mappings":""}