@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,244 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccessControlListApi = 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
+ const sip_trunks_1 = require("../sip-trunks");
7
+ class AccessControlListApi extends elastic_sip_trunking_domain_api_1.ElasticSipTrunkingDomainApi {
8
+ /**
9
+ * Initialize your interface
10
+ *
11
+ * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
12
+ */
13
+ constructor(sinchClientParameters) {
14
+ super(sinchClientParameters, 'AccessControlListApi');
15
+ this.sipTrunksApi = new sip_trunks_1.SipTrunksApi(sinchClientParameters);
16
+ }
17
+ /**
18
+ * Add ACL to a trunk
19
+ * Add an access control list entry to a trunk.
20
+ * @param { AddAccessControlListToTrunkRequestData } data - The data to provide to the API call.
21
+ */
22
+ async addToTrunk(data) {
23
+ return this.sipTrunksApi.addAccessControlList(data);
24
+ }
25
+ /**
26
+ * List all ACLs for a trunk
27
+ * Get all access control list entries for a trunk.
28
+ * @param { ListAccessControlListsForTrunkRequestData } data - The data to provide to the API call.
29
+ * @return { ApiListPromise<string> }
30
+ */
31
+ listForTrunk(data) {
32
+ return this.sipTrunksApi.listAccessControlLists(data);
33
+ }
34
+ /**
35
+ * Delete ACL from trunk
36
+ * Remove an access control list entry from a trunk.
37
+ * @param { DeleteAccessControlListFromTrunkRequestData } data - The data to provide to the API call.
38
+ */
39
+ async deleteFromTrunk(data) {
40
+ return this.sipTrunksApi.deleteAccessControlList(data);
41
+ }
42
+ /**
43
+ * Add IP range to ACL
44
+ * Add an IP range to an access control list entry.
45
+ * @param { AddIpRangeToAccessControlListRequestData } data - The data to provide to the API call.
46
+ */
47
+ async addIpRange(data) {
48
+ this.client = this.getSinchClient();
49
+ const getParams = this.client.extractQueryParams(data, []);
50
+ const headers = {
51
+ 'Content-Type': 'application/json',
52
+ 'Accept': 'application/json',
53
+ };
54
+ const body = data['addIpRangeRequestBody'] ? JSON.stringify(data['addIpRangeRequestBody']) : '{}';
55
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists/${data['accessControlListId']}/ipRanges`;
56
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body || undefined);
57
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
58
+ return this.client.processCall({
59
+ url,
60
+ requestOptions,
61
+ apiName: this.apiName,
62
+ operationId: 'AddIpRangeToAccessControlList',
63
+ });
64
+ }
65
+ /**
66
+ * Create an ACL
67
+ * Create an access control list entry with at least one IP address or IP range.
68
+ * @param { CreateAccessControlListRequestData } data - The data to provide to the API call.
69
+ */
70
+ async create(data) {
71
+ this.client = this.getSinchClient();
72
+ const getParams = this.client.extractQueryParams(data, []);
73
+ const headers = {
74
+ 'Content-Type': 'application/json',
75
+ 'Accept': 'application/json',
76
+ };
77
+ const body = data['createAccessControlListBody']
78
+ ? JSON.stringify(data['createAccessControlListBody'])
79
+ : '{}';
80
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists`;
81
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body || undefined);
82
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
83
+ return this.client.processCall({
84
+ url,
85
+ requestOptions,
86
+ apiName: this.apiName,
87
+ operationId: 'CreateAccessControlList',
88
+ });
89
+ }
90
+ /**
91
+ * Delete ACL
92
+ * Delete an access control list entry.
93
+ * @param { DeleteAccessControlListRequestData } data - The data to provide to the API call.
94
+ */
95
+ async delete(data) {
96
+ this.client = this.getSinchClient();
97
+ const getParams = this.client.extractQueryParams(data, []);
98
+ const headers = {
99
+ 'Content-Type': 'application/json',
100
+ 'Accept': 'application/json',
101
+ };
102
+ const body = '';
103
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists/${data['id']}`;
104
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'DELETE', getParams, headers, body || undefined);
105
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
106
+ return this.client.processCall({
107
+ url,
108
+ requestOptions,
109
+ apiName: this.apiName,
110
+ operationId: 'DeleteAccessControlList',
111
+ });
112
+ }
113
+ /**
114
+ * Delete IP range from ACL
115
+ * Remove an IP range to an access control list entry.
116
+ * @param { DeleteIpRangeFromAccessControlListRequestData } data - The data to provide to the API call.
117
+ */
118
+ async deleteIpRange(data) {
119
+ this.client = this.getSinchClient();
120
+ const getParams = this.client.extractQueryParams(data, []);
121
+ const headers = {
122
+ 'Content-Type': 'application/json',
123
+ 'Accept': 'application/json',
124
+ };
125
+ const body = '';
126
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists/${data['accessControlListId']}/ipRanges/${data['ipRangeId']}`;
127
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'DELETE', getParams, headers, body || undefined);
128
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
129
+ return this.client.processCall({
130
+ url,
131
+ requestOptions,
132
+ apiName: this.apiName,
133
+ operationId: 'DeleteIpRangeFromAccessControlList',
134
+ });
135
+ }
136
+ /**
137
+ * List ACLs
138
+ * Fetches the list of Access Control List entries.
139
+ * @param { ListAccessControlListRequestData } data - The data to provide to the API call.
140
+ * @return { ApiListPromise<AccessControlList> }
141
+ */
142
+ list(data) {
143
+ this.client = this.getSinchClient();
144
+ const getParams = this.client.extractQueryParams(data, []);
145
+ const headers = {
146
+ 'Content-Type': 'application/json',
147
+ 'Accept': 'application/json',
148
+ };
149
+ const body = '';
150
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists`;
151
+ const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
152
+ const operationProperties = {
153
+ pagination: sdk_client_1.PaginationEnum.PAGE2,
154
+ apiName: this.apiName,
155
+ operationId: 'GetAccessControlList',
156
+ dataKey: 'accessControlLists',
157
+ };
158
+ // Create the promise containing the response wrapped as a PageResult
159
+ const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
160
+ // Add properties to the Promise to offer the possibility to use it as an iterator
161
+ Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
162
+ return listPromise;
163
+ }
164
+ /**
165
+ * List all IP ranges for ACL
166
+ * Get all IP ranges for an access control list entry.
167
+ * @param { ListIpRangesForAccessControlListRequestData } data - The data to provide to the API call.
168
+ * @return { ApiListPromise<IpRange> }
169
+ */
170
+ listIpRanges(data) {
171
+ this.client = this.getSinchClient();
172
+ const getParams = this.client.extractQueryParams(data, []);
173
+ const headers = {
174
+ 'Content-Type': 'application/json',
175
+ 'Accept': 'application/json',
176
+ };
177
+ const body = '';
178
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists/${data['accessControlListId']}/ipRanges`;
179
+ const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
180
+ const operationProperties = {
181
+ pagination: sdk_client_1.PaginationEnum.PAGE2,
182
+ apiName: this.apiName,
183
+ operationId: 'GetIpRangesForAccessControlList',
184
+ dataKey: 'ipRanges',
185
+ };
186
+ // Create the promise containing the response wrapped as a PageResult
187
+ const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
188
+ // Add properties to the Promise to offer the possibility to use it as an iterator
189
+ Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
190
+ return listPromise;
191
+ }
192
+ /**
193
+ * Update ACL
194
+ * Create an access control list entry with at least one IP address or IP range.
195
+ * @param { UpdateAccessControlListRequestData } data - The data to provide to the API call.
196
+ */
197
+ async update(data) {
198
+ this.client = this.getSinchClient();
199
+ const getParams = this.client.extractQueryParams(data, []);
200
+ const headers = {
201
+ 'Content-Type': 'application/json',
202
+ 'Accept': 'application/json',
203
+ };
204
+ const body = data['updateAccessControlListRequestBody']
205
+ ? JSON.stringify(data['updateAccessControlListRequestBody'])
206
+ : '{}';
207
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists/${data['id']}`;
208
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'PUT', getParams, headers, body || undefined);
209
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
210
+ return this.client.processCall({
211
+ url,
212
+ requestOptions,
213
+ apiName: this.apiName,
214
+ operationId: 'UpdateAccessControlList',
215
+ });
216
+ }
217
+ /**
218
+ * Update IP range
219
+ * Update an IP range to an access control list entry.
220
+ * @param { UpdateIpRangeFromAccessControlListRequestData } data - The data to provide to the API call.
221
+ */
222
+ async updateIpRange(data) {
223
+ this.client = this.getSinchClient();
224
+ const getParams = this.client.extractQueryParams(data, []);
225
+ const headers = {
226
+ 'Content-Type': 'application/json',
227
+ 'Accept': 'application/json',
228
+ };
229
+ const body = data['updateIpRangeRequestBody']
230
+ ? JSON.stringify(data['updateIpRangeRequestBody'])
231
+ : '{}';
232
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/accessControlLists/${data['accessControlListId']}/ipRanges/${data['ipRangeId']}`;
233
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'PUT', getParams, headers, body || undefined);
234
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
235
+ return this.client.processCall({
236
+ url,
237
+ requestOptions,
238
+ apiName: this.apiName,
239
+ operationId: 'UpdateIpRangeFromAccessControlList',
240
+ });
241
+ }
242
+ }
243
+ exports.AccessControlListApi = AccessControlListApi;
244
+ //# sourceMappingURL=access-control-list-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-control-list-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/access-control-list/access-control-list-api.ts"],"names":[],"mappings":";;;AAgBA,kDAQ2B;AAC3B,wFAAiF;AACjF,8CAA6C;AAE7C,MAAa,oBAAqB,SAAQ,6DAA2B;IAInE;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,sBAAsB,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,GAAG,IAAI,yBAAY,CAAC,qBAAqB,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,UAAU,CAAC,IAA4C;QAClE,OAAO,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,IAA+C;QACjE,OAAO,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,eAAe,CAAC,IAAiD;QAC5E,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C,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAC9C,IAAI,EACJ,EAAa,CACd,CAAC;QACF,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,0BAA0B,CAAC;YACxD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YAClD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,uBAAuB,IAAI,CAAC,qBAAqB,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAErM,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,CAAU;YACtC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,oCAAoC;SAClD,CAAC,CAAC;IACL,CAAC;CAEF;AAlTD,oDAkTC"}
@@ -0,0 +1,2 @@
1
+ export * from './access-control-list-api';
2
+ export * from './access-control-list-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("./access-control-list-api"), exports);
18
+ __exportStar(require("./access-control-list-api.jest.fixture"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/access-control-list/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,yEAAuD"}
@@ -0,0 +1,18 @@
1
+ import { Call, FindCallsRequestData } from '../../../models';
2
+ import { SinchClientParameters, ApiListPromise } from '@sinch/sdk-client';
3
+ import { ElasticSipTrunkingDomainApi } from '../elastic-sip-trunking-domain-api';
4
+ export declare class CallsHistoryApi 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
+ * Find calls
13
+ * Find calls by query parameters.
14
+ * @param { FindCallsRequestData } data - The data to provide to the API call.
15
+ * @return { ApiListPromise<Call> }
16
+ */
17
+ find(data: FindCallsRequestData): ApiListPromise<Call>;
18
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="jest" />
2
+ import { CallsHistoryApi } from './calls-history-api';
3
+ import { Call, FindCallsRequestData } from '../../../models';
4
+ import { ApiListPromise } from '@sinch/sdk-client';
5
+ export declare class CallsHistoryApiFixture implements Partial<Readonly<CallsHistoryApi>> {
6
+ /**
7
+ * Fixture associated to function find
8
+ */
9
+ find: jest.Mock<ApiListPromise<Call>, [FindCallsRequestData]>;
10
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallsHistoryApiFixture = void 0;
4
+ class CallsHistoryApiFixture {
5
+ constructor() {
6
+ /**
7
+ * Fixture associated to function find
8
+ */
9
+ this.find = jest.fn();
10
+ }
11
+ }
12
+ exports.CallsHistoryApiFixture = CallsHistoryApiFixture;
13
+ //# sourceMappingURL=calls-history-api.jest.fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls-history-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/calls-history/calls-history-api.jest.fixture.ts"],"names":[],"mappings":";;;AAIA,MAAa,sBAAsB;IAAnC;QAEE;;WAEG;QACI,SAAI,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;IACnF,CAAC;CAAA;AAND,wDAMC"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallsHistoryApi = 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 CallsHistoryApi 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, 'CallsHistoryApi');
14
+ }
15
+ /**
16
+ * Find calls
17
+ * Find calls by query parameters.
18
+ * @param { FindCallsRequestData } data - The data to provide to the API call.
19
+ * @return { ApiListPromise<Call> }
20
+ */
21
+ find(data) {
22
+ this.client = this.getSinchClient();
23
+ data['createTime'] = data['createTime'] !== undefined ? data['createTime'] : 'now-24h';
24
+ const getParams = this.client.extractQueryParams(data, [
25
+ 'from', 'to', 'trunkId', 'createTime', 'callResult', 'direction', 'page', 'pageSize'
26
+ ]);
27
+ const headers = {
28
+ 'Content-Type': 'application/json',
29
+ 'Accept': 'application/json',
30
+ };
31
+ const body = '';
32
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/calls`;
33
+ const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
34
+ const operationProperties = {
35
+ pagination: sdk_client_1.PaginationEnum.PAGE2,
36
+ apiName: this.apiName,
37
+ operationId: 'FindCalls',
38
+ dataKey: 'calls',
39
+ };
40
+ // Create the promise containing the response wrapped as a PageResult
41
+ const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
42
+ // Add properties to the Promise to offer the possibility to use it as an iterator
43
+ Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
44
+ return listPromise;
45
+ }
46
+ }
47
+ exports.CallsHistoryApi = CallsHistoryApi;
48
+ //# sourceMappingURL=calls-history-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls-history-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/calls-history/calls-history-api.ts"],"names":[],"mappings":";;;AACA,kDAQ2B;AAC3B,wFAAiF;AAEjF,MAAa,eAAgB,SAAQ,6DAA2B;IAE9D;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,IAAI,CAAC,IAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvF,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAuB,IAAI,EAAE;YAC3E,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU;SAAC,CAAC,CAAC;QACzF,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,QAAQ,CAAC;QAE3H,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAEpH,MAAM,mBAAmB,GAA2B;YAClD,UAAU,EAAE,2BAAc,CAAC,KAAK;YAChC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,WAAW;YACxB,OAAO,EAAE,OAAO;SACjB,CAAC;QAEF,qEAAqE;QACrE,MAAM,WAAW,GAAG,IAAA,mCAAsB,EACxC,IAAI,CAAC,MAAM,EACX,qBAAqB,EACrB,mBAAmB,CACpB,CAAC;QAEF,kFAAkF;QAClF,MAAM,CAAC,MAAM,CACX,WAAW,EACX,IAAA,+CAAkC,EAChC,IAAI,CAAC,MAAM,EAAE,qBAAqB,EAAE,WAAW,EAAE,mBAAmB,CAAC,CACxE,CAAC;QAEF,OAAO,WAAmC,CAAC;IAC7C,CAAC;CAEF;AAxDD,0CAwDC"}
@@ -0,0 +1,2 @@
1
+ export * from './calls-history-api';
2
+ export * from './calls-history-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("./calls-history-api"), exports);
18
+ __exportStar(require("./calls-history-api.jest.fixture"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/calls-history/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,mEAAiD"}
@@ -0,0 +1,29 @@
1
+ import { CountryPermission, ListCountryPermissionsResponse, GetCountryPermissionRequestData, ListCountryPermissionsRequestData, UpdateCountryPermissionRequestData } from '../../../models';
2
+ import { SinchClientParameters } from '@sinch/sdk-client';
3
+ import { ElasticSipTrunkingDomainApi } from '../elastic-sip-trunking-domain-api';
4
+ export declare class CountryPermissionsApi 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
+ * Fetch country permission
13
+ * Fetches the requested country permission.
14
+ * @param { GetCountryPermissionRequestData } data - The data to provide to the API call.
15
+ */
16
+ get(data: GetCountryPermissionRequestData): Promise<CountryPermission>;
17
+ /**
18
+ * Fetch all country permissions
19
+ * Fetches the list of country permissions.
20
+ * @param { ListCountryPermissionsRequestData } data - The data to provide to the API call.
21
+ */
22
+ list(data: ListCountryPermissionsRequestData): Promise<ListCountryPermissionsResponse>;
23
+ /**
24
+ * Update country permission
25
+ * Update the requested country permission.
26
+ * @param { UpdateCountryPermissionRequestData } data - The data to provide to the API call.
27
+ */
28
+ update(data: UpdateCountryPermissionRequestData): Promise<CountryPermission>;
29
+ }
@@ -0,0 +1,21 @@
1
+ /// <reference types="jest" />
2
+ import { CountryPermissionsApi } from './country-permissions-api';
3
+ import { CountryPermission, GetCountryPermissionRequestData, ListCountryPermissionsRequestData, ListCountryPermissionsResponse, UpdateCountryPermissionRequestData } from '../../../models';
4
+ export declare class CountryPermissionsApiFixture implements Partial<Readonly<CountryPermissionsApi>> {
5
+ /**
6
+ * Fixture associated to function getCountryPermission
7
+ */
8
+ get: jest.Mock<Promise<CountryPermission>, [GetCountryPermissionRequestData]>;
9
+ /**
10
+ * Fixture associated to function getCountryPermissions
11
+ */
12
+ list: jest.Mock<Promise<ListCountryPermissionsResponse>, [
13
+ ListCountryPermissionsRequestData
14
+ ]>;
15
+ /**
16
+ * Fixture associated to function updateCountryPermission
17
+ */
18
+ update: jest.Mock<Promise<CountryPermission>, [
19
+ UpdateCountryPermissionRequestData
20
+ ]>;
21
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountryPermissionsApiFixture = void 0;
4
+ class CountryPermissionsApiFixture {
5
+ constructor() {
6
+ /**
7
+ * Fixture associated to function getCountryPermission
8
+ */
9
+ this.get = jest.fn();
10
+ /**
11
+ * Fixture associated to function getCountryPermissions
12
+ */
13
+ this.list = jest.fn();
14
+ /**
15
+ * Fixture associated to function updateCountryPermission
16
+ */
17
+ this.update = jest.fn();
18
+ }
19
+ }
20
+ exports.CountryPermissionsApiFixture = CountryPermissionsApiFixture;
21
+ //# sourceMappingURL=country-permissions-api.jest.fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-permissions-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/country-permissions/country-permissions-api.jest.fixture.ts"],"names":[],"mappings":";;;AASA,MAAa,4BAA4B;IAAzC;QAEE;;WAEG;QACI,QAAG,GAA6E,IAAI,CAAC,EAAE,EAAE,CAAC;QACjG;;WAEG;QACI,SAAI,GAGP,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,WAAM,GAGT,IAAI,CAAC,EAAE,EAAE,CAAC;IAChB,CAAC;CAAA;AApBD,oEAoBC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountryPermissionsApi = void 0;
4
+ const elastic_sip_trunking_domain_api_1 = require("../elastic-sip-trunking-domain-api");
5
+ class CountryPermissionsApi extends elastic_sip_trunking_domain_api_1.ElasticSipTrunkingDomainApi {
6
+ /**
7
+ * Initialize your interface
8
+ *
9
+ * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
10
+ */
11
+ constructor(sinchClientParameters) {
12
+ super(sinchClientParameters, 'CountryPermissionsApi');
13
+ }
14
+ /**
15
+ * Fetch country permission
16
+ * Fetches the requested country permission.
17
+ * @param { GetCountryPermissionRequestData } data - The data to provide to the API call.
18
+ */
19
+ async get(data) {
20
+ this.client = this.getSinchClient();
21
+ const getParams = this.client.extractQueryParams(data, []);
22
+ const headers = {
23
+ 'Content-Type': 'application/json',
24
+ 'Accept': 'application/json',
25
+ };
26
+ const body = '';
27
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/countryPermissions/${data['isoCode']}`;
28
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
29
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
30
+ return this.client.processCall({
31
+ url,
32
+ requestOptions,
33
+ apiName: this.apiName,
34
+ operationId: 'GetCountryPermission',
35
+ });
36
+ }
37
+ /**
38
+ * Fetch all country permissions
39
+ * Fetches the list of country permissions.
40
+ * @param { ListCountryPermissionsRequestData } data - The data to provide to the API call.
41
+ */
42
+ async list(data) {
43
+ this.client = this.getSinchClient();
44
+ const getParams = this.client.extractQueryParams(data, []);
45
+ const headers = {
46
+ 'Content-Type': 'application/json',
47
+ 'Accept': 'application/json',
48
+ };
49
+ const body = '';
50
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/countryPermissions`;
51
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
52
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
53
+ return this.client.processCall({
54
+ url,
55
+ requestOptions,
56
+ apiName: this.apiName,
57
+ operationId: 'GetCountryPermissions',
58
+ });
59
+ }
60
+ /**
61
+ * Update country permission
62
+ * Update the requested country permission.
63
+ * @param { UpdateCountryPermissionRequestData } data - The data to provide to the API call.
64
+ */
65
+ async update(data) {
66
+ this.client = this.getSinchClient();
67
+ const getParams = this.client.extractQueryParams(data, []);
68
+ const headers = {
69
+ 'Content-Type': 'application/json',
70
+ 'Accept': 'application/json',
71
+ };
72
+ const body = data['updateCountryPermissionRequestBody']
73
+ ? JSON.stringify(data['updateCountryPermissionRequestBody'])
74
+ : '{}';
75
+ const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/countryPermissions/${data['isoCode']}`;
76
+ const requestOptions = await this.client.prepareOptions(basePathUrl, 'PUT', getParams, headers, body || undefined);
77
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
78
+ return this.client.processCall({
79
+ url,
80
+ requestOptions,
81
+ apiName: this.apiName,
82
+ operationId: 'UpdateCountryPermission',
83
+ });
84
+ }
85
+ }
86
+ exports.CountryPermissionsApi = CountryPermissionsApi;
87
+ //# sourceMappingURL=country-permissions-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-permissions-api.js","sourceRoot":"","sources":["../../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AC5D,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,uBAAuB,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAE3J,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,CAAoB;YAChD,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,yBAAyB;SACvC,CAAC,CAAC;IACL,CAAC;CAGF;AA/FD,sDA+FC"}
@@ -0,0 +1,2 @@
1
+ export * from './country-permissions-api';
2
+ export * from './country-permissions-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("./country-permissions-api"), exports);
18
+ __exportStar(require("./country-permissions-api.jest.fixture"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/country-permissions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,yEAAuD"}