@webitel/ui-sdk 26.2.70 → 26.2.71

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 (91) hide show
  1. package/dist/{errors-DCJKAXTz.js → errors-CTL-RV3B.js} +1 -1
  2. package/dist/{index-cVwBpL1P.js → index-CLhoKzki.js} +1 -1
  3. package/dist/{index-B71drQtj.js → index-x2Djqp3W.js} +4 -4
  4. package/dist/{install-BEn6vjFW.js → install-Cp4KnSCI.js} +1102 -1220
  5. package/dist/{isObject-DB0eH0MA.js → isObject-C_1aA257.js} +1 -1
  6. package/dist/prod-BoQuiIB3.js +973 -0
  7. package/dist/srt-parser-CsN7bp5E.js +26 -0
  8. package/dist/ssa-parser-BJOOPeQF.js +200 -0
  9. package/dist/ui-sdk.css +1 -1
  10. package/dist/ui-sdk.js +1 -1
  11. package/dist/ui-sdk.umd.cjs +464 -482
  12. package/dist/vidstack-Bq6c3Bam-CeA9TvJ4.js +425 -0
  13. package/dist/vidstack-D2pY00kU-hPWR401d.js +135 -0
  14. package/dist/vidstack-DDXt6fpN-DEjXPjHx.js +50 -0
  15. package/dist/vidstack-D_-9AA6_-Bh2Pn0IA.js +20 -0
  16. package/dist/{vidstack-Dm1xEU9Q-qSXq3AI-.js → vidstack-Dm1xEU9Q-CXHNvShT.js} +10 -11
  17. package/dist/vidstack-DqAw8m9J-BSNVCj3S.js +22 -0
  18. package/dist/vidstack-audio-C3of4Q-I.js +28 -0
  19. package/dist/vidstack-dash-BD3CNy0Z.js +392 -0
  20. package/dist/vidstack-google-cast-DXLqBW30.js +382 -0
  21. package/dist/vidstack-hls-C6Az6tgn.js +309 -0
  22. package/dist/vidstack-krOAtKMi-C50BTxmn.js +28 -0
  23. package/dist/vidstack-video-CtScgimr.js +163 -0
  24. package/dist/vidstack-vimeo-dFXp7_Vx.js +451 -0
  25. package/dist/vidstack-youtube-BF0J2izd.js +232 -0
  26. package/dist/{vuex.esm-bundler-tZVctzTj.js → vuex.esm-bundler-D5BkZi23.js} +1 -1
  27. package/dist/{wt-action-bar-ColV1kXE.js → wt-action-bar-BrFf9y4i.js} +1 -1
  28. package/dist/{wt-button-select-CfoSEYMj.js → wt-button-select-BQOYl5Z5.js} +1 -1
  29. package/dist/{wt-chat-emoji-Bgv9Viz-.js → wt-chat-emoji-D9rZ4xfn.js} +6 -11
  30. package/dist/{wt-confirm-dialog-bVhuyR-Q.js → wt-confirm-dialog-DdRFwuNQ.js} +1 -1
  31. package/dist/{wt-context-menu-Cd8pgBRV.js → wt-context-menu-Dx-K-ACK.js} +1 -1
  32. package/dist/{wt-copy-action-jjp1mO2h.js → wt-copy-action-BPMZsUtG.js} +1 -1
  33. package/dist/wt-datepicker-PK3BgSmp.js +5660 -0
  34. package/dist/wt-display-chip-items-CAO8OLhX.js +46 -0
  35. package/dist/{wt-dual-panel-DJsiR6RF.js → wt-dual-panel-CAh5CMKO.js} +1 -1
  36. package/dist/{wt-dummy-O94iGdZS.js → wt-dummy-DMXuDlcb.js} +1 -1
  37. package/dist/{wt-error-page-xgSWJ65z.js → wt-error-page-UoX8GV8V.js} +1 -1
  38. package/dist/{wt-expansion-panel-vzG02b62.js → wt-expansion-panel-G7G1803j.js} +1 -1
  39. package/dist/{wt-filters-panel-wrapper-h-UaAMuF.js → wt-filters-panel-wrapper-GI9X-SaD.js} +1 -1
  40. package/dist/wt-galleria-DtJgf7Db.js +322 -0
  41. package/dist/{wt-navigation-menu-Cu5Y9kua.js → wt-navigation-menu-CrDo7Vpq.js} +2 -5
  42. package/dist/wt-notifications-bar-CmUZpffK.js +79 -0
  43. package/dist/{wt-page-header-DlRrRzG7.js → wt-page-header-C7JiNmsy.js} +1 -1
  44. package/dist/{wt-pagination-CW46I4u2.js → wt-pagination-CaOk680t.js} +1 -1
  45. package/dist/{wt-player-3qh_Jzm2.js → wt-player-Cs2dAT3H.js} +1 -1
  46. package/dist/{wt-popover-BTG5bUP0.js → wt-popover-U7JE0uoX.js} +19 -22
  47. package/dist/{wt-search-bar-CTsNf7bp.js → wt-search-bar-f1yQguL2.js} +25 -28
  48. package/dist/{wt-selection-popup-DvaUvY4O.js → wt-selection-popup-CwjvQZ77.js} +1 -1
  49. package/dist/{wt-start-page-CcN7JC_u.js → wt-start-page-CMGnK33r.js} +7 -7
  50. package/dist/{wt-status-select-C8t0cgTg.js → wt-status-select-C5RigMIl.js} +1 -1
  51. package/dist/{wt-stepper-BLb42q2I.js → wt-stepper-1gbY9rv5.js} +1 -1
  52. package/dist/{wt-table-9gmsV0Y9.js → wt-table-D6d0dRYQ.js} +111 -114
  53. package/dist/{wt-table-actions-BB7AH7sR.js → wt-table-actions-BsjrniPP.js} +1 -1
  54. package/dist/{wt-table-column-select-B3lrCEaV.js → wt-table-column-select-JiD5kd7i.js} +28 -31
  55. package/dist/{wt-tabs-CCHi_E1a.js → wt-tabs-DpxPfuRj.js} +1 -1
  56. package/dist/{wt-tags-input-DLicKjv3.js → wt-tags-input-CJpT_4mw.js} +56 -57
  57. package/dist/{wt-timepicker-B9ONDzNQ.js → wt-timepicker-CtH8MdN-.js} +1 -1
  58. package/dist/{wt-tree-cQlvJmh5.js → wt-tree-C99Qwdwn.js} +4 -5
  59. package/dist/{wt-tree-table-B89YKiMf.js → wt-tree-table-3qAoEJ7m.js} +5 -5
  60. package/dist/{wt-type-extension-value-input-Da8FXLDs.js → wt-type-extension-value-input-CfiVBG5u.js} +214 -218
  61. package/dist/wt-vidstack-player-B8Ilx2ml.js +10229 -0
  62. package/package.json +5 -5
  63. package/src/modules/Userinfo/classes/ApplicationsAccess.ts +36 -3
  64. package/src/modules/Userinfo/scripts/utils.ts +2 -22
  65. package/src/modules/Userinfo/stores/accessStore.ts +20 -5
  66. package/src/modules/Userinfo/types/UserAccess.d.ts +11 -3
  67. package/types/modules/Userinfo/classes/ApplicationsAccess.d.ts +34 -243
  68. package/types/modules/Userinfo/scripts/utils.d.ts +1 -2
  69. package/types/modules/Userinfo/stores/accessStore.d.ts +1 -1
  70. package/types/modules/Userinfo/stores/userinfoStore.d.ts +21 -9
  71. package/dist/prod-DTLJXtPo.js +0 -994
  72. package/dist/srt-parser-CWqahKwO.js +0 -27
  73. package/dist/ssa-parser-BqjjKy4M.js +0 -209
  74. package/dist/vidstack-Bq6c3Bam-w5y-QQDX.js +0 -413
  75. package/dist/vidstack-D2pY00kU-BI5rYx7p.js +0 -138
  76. package/dist/vidstack-DDXt6fpN-QZPrP2dy.js +0 -60
  77. package/dist/vidstack-D_-9AA6_-Bo1xPN-G.js +0 -20
  78. package/dist/vidstack-DqAw8m9J-DL7LzrFt.js +0 -29
  79. package/dist/vidstack-audio-lX1O0fza.js +0 -32
  80. package/dist/vidstack-dash-BQkRGWe_.js +0 -403
  81. package/dist/vidstack-google-cast-C39n-PU1.js +0 -377
  82. package/dist/vidstack-hls-BCLhCuNJ.js +0 -324
  83. package/dist/vidstack-krOAtKMi-B4IZWKdc.js +0 -29
  84. package/dist/vidstack-video-BgayrEIC.js +0 -181
  85. package/dist/vidstack-vimeo-Lpe7iySs.js +0 -437
  86. package/dist/vidstack-youtube-Dmcz0xVm.js +0 -236
  87. package/dist/wt-datepicker-Cs3xDzVq.js +0 -5789
  88. package/dist/wt-display-chip-items-IqNMxa_X.js +0 -52
  89. package/dist/wt-galleria-cDjsiOcp.js +0 -324
  90. package/dist/wt-notifications-bar-KNH47kZ7.js +0 -80
  91. package/dist/wt-vidstack-player-BzFbIwCa.js +0 -10250
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.2.70",
3
+ "version": "26.2.71",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run biome:format:all || true) && npm run publish-lib",
@@ -94,9 +94,6 @@
94
94
  "zod": "^4.x"
95
95
  },
96
96
  "peerDependenciesMeta": {
97
- "@vuelidate/core": {
98
- "optional": true
99
- },
100
97
  "@vuelidate/validators": {
101
98
  "optional": true
102
99
  },
@@ -114,6 +111,8 @@
114
111
  }
115
112
  },
116
113
  "devDependencies": {
114
+ "@vuelidate/core": "^2.0.3",
115
+ "@vuelidate/validators": "^2.0.4",
117
116
  "@biomejs/biome": "^2.3.11",
118
117
  "@regle/core": "^1.16.2",
119
118
  "@tsconfig/node22": "^22.0.0",
@@ -140,12 +139,13 @@
140
139
  "prismjs": "^1.30.0",
141
140
  "publint": "^0.3.16",
142
141
  "sass": "^1.85.1",
142
+ "type-fest": "^5.4.4",
143
143
  "typedoc-github-wiki-theme": "^2.1.0",
144
144
  "typescript": "^5.9.x",
145
145
  "typescript-plugin-css-modules": "^5.1.0",
146
146
  "unplugin-auto-import": "^20.3.x",
147
147
  "vidstack": "^1.12.13",
148
- "vite": "npm:rolldown-vite@latest",
148
+ "vite": "^7.3.1",
149
149
  "vite-plugin-checker": "^0.12.0",
150
150
  "vite-plugin-node-polyfills": "^0.24.x",
151
151
  "vite-plugin-static-copy": "^3.1.x",
@@ -1,6 +1,6 @@
1
- import { AdjunctTypesAPI as CustomTypesAPI } from '@webitel/api-services/api';
2
1
  import deepCopy from 'deep-copy';
3
2
  import deepmerge from 'deepmerge';
3
+ import type { PartialDeep } from 'type-fest';
4
4
 
5
5
  import {
6
6
  AdminSections,
@@ -10,7 +10,32 @@ import {
10
10
  WtApplication,
11
11
  } from '../../../enums';
12
12
 
13
- const applicationsAccess = (value = true) => ({
13
+ type BaseAccessSchema = {
14
+ _enabled: boolean;
15
+ _locale: string;
16
+ };
17
+
18
+ export type ApplicationsAccessSchema = {
19
+ [WtApplication.Agent]: BaseAccessSchema;
20
+ } & {
21
+ [WtApplication.History]: BaseAccessSchema;
22
+ } & {
23
+ [WtApplication.Analytics]: BaseAccessSchema;
24
+ } & {
25
+ [WtApplication.Supervisor]: BaseAccessSchema &
26
+ Partial<Record<SupervisorSections, BaseAccessSchema>>;
27
+ } & {
28
+ [WtApplication.Admin]: BaseAccessSchema &
29
+ Partial<Record<AdminSections, BaseAccessSchema>>;
30
+ } & {
31
+ [WtApplication.Audit]: BaseAccessSchema &
32
+ Partial<Record<AuditorSections, BaseAccessSchema>>;
33
+ } & {
34
+ [WtApplication.Crm]: BaseAccessSchema &
35
+ Partial<Record<CrmSections, BaseAccessSchema>>;
36
+ };
37
+
38
+ const applicationsAccess = (value = true): ApplicationsAccessSchema => ({
14
39
  [WtApplication.Agent]: {
15
40
  _enabled: value,
16
41
  _locale: `WtApplication.${WtApplication.Agent}.name`,
@@ -256,9 +281,17 @@ const applicationsAccess = (value = true) => ({
256
281
  /**
257
282
  */
258
283
  export default class ApplicationsAccess {
284
+ access: ApplicationsAccessSchema;
285
+
259
286
  // value param could be passed to set same value for all options
260
287
  constructor(
261
- { access, value } = {
288
+ {
289
+ access,
290
+ value,
291
+ }: {
292
+ access?: PartialDeep<ApplicationsAccessSchema>;
293
+ value?: boolean;
294
+ } = {
262
295
  value: true,
263
296
  },
264
297
  ) {
@@ -94,11 +94,11 @@ export const makeSectionVisibilityMap = (
94
94
 
95
95
  if (!rawVisibility) return map;
96
96
 
97
- Object.values(rawVisibility).forEach((appSectionsVisibility) => {
97
+ Object.entries(rawVisibility).forEach(([app, appSectionsVisibility]) => {
98
98
  Object.entries(appSectionsVisibility).forEach(([section, visibility]) => {
99
99
  if (section.startsWith('_')) return map; // skip private fields
100
100
  map.set(
101
- section,
101
+ `${app}/${section}`,
102
102
  (
103
103
  visibility as {
104
104
  _enabled: boolean;
@@ -137,26 +137,6 @@ export const castWtObjectToUiSection = (object: WtObject): UiSection => {
137
137
  return mapWtObjectToUiSection[object];
138
138
  };
139
139
 
140
- export const getWtAppByUiSection = (section: UiSection): WtApplication => {
141
- /* use inverted maps because UiSection is the enum value, not key */
142
- if (AdminSectionsValues[section]) {
143
- return WtApplication.Admin;
144
- }
145
- if (AuditorSectionsValues[section]) {
146
- return WtApplication.Audit;
147
- }
148
- if (CrmSectionsValues[section]) {
149
- return WtApplication.Crm;
150
- }
151
- if (SupervisorSectionsValues[section]) {
152
- return WtApplication.Supervisor;
153
- }
154
-
155
- // then => custom lookup
156
- // console.info(`Havent found app for section: ${section}, fallback to crm`);
157
- return WtApplication.Crm;
158
- };
159
-
160
140
  export const shouldUseGlobalSpecialActionAccessAsChecksSource = (
161
141
  object: WtObject,
162
142
  ): boolean => {
@@ -6,7 +6,6 @@ import { CrudAction, type WtApplication, type WtObject } from '../../../enums';
6
6
  import type { SpecialGlobalAction, WebitelLicense } from '../enums';
7
7
  import { wtObjectsWithGlobalSpecialActionAccessAsChecksSource } from '../mappings/mappings';
8
8
  import {
9
- getWtAppByUiSection,
10
9
  makeAppVisibilityMap,
11
10
  makeGlobalAccessMap,
12
11
  makeLicenseAccessMap,
@@ -19,6 +18,7 @@ import type {
19
18
  AppVisibilityMap,
20
19
  CreateUserAccessStoreConfig,
21
20
  CreateUserAccessStoreRawAccess,
21
+ FullUiSectionName,
22
22
  GlobalActionAccessMap,
23
23
  ScopeAccessMap,
24
24
  SectionVisibilityMap,
@@ -88,13 +88,21 @@ export const createUserAccessStore = ({
88
88
  return appVisibilityAccess.value.get(app);
89
89
  };
90
90
 
91
- const hasSectionVisibility = (section: UiSection, object: WtObject) => {
91
+ const hasSectionVisibility = ({
92
+ section,
93
+ object,
94
+ app: appOfSection,
95
+ }: {
96
+ section: UiSection;
97
+ object: WtObject;
98
+ app: WtApplication;
99
+ }) => {
92
100
  if (bypassMode.value) return true;
93
101
 
94
- const appOfSection = getWtAppByUiSection(section);
95
102
  const objectOfSection = object; /*castUiSectionToWtObject(section)*/
96
103
  const hasSectionVisibilityAccess = (section: UiSection) => {
97
- return sectionVisibilityAccess.value.get(section);
104
+ const fullSectionName: FullUiSectionName = `${appOfSection}/${section}`;
105
+ return sectionVisibilityAccess.value.get(fullSectionName);
98
106
  };
99
107
 
100
108
  const allowAppVisibility = hasApplicationVisibility(appOfSection);
@@ -140,7 +148,14 @@ export const createUserAccessStore = ({
140
148
  };
141
149
  }
142
150
 
143
- if (uiSection && !hasSectionVisibility(uiSection, wtObject)) {
151
+ if (
152
+ uiSection &&
153
+ !hasSectionVisibility({
154
+ section: uiSection,
155
+ object: wtObject,
156
+ app: wtApplication,
157
+ })
158
+ ) {
144
159
  return {
145
160
  path: '/access-denied',
146
161
  };
@@ -15,6 +15,7 @@ import type {
15
15
  SpecialGlobalAction,
16
16
  WebitelLicense,
17
17
  } from '../enums';
18
+ import type { ApplicationsAccessSchema } from '../classes/ApplicationsAccess';
18
19
 
19
20
  /**
20
21
  * @description
@@ -26,6 +27,8 @@ export type UiSection =
26
27
  | SupervisorSections
27
28
  | CrmSections;
28
29
 
30
+ export type FullUiSectionName = `${WtApplication}/${UiSection}`;
31
+
29
32
  /**
30
33
  * @internal
31
34
  * @description Received from backend
@@ -54,7 +57,7 @@ export interface ScopeAccessApiResponseItem {
54
57
  * @description
55
58
  * Represents admin->permissions->roles->access.
56
59
  * */
57
- export type VisibilityAccess = unknown;
60
+ export type VisibilityAccess = ApplicationsAccessSchema;
58
61
 
59
62
  /**
60
63
  * @internal
@@ -103,7 +106,7 @@ export type AppVisibilityMap = Map<WtApplication, boolean>;
103
106
  * @description
104
107
  * Map is used for quick access to user permissions
105
108
  * */
106
- export type SectionVisibilityMap = Map<UiSection, boolean>;
109
+ export type SectionVisibilityMap = Map<FullUiSectionName, boolean>;
107
110
 
108
111
  export interface UserAccessStore {
109
112
  initialize: (CreateUserAccessStoreRawAccess) => void;
@@ -117,9 +120,14 @@ export interface UserAccessStore {
117
120
 
118
121
  hasSpecialGlobalActionAccess: (id: SpecialGlobalAction) => boolean;
119
122
  hasGlobalCrudActionAccess: (action: CrudAction) => boolean;
123
+ hasLicense: (license: WebitelLicense) => boolean;
120
124
 
121
125
  hasApplicationVisibility: (app: WtApplication) => boolean;
122
- hasSectionVisibility: (section: UiSection, object: WtObject) => boolean;
126
+ hasSectionVisibility: ({
127
+ section: UiSection,
128
+ object: WtObject,
129
+ app: WtApplication,
130
+ }) => boolean;
123
131
 
124
132
  /**
125
133
  * @internal
@@ -1,251 +1,42 @@
1
+ import type { PartialDeep } from 'type-fest';
2
+ import { AdminSections, AuditorSections, CrmSections, SupervisorSections, WtApplication } from '../../../enums';
3
+ type BaseAccessSchema = {
4
+ _enabled: boolean;
5
+ _locale: string;
6
+ };
7
+ export type ApplicationsAccessSchema = {
8
+ [WtApplication.Agent]: BaseAccessSchema;
9
+ } & {
10
+ [WtApplication.History]: BaseAccessSchema;
11
+ } & {
12
+ [WtApplication.Analytics]: BaseAccessSchema;
13
+ } & {
14
+ [WtApplication.Supervisor]: BaseAccessSchema & Partial<Record<SupervisorSections, BaseAccessSchema>>;
15
+ } & {
16
+ [WtApplication.Admin]: BaseAccessSchema & Partial<Record<AdminSections, BaseAccessSchema>>;
17
+ } & {
18
+ [WtApplication.Audit]: BaseAccessSchema & Partial<Record<AuditorSections, BaseAccessSchema>>;
19
+ } & {
20
+ [WtApplication.Crm]: BaseAccessSchema & Partial<Record<CrmSections, BaseAccessSchema>>;
21
+ };
1
22
  /**
2
23
  */
3
24
  export default class ApplicationsAccess {
4
- constructor({ access, value }?: {
5
- value: boolean;
25
+ access: ApplicationsAccessSchema;
26
+ constructor({ access, value, }?: {
27
+ access?: PartialDeep<ApplicationsAccessSchema>;
28
+ value?: boolean;
6
29
  });
7
30
  static minify(access: any): any;
8
31
  static restore(access: any): {
9
- agent: {
10
- _enabled: boolean;
11
- _locale: string;
12
- };
13
- history: {
14
- _enabled: boolean;
15
- _locale: string;
16
- };
17
- grafana: {
18
- _enabled: boolean;
19
- _locale: string;
20
- };
21
- supervisor: {
22
- _enabled: boolean;
23
- _locale: string;
24
- queues: {
25
- _enabled: boolean;
26
- _locale: string;
27
- };
28
- agents: {
29
- _enabled: boolean;
30
- _locale: string;
31
- };
32
- "active-calls": {
33
- _enabled: boolean;
34
- _locale: string;
35
- };
36
- };
37
- admin: {
38
- _enabled: boolean;
39
- _locale: string;
40
- license: {
41
- _enabled: boolean;
42
- _locale: string;
43
- };
44
- users: {
45
- _enabled: boolean;
46
- _locale: string;
47
- };
48
- devices: {
49
- _enabled: boolean;
50
- _locale: string;
51
- };
52
- flow: {
53
- _enabled: boolean;
54
- _locale: string;
55
- };
56
- dialplan: {
57
- _enabled: boolean;
58
- _locale: string;
59
- };
60
- gateways: {
61
- _enabled: boolean;
62
- _locale: string;
63
- };
64
- chatplan: {
65
- _enabled: boolean;
66
- _locale: string;
67
- };
68
- "chat-gateways": {
69
- _enabled: boolean;
70
- _locale: string;
71
- };
72
- skills: {
73
- _enabled: boolean;
74
- _locale: string;
75
- };
76
- buckets: {
77
- _enabled: boolean;
78
- _locale: string;
79
- };
80
- blacklist: {
81
- _enabled: boolean;
82
- _locale: string;
83
- };
84
- regions: {
85
- _enabled: boolean;
86
- _locale: string;
87
- };
88
- calendars: {
89
- _enabled: boolean;
90
- _locale: string;
91
- };
92
- communications: {
93
- _enabled: boolean;
94
- _locale: string;
95
- };
96
- "pause-cause": {
97
- _enabled: boolean;
98
- _locale: string;
99
- };
100
- media: {
101
- _enabled: boolean;
102
- _locale: string;
103
- };
104
- "shift-templates": {
105
- _enabled: boolean;
106
- _locale: string;
107
- };
108
- "pause-templates": {
109
- _enabled: boolean;
110
- _locale: string;
111
- };
112
- "working-conditions": {
113
- _enabled: boolean;
114
- _locale: string;
115
- };
116
- "quick-replies": {
117
- _enabled: boolean;
118
- _locale: string;
119
- };
120
- agents: {
121
- _enabled: boolean;
122
- _locale: string;
123
- };
124
- teams: {
125
- _enabled: boolean;
126
- _locale: string;
127
- };
128
- resources: {
129
- _enabled: boolean;
130
- _locale: string;
131
- };
132
- "resource-groups": {
133
- _enabled: boolean;
134
- _locale: string;
135
- };
136
- queues: {
137
- _enabled: boolean;
138
- _locale: string;
139
- };
140
- storage: {
141
- _enabled: boolean;
142
- _locale: string;
143
- };
144
- "storage-policies": {
145
- _enabled: boolean;
146
- _locale: string;
147
- };
148
- "cognitive-profiles": {
149
- _enabled: boolean;
150
- _locale: string;
151
- };
152
- "email-profiles": {
153
- _enabled: boolean;
154
- _locale: string;
155
- };
156
- "single-sign-on": {
157
- _enabled: boolean;
158
- _locale: string;
159
- };
160
- "import-csv": {
161
- _enabled: boolean;
162
- _locale: string;
163
- };
164
- triggers: {
165
- _enabled: boolean;
166
- _locale: string;
167
- };
168
- roles: {
169
- _enabled: boolean;
170
- _locale: string;
171
- };
172
- objects: {
173
- _enabled: boolean;
174
- _locale: string;
175
- };
176
- changelogs: {
177
- _enabled: boolean;
178
- _locale: string;
179
- };
180
- configuration: {
181
- _enabled: boolean;
182
- _locale: string;
183
- };
184
- "global-variables": {
185
- _enabled: boolean;
186
- _locale: string;
187
- };
188
- };
189
- audit: {
190
- _enabled: boolean;
191
- _locale: string;
192
- scorecards: {
193
- _enabled: boolean;
194
- _locale: string;
195
- };
196
- };
197
- crm: {
198
- _enabled: boolean;
199
- _locale: string;
200
- contacts: {
201
- _enabled: boolean;
202
- _locale: string;
203
- };
204
- cases: {
205
- _enabled: boolean;
206
- _locale: string;
207
- };
208
- slas: {
209
- _enabled: boolean;
210
- _locale: string;
211
- };
212
- sources: {
213
- _enabled: boolean;
214
- _locale: string;
215
- };
216
- "service-catalogs": {
217
- _enabled: boolean;
218
- _locale: string;
219
- };
220
- "close-reason-groups": {
221
- _enabled: boolean;
222
- _locale: string;
223
- };
224
- "contact-groups": {
225
- _enabled: boolean;
226
- _locale: string;
227
- };
228
- priorities: {
229
- _enabled: boolean;
230
- _locale: string;
231
- };
232
- statuses: {
233
- _enabled: boolean;
234
- _locale: string;
235
- };
236
- "ext-cases": {
237
- _enabled: boolean;
238
- _locale: string;
239
- };
240
- "ext-contacts": {
241
- _enabled: boolean;
242
- _locale: string;
243
- };
244
- "custom-lookups": {
245
- _enabled: boolean;
246
- _locale: string;
247
- };
248
- };
32
+ agent: BaseAccessSchema;
33
+ history: BaseAccessSchema;
34
+ grafana: BaseAccessSchema;
35
+ supervisor: BaseAccessSchema & Partial<Record<SupervisorSections, BaseAccessSchema>>;
36
+ admin: BaseAccessSchema & Partial<Record<AdminSections, BaseAccessSchema>>;
37
+ audit: BaseAccessSchema & Partial<Record<AuditorSections, BaseAccessSchema>>;
38
+ crm: BaseAccessSchema & Partial<Record<CrmSections, BaseAccessSchema>>;
249
39
  };
250
- getAccess(): any;
40
+ getAccess(): ApplicationsAccessSchema;
251
41
  }
42
+ export {};
@@ -1,4 +1,4 @@
1
- import { WtApplication, type WtObject } from '../../../enums';
1
+ import { type WtObject } from '../../../enums';
2
2
  import type { AppVisibilityMap, GlobalAccessApiResponseItem, GlobalActionAccessMap, LicenseAccessMap, ScopeAccessApiResponseItem, ScopeAccessMap, SectionVisibilityMap, UiSection, VisibilityAccess, WebitelLicenseInfo } from '../types/UserAccess.d';
3
3
  export declare const makeGlobalAccessMap: (rawGlobalAccess: GlobalAccessApiResponseItem[]) => GlobalActionAccessMap;
4
4
  export declare const makeScopeAccessMap: (rawScope: ScopeAccessApiResponseItem[]) => ScopeAccessMap;
@@ -7,6 +7,5 @@ export declare const makeSectionVisibilityMap: (rawVisibility: VisibilityAccess)
7
7
  export declare const makeLicenseAccessMap: (rawLicense: WebitelLicenseInfo[]) => LicenseAccessMap;
8
8
  export declare const castUiSectionToWtObject: (section: UiSection) => WtObject;
9
9
  export declare const castWtObjectToUiSection: (object: WtObject) => UiSection;
10
- export declare const getWtAppByUiSection: (section: UiSection) => WtApplication;
11
10
  export declare const shouldUseGlobalSpecialActionAccessAsChecksSource: (object: WtObject) => boolean;
12
11
  export declare const shouldUseGlobalCrudActionAccessAsChecksSource: (object: WtObject) => boolean;
@@ -1,2 +1,2 @@
1
1
  import type { CreateUserAccessStoreConfig, UserAccessStore } from '../types/UserAccess.d';
2
- export declare const createUserAccessStore: ({ namespace, }?: CreateUserAccessStoreConfig) => import("pinia").StoreDefinition<`${string}/access`, Pick<UserAccessStore, "globalAccess" | "scopeAccess" | "appVisibilityAccess" | "sectionVisibilityAccess" | "licenseAccess">, Pick<UserAccessStore, never>, Pick<UserAccessStore, "initialize" | "hasReadAccess" | "hasCreateAccess" | "hasUpdateAccess" | "hasDeleteAccess" | "routeAccessGuard" | "hasSpecialGlobalActionAccess" | "hasGlobalCrudActionAccess" | "hasApplicationVisibility" | "hasSectionVisibility">>;
2
+ export declare const createUserAccessStore: ({ namespace, }?: CreateUserAccessStoreConfig) => import("pinia").StoreDefinition<`${string}/access`, Pick<UserAccessStore, "globalAccess" | "scopeAccess" | "appVisibilityAccess" | "sectionVisibilityAccess" | "licenseAccess">, Pick<UserAccessStore, never>, Pick<UserAccessStore, "initialize" | "hasReadAccess" | "hasCreateAccess" | "hasUpdateAccess" | "hasDeleteAccess" | "routeAccessGuard" | "hasSpecialGlobalActionAccess" | "hasGlobalCrudActionAccess" | "hasLicense" | "hasApplicationVisibility" | "hasSectionVisibility">>;
@@ -8,14 +8,18 @@ export declare const createUserinfoStore: () => import("pinia").StoreDefinition<
8
8
  hasCreateAccess: (object?: pick) => boolean;
9
9
  hasUpdateAccess: (object?: pick) => boolean;
10
10
  hasDeleteAccess: (object?: pick) => boolean;
11
- hasLicense: any;
12
- hasSectionVisibility: (section: import("../types/UserAccess").UiSection, object: pick) => boolean;
11
+ hasLicense: (license: import("..").WebitelLicense) => boolean;
12
+ hasSectionVisibility: ({ section: UiSection, object: WtObject, app: WtApplication, }: {
13
+ section: any;
14
+ object: any;
15
+ app: any;
16
+ }) => boolean;
13
17
  routeAccessGuard: import("vue-router").NavigationGuard;
14
18
  hasGlobalCrudActionAccess: (action: pick) => boolean;
15
19
  hasSpecialGlobalActionAccess: (id: import("..").SpecialGlobalAction) => boolean;
16
20
  hasApplicationVisibility: (app: pick) => boolean;
17
21
  logoutUser: () => Promise<void>;
18
- }, any>, Pick<{
22
+ }, "timezone" | "userId" | "userInfo">, Pick<{
19
23
  userId: import("vue").Ref<any, any>;
20
24
  userInfo: import("vue").Ref<any, any>;
21
25
  timezone: import("vue").Ref<string, string>;
@@ -24,14 +28,18 @@ export declare const createUserinfoStore: () => import("pinia").StoreDefinition<
24
28
  hasCreateAccess: (object?: pick) => boolean;
25
29
  hasUpdateAccess: (object?: pick) => boolean;
26
30
  hasDeleteAccess: (object?: pick) => boolean;
27
- hasLicense: any;
28
- hasSectionVisibility: (section: import("../types/UserAccess").UiSection, object: pick) => boolean;
31
+ hasLicense: (license: import("..").WebitelLicense) => boolean;
32
+ hasSectionVisibility: ({ section: UiSection, object: WtObject, app: WtApplication, }: {
33
+ section: any;
34
+ object: any;
35
+ app: any;
36
+ }) => boolean;
29
37
  routeAccessGuard: import("vue-router").NavigationGuard;
30
38
  hasGlobalCrudActionAccess: (action: pick) => boolean;
31
39
  hasSpecialGlobalActionAccess: (id: import("..").SpecialGlobalAction) => boolean;
32
40
  hasApplicationVisibility: (app: pick) => boolean;
33
41
  logoutUser: () => Promise<void>;
34
- }, any>, Pick<{
42
+ }, never>, Pick<{
35
43
  userId: import("vue").Ref<any, any>;
36
44
  userInfo: import("vue").Ref<any, any>;
37
45
  timezone: import("vue").Ref<string, string>;
@@ -40,11 +48,15 @@ export declare const createUserinfoStore: () => import("pinia").StoreDefinition<
40
48
  hasCreateAccess: (object?: pick) => boolean;
41
49
  hasUpdateAccess: (object?: pick) => boolean;
42
50
  hasDeleteAccess: (object?: pick) => boolean;
43
- hasLicense: any;
44
- hasSectionVisibility: (section: import("../types/UserAccess").UiSection, object: pick) => boolean;
51
+ hasLicense: (license: import("..").WebitelLicense) => boolean;
52
+ hasSectionVisibility: ({ section: UiSection, object: WtObject, app: WtApplication, }: {
53
+ section: any;
54
+ object: any;
55
+ app: any;
56
+ }) => boolean;
45
57
  routeAccessGuard: import("vue-router").NavigationGuard;
46
58
  hasGlobalCrudActionAccess: (action: pick) => boolean;
47
59
  hasSpecialGlobalActionAccess: (id: import("..").SpecialGlobalAction) => boolean;
48
60
  hasApplicationVisibility: (app: pick) => boolean;
49
61
  logoutUser: () => Promise<void>;
50
- }, any>>;
62
+ }, "initialize" | "hasReadAccess" | "hasCreateAccess" | "hasUpdateAccess" | "hasDeleteAccess" | "routeAccessGuard" | "hasSpecialGlobalActionAccess" | "hasGlobalCrudActionAccess" | "hasLicense" | "hasApplicationVisibility" | "hasSectionVisibility" | "logoutUser">>;