@lightdash/common 0.1937.0 → 0.1937.1

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 (129) hide show
  1. package/dist/cjs/authorization/index.d.ts +8 -4
  2. package/dist/cjs/authorization/index.d.ts.map +1 -1
  3. package/dist/cjs/authorization/index.js +26 -3
  4. package/dist/cjs/authorization/index.js.map +1 -1
  5. package/dist/cjs/authorization/index.mock.d.ts +2 -0
  6. package/dist/cjs/authorization/index.mock.d.ts.map +1 -1
  7. package/dist/cjs/authorization/index.mock.js +2 -0
  8. package/dist/cjs/authorization/index.mock.js.map +1 -1
  9. package/dist/cjs/authorization/organizationMemberAbility.mock.d.ts.map +1 -1
  10. package/dist/cjs/authorization/organizationMemberAbility.mock.js +1 -0
  11. package/dist/cjs/authorization/organizationMemberAbility.mock.js.map +1 -1
  12. package/dist/cjs/authorization/parseScopes.d.ts +3 -2
  13. package/dist/cjs/authorization/parseScopes.d.ts.map +1 -1
  14. package/dist/cjs/authorization/parseScopes.js +17 -8
  15. package/dist/cjs/authorization/parseScopes.js.map +1 -1
  16. package/dist/cjs/authorization/parseScopes.test.js +9 -14
  17. package/dist/cjs/authorization/parseScopes.test.js.map +1 -1
  18. package/dist/cjs/authorization/projectMemberAbility.mock.d.ts.map +1 -1
  19. package/dist/cjs/authorization/projectMemberAbility.mock.js +1 -0
  20. package/dist/cjs/authorization/projectMemberAbility.mock.js.map +1 -1
  21. package/dist/cjs/authorization/roleToScopeMapping.d.ts +19 -0
  22. package/dist/cjs/authorization/roleToScopeMapping.d.ts.map +1 -0
  23. package/dist/cjs/authorization/roleToScopeMapping.js +163 -0
  24. package/dist/cjs/authorization/roleToScopeMapping.js.map +1 -0
  25. package/dist/cjs/authorization/roleToScopeMapping.test.d.ts +2 -0
  26. package/dist/cjs/authorization/roleToScopeMapping.test.d.ts.map +1 -0
  27. package/dist/cjs/authorization/roleToScopeMapping.test.js +549 -0
  28. package/dist/cjs/authorization/roleToScopeMapping.test.js.map +1 -0
  29. package/dist/cjs/authorization/roleToScopeMapping.testUtils.d.ts +1393 -0
  30. package/dist/cjs/authorization/roleToScopeMapping.testUtils.d.ts.map +1 -0
  31. package/dist/cjs/authorization/roleToScopeMapping.testUtils.js +329 -0
  32. package/dist/cjs/authorization/roleToScopeMapping.testUtils.js.map +1 -0
  33. package/dist/cjs/authorization/scopeAbilityBuilder.d.ts +14 -8
  34. package/dist/cjs/authorization/scopeAbilityBuilder.d.ts.map +1 -1
  35. package/dist/cjs/authorization/scopeAbilityBuilder.js +7 -7
  36. package/dist/cjs/authorization/scopeAbilityBuilder.js.map +1 -1
  37. package/dist/cjs/authorization/scopeAbilityBuilder.test.js +258 -185
  38. package/dist/cjs/authorization/scopeAbilityBuilder.test.js.map +1 -1
  39. package/dist/cjs/authorization/scopes.d.ts.map +1 -1
  40. package/dist/cjs/authorization/scopes.js +132 -187
  41. package/dist/cjs/authorization/scopes.js.map +1 -1
  42. package/dist/cjs/types/organizationMemberProfile.d.ts +1 -0
  43. package/dist/cjs/types/organizationMemberProfile.d.ts.map +1 -1
  44. package/dist/cjs/types/organizationMemberProfile.js.map +1 -1
  45. package/dist/cjs/types/projectMemberProfile.d.ts +1 -0
  46. package/dist/cjs/types/projectMemberProfile.d.ts.map +1 -1
  47. package/dist/cjs/types/scopes.d.ts +19 -9
  48. package/dist/cjs/types/scopes.d.ts.map +1 -1
  49. package/dist/cjs/types/user.d.ts +1 -0
  50. package/dist/cjs/types/user.d.ts.map +1 -1
  51. package/dist/cjs/types/user.js.map +1 -1
  52. package/dist/esm/authorization/index.d.ts +8 -4
  53. package/dist/esm/authorization/index.d.ts.map +1 -1
  54. package/dist/esm/authorization/index.js +26 -3
  55. package/dist/esm/authorization/index.js.map +1 -1
  56. package/dist/esm/authorization/index.mock.d.ts +2 -0
  57. package/dist/esm/authorization/index.mock.d.ts.map +1 -1
  58. package/dist/esm/authorization/index.mock.js +2 -0
  59. package/dist/esm/authorization/index.mock.js.map +1 -1
  60. package/dist/esm/authorization/organizationMemberAbility.mock.d.ts.map +1 -1
  61. package/dist/esm/authorization/organizationMemberAbility.mock.js +1 -0
  62. package/dist/esm/authorization/organizationMemberAbility.mock.js.map +1 -1
  63. package/dist/esm/authorization/parseScopes.d.ts +3 -2
  64. package/dist/esm/authorization/parseScopes.d.ts.map +1 -1
  65. package/dist/esm/authorization/parseScopes.js +15 -7
  66. package/dist/esm/authorization/parseScopes.js.map +1 -1
  67. package/dist/esm/authorization/parseScopes.test.js +9 -14
  68. package/dist/esm/authorization/parseScopes.test.js.map +1 -1
  69. package/dist/esm/authorization/projectMemberAbility.mock.d.ts.map +1 -1
  70. package/dist/esm/authorization/projectMemberAbility.mock.js +1 -0
  71. package/dist/esm/authorization/projectMemberAbility.mock.js.map +1 -1
  72. package/dist/esm/authorization/roleToScopeMapping.d.ts +19 -0
  73. package/dist/esm/authorization/roleToScopeMapping.d.ts.map +1 -0
  74. package/dist/esm/authorization/roleToScopeMapping.js +157 -0
  75. package/dist/esm/authorization/roleToScopeMapping.js.map +1 -0
  76. package/dist/esm/authorization/roleToScopeMapping.test.d.ts +2 -0
  77. package/dist/esm/authorization/roleToScopeMapping.test.d.ts.map +1 -0
  78. package/dist/esm/authorization/roleToScopeMapping.test.js +547 -0
  79. package/dist/esm/authorization/roleToScopeMapping.test.js.map +1 -0
  80. package/dist/esm/authorization/roleToScopeMapping.testUtils.d.ts +1393 -0
  81. package/dist/esm/authorization/roleToScopeMapping.testUtils.d.ts.map +1 -0
  82. package/dist/esm/authorization/roleToScopeMapping.testUtils.js +319 -0
  83. package/dist/esm/authorization/roleToScopeMapping.testUtils.js.map +1 -0
  84. package/dist/esm/authorization/scopeAbilityBuilder.d.ts +14 -8
  85. package/dist/esm/authorization/scopeAbilityBuilder.d.ts.map +1 -1
  86. package/dist/esm/authorization/scopeAbilityBuilder.js +7 -7
  87. package/dist/esm/authorization/scopeAbilityBuilder.js.map +1 -1
  88. package/dist/esm/authorization/scopeAbilityBuilder.test.js +259 -186
  89. package/dist/esm/authorization/scopeAbilityBuilder.test.js.map +1 -1
  90. package/dist/esm/authorization/scopes.d.ts.map +1 -1
  91. package/dist/esm/authorization/scopes.js +132 -187
  92. package/dist/esm/authorization/scopes.js.map +1 -1
  93. package/dist/esm/types/organizationMemberProfile.d.ts +1 -0
  94. package/dist/esm/types/organizationMemberProfile.d.ts.map +1 -1
  95. package/dist/esm/types/organizationMemberProfile.js.map +1 -1
  96. package/dist/esm/types/projectMemberProfile.d.ts +1 -0
  97. package/dist/esm/types/projectMemberProfile.d.ts.map +1 -1
  98. package/dist/esm/types/scopes.d.ts +19 -9
  99. package/dist/esm/types/scopes.d.ts.map +1 -1
  100. package/dist/esm/types/user.d.ts +1 -0
  101. package/dist/esm/types/user.d.ts.map +1 -1
  102. package/dist/esm/types/user.js.map +1 -1
  103. package/dist/tsconfig.types.tsbuildinfo +1 -1
  104. package/dist/types/authorization/index.d.ts +8 -4
  105. package/dist/types/authorization/index.d.ts.map +1 -1
  106. package/dist/types/authorization/index.mock.d.ts +2 -0
  107. package/dist/types/authorization/index.mock.d.ts.map +1 -1
  108. package/dist/types/authorization/organizationMemberAbility.mock.d.ts.map +1 -1
  109. package/dist/types/authorization/parseScopes.d.ts +3 -2
  110. package/dist/types/authorization/parseScopes.d.ts.map +1 -1
  111. package/dist/types/authorization/projectMemberAbility.mock.d.ts.map +1 -1
  112. package/dist/types/authorization/roleToScopeMapping.d.ts +19 -0
  113. package/dist/types/authorization/roleToScopeMapping.d.ts.map +1 -0
  114. package/dist/types/authorization/roleToScopeMapping.test.d.ts +2 -0
  115. package/dist/types/authorization/roleToScopeMapping.test.d.ts.map +1 -0
  116. package/dist/types/authorization/roleToScopeMapping.testUtils.d.ts +1393 -0
  117. package/dist/types/authorization/roleToScopeMapping.testUtils.d.ts.map +1 -0
  118. package/dist/types/authorization/scopeAbilityBuilder.d.ts +14 -8
  119. package/dist/types/authorization/scopeAbilityBuilder.d.ts.map +1 -1
  120. package/dist/types/authorization/scopes.d.ts.map +1 -1
  121. package/dist/types/types/organizationMemberProfile.d.ts +1 -0
  122. package/dist/types/types/organizationMemberProfile.d.ts.map +1 -1
  123. package/dist/types/types/projectMemberProfile.d.ts +1 -0
  124. package/dist/types/types/projectMemberProfile.d.ts.map +1 -1
  125. package/dist/types/types/scopes.d.ts +19 -9
  126. package/dist/types/types/scopes.d.ts.map +1 -1
  127. package/dist/types/types/user.d.ts +1 -0
  128. package/dist/types/types/user.d.ts.map +1 -1
  129. package/package.json +1 -1
@@ -0,0 +1,1393 @@
1
+ import { ProjectMemberRole } from '../types/projectMemberRole';
2
+ import { type MemberAbility } from './types';
3
+ /**
4
+ * Test utilities for role to scope mapping validation
5
+ * These functions are only used for testing migration compatibility
6
+ */
7
+ /**
8
+ * Validates that a role properly inherits permissions from lower roles
9
+ */
10
+ export declare const validateRoleInheritance: () => {
11
+ valid: boolean;
12
+ errors: string[];
13
+ };
14
+ /**
15
+ * Extracts the actual permissions granted by a role builder for analysis and comparison
16
+ * This is useful for debugging and validating that our scope mappings are correct
17
+ */
18
+ export declare const extractRolePermissions: (role: ProjectMemberRole) => {
19
+ rules: Array<{
20
+ action: string;
21
+ subject: string;
22
+ conditions?: unknown;
23
+ inverted?: boolean;
24
+ reason?: string;
25
+ }>;
26
+ rawAbility: MemberAbility;
27
+ };
28
+ /**
29
+ * Helper function to create standardized test cases for role compatibility testing
30
+ */
31
+ export declare const createStandardTestCases: () => ({
32
+ action: "view";
33
+ subject: "Dashboard";
34
+ resource: {
35
+ organizationUuid: string;
36
+ projectUuid: string;
37
+ isPrivate: boolean;
38
+ };
39
+ } | {
40
+ action: "view";
41
+ subject: "SavedChart";
42
+ resource: {
43
+ organizationUuid: string;
44
+ projectUuid: string;
45
+ isPrivate: boolean;
46
+ };
47
+ } | {
48
+ action: "view";
49
+ subject: "Space";
50
+ resource: {
51
+ organizationUuid: string;
52
+ projectUuid: string;
53
+ isPrivate: boolean;
54
+ };
55
+ } | {
56
+ action: "view";
57
+ subject: "Project";
58
+ resource: {
59
+ projectUuid: string;
60
+ organizationUuid?: undefined;
61
+ isPrivate?: undefined;
62
+ };
63
+ } | {
64
+ action: "create";
65
+ subject: "Space";
66
+ resource: {
67
+ organizationUuid: string;
68
+ projectUuid: string;
69
+ isPrivate?: undefined;
70
+ };
71
+ } | {
72
+ action: "create";
73
+ subject: "DashboardComments";
74
+ resource: {
75
+ projectUuid: string;
76
+ organizationUuid?: undefined;
77
+ isPrivate?: undefined;
78
+ };
79
+ } | {
80
+ action: "create";
81
+ subject: "ScheduledDeliveries";
82
+ resource: {
83
+ projectUuid: string;
84
+ organizationUuid?: undefined;
85
+ isPrivate?: undefined;
86
+ };
87
+ } | {
88
+ action: "manage";
89
+ subject: "Space";
90
+ resource: {
91
+ organizationUuid: string;
92
+ projectUuid: string;
93
+ isPrivate: boolean;
94
+ };
95
+ } | {
96
+ action: "manage";
97
+ subject: "Job";
98
+ resource: {
99
+ organizationUuid?: undefined;
100
+ projectUuid?: undefined;
101
+ isPrivate?: undefined;
102
+ };
103
+ } | {
104
+ action: "manage";
105
+ subject: "PinnedItems";
106
+ resource: {
107
+ organizationUuid: string;
108
+ projectUuid: string;
109
+ isPrivate?: undefined;
110
+ };
111
+ } | {
112
+ action: "manage";
113
+ subject: "Explore";
114
+ resource: {
115
+ projectUuid: string;
116
+ organizationUuid?: undefined;
117
+ isPrivate?: undefined;
118
+ };
119
+ } | {
120
+ action: "manage";
121
+ subject: "Project";
122
+ resource: {
123
+ projectUuid: string;
124
+ organizationUuid?: undefined;
125
+ isPrivate?: undefined;
126
+ };
127
+ } | {
128
+ action: "manage";
129
+ subject: "Validation";
130
+ resource: {
131
+ projectUuid: string;
132
+ organizationUuid?: undefined;
133
+ isPrivate?: undefined;
134
+ };
135
+ } | {
136
+ action: "manage";
137
+ subject: "VirtualView";
138
+ resource: {
139
+ projectUuid: string;
140
+ organizationUuid?: undefined;
141
+ isPrivate?: undefined;
142
+ };
143
+ } | {
144
+ action: "manage";
145
+ subject: "CustomSql";
146
+ resource: {
147
+ projectUuid: string;
148
+ organizationUuid?: undefined;
149
+ isPrivate?: undefined;
150
+ };
151
+ } | {
152
+ action: "delete";
153
+ subject: "Project";
154
+ resource: {
155
+ projectUuid: string;
156
+ organizationUuid?: undefined;
157
+ isPrivate?: undefined;
158
+ };
159
+ } | {
160
+ action: "view";
161
+ subject: "Analytics";
162
+ resource: {
163
+ projectUuid: string;
164
+ organizationUuid?: undefined;
165
+ isPrivate?: undefined;
166
+ };
167
+ })[];
168
+ /**
169
+ * Helper function to create test parameters for role compatibility testing
170
+ */
171
+ export declare const createRoleTestParams: (role: ProjectMemberRole, options?: {
172
+ isEnterprise?: boolean;
173
+ projectUuid?: string;
174
+ userUuid?: string;
175
+ organizationUuid?: string;
176
+ }) => {
177
+ role: ProjectMemberRole;
178
+ scopes: string[];
179
+ projectMember: {
180
+ role: ProjectMemberRole;
181
+ projectUuid: string;
182
+ userUuid: string;
183
+ };
184
+ scopeOrgBuilderParams: {
185
+ organizationUuid: string;
186
+ userUuid: string;
187
+ scopes: string[];
188
+ isEnterprise: boolean;
189
+ organizationRole: "editor";
190
+ permissionsConfig: {
191
+ pat: {
192
+ enabled: boolean;
193
+ allowedOrgRoles: never[];
194
+ };
195
+ };
196
+ };
197
+ scopeProjectBuilderParams: {
198
+ projectUuid: string;
199
+ userUuid: string;
200
+ scopes: string[];
201
+ isEnterprise: boolean;
202
+ organizationRole: "editor";
203
+ permissionsConfig: {
204
+ pat: {
205
+ enabled: boolean;
206
+ allowedOrgRoles: never[];
207
+ };
208
+ };
209
+ };
210
+ };
211
+ /**
212
+ * Compares role-based and scope-based abilities for a specific set of test cases
213
+ * Returns detailed results showing which permissions match or differ
214
+ */
215
+ export declare const compareRoleAndScopeAbilities: (role: ProjectMemberRole, testCases: ReturnType<typeof createStandardTestCases>, options?: {
216
+ isEnterprise?: boolean;
217
+ }) => {
218
+ role: ProjectMemberRole;
219
+ scopes: string[];
220
+ results: ({
221
+ roleResult: boolean;
222
+ scopeResult: boolean;
223
+ match: boolean;
224
+ action: "view";
225
+ subject: "Dashboard";
226
+ resource: {
227
+ organizationUuid: string;
228
+ projectUuid: string;
229
+ isPrivate: boolean;
230
+ };
231
+ } | {
232
+ roleResult: boolean;
233
+ scopeResult: boolean;
234
+ match: boolean;
235
+ action: "view";
236
+ subject: "SavedChart";
237
+ resource: {
238
+ organizationUuid: string;
239
+ projectUuid: string;
240
+ isPrivate: boolean;
241
+ };
242
+ } | {
243
+ roleResult: boolean;
244
+ scopeResult: boolean;
245
+ match: boolean;
246
+ action: "view";
247
+ subject: "Space";
248
+ resource: {
249
+ organizationUuid: string;
250
+ projectUuid: string;
251
+ isPrivate: boolean;
252
+ };
253
+ } | {
254
+ roleResult: boolean;
255
+ scopeResult: boolean;
256
+ match: boolean;
257
+ action: "view";
258
+ subject: "Project";
259
+ resource: {
260
+ projectUuid: string;
261
+ organizationUuid?: undefined;
262
+ isPrivate?: undefined;
263
+ };
264
+ } | {
265
+ roleResult: boolean;
266
+ scopeResult: boolean;
267
+ match: boolean;
268
+ action: "create";
269
+ subject: "Space";
270
+ resource: {
271
+ organizationUuid: string;
272
+ projectUuid: string;
273
+ isPrivate?: undefined;
274
+ };
275
+ } | {
276
+ roleResult: boolean;
277
+ scopeResult: boolean;
278
+ match: boolean;
279
+ action: "create";
280
+ subject: "DashboardComments";
281
+ resource: {
282
+ projectUuid: string;
283
+ organizationUuid?: undefined;
284
+ isPrivate?: undefined;
285
+ };
286
+ } | {
287
+ roleResult: boolean;
288
+ scopeResult: boolean;
289
+ match: boolean;
290
+ action: "create";
291
+ subject: "ScheduledDeliveries";
292
+ resource: {
293
+ projectUuid: string;
294
+ organizationUuid?: undefined;
295
+ isPrivate?: undefined;
296
+ };
297
+ } | {
298
+ roleResult: boolean;
299
+ scopeResult: boolean;
300
+ match: boolean;
301
+ action: "manage";
302
+ subject: "Space";
303
+ resource: {
304
+ organizationUuid: string;
305
+ projectUuid: string;
306
+ isPrivate: boolean;
307
+ };
308
+ } | {
309
+ roleResult: boolean;
310
+ scopeResult: boolean;
311
+ match: boolean;
312
+ action: "manage";
313
+ subject: "Job";
314
+ resource: {
315
+ organizationUuid?: undefined;
316
+ projectUuid?: undefined;
317
+ isPrivate?: undefined;
318
+ };
319
+ } | {
320
+ roleResult: boolean;
321
+ scopeResult: boolean;
322
+ match: boolean;
323
+ action: "manage";
324
+ subject: "PinnedItems";
325
+ resource: {
326
+ organizationUuid: string;
327
+ projectUuid: string;
328
+ isPrivate?: undefined;
329
+ };
330
+ } | {
331
+ roleResult: boolean;
332
+ scopeResult: boolean;
333
+ match: boolean;
334
+ action: "manage";
335
+ subject: "Explore";
336
+ resource: {
337
+ projectUuid: string;
338
+ organizationUuid?: undefined;
339
+ isPrivate?: undefined;
340
+ };
341
+ } | {
342
+ roleResult: boolean;
343
+ scopeResult: boolean;
344
+ match: boolean;
345
+ action: "manage";
346
+ subject: "Project";
347
+ resource: {
348
+ projectUuid: string;
349
+ organizationUuid?: undefined;
350
+ isPrivate?: undefined;
351
+ };
352
+ } | {
353
+ roleResult: boolean;
354
+ scopeResult: boolean;
355
+ match: boolean;
356
+ action: "manage";
357
+ subject: "Validation";
358
+ resource: {
359
+ projectUuid: string;
360
+ organizationUuid?: undefined;
361
+ isPrivate?: undefined;
362
+ };
363
+ } | {
364
+ roleResult: boolean;
365
+ scopeResult: boolean;
366
+ match: boolean;
367
+ action: "manage";
368
+ subject: "VirtualView";
369
+ resource: {
370
+ projectUuid: string;
371
+ organizationUuid?: undefined;
372
+ isPrivate?: undefined;
373
+ };
374
+ } | {
375
+ roleResult: boolean;
376
+ scopeResult: boolean;
377
+ match: boolean;
378
+ action: "manage";
379
+ subject: "CustomSql";
380
+ resource: {
381
+ projectUuid: string;
382
+ organizationUuid?: undefined;
383
+ isPrivate?: undefined;
384
+ };
385
+ } | {
386
+ roleResult: boolean;
387
+ scopeResult: boolean;
388
+ match: boolean;
389
+ action: "delete";
390
+ subject: "Project";
391
+ resource: {
392
+ projectUuid: string;
393
+ organizationUuid?: undefined;
394
+ isPrivate?: undefined;
395
+ };
396
+ } | {
397
+ roleResult: boolean;
398
+ scopeResult: boolean;
399
+ match: boolean;
400
+ action: "view";
401
+ subject: "Analytics";
402
+ resource: {
403
+ projectUuid: string;
404
+ organizationUuid?: undefined;
405
+ isPrivate?: undefined;
406
+ };
407
+ })[];
408
+ summary: {
409
+ total: number;
410
+ matches: number;
411
+ mismatches: ({
412
+ roleResult: boolean;
413
+ scopeResult: boolean;
414
+ match: boolean;
415
+ action: "view";
416
+ subject: "Dashboard";
417
+ resource: {
418
+ organizationUuid: string;
419
+ projectUuid: string;
420
+ isPrivate: boolean;
421
+ };
422
+ } | {
423
+ roleResult: boolean;
424
+ scopeResult: boolean;
425
+ match: boolean;
426
+ action: "view";
427
+ subject: "SavedChart";
428
+ resource: {
429
+ organizationUuid: string;
430
+ projectUuid: string;
431
+ isPrivate: boolean;
432
+ };
433
+ } | {
434
+ roleResult: boolean;
435
+ scopeResult: boolean;
436
+ match: boolean;
437
+ action: "view";
438
+ subject: "Space";
439
+ resource: {
440
+ organizationUuid: string;
441
+ projectUuid: string;
442
+ isPrivate: boolean;
443
+ };
444
+ } | {
445
+ roleResult: boolean;
446
+ scopeResult: boolean;
447
+ match: boolean;
448
+ action: "view";
449
+ subject: "Project";
450
+ resource: {
451
+ projectUuid: string;
452
+ organizationUuid?: undefined;
453
+ isPrivate?: undefined;
454
+ };
455
+ } | {
456
+ roleResult: boolean;
457
+ scopeResult: boolean;
458
+ match: boolean;
459
+ action: "create";
460
+ subject: "Space";
461
+ resource: {
462
+ organizationUuid: string;
463
+ projectUuid: string;
464
+ isPrivate?: undefined;
465
+ };
466
+ } | {
467
+ roleResult: boolean;
468
+ scopeResult: boolean;
469
+ match: boolean;
470
+ action: "create";
471
+ subject: "DashboardComments";
472
+ resource: {
473
+ projectUuid: string;
474
+ organizationUuid?: undefined;
475
+ isPrivate?: undefined;
476
+ };
477
+ } | {
478
+ roleResult: boolean;
479
+ scopeResult: boolean;
480
+ match: boolean;
481
+ action: "create";
482
+ subject: "ScheduledDeliveries";
483
+ resource: {
484
+ projectUuid: string;
485
+ organizationUuid?: undefined;
486
+ isPrivate?: undefined;
487
+ };
488
+ } | {
489
+ roleResult: boolean;
490
+ scopeResult: boolean;
491
+ match: boolean;
492
+ action: "manage";
493
+ subject: "Space";
494
+ resource: {
495
+ organizationUuid: string;
496
+ projectUuid: string;
497
+ isPrivate: boolean;
498
+ };
499
+ } | {
500
+ roleResult: boolean;
501
+ scopeResult: boolean;
502
+ match: boolean;
503
+ action: "manage";
504
+ subject: "Job";
505
+ resource: {
506
+ organizationUuid?: undefined;
507
+ projectUuid?: undefined;
508
+ isPrivate?: undefined;
509
+ };
510
+ } | {
511
+ roleResult: boolean;
512
+ scopeResult: boolean;
513
+ match: boolean;
514
+ action: "manage";
515
+ subject: "PinnedItems";
516
+ resource: {
517
+ organizationUuid: string;
518
+ projectUuid: string;
519
+ isPrivate?: undefined;
520
+ };
521
+ } | {
522
+ roleResult: boolean;
523
+ scopeResult: boolean;
524
+ match: boolean;
525
+ action: "manage";
526
+ subject: "Explore";
527
+ resource: {
528
+ projectUuid: string;
529
+ organizationUuid?: undefined;
530
+ isPrivate?: undefined;
531
+ };
532
+ } | {
533
+ roleResult: boolean;
534
+ scopeResult: boolean;
535
+ match: boolean;
536
+ action: "manage";
537
+ subject: "Project";
538
+ resource: {
539
+ projectUuid: string;
540
+ organizationUuid?: undefined;
541
+ isPrivate?: undefined;
542
+ };
543
+ } | {
544
+ roleResult: boolean;
545
+ scopeResult: boolean;
546
+ match: boolean;
547
+ action: "manage";
548
+ subject: "Validation";
549
+ resource: {
550
+ projectUuid: string;
551
+ organizationUuid?: undefined;
552
+ isPrivate?: undefined;
553
+ };
554
+ } | {
555
+ roleResult: boolean;
556
+ scopeResult: boolean;
557
+ match: boolean;
558
+ action: "manage";
559
+ subject: "VirtualView";
560
+ resource: {
561
+ projectUuid: string;
562
+ organizationUuid?: undefined;
563
+ isPrivate?: undefined;
564
+ };
565
+ } | {
566
+ roleResult: boolean;
567
+ scopeResult: boolean;
568
+ match: boolean;
569
+ action: "manage";
570
+ subject: "CustomSql";
571
+ resource: {
572
+ projectUuid: string;
573
+ organizationUuid?: undefined;
574
+ isPrivate?: undefined;
575
+ };
576
+ } | {
577
+ roleResult: boolean;
578
+ scopeResult: boolean;
579
+ match: boolean;
580
+ action: "delete";
581
+ subject: "Project";
582
+ resource: {
583
+ projectUuid: string;
584
+ organizationUuid?: undefined;
585
+ isPrivate?: undefined;
586
+ };
587
+ } | {
588
+ roleResult: boolean;
589
+ scopeResult: boolean;
590
+ match: boolean;
591
+ action: "view";
592
+ subject: "Analytics";
593
+ resource: {
594
+ projectUuid: string;
595
+ organizationUuid?: undefined;
596
+ isPrivate?: undefined;
597
+ };
598
+ })[];
599
+ allMatch: boolean;
600
+ };
601
+ };
602
+ /**
603
+ * Runs a comprehensive comparison of all roles against standard test cases
604
+ */
605
+ export declare const validateAllRoleMappings: (options?: {
606
+ isEnterprise?: boolean;
607
+ }) => {
608
+ roleResults: {
609
+ role: ProjectMemberRole;
610
+ scopes: string[];
611
+ results: ({
612
+ roleResult: boolean;
613
+ scopeResult: boolean;
614
+ match: boolean;
615
+ action: "view";
616
+ subject: "Dashboard";
617
+ resource: {
618
+ organizationUuid: string;
619
+ projectUuid: string;
620
+ isPrivate: boolean;
621
+ };
622
+ } | {
623
+ roleResult: boolean;
624
+ scopeResult: boolean;
625
+ match: boolean;
626
+ action: "view";
627
+ subject: "SavedChart";
628
+ resource: {
629
+ organizationUuid: string;
630
+ projectUuid: string;
631
+ isPrivate: boolean;
632
+ };
633
+ } | {
634
+ roleResult: boolean;
635
+ scopeResult: boolean;
636
+ match: boolean;
637
+ action: "view";
638
+ subject: "Space";
639
+ resource: {
640
+ organizationUuid: string;
641
+ projectUuid: string;
642
+ isPrivate: boolean;
643
+ };
644
+ } | {
645
+ roleResult: boolean;
646
+ scopeResult: boolean;
647
+ match: boolean;
648
+ action: "view";
649
+ subject: "Project";
650
+ resource: {
651
+ projectUuid: string;
652
+ organizationUuid?: undefined;
653
+ isPrivate?: undefined;
654
+ };
655
+ } | {
656
+ roleResult: boolean;
657
+ scopeResult: boolean;
658
+ match: boolean;
659
+ action: "create";
660
+ subject: "Space";
661
+ resource: {
662
+ organizationUuid: string;
663
+ projectUuid: string;
664
+ isPrivate?: undefined;
665
+ };
666
+ } | {
667
+ roleResult: boolean;
668
+ scopeResult: boolean;
669
+ match: boolean;
670
+ action: "create";
671
+ subject: "DashboardComments";
672
+ resource: {
673
+ projectUuid: string;
674
+ organizationUuid?: undefined;
675
+ isPrivate?: undefined;
676
+ };
677
+ } | {
678
+ roleResult: boolean;
679
+ scopeResult: boolean;
680
+ match: boolean;
681
+ action: "create";
682
+ subject: "ScheduledDeliveries";
683
+ resource: {
684
+ projectUuid: string;
685
+ organizationUuid?: undefined;
686
+ isPrivate?: undefined;
687
+ };
688
+ } | {
689
+ roleResult: boolean;
690
+ scopeResult: boolean;
691
+ match: boolean;
692
+ action: "manage";
693
+ subject: "Space";
694
+ resource: {
695
+ organizationUuid: string;
696
+ projectUuid: string;
697
+ isPrivate: boolean;
698
+ };
699
+ } | {
700
+ roleResult: boolean;
701
+ scopeResult: boolean;
702
+ match: boolean;
703
+ action: "manage";
704
+ subject: "Job";
705
+ resource: {
706
+ organizationUuid?: undefined;
707
+ projectUuid?: undefined;
708
+ isPrivate?: undefined;
709
+ };
710
+ } | {
711
+ roleResult: boolean;
712
+ scopeResult: boolean;
713
+ match: boolean;
714
+ action: "manage";
715
+ subject: "PinnedItems";
716
+ resource: {
717
+ organizationUuid: string;
718
+ projectUuid: string;
719
+ isPrivate?: undefined;
720
+ };
721
+ } | {
722
+ roleResult: boolean;
723
+ scopeResult: boolean;
724
+ match: boolean;
725
+ action: "manage";
726
+ subject: "Explore";
727
+ resource: {
728
+ projectUuid: string;
729
+ organizationUuid?: undefined;
730
+ isPrivate?: undefined;
731
+ };
732
+ } | {
733
+ roleResult: boolean;
734
+ scopeResult: boolean;
735
+ match: boolean;
736
+ action: "manage";
737
+ subject: "Project";
738
+ resource: {
739
+ projectUuid: string;
740
+ organizationUuid?: undefined;
741
+ isPrivate?: undefined;
742
+ };
743
+ } | {
744
+ roleResult: boolean;
745
+ scopeResult: boolean;
746
+ match: boolean;
747
+ action: "manage";
748
+ subject: "Validation";
749
+ resource: {
750
+ projectUuid: string;
751
+ organizationUuid?: undefined;
752
+ isPrivate?: undefined;
753
+ };
754
+ } | {
755
+ roleResult: boolean;
756
+ scopeResult: boolean;
757
+ match: boolean;
758
+ action: "manage";
759
+ subject: "VirtualView";
760
+ resource: {
761
+ projectUuid: string;
762
+ organizationUuid?: undefined;
763
+ isPrivate?: undefined;
764
+ };
765
+ } | {
766
+ roleResult: boolean;
767
+ scopeResult: boolean;
768
+ match: boolean;
769
+ action: "manage";
770
+ subject: "CustomSql";
771
+ resource: {
772
+ projectUuid: string;
773
+ organizationUuid?: undefined;
774
+ isPrivate?: undefined;
775
+ };
776
+ } | {
777
+ roleResult: boolean;
778
+ scopeResult: boolean;
779
+ match: boolean;
780
+ action: "delete";
781
+ subject: "Project";
782
+ resource: {
783
+ projectUuid: string;
784
+ organizationUuid?: undefined;
785
+ isPrivate?: undefined;
786
+ };
787
+ } | {
788
+ roleResult: boolean;
789
+ scopeResult: boolean;
790
+ match: boolean;
791
+ action: "view";
792
+ subject: "Analytics";
793
+ resource: {
794
+ projectUuid: string;
795
+ organizationUuid?: undefined;
796
+ isPrivate?: undefined;
797
+ };
798
+ })[];
799
+ summary: {
800
+ total: number;
801
+ matches: number;
802
+ mismatches: ({
803
+ roleResult: boolean;
804
+ scopeResult: boolean;
805
+ match: boolean;
806
+ action: "view";
807
+ subject: "Dashboard";
808
+ resource: {
809
+ organizationUuid: string;
810
+ projectUuid: string;
811
+ isPrivate: boolean;
812
+ };
813
+ } | {
814
+ roleResult: boolean;
815
+ scopeResult: boolean;
816
+ match: boolean;
817
+ action: "view";
818
+ subject: "SavedChart";
819
+ resource: {
820
+ organizationUuid: string;
821
+ projectUuid: string;
822
+ isPrivate: boolean;
823
+ };
824
+ } | {
825
+ roleResult: boolean;
826
+ scopeResult: boolean;
827
+ match: boolean;
828
+ action: "view";
829
+ subject: "Space";
830
+ resource: {
831
+ organizationUuid: string;
832
+ projectUuid: string;
833
+ isPrivate: boolean;
834
+ };
835
+ } | {
836
+ roleResult: boolean;
837
+ scopeResult: boolean;
838
+ match: boolean;
839
+ action: "view";
840
+ subject: "Project";
841
+ resource: {
842
+ projectUuid: string;
843
+ organizationUuid?: undefined;
844
+ isPrivate?: undefined;
845
+ };
846
+ } | {
847
+ roleResult: boolean;
848
+ scopeResult: boolean;
849
+ match: boolean;
850
+ action: "create";
851
+ subject: "Space";
852
+ resource: {
853
+ organizationUuid: string;
854
+ projectUuid: string;
855
+ isPrivate?: undefined;
856
+ };
857
+ } | {
858
+ roleResult: boolean;
859
+ scopeResult: boolean;
860
+ match: boolean;
861
+ action: "create";
862
+ subject: "DashboardComments";
863
+ resource: {
864
+ projectUuid: string;
865
+ organizationUuid?: undefined;
866
+ isPrivate?: undefined;
867
+ };
868
+ } | {
869
+ roleResult: boolean;
870
+ scopeResult: boolean;
871
+ match: boolean;
872
+ action: "create";
873
+ subject: "ScheduledDeliveries";
874
+ resource: {
875
+ projectUuid: string;
876
+ organizationUuid?: undefined;
877
+ isPrivate?: undefined;
878
+ };
879
+ } | {
880
+ roleResult: boolean;
881
+ scopeResult: boolean;
882
+ match: boolean;
883
+ action: "manage";
884
+ subject: "Space";
885
+ resource: {
886
+ organizationUuid: string;
887
+ projectUuid: string;
888
+ isPrivate: boolean;
889
+ };
890
+ } | {
891
+ roleResult: boolean;
892
+ scopeResult: boolean;
893
+ match: boolean;
894
+ action: "manage";
895
+ subject: "Job";
896
+ resource: {
897
+ organizationUuid?: undefined;
898
+ projectUuid?: undefined;
899
+ isPrivate?: undefined;
900
+ };
901
+ } | {
902
+ roleResult: boolean;
903
+ scopeResult: boolean;
904
+ match: boolean;
905
+ action: "manage";
906
+ subject: "PinnedItems";
907
+ resource: {
908
+ organizationUuid: string;
909
+ projectUuid: string;
910
+ isPrivate?: undefined;
911
+ };
912
+ } | {
913
+ roleResult: boolean;
914
+ scopeResult: boolean;
915
+ match: boolean;
916
+ action: "manage";
917
+ subject: "Explore";
918
+ resource: {
919
+ projectUuid: string;
920
+ organizationUuid?: undefined;
921
+ isPrivate?: undefined;
922
+ };
923
+ } | {
924
+ roleResult: boolean;
925
+ scopeResult: boolean;
926
+ match: boolean;
927
+ action: "manage";
928
+ subject: "Project";
929
+ resource: {
930
+ projectUuid: string;
931
+ organizationUuid?: undefined;
932
+ isPrivate?: undefined;
933
+ };
934
+ } | {
935
+ roleResult: boolean;
936
+ scopeResult: boolean;
937
+ match: boolean;
938
+ action: "manage";
939
+ subject: "Validation";
940
+ resource: {
941
+ projectUuid: string;
942
+ organizationUuid?: undefined;
943
+ isPrivate?: undefined;
944
+ };
945
+ } | {
946
+ roleResult: boolean;
947
+ scopeResult: boolean;
948
+ match: boolean;
949
+ action: "manage";
950
+ subject: "VirtualView";
951
+ resource: {
952
+ projectUuid: string;
953
+ organizationUuid?: undefined;
954
+ isPrivate?: undefined;
955
+ };
956
+ } | {
957
+ roleResult: boolean;
958
+ scopeResult: boolean;
959
+ match: boolean;
960
+ action: "manage";
961
+ subject: "CustomSql";
962
+ resource: {
963
+ projectUuid: string;
964
+ organizationUuid?: undefined;
965
+ isPrivate?: undefined;
966
+ };
967
+ } | {
968
+ roleResult: boolean;
969
+ scopeResult: boolean;
970
+ match: boolean;
971
+ action: "delete";
972
+ subject: "Project";
973
+ resource: {
974
+ projectUuid: string;
975
+ organizationUuid?: undefined;
976
+ isPrivate?: undefined;
977
+ };
978
+ } | {
979
+ roleResult: boolean;
980
+ scopeResult: boolean;
981
+ match: boolean;
982
+ action: "view";
983
+ subject: "Analytics";
984
+ resource: {
985
+ projectUuid: string;
986
+ organizationUuid?: undefined;
987
+ isPrivate?: undefined;
988
+ };
989
+ })[];
990
+ allMatch: boolean;
991
+ };
992
+ }[];
993
+ overallSummary: {
994
+ rolesValidated: number;
995
+ successfulRoles: ProjectMemberRole[];
996
+ failedRoles: {
997
+ role: ProjectMemberRole;
998
+ mismatches: number;
999
+ }[];
1000
+ totalTestCases: number;
1001
+ totalMatches: number;
1002
+ };
1003
+ allRolesValid: boolean;
1004
+ };
1005
+ /**
1006
+ * Debug utility to show what scopes are missing or extra for a specific role
1007
+ */
1008
+ export declare const debugRoleScopeMapping: (role: ProjectMemberRole) => {
1009
+ role: ProjectMemberRole;
1010
+ scopes: string[];
1011
+ results: ({
1012
+ roleResult: boolean;
1013
+ scopeResult: boolean;
1014
+ match: boolean;
1015
+ action: "view";
1016
+ subject: "Dashboard";
1017
+ resource: {
1018
+ organizationUuid: string;
1019
+ projectUuid: string;
1020
+ isPrivate: boolean;
1021
+ };
1022
+ } | {
1023
+ roleResult: boolean;
1024
+ scopeResult: boolean;
1025
+ match: boolean;
1026
+ action: "view";
1027
+ subject: "SavedChart";
1028
+ resource: {
1029
+ organizationUuid: string;
1030
+ projectUuid: string;
1031
+ isPrivate: boolean;
1032
+ };
1033
+ } | {
1034
+ roleResult: boolean;
1035
+ scopeResult: boolean;
1036
+ match: boolean;
1037
+ action: "view";
1038
+ subject: "Space";
1039
+ resource: {
1040
+ organizationUuid: string;
1041
+ projectUuid: string;
1042
+ isPrivate: boolean;
1043
+ };
1044
+ } | {
1045
+ roleResult: boolean;
1046
+ scopeResult: boolean;
1047
+ match: boolean;
1048
+ action: "view";
1049
+ subject: "Project";
1050
+ resource: {
1051
+ projectUuid: string;
1052
+ organizationUuid?: undefined;
1053
+ isPrivate?: undefined;
1054
+ };
1055
+ } | {
1056
+ roleResult: boolean;
1057
+ scopeResult: boolean;
1058
+ match: boolean;
1059
+ action: "create";
1060
+ subject: "Space";
1061
+ resource: {
1062
+ organizationUuid: string;
1063
+ projectUuid: string;
1064
+ isPrivate?: undefined;
1065
+ };
1066
+ } | {
1067
+ roleResult: boolean;
1068
+ scopeResult: boolean;
1069
+ match: boolean;
1070
+ action: "create";
1071
+ subject: "DashboardComments";
1072
+ resource: {
1073
+ projectUuid: string;
1074
+ organizationUuid?: undefined;
1075
+ isPrivate?: undefined;
1076
+ };
1077
+ } | {
1078
+ roleResult: boolean;
1079
+ scopeResult: boolean;
1080
+ match: boolean;
1081
+ action: "create";
1082
+ subject: "ScheduledDeliveries";
1083
+ resource: {
1084
+ projectUuid: string;
1085
+ organizationUuid?: undefined;
1086
+ isPrivate?: undefined;
1087
+ };
1088
+ } | {
1089
+ roleResult: boolean;
1090
+ scopeResult: boolean;
1091
+ match: boolean;
1092
+ action: "manage";
1093
+ subject: "Space";
1094
+ resource: {
1095
+ organizationUuid: string;
1096
+ projectUuid: string;
1097
+ isPrivate: boolean;
1098
+ };
1099
+ } | {
1100
+ roleResult: boolean;
1101
+ scopeResult: boolean;
1102
+ match: boolean;
1103
+ action: "manage";
1104
+ subject: "Job";
1105
+ resource: {
1106
+ organizationUuid?: undefined;
1107
+ projectUuid?: undefined;
1108
+ isPrivate?: undefined;
1109
+ };
1110
+ } | {
1111
+ roleResult: boolean;
1112
+ scopeResult: boolean;
1113
+ match: boolean;
1114
+ action: "manage";
1115
+ subject: "PinnedItems";
1116
+ resource: {
1117
+ organizationUuid: string;
1118
+ projectUuid: string;
1119
+ isPrivate?: undefined;
1120
+ };
1121
+ } | {
1122
+ roleResult: boolean;
1123
+ scopeResult: boolean;
1124
+ match: boolean;
1125
+ action: "manage";
1126
+ subject: "Explore";
1127
+ resource: {
1128
+ projectUuid: string;
1129
+ organizationUuid?: undefined;
1130
+ isPrivate?: undefined;
1131
+ };
1132
+ } | {
1133
+ roleResult: boolean;
1134
+ scopeResult: boolean;
1135
+ match: boolean;
1136
+ action: "manage";
1137
+ subject: "Project";
1138
+ resource: {
1139
+ projectUuid: string;
1140
+ organizationUuid?: undefined;
1141
+ isPrivate?: undefined;
1142
+ };
1143
+ } | {
1144
+ roleResult: boolean;
1145
+ scopeResult: boolean;
1146
+ match: boolean;
1147
+ action: "manage";
1148
+ subject: "Validation";
1149
+ resource: {
1150
+ projectUuid: string;
1151
+ organizationUuid?: undefined;
1152
+ isPrivate?: undefined;
1153
+ };
1154
+ } | {
1155
+ roleResult: boolean;
1156
+ scopeResult: boolean;
1157
+ match: boolean;
1158
+ action: "manage";
1159
+ subject: "VirtualView";
1160
+ resource: {
1161
+ projectUuid: string;
1162
+ organizationUuid?: undefined;
1163
+ isPrivate?: undefined;
1164
+ };
1165
+ } | {
1166
+ roleResult: boolean;
1167
+ scopeResult: boolean;
1168
+ match: boolean;
1169
+ action: "manage";
1170
+ subject: "CustomSql";
1171
+ resource: {
1172
+ projectUuid: string;
1173
+ organizationUuid?: undefined;
1174
+ isPrivate?: undefined;
1175
+ };
1176
+ } | {
1177
+ roleResult: boolean;
1178
+ scopeResult: boolean;
1179
+ match: boolean;
1180
+ action: "delete";
1181
+ subject: "Project";
1182
+ resource: {
1183
+ projectUuid: string;
1184
+ organizationUuid?: undefined;
1185
+ isPrivate?: undefined;
1186
+ };
1187
+ } | {
1188
+ roleResult: boolean;
1189
+ scopeResult: boolean;
1190
+ match: boolean;
1191
+ action: "view";
1192
+ subject: "Analytics";
1193
+ resource: {
1194
+ projectUuid: string;
1195
+ organizationUuid?: undefined;
1196
+ isPrivate?: undefined;
1197
+ };
1198
+ })[];
1199
+ summary: {
1200
+ total: number;
1201
+ matches: number;
1202
+ mismatches: ({
1203
+ roleResult: boolean;
1204
+ scopeResult: boolean;
1205
+ match: boolean;
1206
+ action: "view";
1207
+ subject: "Dashboard";
1208
+ resource: {
1209
+ organizationUuid: string;
1210
+ projectUuid: string;
1211
+ isPrivate: boolean;
1212
+ };
1213
+ } | {
1214
+ roleResult: boolean;
1215
+ scopeResult: boolean;
1216
+ match: boolean;
1217
+ action: "view";
1218
+ subject: "SavedChart";
1219
+ resource: {
1220
+ organizationUuid: string;
1221
+ projectUuid: string;
1222
+ isPrivate: boolean;
1223
+ };
1224
+ } | {
1225
+ roleResult: boolean;
1226
+ scopeResult: boolean;
1227
+ match: boolean;
1228
+ action: "view";
1229
+ subject: "Space";
1230
+ resource: {
1231
+ organizationUuid: string;
1232
+ projectUuid: string;
1233
+ isPrivate: boolean;
1234
+ };
1235
+ } | {
1236
+ roleResult: boolean;
1237
+ scopeResult: boolean;
1238
+ match: boolean;
1239
+ action: "view";
1240
+ subject: "Project";
1241
+ resource: {
1242
+ projectUuid: string;
1243
+ organizationUuid?: undefined;
1244
+ isPrivate?: undefined;
1245
+ };
1246
+ } | {
1247
+ roleResult: boolean;
1248
+ scopeResult: boolean;
1249
+ match: boolean;
1250
+ action: "create";
1251
+ subject: "Space";
1252
+ resource: {
1253
+ organizationUuid: string;
1254
+ projectUuid: string;
1255
+ isPrivate?: undefined;
1256
+ };
1257
+ } | {
1258
+ roleResult: boolean;
1259
+ scopeResult: boolean;
1260
+ match: boolean;
1261
+ action: "create";
1262
+ subject: "DashboardComments";
1263
+ resource: {
1264
+ projectUuid: string;
1265
+ organizationUuid?: undefined;
1266
+ isPrivate?: undefined;
1267
+ };
1268
+ } | {
1269
+ roleResult: boolean;
1270
+ scopeResult: boolean;
1271
+ match: boolean;
1272
+ action: "create";
1273
+ subject: "ScheduledDeliveries";
1274
+ resource: {
1275
+ projectUuid: string;
1276
+ organizationUuid?: undefined;
1277
+ isPrivate?: undefined;
1278
+ };
1279
+ } | {
1280
+ roleResult: boolean;
1281
+ scopeResult: boolean;
1282
+ match: boolean;
1283
+ action: "manage";
1284
+ subject: "Space";
1285
+ resource: {
1286
+ organizationUuid: string;
1287
+ projectUuid: string;
1288
+ isPrivate: boolean;
1289
+ };
1290
+ } | {
1291
+ roleResult: boolean;
1292
+ scopeResult: boolean;
1293
+ match: boolean;
1294
+ action: "manage";
1295
+ subject: "Job";
1296
+ resource: {
1297
+ organizationUuid?: undefined;
1298
+ projectUuid?: undefined;
1299
+ isPrivate?: undefined;
1300
+ };
1301
+ } | {
1302
+ roleResult: boolean;
1303
+ scopeResult: boolean;
1304
+ match: boolean;
1305
+ action: "manage";
1306
+ subject: "PinnedItems";
1307
+ resource: {
1308
+ organizationUuid: string;
1309
+ projectUuid: string;
1310
+ isPrivate?: undefined;
1311
+ };
1312
+ } | {
1313
+ roleResult: boolean;
1314
+ scopeResult: boolean;
1315
+ match: boolean;
1316
+ action: "manage";
1317
+ subject: "Explore";
1318
+ resource: {
1319
+ projectUuid: string;
1320
+ organizationUuid?: undefined;
1321
+ isPrivate?: undefined;
1322
+ };
1323
+ } | {
1324
+ roleResult: boolean;
1325
+ scopeResult: boolean;
1326
+ match: boolean;
1327
+ action: "manage";
1328
+ subject: "Project";
1329
+ resource: {
1330
+ projectUuid: string;
1331
+ organizationUuid?: undefined;
1332
+ isPrivate?: undefined;
1333
+ };
1334
+ } | {
1335
+ roleResult: boolean;
1336
+ scopeResult: boolean;
1337
+ match: boolean;
1338
+ action: "manage";
1339
+ subject: "Validation";
1340
+ resource: {
1341
+ projectUuid: string;
1342
+ organizationUuid?: undefined;
1343
+ isPrivate?: undefined;
1344
+ };
1345
+ } | {
1346
+ roleResult: boolean;
1347
+ scopeResult: boolean;
1348
+ match: boolean;
1349
+ action: "manage";
1350
+ subject: "VirtualView";
1351
+ resource: {
1352
+ projectUuid: string;
1353
+ organizationUuid?: undefined;
1354
+ isPrivate?: undefined;
1355
+ };
1356
+ } | {
1357
+ roleResult: boolean;
1358
+ scopeResult: boolean;
1359
+ match: boolean;
1360
+ action: "manage";
1361
+ subject: "CustomSql";
1362
+ resource: {
1363
+ projectUuid: string;
1364
+ organizationUuid?: undefined;
1365
+ isPrivate?: undefined;
1366
+ };
1367
+ } | {
1368
+ roleResult: boolean;
1369
+ scopeResult: boolean;
1370
+ match: boolean;
1371
+ action: "delete";
1372
+ subject: "Project";
1373
+ resource: {
1374
+ projectUuid: string;
1375
+ organizationUuid?: undefined;
1376
+ isPrivate?: undefined;
1377
+ };
1378
+ } | {
1379
+ roleResult: boolean;
1380
+ scopeResult: boolean;
1381
+ match: boolean;
1382
+ action: "view";
1383
+ subject: "Analytics";
1384
+ resource: {
1385
+ projectUuid: string;
1386
+ organizationUuid?: undefined;
1387
+ isPrivate?: undefined;
1388
+ };
1389
+ })[];
1390
+ allMatch: boolean;
1391
+ };
1392
+ };
1393
+ //# sourceMappingURL=roleToScopeMapping.testUtils.d.ts.map