@ndustrial/contxt-sdk 5.5.6 → 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.
- package/.nvmrc +1 -1
- package/CHANGELOG.md +6 -0
- package/eslint.config.mjs +44 -0
- package/esm/bus/channels.js +1883 -216
- package/esm/bus/channels.js.map +1 -1
- package/esm/bus/index.browser.js +218 -37
- package/esm/bus/index.browser.js.map +1 -1
- package/esm/bus/index.js +906 -94
- package/esm/bus/index.js.map +1 -1
- package/esm/bus/webSocketConnection.browser.js +86 -12
- package/esm/bus/webSocketConnection.browser.js.map +1 -1
- package/esm/bus/webSocketConnection.js +2464 -332
- package/esm/bus/webSocketConnection.js.map +1 -1
- package/esm/config/audiences.js +37 -1
- package/esm/config/audiences.js.map +1 -1
- package/esm/config/defaults.js +37 -1
- package/esm/config/defaults.js.map +1 -1
- package/esm/config/index.js +1622 -203
- package/esm/config/index.js.map +1 -1
- package/esm/coordinator/applications.js +1019 -172
- package/esm/coordinator/applications.js.map +1 -1
- package/esm/coordinator/consent.js +603 -76
- package/esm/coordinator/consent.js.map +1 -1
- package/esm/coordinator/edgeNodes.js +520 -40
- package/esm/coordinator/edgeNodes.js.map +1 -1
- package/esm/coordinator/index.js +811 -54
- package/esm/coordinator/index.js.map +1 -1
- package/esm/coordinator/organizations.js +533 -60
- package/esm/coordinator/organizations.js.map +1 -1
- package/esm/coordinator/permissions.js +914 -107
- package/esm/coordinator/permissions.js.map +1 -1
- package/esm/coordinator/roles.js +2146 -258
- package/esm/coordinator/roles.js.map +1 -1
- package/esm/coordinator/users.js +3393 -484
- package/esm/coordinator/users.js.map +1 -1
- package/esm/events/index.js +2301 -393
- package/esm/events/index.js.map +1 -1
- package/esm/files/index.js +2053 -410
- package/esm/files/index.js.map +1 -1
- package/esm/index.js +1002 -148
- package/esm/index.js.map +1 -1
- package/esm/iot/feedTypes.js +188 -25
- package/esm/iot/feedTypes.js.map +1 -1
- package/esm/iot/feeds.js +420 -59
- package/esm/iot/feeds.js.map +1 -1
- package/esm/iot/fieldCategories.js +1172 -195
- package/esm/iot/fieldCategories.js.map +1 -1
- package/esm/iot/fieldGroupings.js +1689 -255
- package/esm/iot/fieldGroupings.js.map +1 -1
- package/esm/iot/fields.js +254 -28
- package/esm/iot/fields.js.map +1 -1
- package/esm/iot/index.js +212 -34
- package/esm/iot/index.js.map +1 -1
- package/esm/iot/outputs.js +320 -31
- package/esm/iot/outputs.js.map +1 -1
- package/esm/nionic/index.js +1097 -97
- package/esm/nionic/index.js.map +1 -1
- package/esm/request.js +1313 -221
- package/esm/request.js.map +1 -1
- package/esm/sessionTypes/auth0WebAuth.js +3395 -409
- package/esm/sessionTypes/auth0WebAuth.js.map +1 -1
- package/esm/sessionTypes/index.js +213 -22
- package/esm/sessionTypes/index.js.map +1 -1
- package/esm/sessionTypes/machineAuth.js +1314 -144
- package/esm/sessionTypes/machineAuth.js.map +1 -1
- package/esm/sessionTypes/passwordGrantAuth.js +1060 -145
- package/esm/sessionTypes/passwordGrantAuth.js.map +1 -1
- package/esm/utils/events/formatEventUpdateToServer.js +107 -4
- package/esm/utils/events/formatEventUpdateToServer.js.map +1 -1
- package/esm/utils/events/index.js +54 -2
- package/esm/utils/events/index.js.map +1 -1
- package/esm/utils/iot/formatOutputFieldDataFromServer.js +227 -14
- package/esm/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
- package/esm/utils/iot/index.js +56 -3
- package/esm/utils/iot/index.js.map +1 -1
- package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js +207 -7
- package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
- package/esm/utils/objects/createCaseChangeFn.js +449 -18
- package/esm/utils/objects/createCaseChangeFn.js.map +1 -1
- package/esm/utils/objects/index.js +56 -3
- package/esm/utils/objects/index.js.map +1 -1
- package/esm/utils/objects/map.js +520 -26
- package/esm/utils/objects/map.js.map +1 -1
- package/esm/utils/objects/toCamelCase.js +39 -3
- package/esm/utils/objects/toCamelCase.js.map +1 -1
- package/esm/utils/objects/toSnakeCase.js +39 -3
- package/esm/utils/objects/toSnakeCase.js.map +1 -1
- package/esm/utils/pagination/formatPaginatedDataFromServer.js +268 -11
- package/esm/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
- package/esm/utils/pagination/index.js +54 -2
- package/esm/utils/pagination/index.js.map +1 -1
- package/esm/utils/url/index.js +47 -2
- package/esm/utils/url/index.js.map +1 -1
- package/esm/utils/url/stringifyParams.js +176 -10
- package/esm/utils/url/stringifyParams.js.map +1 -1
- package/lib/bus/channels.js +1880 -223
- package/lib/bus/channels.js.map +1 -1
- package/lib/bus/index.browser.js +215 -43
- package/lib/bus/index.browser.js.map +1 -1
- package/lib/bus/index.js +903 -106
- package/lib/bus/index.js.map +1 -1
- package/lib/bus/webSocketConnection.browser.js +83 -15
- package/lib/bus/webSocketConnection.browser.js.map +1 -1
- package/lib/bus/webSocketConnection.js +2461 -339
- package/lib/bus/webSocketConnection.js.map +1 -1
- package/lib/config/audiences.js +33 -2
- package/lib/config/audiences.js.map +1 -1
- package/lib/config/defaults.js +33 -2
- package/lib/config/defaults.js.map +1 -1
- package/lib/config/index.js +1619 -212
- package/lib/config/index.js.map +1 -1
- package/lib/coordinator/applications.js +1016 -174
- package/lib/coordinator/applications.js.map +1 -1
- package/lib/coordinator/consent.js +600 -78
- package/lib/coordinator/consent.js.map +1 -1
- package/lib/coordinator/edgeNodes.js +517 -42
- package/lib/coordinator/edgeNodes.js.map +1 -1
- package/lib/coordinator/index.js +808 -78
- package/lib/coordinator/index.js.map +1 -1
- package/lib/coordinator/organizations.js +530 -62
- package/lib/coordinator/organizations.js.map +1 -1
- package/lib/coordinator/permissions.js +911 -109
- package/lib/coordinator/permissions.js.map +1 -1
- package/lib/coordinator/roles.js +2143 -260
- package/lib/coordinator/roles.js.map +1 -1
- package/lib/coordinator/users.js +3389 -489
- package/lib/coordinator/users.js.map +1 -1
- package/lib/events/index.js +2297 -404
- package/lib/events/index.js.map +1 -1
- package/lib/files/index.js +2050 -418
- package/lib/files/index.js.map +1 -1
- package/lib/index.js +999 -183
- package/lib/index.js.map +1 -1
- package/lib/iot/feedTypes.js +185 -27
- package/lib/iot/feedTypes.js.map +1 -1
- package/lib/iot/feeds.js +417 -61
- package/lib/iot/feeds.js.map +1 -1
- package/lib/iot/fieldCategories.js +1169 -203
- package/lib/iot/fieldCategories.js.map +1 -1
- package/lib/iot/fieldGroupings.js +1686 -263
- package/lib/iot/fieldGroupings.js.map +1 -1
- package/lib/iot/fields.js +251 -30
- package/lib/iot/fields.js.map +1 -1
- package/lib/iot/index.js +209 -55
- package/lib/iot/index.js.map +1 -1
- package/lib/iot/outputs.js +317 -34
- package/lib/iot/outputs.js.map +1 -1
- package/lib/nionic/index.js +1094 -98
- package/lib/nionic/index.js.map +1 -1
- package/lib/request.js +1310 -228
- package/lib/request.js.map +1 -1
- package/lib/sessionTypes/auth0WebAuth.js +3391 -421
- package/lib/sessionTypes/auth0WebAuth.js.map +1 -1
- package/lib/sessionTypes/index.js +209 -26
- package/lib/sessionTypes/index.js.map +1 -1
- package/lib/sessionTypes/machineAuth.js +1311 -151
- package/lib/sessionTypes/machineAuth.js.map +1 -1
- package/lib/sessionTypes/passwordGrantAuth.js +1057 -156
- package/lib/sessionTypes/passwordGrantAuth.js.map +1 -1
- package/lib/utils/events/formatEventUpdateToServer.js +102 -4
- package/lib/utils/events/formatEventUpdateToServer.js.map +1 -1
- package/lib/utils/events/index.js +51 -10
- package/lib/utils/events/index.js.map +1 -1
- package/lib/utils/iot/formatOutputFieldDataFromServer.js +224 -18
- package/lib/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
- package/lib/utils/iot/index.js +53 -15
- package/lib/utils/iot/index.js.map +1 -1
- package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js +203 -13
- package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
- package/lib/utils/objects/createCaseChangeFn.js +446 -25
- package/lib/utils/objects/createCaseChangeFn.js.map +1 -1
- package/lib/utils/objects/index.js +53 -15
- package/lib/utils/objects/index.js.map +1 -1
- package/lib/utils/objects/map.js +517 -33
- package/lib/utils/objects/map.js.map +1 -1
- package/lib/utils/objects/toCamelCase.js +36 -11
- package/lib/utils/objects/toCamelCase.js.map +1 -1
- package/lib/utils/objects/toSnakeCase.js +36 -11
- package/lib/utils/objects/toSnakeCase.js.map +1 -1
- package/lib/utils/pagination/formatPaginatedDataFromServer.js +265 -14
- package/lib/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
- package/lib/utils/pagination/index.js +51 -10
- package/lib/utils/pagination/index.js.map +1 -1
- package/lib/utils/url/index.js +44 -7
- package/lib/utils/url/index.js.map +1 -1
- package/lib/utils/url/stringifyParams.js +172 -18
- package/lib/utils/url/stringifyParams.js.map +1 -1
- package/package.json +31 -35
- package/src/bus/channels.js +6 -6
- package/src/bus/channels.spec.js +1 -1
- package/src/coordinator/applications.js +7 -7
- package/src/coordinator/applications.spec.js +1 -1
- package/src/coordinator/consent.js +3 -3
- package/src/coordinator/edgeNodes.js +3 -3
- package/src/coordinator/edgeNodes.spec.js +1 -1
- package/src/coordinator/organizations.js +4 -4
- package/src/coordinator/organizations.spec.js +1 -1
- package/src/coordinator/permissions.js +6 -6
- package/src/coordinator/permissions.spec.js +1 -1
- package/src/coordinator/roles.js +9 -9
- package/src/coordinator/roles.spec.js +1 -1
- package/src/coordinator/users.js +12 -12
- package/src/coordinator/users.spec.js +1 -1
- package/src/events/index.js +18 -18
- package/src/events/index.spec.js +3 -3
- package/src/files/index.js +9 -9
- package/src/files/index.spec.js +2 -2
- package/src/index.js +3 -1
- package/src/iot/feedTypes.js +2 -2
- package/src/iot/feeds.js +4 -4
- package/src/iot/feeds.spec.js +1 -1
- package/src/iot/fieldCategories.js +10 -10
- package/src/iot/fieldCategories.spec.js +2 -2
- package/src/iot/fieldGroupings.js +10 -10
- package/src/iot/fieldGroupings.spec.js +2 -2
- package/src/iot/fields.js +2 -2
- package/src/iot/fields.spec.js +1 -1
- package/src/iot/outputs.js +2 -2
- package/src/iot/outputs.spec.js +1 -1
- package/src/request.js +2 -4
- package/src/request.spec.js +1 -1
- package/src/sessionTypes/auth0WebAuth.spec.js +1 -1
- package/src/utils/events/index.js +2 -1
- package/src/utils/iot/formatOutputFieldDataFromServer.js +5 -5
- package/src/utils/iot/formatOutputFieldDataFromServer.spec.js +2 -2
- package/src/utils/iot/index.js +2 -1
- package/src/utils/iot/parseOutputFieldNextPageUrlMetadata.js +3 -1
- package/src/utils/objects/index.js +2 -1
- package/src/utils/pagination/formatPaginatedDataFromServer.js +3 -3
- package/src/utils/pagination/formatPaginatedDataFromServer.spec.js +1 -1
- package/src/utils/pagination/index.js +2 -1
- package/support/mocharc.yml +1 -1
- package/.eslintrc +0 -24
|
@@ -1,9 +1,836 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
-
|
|
5
|
-
import { toCamelCase } from '../utils/objects';
|
|
1
|
+
"use strict";
|
|
6
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
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();
|
|
7
834
|
/**
|
|
8
835
|
* @typedef {Object} ContxtApplication
|
|
9
836
|
* @property {string} clientId
|
|
@@ -66,22 +893,23 @@ import { toCamelCase } from '../utils/objects';
|
|
|
66
893
|
*
|
|
67
894
|
* @typicalname contxtSdk.coordinator.applications
|
|
68
895
|
*/
|
|
69
|
-
|
|
70
|
-
var Applications = function () {
|
|
896
|
+
class Applications {
|
|
71
897
|
/**
|
|
72
898
|
* @param {Object} sdk An instance of the SDK so the module can communicate with other modules
|
|
73
899
|
* @param {Object} request An instance of the request module tied to this module's audience.
|
|
74
900
|
* @param {string} baseUrl The base URL provided by the parent module
|
|
75
901
|
* @param {string} [organizationId] The organization ID to be used in tenant url requests
|
|
76
902
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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]++;
|
|
82
907
|
this._baseUrl = baseUrl;
|
|
908
|
+
cov_6f7j1vvio().s[1]++;
|
|
83
909
|
this._request = request;
|
|
910
|
+
cov_6f7j1vvio().s[2]++;
|
|
84
911
|
this._sdk = sdk;
|
|
912
|
+
cov_6f7j1vvio().s[3]++;
|
|
85
913
|
this._organizationId = organizationId;
|
|
86
914
|
}
|
|
87
915
|
|
|
@@ -105,175 +933,194 @@ var Applications = function () {
|
|
|
105
933
|
* .then((favoriteApplication) => console.log(favoriteApplication))
|
|
106
934
|
* .catch((err) => console.log(err));
|
|
107
935
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return this._request.post(this._baseUrl + '/applications/' + applicationId + '/favorites').then(function (favoriteApplication) {
|
|
118
|
-
return toCamelCase(favoriteApplication);
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Gets information about all contxt applications
|
|
124
|
-
*
|
|
125
|
-
* API Endpoint: '/applications'
|
|
126
|
-
* Method: GET
|
|
127
|
-
*
|
|
128
|
-
* @returns {Promise}
|
|
129
|
-
* @fulfill {ContxtApplication[]} Information about all contxt applications
|
|
130
|
-
* @reject {Error}
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* contxtSdk.coordinator.applications
|
|
134
|
-
* .getAll()
|
|
135
|
-
* .then((apps) => console.log(apps))
|
|
136
|
-
* .catch((err) => console.log(err));
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
}, {
|
|
140
|
-
key: 'getAll',
|
|
141
|
-
value: function getAll() {
|
|
142
|
-
return this._request.get(this._baseUrl + '/applications').then(function (apps) {
|
|
143
|
-
return apps.map(function (app) {
|
|
144
|
-
return toCamelCase(app);
|
|
145
|
-
});
|
|
146
|
-
});
|
|
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]++;
|
|
147
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
|
+
}
|
|
148
953
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return
|
|
172
|
-
|
|
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);
|
|
173
980
|
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Gets an organization's list of featured applications
|
|
178
|
-
*
|
|
179
|
-
* Legacy API Endpoint: '/organizations/:organizationId/applications/featured'
|
|
180
|
-
* API Endpoint: '/applications/featured'
|
|
181
|
-
* Method: GET
|
|
182
|
-
*
|
|
183
|
-
* Note: Only valid for web users using auth0WebAuth session type
|
|
184
|
-
*
|
|
185
|
-
* @param {string} organizationId The ID of the organization, optional when using the tenant API and an organization ID has been set
|
|
186
|
-
*
|
|
187
|
-
* @returns {Promise}
|
|
188
|
-
* @fulfill {ContxtOrganizationFeaturedApplication[]} A list of featured applications
|
|
189
|
-
* @reject {Error}
|
|
190
|
-
*
|
|
191
|
-
* @example
|
|
192
|
-
* contxtSdk.coordinator.applications
|
|
193
|
-
* .getFeatured('36b8421a-cc4a-4204-b839-1397374fb16b')
|
|
194
|
-
* .then((featuredApplications) => console.log(featuredApplications))
|
|
195
|
-
* .catch((err) => console.log(err));
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
}, {
|
|
199
|
-
key: 'getFeatured',
|
|
200
|
-
value: function getFeatured(organizationId) {
|
|
201
|
-
if (this._organizationId) {
|
|
202
|
-
return this._request.get(this._baseUrl + '/applications/featured').then(function (featuredApplications) {
|
|
203
|
-
return toCamelCase(featuredApplications);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
981
|
+
});
|
|
982
|
+
}
|
|
206
983
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
+
}
|
|
210
1011
|
|
|
211
|
-
|
|
212
|
-
|
|
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);
|
|
213
1043
|
});
|
|
1044
|
+
} else {
|
|
1045
|
+
cov_6f7j1vvio().b[2][1]++;
|
|
214
1046
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
*
|
|
223
|
-
* @param {number} applicationId
|
|
224
|
-
*
|
|
225
|
-
* @returns {Promise}
|
|
226
|
-
* @fulfill {ContxtApplicationGrouping[]}
|
|
227
|
-
* @reject {Error}
|
|
228
|
-
*
|
|
229
|
-
* @example
|
|
230
|
-
* contxtSdk.coordinator.applications
|
|
231
|
-
* .getGroupings(31)
|
|
232
|
-
* .then((applicationGroupings) => console.log(applicationGroupings))
|
|
233
|
-
* .catch((err) => console.log(err));
|
|
234
|
-
*/
|
|
235
|
-
|
|
236
|
-
}, {
|
|
237
|
-
key: 'getGroupings',
|
|
238
|
-
value: function getGroupings(applicationId) {
|
|
239
|
-
return this._request.get(this._baseUrl + '/applications/' + applicationId + '/groupings').then(function (groupings) {
|
|
240
|
-
return toCamelCase(groupings);
|
|
241
|
-
});
|
|
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]++;
|
|
242
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
|
+
}
|
|
243
1062
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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
|
+
}
|
|
270
1091
|
|
|
271
|
-
|
|
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]++;
|
|
272
1120
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export 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;
|
|
279
1126
|
//# sourceMappingURL=applications.js.map
|