@nocobase/plugin-notification-manager 1.4.0-alpha.20240928155737
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/LICENSE.txt +123 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/Management.d.ts +10 -0
- package/dist/client/hooks/channel.d.ts +14 -0
- package/dist/client/hooks/index.d.ts +29 -0
- package/dist/client/index.d.ts +21 -0
- package/dist/client/index.js +10 -0
- package/dist/client/locale/index.d.ts +12 -0
- package/dist/client/manager/channel/components/ConfigForm.d.ts +10 -0
- package/dist/client/manager/channel/components/index.d.ts +13 -0
- package/dist/client/manager/channel/context.d.ts +25 -0
- package/dist/client/manager/channel/hooks.d.ts +45 -0
- package/dist/client/manager/channel/schemas/form.d.ts +43 -0
- package/dist/client/manager/channel/schemas/index.d.ts +11 -0
- package/dist/client/manager/channel/types.d.ts +27 -0
- package/dist/client/manager/log/components/Manager.d.ts +13 -0
- package/dist/client/manager/log/components/index.d.ts +8 -0
- package/dist/client/manager/log/hooks.d.ts +8 -0
- package/dist/client/manager/log/schemas/index.d.ts +71 -0
- package/dist/client/manager/log/types.d.ts +24 -0
- package/dist/client/manager/message/components/Manager.d.ts +13 -0
- package/dist/client/manager/message/components/MessageConfigForm/index.d.ts +12 -0
- package/dist/client/manager/message/components/MessageInput.d.ts +11 -0
- package/dist/client/manager/message/components/ReceiverConfigForm/Users/Select.d.ts +18 -0
- package/dist/client/manager/message/components/ReceiverConfigForm/Users/UsersAddition.d.ts +10 -0
- package/dist/client/manager/message/components/index.d.ts +8 -0
- package/dist/client/manager/message/components/useSendAction.d.ts +11 -0
- package/dist/client/manager/message/schemas/form.d.ts +34 -0
- package/dist/client/manager/message/schemas/index.d.ts +10 -0
- package/dist/client/manager/message/types.d.ts +25 -0
- package/dist/client/notification-manager.d.ts +13 -0
- package/dist/collections/channel.d.ts +11 -0
- package/dist/collections/channel.js +145 -0
- package/dist/collections/messageLog.d.ts +11 -0
- package/dist/collections/messageLog.js +155 -0
- package/dist/constant.d.ts +14 -0
- package/dist/constant.js +42 -0
- package/dist/externalVersion.js +25 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +51 -0
- package/dist/locale/en-US.json +39 -0
- package/dist/locale/zh-CN.json +41 -0
- package/dist/server/base-notification-channel.d.ts +22 -0
- package/dist/server/base-notification-channel.js +40 -0
- package/dist/server/collections/channels.d.ts +10 -0
- package/dist/server/collections/channels.js +44 -0
- package/dist/server/collections/messageLogs.d.ts +10 -0
- package/dist/server/collections/messageLogs.js +44 -0
- package/dist/server/index.d.ts +11 -0
- package/dist/server/index.js +51 -0
- package/dist/server/manager.d.ts +22 -0
- package/dist/server/manager.js +102 -0
- package/dist/server/plugin.d.ts +25 -0
- package/dist/server/plugin.js +93 -0
- package/dist/server/types.d.ts +49 -0
- package/dist/server/types.js +24 -0
- package/package.json +33 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import React from 'react';
|
|
10
|
+
declare const Message: () => React.JSX.Element;
|
|
11
|
+
export default Message;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* This file is part of the NocoBase (R) project.
|
|
11
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
12
|
+
* Authors: NocoBase Team.
|
|
13
|
+
*
|
|
14
|
+
* This program is offered under a commercial license.
|
|
15
|
+
* For more information, see <https://www.nocobase.com/agreement>
|
|
16
|
+
*/
|
|
17
|
+
import React from 'react';
|
|
18
|
+
export declare function UsersSelect(props: any): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import React from 'react';
|
|
10
|
+
export declare function UsersAddition(): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export declare function useSendAction(): {
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
export declare const formProperties: {
|
|
10
|
+
title: {
|
|
11
|
+
'x-component': string;
|
|
12
|
+
'x-decorator': string;
|
|
13
|
+
'x-collection-field': string;
|
|
14
|
+
};
|
|
15
|
+
channel: {
|
|
16
|
+
'x-component': string;
|
|
17
|
+
'x-decorator': string;
|
|
18
|
+
'x-collection-field': string;
|
|
19
|
+
'x-component-props': {
|
|
20
|
+
fieldNames: {
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
receiveOption: {
|
|
27
|
+
'x-component': string;
|
|
28
|
+
'x-collection-field': string;
|
|
29
|
+
};
|
|
30
|
+
content: {
|
|
31
|
+
'x-component': string;
|
|
32
|
+
'x-collection-field': string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import { ISchema } from '@formily/react';
|
|
10
|
+
export declare const messageManagerSchema: ISchema;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
export declare enum MessageFieldNames {
|
|
10
|
+
templateType = "templateType",
|
|
11
|
+
content = "content"
|
|
12
|
+
}
|
|
13
|
+
export declare enum MessageScopeNames {
|
|
14
|
+
ChannelOptions = "channelOptions",
|
|
15
|
+
useSendAction = "useSendAction"
|
|
16
|
+
}
|
|
17
|
+
export declare enum MessageComponentNames {
|
|
18
|
+
AddNew = "AddNew",
|
|
19
|
+
ReceiverConfigForm = "ReceiverConfigForm",
|
|
20
|
+
MessageInput = "MessageInput",
|
|
21
|
+
MessageLogManager = "MessageLogManager"
|
|
22
|
+
}
|
|
23
|
+
export declare enum MessageActionNames {
|
|
24
|
+
useSendAction = "useSendAction"
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
import { RegisterChannelOptions } from './manager/channel/types';
|
|
10
|
+
export default class NotificationManager {
|
|
11
|
+
channelTypes: any;
|
|
12
|
+
registerChannelType(options: RegisterChannelOptions): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import { CollectionOptions } from '@nocobase/client';
|
|
10
|
+
declare const channelCollection: CollectionOptions;
|
|
11
|
+
export default channelCollection;
|
|
@@ -0,0 +1,145 @@
|
|
|
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 channel_exports = {};
|
|
28
|
+
__export(channel_exports, {
|
|
29
|
+
default: () => channel_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(channel_exports);
|
|
32
|
+
var import_constant = require("../constant");
|
|
33
|
+
const channelCollection = {
|
|
34
|
+
name: import_constant.COLLECTION_NAME.channels,
|
|
35
|
+
autoGenId: false,
|
|
36
|
+
filterTargetKey: "name",
|
|
37
|
+
fields: [
|
|
38
|
+
{
|
|
39
|
+
name: "name",
|
|
40
|
+
type: "uid",
|
|
41
|
+
primaryKey: true,
|
|
42
|
+
interface: "input",
|
|
43
|
+
uiSchema: {
|
|
44
|
+
type: "string",
|
|
45
|
+
title: '{{t("Channel name")}}',
|
|
46
|
+
"x-component": "Input",
|
|
47
|
+
"x-read-pretty": true,
|
|
48
|
+
required: true,
|
|
49
|
+
description: "{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "title",
|
|
54
|
+
type: "string",
|
|
55
|
+
interface: "input",
|
|
56
|
+
uiSchema: {
|
|
57
|
+
type: "string",
|
|
58
|
+
"x-component": "Input",
|
|
59
|
+
title: '{{t("Channel display name")}}',
|
|
60
|
+
required: true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "options",
|
|
65
|
+
type: "json",
|
|
66
|
+
interface: "json",
|
|
67
|
+
uiSchema: {
|
|
68
|
+
type: "object",
|
|
69
|
+
"x-component": "ConfigForm"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
interface: "input",
|
|
74
|
+
type: "string",
|
|
75
|
+
name: "notificationType",
|
|
76
|
+
uiSchema: {
|
|
77
|
+
type: "string",
|
|
78
|
+
title: '{{t("Notification type")}}',
|
|
79
|
+
"x-component": "Select",
|
|
80
|
+
enum: "{{notificationTypeOptions}}",
|
|
81
|
+
required: true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "description",
|
|
86
|
+
type: "text",
|
|
87
|
+
interface: "textarea",
|
|
88
|
+
uiSchema: {
|
|
89
|
+
type: "string",
|
|
90
|
+
"x-component": "Input.TextArea",
|
|
91
|
+
title: '{{t("Description")}}'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "CreatedAt",
|
|
96
|
+
type: "date",
|
|
97
|
+
interface: "createdAt",
|
|
98
|
+
field: "createdAt",
|
|
99
|
+
uiSchema: {
|
|
100
|
+
type: "datetime",
|
|
101
|
+
title: '{{t("Created at")}}',
|
|
102
|
+
"x-component": "DatePicker",
|
|
103
|
+
"x-component-props": {},
|
|
104
|
+
"x-read-pretty": true
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "createdBy",
|
|
109
|
+
type: "belongsTo",
|
|
110
|
+
interface: "createdBy",
|
|
111
|
+
description: null,
|
|
112
|
+
parentKey: null,
|
|
113
|
+
reverseKey: null,
|
|
114
|
+
target: "users",
|
|
115
|
+
foreignKey: "createdById",
|
|
116
|
+
uiSchema: {
|
|
117
|
+
type: "object",
|
|
118
|
+
title: '{{t("Created by")}}',
|
|
119
|
+
"x-component": "AssociationField",
|
|
120
|
+
"x-component-props": {
|
|
121
|
+
fieldNames: {
|
|
122
|
+
value: "id",
|
|
123
|
+
label: "nickname"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"x-read-pretty": true
|
|
127
|
+
},
|
|
128
|
+
targetKey: "id"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "updatedAt",
|
|
132
|
+
type: "date",
|
|
133
|
+
interface: "updatedAt",
|
|
134
|
+
field: "updatedAt",
|
|
135
|
+
uiSchema: {
|
|
136
|
+
type: "string",
|
|
137
|
+
title: '{{t("Last updated at")}}',
|
|
138
|
+
"x-component": "DatePicker",
|
|
139
|
+
"x-component-props": {},
|
|
140
|
+
"x-read-pretty": true
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
};
|
|
145
|
+
var channel_default = channelCollection;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import { CollectionOptions } from '@nocobase/client';
|
|
10
|
+
declare const collectionOption: CollectionOptions;
|
|
11
|
+
export default collectionOption;
|
|
@@ -0,0 +1,155 @@
|
|
|
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 messageLog_exports = {};
|
|
28
|
+
__export(messageLog_exports, {
|
|
29
|
+
default: () => messageLog_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(messageLog_exports);
|
|
32
|
+
var import_constant = require("../constant");
|
|
33
|
+
const collectionOption = {
|
|
34
|
+
name: import_constant.COLLECTION_NAME.logs,
|
|
35
|
+
title: "MessageLogs",
|
|
36
|
+
fields: [
|
|
37
|
+
{
|
|
38
|
+
name: "id",
|
|
39
|
+
type: "uuid",
|
|
40
|
+
primaryKey: true,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
interface: "uuid",
|
|
43
|
+
uiSchema: {
|
|
44
|
+
type: "string",
|
|
45
|
+
title: '{{t("ID")}}',
|
|
46
|
+
"x-component": "Input",
|
|
47
|
+
"x-read-pretty": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "channelName",
|
|
52
|
+
type: "string",
|
|
53
|
+
interface: "input",
|
|
54
|
+
uiSchema: {
|
|
55
|
+
type: "string",
|
|
56
|
+
title: '{{t("Channel name")}}',
|
|
57
|
+
"x-component": "Input"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "channelTitle",
|
|
62
|
+
type: "string",
|
|
63
|
+
interface: "input",
|
|
64
|
+
uiSchema: {
|
|
65
|
+
type: "string",
|
|
66
|
+
"x-component": "Input",
|
|
67
|
+
title: '{{t("Channel display name")}}'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "triggerFrom",
|
|
72
|
+
type: "string",
|
|
73
|
+
interface: "input",
|
|
74
|
+
uiSchema: {
|
|
75
|
+
type: "string",
|
|
76
|
+
"x-component": "Input",
|
|
77
|
+
title: '{{t("Trigger from")}}'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "notificationType",
|
|
82
|
+
type: "string",
|
|
83
|
+
interface: "input",
|
|
84
|
+
uiSchema: {
|
|
85
|
+
type: "string",
|
|
86
|
+
title: '{{t("Notification type")}}',
|
|
87
|
+
"x-component": "Select",
|
|
88
|
+
enum: "{{notificationTypeOptions}}",
|
|
89
|
+
required: true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "status",
|
|
94
|
+
type: "string",
|
|
95
|
+
interface: "select",
|
|
96
|
+
uiSchema: {
|
|
97
|
+
type: "string",
|
|
98
|
+
"x-component": "Select",
|
|
99
|
+
enum: [
|
|
100
|
+
{ label: '{{t("Success")}}', value: "success", color: "green" },
|
|
101
|
+
{ label: '{{t("Failure")}}', value: "failure", color: "red" }
|
|
102
|
+
],
|
|
103
|
+
title: '{{t("Status")}}'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "message",
|
|
108
|
+
type: "json",
|
|
109
|
+
interface: "json",
|
|
110
|
+
uiSchema: {
|
|
111
|
+
"x-component": "Input.JSON",
|
|
112
|
+
title: '{{t("Message")}}',
|
|
113
|
+
"x-component-props": { autoSize: { minRows: 5 } },
|
|
114
|
+
autoSize: { minRows: 5 }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "reason",
|
|
119
|
+
type: "string",
|
|
120
|
+
interface: "input",
|
|
121
|
+
uiSchema: {
|
|
122
|
+
type: "string",
|
|
123
|
+
"x-component": "Input",
|
|
124
|
+
title: '{{t("Failed reason")}}'
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "createdAt",
|
|
129
|
+
type: "date",
|
|
130
|
+
interface: "createdAt",
|
|
131
|
+
field: "createdAt",
|
|
132
|
+
uiSchema: {
|
|
133
|
+
type: "datetime",
|
|
134
|
+
title: '{{t("Created at")}}',
|
|
135
|
+
"x-component": "DatePicker",
|
|
136
|
+
"x-component-props": {},
|
|
137
|
+
"x-read-pretty": true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "updatedAt",
|
|
142
|
+
type: "date",
|
|
143
|
+
interface: "updatedAt",
|
|
144
|
+
field: "updatedAt",
|
|
145
|
+
uiSchema: {
|
|
146
|
+
type: "datetime",
|
|
147
|
+
title: '{{t("Last updated at")}}',
|
|
148
|
+
"x-component": "DatePicker",
|
|
149
|
+
"x-component-props": {},
|
|
150
|
+
"x-read-pretty": true
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
};
|
|
155
|
+
var messageLog_default = collectionOption;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export declare enum COLLECTION_NAME {
|
|
10
|
+
templates = "templates",
|
|
11
|
+
channels = "notificationChannels",
|
|
12
|
+
messages = "messages",
|
|
13
|
+
logs = "notificationSendLogs"
|
|
14
|
+
}
|
package/dist/constant.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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 constant_exports = {};
|
|
28
|
+
__export(constant_exports, {
|
|
29
|
+
COLLECTION_NAME: () => COLLECTION_NAME
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(constant_exports);
|
|
32
|
+
var COLLECTION_NAME = /* @__PURE__ */ ((COLLECTION_NAME2) => {
|
|
33
|
+
COLLECTION_NAME2["templates"] = "templates";
|
|
34
|
+
COLLECTION_NAME2["channels"] = "notificationChannels";
|
|
35
|
+
COLLECTION_NAME2["messages"] = "messages";
|
|
36
|
+
COLLECTION_NAME2["logs"] = "notificationSendLogs";
|
|
37
|
+
return COLLECTION_NAME2;
|
|
38
|
+
})(COLLECTION_NAME || {});
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
COLLECTION_NAME
|
|
42
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
module.exports = {
|
|
11
|
+
"react": "18.2.0",
|
|
12
|
+
"antd": "5.12.8",
|
|
13
|
+
"@nocobase/client": "1.4.0-alpha.20240928155737",
|
|
14
|
+
"@nocobase/utils": "1.4.0-alpha.20240928155737",
|
|
15
|
+
"@nocobase/server": "1.4.0-alpha.20240928155737",
|
|
16
|
+
"@nocobase/logger": "1.4.0-alpha.20240928155737",
|
|
17
|
+
"@formily/react": "2.3.0",
|
|
18
|
+
"@formily/core": "2.3.0",
|
|
19
|
+
"react-i18next": "11.18.6",
|
|
20
|
+
"@nocobase/database": "1.4.0-alpha.20240928155737",
|
|
21
|
+
"@formily/shared": "2.3.0",
|
|
22
|
+
"@ant-design/icons": "5.2.6",
|
|
23
|
+
"@formily/antd-v5": "1.2.2",
|
|
24
|
+
"@nocobase/plugin-workflow": "1.4.0-alpha.20240928155737"
|
|
25
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export { default } from './server';
|
|
10
|
+
export { BaseNotificationChannel } from './server/base-notification-channel';
|
|
11
|
+
export * from './server';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
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 __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var src_exports = {};
|
|
39
|
+
__export(src_exports, {
|
|
40
|
+
BaseNotificationChannel: () => import_base_notification_channel.BaseNotificationChannel,
|
|
41
|
+
default: () => import_server.default
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(src_exports);
|
|
44
|
+
var import_server = __toESM(require("./server"));
|
|
45
|
+
var import_base_notification_channel = require("./server/base-notification-channel");
|
|
46
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
BaseNotificationChannel,
|
|
50
|
+
...require("./server")
|
|
51
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Notification Management": "Notification Management",
|
|
3
|
+
"Notification": "Notification",
|
|
4
|
+
"Channels": "Channels",
|
|
5
|
+
"Channel": "Channel",
|
|
6
|
+
"Channel title": "Channel title",
|
|
7
|
+
"Channel name": "Channel name",
|
|
8
|
+
"Channel display name": "Channel display name",
|
|
9
|
+
"Content": "Content",
|
|
10
|
+
"Receivers":"Receivers",
|
|
11
|
+
"Receiver": "Receiver",
|
|
12
|
+
"Add new receiver": "Add new receiver",
|
|
13
|
+
"Templates": "Templates",
|
|
14
|
+
"Logs": "Logs",
|
|
15
|
+
"Title": "Title",
|
|
16
|
+
"Description": "Description",
|
|
17
|
+
"Notification type": "Notification type",
|
|
18
|
+
"Actions": "Actions",
|
|
19
|
+
"Configure": "Configure",
|
|
20
|
+
"Add new": "Add new",
|
|
21
|
+
"Trigger From": "Trigger From",
|
|
22
|
+
"Status": "Status",
|
|
23
|
+
"Created At": "Created At",
|
|
24
|
+
"Delete record": "Delete record",
|
|
25
|
+
"Are you sure you want to delete it?": "Are you sure you want to delete it?",
|
|
26
|
+
"Deleted successfully!": "Deleted successfully!",
|
|
27
|
+
"Add user": "Add user",
|
|
28
|
+
"Select users": "Select users",
|
|
29
|
+
"Query users": "Query users",
|
|
30
|
+
"Receiver type": "Receiver type",
|
|
31
|
+
"No channel enabled yet": "No channel enabled yet",
|
|
32
|
+
"Success": "Success",
|
|
33
|
+
"Fail": "Fail",
|
|
34
|
+
"Reason": "Reason",
|
|
35
|
+
"Failed reason": "Failed reason",
|
|
36
|
+
"Log detail": "Log detail",
|
|
37
|
+
"Message": "Message",
|
|
38
|
+
"Notification manager": "Notification manager"
|
|
39
|
+
}
|