@tachybase/module-acl 0.23.8

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 (75) hide show
  1. package/.turbo/turbo-build.log +14 -0
  2. package/LICENSE +201 -0
  3. package/README.md +11 -0
  4. package/README.zh-CN.md +11 -0
  5. package/client.d.ts +2 -0
  6. package/client.js +1 -0
  7. package/dist/client/NewRole.d.ts +2 -0
  8. package/dist/client/RolesManagement.d.ts +2 -0
  9. package/dist/client/RolesManagerProvider.d.ts +4 -0
  10. package/dist/client/RolesMenu.d.ts +7 -0
  11. package/dist/client/hooks/load-more-observer.d.ts +7 -0
  12. package/dist/client/index.d.ts +8 -0
  13. package/dist/client/index.js +9 -0
  14. package/dist/client/locale.d.ts +1 -0
  15. package/dist/client/permissions/ActionPermissions.d.ts +4 -0
  16. package/dist/client/permissions/AvailableActions.d.ts +3 -0
  17. package/dist/client/permissions/GeneralPermissions.d.ts +4 -0
  18. package/dist/client/permissions/MenuItemsProvider.d.ts +4 -0
  19. package/dist/client/permissions/MenuPermissions.d.ts +4 -0
  20. package/dist/client/permissions/Permissions.d.ts +4 -0
  21. package/dist/client/permissions/PluginPermissions.d.ts +4 -0
  22. package/dist/client/permissions/RolesResourcesActions.d.ts +3 -0
  23. package/dist/client/permissions/ScopeSelect.d.ts +3 -0
  24. package/dist/client/permissions/StrategyActions.d.ts +2 -0
  25. package/dist/client/permissions/style.d.ts +1 -0
  26. package/dist/client/roles-manager.d.ts +10 -0
  27. package/dist/client/schemas/roles.d.ts +55 -0
  28. package/dist/client/schemas/scopes.d.ts +11 -0
  29. package/dist/externalVersion.js +19 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +39 -0
  32. package/dist/locale/en-US.json +6 -0
  33. package/dist/locale/ko_KR.json +4 -0
  34. package/dist/locale/zh-CN.json +11 -0
  35. package/dist/server/actions/available-actions.d.ts +7 -0
  36. package/dist/server/actions/available-actions.js +42 -0
  37. package/dist/server/actions/role-check.d.ts +1 -0
  38. package/dist/server/actions/role-check.js +67 -0
  39. package/dist/server/actions/role-collections.d.ts +7 -0
  40. package/dist/server/actions/role-collections.js +75 -0
  41. package/dist/server/actions/user-setDefaultRole.d.ts +2 -0
  42. package/dist/server/actions/user-setDefaultRole.js +65 -0
  43. package/dist/server/collections/roles-users.d.ts +2 -0
  44. package/dist/server/collections/roles-users.js +30 -0
  45. package/dist/server/collections/roles.d.ts +2 -0
  46. package/dist/server/collections/roles.js +119 -0
  47. package/dist/server/collections/rolesResources.d.ts +2 -0
  48. package/dist/server/collections/rolesResources.js +55 -0
  49. package/dist/server/collections/rolesResourcesActions.d.ts +2 -0
  50. package/dist/server/collections/rolesResourcesActions.js +51 -0
  51. package/dist/server/collections/rolesResourcesScopes.d.ts +2 -0
  52. package/dist/server/collections/rolesResourcesScopes.js +45 -0
  53. package/dist/server/collections/users.d.ts +2 -0
  54. package/dist/server/collections/users.js +52 -0
  55. package/dist/server/index.d.ts +6 -0
  56. package/dist/server/index.js +50 -0
  57. package/dist/server/middlewares/setCurrentRole.d.ts +2 -0
  58. package/dist/server/middlewares/setCurrentRole.js +74 -0
  59. package/dist/server/middlewares/with-acl-meta.d.ts +2 -0
  60. package/dist/server/middlewares/with-acl-meta.js +242 -0
  61. package/dist/server/migrations/20221214072638-set-role-snippets.d.ts +6 -0
  62. package/dist/server/migrations/20221214072638-set-role-snippets.js +43 -0
  63. package/dist/server/model/RoleModel.d.ts +8 -0
  64. package/dist/server/model/RoleModel.js +46 -0
  65. package/dist/server/model/RoleResourceActionModel.d.ts +12 -0
  66. package/dist/server/model/RoleResourceActionModel.js +85 -0
  67. package/dist/server/model/RoleResourceModel.d.ts +18 -0
  68. package/dist/server/model/RoleResourceModel.js +79 -0
  69. package/dist/server/server.d.ts +34 -0
  70. package/dist/server/server.js +648 -0
  71. package/dist/swagger/index.d.ts +366 -0
  72. package/dist/swagger/index.js +395 -0
  73. package/package.json +40 -0
  74. package/server.d.ts +3 -0
  75. package/server.js +1 -0
@@ -0,0 +1,366 @@
1
+ declare const _default: {
2
+ openapi: string;
3
+ info: {
4
+ title: string;
5
+ };
6
+ paths: {
7
+ '/roles:list': {
8
+ get: {
9
+ tags: string[];
10
+ description: string;
11
+ parameters: any[];
12
+ responses: {
13
+ 200: {
14
+ description: string;
15
+ content: {
16
+ 'application/json': {
17
+ schema: {
18
+ type: string;
19
+ items: {
20
+ $ref: string;
21
+ };
22
+ };
23
+ };
24
+ };
25
+ };
26
+ };
27
+ };
28
+ };
29
+ '/roles:get': {
30
+ get: {
31
+ tags: string[];
32
+ description: string;
33
+ parameters: {
34
+ name: string;
35
+ in: string;
36
+ description: string;
37
+ required: boolean;
38
+ schema: {
39
+ type: string;
40
+ };
41
+ }[];
42
+ responses: {
43
+ 200: {
44
+ description: string;
45
+ content: {
46
+ 'application/json': {
47
+ schema: {
48
+ $ref: string;
49
+ };
50
+ };
51
+ };
52
+ };
53
+ };
54
+ };
55
+ };
56
+ '/roles:create': {
57
+ post: {
58
+ tags: string[];
59
+ description: string;
60
+ requestBody: {
61
+ content: {
62
+ 'application/json': {
63
+ schema: {
64
+ $ref: string;
65
+ };
66
+ };
67
+ };
68
+ };
69
+ responses: {
70
+ '200': {
71
+ description: string;
72
+ content: {
73
+ 'application/json': {
74
+ schema: {
75
+ $ref: string;
76
+ };
77
+ };
78
+ };
79
+ };
80
+ };
81
+ };
82
+ };
83
+ '/roles:update': {
84
+ post: {
85
+ tags: string[];
86
+ description: string;
87
+ parameters: {
88
+ name: string;
89
+ in: string;
90
+ description: string;
91
+ required: boolean;
92
+ schema: {
93
+ type: string;
94
+ };
95
+ }[];
96
+ requestBody: {
97
+ content: {
98
+ 'application/json': {
99
+ schema: {
100
+ $ref: string;
101
+ };
102
+ };
103
+ };
104
+ };
105
+ responses: {
106
+ 200: {
107
+ description: string;
108
+ content: {
109
+ 'application/json': {
110
+ schema: {
111
+ $ref: string;
112
+ };
113
+ };
114
+ };
115
+ };
116
+ };
117
+ };
118
+ };
119
+ '/roles:destroy': {
120
+ post: {
121
+ tags: string[];
122
+ description: string;
123
+ parameters: {
124
+ name: string;
125
+ in: string;
126
+ description: string;
127
+ required: boolean;
128
+ schema: {
129
+ type: string;
130
+ };
131
+ }[];
132
+ responses: {
133
+ '200': {
134
+ description: string;
135
+ };
136
+ };
137
+ };
138
+ };
139
+ '/roles:check': {
140
+ get: {
141
+ tags: string[];
142
+ description: string;
143
+ responses: {
144
+ 200: {
145
+ description: string;
146
+ content: {
147
+ 'application/json': {
148
+ schema: {
149
+ $ref: string;
150
+ };
151
+ };
152
+ };
153
+ };
154
+ };
155
+ };
156
+ };
157
+ '/roles:setDefaultRole': {
158
+ post: {
159
+ tags: string[];
160
+ description: string;
161
+ requestBody: {
162
+ content: {
163
+ 'application/json': {
164
+ schema: {
165
+ type: string;
166
+ properties: {
167
+ roleName: {
168
+ type: string;
169
+ };
170
+ };
171
+ };
172
+ };
173
+ };
174
+ };
175
+ responses: {
176
+ '200': {
177
+ description: string;
178
+ };
179
+ };
180
+ };
181
+ };
182
+ '/roles/{roleName}/collections:list': {
183
+ get: {
184
+ tags: string[];
185
+ description: string;
186
+ parameters: {
187
+ name: string;
188
+ in: string;
189
+ description: string;
190
+ required: boolean;
191
+ schema: {
192
+ type: string;
193
+ };
194
+ }[];
195
+ responses: {
196
+ '200': {
197
+ description: string;
198
+ content: {
199
+ 'application/json': {
200
+ schema: {
201
+ type: string;
202
+ items: {
203
+ type: string;
204
+ properties: {
205
+ type: {
206
+ type: string;
207
+ description: string;
208
+ };
209
+ name: {
210
+ type: string;
211
+ description: string;
212
+ };
213
+ collectionName: {
214
+ type: string;
215
+ description: string;
216
+ };
217
+ title: {
218
+ type: string;
219
+ description: string;
220
+ };
221
+ roleName: {
222
+ type: string;
223
+ description: string;
224
+ };
225
+ usingConfig: {
226
+ type: string;
227
+ enum: string[];
228
+ description: string;
229
+ };
230
+ exists: {
231
+ type: string;
232
+ description: string;
233
+ };
234
+ };
235
+ };
236
+ };
237
+ };
238
+ };
239
+ };
240
+ };
241
+ };
242
+ };
243
+ '/availableActions:list': {
244
+ get: {
245
+ tags: string[];
246
+ description: string;
247
+ parameters: any[];
248
+ responses: {
249
+ '200': {
250
+ description: string;
251
+ content: {
252
+ 'application/json': {
253
+ schema: {
254
+ type: string;
255
+ items: {
256
+ type: string;
257
+ properties: {
258
+ name: {
259
+ type: string;
260
+ description: string;
261
+ };
262
+ displayName: {
263
+ type: string;
264
+ description: string;
265
+ };
266
+ allowConfigureFields: {
267
+ type: string;
268
+ description: string;
269
+ };
270
+ onNewRecord: {
271
+ type: string;
272
+ description: string;
273
+ };
274
+ type: {
275
+ type: string;
276
+ description: string;
277
+ };
278
+ aliases: {
279
+ type: string;
280
+ items: {
281
+ type: string;
282
+ };
283
+ description: string;
284
+ };
285
+ };
286
+ };
287
+ };
288
+ };
289
+ };
290
+ };
291
+ };
292
+ };
293
+ };
294
+ };
295
+ components: {
296
+ schemas: {
297
+ role: {
298
+ type: string;
299
+ properties: {
300
+ title: {
301
+ type: string;
302
+ description: string;
303
+ };
304
+ name: {
305
+ type: string;
306
+ description: string;
307
+ };
308
+ description: {
309
+ type: string;
310
+ description: string;
311
+ };
312
+ hidden: {
313
+ type: string;
314
+ description: string;
315
+ };
316
+ default: {
317
+ type: string;
318
+ description: string;
319
+ };
320
+ allowConfigure: {
321
+ type: string;
322
+ description: string;
323
+ };
324
+ allowNewMenu: {
325
+ type: string;
326
+ description: string;
327
+ };
328
+ snippets: {
329
+ type: string;
330
+ items: {
331
+ type: string;
332
+ };
333
+ description: string;
334
+ };
335
+ strategy: {
336
+ type: string;
337
+ description: string;
338
+ items: {
339
+ type: string;
340
+ properties: {
341
+ actions: {
342
+ type: string;
343
+ items: {
344
+ type: string;
345
+ };
346
+ description: string;
347
+ };
348
+ };
349
+ };
350
+ };
351
+ createdAt: {
352
+ type: string;
353
+ format: string;
354
+ description: string;
355
+ };
356
+ updatedAt: {
357
+ type: string;
358
+ format: string;
359
+ description: string;
360
+ };
361
+ };
362
+ };
363
+ };
364
+ };
365
+ };
366
+ export default _default;