@getcommunity/gc-validators 0.0.271-alpha.2 → 0.0.271-alpha.4

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 (112) hide show
  1. package/dist/abac-BeKQtxIF.cjs +648 -0
  2. package/dist/abac-DPd9oLKR.mjs +643 -0
  3. package/dist/base/index.d.mts +4 -4
  4. package/dist/components/shared/index.d.mts +1 -1
  5. package/dist/{document-D4fJt3zX.d.cts → document-AkydjorI.d.cts} +2 -6
  6. package/dist/{document-DdRo9TdG.d.mts → document-CIAPAAjK.d.mts} +18 -22
  7. package/dist/entities/audit-log/index.d.cts +2 -2
  8. package/dist/entities/audit-log/index.d.mts +3 -3
  9. package/dist/entities/blog-page/index.d.mts +1 -1
  10. package/dist/entities/blog-post/index.cjs +1 -1
  11. package/dist/entities/blog-post/index.d.mts +1 -1
  12. package/dist/entities/blog-post/index.mjs +1 -1
  13. package/dist/entities/careers-page/index.d.mts +1 -1
  14. package/dist/entities/category/index.cjs +1 -1
  15. package/dist/entities/category/index.d.mts +1 -1
  16. package/dist/entities/category/index.mjs +1 -1
  17. package/dist/entities/client/index.cjs +1 -1
  18. package/dist/entities/client/index.d.mts +1 -1
  19. package/dist/entities/client/index.mjs +1 -1
  20. package/dist/entities/client-content-pillar/index.cjs +2 -2
  21. package/dist/entities/client-content-pillar/index.d.mts +1 -1
  22. package/dist/entities/client-content-pillar/index.mjs +2 -2
  23. package/dist/entities/client-media-platform/index.d.mts +1 -1
  24. package/dist/entities/client-project/index.d.mts +1 -1
  25. package/dist/entities/client-report/index.d.mts +1 -1
  26. package/dist/entities/client-styleguide/index.d.mts +1 -1
  27. package/dist/entities/client-user/index.cjs +1 -1
  28. package/dist/entities/client-user/index.d.cts +1 -1
  29. package/dist/entities/client-user/index.d.mts +1 -1
  30. package/dist/entities/client-user/index.mjs +1 -1
  31. package/dist/entities/comment/index.d.cts +1 -1
  32. package/dist/entities/comment/index.d.mts +1 -1
  33. package/dist/entities/content-pillar/index.cjs +1 -1
  34. package/dist/entities/content-pillar/index.d.mts +1 -1
  35. package/dist/entities/content-pillar/index.mjs +1 -1
  36. package/dist/entities/faq-page/index.d.mts +1 -1
  37. package/dist/entities/formatter/index.d.cts +5 -5
  38. package/dist/entities/formatter/index.d.mts +5 -5
  39. package/dist/entities/gcflytour/index.d.mts +1 -1
  40. package/dist/entities/gcflytour-snap/index.d.mts +1 -1
  41. package/dist/entities/landing-page/index.d.mts +1 -1
  42. package/dist/entities/media-content-type/index.d.cts +2 -2
  43. package/dist/entities/media-content-type/index.d.mts +3 -3
  44. package/dist/entities/media-creative-format/index.d.cts +2 -2
  45. package/dist/entities/media-creative-format/index.d.mts +3 -3
  46. package/dist/entities/media-medium/index.d.cts +2 -2
  47. package/dist/entities/media-medium/index.d.mts +2 -2
  48. package/dist/entities/media-platform/index.d.cts +2 -2
  49. package/dist/entities/media-platform/index.d.mts +3 -3
  50. package/dist/entities/monday-workspace/index.d.cts +2 -2
  51. package/dist/entities/monday-workspace/index.d.mts +3 -3
  52. package/dist/entities/policy-page/index.d.mts +1 -1
  53. package/dist/entities/product/index.d.mts +1 -1
  54. package/dist/entities/team-member/index.cjs +1 -1
  55. package/dist/entities/team-member/index.d.cts +2 -2
  56. package/dist/entities/team-member/index.d.mts +2 -2
  57. package/dist/entities/team-member/index.mjs +1 -1
  58. package/dist/entities/team-page/index.d.mts +1 -1
  59. package/dist/entities/trend/index.cjs +1 -1
  60. package/dist/entities/trend/index.mjs +1 -1
  61. package/dist/entities/up-auth/index.d.mts +1 -1
  62. package/dist/entities/up-role/index.d.mts +2 -2
  63. package/dist/entities/up-user/index.d.cts +2 -2
  64. package/dist/entities/up-user/index.d.mts +3 -3
  65. package/dist/entities/url-redirect/index.d.cts +2 -2
  66. package/dist/entities/url-redirect/index.d.mts +2 -2
  67. package/dist/entities/user-account/index.d.mts +2 -2
  68. package/dist/entities/utm-tracking-link/index.d.cts +2 -2
  69. package/dist/entities/utm-tracking-link/index.d.mts +2 -2
  70. package/dist/{index-Bht1Jd5l.d.mts → index-BL9VfVD4.d.mts} +1 -1
  71. package/dist/{index-BLE_fX1Q.d.cts → index-Bwlq5D5d.d.mts} +3 -3
  72. package/dist/{index-DYPjS1qh.d.mts → index-D4Mm4D2d.d.cts} +3 -3
  73. package/dist/{index-BI8tN-QZ.d.mts → index-r0hGcq70.d.mts} +3 -3
  74. package/dist/permissions/index.cjs +3 -663
  75. package/dist/permissions/index.d.cts +2 -2
  76. package/dist/permissions/index.d.mts +2 -2
  77. package/dist/permissions/index.mjs +3 -661
  78. package/dist/utilities/index.cjs +20 -0
  79. package/dist/utilities/index.d.cts +8 -1
  80. package/dist/utilities/index.d.mts +9 -2
  81. package/dist/utilities/index.mjs +19 -1
  82. package/package.json +1 -1
  83. /package/dist/{constants-L2goO7Eg.mjs → constants-Htf-MeCA.mjs} +0 -0
  84. /package/dist/{constants-PBZKggHL.cjs → constants-f1GP2eiq.cjs} +0 -0
  85. /package/dist/{document-DsIPBTG8.cjs → document-2o5WNt6V.cjs} +0 -0
  86. /package/dist/{document-D5yDIDIx.d.mts → document-6ONY7xJm.d.mts} +0 -0
  87. /package/dist/{document-Gx2Vrg_w.d.mts → document-B0j6d1nH.d.mts} +0 -0
  88. /package/dist/{document-Ccszj8lR.cjs → document-BVPXeweR.cjs} +0 -0
  89. /package/dist/{document-WHS8GHY5.d.mts → document-Bh0a7Y8h.d.mts} +0 -0
  90. /package/dist/{document-Cu_HUDC5.mjs → document-Bpgteig6.mjs} +0 -0
  91. /package/dist/{document-CTTDXzOF.mjs → document-C21JZnEl.mjs} +0 -0
  92. /package/dist/{document-CUl_Ys6-.mjs → document-COaupB1r.mjs} +0 -0
  93. /package/dist/{document-Bd2AyLs8.d.mts → document-CQ9bUL-1.d.mts} +0 -0
  94. /package/dist/{document-rbMXLGxt.cjs → document-Coz4Rm8I.cjs} +0 -0
  95. /package/dist/{document-si7GYS5g.d.mts → document-CsGd8QmZ.d.mts} +0 -0
  96. /package/dist/{document-Bpr9mbCs.d.mts → document-D7nCeVSn.d.mts} +0 -0
  97. /package/dist/{document-C0c7azOe.d.mts → document-DAnzPqTm.d.mts} +0 -0
  98. /package/dist/{document-B_pJW777.d.mts → document-DCIBlMpe.d.mts} +0 -0
  99. /package/dist/{document-DYzRVV1C.d.mts → document-DCtr8pVh.d.mts} +0 -0
  100. /package/dist/{document-Bo869pZx.d.mts → document-DSUxqMD4.d.mts} +0 -0
  101. /package/dist/{document-vq-7rcU5.d.mts → document-Db-z1nIm.d.mts} +0 -0
  102. /package/dist/{document-DsSaMVGb.cjs → document-DgG9DIT2.cjs} +0 -0
  103. /package/dist/{document-DeoRGh7p.d.mts → document-DgQnMgCD.d.mts} +0 -0
  104. /package/dist/{document-BFukanLe.mjs → document-DiOskbh3.mjs} +0 -0
  105. /package/dist/{document-D2nLVGig.d.mts → document-DmZ3XRi8.d.mts} +0 -0
  106. /package/dist/{document-BAzLIprH.d.mts → document-TK2UUOF9.d.mts} +0 -0
  107. /package/dist/{document-BNoXPGwF.d.mts → document-W-NILXQV.d.mts} +0 -0
  108. /package/dist/{document-DMHIUE3J.d.mts → document-gwpNlSBm.d.mts} +0 -0
  109. /package/dist/{fields-qx-5saY5.d.mts → fields-DUuJ_1V0.d.mts} +0 -0
  110. /package/dist/{json-CqAaKeHA.d.mts → json-CiA5ZRzc.d.mts} +0 -0
  111. /package/dist/{query.schema-BOn5Kk_p.d.mts → query.schema-oOG7BmVm.d.mts} +0 -0
  112. /package/dist/{response-C-7nyNVD.d.mts → response-I41vWpVZ.d.mts} +0 -0
@@ -0,0 +1,643 @@
1
+ //#region src/permissions/abac.ts
2
+ const ROLE_PERMISSIONS = {
3
+ authenticated: {
4
+ "user-account": {
5
+ list: false,
6
+ create: false,
7
+ read: false,
8
+ update: false,
9
+ delete: false
10
+ },
11
+ comment: {
12
+ list: true,
13
+ create: true,
14
+ update: (u, p, d) => u.id === Number(d?.author?.id),
15
+ delete: (u, p, d) => u.id === Number(d?.author?.id),
16
+ report: true
17
+ },
18
+ client: {
19
+ access: false,
20
+ billing: false,
21
+ owner: false,
22
+ manager: false,
23
+ admin: false,
24
+ list: false,
25
+ create: false,
26
+ read: false,
27
+ update: false,
28
+ delete: false
29
+ },
30
+ "client-user": {
31
+ list: false,
32
+ create: false,
33
+ read: false,
34
+ update: false,
35
+ delete: false
36
+ },
37
+ "client-content-pillar": {
38
+ list: false,
39
+ create: false,
40
+ read: false,
41
+ update: false,
42
+ delete: false
43
+ },
44
+ "client-media-platform": {
45
+ list: false,
46
+ create: false,
47
+ read: false,
48
+ update: false,
49
+ delete: false
50
+ },
51
+ "client-project": {
52
+ list: false,
53
+ create: false,
54
+ read: false,
55
+ update: false,
56
+ delete: false,
57
+ assign: false
58
+ },
59
+ "client-report": {
60
+ list: false,
61
+ create: false,
62
+ read: false,
63
+ update: false,
64
+ delete: false
65
+ },
66
+ "client-styleguide": {
67
+ list: false,
68
+ create: false,
69
+ read: false,
70
+ update: false,
71
+ delete: false
72
+ },
73
+ "content-pillar": {
74
+ list: false,
75
+ create: false,
76
+ read: false,
77
+ update: false,
78
+ delete: false
79
+ },
80
+ "media-platform": {
81
+ list: false,
82
+ create: false,
83
+ read: false,
84
+ update: false,
85
+ delete: false
86
+ },
87
+ "media-content-type": {
88
+ list: false,
89
+ create: false,
90
+ read: false,
91
+ update: false,
92
+ delete: false
93
+ },
94
+ "media-creative-format": {
95
+ list: false,
96
+ create: false,
97
+ read: false,
98
+ update: false,
99
+ delete: false
100
+ },
101
+ "monday-workspace": {
102
+ list: false,
103
+ create: false,
104
+ read: false,
105
+ update: false,
106
+ delete: false
107
+ },
108
+ "utm-tracking-link": {
109
+ list: false,
110
+ create: false,
111
+ read: false,
112
+ update: false,
113
+ delete: false
114
+ },
115
+ gcflytour: {
116
+ list: true,
117
+ create: false,
118
+ read: true,
119
+ update: false,
120
+ delete: false
121
+ },
122
+ "gcflytour-snap": {
123
+ list: true,
124
+ create: false,
125
+ read: true,
126
+ update: false,
127
+ delete: false
128
+ }
129
+ },
130
+ public: {
131
+ "user-account": {
132
+ list: false,
133
+ create: false,
134
+ read: false,
135
+ update: false,
136
+ delete: false
137
+ },
138
+ comment: {
139
+ list: true,
140
+ create: false,
141
+ update: false,
142
+ delete: false,
143
+ report: false
144
+ },
145
+ client: {
146
+ access: false,
147
+ billing: false,
148
+ owner: false,
149
+ manager: false,
150
+ admin: false,
151
+ list: false,
152
+ create: false,
153
+ read: false,
154
+ update: false,
155
+ delete: false
156
+ },
157
+ "client-user": {
158
+ list: false,
159
+ create: false,
160
+ read: false,
161
+ update: false,
162
+ delete: false
163
+ },
164
+ "client-content-pillar": {
165
+ list: false,
166
+ create: false,
167
+ read: false,
168
+ update: false,
169
+ delete: false
170
+ },
171
+ "client-media-platform": {
172
+ list: false,
173
+ create: false,
174
+ read: false,
175
+ update: false,
176
+ delete: false
177
+ },
178
+ "client-project": {
179
+ list: false,
180
+ create: false,
181
+ read: false,
182
+ update: false,
183
+ delete: false,
184
+ assign: false
185
+ },
186
+ "client-report": {
187
+ list: false,
188
+ create: false,
189
+ read: false,
190
+ update: false,
191
+ delete: false
192
+ },
193
+ "client-styleguide": {
194
+ list: false,
195
+ create: false,
196
+ read: false,
197
+ update: false,
198
+ delete: false
199
+ },
200
+ "content-pillar": {
201
+ list: false,
202
+ create: false,
203
+ read: false,
204
+ update: false,
205
+ delete: false
206
+ },
207
+ "media-platform": {
208
+ list: false,
209
+ create: false,
210
+ read: false,
211
+ update: false,
212
+ delete: false
213
+ },
214
+ "media-content-type": {
215
+ list: false,
216
+ create: false,
217
+ read: false,
218
+ update: false,
219
+ delete: false
220
+ },
221
+ "media-creative-format": {
222
+ list: false,
223
+ create: false,
224
+ read: false,
225
+ update: false,
226
+ delete: false
227
+ },
228
+ "monday-workspace": {
229
+ list: false,
230
+ create: false,
231
+ read: false,
232
+ update: false,
233
+ delete: false
234
+ },
235
+ "utm-tracking-link": {
236
+ list: false,
237
+ create: false,
238
+ read: false,
239
+ update: false,
240
+ delete: false
241
+ },
242
+ gcflytour: {
243
+ list: true,
244
+ create: false,
245
+ read: true,
246
+ update: false,
247
+ delete: false
248
+ },
249
+ "gcflytour-snap": {
250
+ list: true,
251
+ create: false,
252
+ read: true,
253
+ update: false,
254
+ delete: false
255
+ }
256
+ },
257
+ employee: {
258
+ "user-account": {
259
+ list: true,
260
+ create: false,
261
+ read: true,
262
+ update: (u, p, d) => u.account.documentId === d?.documentId,
263
+ delete: false
264
+ },
265
+ comment: {
266
+ list: true,
267
+ create: true,
268
+ update: (u, p, d) => u.id === Number(d?.author?.id),
269
+ delete: (u, p, d) => u.id === Number(d?.author?.id),
270
+ report: true
271
+ },
272
+ client: {
273
+ access: (u, p, d) => p.scopes.includes("client:access"),
274
+ billing: (u, p, d) => p.scopes.includes("client:billing"),
275
+ owner: (u, p, d) => p.scopes.includes("client:owner"),
276
+ manager: (u, p, d) => p.scopes.includes("client:manager"),
277
+ admin: (u, p, d) => p.scopes.includes("client:admin"),
278
+ list: (u, p, d) => p.scopes.includes("client:access"),
279
+ create: false,
280
+ read: (u, p, d) => p.scopes.includes("client:access"),
281
+ update: (u, p, d) => p.scopes.includes("client:manager"),
282
+ delete: false
283
+ },
284
+ "client-user": {
285
+ list: true,
286
+ create: false,
287
+ read: true,
288
+ update: false,
289
+ delete: false,
290
+ verify: true
291
+ },
292
+ "client-content-pillar": {
293
+ list: (u, p, d) => p.scopes.includes("client-content-pillar:list"),
294
+ create: (u, p) => p.scopes.includes("client-content-pillar:create"),
295
+ read: (u, p, d) => p.scopes.includes("client-content-pillar:read"),
296
+ update: (u, p, d) => p.scopes.includes("client-content-pillar:update"),
297
+ delete: false
298
+ },
299
+ "client-media-platform": {
300
+ list: (u, p, d) => p.scopes.includes("client-media-platform:list"),
301
+ create: (u, p) => p.scopes.includes("client-media-platform:create"),
302
+ read: (u, p, d) => p.scopes.includes("client-media-platform:read"),
303
+ update: (u, p, d) => p.scopes.includes("client-media-platform:update"),
304
+ delete: false
305
+ },
306
+ "client-project": {
307
+ list: (u, p, d) => p.scopes.includes("client-project:list"),
308
+ create: (u, p) => p.scopes.includes("client-project:create"),
309
+ read: (u, p, d) => p.scopes.includes("client-project:read"),
310
+ update: (u, p, d) => p.scopes.includes("client-project:update"),
311
+ delete: false,
312
+ assign: (u, p, d) => p.scopes.includes("client-project:assign")
313
+ },
314
+ "client-report": {
315
+ list: (u, p, d) => p.scopes.includes("client-report:list"),
316
+ create: (u, p) => p.scopes.includes("client-report:create"),
317
+ read: (u, p, d) => p.scopes.includes("client-report:read"),
318
+ update: (u, p, d) => p.scopes.includes("client-report:update"),
319
+ delete: false
320
+ },
321
+ "client-styleguide": {
322
+ list: (u, p, d) => p.scopes.includes("client-styleguide:list"),
323
+ create: false,
324
+ read: (u, p, d) => p.scopes.includes("client-styleguide:read"),
325
+ update: false,
326
+ delete: false
327
+ },
328
+ "content-pillar": {
329
+ list: true,
330
+ create: false,
331
+ read: true,
332
+ update: false,
333
+ delete: false
334
+ },
335
+ "media-platform": {
336
+ list: true,
337
+ create: false,
338
+ read: true,
339
+ update: false,
340
+ delete: false
341
+ },
342
+ "media-content-type": {
343
+ list: true,
344
+ create: false,
345
+ read: true,
346
+ update: false,
347
+ delete: false
348
+ },
349
+ "media-creative-format": {
350
+ list: true,
351
+ create: false,
352
+ read: true,
353
+ update: false,
354
+ delete: false
355
+ },
356
+ "monday-workspace": {
357
+ list: (u, p, d) => p.scopes.includes("monday-workspace:list"),
358
+ create: (u, p) => p.scopes.includes("monday-workspace:create"),
359
+ read: (u, p, d) => p.scopes.includes("monday-workspace:read"),
360
+ update: (u, p, d) => p.scopes.includes("monday-workspace:update"),
361
+ delete: (u, p, d) => p.scopes.includes("monday-workspace:delete")
362
+ },
363
+ "utm-tracking-link": {
364
+ list: (u, p, d) => p.scopes.includes("utm-tracking-link:list"),
365
+ create: (u, p) => p.scopes.includes("utm-tracking-link:create"),
366
+ read: (u, p, d) => d?.creator?.documentId === u.documentId || p.scopes.includes("utm-tracking-link:read"),
367
+ update: (u, p, d) => d?.creator?.documentId === u.documentId || p.scopes.includes("utm-tracking-link:update"),
368
+ delete: (u, p, d) => d?.creator?.documentId === u.documentId || p.scopes.includes("utm-tracking-link:delete")
369
+ },
370
+ gcflytour: {
371
+ list: true,
372
+ create: (u, p) => p.scopes.includes("gcflytour:create"),
373
+ read: true,
374
+ update: (u, p, d) => p.scopes.includes("gcflytour:update"),
375
+ delete: (u, p, d) => p.scopes.includes("gcflytour:delete")
376
+ },
377
+ "gcflytour-snap": {
378
+ list: true,
379
+ create: (u, p) => p.scopes.includes("gcflytour-snap:create"),
380
+ read: true,
381
+ update: (u, p, d) => p.scopes.includes("gcflytour-snap:update"),
382
+ delete: (u, p, d) => p.scopes.includes("gcflytour-snap:delete")
383
+ }
384
+ },
385
+ manager: {
386
+ "user-account": {
387
+ list: true,
388
+ create: false,
389
+ read: true,
390
+ update: (u, p, d) => u.account.documentId === d?.documentId,
391
+ delete: false
392
+ },
393
+ comment: {
394
+ list: true,
395
+ create: true,
396
+ update: (u, p, d) => u.id === Number(d?.author?.id),
397
+ delete: (u, p, d) => u.id === Number(d?.author?.id),
398
+ report: true
399
+ },
400
+ client: {
401
+ access: true,
402
+ billing: true,
403
+ owner: true,
404
+ manager: true,
405
+ admin: true,
406
+ list: true,
407
+ create: true,
408
+ read: true,
409
+ update: true,
410
+ delete: false
411
+ },
412
+ "client-user": {
413
+ list: true,
414
+ create: true,
415
+ read: true,
416
+ update: true,
417
+ delete: true,
418
+ verify: true
419
+ },
420
+ "client-content-pillar": {
421
+ list: true,
422
+ create: true,
423
+ read: true,
424
+ update: true,
425
+ delete: true
426
+ },
427
+ "client-media-platform": {
428
+ list: true,
429
+ create: true,
430
+ read: true,
431
+ update: true,
432
+ delete: true
433
+ },
434
+ "client-project": {
435
+ list: true,
436
+ create: true,
437
+ read: true,
438
+ update: true,
439
+ delete: true,
440
+ assign: true
441
+ },
442
+ "client-report": {
443
+ list: true,
444
+ create: true,
445
+ read: true,
446
+ update: true,
447
+ delete: true
448
+ },
449
+ "client-styleguide": {
450
+ list: true,
451
+ create: true,
452
+ read: true,
453
+ update: true,
454
+ delete: true
455
+ },
456
+ "content-pillar": {
457
+ list: true,
458
+ create: true,
459
+ read: true,
460
+ update: true,
461
+ delete: true
462
+ },
463
+ "media-platform": {
464
+ list: true,
465
+ create: true,
466
+ read: true,
467
+ update: true,
468
+ delete: true
469
+ },
470
+ "media-content-type": {
471
+ list: true,
472
+ create: true,
473
+ read: true,
474
+ update: true,
475
+ delete: true
476
+ },
477
+ "media-creative-format": {
478
+ list: true,
479
+ create: true,
480
+ read: true,
481
+ update: true,
482
+ delete: true
483
+ },
484
+ "monday-workspace": {
485
+ list: true,
486
+ create: true,
487
+ read: true,
488
+ update: true,
489
+ delete: true
490
+ },
491
+ "utm-tracking-link": {
492
+ list: true,
493
+ create: true,
494
+ read: true,
495
+ update: true,
496
+ delete: true
497
+ },
498
+ gcflytour: {
499
+ list: true,
500
+ create: true,
501
+ read: true,
502
+ update: true,
503
+ delete: true
504
+ },
505
+ "gcflytour-snap": {
506
+ list: true,
507
+ create: true,
508
+ read: true,
509
+ update: true,
510
+ delete: true
511
+ }
512
+ },
513
+ client: {
514
+ "user-account": {
515
+ list: true,
516
+ create: false,
517
+ read: true,
518
+ update: (u, p, d) => u.account.documentId === d?.documentId,
519
+ delete: false
520
+ },
521
+ comment: {
522
+ list: true,
523
+ create: true,
524
+ update: (u, p, d) => u.id === Number(d?.author?.id),
525
+ delete: (u, p, d) => u.id === Number(d?.author?.id),
526
+ report: true
527
+ },
528
+ client: {
529
+ access: (u, p, d) => p.scopes.includes("client:access"),
530
+ billing: (u, p, d) => p.scopes.includes("client:billing"),
531
+ owner: (u, p, d) => p.scopes.includes("client:owner"),
532
+ manager: (u, p, d) => p.scopes.includes("client:manager"),
533
+ admin: (u, p, d) => p.scopes.includes("client:admin"),
534
+ list: (u, p, d) => p.scopes.includes("client:access"),
535
+ create: false,
536
+ read: (u, p, d) => p.scopes.includes("client:access"),
537
+ update: (u, p, d) => p.scopes.includes("client:manager"),
538
+ delete: false
539
+ },
540
+ "client-user": {
541
+ list: true,
542
+ create: false,
543
+ read: true,
544
+ update: false,
545
+ delete: false,
546
+ verify: true
547
+ },
548
+ "client-content-pillar": {
549
+ list: (u, p, d) => p.scopes.includes("client-content-pillar:list"),
550
+ create: (u, p) => p.scopes.includes("client-content-pillar:create"),
551
+ read: (u, p, d) => p.scopes.includes("client-content-pillar:read"),
552
+ update: (u, p, d) => p.scopes.includes("client-content-pillar:update"),
553
+ delete: false
554
+ },
555
+ "client-media-platform": {
556
+ list: (u, p, d) => p.scopes.includes("client-media-platform:list"),
557
+ create: (u, p) => p.scopes.includes("client-media-platform:create"),
558
+ read: (u, p, d) => p.scopes.includes("client-media-platform:read"),
559
+ update: (u, p, d) => p.scopes.includes("client-media-platform:update"),
560
+ delete: false
561
+ },
562
+ "client-project": {
563
+ list: (u, p, d) => p.scopes.includes("client-project:list"),
564
+ create: (u, p) => p.scopes.includes("client-project:create"),
565
+ read: (u, p, d) => p.scopes.includes("client-project:read"),
566
+ update: (u, p, d) => p.scopes.includes("client-project:update"),
567
+ delete: false,
568
+ assign: (u, p, d) => p.scopes.includes("client-project:assign")
569
+ },
570
+ "client-report": {
571
+ list: (u, p, d) => p.scopes.includes("client-report:list"),
572
+ create: (u, p) => p.scopes.includes("client-report:create"),
573
+ read: (u, p, d) => p.scopes.includes("client-report:read"),
574
+ update: (u, p, d) => p.scopes.includes("client-report:update"),
575
+ delete: false
576
+ },
577
+ "client-styleguide": {
578
+ list: (u, p, d) => p.scopes.includes("client-styleguide:list"),
579
+ create: false,
580
+ read: (u, p, d) => p.scopes.includes("client-styleguide:read"),
581
+ update: false,
582
+ delete: false
583
+ },
584
+ "content-pillar": {
585
+ list: true,
586
+ create: false,
587
+ read: true,
588
+ update: false,
589
+ delete: false
590
+ },
591
+ "media-platform": {
592
+ list: true,
593
+ create: false,
594
+ read: true,
595
+ update: false,
596
+ delete: false
597
+ },
598
+ "media-content-type": {
599
+ list: true,
600
+ create: false,
601
+ read: true,
602
+ update: false,
603
+ delete: false
604
+ },
605
+ "media-creative-format": {
606
+ list: true,
607
+ create: false,
608
+ read: true,
609
+ update: false,
610
+ delete: false
611
+ },
612
+ "monday-workspace": {
613
+ list: (u, p, d) => p.scopes.includes("monday-workspace:list"),
614
+ create: false,
615
+ read: (u, p, d) => p.scopes.includes("monday-workspace:read"),
616
+ update: false,
617
+ delete: false
618
+ },
619
+ "utm-tracking-link": {
620
+ list: (u, p, d) => p.scopes.includes("utm-tracking-link:list"),
621
+ create: (u, p) => p.scopes.includes("utm-tracking-link:create"),
622
+ read: (u, p, d) => d?.creator?.documentId === u.documentId || p.scopes.includes("utm-tracking-link:read"),
623
+ update: (u, p, d) => d?.creator?.documentId === u.documentId || p.scopes.includes("utm-tracking-link:update"),
624
+ delete: (u, p, d) => d?.creator?.documentId === u.documentId || p.scopes.includes("utm-tracking-link:delete")
625
+ },
626
+ gcflytour: {
627
+ list: true,
628
+ create: false,
629
+ read: true,
630
+ update: false,
631
+ delete: false
632
+ },
633
+ "gcflytour-snap": {
634
+ list: true,
635
+ create: false,
636
+ read: true,
637
+ update: false,
638
+ delete: false
639
+ }
640
+ }
641
+ };
642
+ //#endregion
643
+ export { ROLE_PERMISSIONS as t };
@@ -1,5 +1,5 @@
1
- import { $ as MediaFormat, A as StrapiBgColorOptions, B as ValidStrapiSingleEntity, C as STRAPI_DIRECTION, D as STRAPI_LINK_TYPE, E as STRAPI_ICON_POSITION, F as StrapiLinkType, G as SAssociateEntityPositionDocumentRequest, H as ENTITY_SORT_KEYS, I as StrapiTextColorOptions, J as SAssociateOneEntity, K as SAssociateEntityRelationshipRequest, L as StrapiThemeOptions, M as StrapiGapSizes, N as StrapiIconName, O as STRAPI_TEXT_COLOR_OPTIONS, P as StrapiIconPosition, Q as QueryStrapiPaginated, R as ContentStatus, S as STRAPI_BG_COLOR_OPTIONS, St as BaseComponentId, T as STRAPI_ICON_NAME, U as QuerySortEntities, V as ValidStrapiSpecialEntity, W as SAssociateEntityPosition, X as SQueryManyEntities, Y as SEntityPosition, Z as SSetEntityRelationshipRequest, _ as VStringSlug, _t as WebSafeFontMono, a as VString, at as StrapiLinkReferrerPolicy, b as VStringUrlNullable, bt as BaseDocument, c as VStringLongNullable, ct as FormSelectInputOption, d as VStringMinMax, dt as WEBSAFE_FONT_DISPLAY, et as MediaFormats, f as VStringMinMaxRegex, ft as WEBSAFE_FONT_MONO, g as VStringShortNullable, gt as WebSafeFontDisplay, h as VStringShort, ht as WebSafeFont, i as VSize, it as STRAPI_LINK_TARGET, j as StrapiDirection, k as STRAPI_THEME_OPTIONS, l as VStringMax, lt as FONT_HEADER_SIZE, m as VStringPhoneNullable, mt as WEBSAFE_FONT_SERIF, n as VNumberNullable, nt as STRAPI_LINK_REFERRER_POLICY, o as VStringEmail, ot as StrapiLinkRel, p as VStringPhone, pt as WEBSAFE_FONT_SANS, q as SAssociateManyEntities, r as VPage, rt as STRAPI_LINK_REL, s as VStringLong, st as StrapiLinkTarget, t as VIntegerNullable, tt as MediaUploadDocument, u as VStringMaxRegex, ut as FontHeaderSize, v as VStringUrl, vt as WebSafeFontSans, w as STRAPI_GAP_SIZES, x as VStringUrlUtm, xt as BaseComponent, y as VStringUrlNoUtm, yt as WebSafeFontSerif, z as ValidStrapiCollectionEntity } from "../index-Bht1Jd5l.mjs";
2
- import { n as JsonSchema, t as JsonData } from "../json-CqAaKeHA.mjs";
3
- import { a as QueryStrapiByPhone, i as QueryStrapiByName, n as QueryStrapiByEmail, o as QueryStrapiBySlug, r as QueryStrapiById, t as QueryStrapiByDocumentId } from "../query.schema-BOn5Kk_p.mjs";
4
- import { a as StrapiErrorResponse, c as StrapiPagination, d as StrapiSingleResponse, i as StrapiErrorDetail, l as StrapiResponseMeta, n as StrapiAttributeErrorKey, o as StrapiErrorResult, r as StrapiAttributeErrorResponse, s as StrapiListResponse, t as StrapiAttributeErrorDetail, u as StrapiResponseMetaWithPagination } from "../response-C-7nyNVD.mjs";
1
+ import { $ as MediaFormat, A as StrapiBgColorOptions, B as ValidStrapiSingleEntity, C as STRAPI_DIRECTION, D as STRAPI_LINK_TYPE, E as STRAPI_ICON_POSITION, F as StrapiLinkType, G as SAssociateEntityPositionDocumentRequest, H as ENTITY_SORT_KEYS, I as StrapiTextColorOptions, J as SAssociateOneEntity, K as SAssociateEntityRelationshipRequest, L as StrapiThemeOptions, M as StrapiGapSizes, N as StrapiIconName, O as STRAPI_TEXT_COLOR_OPTIONS, P as StrapiIconPosition, Q as QueryStrapiPaginated, R as ContentStatus, S as STRAPI_BG_COLOR_OPTIONS, St as BaseComponentId, T as STRAPI_ICON_NAME, U as QuerySortEntities, V as ValidStrapiSpecialEntity, W as SAssociateEntityPosition, X as SQueryManyEntities, Y as SEntityPosition, Z as SSetEntityRelationshipRequest, _ as VStringSlug, _t as WebSafeFontMono, a as VString, at as StrapiLinkReferrerPolicy, b as VStringUrlNullable, bt as BaseDocument, c as VStringLongNullable, ct as FormSelectInputOption, d as VStringMinMax, dt as WEBSAFE_FONT_DISPLAY, et as MediaFormats, f as VStringMinMaxRegex, ft as WEBSAFE_FONT_MONO, g as VStringShortNullable, gt as WebSafeFontDisplay, h as VStringShort, ht as WebSafeFont, i as VSize, it as STRAPI_LINK_TARGET, j as StrapiDirection, k as STRAPI_THEME_OPTIONS, l as VStringMax, lt as FONT_HEADER_SIZE, m as VStringPhoneNullable, mt as WEBSAFE_FONT_SERIF, n as VNumberNullable, nt as STRAPI_LINK_REFERRER_POLICY, o as VStringEmail, ot as StrapiLinkRel, p as VStringPhone, pt as WEBSAFE_FONT_SANS, q as SAssociateManyEntities, r as VPage, rt as STRAPI_LINK_REL, s as VStringLong, st as StrapiLinkTarget, t as VIntegerNullable, tt as MediaUploadDocument, u as VStringMaxRegex, ut as FontHeaderSize, v as VStringUrl, vt as WebSafeFontSans, w as STRAPI_GAP_SIZES, x as VStringUrlUtm, xt as BaseComponent, y as VStringUrlNoUtm, yt as WebSafeFontSerif, z as ValidStrapiCollectionEntity } from "../index-BL9VfVD4.mjs";
2
+ import { n as JsonSchema, t as JsonData } from "../json-CiA5ZRzc.mjs";
3
+ import { a as QueryStrapiByPhone, i as QueryStrapiByName, n as QueryStrapiByEmail, o as QueryStrapiBySlug, r as QueryStrapiById, t as QueryStrapiByDocumentId } from "../query.schema-oOG7BmVm.mjs";
4
+ import { a as StrapiErrorResponse, c as StrapiPagination, d as StrapiSingleResponse, i as StrapiErrorDetail, l as StrapiResponseMeta, n as StrapiAttributeErrorKey, o as StrapiErrorResult, r as StrapiAttributeErrorResponse, s as StrapiListResponse, t as StrapiAttributeErrorDetail, u as StrapiResponseMetaWithPagination } from "../response-I41vWpVZ.mjs";
5
5
  export { BaseComponent, BaseComponentId, BaseDocument, ContentStatus, ENTITY_SORT_KEYS, FONT_HEADER_SIZE, FontHeaderSize, FormSelectInputOption, JsonData, JsonSchema, MediaFormat, MediaFormats, MediaUploadDocument, QuerySortEntities, QueryStrapiByDocumentId, QueryStrapiByEmail, QueryStrapiById, QueryStrapiByName, QueryStrapiByPhone, QueryStrapiBySlug, QueryStrapiPaginated, SAssociateEntityPosition, SAssociateEntityPositionDocumentRequest, SAssociateEntityRelationshipRequest, SAssociateManyEntities, SAssociateOneEntity, SEntityPosition, SQueryManyEntities, SSetEntityRelationshipRequest, STRAPI_BG_COLOR_OPTIONS, STRAPI_DIRECTION, STRAPI_GAP_SIZES, STRAPI_ICON_NAME, STRAPI_ICON_POSITION, STRAPI_LINK_REFERRER_POLICY, STRAPI_LINK_REL, STRAPI_LINK_TARGET, STRAPI_LINK_TYPE, STRAPI_TEXT_COLOR_OPTIONS, STRAPI_THEME_OPTIONS, StrapiAttributeErrorDetail, StrapiAttributeErrorKey, StrapiAttributeErrorResponse, StrapiBgColorOptions, StrapiDirection, StrapiErrorDetail, StrapiErrorResponse, StrapiErrorResult, StrapiGapSizes, StrapiIconName, StrapiIconPosition, StrapiLinkReferrerPolicy, StrapiLinkRel, StrapiLinkTarget, StrapiLinkType, StrapiListResponse, StrapiPagination, StrapiResponseMeta, StrapiResponseMetaWithPagination, StrapiSingleResponse, StrapiTextColorOptions, StrapiThemeOptions, VIntegerNullable, VNumberNullable, VPage, VSize, VString, VStringEmail, VStringLong, VStringLongNullable, VStringMax, VStringMaxRegex, VStringMinMax, VStringMinMaxRegex, VStringPhone, VStringPhoneNullable, VStringShort, VStringShortNullable, VStringSlug, VStringUrl, VStringUrlNoUtm, VStringUrlNullable, VStringUrlUtm, ValidStrapiCollectionEntity, ValidStrapiSingleEntity, ValidStrapiSpecialEntity, WEBSAFE_FONT_DISPLAY, WEBSAFE_FONT_MONO, WEBSAFE_FONT_SANS, WEBSAFE_FONT_SERIF, WebSafeFont, WebSafeFontDisplay, WebSafeFontMono, WebSafeFontSans, WebSafeFontSerif };
@@ -1,4 +1,4 @@
1
- import { t as JsonData } from "../../json-CqAaKeHA.mjs";
1
+ import { t as JsonData } from "../../json-CiA5ZRzc.mjs";
2
2
  import * as v from "valibot";
3
3
 
4
4
  //#region src/components/shared/button.d.ts
@@ -5,7 +5,7 @@ import { t as ClientReportDocument } from "./document-D73dqRle.cjs";
5
5
  import { t as ClientStyleguideDocument } from "./document-DN3g0EFx.cjs";
6
6
  import { t as AuthorizedUserDocument } from "./index-DpYYzY_9.cjs";
7
7
  import { t as UserAccountDocument } from "./document-IIJpsOIO.cjs";
8
- import { c as CommentAuthor, d as CommentThread, f as CommentApprovalStatus, l as CommentDocument } from "./index-BLE_fX1Q.cjs";
8
+ import { c as CommentAuthor, d as CommentThread, f as CommentApprovalStatus, l as CommentDocument } from "./index-D4Mm4D2d.cjs";
9
9
  import { t as ClientDocument } from "./document-D-KvyEb5.cjs";
10
10
  import { t as ContentPillarDocument } from "./document-CjNHI7Eb.cjs";
11
11
  import { t as GCFlyTourSnapDocument } from "./document-D_ZMbzn6.cjs";
@@ -12192,10 +12192,6 @@ type Permissions = {
12192
12192
  };
12193
12193
  };
12194
12194
  //#endregion
12195
- //#region src/permissions/utilities.d.ts
12196
- declare function hasPermission<Resource extends keyof Permissions>(user: AuthorizedUserDocument | null, permissions: ClientUserDocumentStatus, resource: Resource, action: Permissions[Resource]["action"], data?: Permissions[Resource]["dataType"]): boolean;
12197
- declare function canAssignPermission<Resource extends keyof Permissions>(userRole: RoleType, resource: Resource, action: Permissions[Resource]["action"]): boolean;
12198
- //#endregion
12199
12195
  //#region src/entities/client-user/document.d.ts
12200
12196
  declare const ClientUserDocument: v.ObjectSchema<{
12201
12197
  readonly scopes: v.ArraySchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.PicklistSchema<ClientEntityScope[], undefined>]>, "Please provide a valid list of scopes.">, v.MaxLengthAction<ClientEntityScope[], number, "You cannot provide more scopes than there are available.">]>, undefined>;
@@ -12220,4 +12216,4 @@ declare const ClientUserDocumentStatus: v.ObjectSchema<{
12220
12216
  }, undefined>;
12221
12217
  type ClientUserDocumentStatus = v.InferOutput<typeof ClientUserDocumentStatus>;
12222
12218
  //#endregion
12223
- export { LCRUDActions as a, ROLE_PERMISSIONS as c, CLIENT_ENTITY_SCOPES as d, ClientEntityActions as f, hasPermission as i, CLIENT_ENTITY_KEYS as l, ClientEntityScope as m, ClientUserDocumentStatus as n, Permissions as o, ClientEntityKey as p, canAssignPermission as r, RolesWithPermissions as s, ClientUserDocument as t, CLIENT_ENTITY_PERMISSIONS as u };
12219
+ export { RolesWithPermissions as a, CLIENT_ENTITY_PERMISSIONS as c, ClientEntityKey as d, ClientEntityScope as f, Permissions as i, CLIENT_ENTITY_SCOPES as l, ClientUserDocumentStatus as n, ROLE_PERMISSIONS as o, LCRUDActions as r, CLIENT_ENTITY_KEYS as s, ClientUserDocument as t, ClientEntityActions as u };