@activepieces/piece-slack 0.7.15 → 0.8.1
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 +3 -3
- package/src/index.js +14 -4
- package/src/index.js.map +1 -1
- package/src/lib/triggers/new-direct-message.d.ts +11 -0
- package/src/lib/triggers/new-direct-message.js +88 -0
- package/src/lib/triggers/new-direct-message.js.map +1 -0
- package/src/lib/triggers/new-message-in-channel.d.ts +14 -0
- package/src/lib/triggers/new-message-in-channel.js +108 -0
- package/src/lib/triggers/new-message-in-channel.js.map +1 -0
- package/src/lib/triggers/new-message.d.ts +1 -7
- package/src/lib/triggers/new-message.js +23 -22
- package/src/lib/triggers/new-message.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-slack",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@anthropic-ai/sdk": "0.33.1",
|
|
6
6
|
"@sinclair/typebox": "0.34.11",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"slackify-markdown": "4.4.0",
|
|
17
17
|
"zod": "3.23.8",
|
|
18
18
|
"@activepieces/pieces-common": "0.4.3",
|
|
19
|
-
"@activepieces/pieces-framework": "0.7.
|
|
20
|
-
"@activepieces/shared": "0.10.
|
|
19
|
+
"@activepieces/pieces-framework": "0.7.46",
|
|
20
|
+
"@activepieces/shared": "0.10.158",
|
|
21
21
|
"tslib": "1.14.1"
|
|
22
22
|
},
|
|
23
23
|
"overrides": {
|
package/src/index.js
CHANGED
|
@@ -12,7 +12,6 @@ const request_approval_direct_message_1 = require("./lib/actions/request-approva
|
|
|
12
12
|
const request_approval_message_1 = require("./lib/actions/request-approval-message");
|
|
13
13
|
const send_direct_message_action_1 = require("./lib/actions/send-direct-message-action");
|
|
14
14
|
const send_message_action_1 = require("./lib/actions/send-message-action");
|
|
15
|
-
const new_message_1 = require("./lib/triggers/new-message");
|
|
16
15
|
const new_reaction_added_1 = require("./lib/triggers/new-reaction-added");
|
|
17
16
|
const upload_file_1 = require("./lib/actions/upload-file");
|
|
18
17
|
const search_messages_1 = require("./lib/actions/search-messages");
|
|
@@ -29,10 +28,13 @@ const new_mention_1 = require("./lib/triggers/new-mention");
|
|
|
29
28
|
const markdown_to_slack_format_1 = require("./lib/actions/markdown-to-slack-format");
|
|
30
29
|
const new_command_1 = require("./lib/triggers/new-command");
|
|
31
30
|
const get_file_1 = require("./lib/actions/get-file");
|
|
31
|
+
const new_message_1 = require("./lib/triggers/new-message");
|
|
32
|
+
const new_message_in_channel_1 = require("./lib/triggers/new-message-in-channel");
|
|
33
|
+
const new_direct_message_1 = require("./lib/triggers/new-direct-message");
|
|
32
34
|
const retrieve_thread_messages_1 = require("./lib/actions/retrieve-thread-messages");
|
|
33
35
|
exports.slackAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
34
36
|
description: '',
|
|
35
|
-
authUrl: 'https://slack.com/oauth/v2/authorize?user_scope=search:read,users.profile:write,reactions:read',
|
|
37
|
+
authUrl: 'https://slack.com/oauth/v2/authorize?user_scope=search:read,users.profile:write,reactions:read,im:history',
|
|
36
38
|
tokenUrl: 'https://slack.com/api/oauth.v2.access',
|
|
37
39
|
required: true,
|
|
38
40
|
scope: [
|
|
@@ -55,7 +57,8 @@ exports.slackAuth = pieces_framework_1.PieceAuth.OAuth2({
|
|
|
55
57
|
'files:read',
|
|
56
58
|
'users:read.email',
|
|
57
59
|
'reactions:write',
|
|
58
|
-
'usergroups:read'
|
|
60
|
+
'usergroups:read',
|
|
61
|
+
'chat:write.customize',
|
|
59
62
|
],
|
|
60
63
|
});
|
|
61
64
|
exports.slack = (0, pieces_framework_1.createPiece)({
|
|
@@ -151,6 +154,13 @@ exports.slack = (0, pieces_framework_1.createPiece)({
|
|
|
151
154
|
},
|
|
152
155
|
}),
|
|
153
156
|
],
|
|
154
|
-
triggers: [
|
|
157
|
+
triggers: [
|
|
158
|
+
new_message_1.newMessageTrigger,
|
|
159
|
+
new_message_in_channel_1.newMessageInChannelTrigger,
|
|
160
|
+
new_direct_message_1.newDirectMessageTrigger,
|
|
161
|
+
new_mention_1.newMention,
|
|
162
|
+
new_reaction_added_1.newReactionAdded,
|
|
163
|
+
new_channel_1.channelCreated, new_command_1.newCommand,
|
|
164
|
+
],
|
|
155
165
|
});
|
|
156
166
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/slack/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAKwC;AACxC,iDAAqD;AACrD,sEAAiC;AACjC,+FAA+F;AAC/F,iFAAkF;AAClF,mGAAmG;AACnG,qFAA0F;AAC1F,yFAAwF;AACxF,2EAA2E;AAC3E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/slack/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAKwC;AACxC,iDAAqD;AACrD,sEAAiC;AACjC,+FAA+F;AAC/F,iFAAkF;AAClF,mGAAmG;AACnG,qFAA0F;AAC1F,yFAAwF;AACxF,2EAA2E;AAC3E,0EAAqE;AACrE,2DAAuD;AACvD,mEAA+D;AAC/D,iEAA6D;AAC7D,yEAAyE;AACzE,iEAAmE;AACnE,iEAAmE;AACnE,4DAA4D;AAC5D,mFAAkF;AAClF,2EAAsE;AACtE,2EAA2E;AAC3E,mEAAoE;AACpE,4DAAwD;AACxD,qFAA+E;AAC/E,4DAAwD;AACxD,qDAAuD;AACvD,4DAA+D;AAC/D,kFAAmF;AACnF,0EAA4E;AAC5E,qFAAgF;AAEnE,QAAA,SAAS,GAAG,4BAAS,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,EAAE;IACf,OAAO,EACN,2GAA2G;IAC5G,Q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,EAAE,2BAAQ,CAAC,QAAQ,CAAC;oBAC/B,WAAW,EAAE,gBAAgB;oBAC7B,WAAW,EAAE,qCAAqC;oBAClD,QAAQ,EAAE,IAAI;oBACd,YAAY,EAAE,KAAK;iBACnB,CAAC;aACF;SACD,CAAC;KACF;IACD,QAAQ,EAAE;QACT,+BAAiB;QACjB,mDAA0B;QAC1B,4CAAuB;QACvB,wBAAU;QACV,qCAAgB;QAChB,4BAAc,EAAE,wBAAU;KAC1B;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newDirectMessageTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
+
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
4
|
+
ignoreSelfMessages: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
5
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
6
|
+
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
7
|
+
ignoreSelfMessages: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
8
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
9
|
+
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
10
|
+
ignoreSelfMessages: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newDirectMessageTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const __1 = require("../../");
|
|
7
|
+
const sampleData = {
|
|
8
|
+
user: 'U06C9507WGH',
|
|
9
|
+
type: 'message',
|
|
10
|
+
ts: '1741787044.231539',
|
|
11
|
+
client_msg_id: '6f6e5257-6c39-40d8-bf22-f2bc2b7d8de9',
|
|
12
|
+
text: 'Test Message',
|
|
13
|
+
team: 'T06BTHUEFFF',
|
|
14
|
+
blocks: [
|
|
15
|
+
{
|
|
16
|
+
type: 'rich_text',
|
|
17
|
+
block_id: 'oUF4b',
|
|
18
|
+
elements: [
|
|
19
|
+
{
|
|
20
|
+
type: 'rich_text_section',
|
|
21
|
+
elements: [
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: 'Test Message',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
channel: 'D06BFVAL8CF',
|
|
32
|
+
event_ts: '1741787044.231539',
|
|
33
|
+
channel_type: 'im',
|
|
34
|
+
};
|
|
35
|
+
exports.newDirectMessageTrigger = (0, pieces_framework_1.createTrigger)({
|
|
36
|
+
auth: __1.slackAuth,
|
|
37
|
+
name: 'new-direct-message',
|
|
38
|
+
displayName: 'New Direct Message',
|
|
39
|
+
description: 'Triggers when a message was posted in a direct message channel.',
|
|
40
|
+
props: {
|
|
41
|
+
ignoreBots: pieces_framework_1.Property.Checkbox({
|
|
42
|
+
displayName: 'Ignore Bot Messages ?',
|
|
43
|
+
required: true,
|
|
44
|
+
defaultValue: false,
|
|
45
|
+
}),
|
|
46
|
+
ignoreSelfMessages: pieces_framework_1.Property.Checkbox({
|
|
47
|
+
displayName: 'Ignore Message from Yourself ?',
|
|
48
|
+
required: true,
|
|
49
|
+
defaultValue: false,
|
|
50
|
+
}),
|
|
51
|
+
},
|
|
52
|
+
type: pieces_framework_1.TriggerStrategy.APP_WEBHOOK,
|
|
53
|
+
sampleData: sampleData,
|
|
54
|
+
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
+
var _a;
|
|
56
|
+
// Older OAuth2 has team_id, newer has team.id
|
|
57
|
+
const teamId = (_a = context.auth.data['team_id']) !== null && _a !== void 0 ? _a : context.auth.data['team']['id'];
|
|
58
|
+
context.app.createListeners({
|
|
59
|
+
events: ['message'],
|
|
60
|
+
identifierValue: teamId,
|
|
61
|
+
});
|
|
62
|
+
}),
|
|
63
|
+
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
// Ignored
|
|
65
|
+
}),
|
|
66
|
+
test(context) {
|
|
67
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return [sampleData];
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
run(context) {
|
|
72
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
var _a;
|
|
74
|
+
const payloadBody = context.payload.body;
|
|
75
|
+
const userId = (_a = context.auth.data['authed_user']) === null || _a === void 0 ? void 0 : _a.id;
|
|
76
|
+
if (payloadBody.event.channel_type !== 'im') {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
// check for bot messages
|
|
80
|
+
if ((context.propsValue.ignoreBots && payloadBody.event.bot_id) ||
|
|
81
|
+
(context.propsValue.ignoreSelfMessages && payloadBody.event.user === userId)) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
return [payloadBody.event];
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=new-direct-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-direct-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/triggers/new-direct-message.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;A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E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;YAC3B,MAAM,EAAE,CAAC,SAAS,CAAC;YACnB,eAAe,EAAE,MAAM;SACvB,CAAC,CAAC;IACJ,CAAC,CAAA;IACD,SAAS,EAAE,CAAO,OAAO,EAAE,EAAE;QAC5B,UAAU;IACX,CAAC,CAAA;IAEK,IAAI,CAAC,OAAO;;YACjB,OAAO,CAAC,UAAU,CAAC,CAAC;QACrB,CAAC;KAAA;IAEK,GAAG,CAAC,OAAO;;;YAChB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,IAAmB,CAAC;YACxD,MAAM,MAAM,GAAG,MAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,0CAAE,EAAE,CAAC;YAEpD,IAAI,WAAW,CAAC,KAAK,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;gBAC7C,OAAO,EAAE,CAAC;YACX,CAAC;YAED,yBAAyB;YACzB,IACC,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC;gBAC3D,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,EAC3E,CAAC;gBACF,OAAO,EAAE,CAAC;YACX,CAAC;YACD,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newMessageInChannelTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
+
info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
4
|
+
channel: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
5
|
+
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
+
info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
+
channel: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
9
|
+
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
10
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
11
|
+
info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
12
|
+
channel: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
13
|
+
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newMessageInChannelTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const props_1 = require("../common/props");
|
|
7
|
+
const __1 = require("../../");
|
|
8
|
+
const web_api_1 = require("@slack/web-api");
|
|
9
|
+
const shared_1 = require("@activepieces/shared");
|
|
10
|
+
const utils_1 = require("../common/utils");
|
|
11
|
+
const sampleData = {
|
|
12
|
+
client_msg_id: '2767cf34-0651-44e0-b9c8-1b167ce9b7a9',
|
|
13
|
+
type: 'message',
|
|
14
|
+
text: 'f',
|
|
15
|
+
user: 'U037UG6FKPU',
|
|
16
|
+
ts: '1678231735.586539',
|
|
17
|
+
blocks: [
|
|
18
|
+
{
|
|
19
|
+
type: 'rich_text',
|
|
20
|
+
block_id: '4CM',
|
|
21
|
+
elements: [
|
|
22
|
+
{
|
|
23
|
+
type: 'rich_text_section',
|
|
24
|
+
elements: [
|
|
25
|
+
{
|
|
26
|
+
type: 'text',
|
|
27
|
+
text: 'f',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
team: 'T037MS4FGDC',
|
|
35
|
+
channel: 'C037RTX2ZDM',
|
|
36
|
+
event_ts: '1678231735.586539',
|
|
37
|
+
channel_type: 'channel',
|
|
38
|
+
};
|
|
39
|
+
exports.newMessageInChannelTrigger = (0, pieces_framework_1.createTrigger)({
|
|
40
|
+
auth: __1.slackAuth,
|
|
41
|
+
name: 'new-message-in-channel',
|
|
42
|
+
displayName: 'New Message Posted to Channel',
|
|
43
|
+
description: 'Triggers when a new message is posted to a specific #channel you choose.',
|
|
44
|
+
props: {
|
|
45
|
+
info: props_1.singleSelectChannelInfo,
|
|
46
|
+
channel: (0, props_1.slackChannel)(true),
|
|
47
|
+
ignoreBots: pieces_framework_1.Property.Checkbox({
|
|
48
|
+
displayName: 'Ignore Bot Messages ?',
|
|
49
|
+
required: true,
|
|
50
|
+
defaultValue: false,
|
|
51
|
+
}),
|
|
52
|
+
},
|
|
53
|
+
type: pieces_framework_1.TriggerStrategy.APP_WEBHOOK,
|
|
54
|
+
sampleData: sampleData,
|
|
55
|
+
onEnable(context) {
|
|
56
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
var _a;
|
|
58
|
+
// Older OAuth2 has team_id, newer has team.id
|
|
59
|
+
const teamId = (_a = context.auth.data['team_id']) !== null && _a !== void 0 ? _a : context.auth.data['team']['id'];
|
|
60
|
+
context.app.createListeners({
|
|
61
|
+
events: ['message'],
|
|
62
|
+
identifierValue: teamId,
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
onDisable(context) {
|
|
67
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
// Ignored
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
test(context) {
|
|
72
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
if (!context.propsValue.channel) {
|
|
74
|
+
return [sampleData];
|
|
75
|
+
}
|
|
76
|
+
const client = new web_api_1.WebClient(context.auth.access_token);
|
|
77
|
+
const response = yield client.conversations.history({
|
|
78
|
+
channel: context.propsValue.channel,
|
|
79
|
+
limit: 100,
|
|
80
|
+
});
|
|
81
|
+
if (!response.messages) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
const messages = response.messages
|
|
85
|
+
.filter((message) => !(0, shared_1.isNil)(message.ts))
|
|
86
|
+
.filter((message) => !(context.propsValue.ignoreBots && message.bot_id))
|
|
87
|
+
.map((message) => {
|
|
88
|
+
return Object.assign(Object.assign({}, message), { channel: context.propsValue.channel, event_ts: '1678231735.586539', channel_type: 'channel' });
|
|
89
|
+
})
|
|
90
|
+
.sort((a, b) => parseFloat(b.ts) - parseFloat(a.ts));
|
|
91
|
+
return (0, utils_1.getFirstFiveOrAll)(messages);
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
run(context) {
|
|
95
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const payloadBody = context.payload.body;
|
|
97
|
+
if (payloadBody.event.channel === context.propsValue.channel) {
|
|
98
|
+
// check for bot messages
|
|
99
|
+
if (context.propsValue.ignoreBots && payloadBody.event.bot_id) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
return [payloadBody.event];
|
|
103
|
+
}
|
|
104
|
+
return [];
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=new-message-in-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-message-in-channel.js","sourceRoot":"","sources":["../../../../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AC,UAAU,CAAC,CAAC,CAAC,EAAG,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAG,CAAC,CAAC,CAAC;YACxD,OAAO,IAAA,yBAAiB,EAAC,QAAQ,CAAC,CAAC;QACpC,CAAC;KAAA;IAEK,GAAG,CAAC,OAAO;;YAChB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,IAAmB,CAAC;YACxD,IAAI,WAAW,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;gBAC9D,yBAAyB;gBACzB,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;oBAC/D,OAAO,EAAE,CAAC;gBACX,CAAC;gBACD,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;YAED,OAAO,EAAE,CAAC;QACX,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const
|
|
3
|
-
info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
4
|
-
channel: import("@activepieces/pieces-framework").DropdownProperty<string, false>;
|
|
2
|
+
export declare const newMessageTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
3
|
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
6
4
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
-
info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
-
channel: import("@activepieces/pieces-framework").DropdownProperty<string, false>;
|
|
9
5
|
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
10
6
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
11
|
-
info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
12
|
-
channel: import("@activepieces/pieces-framework").DropdownProperty<string, false>;
|
|
13
7
|
ignoreBots: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
14
8
|
}>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.newMessageTrigger = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const props_1 = require("../common/props");
|
|
7
6
|
const __1 = require("../../");
|
|
8
7
|
const web_api_1 = require("@slack/web-api");
|
|
9
8
|
const shared_1 = require("@activepieces/shared");
|
|
@@ -36,14 +35,12 @@ const sampleData = {
|
|
|
36
35
|
event_ts: '1678231735.586539',
|
|
37
36
|
channel_type: 'channel',
|
|
38
37
|
};
|
|
39
|
-
exports.
|
|
38
|
+
exports.newMessageTrigger = (0, pieces_framework_1.createTrigger)({
|
|
40
39
|
auth: __1.slackAuth,
|
|
41
|
-
name: '
|
|
42
|
-
displayName: 'New Message',
|
|
43
|
-
description: 'Triggers when a new message is
|
|
40
|
+
name: 'new-message',
|
|
41
|
+
displayName: 'New Public Message Posted Anywhere',
|
|
42
|
+
description: 'Triggers when a new message is posted to any channel.',
|
|
44
43
|
props: {
|
|
45
|
-
info: props_1.singleSelectChannelInfo,
|
|
46
|
-
channel: (0, props_1.slackChannel)(false),
|
|
47
44
|
ignoreBots: pieces_framework_1.Property.Checkbox({
|
|
48
45
|
displayName: 'Ignore Bot Messages ?',
|
|
49
46
|
required: true,
|
|
@@ -65,36 +62,40 @@ exports.newMessage = (0, pieces_framework_1.createTrigger)({
|
|
|
65
62
|
// Ignored
|
|
66
63
|
}),
|
|
67
64
|
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
-
|
|
65
|
+
var _a;
|
|
66
|
+
const client = new web_api_1.WebClient(context.auth.access_token);
|
|
67
|
+
const channelList = yield client.conversations.list({
|
|
68
|
+
types: 'public_channel,private_channel',
|
|
69
|
+
exclude_archived: true,
|
|
70
|
+
limit: 1,
|
|
71
|
+
});
|
|
72
|
+
if (!channelList.channels || channelList.channels.length === 0) {
|
|
69
73
|
return [sampleData];
|
|
70
74
|
}
|
|
71
|
-
const
|
|
75
|
+
const channel = (_a = channelList.channels[0].id) !== null && _a !== void 0 ? _a : '';
|
|
72
76
|
const response = yield client.conversations.history({
|
|
73
|
-
channel:
|
|
77
|
+
channel: channel,
|
|
74
78
|
limit: 100,
|
|
75
79
|
});
|
|
76
80
|
if (!response.messages) {
|
|
77
|
-
return [];
|
|
81
|
+
return [sampleData];
|
|
78
82
|
}
|
|
79
83
|
const messages = response.messages
|
|
80
84
|
.filter((message) => !(0, shared_1.isNil)(message.ts))
|
|
81
85
|
.filter((message) => !(context.propsValue.ignoreBots && message.bot_id))
|
|
82
86
|
.map((message) => {
|
|
83
|
-
return Object.assign(Object.assign({}, message), {
|
|
84
|
-
})
|
|
87
|
+
return Object.assign(Object.assign({}, message), { event_ts: '1678231735.586539', channel_type: 'channel' });
|
|
88
|
+
})
|
|
89
|
+
.sort((a, b) => parseFloat(b.ts) - parseFloat(a.ts));
|
|
85
90
|
return (0, utils_1.getFirstFiveOrAll)(messages);
|
|
86
91
|
}),
|
|
87
92
|
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
88
93
|
const payloadBody = context.payload.body;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (context.propsValue.ignoreBots && payloadBody.event.bot_id) {
|
|
93
|
-
return [];
|
|
94
|
-
}
|
|
95
|
-
return [payloadBody.event];
|
|
94
|
+
// check for bot messages
|
|
95
|
+
if (context.propsValue.ignoreBots && payloadBody.event.bot_id) {
|
|
96
|
+
return [];
|
|
96
97
|
}
|
|
97
|
-
return [];
|
|
98
|
+
return [payloadBody.event];
|
|
98
99
|
}),
|
|
99
100
|
});
|
|
100
101
|
//# sourceMappingURL=new-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/triggers/new-message.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"new-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/triggers/new-message.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,8BAAmC;AACnC,4CAA2C;AAC3C,iDAA6C;AAC7C,2CAAoD;AAEpD,MAAM,UAAU,GAAG;IAClB,aAAa,EAAE,sCAAsC;IACrD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE;QACP;YACC,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,mBAAmB;oBACzB,QAAQ,EAAE;wBACT;4BACC,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,GAAG;yBACT;qBACD;iBACD;aACD;SACD;KACD;IACD,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,mBAAmB;IAC7B,YAAY,EAAE,SAAS;CACvB,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,gCAAa,EAAC;IAC9C,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,oCAAoC;IACjD,WAAW,EAAE,uDAAuD;I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