@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
@@ -0,0 +1,25 @@
1
+ import { Api, ApiClient, SinchClientParameters, UnifiedCredentials } from '@sinch/sdk-client';
2
+ export declare class ElasticSipTrunkingDomainApi implements Api {
3
+ readonly apiName: string;
4
+ client?: ApiClient;
5
+ private sinchClientParameters;
6
+ constructor(sinchClientParameters: SinchClientParameters, apiName: string);
7
+ /**
8
+ * Update the default hostname for the API
9
+ * @param {string} hostname - The new hostname to use for the APIs.
10
+ */
11
+ setHostname(hostname: string): void;
12
+ /**
13
+ * Updates the credentials used to authenticate API requests
14
+ * @param {UnifiedCredentials} credentials
15
+ */
16
+ setCredentials(credentials: UnifiedCredentials): void;
17
+ private resetApiClient;
18
+ /**
19
+ * Checks the configuration parameters are ok and initialize the API client. Once initialized, the same instance will
20
+ * be returned for the subsequent API calls (singleton pattern)
21
+ * @return {ApiClient} the API Client or throws an error in case the configuration parameters are not ok
22
+ * @private
23
+ */
24
+ getSinchClient(): ApiClient;
25
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ElasticSipTrunkingDomainApi = void 0;
4
+ const sdk_client_1 = require("@sinch/sdk-client");
5
+ class ElasticSipTrunkingDomainApi {
6
+ constructor(sinchClientParameters, apiName) {
7
+ this.sinchClientParameters = sinchClientParameters;
8
+ this.apiName = apiName;
9
+ }
10
+ /**
11
+ * Update the default hostname for the API
12
+ * @param {string} hostname - The new hostname to use for the APIs.
13
+ */
14
+ setHostname(hostname) {
15
+ this.client = this.getSinchClient();
16
+ this.client.apiClientOptions.hostname = hostname;
17
+ }
18
+ /**
19
+ * Updates the credentials used to authenticate API requests
20
+ * @param {UnifiedCredentials} credentials
21
+ */
22
+ setCredentials(credentials) {
23
+ const parametersBackup = { ...this.sinchClientParameters };
24
+ this.sinchClientParameters = {
25
+ ...parametersBackup,
26
+ ...credentials,
27
+ };
28
+ this.resetApiClient();
29
+ try {
30
+ this.getSinchClient();
31
+ }
32
+ catch (error) {
33
+ console.error('Impossible to assign the new credentials to the Elastic SIP Trunking API');
34
+ this.sinchClientParameters = parametersBackup;
35
+ throw error;
36
+ }
37
+ }
38
+ resetApiClient() {
39
+ this.client = undefined;
40
+ }
41
+ /**
42
+ * Checks the configuration parameters are ok and initialize the API client. Once initialized, the same instance will
43
+ * be returned for the subsequent API calls (singleton pattern)
44
+ * @return {ApiClient} the API Client or throws an error in case the configuration parameters are not ok
45
+ * @private
46
+ */
47
+ getSinchClient() {
48
+ if (!this.client) {
49
+ const apiClientOptions = (0, sdk_client_1.buildOAuth2ApiClientOptions)(this.sinchClientParameters, 'Elastic SIP Trunking');
50
+ this.client = new sdk_client_1.ApiFetchClient(apiClientOptions);
51
+ this.client.apiClientOptions.hostname = this.sinchClientParameters.elasticSipTrunkingHostname
52
+ ?? sdk_client_1.ELASTIC_SIP_TRUNKING_HOSTNAME;
53
+ }
54
+ return this.client;
55
+ }
56
+ }
57
+ exports.ElasticSipTrunkingDomainApi = ElasticSipTrunkingDomainApi;
58
+ //# sourceMappingURL=elastic-sip-trunking-domain-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elastic-sip-trunking-domain-api.js","sourceRoot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AAQ,GAAG,IAAI,CAAC,qBAAqB,CAAC,0BAA0B;mBACxF,0CAA6B,CAAC;QACrC,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CAEF;AA3DD,kEA2DC"}
@@ -0,0 +1,20 @@
1
+ import { SinchClientParameters } from '@sinch/sdk-client';
2
+ import { SipTrunksApi } from './sip-trunks';
3
+ import { AccessControlListApi } from './access-control-list';
4
+ import { SipEndpointsApi } from './sip-endpoints';
5
+ import { CountryPermissionsApi } from './country-permissions';
6
+ import { CallsHistoryApi } from './calls-history';
7
+ export declare class ElasticSipTrunkingService {
8
+ readonly sipTrunks: SipTrunksApi;
9
+ readonly sipEndpoints: SipEndpointsApi;
10
+ readonly accessControlList: AccessControlListApi;
11
+ readonly countryPermissions: CountryPermissionsApi;
12
+ readonly calls: CallsHistoryApi;
13
+ constructor(params: SinchClientParameters);
14
+ /**
15
+ * Update the default hostname for each API
16
+ *
17
+ * @param {string} hostname - The new hostname to use for all the APIs.
18
+ */
19
+ setHostname(hostname: string): void;
20
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ElasticSipTrunkingService = void 0;
4
+ const sip_trunks_1 = require("./sip-trunks");
5
+ const access_control_list_1 = require("./access-control-list");
6
+ const sip_endpoints_1 = require("./sip-endpoints");
7
+ const country_permissions_1 = require("./country-permissions");
8
+ const calls_history_1 = require("./calls-history");
9
+ class ElasticSipTrunkingService {
10
+ constructor(params) {
11
+ this.sipTrunks = new sip_trunks_1.SipTrunksApi(params);
12
+ this.sipEndpoints = new sip_endpoints_1.SipEndpointsApi(params);
13
+ this.accessControlList = new access_control_list_1.AccessControlListApi(params);
14
+ this.countryPermissions = new country_permissions_1.CountryPermissionsApi(params);
15
+ this.calls = new calls_history_1.CallsHistoryApi(params);
16
+ }
17
+ /**
18
+ * Update the default hostname for each API
19
+ *
20
+ * @param {string} hostname - The new hostname to use for all the APIs.
21
+ */
22
+ setHostname(hostname) {
23
+ this.sipTrunks.setHostname(hostname);
24
+ this.sipEndpoints.setHostname(hostname);
25
+ this.accessControlList.setHostname(hostname);
26
+ this.countryPermissions.setHostname(hostname);
27
+ this.calls.setHostname(hostname);
28
+ }
29
+ }
30
+ exports.ElasticSipTrunkingService = ElasticSipTrunkingService;
31
+ //# sourceMappingURL=elastic-sip-trunking-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elastic-sip-trunking-service.js","sourceRoot":"","sources":["../../../src/rest/v1/elastic-sip-trunking-service.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,+DAA6D;AAC7D,mDAAkD;AAClD,+DAA8D;AAC9D,mDAAkD;AAElD,MAAa,yBAAyB;IAQpC,YAAY,MAA6B;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAY,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,+BAAe,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,iBAAiB,GAAG,IAAI,0CAAoB,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,kBAAkB,GAAG,IAAI,2CAAqB,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,IAAI,+BAAe,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF;AA5BD,8DA4BC"}
@@ -0,0 +1,6 @@
1
+ export * from './access-control-list';
2
+ export * from './calls-history';
3
+ export * from './country-permissions';
4
+ export * from './sip-endpoints';
5
+ export * from './sip-trunks';
6
+ export * from './elastic-sip-trunking-service';
@@ -0,0 +1,23 @@
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("./calls-history"), exports);
19
+ __exportStar(require("./country-permissions"), exports);
20
+ __exportStar(require("./sip-endpoints"), exports);
21
+ __exportStar(require("./sip-trunks"), exports);
22
+ __exportStar(require("./elastic-sip-trunking-service"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rest/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,kDAAgC;AAChC,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,iEAA+C"}
@@ -0,0 +1,2 @@
1
+ export * from './sip-endpoints-api';
2
+ export * from './sip-endpoints-api.jest.fixture';
@@ -0,0 +1,19 @@
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("./sip-endpoints-api"), exports);
18
+ __exportStar(require("./sip-endpoints-api.jest.fixture"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/sip-endpoints/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,mEAAiD"}
@@ -0,0 +1,42 @@
1
+ import { CreateSipEndpointRequestData, DeleteSipEndpointRequestData, ListSipEndpointsRequestData, GetSipEndpointByIdRequestData, UpdateSipEndpointRequestData, SipEndpoint } from '../../../models';
2
+ import { SinchClientParameters, ApiListPromise } from '@sinch/sdk-client';
3
+ import { ElasticSipTrunkingDomainApi } from '../elastic-sip-trunking-domain-api';
4
+ export declare class SipEndpointsApi extends ElasticSipTrunkingDomainApi {
5
+ /**
6
+ * Initialize your interface
7
+ *
8
+ * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
9
+ */
10
+ constructor(sinchClientParameters: SinchClientParameters);
11
+ /**
12
+ * Create SIP endpoint
13
+ * Create a new SIP endpoint.
14
+ * @param { CreateSipEndpointRequestData } data - The data to provide to the API call.
15
+ */
16
+ create(data: CreateSipEndpointRequestData): Promise<SipEndpoint>;
17
+ /**
18
+ * Delete SIP endpoint
19
+ * Delete a SIP endpoint by specifying its ID.
20
+ * @param { DeleteSipEndpointRequestData } data - The data to provide to the API call.
21
+ */
22
+ delete(data: DeleteSipEndpointRequestData): Promise<void>;
23
+ /**
24
+ * Return SIP endpoints
25
+ * Returns a list of all SIP endpoints with paging.
26
+ * @param { ListSipEndpointsRequestData } data - The data to provide to the API call.
27
+ * @return { ApiListPromise<SipEndpoint> }
28
+ */
29
+ list(data: ListSipEndpointsRequestData): ApiListPromise<SipEndpoint>;
30
+ /**
31
+ * Get SIP endpoint by ID
32
+ * Get a SIP endpoint by specifying its ID.
33
+ * @param { GetSipEndpointByIdRequestData } data - The data to provide to the API call.
34
+ */
35
+ get(data: GetSipEndpointByIdRequestData): Promise<SipEndpoint>;
36
+ /**
37
+ * Update existing SIP endpoint
38
+ * Updated an existing SIP endpoint by specifying its ID.
39
+ * @param { UpdateSipEndpointRequestData } data - The data to provide to the API call.
40
+ */
41
+ update(data: UpdateSipEndpointRequestData): Promise<SipEndpoint>;
42
+ }
@@ -0,0 +1,26 @@
1
+ /// <reference types="jest" />
2
+ import { SipEndpointsApi } from './sip-endpoints-api';
3
+ import { SipEndpoint, CreateSipEndpointRequestData, DeleteSipEndpointRequestData, ListSipEndpointsRequestData, GetSipEndpointByIdRequestData, UpdateSipEndpointRequestData } from '../../../models';
4
+ import { ApiListPromise } from '@sinch/sdk-client';
5
+ export declare class SipEndpointsApiFixture implements Partial<Readonly<SipEndpointsApi>> {
6
+ /**
7
+ * Fixture associated to function create
8
+ */
9
+ create: jest.Mock<Promise<SipEndpoint>, [CreateSipEndpointRequestData]>;
10
+ /**
11
+ * Fixture associated to function delete
12
+ */
13
+ delete: jest.Mock<Promise<void>, [DeleteSipEndpointRequestData]>;
14
+ /**
15
+ * Fixture associated to function list
16
+ */
17
+ list: jest.Mock<ApiListPromise<SipEndpoint>, [ListSipEndpointsRequestData]>;
18
+ /**
19
+ * Fixture associated to function get
20
+ */
21
+ get: jest.Mock<Promise<SipEndpoint>, [GetSipEndpointByIdRequestData]>;
22
+ /**
23
+ * Fixture associated to function update
24
+ */
25
+ update: jest.Mock<Promise<SipEndpoint>, [UpdateSipEndpointRequestData]>;
26
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SipEndpointsApiFixture = void 0;
4
+ class SipEndpointsApiFixture {
5
+ constructor() {
6
+ /**
7
+ * Fixture associated to function create
8
+ */
9
+ this.create = jest.fn();
10
+ /**
11
+ * Fixture associated to function delete
12
+ */
13
+ this.delete = jest.fn();
14
+ /**
15
+ * Fixture associated to function list
16
+ */
17
+ this.list = jest.fn();
18
+ /**
19
+ * Fixture associated to function get
20
+ */
21
+ this.get = jest.fn();
22
+ /**
23
+ * Fixture associated to function update
24
+ */
25
+ this.update = jest.fn();
26
+ }
27
+ }
28
+ exports.SipEndpointsApiFixture = SipEndpointsApiFixture;
29
+ //# sourceMappingURL=sip-endpoints-api.jest.fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sip-endpoints-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/sip-endpoints/sip-endpoints-api.jest.fixture.ts"],"names":[],"mappings":";;;AAWA,MAAa,sBAAsB;IAAnC;QAEE;;WAEG;QACI,WAAM,GAAqE,IAAI,CAAC,EAAE,EAAE,CAAC;QAC5F;;WAEG;QACI,WAAM,GAA6D,IAAI,CAAC,EAAE,EAAE,CAAC;QACpF;;WAEG;QACI,SAAI,GAA0E,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/F;;WAEG;QACI,QAAG,GAAqE,IAAI,CAAC,EAAE,EAAE,CAAC;QACzF;;WAEG;QACI,WAAM,GAAoE,IAAI,CAAC,EAAE,EAAE,CAAC;IAC7F,CAAC;CAAA;AAtBD,wDAsBC"}
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SipEndpointsApi = void 0;
4
+ const sdk_client_1 = require("@sinch/sdk-client");
5
+ const elastic_sip_trunking_domain_api_1 = require("../elastic-sip-trunking-domain-api");
6
+ class SipEndpointsApi extends elastic_sip_trunking_domain_api_1.ElasticSipTrunkingDomainApi {
7
+ /**
8
+ * Initialize your interface
9
+ *
10
+ * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
11
+ */
12
+ constructor(sinchClientParameters) {
13
+ super(sinchClientParameters, 'SipEndpointsApi');
14
+ }
15
+ /**
16
+ * Create SIP endpoint
17
+ * Create a new SIP endpoint.
18
+ * @param { CreateSipEndpointRequestData } data - The data to provide to the API call.
19
+ */
20
+ async create(data) {
21
+ this.client = this.getSinchClient();
22
+ const getParams = this.client.extractQueryParams(data, []);
23
+ const headers = {
24
+ 'Content-Type': 'application/json',
25
+ 'Accept': 'application/json',
26
+ };
27
+ const body = data['createSipEndpointRequestBody']
28
+ ? JSON.stringify(data['createSipEndpointRequestBody'])
29
+ : '{}';
30
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/trunks/${data['sipTrunkId']}/endpoints`;
31
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body || undefined);
32
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
33
+ return this.client.processCall({
34
+ url,
35
+ requestOptions,
36
+ apiName: this.apiName,
37
+ operationId: 'CreateSipEndpoint',
38
+ });
39
+ }
40
+ /**
41
+ * Delete SIP endpoint
42
+ * Delete a SIP endpoint by specifying its ID.
43
+ * @param { DeleteSipEndpointRequestData } data - The data to provide to the API call.
44
+ */
45
+ async delete(data) {
46
+ this.client = this.getSinchClient();
47
+ const getParams = this.client.extractQueryParams(data, []);
48
+ const headers = {
49
+ 'Content-Type': 'application/json',
50
+ 'Accept': 'application/json',
51
+ };
52
+ const body = '';
53
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/trunks/${data['sipTrunkId']}/endpoints/${data['sipEndpointId']}`;
54
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'DELETE', getParams, headers, body || undefined);
55
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
56
+ return this.client.processCall({
57
+ url,
58
+ requestOptions,
59
+ apiName: this.apiName,
60
+ operationId: 'DeleteSipEndpoint',
61
+ });
62
+ }
63
+ /**
64
+ * Return SIP endpoints
65
+ * Returns a list of all SIP endpoints with paging.
66
+ * @param { ListSipEndpointsRequestData } data - The data to provide to the API call.
67
+ * @return { ApiListPromise<SipEndpoint> }
68
+ */
69
+ list(data) {
70
+ this.client = this.getSinchClient();
71
+ data['page'] = data['page'] !== undefined ? data['page'] : 1;
72
+ data['pageSize'] = data['pageSize'] !== undefined ? data['pageSize'] : 1000;
73
+ const getParams = this.client.extractQueryParams(data, ['page', 'pageSize']);
74
+ const headers = {
75
+ 'Content-Type': 'application/json',
76
+ 'Accept': 'application/json',
77
+ };
78
+ const body = '';
79
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/trunks/${data['sipTrunkId']}/endpoints`;
80
+ const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
81
+ const operationProperties = {
82
+ pagination: sdk_client_1.PaginationEnum.PAGE2,
83
+ apiName: this.apiName,
84
+ operationId: 'GetSipEndpoint',
85
+ dataKey: 'endpoints',
86
+ };
87
+ // Create the promise containing the response wrapped as a PageResult
88
+ const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
89
+ // Add properties to the Promise to offer the possibility to use it as an iterator
90
+ Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
91
+ return listPromise;
92
+ }
93
+ /**
94
+ * Get SIP endpoint by ID
95
+ * Get a SIP endpoint by specifying its ID.
96
+ * @param { GetSipEndpointByIdRequestData } data - The data to provide to the API call.
97
+ */
98
+ async get(data) {
99
+ this.client = this.getSinchClient();
100
+ const getParams = this.client.extractQueryParams(data, []);
101
+ const headers = {
102
+ 'Content-Type': 'application/json',
103
+ 'Accept': 'application/json',
104
+ };
105
+ const body = '';
106
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/trunks/${data['sipTrunkId']}/endpoints/${data['sipEndpointId']}`;
107
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
108
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
109
+ return this.client.processCall({
110
+ url,
111
+ requestOptions,
112
+ apiName: this.apiName,
113
+ operationId: 'GetSipEndpointById',
114
+ });
115
+ }
116
+ /**
117
+ * Update existing SIP endpoint
118
+ * Updated an existing SIP endpoint by specifying its ID.
119
+ * @param { UpdateSipEndpointRequestData } data - The data to provide to the API call.
120
+ */
121
+ async update(data) {
122
+ this.client = this.getSinchClient();
123
+ const getParams = this.client.extractQueryParams(data, []);
124
+ const headers = {
125
+ 'Content-Type': 'application/json',
126
+ 'Accept': 'application/json',
127
+ };
128
+ const body = data['updateSipEndpointRequestBody']
129
+ ? JSON.stringify(data['updateSipEndpointRequestBody'])
130
+ : '{}';
131
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/trunks/${data['sipTrunkId']}/endpoints/${data['sipEndpointId']}`;
132
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'PUT', getParams, headers, body || undefined);
133
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
134
+ return this.client.processCall({
135
+ url,
136
+ requestOptions,
137
+ apiName: this.apiName,
138
+ operationId: 'UpdateSipEndpoint',
139
+ });
140
+ }
141
+ }
142
+ exports.SipEndpointsApi = SipEndpointsApi;
143
+ //# sourceMappingURL=sip-endpoints-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sip-endpoints-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/sip-endpoints/sip-endpoints-api.ts"],"names":[],"mappings":";;;AAQA,kDAQ2B;A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,SAAS,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;YACtD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,WAAW,IAAI,CAAC,YAAY,CAAC,cAAc,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAErL,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QACnH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAc;YAC1C,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,mBAAmB;SACjC,CAAC,CAAC;IACL,CAAC;CAEF;AA7KD,0CA6KC"}
@@ -0,0 +1,2 @@
1
+ export * from './sip-trunks-api';
2
+ export * from './sip-trunks-api.jest.fixture';
@@ -0,0 +1,19 @@
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("./sip-trunks-api"), exports);
18
+ __exportStar(require("./sip-trunks-api.jest.fixture"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/sip-trunks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,gEAA8C"}
@@ -0,0 +1,61 @@
1
+ import { AddAccessControlListToTrunk, AddAccessControlListToTrunkRequestData, CreateSipTrunkRequestData, DeleteAccessControlListFromTrunkRequestData, DeleteSipTrunkRequestData, ListAccessControlListsForTrunkRequestData, GetSipTrunkRequestData, ListSipTrunksRequestData, UpdateSipTrunkRequestData, SipTrunk } from '../../../models';
2
+ import { SinchClientParameters, ApiListPromise } from '@sinch/sdk-client';
3
+ import { ElasticSipTrunkingDomainApi } from '../elastic-sip-trunking-domain-api';
4
+ export declare class SipTrunksApi extends ElasticSipTrunkingDomainApi {
5
+ /**
6
+ * Initialize your interface
7
+ *
8
+ * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
9
+ */
10
+ constructor(sinchClientParameters: SinchClientParameters);
11
+ /**
12
+ * Add ACL to a trunk
13
+ * Add an access control list entry to a trunk.
14
+ * @param { AddAccessControlListToTrunkRequestData } data - The data to provide to the API call.
15
+ */
16
+ addAccessControlList(data: AddAccessControlListToTrunkRequestData): Promise<AddAccessControlListToTrunk>;
17
+ /**
18
+ * Create SIP trunk
19
+ * Creates a new SIP trunk.
20
+ * @param { CreateSipTrunkRequestData } data - The data to provide to the API call.
21
+ */
22
+ create(data: CreateSipTrunkRequestData): Promise<SipTrunk>;
23
+ /**
24
+ * Delete ACL from trunk
25
+ * Remove an access control list entry from a trunk.
26
+ * @param { DeleteAccessControlListFromTrunkRequestData } data - The data to provide to the API call.
27
+ */
28
+ deleteAccessControlList(data: DeleteAccessControlListFromTrunkRequestData): Promise<void>;
29
+ /**
30
+ * Delete SIP trunk
31
+ * Delete a SIP trunk by its ID.
32
+ * @param { DeleteSipTrunkRequestData } data - The data to provide to the API call.
33
+ */
34
+ delete(data: DeleteSipTrunkRequestData): Promise<void>;
35
+ /**
36
+ * List all ACLs for a trunk
37
+ * Get all access control list entries for a trunk.
38
+ * @param { ListAccessControlListsForTrunkRequestData } data - The data to provide to the API call.
39
+ * @return { ApiListPromise<string> }
40
+ */
41
+ listAccessControlLists(data: ListAccessControlListsForTrunkRequestData): ApiListPromise<string>;
42
+ /**
43
+ * Get SIP Trunk
44
+ * Search for a SIP trunk by ID.
45
+ * @param { GetSipTrunkRequestData } data - The data to provide to the API call.
46
+ */
47
+ get(data: GetSipTrunkRequestData): Promise<SipTrunk>;
48
+ /**
49
+ * List SIP trunks
50
+ * Returns a list of all SIP trunks. If you specify pagination settings, the list of SIP trunks can be returned separated and sorted into pages.
51
+ * @param { ListSipTrunksRequestData } data - The data to provide to the API call.
52
+ * @return { ApiListPromise<SipTrunk> }
53
+ */
54
+ list(data: ListSipTrunksRequestData): ApiListPromise<SipTrunk>;
55
+ /**
56
+ * Update SIP trunk
57
+ * Update an existing SIP Trunk by ID. The whole object must be sent. Any missing fields will be set to null.
58
+ * @param { UpdateSipTrunkRequestData } data - The data to provide to the API call.
59
+ */
60
+ update(data: UpdateSipTrunkRequestData): Promise<SipTrunk>;
61
+ }
@@ -0,0 +1,42 @@
1
+ /// <reference types="jest" />
2
+ import { SipTrunksApi } from './sip-trunks-api';
3
+ import { AddAccessControlListToTrunk, SipTrunk, AddAccessControlListToTrunkRequestData, CreateSipTrunkRequestData, DeleteAccessControlListFromTrunkRequestData, DeleteSipTrunkRequestData, ListAccessControlListsForTrunkRequestData, GetSipTrunkRequestData, ListSipTrunksRequestData, UpdateSipTrunkRequestData } from '../../../models';
4
+ import { ApiListPromise } from '@sinch/sdk-client';
5
+ export declare class SipTrunksApiFixture implements Partial<Readonly<SipTrunksApi>> {
6
+ /**
7
+ * Fixture associated to function addAccessControlList
8
+ */
9
+ addAccessControlList: jest.Mock<Promise<AddAccessControlListToTrunk>, [
10
+ AddAccessControlListToTrunkRequestData
11
+ ]>;
12
+ /**
13
+ * Fixture associated to function create
14
+ */
15
+ create: jest.Mock<Promise<SipTrunk>, [CreateSipTrunkRequestData]>;
16
+ /**
17
+ * Fixture associated to function deleteAccessControlListFromTrunk
18
+ */
19
+ deleteAccessControlList: jest.Mock<Promise<void>, [DeleteAccessControlListFromTrunkRequestData]>;
20
+ /**
21
+ * Fixture associated to function deleteSipTrunk
22
+ */
23
+ delete: jest.Mock<Promise<void>, [DeleteSipTrunkRequestData]>;
24
+ /**
25
+ * Fixture associated to function getAccessControlListsForTrunk
26
+ */
27
+ listAccessControlLists: jest.Mock<ApiListPromise<string>, [
28
+ ListAccessControlListsForTrunkRequestData
29
+ ]>;
30
+ /**
31
+ * Fixture associated to function getSipTrunkById
32
+ */
33
+ get: jest.Mock<Promise<SipTrunk>, [GetSipTrunkRequestData]>;
34
+ /**
35
+ * Fixture associated to function getSipTrunks
36
+ */
37
+ list: jest.Mock<ApiListPromise<SipTrunk>, [ListSipTrunksRequestData]>;
38
+ /**
39
+ * Fixture associated to function updateSipTrunk
40
+ */
41
+ update: jest.Mock<Promise<SipTrunk>, [UpdateSipTrunkRequestData]>;
42
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SipTrunksApiFixture = void 0;
4
+ class SipTrunksApiFixture {
5
+ constructor() {
6
+ /**
7
+ * Fixture associated to function addAccessControlList
8
+ */
9
+ this.addAccessControlList = jest.fn();
10
+ /**
11
+ * Fixture associated to function create
12
+ */
13
+ this.create = jest.fn();
14
+ /**
15
+ * Fixture associated to function deleteAccessControlListFromTrunk
16
+ */
17
+ this.deleteAccessControlList = jest.fn();
18
+ /**
19
+ * Fixture associated to function deleteSipTrunk
20
+ */
21
+ this.delete = jest.fn();
22
+ /**
23
+ * Fixture associated to function getAccessControlListsForTrunk
24
+ */
25
+ this.listAccessControlLists = jest.fn();
26
+ /**
27
+ * Fixture associated to function getSipTrunkById
28
+ */
29
+ this.get = jest.fn();
30
+ /**
31
+ * Fixture associated to function getSipTrunks
32
+ */
33
+ this.list = jest.fn();
34
+ /**
35
+ * Fixture associated to function updateSipTrunk
36
+ */
37
+ this.update = jest.fn();
38
+ }
39
+ }
40
+ exports.SipTrunksApiFixture = SipTrunksApiFixture;
41
+ //# sourceMappingURL=sip-trunks-api.jest.fixture.js.map