@northern.tech/store 0.38.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 +61 -44
  70. package/dist/thunks.cjs.map +1 -1
  71. package/dist/thunks.js +62 -45
  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 +5 -5
  85. package/dist/constants.cjs.map +0 -1
  86. package/dist/constants.js.map +0 -1
@@ -0,0 +1,676 @@
1
+ import { ALL_DEVICES, ALL_DEVICE_STATES, ALL_RELEASES, APPLICATION_JSON_CONTENT_TYPE, APPLICATION_JWT_CONTENT_TYPE, ATTRIBUTE_SCOPES, DEVICE_FILTERING_OPTIONS, DEVICE_ISSUE_OPTIONS, DEVICE_LIST_DEFAULTS, DEVICE_STATES, PermissionTypes, SORTING_OPTIONS, alertChannels, apiRoot, apiUrl, auditLogsApiUrl, defaultPermissionSets, deploymentsApiUrl, deploymentsApiUrlV1alpha1, deploymentsApiUrlV2, deviceAuthV2, deviceConfig, deviceConnect, emptyRole, emptyUiPermissions, headerNames, inventoryApiUrl, inventoryApiUrlV2, iotManagerBaseURL, limitDefault, maxSessionAge, monitorApiUrlv1, rolesById, rolesByName, scopedPermissionAreas, serviceProviderRolesById, ssoIdpApiUrlv1, tenantadmApiUrlv1, tenantadmApiUrlv2, twoFAStates, uiPermissionsByArea, uiPermissionsById, useradmApiUrl, useradmApiUrlv1, useradmApiUrlv2 } from "@northern.tech/utils/constants";
2
+ import { mdiAws, mdiMicrosoftAzure } from "@mdi/js";
3
+ import { Fragment, jsx, jsxs } from "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: 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: mdiAws,
50
+ title: "AWS IoT Core",
51
+ twinTitle: "Device Shadow",
52
+ provider: "iot-core",
53
+ enabled: true,
54
+ deviceTwin: true,
55
+ configHint: /* @__PURE__ */ jsx(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: mdiMicrosoftAzure,
60
+ title: "Azure IoT Hub",
61
+ twinTitle: "Device Twin",
62
+ provider: "iot-hub",
63
+ enabled: true,
64
+ deviceTwin: true,
65
+ configHint: /* @__PURE__ */ 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__ */ 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]: { ...DEVICE_LIST_DEFAULTS },
462
+ [DEPLOYMENT_STATES.finished]: { ...DEVICE_LIST_DEFAULTS },
463
+ sort: { direction: 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: 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}${useradmApiUrl}/auth/sso/${id}/login`;
570
+ const getOidcStartUrl = (id) => `${window.location.origin}${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}${useradmApiUrl}/sso/sp/metadata/${id}`
585
+ },
586
+ {
587
+ key: "acs",
588
+ label: "ACS URL",
589
+ getValue: (id) => `${window.location.origin}${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 || uiPermissionsById[permission].permissionLevel > 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
+ export { JSON_METADATA_FORMAT as $, limitDefault as A, MAX_PAGE_SIZE as At, twoFAStates as B, deviceConnect as C, deploymentSubstates as Ct, inventoryApiUrl as D, DEVICE_LIST_MAXIMUM_LENGTH as Dt, headerNames as E, pauseMap as Et, scopedPermissionAreas as F, defaultIdAttribute as Ft, useradmApiUrlv2 as G, uiPermissionsById as H, serviceProviderRolesById as I, emptyWebhook as It, USER_LOGOUT as J, OWN_USER_ID as K, ssoIdpApiUrlv1 as L, productOrder as Lt, monitorApiUrlv1 as M, UNGROUPED_GROUP as Mt, rolesById as N, countries as Nt, inventoryApiUrlV2 as O, DEVICE_ONLINE_CUTOFF as Ot, rolesByName as P, credentialTypes as Pt, AUDIT_LOGS_TYPES as Q, tenantadmApiUrlv1 as R, timeUnits as Rt, deviceConfig as S, deploymentStatesToSubstatesWithSkipped as St, emptyUiPermissions as T, listDefaultsByState as Tt, useradmApiUrl as U, uiPermissionsByArea as V, useradmApiUrlv1 as W, itemUiPermissionsReducer as X, checkPermissionsObject as Y, settingsKeys as Z, defaultPermissionSets as _, DEPLOYMENT_TYPES as _t, APPLICATION_JWT_CONTENT_TYPE as a, getOidcStartUrl as at, deploymentsApiUrlV2 as b, deploymentPrototype as bt, DEVICE_ISSUE_OPTIONS as c, DEVICE_DISMISSAL_STATE as ct, PermissionTypes as d, REPORT_CHART_SIZE_LIMIT as dt, SP_AUDIT_LOGS_TYPES as et, SORTING_OPTIONS as f, emptyFilter as ft, auditLogsApiUrl as g, DEPLOYMENT_STATES as gt, apiUrl as h, DEPLOYMENT_ROUTES as ht, APPLICATION_JSON_CONTENT_TYPE as i, auditlogTypes as it, maxSessionAge as j, TIMEOUTS as jt, iotManagerBaseURL as k, EXTERNAL_PROVIDER as kt, DEVICE_LIST_DEFAULTS as l, DEVICE_MESSAGE_PROTOCOLS as lt, apiRoot as m, DEFAULT_PENDING_INPROGRESS_COUNT as mt, ALL_DEVICE_STATES as n, TENANT_LIST_DEFAULT as nt, ATTRIBUTE_SCOPES as o, getSamlStartUrl as ot, alertChannels as p, geoAttributes as pt, READ_STATES as q, ALL_RELEASES as r, XML_METADATA_FORMAT as rt, DEVICE_FILTERING_OPTIONS as s, DEVICE_CONNECT_STATES as st, ALL_DEVICES as t, SSO_TYPES as tt, DEVICE_STATES as u, DEVICE_MESSAGE_TYPES as ut, deploymentsApiUrl as v, defaultStats as vt, emptyRole as w, installationSubstatesMap as wt, deviceAuthV2 as x, deploymentStatesToSubstates as xt, deploymentsApiUrlV1alpha1 as y, deploymentDisplayStates as yt, tenantadmApiUrlv2 as z };
675
+
676
+ //# sourceMappingURL=constants-Cj2kp3Iy.js.map