@ndustrial/contxt-sdk 5.5.7 → 5.6.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 (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 +3393 -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 +3389 -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 +31 -35
  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 +12 -12
  202. package/src/coordinator/users.spec.js +1 -1
  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
package/esm/request.js CHANGED
@@ -1,41 +1,1140 @@
1
- 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; }; }();
2
-
3
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
4
-
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
-
7
- import axios from 'axios';
1
+ "use strict";
8
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ require("core-js/modules/es.array.iterator.js");
8
+ require("core-js/modules/esnext.iterator.constructor.js");
9
+ require("core-js/modules/esnext.iterator.for-each.js");
10
+ var _axios = _interopRequireDefault(require("axios"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function cov_mcg5xjiiy() {
13
+ var path = "/home/runner/work/contxt-sdk-js/contxt-sdk-js/src/request.js";
14
+ var hash = "4cb89a0cbbfe8787f2f21474b65f5d8543c04c63";
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/request.js",
19
+ statementMap: {
20
+ "0": {
21
+ start: {
22
+ line: 4,
23
+ column: 2
24
+ },
25
+ end: {
26
+ line: 9,
27
+ column: 3
28
+ }
29
+ },
30
+ "1": {
31
+ start: {
32
+ line: 5,
33
+ column: 51
34
+ },
35
+ end: {
36
+ line: 5,
37
+ column: 77
38
+ }
39
+ },
40
+ "2": {
41
+ start: {
42
+ line: 6,
43
+ column: 4
44
+ },
45
+ end: {
46
+ line: 6,
47
+ column: 35
48
+ }
49
+ },
50
+ "3": {
51
+ start: {
52
+ line: 8,
53
+ column: 4
54
+ },
55
+ end: {
56
+ line: 8,
57
+ column: 70
58
+ }
59
+ },
60
+ "4": {
61
+ start: {
62
+ line: 12,
63
+ column: 32
64
+ },
65
+ end: {
66
+ line: 12,
67
+ column: 45
68
+ }
69
+ },
70
+ "5": {
71
+ start: {
72
+ line: 20,
73
+ column: 4
74
+ },
75
+ end: {
76
+ line: 20,
77
+ column: 38
78
+ }
79
+ },
80
+ "6": {
81
+ start: {
82
+ line: 21,
83
+ column: 4
84
+ },
85
+ end: {
86
+ line: 21,
87
+ column: 33
88
+ }
89
+ },
90
+ "7": {
91
+ start: {
92
+ line: 22,
93
+ column: 4
94
+ },
95
+ end: {
96
+ line: 22,
97
+ column: 57
98
+ }
99
+ },
100
+ "8": {
101
+ start: {
102
+ line: 23,
103
+ column: 4
104
+ },
105
+ end: {
106
+ line: 23,
107
+ column: 20
108
+ }
109
+ },
110
+ "9": {
111
+ start: {
112
+ line: 25,
113
+ column: 4
114
+ },
115
+ end: {
116
+ line: 25,
117
+ column: 31
118
+ }
119
+ },
120
+ "10": {
121
+ start: {
122
+ line: 36,
123
+ column: 4
124
+ },
125
+ end: {
126
+ line: 36,
127
+ column: 64
128
+ }
129
+ },
130
+ "11": {
131
+ start: {
132
+ line: 36,
133
+ column: 58
134
+ },
135
+ end: {
136
+ line: 36,
137
+ column: 62
138
+ }
139
+ },
140
+ "12": {
141
+ start: {
142
+ line: 47,
143
+ column: 4
144
+ },
145
+ end: {
146
+ line: 47,
147
+ column: 61
148
+ }
149
+ },
150
+ "13": {
151
+ start: {
152
+ line: 47,
153
+ column: 55
154
+ },
155
+ end: {
156
+ line: 47,
157
+ column: 59
158
+ }
159
+ },
160
+ "14": {
161
+ start: {
162
+ line: 58,
163
+ column: 4
164
+ },
165
+ end: {
166
+ line: 58,
167
+ column: 62
168
+ }
169
+ },
170
+ "15": {
171
+ start: {
172
+ line: 58,
173
+ column: 56
174
+ },
175
+ end: {
176
+ line: 58,
177
+ column: 60
178
+ }
179
+ },
180
+ "16": {
181
+ start: {
182
+ line: 69,
183
+ column: 4
184
+ },
185
+ end: {
186
+ line: 69,
187
+ column: 65
188
+ }
189
+ },
190
+ "17": {
191
+ start: {
192
+ line: 69,
193
+ column: 59
194
+ },
195
+ end: {
196
+ line: 69,
197
+ column: 63
198
+ }
199
+ },
200
+ "18": {
201
+ start: {
202
+ line: 80,
203
+ column: 4
204
+ },
205
+ end: {
206
+ line: 80,
207
+ column: 63
208
+ }
209
+ },
210
+ "19": {
211
+ start: {
212
+ line: 80,
213
+ column: 57
214
+ },
215
+ end: {
216
+ line: 80,
217
+ column: 61
218
+ }
219
+ },
220
+ "20": {
221
+ start: {
222
+ line: 91,
223
+ column: 4
224
+ },
225
+ end: {
226
+ line: 91,
227
+ column: 62
228
+ }
229
+ },
230
+ "21": {
231
+ start: {
232
+ line: 91,
233
+ column: 56
234
+ },
235
+ end: {
236
+ line: 91,
237
+ column: 60
238
+ }
239
+ },
240
+ "22": {
241
+ start: {
242
+ line: 102,
243
+ column: 4
244
+ },
245
+ end: {
246
+ line: 102,
247
+ column: 61
248
+ }
249
+ },
250
+ "23": {
251
+ start: {
252
+ line: 102,
253
+ column: 55
254
+ },
255
+ end: {
256
+ line: 102,
257
+ column: 59
258
+ }
259
+ },
260
+ "24": {
261
+ start: {
262
+ line: 113,
263
+ column: 4
264
+ },
265
+ end: {
266
+ line: 113,
267
+ column: 65
268
+ }
269
+ },
270
+ "25": {
271
+ start: {
272
+ line: 113,
273
+ column: 59
274
+ },
275
+ end: {
276
+ line: 113,
277
+ column: 63
278
+ }
279
+ },
280
+ "26": {
281
+ start: {
282
+ line: 123,
283
+ column: 32
284
+ },
285
+ end: {
286
+ line: 126,
287
+ column: 5
288
+ }
289
+ },
290
+ "27": {
291
+ start: {
292
+ line: 127,
293
+ column: 33
294
+ },
295
+ end: {
296
+ line: 127,
297
+ column: 76
298
+ }
299
+ },
300
+ "28": {
301
+ start: {
302
+ line: 129,
303
+ column: 4
304
+ },
305
+ end: {
306
+ line: 131,
307
+ column: 7
308
+ }
309
+ },
310
+ "29": {
311
+ start: {
312
+ line: 130,
313
+ column: 6
314
+ },
315
+ end: {
316
+ line: 130,
317
+ column: 64
318
+ }
319
+ },
320
+ "30": {
321
+ start: {
322
+ line: 132,
323
+ column: 4
324
+ },
325
+ end: {
326
+ line: 134,
327
+ column: 7
328
+ }
329
+ },
330
+ "31": {
331
+ start: {
332
+ line: 133,
333
+ column: 6
334
+ },
335
+ end: {
336
+ line: 133,
337
+ column: 65
338
+ }
339
+ },
340
+ "32": {
341
+ start: {
342
+ line: 149,
343
+ column: 4
344
+ },
345
+ end: {
346
+ line: 157,
347
+ column: 9
348
+ }
349
+ },
350
+ "33": {
351
+ start: {
352
+ line: 152,
353
+ column: 8
354
+ },
355
+ end: {
356
+ line: 152,
357
+ column: 63
358
+ }
359
+ },
360
+ "34": {
361
+ start: {
362
+ line: 153,
363
+ column: 8
364
+ },
365
+ end: {
366
+ line: 155,
367
+ column: 9
368
+ }
369
+ },
370
+ "35": {
371
+ start: {
372
+ line: 154,
373
+ column: 10
374
+ },
375
+ end: {
376
+ line: 154,
377
+ column: 137
378
+ }
379
+ },
380
+ "36": {
381
+ start: {
382
+ line: 156,
383
+ column: 8
384
+ },
385
+ end: {
386
+ line: 156,
387
+ column: 22
388
+ }
389
+ }
390
+ },
391
+ fnMap: {
392
+ "0": {
393
+ name: "loadSdkInfo",
394
+ decl: {
395
+ start: {
396
+ line: 3,
397
+ column: 9
398
+ },
399
+ end: {
400
+ line: 3,
401
+ column: 20
402
+ }
403
+ },
404
+ loc: {
405
+ start: {
406
+ line: 3,
407
+ column: 23
408
+ },
409
+ end: {
410
+ line: 10,
411
+ column: 1
412
+ }
413
+ },
414
+ line: 3
415
+ },
416
+ "1": {
417
+ name: "(anonymous_1)",
418
+ decl: {
419
+ start: {
420
+ line: 19,
421
+ column: 2
422
+ },
423
+ end: {
424
+ line: 19,
425
+ column: 3
426
+ }
427
+ },
428
+ loc: {
429
+ start: {
430
+ line: 19,
431
+ column: 33
432
+ },
433
+ end: {
434
+ line: 26,
435
+ column: 3
436
+ }
437
+ },
438
+ line: 19
439
+ },
440
+ "2": {
441
+ name: "(anonymous_2)",
442
+ decl: {
443
+ start: {
444
+ line: 35,
445
+ column: 2
446
+ },
447
+ end: {
448
+ line: 35,
449
+ column: 3
450
+ }
451
+ },
452
+ loc: {
453
+ start: {
454
+ line: 35,
455
+ column: 18
456
+ },
457
+ end: {
458
+ line: 37,
459
+ column: 3
460
+ }
461
+ },
462
+ line: 35
463
+ },
464
+ "3": {
465
+ name: "(anonymous_3)",
466
+ decl: {
467
+ start: {
468
+ line: 36,
469
+ column: 44
470
+ },
471
+ end: {
472
+ line: 36,
473
+ column: 45
474
+ }
475
+ },
476
+ loc: {
477
+ start: {
478
+ line: 36,
479
+ column: 58
480
+ },
481
+ end: {
482
+ line: 36,
483
+ column: 62
484
+ }
485
+ },
486
+ line: 36
487
+ },
488
+ "4": {
489
+ name: "(anonymous_4)",
490
+ decl: {
491
+ start: {
492
+ line: 46,
493
+ column: 2
494
+ },
495
+ end: {
496
+ line: 46,
497
+ column: 3
498
+ }
499
+ },
500
+ loc: {
501
+ start: {
502
+ line: 46,
503
+ column: 15
504
+ },
505
+ end: {
506
+ line: 48,
507
+ column: 3
508
+ }
509
+ },
510
+ line: 46
511
+ },
512
+ "5": {
513
+ name: "(anonymous_5)",
514
+ decl: {
515
+ start: {
516
+ line: 47,
517
+ column: 41
518
+ },
519
+ end: {
520
+ line: 47,
521
+ column: 42
522
+ }
523
+ },
524
+ loc: {
525
+ start: {
526
+ line: 47,
527
+ column: 55
528
+ },
529
+ end: {
530
+ line: 47,
531
+ column: 59
532
+ }
533
+ },
534
+ line: 47
535
+ },
536
+ "6": {
537
+ name: "(anonymous_6)",
538
+ decl: {
539
+ start: {
540
+ line: 57,
541
+ column: 2
542
+ },
543
+ end: {
544
+ line: 57,
545
+ column: 3
546
+ }
547
+ },
548
+ loc: {
549
+ start: {
550
+ line: 57,
551
+ column: 16
552
+ },
553
+ end: {
554
+ line: 59,
555
+ column: 3
556
+ }
557
+ },
558
+ line: 57
559
+ },
560
+ "7": {
561
+ name: "(anonymous_7)",
562
+ decl: {
563
+ start: {
564
+ line: 58,
565
+ column: 42
566
+ },
567
+ end: {
568
+ line: 58,
569
+ column: 43
570
+ }
571
+ },
572
+ loc: {
573
+ start: {
574
+ line: 58,
575
+ column: 56
576
+ },
577
+ end: {
578
+ line: 58,
579
+ column: 60
580
+ }
581
+ },
582
+ line: 58
583
+ },
584
+ "8": {
585
+ name: "(anonymous_8)",
586
+ decl: {
587
+ start: {
588
+ line: 68,
589
+ column: 2
590
+ },
591
+ end: {
592
+ line: 68,
593
+ column: 3
594
+ }
595
+ },
596
+ loc: {
597
+ start: {
598
+ line: 68,
599
+ column: 19
600
+ },
601
+ end: {
602
+ line: 70,
603
+ column: 3
604
+ }
605
+ },
606
+ line: 68
607
+ },
608
+ "9": {
609
+ name: "(anonymous_9)",
610
+ decl: {
611
+ start: {
612
+ line: 69,
613
+ column: 45
614
+ },
615
+ end: {
616
+ line: 69,
617
+ column: 46
618
+ }
619
+ },
620
+ loc: {
621
+ start: {
622
+ line: 69,
623
+ column: 59
624
+ },
625
+ end: {
626
+ line: 69,
627
+ column: 63
628
+ }
629
+ },
630
+ line: 69
631
+ },
632
+ "10": {
633
+ name: "(anonymous_10)",
634
+ decl: {
635
+ start: {
636
+ line: 79,
637
+ column: 2
638
+ },
639
+ end: {
640
+ line: 79,
641
+ column: 3
642
+ }
643
+ },
644
+ loc: {
645
+ start: {
646
+ line: 79,
647
+ column: 17
648
+ },
649
+ end: {
650
+ line: 81,
651
+ column: 3
652
+ }
653
+ },
654
+ line: 79
655
+ },
656
+ "11": {
657
+ name: "(anonymous_11)",
658
+ decl: {
659
+ start: {
660
+ line: 80,
661
+ column: 43
662
+ },
663
+ end: {
664
+ line: 80,
665
+ column: 44
666
+ }
667
+ },
668
+ loc: {
669
+ start: {
670
+ line: 80,
671
+ column: 57
672
+ },
673
+ end: {
674
+ line: 80,
675
+ column: 61
676
+ }
677
+ },
678
+ line: 80
679
+ },
680
+ "12": {
681
+ name: "(anonymous_12)",
682
+ decl: {
683
+ start: {
684
+ line: 90,
685
+ column: 2
686
+ },
687
+ end: {
688
+ line: 90,
689
+ column: 3
690
+ }
691
+ },
692
+ loc: {
693
+ start: {
694
+ line: 90,
695
+ column: 16
696
+ },
697
+ end: {
698
+ line: 92,
699
+ column: 3
700
+ }
701
+ },
702
+ line: 90
703
+ },
704
+ "13": {
705
+ name: "(anonymous_13)",
706
+ decl: {
707
+ start: {
708
+ line: 91,
709
+ column: 42
710
+ },
711
+ end: {
712
+ line: 91,
713
+ column: 43
714
+ }
715
+ },
716
+ loc: {
717
+ start: {
718
+ line: 91,
719
+ column: 56
720
+ },
721
+ end: {
722
+ line: 91,
723
+ column: 60
724
+ }
725
+ },
726
+ line: 91
727
+ },
728
+ "14": {
729
+ name: "(anonymous_14)",
730
+ decl: {
731
+ start: {
732
+ line: 101,
733
+ column: 2
734
+ },
735
+ end: {
736
+ line: 101,
737
+ column: 3
738
+ }
739
+ },
740
+ loc: {
741
+ start: {
742
+ line: 101,
743
+ column: 15
744
+ },
745
+ end: {
746
+ line: 103,
747
+ column: 3
748
+ }
749
+ },
750
+ line: 101
751
+ },
752
+ "15": {
753
+ name: "(anonymous_15)",
754
+ decl: {
755
+ start: {
756
+ line: 102,
757
+ column: 41
758
+ },
759
+ end: {
760
+ line: 102,
761
+ column: 42
762
+ }
763
+ },
764
+ loc: {
765
+ start: {
766
+ line: 102,
767
+ column: 55
768
+ },
769
+ end: {
770
+ line: 102,
771
+ column: 59
772
+ }
773
+ },
774
+ line: 102
775
+ },
776
+ "16": {
777
+ name: "(anonymous_16)",
778
+ decl: {
779
+ start: {
780
+ line: 112,
781
+ column: 2
782
+ },
783
+ end: {
784
+ line: 112,
785
+ column: 3
786
+ }
787
+ },
788
+ loc: {
789
+ start: {
790
+ line: 112,
791
+ column: 19
792
+ },
793
+ end: {
794
+ line: 114,
795
+ column: 3
796
+ }
797
+ },
798
+ line: 112
799
+ },
800
+ "17": {
801
+ name: "(anonymous_17)",
802
+ decl: {
803
+ start: {
804
+ line: 113,
805
+ column: 45
806
+ },
807
+ end: {
808
+ line: 113,
809
+ column: 46
810
+ }
811
+ },
812
+ loc: {
813
+ start: {
814
+ line: 113,
815
+ column: 59
816
+ },
817
+ end: {
818
+ line: 113,
819
+ column: 63
820
+ }
821
+ },
822
+ line: 113
823
+ },
824
+ "18": {
825
+ name: "(anonymous_18)",
826
+ decl: {
827
+ start: {
828
+ line: 122,
829
+ column: 2
830
+ },
831
+ end: {
832
+ line: 122,
833
+ column: 3
834
+ }
835
+ },
836
+ loc: {
837
+ start: {
838
+ line: 122,
839
+ column: 24
840
+ },
841
+ end: {
842
+ line: 135,
843
+ column: 3
844
+ }
845
+ },
846
+ line: 122
847
+ },
848
+ "19": {
849
+ name: "(anonymous_19)",
850
+ decl: {
851
+ start: {
852
+ line: 129,
853
+ column: 32
854
+ },
855
+ end: {
856
+ line: 129,
857
+ column: 33
858
+ }
859
+ },
860
+ loc: {
861
+ start: {
862
+ line: 129,
863
+ column: 61
864
+ },
865
+ end: {
866
+ line: 131,
867
+ column: 5
868
+ }
869
+ },
870
+ line: 129
871
+ },
872
+ "20": {
873
+ name: "(anonymous_20)",
874
+ decl: {
875
+ start: {
876
+ line: 132,
877
+ column: 33
878
+ },
879
+ end: {
880
+ line: 132,
881
+ column: 34
882
+ }
883
+ },
884
+ loc: {
885
+ start: {
886
+ line: 132,
887
+ column: 62
888
+ },
889
+ end: {
890
+ line: 134,
891
+ column: 5
892
+ }
893
+ },
894
+ line: 132
895
+ },
896
+ "21": {
897
+ name: "(anonymous_21)",
898
+ decl: {
899
+ start: {
900
+ line: 148,
901
+ column: 2
902
+ },
903
+ end: {
904
+ line: 148,
905
+ column: 3
906
+ }
907
+ },
908
+ loc: {
909
+ start: {
910
+ line: 148,
911
+ column: 25
912
+ },
913
+ end: {
914
+ line: 158,
915
+ column: 3
916
+ }
917
+ },
918
+ line: 148
919
+ },
920
+ "22": {
921
+ name: "(anonymous_22)",
922
+ decl: {
923
+ start: {
924
+ line: 151,
925
+ column: 12
926
+ },
927
+ end: {
928
+ line: 151,
929
+ column: 13
930
+ }
931
+ },
932
+ loc: {
933
+ start: {
934
+ line: 151,
935
+ column: 26
936
+ },
937
+ end: {
938
+ line: 157,
939
+ column: 7
940
+ }
941
+ },
942
+ line: 151
943
+ }
944
+ },
945
+ branchMap: {
946
+ "0": {
947
+ loc: {
948
+ start: {
949
+ line: 153,
950
+ column: 8
951
+ },
952
+ end: {
953
+ line: 155,
954
+ column: 9
955
+ }
956
+ },
957
+ type: "if",
958
+ locations: [{
959
+ start: {
960
+ line: 153,
961
+ column: 8
962
+ },
963
+ end: {
964
+ line: 155,
965
+ column: 9
966
+ }
967
+ }, {
968
+ start: {
969
+ line: undefined,
970
+ column: undefined
971
+ },
972
+ end: {
973
+ line: undefined,
974
+ column: undefined
975
+ }
976
+ }],
977
+ line: 153
978
+ },
979
+ "1": {
980
+ loc: {
981
+ start: {
982
+ line: 153,
983
+ column: 12
984
+ },
985
+ end: {
986
+ line: 153,
987
+ column: 87
988
+ }
989
+ },
990
+ type: "binary-expr",
991
+ locations: [{
992
+ start: {
993
+ line: 153,
994
+ column: 12
995
+ },
996
+ end: {
997
+ line: 153,
998
+ column: 41
999
+ }
1000
+ }, {
1001
+ start: {
1002
+ line: 153,
1003
+ column: 45
1004
+ },
1005
+ end: {
1006
+ line: 153,
1007
+ column: 87
1008
+ }
1009
+ }],
1010
+ line: 153
1011
+ }
1012
+ },
1013
+ s: {
1014
+ "0": 0,
1015
+ "1": 0,
1016
+ "2": 0,
1017
+ "3": 0,
1018
+ "4": 0,
1019
+ "5": 0,
1020
+ "6": 0,
1021
+ "7": 0,
1022
+ "8": 0,
1023
+ "9": 0,
1024
+ "10": 0,
1025
+ "11": 0,
1026
+ "12": 0,
1027
+ "13": 0,
1028
+ "14": 0,
1029
+ "15": 0,
1030
+ "16": 0,
1031
+ "17": 0,
1032
+ "18": 0,
1033
+ "19": 0,
1034
+ "20": 0,
1035
+ "21": 0,
1036
+ "22": 0,
1037
+ "23": 0,
1038
+ "24": 0,
1039
+ "25": 0,
1040
+ "26": 0,
1041
+ "27": 0,
1042
+ "28": 0,
1043
+ "29": 0,
1044
+ "30": 0,
1045
+ "31": 0,
1046
+ "32": 0,
1047
+ "33": 0,
1048
+ "34": 0,
1049
+ "35": 0,
1050
+ "36": 0
1051
+ },
1052
+ f: {
1053
+ "0": 0,
1054
+ "1": 0,
1055
+ "2": 0,
1056
+ "3": 0,
1057
+ "4": 0,
1058
+ "5": 0,
1059
+ "6": 0,
1060
+ "7": 0,
1061
+ "8": 0,
1062
+ "9": 0,
1063
+ "10": 0,
1064
+ "11": 0,
1065
+ "12": 0,
1066
+ "13": 0,
1067
+ "14": 0,
1068
+ "15": 0,
1069
+ "16": 0,
1070
+ "17": 0,
1071
+ "18": 0,
1072
+ "19": 0,
1073
+ "20": 0,
1074
+ "21": 0,
1075
+ "22": 0
1076
+ },
1077
+ b: {
1078
+ "0": [0, 0],
1079
+ "1": [0, 0]
1080
+ },
1081
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
1082
+ hash: "4cb89a0cbbfe8787f2f21474b65f5d8543c04c63"
1083
+ };
1084
+ var coverage = global[gcv] || (global[gcv] = {});
1085
+ if (!coverage[path] || coverage[path].hash !== hash) {
1086
+ coverage[path] = coverageData;
1087
+ }
1088
+ var actualCoverage = coverage[path];
1089
+ {
1090
+ // @ts-ignore
1091
+ cov_mcg5xjiiy = function () {
1092
+ return actualCoverage;
1093
+ };
1094
+ }
1095
+ return actualCoverage;
1096
+ }
1097
+ cov_mcg5xjiiy();
9
1098
  function loadSdkInfo() {
1099
+ cov_mcg5xjiiy().f[0]++;
1100
+ cov_mcg5xjiiy().s[0]++;
10
1101
  try {
11
- var _require = require('../package.json'),
12
- _sdkName = _require.name,
13
- _sdkVersion = _require.version;
14
-
15
- return { sdkName: _sdkName, sdkVersion: _sdkVersion };
1102
+ const _ref = (cov_mcg5xjiiy().s[1]++, require('../package.json')),
1103
+ sdkName = _ref.name,
1104
+ sdkVersion = _ref.version;
1105
+ cov_mcg5xjiiy().s[2]++;
1106
+ return {
1107
+ sdkName,
1108
+ sdkVersion
1109
+ };
16
1110
  } catch (e) {
17
- return { sdkName: "@ndustrial/contxt-sdk", sdkVersion: "5.5.0+" };
1111
+ cov_mcg5xjiiy().s[3]++;
1112
+ return {
1113
+ sdkName: "@ndustrial/contxt-sdk",
1114
+ sdkVersion: "5.5.0+"
1115
+ };
18
1116
  }
19
1117
  }
20
-
21
- var _loadSdkInfo = loadSdkInfo(),
22
- sdkName = _loadSdkInfo.sdkName,
23
- sdkVersion = _loadSdkInfo.sdkVersion;
24
-
25
- var Request = function () {
1118
+ const _ref2 = (cov_mcg5xjiiy().s[4]++, loadSdkInfo()),
1119
+ sdkName = _ref2.sdkName,
1120
+ sdkVersion = _ref2.sdkVersion;
1121
+ class Request {
26
1122
  /**
27
1123
  * @param {Object} sdk An instance of the SDK so the module can communicate with other modules
28
1124
  * @param {string} audienceName The audience name for this instance. Used when grabbing a
29
1125
  * Bearer token
30
1126
  */
31
- function Request(sdk, audienceName) {
32
- _classCallCheck(this, Request);
33
-
1127
+ constructor(sdk, audienceName) {
1128
+ cov_mcg5xjiiy().f[1]++;
1129
+ cov_mcg5xjiiy().s[5]++;
34
1130
  this._audienceName = audienceName;
35
- this._axios = axios.create();
1131
+ cov_mcg5xjiiy().s[6]++;
1132
+ this._axios = _axios.default.create();
1133
+ cov_mcg5xjiiy().s[7]++;
36
1134
  this._insertHeaders = this._insertHeaders.bind(this);
1135
+ cov_mcg5xjiiy().s[8]++;
37
1136
  this._sdk = sdk;
38
-
1137
+ cov_mcg5xjiiy().s[9]++;
39
1138
  this._attachInterceptors();
40
1139
  }
41
1140
 
@@ -46,208 +1145,203 @@ var Request = function () {
46
1145
  * @returns {Promise}
47
1146
  * @fulfill {string|number|object|array} data
48
1147
  */
1148
+ delete() {
1149
+ cov_mcg5xjiiy().f[2]++;
1150
+ cov_mcg5xjiiy().s[10]++;
1151
+ return this._axios.delete(...arguments).then(_ref3 => {
1152
+ let data = _ref3.data;
1153
+ cov_mcg5xjiiy().f[3]++;
1154
+ cov_mcg5xjiiy().s[11]++;
1155
+ return data;
1156
+ });
1157
+ }
49
1158
 
1159
+ /**
1160
+ * Makes a GET request
1161
+ * See more at {@link https://github.com/axios/axios axios}
1162
+ *
1163
+ * @returns {Promise}
1164
+ * @fulfill {string|number|object|array} data
1165
+ */
1166
+ get() {
1167
+ cov_mcg5xjiiy().f[4]++;
1168
+ cov_mcg5xjiiy().s[12]++;
1169
+ return this._axios.get(...arguments).then(_ref4 => {
1170
+ let data = _ref4.data;
1171
+ cov_mcg5xjiiy().f[5]++;
1172
+ cov_mcg5xjiiy().s[13]++;
1173
+ return data;
1174
+ });
1175
+ }
50
1176
 
51
- _createClass(Request, [{
52
- key: 'delete',
53
- value: function _delete() {
54
- var _axios;
55
-
56
- return (_axios = this._axios).delete.apply(_axios, arguments).then(function (_ref) {
57
- var data = _ref.data;
58
- return data;
59
- });
60
- }
61
-
62
- /**
63
- * Makes a GET request
64
- * See more at {@link https://github.com/axios/axios axios}
65
- *
66
- * @returns {Promise}
67
- * @fulfill {string|number|object|array} data
68
- */
69
-
70
- }, {
71
- key: 'get',
72
- value: function get() {
73
- var _axios2;
74
-
75
- return (_axios2 = this._axios).get.apply(_axios2, arguments).then(function (_ref2) {
76
- var data = _ref2.data;
77
- return data;
78
- });
79
- }
80
-
81
- /**
82
- * Makes a HEAD request
83
- * See more at {@link https://github.com/axios/axios axios}
84
- *
85
- * @returns {Promise}
86
- * @fulfill {string|number|object|array} data
87
- */
88
-
89
- }, {
90
- key: 'head',
91
- value: function head() {
92
- var _axios3;
93
-
94
- return (_axios3 = this._axios).head.apply(_axios3, arguments).then(function (_ref3) {
95
- var data = _ref3.data;
96
- return data;
97
- });
98
- }
99
-
100
- /**
101
- * Makes an OPTIONS request
102
- * See more at {@link https://github.com/axios/axios axios}
103
- *
104
- * @returns {Promise}
105
- * @fulfill {string|number|object|array} data
106
- */
107
-
108
- }, {
109
- key: 'options',
110
- value: function options() {
111
- var _axios4;
112
-
113
- return (_axios4 = this._axios).options.apply(_axios4, arguments).then(function (_ref4) {
114
- var data = _ref4.data;
115
- return data;
116
- });
117
- }
118
-
119
- /**
120
- * Makes a PATCH request
121
- * See more at {@link https://github.com/axios/axios axios}
122
- *
123
- * @returns {Promise}
124
- * @fulfill {string|number|object|array} data
125
- */
126
-
127
- }, {
128
- key: 'patch',
129
- value: function patch() {
130
- var _axios5;
131
-
132
- return (_axios5 = this._axios).patch.apply(_axios5, arguments).then(function (_ref5) {
133
- var data = _ref5.data;
134
- return data;
135
- });
136
- }
137
-
138
- /**
139
- * Makes a POST request
140
- * See more at {@link https://github.com/axios/axios axios}
141
- *
142
- * @returns {Promise}
143
- * @fulfill {string|number|object|array} data
144
- */
145
-
146
- }, {
147
- key: 'post',
148
- value: function post() {
149
- var _axios6;
150
-
151
- return (_axios6 = this._axios).post.apply(_axios6, arguments).then(function (_ref6) {
152
- var data = _ref6.data;
153
- return data;
154
- });
155
- }
156
-
157
- /**
158
- * Makes a PUT request
159
- * See more at {@link https://github.com/axios/axios axios}
160
- *
161
- * @returns {Promise}
162
- * @fulfill {string|number|object|array} data
163
- */
164
-
165
- }, {
166
- key: 'put',
167
- value: function put() {
168
- var _axios7;
169
-
170
- return (_axios7 = this._axios).put.apply(_axios7, arguments).then(function (_ref7) {
171
- var data = _ref7.data;
172
- return data;
173
- });
174
- }
175
-
176
- /**
177
- * Makes a request
178
- * See more at {@link https://github.com/axios/axios axios}
179
- *
180
- * @returns {Promise}
181
- * @fulfill {string|number|object|array} data
182
- */
183
-
184
- }, {
185
- key: 'request',
186
- value: function request() {
187
- var _axios8;
188
-
189
- return (_axios8 = this._axios).request.apply(_axios8, arguments).then(function (_ref8) {
190
- var data = _ref8.data;
191
- return data;
192
- });
193
- }
194
-
195
- /**
196
- * Sets up axios interceptors for the request instance
197
- * More information at {@link https://github.com/axios/axios#interceptors axios Interceptors}
198
- *
199
- * @private
200
- */
201
-
202
- }, {
203
- key: '_attachInterceptors',
204
- value: function _attachInterceptors() {
205
- var _this = this;
206
-
207
- var requestInterceptors = [{ fulfilled: this._insertHeaders }].concat(_toConsumableArray(this._sdk.config.interceptors.request));
208
- var responseInterceptors = [].concat(_toConsumableArray(this._sdk.config.interceptors.response));
1177
+ /**
1178
+ * Makes a HEAD request
1179
+ * See more at {@link https://github.com/axios/axios axios}
1180
+ *
1181
+ * @returns {Promise}
1182
+ * @fulfill {string|number|object|array} data
1183
+ */
1184
+ head() {
1185
+ cov_mcg5xjiiy().f[6]++;
1186
+ cov_mcg5xjiiy().s[14]++;
1187
+ return this._axios.head(...arguments).then(_ref5 => {
1188
+ let data = _ref5.data;
1189
+ cov_mcg5xjiiy().f[7]++;
1190
+ cov_mcg5xjiiy().s[15]++;
1191
+ return data;
1192
+ });
1193
+ }
209
1194
 
210
- requestInterceptors.forEach(function (_ref9) {
211
- var fulfilled = _ref9.fulfilled,
212
- rejected = _ref9.rejected;
1195
+ /**
1196
+ * Makes an OPTIONS request
1197
+ * See more at {@link https://github.com/axios/axios axios}
1198
+ *
1199
+ * @returns {Promise}
1200
+ * @fulfill {string|number|object|array} data
1201
+ */
1202
+ options() {
1203
+ cov_mcg5xjiiy().f[8]++;
1204
+ cov_mcg5xjiiy().s[16]++;
1205
+ return this._axios.options(...arguments).then(_ref6 => {
1206
+ let data = _ref6.data;
1207
+ cov_mcg5xjiiy().f[9]++;
1208
+ cov_mcg5xjiiy().s[17]++;
1209
+ return data;
1210
+ });
1211
+ }
213
1212
 
214
- _this._axios.interceptors.request.use(fulfilled, rejected);
215
- });
216
- responseInterceptors.forEach(function (_ref10) {
217
- var fulfilled = _ref10.fulfilled,
218
- rejected = _ref10.rejected;
1213
+ /**
1214
+ * Makes a PATCH request
1215
+ * See more at {@link https://github.com/axios/axios axios}
1216
+ *
1217
+ * @returns {Promise}
1218
+ * @fulfill {string|number|object|array} data
1219
+ */
1220
+ patch() {
1221
+ cov_mcg5xjiiy().f[10]++;
1222
+ cov_mcg5xjiiy().s[18]++;
1223
+ return this._axios.patch(...arguments).then(_ref7 => {
1224
+ let data = _ref7.data;
1225
+ cov_mcg5xjiiy().f[11]++;
1226
+ cov_mcg5xjiiy().s[19]++;
1227
+ return data;
1228
+ });
1229
+ }
219
1230
 
220
- _this._axios.interceptors.response.use(fulfilled, rejected);
221
- });
222
- }
1231
+ /**
1232
+ * Makes a POST request
1233
+ * See more at {@link https://github.com/axios/axios axios}
1234
+ *
1235
+ * @returns {Promise}
1236
+ * @fulfill {string|number|object|array} data
1237
+ */
1238
+ post() {
1239
+ cov_mcg5xjiiy().f[12]++;
1240
+ cov_mcg5xjiiy().s[20]++;
1241
+ return this._axios.post(...arguments).then(_ref8 => {
1242
+ let data = _ref8.data;
1243
+ cov_mcg5xjiiy().f[13]++;
1244
+ cov_mcg5xjiiy().s[21]++;
1245
+ return data;
1246
+ });
1247
+ }
223
1248
 
224
- /**
225
- * Decorates custom modules onto the SDK instance so they behave as first-class citizens.
226
- *
227
- * @param {Object} config
228
- * @param {Object} config.headers
229
- *
230
- * @returns {Promise}
231
- * @fulfill {Object} axios.js config
232
- *
233
- * @private
234
- */
1249
+ /**
1250
+ * Makes a PUT request
1251
+ * See more at {@link https://github.com/axios/axios axios}
1252
+ *
1253
+ * @returns {Promise}
1254
+ * @fulfill {string|number|object|array} data
1255
+ */
1256
+ put() {
1257
+ cov_mcg5xjiiy().f[14]++;
1258
+ cov_mcg5xjiiy().s[22]++;
1259
+ return this._axios.put(...arguments).then(_ref9 => {
1260
+ let data = _ref9.data;
1261
+ cov_mcg5xjiiy().f[15]++;
1262
+ cov_mcg5xjiiy().s[23]++;
1263
+ return data;
1264
+ });
1265
+ }
235
1266
 
236
- }, {
237
- key: '_insertHeaders',
238
- value: function _insertHeaders(config) {
239
- return this._sdk.auth.getCurrentApiToken(this._audienceName).then(function (apiToken) {
240
- config.headers['Authorization'] = 'Bearer ' + apiToken;
241
- if (typeof window === 'undefined' && process.env.npm_package_name !== undefined) {
242
- config.headers['User-Agent'] = process.env.npm_package_name + '/' + process.env.npm_package_version + ' (' + sdkName + '/' + sdkVersion + ')';
243
- }
244
- return config;
245
- });
246
- }
247
- }]);
1267
+ /**
1268
+ * Makes a request
1269
+ * See more at {@link https://github.com/axios/axios axios}
1270
+ *
1271
+ * @returns {Promise}
1272
+ * @fulfill {string|number|object|array} data
1273
+ */
1274
+ request() {
1275
+ cov_mcg5xjiiy().f[16]++;
1276
+ cov_mcg5xjiiy().s[24]++;
1277
+ return this._axios.request(...arguments).then(_ref10 => {
1278
+ let data = _ref10.data;
1279
+ cov_mcg5xjiiy().f[17]++;
1280
+ cov_mcg5xjiiy().s[25]++;
1281
+ return data;
1282
+ });
1283
+ }
248
1284
 
249
- return Request;
250
- }();
1285
+ /**
1286
+ * Sets up axios interceptors for the request instance
1287
+ * More information at {@link https://github.com/axios/axios#interceptors axios Interceptors}
1288
+ *
1289
+ * @private
1290
+ */
1291
+ _attachInterceptors() {
1292
+ cov_mcg5xjiiy().f[18]++;
1293
+ const requestInterceptors = (cov_mcg5xjiiy().s[26]++, [{
1294
+ fulfilled: this._insertHeaders
1295
+ }, ...this._sdk.config.interceptors.request]);
1296
+ const responseInterceptors = (cov_mcg5xjiiy().s[27]++, [...this._sdk.config.interceptors.response]);
1297
+ cov_mcg5xjiiy().s[28]++;
1298
+ requestInterceptors.forEach(_ref11 => {
1299
+ let fulfilled = _ref11.fulfilled,
1300
+ rejected = _ref11.rejected;
1301
+ cov_mcg5xjiiy().f[19]++;
1302
+ cov_mcg5xjiiy().s[29]++;
1303
+ this._axios.interceptors.request.use(fulfilled, rejected);
1304
+ });
1305
+ cov_mcg5xjiiy().s[30]++;
1306
+ responseInterceptors.forEach(_ref12 => {
1307
+ let fulfilled = _ref12.fulfilled,
1308
+ rejected = _ref12.rejected;
1309
+ cov_mcg5xjiiy().f[20]++;
1310
+ cov_mcg5xjiiy().s[31]++;
1311
+ this._axios.interceptors.response.use(fulfilled, rejected);
1312
+ });
1313
+ }
251
1314
 
252
- export default Request;
1315
+ /**
1316
+ * Decorates custom modules onto the SDK instance so they behave as first-class citizens.
1317
+ *
1318
+ * @param {Object} config
1319
+ * @param {Object} config.headers
1320
+ *
1321
+ * @returns {Promise}
1322
+ * @fulfill {Object} axios.js config
1323
+ *
1324
+ * @private
1325
+ */
1326
+ _insertHeaders(config) {
1327
+ cov_mcg5xjiiy().f[21]++;
1328
+ cov_mcg5xjiiy().s[32]++;
1329
+ return this._sdk.auth.getCurrentApiToken(this._audienceName).then(apiToken => {
1330
+ cov_mcg5xjiiy().f[22]++;
1331
+ cov_mcg5xjiiy().s[33]++;
1332
+ config.headers['Authorization'] = `Bearer ${apiToken}`;
1333
+ cov_mcg5xjiiy().s[34]++;
1334
+ if ((cov_mcg5xjiiy().b[1][0]++, typeof window === 'undefined') && (cov_mcg5xjiiy().b[1][1]++, process.env.npm_package_name !== undefined)) {
1335
+ cov_mcg5xjiiy().b[0][0]++;
1336
+ cov_mcg5xjiiy().s[35]++;
1337
+ config.headers['User-Agent'] = `${process.env.npm_package_name}/${process.env.npm_package_version} (${sdkName}/${sdkVersion})`;
1338
+ } else {
1339
+ cov_mcg5xjiiy().b[0][1]++;
1340
+ }
1341
+ cov_mcg5xjiiy().s[36]++;
1342
+ return config;
1343
+ });
1344
+ }
1345
+ }
1346
+ var _default = exports.default = Request;
253
1347
  //# sourceMappingURL=request.js.map