@nocobase/plugin-notification-in-app-message 1.6.33 → 1.6.35

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.
@@ -9,14 +9,15 @@
9
9
 
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
- "@nocobase/client": "1.6.33",
13
- "@nocobase/plugin-notification-manager": "1.6.33",
14
- "@nocobase/plugin-mobile": "1.6.33",
15
- "@nocobase/utils": "1.6.33",
12
+ "@nocobase/client": "1.6.35",
13
+ "@nocobase/plugin-notification-manager": "1.6.35",
14
+ "@nocobase/plugin-mobile": "1.6.35",
15
+ "@nocobase/utils": "1.6.35",
16
16
  "react-i18next": "11.18.6",
17
- "@nocobase/server": "1.6.33",
17
+ "@nocobase/server": "1.6.35",
18
18
  "sequelize": "6.35.2",
19
- "@nocobase/database": "1.6.33",
19
+ "@nocobase/actions": "1.6.35",
20
+ "@nocobase/database": "1.6.35",
20
21
  "antd": "5.12.8",
21
22
  "@formily/reactive-react": "2.3.0",
22
23
  "@formily/reactive": "2.3.0",
@@ -26,6 +27,6 @@ module.exports = {
26
27
  "@formily/react": "2.3.0",
27
28
  "react-router-dom": "6.28.1",
28
29
  "@formily/core": "2.3.0",
29
- "@nocobase/plugin-workflow": "1.6.33",
30
+ "@nocobase/plugin-workflow": "1.6.35",
30
31
  "@formily/shared": "2.3.2"
31
32
  };
@@ -7,9 +7,11 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
11
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
13
  var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
13
15
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
16
  var __export = (target, all) => {
15
17
  for (var name in all)
@@ -23,16 +25,25 @@ var __copyProps = (to, from, except, desc) => {
23
25
  }
24
26
  return to;
25
27
  };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
26
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
37
  var defineMyInAppMessages_exports = {};
28
38
  __export(defineMyInAppMessages_exports, {
29
39
  default: () => defineMyInAppMessages
30
40
  });
31
41
  module.exports = __toCommonJS(defineMyInAppMessages_exports);
42
+ var import_actions = __toESM(require("@nocobase/actions"));
43
+ var import_plugin_notification_manager = require("@nocobase/plugin-notification-manager");
32
44
  var import_sequelize = require("sequelize");
33
45
  var import_stream = require("stream");
34
46
  var import_types = require("../types");
35
- var import_plugin_notification_manager = require("@nocobase/plugin-notification-manager");
36
47
  function defineMyInAppMessages({
37
48
  app,
38
49
  addClient,
@@ -120,4 +131,25 @@ function defineMyInAppMessages({
120
131
  }
121
132
  }
122
133
  });
134
+ app.resourceManager.define({
135
+ name: import_types.InAppMessagesDefinition.name,
136
+ actions: {
137
+ updateMyOwn: {
138
+ handler: async (ctx, next) => {
139
+ const userId = ctx.state.currentUser.id;
140
+ if (!ctx.action) {
141
+ ctx.throw(400, "ctx.action not found");
142
+ }
143
+ if (ctx.action) {
144
+ ctx.action.mergeParams({
145
+ filter: {
146
+ userId
147
+ }
148
+ });
149
+ return import_actions.default.update(ctx, next);
150
+ }
151
+ }
152
+ }
153
+ }
154
+ });
123
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-notification-in-app-message",
3
- "version": "1.6.33",
3
+ "version": "1.6.35",
4
4
  "displayName": "Notification: In-app message",
5
5
  "displayName.zh-CN": "通知:站内信",
6
6
  "description": "It supports users in receiving real-time message notifications within the NocoBase application.",
@@ -26,5 +26,5 @@
26
26
  "@nocobase/test": "1.x",
27
27
  "react-router-dom": "^6.x"
28
28
  },
29
- "gitHead": "4101b7a24800578b2a50870bb74bcb60309fbf0b"
29
+ "gitHead": "7076fefbe56f04fa17cb9f5bbe8f52c56df4bad4"
30
30
  }