@northern.tech/store 0.39.0 → 0.40.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 (86) hide show
  1. package/dist/api/general-api.cjs +1 -1
  2. package/dist/api/general-api.js +1 -1
  3. package/dist/appSlice/index.js +1 -1
  4. package/dist/auth.cjs +1 -1
  5. package/dist/auth.js +1 -1
  6. package/dist/commonConstants.cjs +1 -1
  7. package/dist/commonConstants.js +1 -1
  8. package/dist/commonSelectors.cjs +1 -1
  9. package/dist/commonSelectors.js +1 -1
  10. package/dist/constants-CNZ5L0A0.cjs +957 -0
  11. package/dist/constants-CNZ5L0A0.cjs.map +1 -0
  12. package/dist/constants-Cj2kp3Iy.js +676 -0
  13. package/dist/constants-Cj2kp3Iy.js.map +1 -0
  14. package/dist/{constants-BwKiHHaB.d.ts → constants-D9o0Cnk_.d.cts} +2 -1
  15. package/dist/{constants-BwKiHHaB.d.cts → constants-D9o0Cnk_.d.ts} +2 -1
  16. package/dist/constants.cjs +48 -718
  17. package/dist/constants.d.cts +1 -1
  18. package/dist/constants.d.ts +1 -1
  19. package/dist/constants.js +1 -672
  20. package/dist/deploymentsSlice/constants.cjs +1 -1
  21. package/dist/deploymentsSlice/constants.d.cts +1 -1
  22. package/dist/deploymentsSlice/constants.d.ts +1 -1
  23. package/dist/deploymentsSlice/constants.js +1 -1
  24. package/dist/deploymentsSlice/index.cjs +1 -1
  25. package/dist/deploymentsSlice/index.js +1 -1
  26. package/dist/deploymentsSlice/mocks.cjs +1 -1
  27. package/dist/deploymentsSlice/mocks.cjs.map +1 -1
  28. package/dist/deploymentsSlice/mocks.d.cts +1 -1
  29. package/dist/deploymentsSlice/mocks.d.ts +1 -1
  30. package/dist/deploymentsSlice/mocks.js +1 -1
  31. package/dist/deploymentsSlice/mocks.js.map +1 -1
  32. package/dist/deploymentsSlice/selectors.cjs +1 -1
  33. package/dist/deploymentsSlice/selectors.js +1 -1
  34. package/dist/devicesSlice/constants.cjs +1 -1
  35. package/dist/devicesSlice/constants.js +1 -1
  36. package/dist/devicesSlice/index.js +1 -1
  37. package/dist/devicesSlice/mocks.js +1 -1
  38. package/dist/devicesSlice/selectors.cjs +1 -1
  39. package/dist/devicesSlice/selectors.js +1 -1
  40. package/dist/liststatehook.cjs +2 -1
  41. package/dist/liststatehook.cjs.map +1 -1
  42. package/dist/liststatehook.js +2 -1
  43. package/dist/liststatehook.js.map +1 -1
  44. package/dist/locationutils.cjs +1 -1
  45. package/dist/locationutils.js +1 -1
  46. package/dist/monitorSlice/index.js +1 -1
  47. package/dist/monitorSlice/mocks.js +1 -1
  48. package/dist/monitorSlice/thunks.cjs +1 -1
  49. package/dist/monitorSlice/thunks.js +1 -1
  50. package/dist/organizationSlice/constants.cjs +1 -1
  51. package/dist/organizationSlice/constants.js +1 -1
  52. package/dist/organizationSlice/index.cjs +1 -1
  53. package/dist/organizationSlice/index.js +1 -1
  54. package/dist/organizationSlice/mocks.js +1 -1
  55. package/dist/organizationSlice/selectors.cjs +1 -1
  56. package/dist/organizationSlice/selectors.js +1 -1
  57. package/dist/releasesSlice/index.js +1 -1
  58. package/dist/releasesSlice/mocks.js +1 -1
  59. package/dist/releasesSlice/thunks.cjs +6 -4
  60. package/dist/releasesSlice/thunks.cjs.map +1 -1
  61. package/dist/releasesSlice/thunks.js +6 -4
  62. package/dist/releasesSlice/thunks.js.map +1 -1
  63. package/dist/sockethook.cjs +1 -1
  64. package/dist/sockethook.js +1 -1
  65. package/dist/store.cjs +1 -1
  66. package/dist/store.js +1 -1
  67. package/dist/storehooks.cjs +1 -1
  68. package/dist/storehooks.js +1 -1
  69. package/dist/thunks.cjs +46 -40
  70. package/dist/thunks.cjs.map +1 -1
  71. package/dist/thunks.js +46 -40
  72. package/dist/thunks.js.map +1 -1
  73. package/dist/usersSlice/constants.cjs +1 -1
  74. package/dist/usersSlice/constants.js +1 -1
  75. package/dist/usersSlice/index.cjs +1 -1
  76. package/dist/usersSlice/index.js +1 -1
  77. package/dist/usersSlice/mocks.js +1 -1
  78. package/dist/usersSlice/selectors.cjs +1 -1
  79. package/dist/usersSlice/selectors.js +1 -1
  80. package/dist/utils.cjs +11 -21
  81. package/dist/utils.cjs.map +1 -1
  82. package/dist/utils.js +11 -21
  83. package/dist/utils.js.map +1 -1
  84. package/package.json +3 -3
  85. package/dist/constants.cjs.map +0 -1
  86. package/dist/constants.js.map +0 -1
@@ -0,0 +1,957 @@
1
+ let _northern_tech_utils_constants = require("@northern.tech/utils/constants");
2
+ let _mdi_js = require("@mdi/js");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ //#region src/commonConstants.tsx
5
+ const timeUnits = {
6
+ days: "days",
7
+ minutes: "minutes",
8
+ hours: "hours"
9
+ };
10
+ const UNGROUPED_GROUP = {
11
+ id: "*|=ungrouped=|*",
12
+ name: "Unassigned"
13
+ };
14
+ const DEVICE_LIST_MAXIMUM_LENGTH = 50;
15
+ const oneSecond = 1e3;
16
+ const TIMEOUTS = {
17
+ debounceDefault: 700,
18
+ debounceShort: 300,
19
+ halfASecond: .5 * oneSecond,
20
+ oneSecond,
21
+ twoSeconds: 2 * oneSecond,
22
+ threeSeconds: 3 * oneSecond,
23
+ fiveSeconds: 5 * oneSecond,
24
+ refreshDefault: 10 * oneSecond,
25
+ refreshLong: 60 * oneSecond
26
+ };
27
+ const DEVICE_ONLINE_CUTOFF = {
28
+ interval: 1,
29
+ intervalName: timeUnits.days
30
+ };
31
+ const defaultIdAttribute = Object.freeze({
32
+ attribute: "id",
33
+ scope: _northern_tech_utils_constants.ATTRIBUTE_SCOPES.identity
34
+ });
35
+ const productOrder = [
36
+ "micro",
37
+ "standard",
38
+ "system"
39
+ ];
40
+ const credentialTypes = {
41
+ aws: "aws",
42
+ http: "http",
43
+ sas: "sas",
44
+ x509: "x509"
45
+ };
46
+ const EXTERNAL_PROVIDER = {
47
+ "iot-core": {
48
+ credentialsType: credentialTypes.aws,
49
+ icon: _mdi_js.mdiAws,
50
+ title: "AWS IoT Core",
51
+ twinTitle: "Device Shadow",
52
+ provider: "iot-core",
53
+ enabled: true,
54
+ deviceTwin: true,
55
+ configHint: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: "For help finding your AWS IoT Core connection string, check the AWS IoT documentation." })
56
+ },
57
+ "iot-hub": {
58
+ credentialsType: credentialTypes.sas,
59
+ icon: _mdi_js.mdiMicrosoftAzure,
60
+ title: "Azure IoT Hub",
61
+ twinTitle: "Device Twin",
62
+ provider: "iot-hub",
63
+ enabled: true,
64
+ deviceTwin: true,
65
+ configHint: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
66
+ "For help finding your Azure IoT Hub connection string, look under 'Shared access policies' in the Microsoft Azure UI as described",
67
+ " ",
68
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
69
+ href: "https://devblogs.microsoft.com/iotdev/understand-different-connection-strings-in-azure-iot-hub/#iothubconn",
70
+ target: "_blank",
71
+ rel: "noopener noreferrer",
72
+ children: "here"
73
+ }),
74
+ "."
75
+ ] })
76
+ },
77
+ webhook: {
78
+ credentialsType: credentialTypes.http,
79
+ deviceTwin: false,
80
+ twinTitle: "",
81
+ enabled: false,
82
+ provider: "webhook"
83
+ }
84
+ };
85
+ const emptyWebhook = {
86
+ description: "",
87
+ provider: "webhook",
88
+ credentials: {
89
+ type: EXTERNAL_PROVIDER.webhook.credentialsType,
90
+ [EXTERNAL_PROVIDER.webhook.credentialsType]: {
91
+ secret: "",
92
+ url: ""
93
+ }
94
+ }
95
+ };
96
+ const MAX_PAGE_SIZE = 500;
97
+ const regionNames = new Intl.DisplayNames(["en"], { type: "region" });
98
+ const countries = [
99
+ "AD",
100
+ "AE",
101
+ "AF",
102
+ "AG",
103
+ "AI",
104
+ "AL",
105
+ "AM",
106
+ "AO",
107
+ "AQ",
108
+ "AR",
109
+ "AS",
110
+ "AT",
111
+ "AU",
112
+ "AW",
113
+ "AX",
114
+ "AZ",
115
+ "BA",
116
+ "BB",
117
+ "BD",
118
+ "BE",
119
+ "BF",
120
+ "BG",
121
+ "BH",
122
+ "BI",
123
+ "BJ",
124
+ "BL",
125
+ "BM",
126
+ "BN",
127
+ "BO",
128
+ "BR",
129
+ "BS",
130
+ "BT",
131
+ "BV",
132
+ "BW",
133
+ "BY",
134
+ "BZ",
135
+ "CA",
136
+ "CC",
137
+ "CD",
138
+ "CF",
139
+ "CG",
140
+ "CH",
141
+ "CI",
142
+ "CK",
143
+ "CL",
144
+ "CM",
145
+ "CN",
146
+ "CO",
147
+ "CR",
148
+ "CU",
149
+ "CV",
150
+ "CW",
151
+ "CX",
152
+ "CY",
153
+ "CZ",
154
+ "DE",
155
+ "DJ",
156
+ "DK",
157
+ "DM",
158
+ "DO",
159
+ "DZ",
160
+ "EC",
161
+ "EE",
162
+ "EG",
163
+ "EH",
164
+ "ER",
165
+ "ES",
166
+ "ET",
167
+ "FI",
168
+ "FJ",
169
+ "FK",
170
+ "FM",
171
+ "FO",
172
+ "FR",
173
+ "GA",
174
+ "GB",
175
+ "GD",
176
+ "GE",
177
+ "GF",
178
+ "GG",
179
+ "GH",
180
+ "GI",
181
+ "GL",
182
+ "GM",
183
+ "GN",
184
+ "GP",
185
+ "GQ",
186
+ "GR",
187
+ "GS",
188
+ "GT",
189
+ "GU",
190
+ "GW",
191
+ "GY",
192
+ "HK",
193
+ "HM",
194
+ "HN",
195
+ "HR",
196
+ "HT",
197
+ "HU",
198
+ "ID",
199
+ "IE",
200
+ "IL",
201
+ "IM",
202
+ "IN",
203
+ "IO",
204
+ "IQ",
205
+ "IR",
206
+ "IS",
207
+ "IT",
208
+ "JE",
209
+ "JM",
210
+ "JO",
211
+ "JP",
212
+ "KE",
213
+ "KG",
214
+ "KH",
215
+ "KI",
216
+ "KM",
217
+ "KN",
218
+ "KP",
219
+ "KR",
220
+ "KW",
221
+ "KY",
222
+ "KZ",
223
+ "LA",
224
+ "LB",
225
+ "LC",
226
+ "LI",
227
+ "LK",
228
+ "LR",
229
+ "LS",
230
+ "LT",
231
+ "LU",
232
+ "LV",
233
+ "LY",
234
+ "MA",
235
+ "MC",
236
+ "MD",
237
+ "ME",
238
+ "MF",
239
+ "MG",
240
+ "MH",
241
+ "MK",
242
+ "ML",
243
+ "MM",
244
+ "MN",
245
+ "MO",
246
+ "MP",
247
+ "MQ",
248
+ "MR",
249
+ "MS",
250
+ "MT",
251
+ "MU",
252
+ "MV",
253
+ "MW",
254
+ "MX",
255
+ "MY",
256
+ "MZ",
257
+ "NA",
258
+ "NC",
259
+ "NE",
260
+ "NF",
261
+ "NG",
262
+ "NI",
263
+ "NL",
264
+ "NO",
265
+ "NP",
266
+ "NR",
267
+ "NU",
268
+ "NZ",
269
+ "OM",
270
+ "PA",
271
+ "PE",
272
+ "PF",
273
+ "PG",
274
+ "PH",
275
+ "PK",
276
+ "PL",
277
+ "PM",
278
+ "PN",
279
+ "PR",
280
+ "PS",
281
+ "PT",
282
+ "PW",
283
+ "PY",
284
+ "QA",
285
+ "RE",
286
+ "RO",
287
+ "RS",
288
+ "RU",
289
+ "RW",
290
+ "SA",
291
+ "SB",
292
+ "SC",
293
+ "SD",
294
+ "SE",
295
+ "SG",
296
+ "SH",
297
+ "SI",
298
+ "SJ",
299
+ "SK",
300
+ "SL",
301
+ "SM",
302
+ "SN",
303
+ "SO",
304
+ "SR",
305
+ "SS",
306
+ "ST",
307
+ "SV",
308
+ "SX",
309
+ "SY",
310
+ "SZ",
311
+ "TC",
312
+ "TD",
313
+ "TF",
314
+ "TG",
315
+ "TH",
316
+ "TJ",
317
+ "TK",
318
+ "TL",
319
+ "TM",
320
+ "TN",
321
+ "TO",
322
+ "TR",
323
+ "TT",
324
+ "TV",
325
+ "TW",
326
+ "TZ",
327
+ "UA",
328
+ "UG",
329
+ "US",
330
+ "UY",
331
+ "UZ",
332
+ "VA",
333
+ "VC",
334
+ "VE",
335
+ "VG",
336
+ "VI",
337
+ "VN",
338
+ "VU",
339
+ "WF",
340
+ "WS",
341
+ "XK",
342
+ "YE",
343
+ "YT",
344
+ "ZA",
345
+ "ZM",
346
+ "ZW"
347
+ ].map((code) => ({
348
+ code,
349
+ label: regionNames.of(code)
350
+ })).sort((a, b) => a.label.localeCompare(b.label));
351
+ const deploymentSubstates = {
352
+ aborted: "aborted",
353
+ alreadyInstalled: "already-installed",
354
+ decommissioned: "decommissioned",
355
+ downloading: "downloading",
356
+ failure: "failure",
357
+ installing: "installing",
358
+ noartifact: "noartifact",
359
+ artifact_too_big: "artifact_too_big",
360
+ incompatible_tier: "incompatible_tier",
361
+ pause_before_committing: "pause_before_committing",
362
+ pause_before_installing: "pause_before_installing",
363
+ pause_before_rebooting: "pause_before_rebooting",
364
+ pending: "pending",
365
+ rebooting: "rebooting",
366
+ success: "success"
367
+ };
368
+ const deploymentStatesToSubstates = {
369
+ failures: [
370
+ deploymentSubstates.failure,
371
+ deploymentSubstates.aborted,
372
+ deploymentSubstates.decommissioned
373
+ ],
374
+ inprogress: [
375
+ deploymentSubstates.downloading,
376
+ deploymentSubstates.installing,
377
+ deploymentSubstates.rebooting
378
+ ],
379
+ paused: [
380
+ deploymentSubstates.pause_before_installing,
381
+ deploymentSubstates.pause_before_rebooting,
382
+ deploymentSubstates.pause_before_committing
383
+ ],
384
+ pending: [deploymentSubstates.pending],
385
+ successes: [
386
+ deploymentSubstates.success,
387
+ deploymentSubstates.alreadyInstalled,
388
+ deploymentSubstates.noartifact,
389
+ deploymentSubstates.artifact_too_big,
390
+ deploymentSubstates.incompatible_tier
391
+ ]
392
+ };
393
+ const deploymentStatesToSubstatesWithSkipped = {
394
+ ...deploymentStatesToSubstates,
395
+ failures: [deploymentSubstates.failure],
396
+ skipped: [
397
+ deploymentSubstates.aborted,
398
+ deploymentSubstates.noartifact,
399
+ deploymentSubstates.artifact_too_big,
400
+ deploymentSubstates.alreadyInstalled,
401
+ deploymentSubstates.decommissioned,
402
+ deploymentSubstates.incompatible_tier
403
+ ],
404
+ successes: [deploymentSubstates.success]
405
+ };
406
+ const installationSubstatesMap = {
407
+ download: {
408
+ title: "download",
409
+ done: "downloaded",
410
+ successIndicators: [
411
+ deploymentSubstates.installing,
412
+ deploymentSubstates.rebooting,
413
+ ...deploymentStatesToSubstates.paused,
414
+ deploymentSubstates.success
415
+ ],
416
+ failureIndicators: deploymentStatesToSubstates.failures,
417
+ pauseConfigurationIndicator: "ArtifactInstall_Enter"
418
+ },
419
+ install: {
420
+ title: "install",
421
+ done: "installed",
422
+ successIndicators: [
423
+ deploymentSubstates.rebooting,
424
+ deploymentSubstates.pause_before_rebooting,
425
+ deploymentSubstates.pause_before_committing,
426
+ deploymentSubstates.success
427
+ ],
428
+ failureIndicators: deploymentStatesToSubstates.failures,
429
+ pauseConfigurationIndicator: "ArtifactReboot_Enter"
430
+ },
431
+ reboot: {
432
+ title: "reboot",
433
+ done: "rebooted",
434
+ successIndicators: [deploymentSubstates.pause_before_committing, deploymentSubstates.success],
435
+ failureIndicators: deploymentStatesToSubstates.failures,
436
+ pauseConfigurationIndicator: "ArtifactCommit_Enter"
437
+ },
438
+ commit: {
439
+ title: "commit",
440
+ done: "committed",
441
+ successIndicators: deploymentStatesToSubstates.successes,
442
+ failureIndicators: deploymentStatesToSubstates.failures,
443
+ pauseConfigurationIndicator: void 0
444
+ }
445
+ };
446
+ const DEPLOYMENT_STATES = {
447
+ finished: "finished",
448
+ inprogress: "inprogress",
449
+ pending: "pending",
450
+ scheduled: "scheduled"
451
+ };
452
+ const listDefaultsByState = {
453
+ [DEPLOYMENT_STATES.inprogress]: {
454
+ page: 1,
455
+ perPage: 10
456
+ },
457
+ [DEPLOYMENT_STATES.pending]: {
458
+ page: 1,
459
+ perPage: 10
460
+ },
461
+ [DEPLOYMENT_STATES.scheduled]: { ..._northern_tech_utils_constants.DEVICE_LIST_DEFAULTS },
462
+ [DEPLOYMENT_STATES.finished]: { ..._northern_tech_utils_constants.DEVICE_LIST_DEFAULTS },
463
+ sort: { direction: _northern_tech_utils_constants.SORTING_OPTIONS.desc }
464
+ };
465
+ const DEFAULT_PENDING_INPROGRESS_COUNT = 10;
466
+ const DEPLOYMENT_ROUTES = {
467
+ active: {
468
+ key: "active",
469
+ route: "/deployments/active",
470
+ states: [DEPLOYMENT_STATES.pending, DEPLOYMENT_STATES.inprogress],
471
+ title: "Active"
472
+ },
473
+ finished: {
474
+ key: "finished",
475
+ route: "/deployments/finished",
476
+ states: [DEPLOYMENT_STATES.finished],
477
+ title: "Finished"
478
+ },
479
+ scheduled: {
480
+ key: "scheduled",
481
+ route: "/deployments/scheduled",
482
+ states: [DEPLOYMENT_STATES.scheduled],
483
+ title: "Scheduled"
484
+ }
485
+ };
486
+ const DEPLOYMENT_TYPES = {
487
+ software: "software",
488
+ configuration: "configuration"
489
+ };
490
+ const defaultStats = {
491
+ [deploymentSubstates.aborted]: 0,
492
+ [deploymentSubstates.alreadyInstalled]: 0,
493
+ [deploymentSubstates.decommissioned]: 0,
494
+ [deploymentSubstates.downloading]: 0,
495
+ [deploymentSubstates.failure]: 0,
496
+ [deploymentSubstates.installing]: 0,
497
+ [deploymentSubstates.noartifact]: 0,
498
+ [deploymentSubstates.pause_before_committing]: 0,
499
+ [deploymentSubstates.pause_before_installing]: 0,
500
+ [deploymentSubstates.pause_before_rebooting]: 0,
501
+ [deploymentSubstates.pending]: 0,
502
+ [deploymentSubstates.rebooting]: 0,
503
+ [deploymentSubstates.success]: 0
504
+ };
505
+ const deploymentDisplayStates = {
506
+ finished: "Finished",
507
+ scheduled: "Scheduled",
508
+ skipped: "Skipped",
509
+ paused: "Paused",
510
+ pending: "Pending",
511
+ inprogress: "In Progress",
512
+ success: "Success",
513
+ successes: "Success",
514
+ failure: "Fail",
515
+ failures: "Fail"
516
+ };
517
+ const deploymentPrototype = {
518
+ devices: {},
519
+ name: void 0,
520
+ statistics: { status: {} }
521
+ };
522
+ const pauseMap = {
523
+ [deploymentSubstates.pause_before_installing]: {
524
+ title: installationSubstatesMap.download.done,
525
+ followUp: installationSubstatesMap.download.pauseConfigurationIndicator
526
+ },
527
+ [deploymentSubstates.pause_before_rebooting]: {
528
+ title: installationSubstatesMap.install.done,
529
+ followUp: installationSubstatesMap.install.pauseConfigurationIndicator
530
+ },
531
+ [deploymentSubstates.pause_before_committing]: {
532
+ title: installationSubstatesMap.reboot.done,
533
+ followUp: installationSubstatesMap.reboot.pauseConfigurationIndicator
534
+ }
535
+ };
536
+ //#endregion
537
+ //#region src/devicesSlice/constants.ts
538
+ const emptyFilter = {
539
+ key: null,
540
+ value: "",
541
+ operator: _northern_tech_utils_constants.DEVICE_FILTERING_OPTIONS.$eq.key,
542
+ scope: "inventory"
543
+ };
544
+ const DEVICE_MESSAGE_PROTOCOLS = { Shell: 1 };
545
+ const DEVICE_MESSAGE_TYPES = {
546
+ Delay: "delay",
547
+ New: "new",
548
+ Ping: "ping",
549
+ Pong: "pong",
550
+ Resize: "resize",
551
+ Shell: "shell",
552
+ Stop: "stop"
553
+ };
554
+ const DEVICE_DISMISSAL_STATE = "dismiss";
555
+ const DEVICE_CONNECT_STATES = {
556
+ connected: "connected",
557
+ disconnected: "disconnected",
558
+ unknown: "unknown"
559
+ };
560
+ const geoAttributes = ["geo-lat", "geo-lon"].map((attribute) => ({
561
+ attribute,
562
+ scope: "inventory"
563
+ }));
564
+ const REPORT_CHART_SIZE_LIMIT = 6;
565
+ //#endregion
566
+ //#region src/organizationSlice/constants.ts
567
+ const XML_METADATA_FORMAT = "xml";
568
+ const JSON_METADATA_FORMAT = "json";
569
+ const getSamlStartUrl = (id) => `${window.location.origin}${_northern_tech_utils_constants.useradmApiUrl}/auth/sso/${id}/login`;
570
+ const getOidcStartUrl = (id) => `${window.location.origin}${_northern_tech_utils_constants.useradmApiUrl}/oidc/${id}/start`;
571
+ const SSO_TYPES = {
572
+ saml: {
573
+ id: "saml",
574
+ type: "saml",
575
+ title: "SAML",
576
+ metadataFormat: "xml",
577
+ editorLanguage: "xml",
578
+ contentType: "application/samlmetadata+xml",
579
+ getStartUrl: getSamlStartUrl,
580
+ configDetails: [
581
+ {
582
+ key: "entityID",
583
+ label: "Entity ID",
584
+ getValue: (id) => `${window.location.origin}${_northern_tech_utils_constants.useradmApiUrl}/sso/sp/metadata/${id}`
585
+ },
586
+ {
587
+ key: "acs",
588
+ label: "ACS URL",
589
+ getValue: (id) => `${window.location.origin}${_northern_tech_utils_constants.useradmApiUrl}/auth/sso/${id}/acs`
590
+ },
591
+ {
592
+ key: "startURL",
593
+ label: "Start URL",
594
+ getValue: getSamlStartUrl
595
+ }
596
+ ]
597
+ },
598
+ oidc: {
599
+ id: "oidc",
600
+ type: "oidc",
601
+ title: "OpenID Connect",
602
+ metadataFormat: JSON_METADATA_FORMAT,
603
+ editorLanguage: JSON_METADATA_FORMAT,
604
+ contentType: "application/json",
605
+ getStartUrl: getOidcStartUrl,
606
+ configDetails: [{
607
+ key: "startURL",
608
+ label: "Start Url",
609
+ getValue: getOidcStartUrl
610
+ }]
611
+ }
612
+ };
613
+ const auditlogTypes = {
614
+ artifact: {
615
+ title: "Artifact",
616
+ queryParameter: "object_type",
617
+ value: "artifact"
618
+ },
619
+ deployment: {
620
+ title: "Deployment",
621
+ queryParameter: "object_deployment_name",
622
+ value: "deployment"
623
+ },
624
+ device: {
625
+ title: "Device",
626
+ queryParameter: "object_id",
627
+ value: "device"
628
+ },
629
+ user_access_token: {
630
+ title: "Personal Access Token",
631
+ queryParameter: "user_access_token",
632
+ value: "user_access_token"
633
+ },
634
+ user: {
635
+ title: "User",
636
+ queryParameter: "object_id",
637
+ value: "user"
638
+ },
639
+ tenant: {
640
+ title: "Tenant",
641
+ queryParameter: "object_id",
642
+ value: "tenant"
643
+ }
644
+ };
645
+ const AUDIT_LOGS_TYPES = [
646
+ auditlogTypes.artifact,
647
+ auditlogTypes.deployment,
648
+ auditlogTypes.device,
649
+ auditlogTypes.user_access_token,
650
+ auditlogTypes.user
651
+ ];
652
+ const SP_AUDIT_LOGS_TYPES = [auditlogTypes.user, auditlogTypes.tenant];
653
+ const TENANT_LIST_DEFAULT = {
654
+ page: 1,
655
+ perPage: 20
656
+ };
657
+ //#endregion
658
+ //#region src/usersSlice/constants.ts
659
+ const itemUiPermissionsReducer = (accu, { item, uiPermissions }) => item ? {
660
+ ...accu,
661
+ [item]: uiPermissions
662
+ } : accu;
663
+ const checkSinglePermission = (permission, requiredPermission) => requiredPermission === permission || _northern_tech_utils_constants.uiPermissionsById[permission].permissionLevel > _northern_tech_utils_constants.uiPermissionsById[requiredPermission].permissionLevel;
664
+ const checkPermissionsObject = (permissions, requiredPermission, scopedAccess, superAccess) => permissions[superAccess]?.some((permission) => checkSinglePermission(permission, requiredPermission)) || permissions[scopedAccess]?.some((permission) => checkSinglePermission(permission, requiredPermission));
665
+ const USER_LOGOUT = "USER_LOGOUT";
666
+ const OWN_USER_ID = "me";
667
+ const settingsKeys = { initialized: "settings-initialized" };
668
+ const READ_STATES = {
669
+ read: "read",
670
+ seen: "seen",
671
+ unread: "unread"
672
+ };
673
+ //#endregion
674
+ Object.defineProperty(exports, "AUDIT_LOGS_TYPES", {
675
+ enumerable: true,
676
+ get: function() {
677
+ return AUDIT_LOGS_TYPES;
678
+ }
679
+ });
680
+ Object.defineProperty(exports, "DEFAULT_PENDING_INPROGRESS_COUNT", {
681
+ enumerable: true,
682
+ get: function() {
683
+ return DEFAULT_PENDING_INPROGRESS_COUNT;
684
+ }
685
+ });
686
+ Object.defineProperty(exports, "DEPLOYMENT_ROUTES", {
687
+ enumerable: true,
688
+ get: function() {
689
+ return DEPLOYMENT_ROUTES;
690
+ }
691
+ });
692
+ Object.defineProperty(exports, "DEPLOYMENT_STATES", {
693
+ enumerable: true,
694
+ get: function() {
695
+ return DEPLOYMENT_STATES;
696
+ }
697
+ });
698
+ Object.defineProperty(exports, "DEPLOYMENT_TYPES", {
699
+ enumerable: true,
700
+ get: function() {
701
+ return DEPLOYMENT_TYPES;
702
+ }
703
+ });
704
+ Object.defineProperty(exports, "DEVICE_CONNECT_STATES", {
705
+ enumerable: true,
706
+ get: function() {
707
+ return DEVICE_CONNECT_STATES;
708
+ }
709
+ });
710
+ Object.defineProperty(exports, "DEVICE_DISMISSAL_STATE", {
711
+ enumerable: true,
712
+ get: function() {
713
+ return DEVICE_DISMISSAL_STATE;
714
+ }
715
+ });
716
+ Object.defineProperty(exports, "DEVICE_LIST_MAXIMUM_LENGTH", {
717
+ enumerable: true,
718
+ get: function() {
719
+ return DEVICE_LIST_MAXIMUM_LENGTH;
720
+ }
721
+ });
722
+ Object.defineProperty(exports, "DEVICE_MESSAGE_PROTOCOLS", {
723
+ enumerable: true,
724
+ get: function() {
725
+ return DEVICE_MESSAGE_PROTOCOLS;
726
+ }
727
+ });
728
+ Object.defineProperty(exports, "DEVICE_MESSAGE_TYPES", {
729
+ enumerable: true,
730
+ get: function() {
731
+ return DEVICE_MESSAGE_TYPES;
732
+ }
733
+ });
734
+ Object.defineProperty(exports, "DEVICE_ONLINE_CUTOFF", {
735
+ enumerable: true,
736
+ get: function() {
737
+ return DEVICE_ONLINE_CUTOFF;
738
+ }
739
+ });
740
+ Object.defineProperty(exports, "EXTERNAL_PROVIDER", {
741
+ enumerable: true,
742
+ get: function() {
743
+ return EXTERNAL_PROVIDER;
744
+ }
745
+ });
746
+ Object.defineProperty(exports, "JSON_METADATA_FORMAT", {
747
+ enumerable: true,
748
+ get: function() {
749
+ return JSON_METADATA_FORMAT;
750
+ }
751
+ });
752
+ Object.defineProperty(exports, "MAX_PAGE_SIZE", {
753
+ enumerable: true,
754
+ get: function() {
755
+ return MAX_PAGE_SIZE;
756
+ }
757
+ });
758
+ Object.defineProperty(exports, "OWN_USER_ID", {
759
+ enumerable: true,
760
+ get: function() {
761
+ return OWN_USER_ID;
762
+ }
763
+ });
764
+ Object.defineProperty(exports, "READ_STATES", {
765
+ enumerable: true,
766
+ get: function() {
767
+ return READ_STATES;
768
+ }
769
+ });
770
+ Object.defineProperty(exports, "REPORT_CHART_SIZE_LIMIT", {
771
+ enumerable: true,
772
+ get: function() {
773
+ return REPORT_CHART_SIZE_LIMIT;
774
+ }
775
+ });
776
+ Object.defineProperty(exports, "SP_AUDIT_LOGS_TYPES", {
777
+ enumerable: true,
778
+ get: function() {
779
+ return SP_AUDIT_LOGS_TYPES;
780
+ }
781
+ });
782
+ Object.defineProperty(exports, "SSO_TYPES", {
783
+ enumerable: true,
784
+ get: function() {
785
+ return SSO_TYPES;
786
+ }
787
+ });
788
+ Object.defineProperty(exports, "TENANT_LIST_DEFAULT", {
789
+ enumerable: true,
790
+ get: function() {
791
+ return TENANT_LIST_DEFAULT;
792
+ }
793
+ });
794
+ Object.defineProperty(exports, "TIMEOUTS", {
795
+ enumerable: true,
796
+ get: function() {
797
+ return TIMEOUTS;
798
+ }
799
+ });
800
+ Object.defineProperty(exports, "UNGROUPED_GROUP", {
801
+ enumerable: true,
802
+ get: function() {
803
+ return UNGROUPED_GROUP;
804
+ }
805
+ });
806
+ Object.defineProperty(exports, "USER_LOGOUT", {
807
+ enumerable: true,
808
+ get: function() {
809
+ return USER_LOGOUT;
810
+ }
811
+ });
812
+ Object.defineProperty(exports, "XML_METADATA_FORMAT", {
813
+ enumerable: true,
814
+ get: function() {
815
+ return XML_METADATA_FORMAT;
816
+ }
817
+ });
818
+ Object.defineProperty(exports, "auditlogTypes", {
819
+ enumerable: true,
820
+ get: function() {
821
+ return auditlogTypes;
822
+ }
823
+ });
824
+ Object.defineProperty(exports, "checkPermissionsObject", {
825
+ enumerable: true,
826
+ get: function() {
827
+ return checkPermissionsObject;
828
+ }
829
+ });
830
+ Object.defineProperty(exports, "countries", {
831
+ enumerable: true,
832
+ get: function() {
833
+ return countries;
834
+ }
835
+ });
836
+ Object.defineProperty(exports, "credentialTypes", {
837
+ enumerable: true,
838
+ get: function() {
839
+ return credentialTypes;
840
+ }
841
+ });
842
+ Object.defineProperty(exports, "defaultIdAttribute", {
843
+ enumerable: true,
844
+ get: function() {
845
+ return defaultIdAttribute;
846
+ }
847
+ });
848
+ Object.defineProperty(exports, "defaultStats", {
849
+ enumerable: true,
850
+ get: function() {
851
+ return defaultStats;
852
+ }
853
+ });
854
+ Object.defineProperty(exports, "deploymentDisplayStates", {
855
+ enumerable: true,
856
+ get: function() {
857
+ return deploymentDisplayStates;
858
+ }
859
+ });
860
+ Object.defineProperty(exports, "deploymentPrototype", {
861
+ enumerable: true,
862
+ get: function() {
863
+ return deploymentPrototype;
864
+ }
865
+ });
866
+ Object.defineProperty(exports, "deploymentStatesToSubstates", {
867
+ enumerable: true,
868
+ get: function() {
869
+ return deploymentStatesToSubstates;
870
+ }
871
+ });
872
+ Object.defineProperty(exports, "deploymentStatesToSubstatesWithSkipped", {
873
+ enumerable: true,
874
+ get: function() {
875
+ return deploymentStatesToSubstatesWithSkipped;
876
+ }
877
+ });
878
+ Object.defineProperty(exports, "deploymentSubstates", {
879
+ enumerable: true,
880
+ get: function() {
881
+ return deploymentSubstates;
882
+ }
883
+ });
884
+ Object.defineProperty(exports, "emptyFilter", {
885
+ enumerable: true,
886
+ get: function() {
887
+ return emptyFilter;
888
+ }
889
+ });
890
+ Object.defineProperty(exports, "emptyWebhook", {
891
+ enumerable: true,
892
+ get: function() {
893
+ return emptyWebhook;
894
+ }
895
+ });
896
+ Object.defineProperty(exports, "geoAttributes", {
897
+ enumerable: true,
898
+ get: function() {
899
+ return geoAttributes;
900
+ }
901
+ });
902
+ Object.defineProperty(exports, "getOidcStartUrl", {
903
+ enumerable: true,
904
+ get: function() {
905
+ return getOidcStartUrl;
906
+ }
907
+ });
908
+ Object.defineProperty(exports, "getSamlStartUrl", {
909
+ enumerable: true,
910
+ get: function() {
911
+ return getSamlStartUrl;
912
+ }
913
+ });
914
+ Object.defineProperty(exports, "installationSubstatesMap", {
915
+ enumerable: true,
916
+ get: function() {
917
+ return installationSubstatesMap;
918
+ }
919
+ });
920
+ Object.defineProperty(exports, "itemUiPermissionsReducer", {
921
+ enumerable: true,
922
+ get: function() {
923
+ return itemUiPermissionsReducer;
924
+ }
925
+ });
926
+ Object.defineProperty(exports, "listDefaultsByState", {
927
+ enumerable: true,
928
+ get: function() {
929
+ return listDefaultsByState;
930
+ }
931
+ });
932
+ Object.defineProperty(exports, "pauseMap", {
933
+ enumerable: true,
934
+ get: function() {
935
+ return pauseMap;
936
+ }
937
+ });
938
+ Object.defineProperty(exports, "productOrder", {
939
+ enumerable: true,
940
+ get: function() {
941
+ return productOrder;
942
+ }
943
+ });
944
+ Object.defineProperty(exports, "settingsKeys", {
945
+ enumerable: true,
946
+ get: function() {
947
+ return settingsKeys;
948
+ }
949
+ });
950
+ Object.defineProperty(exports, "timeUnits", {
951
+ enumerable: true,
952
+ get: function() {
953
+ return timeUnits;
954
+ }
955
+ });
956
+
957
+ //# sourceMappingURL=constants-CNZ5L0A0.cjs.map