@southwind-ai/modules 0.1.3 → 0.1.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@southwind-ai/modules",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"!src/**/*.test.ts"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@southwind-ai/shared": "0.
|
|
15
|
+
"@southwind-ai/shared": "0.2.0"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
18
|
".": "./index.ts"
|
|
@@ -61,6 +61,12 @@ export function systemApiPermissionBindings(): ApiPermissionBinding[] {
|
|
|
61
61
|
"system.department.create",
|
|
62
62
|
"system.rbac",
|
|
63
63
|
),
|
|
64
|
+
binding(
|
|
65
|
+
"POST",
|
|
66
|
+
"/api/system/departments/:id/transition",
|
|
67
|
+
"system.department.manage",
|
|
68
|
+
"system.rbac",
|
|
69
|
+
),
|
|
64
70
|
binding("GET", "/api/system/menus", "system.menu.read", "system.rbac"),
|
|
65
71
|
binding(
|
|
66
72
|
"GET",
|
|
@@ -226,12 +232,48 @@ export function systemApiPermissionBindings(): ApiPermissionBinding[] {
|
|
|
226
232
|
"system.notification.read",
|
|
227
233
|
"system.notification",
|
|
228
234
|
),
|
|
235
|
+
binding(
|
|
236
|
+
"GET",
|
|
237
|
+
"/api/notifications/preferences",
|
|
238
|
+
"system.notification.read",
|
|
239
|
+
"system.notification",
|
|
240
|
+
),
|
|
241
|
+
binding(
|
|
242
|
+
"PUT",
|
|
243
|
+
"/api/notifications/preferences",
|
|
244
|
+
"system.notification.read",
|
|
245
|
+
"system.notification",
|
|
246
|
+
),
|
|
229
247
|
binding(
|
|
230
248
|
"POST",
|
|
231
249
|
"/api/notifications/:id/read",
|
|
232
250
|
"system.notification.read",
|
|
233
251
|
"system.notification",
|
|
234
252
|
),
|
|
253
|
+
binding(
|
|
254
|
+
"PUT",
|
|
255
|
+
"/api/notifications/:id/favorite",
|
|
256
|
+
"system.notification.read",
|
|
257
|
+
"system.notification",
|
|
258
|
+
),
|
|
259
|
+
binding(
|
|
260
|
+
"DELETE",
|
|
261
|
+
"/api/notifications/:id/favorite",
|
|
262
|
+
"system.notification.read",
|
|
263
|
+
"system.notification",
|
|
264
|
+
),
|
|
265
|
+
binding(
|
|
266
|
+
"GET",
|
|
267
|
+
"/api/system/notifications/audience-options",
|
|
268
|
+
"system.notification.manage",
|
|
269
|
+
"system.notification",
|
|
270
|
+
),
|
|
271
|
+
binding(
|
|
272
|
+
"GET",
|
|
273
|
+
"/api/system/notifications/:id/deliveries",
|
|
274
|
+
"system.notification.manage",
|
|
275
|
+
"system.notification",
|
|
276
|
+
),
|
|
235
277
|
binding(
|
|
236
278
|
"GET",
|
|
237
279
|
"/api/system/notifications",
|
|
@@ -244,6 +286,18 @@ export function systemApiPermissionBindings(): ApiPermissionBinding[] {
|
|
|
244
286
|
"system.notification.manage",
|
|
245
287
|
"system.notification",
|
|
246
288
|
),
|
|
289
|
+
binding(
|
|
290
|
+
"PUT",
|
|
291
|
+
"/api/system/notifications/:id",
|
|
292
|
+
"system.notification.update",
|
|
293
|
+
"system.notification",
|
|
294
|
+
),
|
|
295
|
+
binding(
|
|
296
|
+
"GET",
|
|
297
|
+
"/api/system/notifications/:id/revisions",
|
|
298
|
+
"system.notification.manage",
|
|
299
|
+
"system.notification",
|
|
300
|
+
),
|
|
247
301
|
binding(
|
|
248
302
|
"DELETE",
|
|
249
303
|
"/api/system/notifications/:id",
|
|
@@ -22,9 +22,19 @@ export const systemAuditActions: ModuleManifest["auditActions"] = [
|
|
|
22
22
|
// @windy-module system.license end
|
|
23
23
|
"feature.update",
|
|
24
24
|
"menu.structure.update",
|
|
25
|
+
{
|
|
26
|
+
key: "organization.department.transition",
|
|
27
|
+
label: "处置部门组织",
|
|
28
|
+
description: "迁移部门关联后停用或删除部门。",
|
|
29
|
+
},
|
|
25
30
|
// @windy-module system.notification begin
|
|
26
31
|
"notification.publish",
|
|
32
|
+
"notification.schedule",
|
|
33
|
+
"notification.preference.update",
|
|
34
|
+
"notification.update",
|
|
27
35
|
"notification.read",
|
|
36
|
+
"notification.favorite",
|
|
37
|
+
"notification.unfavorite",
|
|
28
38
|
"notification.archive",
|
|
29
39
|
// @windy-module system.notification end
|
|
30
40
|
// @windy-module system.workflow begin
|
package/src/system-features.ts
CHANGED
|
@@ -124,7 +124,8 @@ export const systemModuleDefinitions = [
|
|
|
124
124
|
name: "system.notification",
|
|
125
125
|
version: "0.1.0",
|
|
126
126
|
label: "站内通知",
|
|
127
|
-
description:
|
|
127
|
+
description:
|
|
128
|
+
"通知定向与定时发布、用户偏好、外部渠道投递、修改历史、阅读、收藏和归档。",
|
|
128
129
|
resources: ["notification"],
|
|
129
130
|
featureKeys: ["system.notification"],
|
|
130
131
|
},
|
package/src/system-modules.ts
CHANGED
|
@@ -270,6 +270,18 @@ export function systemFoundationModule(): ModuleManifest {
|
|
|
270
270
|
retryDelaySeconds: 30,
|
|
271
271
|
},
|
|
272
272
|
// @windy-module system.scheduler end
|
|
273
|
+
// @windy-module system.notification begin
|
|
274
|
+
{
|
|
275
|
+
key: "system.notification.dispatch",
|
|
276
|
+
label: "通知发布与外部投递",
|
|
277
|
+
description: "发布到期通知并领取持久投递队列,执行渠道重试。",
|
|
278
|
+
permissionKey: "system.notification.manage",
|
|
279
|
+
featureKey: "system.notification",
|
|
280
|
+
intervalSeconds: 5,
|
|
281
|
+
maxAttempts: 3,
|
|
282
|
+
retryDelaySeconds: 30,
|
|
283
|
+
},
|
|
284
|
+
// @windy-module system.notification end
|
|
273
285
|
// @windy-module system.bulk-data begin
|
|
274
286
|
{
|
|
275
287
|
key: "system.bulk-data.dispatch",
|
|
@@ -33,6 +33,7 @@ type SystemAction =
|
|
|
33
33
|
| "approve"
|
|
34
34
|
| "export"
|
|
35
35
|
| "reveal"
|
|
36
|
+
| "update"
|
|
36
37
|
| "manage";
|
|
37
38
|
|
|
38
39
|
function permission(
|
|
@@ -54,11 +55,13 @@ function permission(
|
|
|
54
55
|
? "新建"
|
|
55
56
|
: action === "approve"
|
|
56
57
|
? "处理"
|
|
57
|
-
: action === "
|
|
58
|
-
? "
|
|
59
|
-
: action === "
|
|
60
|
-
? "
|
|
61
|
-
: "
|
|
58
|
+
: action === "update"
|
|
59
|
+
? "修改"
|
|
60
|
+
: action === "reveal"
|
|
61
|
+
? "查看明文"
|
|
62
|
+
: action === "export"
|
|
63
|
+
? "治理导出"
|
|
64
|
+
: "管理",
|
|
62
65
|
module: "system",
|
|
63
66
|
moduleLabel: "系统基础设施",
|
|
64
67
|
resource,
|
|
@@ -125,6 +128,7 @@ export const systemPermissions: ModuleManifest["permissions"] = [
|
|
|
125
128
|
// @windy-module system.scheduler end
|
|
126
129
|
// @windy-module system.notification begin
|
|
127
130
|
permission("notification", "read"),
|
|
131
|
+
permission("notification", "update"),
|
|
128
132
|
permission("notification", "manage"),
|
|
129
133
|
// @windy-module system.notification end
|
|
130
134
|
// @windy-module system.bulk-data begin
|