@ndustrial/contxt-sdk 5.5.7 → 5.6.1

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 (230) hide show
  1. package/.nvmrc +1 -1
  2. package/eslint.config.mjs +44 -0
  3. package/esm/bus/channels.js +1883 -216
  4. package/esm/bus/channels.js.map +1 -1
  5. package/esm/bus/index.browser.js +218 -37
  6. package/esm/bus/index.browser.js.map +1 -1
  7. package/esm/bus/index.js +906 -94
  8. package/esm/bus/index.js.map +1 -1
  9. package/esm/bus/webSocketConnection.browser.js +86 -12
  10. package/esm/bus/webSocketConnection.browser.js.map +1 -1
  11. package/esm/bus/webSocketConnection.js +2464 -332
  12. package/esm/bus/webSocketConnection.js.map +1 -1
  13. package/esm/config/audiences.js +37 -1
  14. package/esm/config/audiences.js.map +1 -1
  15. package/esm/config/defaults.js +37 -1
  16. package/esm/config/defaults.js.map +1 -1
  17. package/esm/config/index.js +1622 -203
  18. package/esm/config/index.js.map +1 -1
  19. package/esm/coordinator/applications.js +1019 -172
  20. package/esm/coordinator/applications.js.map +1 -1
  21. package/esm/coordinator/consent.js +603 -76
  22. package/esm/coordinator/consent.js.map +1 -1
  23. package/esm/coordinator/edgeNodes.js +520 -40
  24. package/esm/coordinator/edgeNodes.js.map +1 -1
  25. package/esm/coordinator/index.js +811 -54
  26. package/esm/coordinator/index.js.map +1 -1
  27. package/esm/coordinator/organizations.js +533 -60
  28. package/esm/coordinator/organizations.js.map +1 -1
  29. package/esm/coordinator/permissions.js +914 -107
  30. package/esm/coordinator/permissions.js.map +1 -1
  31. package/esm/coordinator/roles.js +2146 -258
  32. package/esm/coordinator/roles.js.map +1 -1
  33. package/esm/coordinator/users.js +3427 -484
  34. package/esm/coordinator/users.js.map +1 -1
  35. package/esm/events/index.js +2301 -393
  36. package/esm/events/index.js.map +1 -1
  37. package/esm/files/index.js +2053 -410
  38. package/esm/files/index.js.map +1 -1
  39. package/esm/index.js +1002 -148
  40. package/esm/index.js.map +1 -1
  41. package/esm/iot/feedTypes.js +188 -25
  42. package/esm/iot/feedTypes.js.map +1 -1
  43. package/esm/iot/feeds.js +420 -59
  44. package/esm/iot/feeds.js.map +1 -1
  45. package/esm/iot/fieldCategories.js +1172 -195
  46. package/esm/iot/fieldCategories.js.map +1 -1
  47. package/esm/iot/fieldGroupings.js +1689 -255
  48. package/esm/iot/fieldGroupings.js.map +1 -1
  49. package/esm/iot/fields.js +254 -28
  50. package/esm/iot/fields.js.map +1 -1
  51. package/esm/iot/index.js +212 -34
  52. package/esm/iot/index.js.map +1 -1
  53. package/esm/iot/outputs.js +320 -31
  54. package/esm/iot/outputs.js.map +1 -1
  55. package/esm/nionic/index.js +1097 -97
  56. package/esm/nionic/index.js.map +1 -1
  57. package/esm/request.js +1313 -219
  58. package/esm/request.js.map +1 -1
  59. package/esm/sessionTypes/auth0WebAuth.js +3395 -409
  60. package/esm/sessionTypes/auth0WebAuth.js.map +1 -1
  61. package/esm/sessionTypes/index.js +213 -22
  62. package/esm/sessionTypes/index.js.map +1 -1
  63. package/esm/sessionTypes/machineAuth.js +1314 -144
  64. package/esm/sessionTypes/machineAuth.js.map +1 -1
  65. package/esm/sessionTypes/passwordGrantAuth.js +1060 -145
  66. package/esm/sessionTypes/passwordGrantAuth.js.map +1 -1
  67. package/esm/utils/events/formatEventUpdateToServer.js +107 -4
  68. package/esm/utils/events/formatEventUpdateToServer.js.map +1 -1
  69. package/esm/utils/events/index.js +54 -2
  70. package/esm/utils/events/index.js.map +1 -1
  71. package/esm/utils/iot/formatOutputFieldDataFromServer.js +227 -14
  72. package/esm/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
  73. package/esm/utils/iot/index.js +56 -3
  74. package/esm/utils/iot/index.js.map +1 -1
  75. package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js +207 -7
  76. package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
  77. package/esm/utils/objects/createCaseChangeFn.js +449 -18
  78. package/esm/utils/objects/createCaseChangeFn.js.map +1 -1
  79. package/esm/utils/objects/index.js +56 -3
  80. package/esm/utils/objects/index.js.map +1 -1
  81. package/esm/utils/objects/map.js +520 -26
  82. package/esm/utils/objects/map.js.map +1 -1
  83. package/esm/utils/objects/toCamelCase.js +39 -3
  84. package/esm/utils/objects/toCamelCase.js.map +1 -1
  85. package/esm/utils/objects/toSnakeCase.js +39 -3
  86. package/esm/utils/objects/toSnakeCase.js.map +1 -1
  87. package/esm/utils/pagination/formatPaginatedDataFromServer.js +268 -11
  88. package/esm/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
  89. package/esm/utils/pagination/index.js +54 -2
  90. package/esm/utils/pagination/index.js.map +1 -1
  91. package/esm/utils/url/index.js +47 -2
  92. package/esm/utils/url/index.js.map +1 -1
  93. package/esm/utils/url/stringifyParams.js +176 -10
  94. package/esm/utils/url/stringifyParams.js.map +1 -1
  95. package/lib/bus/channels.js +1880 -223
  96. package/lib/bus/channels.js.map +1 -1
  97. package/lib/bus/index.browser.js +215 -43
  98. package/lib/bus/index.browser.js.map +1 -1
  99. package/lib/bus/index.js +903 -106
  100. package/lib/bus/index.js.map +1 -1
  101. package/lib/bus/webSocketConnection.browser.js +83 -15
  102. package/lib/bus/webSocketConnection.browser.js.map +1 -1
  103. package/lib/bus/webSocketConnection.js +2461 -339
  104. package/lib/bus/webSocketConnection.js.map +1 -1
  105. package/lib/config/audiences.js +33 -2
  106. package/lib/config/audiences.js.map +1 -1
  107. package/lib/config/defaults.js +33 -2
  108. package/lib/config/defaults.js.map +1 -1
  109. package/lib/config/index.js +1619 -212
  110. package/lib/config/index.js.map +1 -1
  111. package/lib/coordinator/applications.js +1016 -174
  112. package/lib/coordinator/applications.js.map +1 -1
  113. package/lib/coordinator/consent.js +600 -78
  114. package/lib/coordinator/consent.js.map +1 -1
  115. package/lib/coordinator/edgeNodes.js +517 -42
  116. package/lib/coordinator/edgeNodes.js.map +1 -1
  117. package/lib/coordinator/index.js +808 -78
  118. package/lib/coordinator/index.js.map +1 -1
  119. package/lib/coordinator/organizations.js +530 -62
  120. package/lib/coordinator/organizations.js.map +1 -1
  121. package/lib/coordinator/permissions.js +911 -109
  122. package/lib/coordinator/permissions.js.map +1 -1
  123. package/lib/coordinator/roles.js +2143 -260
  124. package/lib/coordinator/roles.js.map +1 -1
  125. package/lib/coordinator/users.js +3423 -489
  126. package/lib/coordinator/users.js.map +1 -1
  127. package/lib/events/index.js +2297 -404
  128. package/lib/events/index.js.map +1 -1
  129. package/lib/files/index.js +2050 -418
  130. package/lib/files/index.js.map +1 -1
  131. package/lib/index.js +999 -183
  132. package/lib/index.js.map +1 -1
  133. package/lib/iot/feedTypes.js +185 -27
  134. package/lib/iot/feedTypes.js.map +1 -1
  135. package/lib/iot/feeds.js +417 -61
  136. package/lib/iot/feeds.js.map +1 -1
  137. package/lib/iot/fieldCategories.js +1169 -203
  138. package/lib/iot/fieldCategories.js.map +1 -1
  139. package/lib/iot/fieldGroupings.js +1686 -263
  140. package/lib/iot/fieldGroupings.js.map +1 -1
  141. package/lib/iot/fields.js +251 -30
  142. package/lib/iot/fields.js.map +1 -1
  143. package/lib/iot/index.js +209 -55
  144. package/lib/iot/index.js.map +1 -1
  145. package/lib/iot/outputs.js +317 -34
  146. package/lib/iot/outputs.js.map +1 -1
  147. package/lib/nionic/index.js +1094 -98
  148. package/lib/nionic/index.js.map +1 -1
  149. package/lib/request.js +1310 -226
  150. package/lib/request.js.map +1 -1
  151. package/lib/sessionTypes/auth0WebAuth.js +3391 -421
  152. package/lib/sessionTypes/auth0WebAuth.js.map +1 -1
  153. package/lib/sessionTypes/index.js +209 -26
  154. package/lib/sessionTypes/index.js.map +1 -1
  155. package/lib/sessionTypes/machineAuth.js +1311 -151
  156. package/lib/sessionTypes/machineAuth.js.map +1 -1
  157. package/lib/sessionTypes/passwordGrantAuth.js +1057 -156
  158. package/lib/sessionTypes/passwordGrantAuth.js.map +1 -1
  159. package/lib/utils/events/formatEventUpdateToServer.js +102 -4
  160. package/lib/utils/events/formatEventUpdateToServer.js.map +1 -1
  161. package/lib/utils/events/index.js +51 -10
  162. package/lib/utils/events/index.js.map +1 -1
  163. package/lib/utils/iot/formatOutputFieldDataFromServer.js +224 -18
  164. package/lib/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
  165. package/lib/utils/iot/index.js +53 -15
  166. package/lib/utils/iot/index.js.map +1 -1
  167. package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js +203 -13
  168. package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
  169. package/lib/utils/objects/createCaseChangeFn.js +446 -25
  170. package/lib/utils/objects/createCaseChangeFn.js.map +1 -1
  171. package/lib/utils/objects/index.js +53 -15
  172. package/lib/utils/objects/index.js.map +1 -1
  173. package/lib/utils/objects/map.js +517 -33
  174. package/lib/utils/objects/map.js.map +1 -1
  175. package/lib/utils/objects/toCamelCase.js +36 -11
  176. package/lib/utils/objects/toCamelCase.js.map +1 -1
  177. package/lib/utils/objects/toSnakeCase.js +36 -11
  178. package/lib/utils/objects/toSnakeCase.js.map +1 -1
  179. package/lib/utils/pagination/formatPaginatedDataFromServer.js +265 -14
  180. package/lib/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
  181. package/lib/utils/pagination/index.js +51 -10
  182. package/lib/utils/pagination/index.js.map +1 -1
  183. package/lib/utils/url/index.js +44 -7
  184. package/lib/utils/url/index.js.map +1 -1
  185. package/lib/utils/url/stringifyParams.js +172 -18
  186. package/lib/utils/url/stringifyParams.js.map +1 -1
  187. package/package.json +32 -36
  188. package/src/bus/channels.js +6 -6
  189. package/src/bus/channels.spec.js +1 -1
  190. package/src/coordinator/applications.js +7 -7
  191. package/src/coordinator/applications.spec.js +1 -1
  192. package/src/coordinator/consent.js +3 -3
  193. package/src/coordinator/edgeNodes.js +3 -3
  194. package/src/coordinator/edgeNodes.spec.js +1 -1
  195. package/src/coordinator/organizations.js +4 -4
  196. package/src/coordinator/organizations.spec.js +1 -1
  197. package/src/coordinator/permissions.js +6 -6
  198. package/src/coordinator/permissions.spec.js +1 -1
  199. package/src/coordinator/roles.js +9 -9
  200. package/src/coordinator/roles.spec.js +1 -1
  201. package/src/coordinator/users.js +13 -13
  202. package/src/coordinator/users.spec.js +294 -294
  203. package/src/events/index.js +18 -18
  204. package/src/events/index.spec.js +3 -3
  205. package/src/files/index.js +9 -9
  206. package/src/files/index.spec.js +2 -2
  207. package/src/index.js +3 -1
  208. package/src/iot/feedTypes.js +2 -2
  209. package/src/iot/feeds.js +4 -4
  210. package/src/iot/feeds.spec.js +1 -1
  211. package/src/iot/fieldCategories.js +10 -10
  212. package/src/iot/fieldCategories.spec.js +2 -2
  213. package/src/iot/fieldGroupings.js +10 -10
  214. package/src/iot/fieldGroupings.spec.js +2 -2
  215. package/src/iot/fields.js +2 -2
  216. package/src/iot/fields.spec.js +1 -1
  217. package/src/iot/outputs.js +2 -2
  218. package/src/iot/outputs.spec.js +1 -1
  219. package/src/sessionTypes/auth0WebAuth.spec.js +1 -1
  220. package/src/utils/events/index.js +2 -1
  221. package/src/utils/iot/formatOutputFieldDataFromServer.js +5 -5
  222. package/src/utils/iot/formatOutputFieldDataFromServer.spec.js +2 -2
  223. package/src/utils/iot/index.js +2 -1
  224. package/src/utils/iot/parseOutputFieldNextPageUrlMetadata.js +3 -1
  225. package/src/utils/objects/index.js +2 -1
  226. package/src/utils/pagination/formatPaginatedDataFromServer.js +3 -3
  227. package/src/utils/pagination/formatPaginatedDataFromServer.spec.js +1 -1
  228. package/src/utils/pagination/index.js +2 -1
  229. package/support/mocharc.yml +1 -1
  230. package/.eslintrc +0 -24
@@ -1,15 +1,836 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
-
9
- var _objects = require('../utils/objects');
10
-
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
-
6
+ exports.default = void 0;
7
+ require("core-js/modules/es.array.map.js");
8
+ require("core-js/modules/es.promise.js");
9
+ require("core-js/modules/esnext.iterator.map.js");
10
+ var _objects = _interopRequireDefault(require("../utils/objects"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function cov_6f7j1vvio() {
13
+ var path = "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/coordinator/applications.js";
14
+ var hash = "8930fc7d546e35eb0b8a717e30ce211654dbe0ed";
15
+ var global = new Function("return this")();
16
+ var gcv = "__coverage__";
17
+ var coverageData = {
18
+ path: "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/coordinator/applications.js",
19
+ statementMap: {
20
+ "0": {
21
+ start: {
22
+ line: 73,
23
+ column: 4
24
+ },
25
+ end: {
26
+ line: 73,
27
+ column: 28
28
+ }
29
+ },
30
+ "1": {
31
+ start: {
32
+ line: 74,
33
+ column: 4
34
+ },
35
+ end: {
36
+ line: 74,
37
+ column: 28
38
+ }
39
+ },
40
+ "2": {
41
+ start: {
42
+ line: 75,
43
+ column: 4
44
+ },
45
+ end: {
46
+ line: 75,
47
+ column: 20
48
+ }
49
+ },
50
+ "3": {
51
+ start: {
52
+ line: 76,
53
+ column: 4
54
+ },
55
+ end: {
56
+ line: 76,
57
+ column: 42
58
+ }
59
+ },
60
+ "4": {
61
+ start: {
62
+ line: 100,
63
+ column: 4
64
+ },
65
+ end: {
66
+ line: 106,
67
+ column: 5
68
+ }
69
+ },
70
+ "5": {
71
+ start: {
72
+ line: 101,
73
+ column: 6
74
+ },
75
+ end: {
76
+ line: 105,
77
+ column: 8
78
+ }
79
+ },
80
+ "6": {
81
+ start: {
82
+ line: 108,
83
+ column: 4
84
+ },
85
+ end: {
86
+ line: 110,
87
+ column: 83
88
+ }
89
+ },
90
+ "7": {
91
+ start: {
92
+ line: 110,
93
+ column: 37
94
+ },
95
+ end: {
96
+ line: 110,
97
+ column: 81
98
+ }
99
+ },
100
+ "8": {
101
+ start: {
102
+ line: 130,
103
+ column: 4
104
+ },
105
+ end: {
106
+ line: 132,
107
+ column: 71
108
+ }
109
+ },
110
+ "9": {
111
+ start: {
112
+ line: 132,
113
+ column: 22
114
+ },
115
+ end: {
116
+ line: 132,
117
+ column: 69
118
+ }
119
+ },
120
+ "10": {
121
+ start: {
122
+ line: 132,
123
+ column: 40
124
+ },
125
+ end: {
126
+ line: 132,
127
+ column: 68
128
+ }
129
+ },
130
+ "11": {
131
+ start: {
132
+ line: 154,
133
+ column: 4
134
+ },
135
+ end: {
136
+ line: 156,
137
+ column: 69
138
+ }
139
+ },
140
+ "12": {
141
+ start: {
142
+ line: 156,
143
+ column: 30
144
+ },
145
+ end: {
146
+ line: 156,
147
+ column: 67
148
+ }
149
+ },
150
+ "13": {
151
+ start: {
152
+ line: 181,
153
+ column: 4
154
+ },
155
+ end: {
156
+ line: 185,
157
+ column: 5
158
+ }
159
+ },
160
+ "14": {
161
+ start: {
162
+ line: 182,
163
+ column: 6
164
+ },
165
+ end: {
166
+ line: 184,
167
+ column: 87
168
+ }
169
+ },
170
+ "15": {
171
+ start: {
172
+ line: 184,
173
+ column: 40
174
+ },
175
+ end: {
176
+ line: 184,
177
+ column: 85
178
+ }
179
+ },
180
+ "16": {
181
+ start: {
182
+ line: 187,
183
+ column: 4
184
+ },
185
+ end: {
186
+ line: 193,
187
+ column: 5
188
+ }
189
+ },
190
+ "17": {
191
+ start: {
192
+ line: 188,
193
+ column: 6
194
+ },
195
+ end: {
196
+ line: 192,
197
+ column: 8
198
+ }
199
+ },
200
+ "18": {
201
+ start: {
202
+ line: 195,
203
+ column: 4
204
+ },
205
+ end: {
206
+ line: 199,
207
+ column: 85
208
+ }
209
+ },
210
+ "19": {
211
+ start: {
212
+ line: 199,
213
+ column: 38
214
+ },
215
+ end: {
216
+ line: 199,
217
+ column: 83
218
+ }
219
+ },
220
+ "20": {
221
+ start: {
222
+ line: 222,
223
+ column: 4
224
+ },
225
+ end: {
226
+ line: 224,
227
+ column: 63
228
+ }
229
+ },
230
+ "21": {
231
+ start: {
232
+ line: 224,
233
+ column: 27
234
+ },
235
+ end: {
236
+ line: 224,
237
+ column: 61
238
+ }
239
+ },
240
+ "22": {
241
+ start: {
242
+ line: 247,
243
+ column: 4
244
+ },
245
+ end: {
246
+ line: 253,
247
+ column: 5
248
+ }
249
+ },
250
+ "23": {
251
+ start: {
252
+ line: 248,
253
+ column: 6
254
+ },
255
+ end: {
256
+ line: 252,
257
+ column: 8
258
+ }
259
+ },
260
+ "24": {
261
+ start: {
262
+ line: 255,
263
+ column: 4
264
+ },
265
+ end: {
266
+ line: 257,
267
+ column: 6
268
+ }
269
+ }
270
+ },
271
+ fnMap: {
272
+ "0": {
273
+ name: "(anonymous_0)",
274
+ decl: {
275
+ start: {
276
+ line: 72,
277
+ column: 2
278
+ },
279
+ end: {
280
+ line: 72,
281
+ column: 3
282
+ }
283
+ },
284
+ loc: {
285
+ start: {
286
+ line: 72,
287
+ column: 60
288
+ },
289
+ end: {
290
+ line: 77,
291
+ column: 3
292
+ }
293
+ },
294
+ line: 72
295
+ },
296
+ "1": {
297
+ name: "(anonymous_1)",
298
+ decl: {
299
+ start: {
300
+ line: 99,
301
+ column: 2
302
+ },
303
+ end: {
304
+ line: 99,
305
+ column: 3
306
+ }
307
+ },
308
+ loc: {
309
+ start: {
310
+ line: 99,
311
+ column: 29
312
+ },
313
+ end: {
314
+ line: 111,
315
+ column: 3
316
+ }
317
+ },
318
+ line: 99
319
+ },
320
+ "2": {
321
+ name: "(anonymous_2)",
322
+ decl: {
323
+ start: {
324
+ line: 110,
325
+ column: 12
326
+ },
327
+ end: {
328
+ line: 110,
329
+ column: 13
330
+ }
331
+ },
332
+ loc: {
333
+ start: {
334
+ line: 110,
335
+ column: 37
336
+ },
337
+ end: {
338
+ line: 110,
339
+ column: 81
340
+ }
341
+ },
342
+ line: 110
343
+ },
344
+ "3": {
345
+ name: "(anonymous_3)",
346
+ decl: {
347
+ start: {
348
+ line: 129,
349
+ column: 2
350
+ },
351
+ end: {
352
+ line: 129,
353
+ column: 3
354
+ }
355
+ },
356
+ loc: {
357
+ start: {
358
+ line: 129,
359
+ column: 11
360
+ },
361
+ end: {
362
+ line: 133,
363
+ column: 3
364
+ }
365
+ },
366
+ line: 129
367
+ },
368
+ "4": {
369
+ name: "(anonymous_4)",
370
+ decl: {
371
+ start: {
372
+ line: 132,
373
+ column: 12
374
+ },
375
+ end: {
376
+ line: 132,
377
+ column: 13
378
+ }
379
+ },
380
+ loc: {
381
+ start: {
382
+ line: 132,
383
+ column: 22
384
+ },
385
+ end: {
386
+ line: 132,
387
+ column: 69
388
+ }
389
+ },
390
+ line: 132
391
+ },
392
+ "5": {
393
+ name: "(anonymous_5)",
394
+ decl: {
395
+ start: {
396
+ line: 132,
397
+ column: 31
398
+ },
399
+ end: {
400
+ line: 132,
401
+ column: 32
402
+ }
403
+ },
404
+ loc: {
405
+ start: {
406
+ line: 132,
407
+ column: 40
408
+ },
409
+ end: {
410
+ line: 132,
411
+ column: 68
412
+ }
413
+ },
414
+ line: 132
415
+ },
416
+ "6": {
417
+ name: "(anonymous_6)",
418
+ decl: {
419
+ start: {
420
+ line: 153,
421
+ column: 2
422
+ },
423
+ end: {
424
+ line: 153,
425
+ column: 3
426
+ }
427
+ },
428
+ loc: {
429
+ start: {
430
+ line: 153,
431
+ column: 17
432
+ },
433
+ end: {
434
+ line: 157,
435
+ column: 3
436
+ }
437
+ },
438
+ line: 153
439
+ },
440
+ "7": {
441
+ name: "(anonymous_7)",
442
+ decl: {
443
+ start: {
444
+ line: 156,
445
+ column: 12
446
+ },
447
+ end: {
448
+ line: 156,
449
+ column: 13
450
+ }
451
+ },
452
+ loc: {
453
+ start: {
454
+ line: 156,
455
+ column: 30
456
+ },
457
+ end: {
458
+ line: 156,
459
+ column: 67
460
+ }
461
+ },
462
+ line: 156
463
+ },
464
+ "8": {
465
+ name: "(anonymous_8)",
466
+ decl: {
467
+ start: {
468
+ line: 180,
469
+ column: 2
470
+ },
471
+ end: {
472
+ line: 180,
473
+ column: 3
474
+ }
475
+ },
476
+ loc: {
477
+ start: {
478
+ line: 180,
479
+ column: 30
480
+ },
481
+ end: {
482
+ line: 200,
483
+ column: 3
484
+ }
485
+ },
486
+ line: 180
487
+ },
488
+ "9": {
489
+ name: "(anonymous_9)",
490
+ decl: {
491
+ start: {
492
+ line: 184,
493
+ column: 14
494
+ },
495
+ end: {
496
+ line: 184,
497
+ column: 15
498
+ }
499
+ },
500
+ loc: {
501
+ start: {
502
+ line: 184,
503
+ column: 40
504
+ },
505
+ end: {
506
+ line: 184,
507
+ column: 85
508
+ }
509
+ },
510
+ line: 184
511
+ },
512
+ "10": {
513
+ name: "(anonymous_10)",
514
+ decl: {
515
+ start: {
516
+ line: 199,
517
+ column: 12
518
+ },
519
+ end: {
520
+ line: 199,
521
+ column: 13
522
+ }
523
+ },
524
+ loc: {
525
+ start: {
526
+ line: 199,
527
+ column: 38
528
+ },
529
+ end: {
530
+ line: 199,
531
+ column: 83
532
+ }
533
+ },
534
+ line: 199
535
+ },
536
+ "11": {
537
+ name: "(anonymous_11)",
538
+ decl: {
539
+ start: {
540
+ line: 221,
541
+ column: 2
542
+ },
543
+ end: {
544
+ line: 221,
545
+ column: 3
546
+ }
547
+ },
548
+ loc: {
549
+ start: {
550
+ line: 221,
551
+ column: 30
552
+ },
553
+ end: {
554
+ line: 225,
555
+ column: 3
556
+ }
557
+ },
558
+ line: 221
559
+ },
560
+ "12": {
561
+ name: "(anonymous_12)",
562
+ decl: {
563
+ start: {
564
+ line: 224,
565
+ column: 12
566
+ },
567
+ end: {
568
+ line: 224,
569
+ column: 13
570
+ }
571
+ },
572
+ loc: {
573
+ start: {
574
+ line: 224,
575
+ column: 27
576
+ },
577
+ end: {
578
+ line: 224,
579
+ column: 61
580
+ }
581
+ },
582
+ line: 224
583
+ },
584
+ "13": {
585
+ name: "(anonymous_13)",
586
+ decl: {
587
+ start: {
588
+ line: 246,
589
+ column: 2
590
+ },
591
+ end: {
592
+ line: 246,
593
+ column: 3
594
+ }
595
+ },
596
+ loc: {
597
+ start: {
598
+ line: 246,
599
+ column: 32
600
+ },
601
+ end: {
602
+ line: 258,
603
+ column: 3
604
+ }
605
+ },
606
+ line: 246
607
+ }
608
+ },
609
+ branchMap: {
610
+ "0": {
611
+ loc: {
612
+ start: {
613
+ line: 72,
614
+ column: 37
615
+ },
616
+ end: {
617
+ line: 72,
618
+ column: 58
619
+ }
620
+ },
621
+ type: "default-arg",
622
+ locations: [{
623
+ start: {
624
+ line: 72,
625
+ column: 54
626
+ },
627
+ end: {
628
+ line: 72,
629
+ column: 58
630
+ }
631
+ }],
632
+ line: 72
633
+ },
634
+ "1": {
635
+ loc: {
636
+ start: {
637
+ line: 100,
638
+ column: 4
639
+ },
640
+ end: {
641
+ line: 106,
642
+ column: 5
643
+ }
644
+ },
645
+ type: "if",
646
+ locations: [{
647
+ start: {
648
+ line: 100,
649
+ column: 4
650
+ },
651
+ end: {
652
+ line: 106,
653
+ column: 5
654
+ }
655
+ }, {
656
+ start: {
657
+ line: undefined,
658
+ column: undefined
659
+ },
660
+ end: {
661
+ line: undefined,
662
+ column: undefined
663
+ }
664
+ }],
665
+ line: 100
666
+ },
667
+ "2": {
668
+ loc: {
669
+ start: {
670
+ line: 181,
671
+ column: 4
672
+ },
673
+ end: {
674
+ line: 185,
675
+ column: 5
676
+ }
677
+ },
678
+ type: "if",
679
+ locations: [{
680
+ start: {
681
+ line: 181,
682
+ column: 4
683
+ },
684
+ end: {
685
+ line: 185,
686
+ column: 5
687
+ }
688
+ }, {
689
+ start: {
690
+ line: undefined,
691
+ column: undefined
692
+ },
693
+ end: {
694
+ line: undefined,
695
+ column: undefined
696
+ }
697
+ }],
698
+ line: 181
699
+ },
700
+ "3": {
701
+ loc: {
702
+ start: {
703
+ line: 187,
704
+ column: 4
705
+ },
706
+ end: {
707
+ line: 193,
708
+ column: 5
709
+ }
710
+ },
711
+ type: "if",
712
+ locations: [{
713
+ start: {
714
+ line: 187,
715
+ column: 4
716
+ },
717
+ end: {
718
+ line: 193,
719
+ column: 5
720
+ }
721
+ }, {
722
+ start: {
723
+ line: undefined,
724
+ column: undefined
725
+ },
726
+ end: {
727
+ line: undefined,
728
+ column: undefined
729
+ }
730
+ }],
731
+ line: 187
732
+ },
733
+ "4": {
734
+ loc: {
735
+ start: {
736
+ line: 247,
737
+ column: 4
738
+ },
739
+ end: {
740
+ line: 253,
741
+ column: 5
742
+ }
743
+ },
744
+ type: "if",
745
+ locations: [{
746
+ start: {
747
+ line: 247,
748
+ column: 4
749
+ },
750
+ end: {
751
+ line: 253,
752
+ column: 5
753
+ }
754
+ }, {
755
+ start: {
756
+ line: undefined,
757
+ column: undefined
758
+ },
759
+ end: {
760
+ line: undefined,
761
+ column: undefined
762
+ }
763
+ }],
764
+ line: 247
765
+ }
766
+ },
767
+ s: {
768
+ "0": 0,
769
+ "1": 0,
770
+ "2": 0,
771
+ "3": 0,
772
+ "4": 0,
773
+ "5": 0,
774
+ "6": 0,
775
+ "7": 0,
776
+ "8": 0,
777
+ "9": 0,
778
+ "10": 0,
779
+ "11": 0,
780
+ "12": 0,
781
+ "13": 0,
782
+ "14": 0,
783
+ "15": 0,
784
+ "16": 0,
785
+ "17": 0,
786
+ "18": 0,
787
+ "19": 0,
788
+ "20": 0,
789
+ "21": 0,
790
+ "22": 0,
791
+ "23": 0,
792
+ "24": 0
793
+ },
794
+ f: {
795
+ "0": 0,
796
+ "1": 0,
797
+ "2": 0,
798
+ "3": 0,
799
+ "4": 0,
800
+ "5": 0,
801
+ "6": 0,
802
+ "7": 0,
803
+ "8": 0,
804
+ "9": 0,
805
+ "10": 0,
806
+ "11": 0,
807
+ "12": 0,
808
+ "13": 0
809
+ },
810
+ b: {
811
+ "0": [0],
812
+ "1": [0, 0],
813
+ "2": [0, 0],
814
+ "3": [0, 0],
815
+ "4": [0, 0]
816
+ },
817
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
818
+ hash: "8930fc7d546e35eb0b8a717e30ce211654dbe0ed"
819
+ };
820
+ var coverage = global[gcv] || (global[gcv] = {});
821
+ if (!coverage[path] || coverage[path].hash !== hash) {
822
+ coverage[path] = coverageData;
823
+ }
824
+ var actualCoverage = coverage[path];
825
+ {
826
+ // @ts-ignore
827
+ cov_6f7j1vvio = function () {
828
+ return actualCoverage;
829
+ };
830
+ }
831
+ return actualCoverage;
832
+ }
833
+ cov_6f7j1vvio();
13
834
  /**
14
835
  * @typedef {Object} ContxtApplication
15
836
  * @property {string} clientId
@@ -72,21 +893,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
72
893
  *
73
894
  * @typicalname contxtSdk.coordinator.applications
74
895
  */
75
- var Applications = function () {
896
+ class Applications {
76
897
  /**
77
898
  * @param {Object} sdk An instance of the SDK so the module can communicate with other modules
78
899
  * @param {Object} request An instance of the request module tied to this module's audience.
79
900
  * @param {string} baseUrl The base URL provided by the parent module
80
901
  * @param {string} [organizationId] The organization ID to be used in tenant url requests
81
902
  */
82
- function Applications(sdk, request, baseUrl) {
83
- var organizationId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
84
-
85
- _classCallCheck(this, Applications);
86
-
903
+ constructor(sdk, request, baseUrl) {
904
+ let organizationId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : (cov_6f7j1vvio().b[0][0]++, null);
905
+ cov_6f7j1vvio().f[0]++;
906
+ cov_6f7j1vvio().s[0]++;
87
907
  this._baseUrl = baseUrl;
908
+ cov_6f7j1vvio().s[1]++;
88
909
  this._request = request;
910
+ cov_6f7j1vvio().s[2]++;
89
911
  this._sdk = sdk;
912
+ cov_6f7j1vvio().s[3]++;
90
913
  this._organizationId = organizationId;
91
914
  }
92
915
 
@@ -110,175 +933,194 @@ var Applications = function () {
110
933
  * .then((favoriteApplication) => console.log(favoriteApplication))
111
934
  * .catch((err) => console.log(err));
112
935
  */
113
-
114
-
115
- _createClass(Applications, [{
116
- key: 'addFavorite',
117
- value: function addFavorite(applicationId) {
118
- if (!applicationId) {
119
- return Promise.reject(new Error('An application ID is required for creating a favorite application'));
120
- }
121
-
122
- return this._request.post(this._baseUrl + '/applications/' + applicationId + '/favorites').then(function (favoriteApplication) {
123
- return (0, _objects.toCamelCase)(favoriteApplication);
124
- });
125
- }
126
-
127
- /**
128
- * Gets information about all contxt applications
129
- *
130
- * API Endpoint: '/applications'
131
- * Method: GET
132
- *
133
- * @returns {Promise}
134
- * @fulfill {ContxtApplication[]} Information about all contxt applications
135
- * @reject {Error}
136
- *
137
- * @example
138
- * contxtSdk.coordinator.applications
139
- * .getAll()
140
- * .then((apps) => console.log(apps))
141
- * .catch((err) => console.log(err));
142
- */
143
-
144
- }, {
145
- key: 'getAll',
146
- value: function getAll() {
147
- return this._request.get(this._baseUrl + '/applications').then(function (apps) {
148
- return apps.map(function (app) {
149
- return (0, _objects.toCamelCase)(app);
150
- });
151
- });
936
+ addFavorite(applicationId) {
937
+ cov_6f7j1vvio().f[1]++;
938
+ cov_6f7j1vvio().s[4]++;
939
+ if (!applicationId) {
940
+ cov_6f7j1vvio().b[1][0]++;
941
+ cov_6f7j1vvio().s[5]++;
942
+ return Promise.reject(new Error('An application ID is required for creating a favorite application'));
943
+ } else {
944
+ cov_6f7j1vvio().b[1][1]++;
152
945
  }
946
+ cov_6f7j1vvio().s[6]++;
947
+ return this._request.post(`${this._baseUrl}/applications/${applicationId}/favorites`).then(favoriteApplication => {
948
+ cov_6f7j1vvio().f[2]++;
949
+ cov_6f7j1vvio().s[7]++;
950
+ return _objects.default.toCamelCase(favoriteApplication);
951
+ });
952
+ }
153
953
 
154
- /**
155
- * Gets the current user's list of favorited applications
156
- *
157
- * API Endpoint: '/applications/favorites'
158
- * Method: GET
159
- *
160
- * Note: Only valid for web users using auth0WebAuth session type
161
- *
162
- * @returns {Promise}
163
- * @fulfill {ContxtUserFavoriteApplication[]} A list of favorited applications
164
- * @reject {Error}
165
- *
166
- * @example
167
- * contxtSdk.coordinator.applications
168
- * .getFavorites()
169
- * .then((favoriteApplications) => console.log(favoriteApplications))
170
- * .catch((err) => console.log(err));
171
- */
172
-
173
- }, {
174
- key: 'getFavorites',
175
- value: function getFavorites() {
176
- return this._request.get(this._baseUrl + '/applications/favorites').then(function (favoriteApps) {
177
- return (0, _objects.toCamelCase)(favoriteApps);
954
+ /**
955
+ * Gets information about all contxt applications
956
+ *
957
+ * API Endpoint: '/applications'
958
+ * Method: GET
959
+ *
960
+ * @returns {Promise}
961
+ * @fulfill {ContxtApplication[]} Information about all contxt applications
962
+ * @reject {Error}
963
+ *
964
+ * @example
965
+ * contxtSdk.coordinator.applications
966
+ * .getAll()
967
+ * .then((apps) => console.log(apps))
968
+ * .catch((err) => console.log(err));
969
+ */
970
+ getAll() {
971
+ cov_6f7j1vvio().f[3]++;
972
+ cov_6f7j1vvio().s[8]++;
973
+ return this._request.get(`${this._baseUrl}/applications`).then(apps => {
974
+ cov_6f7j1vvio().f[4]++;
975
+ cov_6f7j1vvio().s[9]++;
976
+ return apps.map(app => {
977
+ cov_6f7j1vvio().f[5]++;
978
+ cov_6f7j1vvio().s[10]++;
979
+ return _objects.default.toCamelCase(app);
178
980
  });
179
- }
180
-
181
- /**
182
- * Gets an organization's list of featured applications
183
- *
184
- * Legacy API Endpoint: '/organizations/:organizationId/applications/featured'
185
- * API Endpoint: '/applications/featured'
186
- * Method: GET
187
- *
188
- * Note: Only valid for web users using auth0WebAuth session type
189
- *
190
- * @param {string} organizationId The ID of the organization, optional when using the tenant API and an organization ID has been set
191
- *
192
- * @returns {Promise}
193
- * @fulfill {ContxtOrganizationFeaturedApplication[]} A list of featured applications
194
- * @reject {Error}
195
- *
196
- * @example
197
- * contxtSdk.coordinator.applications
198
- * .getFeatured('36b8421a-cc4a-4204-b839-1397374fb16b')
199
- * .then((featuredApplications) => console.log(featuredApplications))
200
- * .catch((err) => console.log(err));
201
- */
202
-
203
- }, {
204
- key: 'getFeatured',
205
- value: function getFeatured(organizationId) {
206
- if (this._organizationId) {
207
- return this._request.get(this._baseUrl + '/applications/featured').then(function (featuredApplications) {
208
- return (0, _objects.toCamelCase)(featuredApplications);
209
- });
210
- }
981
+ });
982
+ }
211
983
 
212
- if (!organizationId) {
213
- return Promise.reject(new Error('An organization ID is required for getting featured applications for an organization'));
214
- }
984
+ /**
985
+ * Gets the current user's list of favorited applications
986
+ *
987
+ * API Endpoint: '/applications/favorites'
988
+ * Method: GET
989
+ *
990
+ * Note: Only valid for web users using auth0WebAuth session type
991
+ *
992
+ * @returns {Promise}
993
+ * @fulfill {ContxtUserFavoriteApplication[]} A list of favorited applications
994
+ * @reject {Error}
995
+ *
996
+ * @example
997
+ * contxtSdk.coordinator.applications
998
+ * .getFavorites()
999
+ * .then((favoriteApplications) => console.log(favoriteApplications))
1000
+ * .catch((err) => console.log(err));
1001
+ */
1002
+ getFavorites() {
1003
+ cov_6f7j1vvio().f[6]++;
1004
+ cov_6f7j1vvio().s[11]++;
1005
+ return this._request.get(`${this._baseUrl}/applications/favorites`).then(favoriteApps => {
1006
+ cov_6f7j1vvio().f[7]++;
1007
+ cov_6f7j1vvio().s[12]++;
1008
+ return _objects.default.toCamelCase(favoriteApps);
1009
+ });
1010
+ }
215
1011
 
216
- return this._request.get(this._baseUrl + '/organizations/' + organizationId + '/applications/featured').then(function (featuredApplications) {
217
- return (0, _objects.toCamelCase)(featuredApplications);
1012
+ /**
1013
+ * Gets an organization's list of featured applications
1014
+ *
1015
+ * Legacy API Endpoint: '/organizations/:organizationId/applications/featured'
1016
+ * API Endpoint: '/applications/featured'
1017
+ * Method: GET
1018
+ *
1019
+ * Note: Only valid for web users using auth0WebAuth session type
1020
+ *
1021
+ * @param {string} organizationId The ID of the organization, optional when using the tenant API and an organization ID has been set
1022
+ *
1023
+ * @returns {Promise}
1024
+ * @fulfill {ContxtOrganizationFeaturedApplication[]} A list of featured applications
1025
+ * @reject {Error}
1026
+ *
1027
+ * @example
1028
+ * contxtSdk.coordinator.applications
1029
+ * .getFeatured('36b8421a-cc4a-4204-b839-1397374fb16b')
1030
+ * .then((featuredApplications) => console.log(featuredApplications))
1031
+ * .catch((err) => console.log(err));
1032
+ */
1033
+ getFeatured(organizationId) {
1034
+ cov_6f7j1vvio().f[8]++;
1035
+ cov_6f7j1vvio().s[13]++;
1036
+ if (this._organizationId) {
1037
+ cov_6f7j1vvio().b[2][0]++;
1038
+ cov_6f7j1vvio().s[14]++;
1039
+ return this._request.get(`${this._baseUrl}/applications/featured`).then(featuredApplications => {
1040
+ cov_6f7j1vvio().f[9]++;
1041
+ cov_6f7j1vvio().s[15]++;
1042
+ return _objects.default.toCamelCase(featuredApplications);
218
1043
  });
1044
+ } else {
1045
+ cov_6f7j1vvio().b[2][1]++;
219
1046
  }
220
-
221
- /**
222
- * Gets the application groupings (and application modules) of an application
223
- * that are available to the currently authenticated user.
224
- *
225
- * API Endpoint: '/applications/:applicationId/groupings'
226
- * Method: GET
227
- *
228
- * @param {number} applicationId
229
- *
230
- * @returns {Promise}
231
- * @fulfill {ContxtApplicationGrouping[]}
232
- * @reject {Error}
233
- *
234
- * @example
235
- * contxtSdk.coordinator.applications
236
- * .getGroupings(31)
237
- * .then((applicationGroupings) => console.log(applicationGroupings))
238
- * .catch((err) => console.log(err));
239
- */
240
-
241
- }, {
242
- key: 'getGroupings',
243
- value: function getGroupings(applicationId) {
244
- return this._request.get(this._baseUrl + '/applications/' + applicationId + '/groupings').then(function (groupings) {
245
- return (0, _objects.toCamelCase)(groupings);
246
- });
1047
+ cov_6f7j1vvio().s[16]++;
1048
+ if (!organizationId) {
1049
+ cov_6f7j1vvio().b[3][0]++;
1050
+ cov_6f7j1vvio().s[17]++;
1051
+ return Promise.reject(new Error('An organization ID is required for getting featured applications for an organization'));
1052
+ } else {
1053
+ cov_6f7j1vvio().b[3][1]++;
247
1054
  }
1055
+ cov_6f7j1vvio().s[18]++;
1056
+ return this._request.get(`${this._baseUrl}/organizations/${organizationId}/applications/featured`).then(featuredApplications => {
1057
+ cov_6f7j1vvio().f[10]++;
1058
+ cov_6f7j1vvio().s[19]++;
1059
+ return _objects.default.toCamelCase(featuredApplications);
1060
+ });
1061
+ }
248
1062
 
249
- /**
250
- * Removes an application from the current user's list of favorited applications
251
- *
252
- * API Endpoint: '/applications/:applicationId/favorites'
253
- * Method: DELETE
254
- *
255
- * Note: Only valid for web users using auth0WebAuth session type
256
- *
257
- * @param {number} applicationId The ID of the application
258
- *
259
- * @returns {Promise}
260
- * @fulfill {undefined}
261
- * @reject {Error}
262
- *
263
- * @example
264
- * contxtSdk.coordinator.applications
265
- * .removeFavorite(25)
266
- * .catch((err) => console.log(err));
267
- */
268
-
269
- }, {
270
- key: 'removeFavorite',
271
- value: function removeFavorite(applicationId) {
272
- if (!applicationId) {
273
- return Promise.reject(new Error('An application ID is required for deleting a favorite application'));
274
- }
1063
+ /**
1064
+ * Gets the application groupings (and application modules) of an application
1065
+ * that are available to the currently authenticated user.
1066
+ *
1067
+ * API Endpoint: '/applications/:applicationId/groupings'
1068
+ * Method: GET
1069
+ *
1070
+ * @param {number} applicationId
1071
+ *
1072
+ * @returns {Promise}
1073
+ * @fulfill {ContxtApplicationGrouping[]}
1074
+ * @reject {Error}
1075
+ *
1076
+ * @example
1077
+ * contxtSdk.coordinator.applications
1078
+ * .getGroupings(31)
1079
+ * .then((applicationGroupings) => console.log(applicationGroupings))
1080
+ * .catch((err) => console.log(err));
1081
+ */
1082
+ getGroupings(applicationId) {
1083
+ cov_6f7j1vvio().f[11]++;
1084
+ cov_6f7j1vvio().s[20]++;
1085
+ return this._request.get(`${this._baseUrl}/applications/${applicationId}/groupings`).then(groupings => {
1086
+ cov_6f7j1vvio().f[12]++;
1087
+ cov_6f7j1vvio().s[21]++;
1088
+ return _objects.default.toCamelCase(groupings);
1089
+ });
1090
+ }
275
1091
 
276
- return this._request.delete(this._baseUrl + '/applications/' + applicationId + '/favorites');
1092
+ /**
1093
+ * Removes an application from the current user's list of favorited applications
1094
+ *
1095
+ * API Endpoint: '/applications/:applicationId/favorites'
1096
+ * Method: DELETE
1097
+ *
1098
+ * Note: Only valid for web users using auth0WebAuth session type
1099
+ *
1100
+ * @param {number} applicationId The ID of the application
1101
+ *
1102
+ * @returns {Promise}
1103
+ * @fulfill {undefined}
1104
+ * @reject {Error}
1105
+ *
1106
+ * @example
1107
+ * contxtSdk.coordinator.applications
1108
+ * .removeFavorite(25)
1109
+ * .catch((err) => console.log(err));
1110
+ */
1111
+ removeFavorite(applicationId) {
1112
+ cov_6f7j1vvio().f[13]++;
1113
+ cov_6f7j1vvio().s[22]++;
1114
+ if (!applicationId) {
1115
+ cov_6f7j1vvio().b[4][0]++;
1116
+ cov_6f7j1vvio().s[23]++;
1117
+ return Promise.reject(new Error('An application ID is required for deleting a favorite application'));
1118
+ } else {
1119
+ cov_6f7j1vvio().b[4][1]++;
277
1120
  }
278
- }]);
279
-
280
- return Applications;
281
- }();
282
-
283
- exports.default = Applications;
1121
+ cov_6f7j1vvio().s[24]++;
1122
+ return this._request.delete(`${this._baseUrl}/applications/${applicationId}/favorites`);
1123
+ }
1124
+ }
1125
+ var _default = exports.default = Applications;
284
1126
  //# sourceMappingURL=applications.js.map