@nocobase/plugin-notification-in-app-message 2.1.4 → 2.1.5

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,23 +9,23 @@
9
9
 
10
10
  module.exports = {
11
11
  "react": "18.2.0",
12
- "@nocobase/client": "2.1.4",
13
- "@nocobase/plugin-notification-manager": "2.1.4",
14
- "@nocobase/plugin-mobile": "2.1.4",
15
- "@nocobase/utils": "2.1.4",
16
- "@nocobase/client-v2": "2.1.4",
17
- "@nocobase/flow-engine": "2.1.4",
12
+ "@nocobase/client": "2.1.5",
13
+ "@nocobase/plugin-notification-manager": "2.1.5",
14
+ "@nocobase/plugin-mobile": "2.1.5",
15
+ "@nocobase/utils": "2.1.5",
16
+ "@nocobase/client-v2": "2.1.5",
17
+ "@nocobase/flow-engine": "2.1.5",
18
18
  "react-i18next": "11.18.6",
19
19
  "dayjs": "1.11.13",
20
- "@nocobase/database": "2.1.4",
21
- "@nocobase/server": "2.1.4",
20
+ "@nocobase/database": "2.1.5",
21
+ "@nocobase/server": "2.1.5",
22
22
  "sequelize": "6.35.2",
23
- "@nocobase/actions": "2.1.4",
23
+ "@nocobase/actions": "2.1.5",
24
24
  "antd": "5.24.2",
25
25
  "antd-style": "3.7.1",
26
26
  "@emotion/css": "11.13.0",
27
27
  "@formily/react": "2.3.7",
28
- "@nocobase/plugin-workflow": "2.1.4",
28
+ "@nocobase/plugin-workflow": "2.1.5",
29
29
  "react-router-dom": "6.30.1",
30
30
  "@formily/reactive": "2.3.7",
31
31
  "ahooks": "3.7.8",
@@ -1 +1 @@
1
- {"name":"uuid","version":"10.0.0","description":"RFC9562 UUIDs","funding":["https://github.com/sponsors/broofa","https://github.com/sponsors/ctavan"],"commitlint":{"extends":["@commitlint/config-conventional"]},"keywords":["uuid","guid","rfc4122","rfc9562"],"license":"MIT","bin":{"uuid":"dist/bin/uuid"},"sideEffects":false,"main":"./dist/index.js","exports":{".":{"node":{"module":"./dist/esm-node/index.js","require":"./dist/index.js","import":"./wrapper.mjs"},"browser":{"import":"./dist/esm-browser/index.js","require":"./dist/commonjs-browser/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"module":"./dist/esm-node/index.js","browser":{"./dist/esm-node/index.js":"./dist/esm-browser/index.js","./dist/md5.js":"./dist/md5-browser.js","./dist/native.js":"./dist/native-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js"},"files":["CHANGELOG.md","CONTRIBUTING.md","LICENSE.md","README.md","dist","wrapper.mjs"],"devDependencies":{"@babel/cli":"7.24.6","@babel/core":"7.24.6","@babel/eslint-parser":"7.24.6","@babel/plugin-syntax-import-attributes":"7.24.6","@babel/preset-env":"7.24.6","@commitlint/cli":"19.3.0","@commitlint/config-conventional":"19.2.2","@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6","bundlewatch":"0.3.3","eslint":"9.4.0","eslint-plugin-prettier":"5.1.3","globals":"15.3.0","husky":"9.0.11","jest":"29.7.0","lint-staged":"15.2.5","neostandard":"0.5.1","npm-run-all":"4.1.5","optional-dev-dependency":"2.0.1","prettier":"3.3.0","random-seed":"0.3.0","runmd":"1.3.9","standard-version":"9.5.0"},"optionalDevDependencies":{"@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6"},"scripts":{"examples:browser:webpack:build":"cd examples/browser-webpack && npm install && npm run build","examples:browser:rollup:build":"cd examples/browser-rollup && npm install && npm run build","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","examples:node:jest:test":"cd examples/node-jest && npm install && npm test","prepare":"husky install","lint":"npm run eslint:check && npm run prettier:check","eslint:check":"eslint src/ test/ examples/ *.js","eslint:fix":"eslint --fix src/ test/ examples/ *.js","pretest":"npm run build","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","test:matching":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/ -t","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","test:browser":"wdio run ./wdio.conf.js","pretest:node":"npm run build","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","pretest:benchmark":"npm run build","test:benchmark":"cd examples/benchmark && HUSKY=0 npm install && npm test","prettier:check":"prettier --check .","prettier:fix":"prettier --write .","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","md":"runmd --watch --output=README.md README_js.md","docs":"npm run build && npx runmd --output=README.md README_js.md","docs:diff":"npm run docs && git diff --quiet README.md","build":"./scripts/build.sh","prepack":"npm run build","release":"standard-version --no-verify"},"repository":{"type":"git","url":"git+https://github.com/uuidjs/uuid.git"},"lint-staged":{"*":["prettier --no-error-on-unmatched-pattern --write"],"*.{js,jsx}":["eslint --no-error-on-unmatched-pattern --fix"]},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"packageManager":"npm@10.8.1+sha256.b8807aebb9656758e2872fa6e7c564b506aa2faa9297439a478d471d2fe32483","_lastModified":"2026-06-13T07:01:26.249Z"}
1
+ {"name":"uuid","version":"10.0.0","description":"RFC9562 UUIDs","funding":["https://github.com/sponsors/broofa","https://github.com/sponsors/ctavan"],"commitlint":{"extends":["@commitlint/config-conventional"]},"keywords":["uuid","guid","rfc4122","rfc9562"],"license":"MIT","bin":{"uuid":"dist/bin/uuid"},"sideEffects":false,"main":"./dist/index.js","exports":{".":{"node":{"module":"./dist/esm-node/index.js","require":"./dist/index.js","import":"./wrapper.mjs"},"browser":{"import":"./dist/esm-browser/index.js","require":"./dist/commonjs-browser/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"module":"./dist/esm-node/index.js","browser":{"./dist/esm-node/index.js":"./dist/esm-browser/index.js","./dist/md5.js":"./dist/md5-browser.js","./dist/native.js":"./dist/native-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js"},"files":["CHANGELOG.md","CONTRIBUTING.md","LICENSE.md","README.md","dist","wrapper.mjs"],"devDependencies":{"@babel/cli":"7.24.6","@babel/core":"7.24.6","@babel/eslint-parser":"7.24.6","@babel/plugin-syntax-import-attributes":"7.24.6","@babel/preset-env":"7.24.6","@commitlint/cli":"19.3.0","@commitlint/config-conventional":"19.2.2","@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6","bundlewatch":"0.3.3","eslint":"9.4.0","eslint-plugin-prettier":"5.1.3","globals":"15.3.0","husky":"9.0.11","jest":"29.7.0","lint-staged":"15.2.5","neostandard":"0.5.1","npm-run-all":"4.1.5","optional-dev-dependency":"2.0.1","prettier":"3.3.0","random-seed":"0.3.0","runmd":"1.3.9","standard-version":"9.5.0"},"optionalDevDependencies":{"@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6"},"scripts":{"examples:browser:webpack:build":"cd examples/browser-webpack && npm install && npm run build","examples:browser:rollup:build":"cd examples/browser-rollup && npm install && npm run build","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","examples:node:jest:test":"cd examples/node-jest && npm install && npm test","prepare":"husky install","lint":"npm run eslint:check && npm run prettier:check","eslint:check":"eslint src/ test/ examples/ *.js","eslint:fix":"eslint --fix src/ test/ examples/ *.js","pretest":"npm run build","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","test:matching":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/ -t","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","test:browser":"wdio run ./wdio.conf.js","pretest:node":"npm run build","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","pretest:benchmark":"npm run build","test:benchmark":"cd examples/benchmark && HUSKY=0 npm install && npm test","prettier:check":"prettier --check .","prettier:fix":"prettier --write .","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","md":"runmd --watch --output=README.md README_js.md","docs":"npm run build && npx runmd --output=README.md README_js.md","docs:diff":"npm run docs && git diff --quiet README.md","build":"./scripts/build.sh","prepack":"npm run build","release":"standard-version --no-verify"},"repository":{"type":"git","url":"git+https://github.com/uuidjs/uuid.git"},"lint-staged":{"*":["prettier --no-error-on-unmatched-pattern --write"],"*.{js,jsx}":["eslint --no-error-on-unmatched-pattern --fix"]},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"packageManager":"npm@10.8.1+sha256.b8807aebb9656758e2872fa6e7c564b506aa2faa9297439a478d471d2fe32483","_lastModified":"2026-06-15T10:54:30.540Z"}
@@ -0,0 +1,357 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: {
10
+ openapi: string;
11
+ info: {
12
+ title: string;
13
+ };
14
+ paths: {
15
+ '/myInAppMessages:list': {
16
+ get: {
17
+ tags: string[];
18
+ summary: string;
19
+ description: string;
20
+ parameters: ({
21
+ name: string;
22
+ in: string;
23
+ required: boolean;
24
+ description: string;
25
+ schema: {
26
+ type: string;
27
+ additionalProperties: boolean;
28
+ };
29
+ } | {
30
+ name: string;
31
+ in: string;
32
+ required: boolean;
33
+ schema: {
34
+ type: string;
35
+ };
36
+ description?: undefined;
37
+ })[];
38
+ responses: {
39
+ 200: {
40
+ description: string;
41
+ content: {
42
+ 'application/json': {
43
+ schema: {
44
+ $ref: string;
45
+ };
46
+ };
47
+ };
48
+ };
49
+ };
50
+ };
51
+ };
52
+ '/myInAppMessages:count': {
53
+ get: {
54
+ tags: string[];
55
+ summary: string;
56
+ responses: {
57
+ 200: {
58
+ description: string;
59
+ content: {
60
+ 'application/json': {
61
+ schema: {
62
+ type: string;
63
+ properties: {
64
+ count: {
65
+ type: string;
66
+ };
67
+ };
68
+ };
69
+ };
70
+ };
71
+ };
72
+ };
73
+ };
74
+ };
75
+ '/myInAppChannels:list': {
76
+ get: {
77
+ tags: string[];
78
+ summary: string;
79
+ description: string;
80
+ parameters: ({
81
+ name: string;
82
+ in: string;
83
+ required: boolean;
84
+ description: string;
85
+ schema: {
86
+ type: string;
87
+ additionalProperties: boolean;
88
+ };
89
+ } | {
90
+ name: string;
91
+ in: string;
92
+ required: boolean;
93
+ schema: {
94
+ type: string;
95
+ default: number;
96
+ };
97
+ description?: undefined;
98
+ })[];
99
+ responses: {
100
+ 200: {
101
+ description: string;
102
+ content: {
103
+ 'application/json': {
104
+ schema: {
105
+ $ref: string;
106
+ };
107
+ };
108
+ };
109
+ };
110
+ };
111
+ };
112
+ };
113
+ '/notificationInAppMessages:list': {
114
+ get: {
115
+ tags: string[];
116
+ summary: string;
117
+ parameters: ({
118
+ name: string;
119
+ in: string;
120
+ required: boolean;
121
+ description: string;
122
+ schema: {
123
+ type: string;
124
+ additionalProperties: boolean;
125
+ };
126
+ } | {
127
+ name: string;
128
+ in: string;
129
+ required: boolean;
130
+ schema: {
131
+ type: string;
132
+ };
133
+ description?: undefined;
134
+ })[];
135
+ responses: {
136
+ 200: {
137
+ description: string;
138
+ content: {
139
+ 'application/json': {
140
+ schema: {
141
+ type: string;
142
+ properties: {
143
+ data: {
144
+ type: string;
145
+ items: {
146
+ $ref: string;
147
+ };
148
+ };
149
+ meta: {
150
+ type: string;
151
+ additionalProperties: boolean;
152
+ };
153
+ };
154
+ };
155
+ };
156
+ };
157
+ };
158
+ };
159
+ };
160
+ };
161
+ '/notificationInAppMessages:get': {
162
+ get: {
163
+ tags: string[];
164
+ summary: string;
165
+ parameters: {
166
+ name: string;
167
+ in: string;
168
+ required: boolean;
169
+ description: string;
170
+ schema: {
171
+ type: string;
172
+ format: string;
173
+ };
174
+ }[];
175
+ responses: {
176
+ 200: {
177
+ description: string;
178
+ content: {
179
+ 'application/json': {
180
+ schema: {
181
+ type: string;
182
+ properties: {
183
+ data: {
184
+ $ref: string;
185
+ };
186
+ };
187
+ };
188
+ };
189
+ };
190
+ };
191
+ };
192
+ };
193
+ };
194
+ '/notificationInAppMessages:updateMyOwn': {
195
+ post: {
196
+ tags: string[];
197
+ summary: string;
198
+ description: string;
199
+ parameters: ({
200
+ name: string;
201
+ in: string;
202
+ required: boolean;
203
+ description: string;
204
+ schema: {
205
+ type: string;
206
+ format: string;
207
+ };
208
+ } | {
209
+ name: string;
210
+ in: string;
211
+ required: boolean;
212
+ schema: {
213
+ type: string;
214
+ additionalProperties: boolean;
215
+ };
216
+ description?: undefined;
217
+ })[];
218
+ requestBody: {
219
+ required: boolean;
220
+ content: {
221
+ 'application/json': {
222
+ schema: {
223
+ type: string;
224
+ required: string[];
225
+ properties: {
226
+ status: {
227
+ type: string;
228
+ enum: string[];
229
+ };
230
+ };
231
+ };
232
+ };
233
+ };
234
+ };
235
+ responses: {
236
+ 200: {
237
+ description: string;
238
+ content: {
239
+ 'application/json': {
240
+ schema: {
241
+ type: string;
242
+ properties: {
243
+ data: {
244
+ $ref: string;
245
+ };
246
+ };
247
+ };
248
+ };
249
+ };
250
+ };
251
+ };
252
+ };
253
+ };
254
+ };
255
+ components: {
256
+ schemas: {
257
+ InAppMessage: {
258
+ type: string;
259
+ properties: {
260
+ id: {
261
+ type: string;
262
+ format: string;
263
+ };
264
+ userId: {
265
+ oneOf: {
266
+ type: string;
267
+ description: string;
268
+ }[];
269
+ };
270
+ channelName: {
271
+ type: string;
272
+ };
273
+ title: {
274
+ type: string;
275
+ };
276
+ content: {
277
+ type: string;
278
+ };
279
+ status: {
280
+ type: string;
281
+ enum: string[];
282
+ };
283
+ receiveTimestamp: {
284
+ type: string;
285
+ format: string;
286
+ };
287
+ options: {
288
+ type: string;
289
+ additionalProperties: boolean;
290
+ };
291
+ createdAt: {
292
+ type: string;
293
+ format: string;
294
+ };
295
+ };
296
+ additionalProperties: boolean;
297
+ };
298
+ MyInAppMessagesResponse: {
299
+ type: string;
300
+ properties: {
301
+ messages: {
302
+ type: string;
303
+ items: {
304
+ $ref: string;
305
+ };
306
+ };
307
+ };
308
+ };
309
+ MyInAppChannel: {
310
+ type: string;
311
+ properties: {
312
+ name: {
313
+ type: string;
314
+ };
315
+ title: {
316
+ type: string;
317
+ };
318
+ userId: {
319
+ oneOf: {
320
+ type: string;
321
+ description: string;
322
+ }[];
323
+ };
324
+ unreadMsgCnt: {
325
+ type: string;
326
+ };
327
+ totalMsgCnt: {
328
+ type: string;
329
+ };
330
+ latestMsgReceiveTimestamp: {
331
+ type: string;
332
+ format: string;
333
+ };
334
+ latestMsgTitle: {
335
+ type: string;
336
+ };
337
+ };
338
+ additionalProperties: boolean;
339
+ };
340
+ MyInAppChannelsResponse: {
341
+ type: string;
342
+ properties: {
343
+ rows: {
344
+ type: string;
345
+ items: {
346
+ $ref: string;
347
+ };
348
+ };
349
+ count: {
350
+ type: string;
351
+ };
352
+ };
353
+ };
354
+ };
355
+ };
356
+ };
357
+ export default _default;
@@ -0,0 +1,375 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var swagger_exports = {};
28
+ __export(swagger_exports, {
29
+ default: () => swagger_default
30
+ });
31
+ module.exports = __toCommonJS(swagger_exports);
32
+ const jsonObjectSchema = {
33
+ type: "object",
34
+ additionalProperties: true
35
+ };
36
+ const listParameters = [
37
+ {
38
+ name: "filter",
39
+ in: "query",
40
+ required: false,
41
+ description: "Filter object encoded as JSON.",
42
+ schema: jsonObjectSchema
43
+ },
44
+ {
45
+ name: "page",
46
+ in: "query",
47
+ required: false,
48
+ schema: {
49
+ type: "integer"
50
+ }
51
+ },
52
+ {
53
+ name: "pageSize",
54
+ in: "query",
55
+ required: false,
56
+ schema: {
57
+ type: "integer"
58
+ }
59
+ }
60
+ ];
61
+ const myInAppChannelListParameters = [
62
+ {
63
+ name: "filter",
64
+ in: "query",
65
+ required: false,
66
+ description: "Filter object encoded as JSON. Supports `status`, `name`, and `latestMsgReceiveTimestamp.$lt` for cursor-like pagination.",
67
+ schema: jsonObjectSchema
68
+ },
69
+ {
70
+ name: "limit",
71
+ in: "query",
72
+ required: false,
73
+ schema: {
74
+ type: "integer",
75
+ default: 30
76
+ }
77
+ }
78
+ ];
79
+ const userIdSchema = {
80
+ oneOf: [
81
+ {
82
+ type: "string",
83
+ description: "User id serialized as a string. This is common for bigInt identifiers."
84
+ },
85
+ {
86
+ type: "integer",
87
+ description: "User id when the runtime serializes the value as a JSON number."
88
+ }
89
+ ]
90
+ };
91
+ var swagger_default = {
92
+ openapi: "3.0.2",
93
+ info: {
94
+ title: "NocoBase API - Notification in-app message plugin"
95
+ },
96
+ paths: {
97
+ "/myInAppMessages:list": {
98
+ get: {
99
+ tags: ["myInAppMessages"],
100
+ summary: "List current user in-app messages",
101
+ description: "List messages for the current user. The server always scopes results to `ctx.state.currentUser.id`.",
102
+ parameters: listParameters,
103
+ responses: {
104
+ 200: {
105
+ description: "OK",
106
+ content: {
107
+ "application/json": {
108
+ schema: {
109
+ $ref: "#/components/schemas/MyInAppMessagesResponse"
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ },
117
+ "/myInAppMessages:count": {
118
+ get: {
119
+ tags: ["myInAppMessages"],
120
+ summary: "Count current user unread in-app messages",
121
+ responses: {
122
+ 200: {
123
+ description: "OK",
124
+ content: {
125
+ "application/json": {
126
+ schema: {
127
+ type: "object",
128
+ properties: {
129
+ count: {
130
+ type: "integer"
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ },
140
+ "/myInAppChannels:list": {
141
+ get: {
142
+ tags: ["myInAppChannels"],
143
+ summary: "List current user in-app message channels",
144
+ description: "List channels that have messages for the current user, including unread counts and latest message metadata.",
145
+ parameters: myInAppChannelListParameters,
146
+ responses: {
147
+ 200: {
148
+ description: "OK",
149
+ content: {
150
+ "application/json": {
151
+ schema: {
152
+ $ref: "#/components/schemas/MyInAppChannelsResponse"
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "/notificationInAppMessages:list": {
161
+ get: {
162
+ tags: ["notificationInAppMessages"],
163
+ summary: "List in-app message records",
164
+ parameters: listParameters,
165
+ responses: {
166
+ 200: {
167
+ description: "OK",
168
+ content: {
169
+ "application/json": {
170
+ schema: {
171
+ type: "object",
172
+ properties: {
173
+ data: {
174
+ type: "array",
175
+ items: {
176
+ $ref: "#/components/schemas/InAppMessage"
177
+ }
178
+ },
179
+ meta: jsonObjectSchema
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ },
188
+ "/notificationInAppMessages:get": {
189
+ get: {
190
+ tags: ["notificationInAppMessages"],
191
+ summary: "Get one in-app message record",
192
+ parameters: [
193
+ {
194
+ name: "filterByTk",
195
+ in: "query",
196
+ required: true,
197
+ description: "In-app message UUID.",
198
+ schema: {
199
+ type: "string",
200
+ format: "uuid"
201
+ }
202
+ }
203
+ ],
204
+ responses: {
205
+ 200: {
206
+ description: "OK",
207
+ content: {
208
+ "application/json": {
209
+ schema: {
210
+ type: "object",
211
+ properties: {
212
+ data: {
213
+ $ref: "#/components/schemas/InAppMessage"
214
+ }
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ },
223
+ "/notificationInAppMessages:updateMyOwn": {
224
+ post: {
225
+ tags: ["notificationInAppMessages"],
226
+ summary: "Update current user own in-app message",
227
+ description: "Update only the current user own message. The action merges `filter.userId` from the current user and whitelists `status`.",
228
+ parameters: [
229
+ {
230
+ name: "filterByTk",
231
+ in: "query",
232
+ required: false,
233
+ description: "In-app message UUID.",
234
+ schema: {
235
+ type: "string",
236
+ format: "uuid"
237
+ }
238
+ },
239
+ {
240
+ name: "filter",
241
+ in: "query",
242
+ required: false,
243
+ schema: jsonObjectSchema
244
+ }
245
+ ],
246
+ requestBody: {
247
+ required: true,
248
+ content: {
249
+ "application/json": {
250
+ schema: {
251
+ type: "object",
252
+ required: ["status"],
253
+ properties: {
254
+ status: {
255
+ type: "string",
256
+ enum: ["read", "unread"]
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ },
263
+ responses: {
264
+ 200: {
265
+ description: "OK",
266
+ content: {
267
+ "application/json": {
268
+ schema: {
269
+ type: "object",
270
+ properties: {
271
+ data: {
272
+ $ref: "#/components/schemas/InAppMessage"
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
282
+ },
283
+ components: {
284
+ schemas: {
285
+ InAppMessage: {
286
+ type: "object",
287
+ properties: {
288
+ id: {
289
+ type: "string",
290
+ format: "uuid"
291
+ },
292
+ userId: {
293
+ ...userIdSchema
294
+ },
295
+ channelName: {
296
+ type: "string"
297
+ },
298
+ title: {
299
+ type: "string"
300
+ },
301
+ content: {
302
+ type: "string"
303
+ },
304
+ status: {
305
+ type: "string",
306
+ enum: ["read", "unread"]
307
+ },
308
+ receiveTimestamp: {
309
+ type: "integer",
310
+ format: "int64"
311
+ },
312
+ options: jsonObjectSchema,
313
+ createdAt: {
314
+ type: "string",
315
+ format: "date-time"
316
+ }
317
+ },
318
+ additionalProperties: true
319
+ },
320
+ MyInAppMessagesResponse: {
321
+ type: "object",
322
+ properties: {
323
+ messages: {
324
+ type: "array",
325
+ items: {
326
+ $ref: "#/components/schemas/InAppMessage"
327
+ }
328
+ }
329
+ }
330
+ },
331
+ MyInAppChannel: {
332
+ type: "object",
333
+ properties: {
334
+ name: {
335
+ type: "string"
336
+ },
337
+ title: {
338
+ type: "string"
339
+ },
340
+ userId: {
341
+ ...userIdSchema
342
+ },
343
+ unreadMsgCnt: {
344
+ type: "integer"
345
+ },
346
+ totalMsgCnt: {
347
+ type: "integer"
348
+ },
349
+ latestMsgReceiveTimestamp: {
350
+ type: "integer",
351
+ format: "int64"
352
+ },
353
+ latestMsgTitle: {
354
+ type: "string"
355
+ }
356
+ },
357
+ additionalProperties: true
358
+ },
359
+ MyInAppChannelsResponse: {
360
+ type: "object",
361
+ properties: {
362
+ rows: {
363
+ type: "array",
364
+ items: {
365
+ $ref: "#/components/schemas/MyInAppChannel"
366
+ }
367
+ },
368
+ count: {
369
+ type: "integer"
370
+ }
371
+ }
372
+ }
373
+ }
374
+ }
375
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-notification-in-app-message",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "displayName": "Notification: In-app message",
5
5
  "displayName.ru-RU": "Уведомления: Всплывающие сообщения внутри приложения",
6
6
  "displayName.zh-CN": "通知:站内信",
@@ -33,5 +33,5 @@
33
33
  "react-router-dom": "^6.x"
34
34
  },
35
35
  "license": "Apache-2.0",
36
- "gitHead": "73c01b1e842afdaafdffd6fa4bb090c1da9b0816"
36
+ "gitHead": "fb6550c3c607ea45ce5389dafe9d98f17f201aad"
37
37
  }