@lightdash/common 0.3315.5 → 0.3316.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 (94) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/authorization/scopes.d.ts.map +1 -1
  3. package/dist/cjs/authorization/scopes.js +441 -0
  4. package/dist/cjs/authorization/scopes.js.map +1 -1
  5. package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts +1 -0
  6. package/dist/cjs/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
  7. package/dist/cjs/ee/AiAgent/schemas/tools/index.js +1 -0
  8. package/dist/cjs/ee/AiAgent/schemas/tools/index.js.map +1 -1
  9. package/dist/cjs/ee/AiAgent/schemas/tools/toolClosePullRequestArgs.js +2 -2
  10. package/dist/cjs/ee/AiAgent/schemas/tools/toolClosePullRequestArgs.js.map +1 -1
  11. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +3 -0
  12. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  13. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js +13 -2
  14. package/dist/cjs/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  15. package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts +3 -0
  16. package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts.map +1 -1
  17. package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js +6 -2
  18. package/dist/cjs/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js.map +1 -1
  19. package/dist/cjs/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts +2 -2
  20. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.d.ts +32 -0
  21. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.d.ts.map +1 -0
  22. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.js +20 -0
  23. package/dist/cjs/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.js.map +1 -0
  24. package/dist/cjs/ee/AiAgent/schemas/tools/toolListWorkstreamsArgs.js +2 -2
  25. package/dist/cjs/ee/AiAgent/schemas/tools/toolListWorkstreamsArgs.js.map +1 -1
  26. package/dist/cjs/ee/AiAgent/schemas/visualizations/index.d.ts +4 -4
  27. package/dist/cjs/ee/AiAgent/schemas/visualizations/index.d.ts.map +1 -1
  28. package/dist/cjs/ee/AiAgent/schemas/visualizations/index.js +3 -0
  29. package/dist/cjs/ee/AiAgent/schemas/visualizations/index.js.map +1 -1
  30. package/dist/cjs/types/scopes.d.ts +17 -0
  31. package/dist/cjs/types/scopes.d.ts.map +1 -1
  32. package/dist/esm/.tsbuildinfo +1 -1
  33. package/dist/esm/authorization/scopes.d.ts.map +1 -1
  34. package/dist/esm/authorization/scopes.js +441 -0
  35. package/dist/esm/authorization/scopes.js.map +1 -1
  36. package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts +1 -0
  37. package/dist/esm/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
  38. package/dist/esm/ee/AiAgent/schemas/tools/index.js +1 -0
  39. package/dist/esm/ee/AiAgent/schemas/tools/index.js.map +1 -1
  40. package/dist/esm/ee/AiAgent/schemas/tools/toolClosePullRequestArgs.js +2 -2
  41. package/dist/esm/ee/AiAgent/schemas/tools/toolClosePullRequestArgs.js.map +1 -1
  42. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +3 -0
  43. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  44. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js +11 -0
  45. package/dist/esm/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  46. package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts +3 -0
  47. package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts.map +1 -1
  48. package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js +6 -2
  49. package/dist/esm/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js.map +1 -1
  50. package/dist/esm/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts +2 -2
  51. package/dist/esm/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.d.ts +32 -0
  52. package/dist/esm/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.d.ts.map +1 -0
  53. package/dist/esm/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.js +17 -0
  54. package/dist/esm/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.js.map +1 -0
  55. package/dist/esm/ee/AiAgent/schemas/tools/toolListWorkstreamsArgs.js +2 -2
  56. package/dist/esm/ee/AiAgent/schemas/tools/toolListWorkstreamsArgs.js.map +1 -1
  57. package/dist/esm/ee/AiAgent/schemas/visualizations/index.d.ts +4 -4
  58. package/dist/esm/ee/AiAgent/schemas/visualizations/index.d.ts.map +1 -1
  59. package/dist/esm/ee/AiAgent/schemas/visualizations/index.js +3 -0
  60. package/dist/esm/ee/AiAgent/schemas/visualizations/index.js.map +1 -1
  61. package/dist/esm/types/scopes.d.ts +17 -0
  62. package/dist/esm/types/scopes.d.ts.map +1 -1
  63. package/dist/types/.tsbuildinfo +1 -1
  64. package/dist/types/authorization/scopes.d.ts.map +1 -1
  65. package/dist/types/authorization/scopes.js +441 -0
  66. package/dist/types/authorization/scopes.js.map +1 -1
  67. package/dist/types/ee/AiAgent/schemas/tools/index.d.ts +1 -0
  68. package/dist/types/ee/AiAgent/schemas/tools/index.d.ts.map +1 -1
  69. package/dist/types/ee/AiAgent/schemas/tools/index.js +1 -0
  70. package/dist/types/ee/AiAgent/schemas/tools/index.js.map +1 -1
  71. package/dist/types/ee/AiAgent/schemas/tools/toolClosePullRequestArgs.js +2 -2
  72. package/dist/types/ee/AiAgent/schemas/tools/toolClosePullRequestArgs.js.map +1 -1
  73. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts +3 -0
  74. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.d.ts.map +1 -1
  75. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js +11 -0
  76. package/dist/types/ee/AiAgent/schemas/tools/toolDefinitions.js.map +1 -1
  77. package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts +3 -0
  78. package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.d.ts.map +1 -1
  79. package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js +6 -2
  80. package/dist/types/ee/AiAgent/schemas/tools/toolEditDbtProjectArgs.js.map +1 -1
  81. package/dist/types/ee/AiAgent/schemas/tools/toolEditRepoArgs.d.ts +2 -2
  82. package/dist/types/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.d.ts +32 -0
  83. package/dist/types/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.d.ts.map +1 -0
  84. package/dist/types/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.js +17 -0
  85. package/dist/types/ee/AiAgent/schemas/tools/toolGetPullRequestDiffArgs.js.map +1 -0
  86. package/dist/types/ee/AiAgent/schemas/tools/toolListWorkstreamsArgs.js +2 -2
  87. package/dist/types/ee/AiAgent/schemas/tools/toolListWorkstreamsArgs.js.map +1 -1
  88. package/dist/types/ee/AiAgent/schemas/visualizations/index.d.ts +4 -4
  89. package/dist/types/ee/AiAgent/schemas/visualizations/index.d.ts.map +1 -1
  90. package/dist/types/ee/AiAgent/schemas/visualizations/index.js +3 -0
  91. package/dist/types/ee/AiAgent/schemas/visualizations/index.js.map +1 -1
  92. package/dist/types/types/scopes.d.ts +17 -0
  93. package/dist/types/types/scopes.d.ts.map +1 -1
  94. package/package.json +1 -1
@@ -97,6 +97,13 @@ const scopes = [
97
97
  description: 'View dashboards',
98
98
  isEnterprise: false,
99
99
  group: scopes_1.ScopeGroup.CONTENT,
100
+ dependencies: [
101
+ { name: 'view:Project' },
102
+ {
103
+ name: 'view:SavedChart',
104
+ description: "Load the dashboard's chart tiles",
105
+ },
106
+ ],
100
107
  getConditions: (context) => [
101
108
  addUuidCondition(context, { inheritsFromOrgOrProject: true }),
102
109
  addAccessCondition(context),
@@ -107,6 +114,17 @@ const scopes = [
107
114
  description: 'Create, edit, and delete all dashboards',
108
115
  isEnterprise: false,
109
116
  group: scopes_1.ScopeGroup.CONTENT,
117
+ dependencies: [
118
+ { name: 'view:Project' },
119
+ {
120
+ name: 'view:SavedChart',
121
+ description: 'Load chart tiles while editing dashboards',
122
+ },
123
+ {
124
+ name: 'view:Space',
125
+ description: 'Create a dashboard without picking a space',
126
+ },
127
+ ],
110
128
  getConditions: addDefaultUuidCondition,
111
129
  },
112
130
  {
@@ -114,6 +132,17 @@ const scopes = [
114
132
  description: 'Create, edit, and delete dashboards in spaces where you have editor or admin access',
115
133
  isEnterprise: false,
116
134
  group: scopes_1.ScopeGroup.CONTENT,
135
+ dependencies: [
136
+ { name: 'view:Project' },
137
+ {
138
+ name: 'view:SavedChart',
139
+ description: 'Load chart tiles while editing dashboards',
140
+ },
141
+ {
142
+ name: 'view:Space',
143
+ description: 'Create a dashboard without picking a space',
144
+ },
145
+ ],
117
146
  getConditions: (context) => [
118
147
  addAccessCondition(context, space_1.SpaceMemberRole.EDITOR),
119
148
  addAccessCondition(context, space_1.SpaceMemberRole.ADMIN),
@@ -124,6 +153,18 @@ const scopes = [
124
153
  description: 'Create, edit, and delete dashboards in preview projects created by the user',
125
154
  isEnterprise: false,
126
155
  group: scopes_1.ScopeGroup.CONTENT,
156
+ dependencies: [
157
+ { name: 'view:Project' },
158
+ {
159
+ name: 'view:SavedChart',
160
+ description: 'Load chart tiles in your preview dashboards',
161
+ },
162
+ {
163
+ name: 'view:Space',
164
+ description: 'Create a dashboard without picking a space',
165
+ },
166
+ { name: 'create:Project@preview' },
167
+ ],
127
168
  getConditions: selfPreviewSpaceCondition,
128
169
  },
129
170
  {
@@ -131,6 +172,7 @@ const scopes = [
131
172
  description: 'View saved charts',
132
173
  isEnterprise: false,
133
174
  group: scopes_1.ScopeGroup.CONTENT,
175
+ dependencies: [{ name: 'view:Project' }],
134
176
  getConditions: (context) => [
135
177
  addUuidCondition(context, { inheritsFromOrgOrProject: true }),
136
178
  addAccessCondition(context),
@@ -141,6 +183,17 @@ const scopes = [
141
183
  description: 'Create, edit, and delete all saved charts',
142
184
  isEnterprise: false,
143
185
  group: scopes_1.ScopeGroup.CONTENT,
186
+ dependencies: [
187
+ { name: 'view:Project' },
188
+ {
189
+ name: 'view:Space',
190
+ description: 'Save a chart without picking a space',
191
+ },
192
+ {
193
+ name: 'manage:Explore',
194
+ description: 'Build and edit chart queries',
195
+ },
196
+ ],
144
197
  getConditions: addDefaultUuidCondition,
145
198
  },
146
199
  {
@@ -148,6 +201,17 @@ const scopes = [
148
201
  description: 'Create, edit, and delete saved charts in spaces where you have editor or admin access',
149
202
  isEnterprise: false,
150
203
  group: scopes_1.ScopeGroup.CONTENT,
204
+ dependencies: [
205
+ { name: 'view:Project' },
206
+ {
207
+ name: 'view:Space',
208
+ description: 'Save a chart without picking a space',
209
+ },
210
+ {
211
+ name: 'manage:Explore',
212
+ description: 'Build and edit chart queries',
213
+ },
214
+ ],
151
215
  getConditions: (context) => [
152
216
  addAccessCondition(context, space_1.SpaceMemberRole.EDITOR),
153
217
  addAccessCondition(context, space_1.SpaceMemberRole.ADMIN),
@@ -158,6 +222,18 @@ const scopes = [
158
222
  description: 'Create, edit, and delete saved charts in preview projects created by the user',
159
223
  isEnterprise: false,
160
224
  group: scopes_1.ScopeGroup.CONTENT,
225
+ dependencies: [
226
+ { name: 'view:Project' },
227
+ {
228
+ name: 'view:Space',
229
+ description: 'Save a chart without picking a space in your preview',
230
+ },
231
+ { name: 'create:Project@preview' },
232
+ {
233
+ name: 'manage:Explore@self',
234
+ description: 'Build and edit chart queries in your preview',
235
+ },
236
+ ],
161
237
  getConditions: selfPreviewSpaceCondition,
162
238
  },
163
239
  {
@@ -165,6 +241,7 @@ const scopes = [
165
241
  description: 'View spaces',
166
242
  isEnterprise: false,
167
243
  group: scopes_1.ScopeGroup.CONTENT,
244
+ dependencies: [{ name: 'view:Project' }],
168
245
  getConditions: (context) => [
169
246
  addUuidCondition(context, { inheritsFromOrgOrProject: true }),
170
247
  addAccessCondition(context),
@@ -175,6 +252,13 @@ const scopes = [
175
252
  description: 'Create new spaces',
176
253
  isEnterprise: false,
177
254
  group: scopes_1.ScopeGroup.CONTENT,
255
+ dependencies: [
256
+ { name: 'view:Project' },
257
+ {
258
+ name: 'view:Space',
259
+ description: 'Open and list the spaces you create',
260
+ },
261
+ ],
178
262
  getConditions: addDefaultUuidCondition,
179
263
  },
180
264
  {
@@ -182,6 +266,7 @@ const scopes = [
182
266
  description: 'Create, edit, and delete all spaces',
183
267
  isEnterprise: false,
184
268
  group: scopes_1.ScopeGroup.CONTENT,
269
+ dependencies: [{ name: 'view:Project' }],
185
270
  getConditions: addDefaultUuidCondition,
186
271
  },
187
272
  {
@@ -189,6 +274,7 @@ const scopes = [
189
274
  description: 'Create, edit, and delete public spaces',
190
275
  isEnterprise: false,
191
276
  group: scopes_1.ScopeGroup.CONTENT,
277
+ dependencies: [{ name: 'view:Project' }],
192
278
  getConditions: (context) => [
193
279
  addUuidCondition(context, { inheritsFromOrgOrProject: true }),
194
280
  ],
@@ -198,6 +284,7 @@ const scopes = [
198
284
  description: 'Create, edit, and delete spaces owned by the user',
199
285
  isEnterprise: false,
200
286
  group: scopes_1.ScopeGroup.CONTENT,
287
+ dependencies: [{ name: 'view:Project' }],
201
288
  getConditions: (context) => [
202
289
  addAccessCondition(context, space_1.SpaceMemberRole.ADMIN),
203
290
  ],
@@ -207,6 +294,10 @@ const scopes = [
207
294
  description: 'Create, edit, and delete spaces in preview projects created by the user',
208
295
  isEnterprise: false,
209
296
  group: scopes_1.ScopeGroup.CONTENT,
297
+ dependencies: [
298
+ { name: 'view:Project' },
299
+ { name: 'create:Project@preview' },
300
+ ],
210
301
  getConditions: (context) => selfPreviewSpaceCondition(context, true),
211
302
  },
212
303
  {
@@ -214,6 +305,7 @@ const scopes = [
214
305
  description: 'View dashboard comments',
215
306
  isEnterprise: false,
216
307
  group: scopes_1.ScopeGroup.CONTENT,
308
+ dependencies: [{ name: 'view:Project' }, { name: 'view:Space' }],
217
309
  getConditions: addDefaultUuidCondition,
218
310
  },
219
311
  {
@@ -221,6 +313,7 @@ const scopes = [
221
313
  description: 'Create dashboard comments',
222
314
  isEnterprise: false,
223
315
  group: scopes_1.ScopeGroup.CONTENT,
316
+ dependencies: [{ name: 'view:Project' }, { name: 'view:Space' }],
224
317
  getConditions: addDefaultUuidCondition,
225
318
  },
226
319
  {
@@ -228,6 +321,7 @@ const scopes = [
228
321
  description: 'Edit and delete dashboard comments',
229
322
  isEnterprise: false,
230
323
  group: scopes_1.ScopeGroup.CONTENT,
324
+ dependencies: [{ name: 'view:Project' }, { name: 'view:Space' }],
231
325
  getConditions: addDefaultUuidCondition,
232
326
  },
233
327
  {
@@ -235,6 +329,7 @@ const scopes = [
235
329
  description: 'View tags',
236
330
  isEnterprise: false,
237
331
  group: scopes_1.ScopeGroup.CONTENT,
332
+ dependencies: [{ name: 'view:Project' }],
238
333
  getConditions: addDefaultUuidCondition,
239
334
  },
240
335
  {
@@ -242,6 +337,7 @@ const scopes = [
242
337
  description: 'Create, edit, and delete tags',
243
338
  isEnterprise: false,
244
339
  group: scopes_1.ScopeGroup.CONTENT,
340
+ dependencies: [{ name: 'view:Project' }],
245
341
  getConditions: addDefaultUuidCondition,
246
342
  },
247
343
  {
@@ -249,6 +345,7 @@ const scopes = [
249
345
  description: 'View pinned items',
250
346
  isEnterprise: false,
251
347
  group: scopes_1.ScopeGroup.CONTENT,
348
+ dependencies: [{ name: 'view:Project' }, { name: 'view:Space' }],
252
349
  getConditions: addDefaultUuidCondition,
253
350
  },
254
351
  {
@@ -256,6 +353,14 @@ const scopes = [
256
353
  description: 'Pin and unpin items',
257
354
  isEnterprise: false,
258
355
  group: scopes_1.ScopeGroup.CONTENT,
356
+ dependencies: [
357
+ { name: 'view:Project' },
358
+ { name: 'view:Dashboard', description: 'Pin and unpin dashboards' },
359
+ {
360
+ name: 'view:Space',
361
+ description: 'Pin charts and list pinned items',
362
+ },
363
+ ],
259
364
  getConditions: addDefaultUuidCondition,
260
365
  },
261
366
  {
@@ -263,6 +368,7 @@ const scopes = [
263
368
  description: 'Manage soft-deleted content (restore, permanently delete)',
264
369
  isEnterprise: false,
265
370
  group: scopes_1.ScopeGroup.CONTENT,
371
+ dependencies: [{ name: 'view:Project' }],
266
372
  getConditions: addDefaultUuidCondition,
267
373
  },
268
374
  {
@@ -270,6 +376,7 @@ const scopes = [
270
376
  description: 'Verify and unverify charts and dashboards',
271
377
  isEnterprise: false,
272
378
  group: scopes_1.ScopeGroup.CONTENT,
379
+ dependencies: [{ name: 'view:Project' }],
273
380
  getConditions: addDefaultUuidCondition,
274
381
  },
275
382
  {
@@ -277,6 +384,21 @@ const scopes = [
277
384
  description: 'Promote saved charts to any space',
278
385
  isEnterprise: false,
279
386
  group: scopes_1.ScopeGroup.CONTENT,
387
+ dependencies: [
388
+ { name: 'view:Project' },
389
+ {
390
+ name: 'create:Space',
391
+ description: "Promote a chart whose space doesn't exist upstream yet",
392
+ },
393
+ {
394
+ name: 'manage:Space',
395
+ description: 'Rename an upstream space during promotion',
396
+ },
397
+ {
398
+ name: 'manage:SavedChart',
399
+ description: "Promote a chart that doesn't exist upstream yet",
400
+ },
401
+ ],
280
402
  getConditions: addDefaultUuidCondition,
281
403
  },
282
404
  {
@@ -284,6 +406,21 @@ const scopes = [
284
406
  description: 'Promote saved charts to spaces where the member has editor or admin access',
285
407
  isEnterprise: false,
286
408
  group: scopes_1.ScopeGroup.CONTENT,
409
+ dependencies: [
410
+ { name: 'view:Project' },
411
+ {
412
+ name: 'create:Space',
413
+ description: "Promote a chart whose space doesn't exist upstream yet",
414
+ },
415
+ {
416
+ name: 'manage:Space',
417
+ description: 'Rename an upstream space during promotion',
418
+ },
419
+ {
420
+ name: 'manage:SavedChart',
421
+ description: "Promote a chart that doesn't exist upstream yet",
422
+ },
423
+ ],
287
424
  getConditions: (context) => [
288
425
  addAccessCondition(context, space_1.SpaceMemberRole.EDITOR),
289
426
  addAccessCondition(context, space_1.SpaceMemberRole.ADMIN),
@@ -294,6 +431,29 @@ const scopes = [
294
431
  description: 'Promote dashboards to any space',
295
432
  isEnterprise: false,
296
433
  group: scopes_1.ScopeGroup.CONTENT,
434
+ dependencies: [
435
+ { name: 'view:Project' },
436
+ {
437
+ name: 'manage:Dashboard',
438
+ description: "Promote a dashboard that doesn't exist upstream yet",
439
+ },
440
+ {
441
+ name: 'create:Space',
442
+ description: "Promote a dashboard whose space doesn't exist upstream yet",
443
+ },
444
+ {
445
+ name: 'manage:Space',
446
+ description: 'Rename an upstream space during promotion',
447
+ },
448
+ {
449
+ name: 'manage:SavedChart',
450
+ description: "Promote tiles whose charts don't exist upstream yet",
451
+ },
452
+ {
453
+ name: 'promote:SavedChart',
454
+ description: 'Promote dashboards that contain chart tiles',
455
+ },
456
+ ],
297
457
  getConditions: addDefaultUuidCondition,
298
458
  },
299
459
  {
@@ -301,6 +461,25 @@ const scopes = [
301
461
  description: 'Promote dashboards to spaces where the member has editor or admin access',
302
462
  isEnterprise: false,
303
463
  group: scopes_1.ScopeGroup.CONTENT,
464
+ dependencies: [
465
+ { name: 'view:Project' },
466
+ {
467
+ name: 'manage:Dashboard@space',
468
+ description: "Promote a dashboard that doesn't exist upstream yet",
469
+ },
470
+ {
471
+ name: 'create:Space',
472
+ description: "Promote a dashboard whose space doesn't exist upstream yet",
473
+ },
474
+ {
475
+ name: 'manage:Space',
476
+ description: 'Rename an upstream space during promotion',
477
+ },
478
+ {
479
+ name: 'promote:SavedChart@space',
480
+ description: 'Promote dashboards that contain chart tiles',
481
+ },
482
+ ],
304
483
  getConditions: (context) => [
305
484
  addAccessCondition(context, space_1.SpaceMemberRole.EDITOR),
306
485
  addAccessCondition(context, space_1.SpaceMemberRole.ADMIN),
@@ -312,6 +491,7 @@ const scopes = [
312
491
  description: 'View project details',
313
492
  isEnterprise: false,
314
493
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
494
+ dependencies: [],
315
495
  getConditions: addDefaultUuidCondition,
316
496
  },
317
497
  {
@@ -319,6 +499,17 @@ const scopes = [
319
499
  description: 'Create new preview projects',
320
500
  isEnterprise: false,
321
501
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
502
+ dependencies: [
503
+ { name: 'view:Project' },
504
+ {
505
+ name: 'manage:CompileProject',
506
+ description: 'Compile the preview after creating it',
507
+ },
508
+ {
509
+ name: 'create:Job',
510
+ description: 'Compile the preview after creating it',
511
+ },
512
+ ],
322
513
  getConditions: (context) => [
323
514
  {
324
515
  upstreamProjectUuid: context.projectUuid,
@@ -331,6 +522,7 @@ const scopes = [
331
522
  description: 'Update project settings',
332
523
  isEnterprise: false,
333
524
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
525
+ dependencies: [{ name: 'view:Project' }],
334
526
  getConditions: addDefaultUuidCondition,
335
527
  },
336
528
  {
@@ -338,6 +530,10 @@ const scopes = [
338
530
  description: 'Update projects created by the user',
339
531
  isEnterprise: false,
340
532
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
533
+ dependencies: [
534
+ { name: 'view:Project' },
535
+ { name: 'create:Project@preview' },
536
+ ],
341
537
  getConditions: ownPreviewProjectConditions,
342
538
  },
343
539
  {
@@ -345,6 +541,7 @@ const scopes = [
345
541
  description: 'Delete projects',
346
542
  isEnterprise: false,
347
543
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
544
+ dependencies: [{ name: 'view:Project' }],
348
545
  getConditions: addDefaultUuidCondition,
349
546
  },
350
547
  {
@@ -352,6 +549,10 @@ const scopes = [
352
549
  description: 'Delete projects created by the user',
353
550
  isEnterprise: false,
354
551
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
552
+ dependencies: [
553
+ { name: 'view:Project' },
554
+ { name: 'create:Project@preview' },
555
+ ],
355
556
  getConditions: ownPreviewProjectConditions,
356
557
  },
357
558
  {
@@ -359,6 +560,7 @@ const scopes = [
359
560
  description: 'Full project management permissions',
360
561
  isEnterprise: false,
361
562
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
563
+ dependencies: [{ name: 'view:Project' }],
362
564
  getConditions: addDefaultUuidCondition,
363
565
  },
364
566
  {
@@ -366,6 +568,7 @@ const scopes = [
366
568
  description: 'Compile and refresh dbt projects',
367
569
  isEnterprise: false,
368
570
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
571
+ dependencies: [{ name: 'view:Project' }, { name: 'create:Job' }],
369
572
  getConditions: addDefaultUuidCondition,
370
573
  },
371
574
  {
@@ -373,6 +576,7 @@ const scopes = [
373
576
  description: 'Deploy dbt projects via CLI',
374
577
  isEnterprise: false,
375
578
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
579
+ dependencies: [{ name: 'view:Project' }],
376
580
  getConditions: addDefaultUuidCondition,
377
581
  },
378
582
  {
@@ -380,6 +584,10 @@ const scopes = [
380
584
  description: 'Deploy to preview projects created by the user',
381
585
  isEnterprise: false,
382
586
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
587
+ dependencies: [
588
+ { name: 'view:Project' },
589
+ { name: 'create:Project@preview' },
590
+ ],
383
591
  getConditions: ownPreviewProjectConditions,
384
592
  },
385
593
  {
@@ -387,6 +595,7 @@ const scopes = [
387
595
  description: 'Manage data validation rules',
388
596
  isEnterprise: false,
389
597
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
598
+ dependencies: [{ name: 'view:Project' }],
390
599
  getConditions: addDefaultUuidCondition,
391
600
  },
392
601
  {
@@ -394,6 +603,7 @@ const scopes = [
394
603
  description: 'Manage user own scheduled deliveries',
395
604
  isEnterprise: false,
396
605
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
606
+ dependencies: [{ name: 'view:Project' }],
397
607
  getConditions: (context) => [
398
608
  addUuidCondition(context, { userUuid: context.userUuid || false }),
399
609
  ],
@@ -403,6 +613,21 @@ const scopes = [
403
613
  description: 'Create scheduled deliveries',
404
614
  isEnterprise: false,
405
615
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
616
+ dependencies: [
617
+ { name: 'view:Project' },
618
+ {
619
+ name: 'view:SavedChart',
620
+ description: 'Open and send chart deliveries after creating them',
621
+ },
622
+ {
623
+ name: 'view:Dashboard',
624
+ description: 'Create and send deliveries that target a dashboard',
625
+ },
626
+ {
627
+ name: 'view:Space',
628
+ description: 'Create and send deliveries that target a chart',
629
+ },
630
+ ],
406
631
  getConditions: addDefaultUuidCondition,
407
632
  },
408
633
  {
@@ -410,6 +635,17 @@ const scopes = [
410
635
  description: 'Manage scheduled deliveries',
411
636
  isEnterprise: false,
412
637
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
638
+ dependencies: [
639
+ { name: 'view:Project' },
640
+ {
641
+ name: 'update:Project',
642
+ description: 'View the project-level delivery overview and logs',
643
+ },
644
+ {
645
+ name: 'manage:GoogleSheets',
646
+ description: 'Manage deliveries that sync to Google Sheets',
647
+ },
648
+ ],
413
649
  getConditions: addDefaultUuidCondition,
414
650
  },
415
651
  {
@@ -417,6 +653,17 @@ const scopes = [
417
653
  description: 'Manage google sheets',
418
654
  isEnterprise: false,
419
655
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
656
+ dependencies: [
657
+ { name: 'view:Project' },
658
+ {
659
+ name: 'create:ScheduledDeliveries',
660
+ description: 'Create and send Google Sheets scheduled deliveries',
661
+ },
662
+ {
663
+ name: 'manage:ExportCsv',
664
+ description: 'Run one-off exports to Google Sheets',
665
+ },
666
+ ],
420
667
  getConditions: addDefaultUuidCondition,
421
668
  },
422
669
  {
@@ -424,6 +671,7 @@ const scopes = [
424
671
  description: 'View usage analytics',
425
672
  isEnterprise: false,
426
673
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
674
+ dependencies: [{ name: 'view:Project' }],
427
675
  getConditions: addDefaultUuidCondition,
428
676
  },
429
677
  {
@@ -431,6 +679,17 @@ const scopes = [
431
679
  description: 'Create background jobs',
432
680
  isEnterprise: false,
433
681
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
682
+ dependencies: [
683
+ { name: 'view:Project' },
684
+ {
685
+ name: 'manage:CompileProject',
686
+ description: 'Trigger dbt refreshes and compiles',
687
+ },
688
+ {
689
+ name: 'manage:SqlRunner',
690
+ description: 'Run legacy SQL runner jobs',
691
+ },
692
+ ],
434
693
  getConditions: () => [],
435
694
  },
436
695
  {
@@ -438,6 +697,7 @@ const scopes = [
438
697
  description: 'View all job details',
439
698
  isEnterprise: false,
440
699
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
700
+ dependencies: [{ name: 'view:Project' }],
441
701
  getConditions: addDefaultUuidCondition,
442
702
  },
443
703
  {
@@ -445,6 +705,7 @@ const scopes = [
445
705
  description: 'View your own job details',
446
706
  isEnterprise: false,
447
707
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
708
+ dependencies: [{ name: 'view:Project' }],
448
709
  getConditions: (context) => [{ userUuid: context.userUuid || false }],
449
710
  },
450
711
  {
@@ -452,6 +713,13 @@ const scopes = [
452
713
  description: 'Manage background jobs',
453
714
  isEnterprise: false,
454
715
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
716
+ dependencies: [
717
+ { name: 'view:Project' },
718
+ {
719
+ name: 'manage:CompileProject',
720
+ description: 'Trigger dbt refreshes',
721
+ },
722
+ ],
455
723
  getConditions: () => [],
456
724
  },
457
725
  {
@@ -459,6 +727,13 @@ const scopes = [
459
727
  description: 'View all job status',
460
728
  isEnterprise: false,
461
729
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
730
+ dependencies: [
731
+ { name: 'view:Project' },
732
+ {
733
+ name: 'update:Project',
734
+ description: 'Read project compile logs',
735
+ },
736
+ ],
462
737
  getConditions: addDefaultUuidCondition,
463
738
  },
464
739
  {
@@ -466,6 +741,7 @@ const scopes = [
466
741
  description: 'View status of jobs you created',
467
742
  isEnterprise: false,
468
743
  group: scopes_1.ScopeGroup.PROJECT_MANAGEMENT,
744
+ dependencies: [{ name: 'view:Project' }],
469
745
  getConditions: (context) => [
470
746
  {
471
747
  createdByUserUuid: context.userUuid || false,
@@ -478,6 +754,7 @@ const scopes = [
478
754
  description: 'View organization details',
479
755
  isEnterprise: false,
480
756
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
757
+ dependencies: [],
481
758
  level: 'organization',
482
759
  getConditions: addDefaultUuidCondition,
483
760
  },
@@ -486,6 +763,7 @@ const scopes = [
486
763
  description: 'Manage organization settings',
487
764
  isEnterprise: false,
488
765
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
766
+ dependencies: [],
489
767
  level: 'organization',
490
768
  getConditions: addDefaultUuidCondition,
491
769
  },
@@ -494,6 +772,7 @@ const scopes = [
494
772
  description: 'View organization member profiles',
495
773
  isEnterprise: false,
496
774
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
775
+ dependencies: [],
497
776
  level: 'organization',
498
777
  getConditions: addDefaultUuidCondition,
499
778
  },
@@ -502,6 +781,7 @@ const scopes = [
502
781
  description: 'Manage organization member profiles and roles',
503
782
  isEnterprise: false,
504
783
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
784
+ dependencies: [],
505
785
  level: 'organization',
506
786
  getConditions: addDefaultUuidCondition,
507
787
  },
@@ -510,6 +790,12 @@ const scopes = [
510
790
  description: 'Create and manage invite links',
511
791
  isEnterprise: false,
512
792
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
793
+ dependencies: [
794
+ {
795
+ name: 'manage:OrganizationMemberProfile',
796
+ description: 'Invite users with a role other than member',
797
+ },
798
+ ],
513
799
  level: 'organization',
514
800
  getConditions: addDefaultUuidCondition,
515
801
  },
@@ -518,6 +804,16 @@ const scopes = [
518
804
  description: 'Manage user groups',
519
805
  isEnterprise: false,
520
806
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
807
+ dependencies: [
808
+ {
809
+ name: 'update:Project',
810
+ description: 'Give groups access to a project',
811
+ },
812
+ {
813
+ name: 'view:OrganizationMemberProfile',
814
+ description: 'Browse organization members when managing group membership',
815
+ },
816
+ ],
521
817
  level: 'organization',
522
818
  getConditions: addDefaultUuidCondition,
523
819
  },
@@ -526,6 +822,13 @@ const scopes = [
526
822
  description: 'Manage Git integration settings and create repositories',
527
823
  isEnterprise: false,
528
824
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
825
+ dependencies: [
826
+ { name: 'view:Organization' },
827
+ {
828
+ name: 'manage:Organization',
829
+ description: 'Install the GitHub app',
830
+ },
831
+ ],
529
832
  level: 'organization',
530
833
  getConditions: addDefaultUuidCondition,
531
834
  },
@@ -534,6 +837,7 @@ const scopes = [
534
837
  description: 'View organization warehouse credentials',
535
838
  isEnterprise: true,
536
839
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
840
+ dependencies: [],
537
841
  level: 'organization',
538
842
  getConditions: addDefaultUuidCondition,
539
843
  },
@@ -542,6 +846,7 @@ const scopes = [
542
846
  description: 'Manage organization warehouse credentials',
543
847
  isEnterprise: true,
544
848
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
849
+ dependencies: [],
545
850
  level: 'organization',
546
851
  getConditions: addDefaultUuidCondition,
547
852
  },
@@ -550,6 +855,7 @@ const scopes = [
550
855
  description: 'Download content as code',
551
856
  isEnterprise: true,
552
857
  group: scopes_1.ScopeGroup.CONTENT,
858
+ dependencies: [{ name: 'view:Project' }, { name: 'view:Space' }],
553
859
  getConditions: addDefaultUuidCondition,
554
860
  },
555
861
  {
@@ -557,6 +863,15 @@ const scopes = [
557
863
  description: 'Download and upload content as code',
558
864
  isEnterprise: true,
559
865
  group: scopes_1.ScopeGroup.CONTENT,
866
+ dependencies: [
867
+ { name: 'view:Project' },
868
+ {
869
+ name: 'view:Space',
870
+ description: 'Upload into an existing space',
871
+ },
872
+ { name: 'manage:SavedChart', description: 'Upload SQL charts' },
873
+ { name: 'manage:CustomSql', description: 'Upload SQL charts' },
874
+ ],
560
875
  getConditions: addDefaultUuidCondition,
561
876
  },
562
877
  {
@@ -564,6 +879,20 @@ const scopes = [
564
879
  description: 'Upload content as code to preview projects created by the user',
565
880
  isEnterprise: true,
566
881
  group: scopes_1.ScopeGroup.CONTENT,
882
+ dependencies: [
883
+ { name: 'view:Project' },
884
+ {
885
+ name: 'view:Space',
886
+ description: 'Upload into an existing space in your preview',
887
+ },
888
+ {
889
+ name: 'view:ContentAsCode',
890
+ description: 'Download content as code',
891
+ },
892
+ { name: 'manage:SavedChart', description: 'Upload SQL charts' },
893
+ { name: 'manage:CustomSql', description: 'Upload SQL charts' },
894
+ { name: 'create:Project@preview' },
895
+ ],
567
896
  getConditions: ownPreviewProjectConditions,
568
897
  },
569
898
  {
@@ -571,6 +900,7 @@ const scopes = [
571
900
  description: 'Create and manage personal access tokens',
572
901
  isEnterprise: true,
573
902
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
903
+ dependencies: [],
574
904
  level: 'organization',
575
905
  getConditions: addDefaultUuidCondition,
576
906
  },
@@ -579,6 +909,7 @@ const scopes = [
579
909
  description: 'Impersonate other users in the organization',
580
910
  isEnterprise: false,
581
911
  group: scopes_1.ScopeGroup.ORGANIZATION_MANAGEMENT,
912
+ dependencies: [],
582
913
  level: 'organization',
583
914
  getConditions: (context) => [
584
915
  { ...addUuidCondition(context), isActive: true },
@@ -590,6 +921,7 @@ const scopes = [
590
921
  description: 'View underlying data in charts',
591
922
  isEnterprise: false,
592
923
  group: scopes_1.ScopeGroup.DATA,
924
+ dependencies: [{ name: 'view:Project' }],
593
925
  getConditions: addDefaultUuidCondition,
594
926
  },
595
927
  {
@@ -597,6 +929,7 @@ const scopes = [
597
929
  description: 'View data in semantic viewer',
598
930
  isEnterprise: false,
599
931
  group: scopes_1.ScopeGroup.DATA,
932
+ dependencies: [{ name: 'view:Project' }],
600
933
  getConditions: addDefaultUuidCondition,
601
934
  },
602
935
  {
@@ -604,6 +937,7 @@ const scopes = [
604
937
  description: 'Create and edit semantic viewer queries anywhere',
605
938
  isEnterprise: false,
606
939
  group: scopes_1.ScopeGroup.DATA,
940
+ dependencies: [{ name: 'view:Project' }],
607
941
  getConditions: addDefaultUuidCondition,
608
942
  },
609
943
  {
@@ -611,6 +945,7 @@ const scopes = [
611
945
  description: 'Create and edit semantic viewer queries in spaces where the member has editor access',
612
946
  isEnterprise: false,
613
947
  group: scopes_1.ScopeGroup.DATA,
948
+ dependencies: [{ name: 'view:Project' }],
614
949
  getConditions: (context) => [
615
950
  addAccessCondition(context, space_1.SpaceMemberRole.EDITOR),
616
951
  ],
@@ -620,6 +955,7 @@ const scopes = [
620
955
  description: 'Explore and query data',
621
956
  isEnterprise: false,
622
957
  group: scopes_1.ScopeGroup.DATA,
958
+ dependencies: [{ name: 'view:Project' }],
623
959
  getConditions: addDefaultUuidCondition,
624
960
  },
625
961
  {
@@ -627,6 +963,10 @@ const scopes = [
627
963
  description: 'Explore and query data in preview projects created by the user',
628
964
  isEnterprise: false,
629
965
  group: scopes_1.ScopeGroup.DATA,
966
+ dependencies: [
967
+ { name: 'view:Project' },
968
+ { name: 'create:Project@preview' },
969
+ ],
630
970
  getConditions: selfPreviewProjectCondition,
631
971
  },
632
972
  {
@@ -634,6 +974,10 @@ const scopes = [
634
974
  description: 'Run SQL queries, execute SQL charts, and browse warehouse schema',
635
975
  isEnterprise: false,
636
976
  group: scopes_1.ScopeGroup.DATA,
977
+ dependencies: [
978
+ { name: 'view:Project' },
979
+ { name: 'create:Job', description: 'Run legacy SQL runner jobs' },
980
+ ],
637
981
  getConditions: addDefaultUuidCondition,
638
982
  },
639
983
  {
@@ -641,6 +985,10 @@ const scopes = [
641
985
  description: 'Save SQL charts',
642
986
  isEnterprise: false,
643
987
  group: scopes_1.ScopeGroup.DATA,
988
+ dependencies: [
989
+ { name: 'view:Project' },
990
+ { name: 'manage:SavedChart@space' },
991
+ ],
644
992
  getConditions: addDefaultUuidCondition,
645
993
  },
646
994
  {
@@ -648,6 +996,13 @@ const scopes = [
648
996
  description: 'Create and edit custom dimensions',
649
997
  isEnterprise: false,
650
998
  group: scopes_1.ScopeGroup.DATA,
999
+ dependencies: [
1000
+ { name: 'view:Project' },
1001
+ {
1002
+ name: 'manage:SavedChart@space',
1003
+ description: 'Save custom dimensions to a chart',
1004
+ },
1005
+ ],
651
1006
  getConditions: addDefaultUuidCondition,
652
1007
  },
653
1008
  {
@@ -655,6 +1010,10 @@ const scopes = [
655
1010
  description: 'Create and edit SQL table calculations',
656
1011
  isEnterprise: false,
657
1012
  group: scopes_1.ScopeGroup.DATA,
1013
+ dependencies: [
1014
+ { name: 'view:Project' },
1015
+ { name: 'manage:SavedChart@space' },
1016
+ ],
658
1017
  getConditions: addDefaultUuidCondition,
659
1018
  },
660
1019
  {
@@ -662,6 +1021,7 @@ const scopes = [
662
1021
  description: 'Create virtual views',
663
1022
  isEnterprise: false,
664
1023
  group: scopes_1.ScopeGroup.DATA,
1024
+ dependencies: [{ name: 'view:Project' }],
665
1025
  getConditions: addDefaultUuidCondition,
666
1026
  },
667
1027
  {
@@ -669,6 +1029,7 @@ const scopes = [
669
1029
  description: 'Delete virtual views',
670
1030
  isEnterprise: false,
671
1031
  group: scopes_1.ScopeGroup.DATA,
1032
+ dependencies: [{ name: 'view:Project' }],
672
1033
  getConditions: addDefaultUuidCondition,
673
1034
  },
674
1035
  {
@@ -676,6 +1037,7 @@ const scopes = [
676
1037
  description: 'Create and manage virtual views',
677
1038
  isEnterprise: false,
678
1039
  group: scopes_1.ScopeGroup.DATA,
1040
+ dependencies: [{ name: 'view:Project' }],
679
1041
  getConditions: addDefaultUuidCondition,
680
1042
  },
681
1043
  {
@@ -683,6 +1045,7 @@ const scopes = [
683
1045
  description: 'View and query pre-aggregates in explore',
684
1046
  isEnterprise: true,
685
1047
  group: scopes_1.ScopeGroup.DATA,
1048
+ dependencies: [{ name: 'view:Project' }, { name: 'manage:Explore' }],
686
1049
  getConditions: addDefaultUuidCondition,
687
1050
  },
688
1051
  {
@@ -690,6 +1053,10 @@ const scopes = [
690
1053
  description: 'Export data to CSV',
691
1054
  isEnterprise: false,
692
1055
  group: scopes_1.ScopeGroup.DATA,
1056
+ dependencies: [
1057
+ { name: 'view:Project' },
1058
+ { name: 'view:SavedChart', description: 'Export dashboards' },
1059
+ ],
693
1060
  getConditions: addDefaultUuidCondition,
694
1061
  },
695
1062
  {
@@ -697,6 +1064,7 @@ const scopes = [
697
1064
  description: 'Modify CSV export results',
698
1065
  isEnterprise: false,
699
1066
  group: scopes_1.ScopeGroup.DATA,
1067
+ dependencies: [{ name: 'view:Project' }],
700
1068
  getConditions: addDefaultUuidCondition,
701
1069
  },
702
1070
  {
@@ -704,6 +1072,7 @@ const scopes = [
704
1072
  description: 'View source code for explores and models',
705
1073
  isEnterprise: false,
706
1074
  group: scopes_1.ScopeGroup.DATA,
1075
+ dependencies: [{ name: 'view:Project' }],
707
1076
  getConditions: addDefaultUuidCondition,
708
1077
  },
709
1078
  {
@@ -711,6 +1080,7 @@ const scopes = [
711
1080
  description: 'Create pull requests to update source code',
712
1081
  isEnterprise: false,
713
1082
  group: scopes_1.ScopeGroup.DATA,
1083
+ dependencies: [{ name: 'view:Project' }],
714
1084
  getConditions: addDefaultUuidCondition,
715
1085
  },
716
1086
  // AI Agent
@@ -719,6 +1089,7 @@ const scopes = [
719
1089
  description: 'View AI agents in a project',
720
1090
  isEnterprise: true,
721
1091
  group: scopes_1.ScopeGroup.AI,
1092
+ dependencies: [{ name: 'view:Project' }],
722
1093
  getConditions: addDefaultUuidCondition,
723
1094
  },
724
1095
  {
@@ -726,6 +1097,7 @@ const scopes = [
726
1097
  description: 'Create and manage AI agents in a project',
727
1098
  isEnterprise: true,
728
1099
  group: scopes_1.ScopeGroup.AI,
1100
+ dependencies: [{ name: 'view:Project' }],
729
1101
  getConditions: addDefaultUuidCondition,
730
1102
  },
731
1103
  {
@@ -734,6 +1106,7 @@ const scopes = [
734
1106
  isEnterprise: true,
735
1107
  level: 'organization',
736
1108
  group: scopes_1.ScopeGroup.AI,
1109
+ dependencies: [],
737
1110
  getConditions: addDefaultUuidCondition,
738
1111
  },
739
1112
  {
@@ -742,6 +1115,7 @@ const scopes = [
742
1115
  isEnterprise: true,
743
1116
  level: 'organization',
744
1117
  group: scopes_1.ScopeGroup.AI,
1118
+ dependencies: [],
745
1119
  getConditions: addDefaultUuidCondition,
746
1120
  },
747
1121
  {
@@ -749,6 +1123,7 @@ const scopes = [
749
1123
  description: 'View AI agent documents',
750
1124
  isEnterprise: true,
751
1125
  group: scopes_1.ScopeGroup.AI,
1126
+ dependencies: [{ name: 'view:Project' }],
752
1127
  getConditions: addDefaultUuidCondition,
753
1128
  },
754
1129
  {
@@ -756,6 +1131,7 @@ const scopes = [
756
1131
  description: 'Upload and manage AI agent documents',
757
1132
  isEnterprise: true,
758
1133
  group: scopes_1.ScopeGroup.AI,
1134
+ dependencies: [{ name: 'view:Project' }],
759
1135
  getConditions: addDefaultUuidCondition,
760
1136
  },
761
1137
  {
@@ -763,6 +1139,7 @@ const scopes = [
763
1139
  description: 'View all AI agent conversation threads',
764
1140
  isEnterprise: true,
765
1141
  group: scopes_1.ScopeGroup.AI,
1142
+ dependencies: [{ name: 'view:Project' }, { name: 'manage:AiAgent' }],
766
1143
  getConditions: addDefaultUuidCondition,
767
1144
  },
768
1145
  {
@@ -770,6 +1147,7 @@ const scopes = [
770
1147
  description: 'View owned AI agent conversation threads',
771
1148
  isEnterprise: true,
772
1149
  group: scopes_1.ScopeGroup.AI,
1150
+ dependencies: [{ name: 'view:Project' }],
773
1151
  getConditions: (context) => [
774
1152
  addUuidCondition(context, { userUuid: context.userUuid || false }),
775
1153
  ],
@@ -779,6 +1157,7 @@ const scopes = [
779
1157
  description: 'Start new AI agent conversations',
780
1158
  isEnterprise: true,
781
1159
  group: scopes_1.ScopeGroup.AI,
1160
+ dependencies: [{ name: 'view:Project' }],
782
1161
  getConditions: addDefaultUuidCondition,
783
1162
  },
784
1163
  {
@@ -786,6 +1165,7 @@ const scopes = [
786
1165
  description: 'Manage all AI agent conversation threads',
787
1166
  isEnterprise: true,
788
1167
  group: scopes_1.ScopeGroup.AI,
1168
+ dependencies: [{ name: 'view:Project' }, { name: 'manage:AiAgent' }],
789
1169
  getConditions: addDefaultUuidCondition,
790
1170
  },
791
1171
  {
@@ -793,6 +1173,7 @@ const scopes = [
793
1173
  description: 'Manage owned AI agent conversation threads',
794
1174
  isEnterprise: true,
795
1175
  group: scopes_1.ScopeGroup.AI,
1176
+ dependencies: [{ name: 'view:Project' }],
796
1177
  getConditions: (context) => [
797
1178
  addUuidCondition(context, { userUuid: context.userUuid || false }),
798
1179
  ],
@@ -803,6 +1184,17 @@ const scopes = [
803
1184
  description: 'View data apps',
804
1185
  isEnterprise: false,
805
1186
  group: scopes_1.ScopeGroup.AI,
1187
+ dependencies: [
1188
+ { name: 'view:Project' },
1189
+ {
1190
+ name: 'view:Space',
1191
+ description: 'Discover apps shared in spaces',
1192
+ },
1193
+ {
1194
+ name: 'manage:Explore',
1195
+ description: 'Run apps that query data on the fly',
1196
+ },
1197
+ ],
806
1198
  getConditions: (context) => [
807
1199
  addUuidCondition(context, { inheritsFromOrgOrProject: true }),
808
1200
  addAccessCondition(context),
@@ -813,6 +1205,7 @@ const scopes = [
813
1205
  description: 'Create and manage data apps',
814
1206
  isEnterprise: false,
815
1207
  group: scopes_1.ScopeGroup.AI,
1208
+ dependencies: [{ name: 'view:Project' }],
816
1209
  getConditions: addDefaultUuidCondition,
817
1210
  },
818
1211
  {
@@ -820,6 +1213,13 @@ const scopes = [
820
1213
  description: 'Create, edit, and delete data apps in spaces where you have editor or admin access',
821
1214
  isEnterprise: false,
822
1215
  group: scopes_1.ScopeGroup.AI,
1216
+ dependencies: [
1217
+ { name: 'view:Project' },
1218
+ {
1219
+ name: 'create:DataApp',
1220
+ description: 'Create new apps in the space',
1221
+ },
1222
+ ],
823
1223
  getConditions: (context) => [
824
1224
  addAccessCondition(context, space_1.SpaceMemberRole.EDITOR),
825
1225
  addAccessCondition(context, space_1.SpaceMemberRole.ADMIN),
@@ -830,6 +1230,25 @@ const scopes = [
830
1230
  description: 'Create new data apps',
831
1231
  isEnterprise: false,
832
1232
  group: scopes_1.ScopeGroup.AI,
1233
+ dependencies: [
1234
+ { name: 'view:Project' },
1235
+ {
1236
+ name: 'manage:Explore',
1237
+ description: 'Preview and run apps that query data on the fly',
1238
+ },
1239
+ {
1240
+ name: 'view:DataApp',
1241
+ description: 'Duplicate apps created by others',
1242
+ },
1243
+ {
1244
+ name: 'view:ExternalConnection',
1245
+ description: 'Browse external connections while building',
1246
+ },
1247
+ {
1248
+ name: 'manage:DataApp@self',
1249
+ description: 'Open and iterate on the apps you generate',
1250
+ },
1251
+ ],
833
1252
  getConditions: addDefaultUuidCondition,
834
1253
  },
835
1254
  {
@@ -837,6 +1256,13 @@ const scopes = [
837
1256
  description: 'View own personal data apps',
838
1257
  isEnterprise: false,
839
1258
  group: scopes_1.ScopeGroup.AI,
1259
+ dependencies: [
1260
+ { name: 'view:Project' },
1261
+ {
1262
+ name: 'create:DataApp',
1263
+ description: 'Create your own apps to view',
1264
+ },
1265
+ ],
840
1266
  getConditions: (context) => [
841
1267
  {
842
1268
  ...addUuidCondition(context),
@@ -849,6 +1275,13 @@ const scopes = [
849
1275
  description: 'Edit and delete own personal data apps',
850
1276
  isEnterprise: false,
851
1277
  group: scopes_1.ScopeGroup.AI,
1278
+ dependencies: [
1279
+ { name: 'view:Project' },
1280
+ {
1281
+ name: 'create:DataApp',
1282
+ description: 'Create your own apps to manage',
1283
+ },
1284
+ ],
852
1285
  getConditions: (context) => [
853
1286
  {
854
1287
  ...addUuidCondition(context),
@@ -865,6 +1298,7 @@ const scopes = [
865
1298
  description: 'View external API connections to link them in data apps',
866
1299
  isEnterprise: true,
867
1300
  group: scopes_1.ScopeGroup.AI,
1301
+ dependencies: [{ name: 'view:Project' }],
868
1302
  getConditions: addDefaultUuidCondition,
869
1303
  },
870
1304
  {
@@ -872,6 +1306,7 @@ const scopes = [
872
1306
  description: 'Create, edit, and delete external API connections used by data apps',
873
1307
  isEnterprise: true,
874
1308
  group: scopes_1.ScopeGroup.AI,
1309
+ dependencies: [{ name: 'view:Project' }],
875
1310
  getConditions: addDefaultUuidCondition,
876
1311
  },
877
1312
  // Organization Design Assets (shared CSS/fonts/images/instructions
@@ -882,6 +1317,7 @@ const scopes = [
882
1317
  description: 'View organization design assets',
883
1318
  isEnterprise: false,
884
1319
  group: scopes_1.ScopeGroup.AI,
1320
+ dependencies: [],
885
1321
  level: 'organization',
886
1322
  getConditions: addDefaultUuidCondition,
887
1323
  },
@@ -890,6 +1326,7 @@ const scopes = [
890
1326
  description: 'Create, edit, and delete organization design assets',
891
1327
  isEnterprise: false,
892
1328
  group: scopes_1.ScopeGroup.AI,
1329
+ dependencies: [],
893
1330
  level: 'organization',
894
1331
  getConditions: addDefaultUuidCondition,
895
1332
  },
@@ -899,6 +1336,7 @@ const scopes = [
899
1336
  description: 'Configure spotlight table settings',
900
1337
  isEnterprise: true,
901
1338
  group: scopes_1.ScopeGroup.SPOTLIGHT,
1339
+ dependencies: [{ name: 'view:Project' }],
902
1340
  getConditions: addDefaultUuidCondition,
903
1341
  },
904
1342
  {
@@ -906,6 +1344,7 @@ const scopes = [
906
1344
  description: 'View spotlight table configuration',
907
1345
  isEnterprise: true,
908
1346
  group: scopes_1.ScopeGroup.SPOTLIGHT,
1347
+ dependencies: [{ name: 'view:Project' }],
909
1348
  getConditions: addDefaultUuidCondition,
910
1349
  },
911
1350
  {
@@ -913,6 +1352,7 @@ const scopes = [
913
1352
  description: 'View metrics tree',
914
1353
  isEnterprise: true,
915
1354
  group: scopes_1.ScopeGroup.SPOTLIGHT,
1355
+ dependencies: [{ name: 'view:Project' }],
916
1356
  getConditions: addDefaultUuidCondition,
917
1357
  },
918
1358
  {
@@ -920,6 +1360,7 @@ const scopes = [
920
1360
  description: 'Manage metrics tree configuration',
921
1361
  isEnterprise: true,
922
1362
  group: scopes_1.ScopeGroup.SPOTLIGHT,
1363
+ dependencies: [{ name: 'view:Project' }],
923
1364
  getConditions: addDefaultUuidCondition,
924
1365
  },
925
1366
  ];