@activepieces/piece-slack 0.11.2 → 0.11.3
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 -2
- package/src/i18n/translation.json +4 -1
- package/src/lib/actions/send-direct-message-action.d.ts +1 -0
- package/src/lib/actions/send-direct-message-action.js +2 -0
- package/src/lib/actions/send-direct-message-action.js.map +1 -1
- package/src/lib/actions/send-message-action.d.ts +1 -0
- package/src/lib/actions/send-message-action.js +3 -1
- package/src/lib/actions/send-message-action.js.map +1 -1
- package/src/lib/common/props.d.ts +1 -0
- package/src/lib/common/props.js +6 -1
- package/src/lib/common/props.js.map +1 -1
- package/src/lib/common/utils.d.ts +2 -1
- package/src/lib/common/utils.js +2 -1
- package/src/lib/common/utils.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-slack",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.34.11",
|
|
6
6
|
"@slack/web-api": "7.9.0",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"axios-retry": "4.4.1",
|
|
10
10
|
"deepmerge-ts": "7.1.0",
|
|
11
11
|
"form-data": "4.0.4",
|
|
12
|
+
"i18next": "23.13.0",
|
|
12
13
|
"mime-types": "2.1.35",
|
|
13
14
|
"nanoid": "3.3.8",
|
|
14
15
|
"semver": "7.6.0",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
"zod": "4.1.13",
|
|
18
19
|
"@activepieces/pieces-common": "0.11.1",
|
|
19
20
|
"@activepieces/pieces-framework": "0.23.0",
|
|
20
|
-
"@activepieces/shared": "0.
|
|
21
|
+
"@activepieces/shared": "0.32.0",
|
|
21
22
|
"tslib": "2.6.2"
|
|
22
23
|
},
|
|
23
24
|
"resolutions": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"Find User by ID": "Find User by ID",
|
|
16
16
|
"List users": "List users",
|
|
17
17
|
"Update message": "Update message",
|
|
18
|
+
"Delete Message": "Delete Message",
|
|
18
19
|
"Create Channel": "Create Channel",
|
|
19
20
|
"Update Profile": "Update Profile",
|
|
20
21
|
"Get channel history": "Get channel history",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"Finds a user by their ID.": "Finds a user by their ID.",
|
|
41
42
|
"List all users of the workspace": "List all users of the workspace",
|
|
42
43
|
"Update an existing message": "Update an existing message",
|
|
44
|
+
"Deletes a specific message from a channel using the message's timestamp.": "Deletes a specific message from a channel using the message's timestamp.",
|
|
43
45
|
"Creates a new channel.": "Creates a new channel.",
|
|
44
46
|
"Update basic profile field such as name or title.": "Update basic profile field such as name or title.",
|
|
45
47
|
"Retrieve all messages from a specific channel (\"conversation\") between specified timestamps": "Retrieve all messages from a specific channel (\"conversation\") between specified timestamps",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"Mention flow of origin?": "Mention flow of origin?",
|
|
62
64
|
"Block Kit blocks": "Block Kit blocks",
|
|
63
65
|
"Unfurl Links": "Unfurl Links",
|
|
66
|
+
"Send as a bot?": "Send as a bot?",
|
|
64
67
|
"Reply to Thread (Thread Message Link/Timestamp)": "Reply to Thread (Thread Message Link/Timestamp)",
|
|
65
68
|
"Attachment": "Attachment",
|
|
66
69
|
"Broadcast reply to channel": "Broadcast reply to channel",
|
|
@@ -113,6 +116,7 @@
|
|
|
113
116
|
"User handle (display name), without the leading @": "User handle (display name), without the leading @",
|
|
114
117
|
"Please provide the timestamp of the message you wish to update, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to update, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",
|
|
115
118
|
"The updated text of your message": "The updated text of your message",
|
|
119
|
+
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",
|
|
116
120
|
"Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot message to the user informing them of the change.": "Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot message to the user informing them of the change.",
|
|
117
121
|
"ID of user to change. This argument may only be specified by admins on paid teams.You can use **Find User by Email** action to retrieve ID.": "ID of user to change. This argument may only be specified by admins on paid teams.You can use **Find User by Email** action to retrieve ID.",
|
|
118
122
|
"Only messages after this timestamp will be included in results": "Only messages after this timestamp will be included in results",
|
|
@@ -122,7 +126,6 @@
|
|
|
122
126
|
"Emoji shortname (standard or custom), e.g. :tada: or :train:": "Emoji shortname (standard or custom), e.g. :tada: or :train:",
|
|
123
127
|
"Unix timestamp - if not set, the status will not expire": "Unix timestamp - if not set, the status will not expire",
|
|
124
128
|
"Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.": "Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.",
|
|
125
|
-
"Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.": "Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and selecting the `Copy link` option.",
|
|
126
129
|
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
127
130
|
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
128
131
|
"Use user token instead of bot token": "Use user token instead of bot token",
|
|
@@ -3,6 +3,7 @@ export declare const slackSendDirectMessageAction: import("@activepieces/pieces-
|
|
|
3
3
|
text: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
4
4
|
username: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
5
|
profilePicture: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
iconEmoji: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
7
|
mentionOriginFlow: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
8
|
blocks: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
8
9
|
unfurlLinks: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
@@ -17,6 +17,7 @@ exports.slackSendDirectMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
17
17
|
text: props_1.text,
|
|
18
18
|
username: props_1.username,
|
|
19
19
|
profilePicture: props_1.profilePicture,
|
|
20
|
+
iconEmoji: props_1.iconEmoji,
|
|
20
21
|
mentionOriginFlow: props_1.mentionOriginFlow,
|
|
21
22
|
blocks: props_1.blocks,
|
|
22
23
|
unfurlLinks: pieces_framework_1.Property.Checkbox({
|
|
@@ -50,6 +51,7 @@ exports.slackSendDirectMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
50
51
|
text,
|
|
51
52
|
username: context.propsValue.username,
|
|
52
53
|
profilePicture: context.propsValue.profilePicture,
|
|
54
|
+
iconEmoji: context.propsValue.iconEmoji,
|
|
53
55
|
conversationId: userId,
|
|
54
56
|
blocks: blockList,
|
|
55
57
|
unfurlLinks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-direct-message-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/send-direct-message-action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAAmD;AACnD,8BAAmC;AACnC,iDAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"send-direct-message-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/send-direct-message-action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAAmD;AACnD,8BAAmC;AACnC,iDAAgE;AAChE,2CAQyB;AAIZ,QAAA,4BAA4B,GAAG,IAAA,+BAAY,EAAC;IACvD,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,wBAAwB;IACrC,KAAK,EAAE;QACL,MAAM,EAAN,cAAM;QACN,IAAI,EAAJ,YAAI;QACJ,QAAQ,EAAR,gBAAQ;QACR,cAAc,EAAd,sBAAc;QACd,SAAS,EAAT,iBAAS;QACT,iBAAiB,EAAjB,yBAAiB;QACjB,MAAM,EAAN,cAAM;QACN,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;YACxC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEpF,IAAA,iCAAwB,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACzC,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACvC,IAAA,iCAAwB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAE3C,MAAM,SAAS,GAA2B,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;YAE/F,IAAG,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnC,SAAS,CAAC,IAAI,CAAC,GAAI,MAA4C,CAAC,CAAA;YAClE,CAAC;YAED,IAAG,iBAAiB,EAAE,CAAC;gBACpB,SAA0B,aAA1B,SAAS,uBAAT,SAAS,CAAmB,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE;wBAC7D;4BACE,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,oBAAoB,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,aAAa,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc;yBACpJ;qBACF,EAAE,CAAC,CAAA;YACN,CAAC;YAED,OAAO,IAAA,wBAAgB,EAAC;gBACtB,KAAK;gBACL,IAAI;gBACJ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;gBACrC,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,cAAc;gBACjD,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACvC,cAAc,EAAE,MAAM;gBACtB,MAAM,EAAC,SAAS;gBAChB,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ export declare const slackSendMessageAction: import("@activepieces/pieces-framew
|
|
|
6
6
|
threadTs: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
7
|
username: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
8
|
profilePicture: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
iconEmoji: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
10
|
file: import("@activepieces/pieces-framework").FileProperty<false>;
|
|
10
11
|
replyBroadcast: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
11
12
|
mentionOriginFlow: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
@@ -27,6 +27,7 @@ exports.slackSendMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
27
27
|
threadTs: props_1.threadTs,
|
|
28
28
|
username: props_1.username,
|
|
29
29
|
profilePicture: props_1.profilePicture,
|
|
30
|
+
iconEmoji: props_1.iconEmoji,
|
|
30
31
|
file: pieces_framework_1.Property.File({
|
|
31
32
|
displayName: 'Attachment',
|
|
32
33
|
required: false,
|
|
@@ -49,7 +50,7 @@ exports.slackSendMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
49
50
|
run(context) {
|
|
50
51
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
52
|
var _a, _b;
|
|
52
|
-
const { text, channel, sendAsBot, username, profilePicture, threadTs, file, mentionOriginFlow, blocks, replyBroadcast, unfurlLinks } = context.propsValue;
|
|
53
|
+
const { text, channel, sendAsBot, username, profilePicture, iconEmoji, threadTs, file, mentionOriginFlow, blocks, replyBroadcast, unfurlLinks } = context.propsValue;
|
|
53
54
|
const token = sendAsBot ? context.auth.access_token : (_b = (_a = context.auth.data) === null || _a === void 0 ? void 0 : _a.authed_user) === null || _b === void 0 ? void 0 : _b.access_token;
|
|
54
55
|
if (!text && (!blocks || !Array.isArray(blocks) || blocks.length === 0)) {
|
|
55
56
|
throw new Error('Either Message or Block Kit blocks must be provided');
|
|
@@ -74,6 +75,7 @@ exports.slackSendMessageAction = (0, pieces_framework_1.createAction)({
|
|
|
74
75
|
text: text || undefined,
|
|
75
76
|
username,
|
|
76
77
|
profilePicture,
|
|
78
|
+
iconEmoji,
|
|
77
79
|
conversationId: channel,
|
|
78
80
|
threadTs: threadTs ? (0, utils_1.processMessageTimestamp)(threadTs) : undefined,
|
|
79
81
|
file,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-message-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/send-message-action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,
|
|
1
|
+
{"version":3,"file":"send-message-action.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/send-message-action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CASyB;AACzB,2CAA4E;AAC5E,8BAAmC;AAItB,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,aAAS;IACf,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;QACL,IAAI,EAAE,+BAAuB;QAC7B,OAAO,EAAE,IAAA,oBAAY,EAAC,IAAI,CAAC;QAC3B,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,sGAAsG;YACnH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAC,2BAAQ,CAAC,QAAQ,CAAC;YAC1B,WAAW,EAAC,gBAAgB;YAC5B,QAAQ,EAAC,IAAI;YACb,YAAY,EAAC,IAAI;SAClB,CAAC;QACF,QAAQ,EAAR,gBAAQ;QACR,QAAQ,EAAR,gBAAQ;QACR,cAAc,EAAd,sBAAc;QACd,SAAS,EAAT,iBAAS;QACT,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAClB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,WAAW,EAAE,4BAA4B;YACzC,WAAW,EAAE,yIAAyI;YACtJ,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;QACF,iBAAiB,EAAjB,yBAAiB;QACjB,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;QACF,MAA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I,EAAE,SAAS,EAAE,QAAQ,EAAE;wBAC7D;4BACE,MAAM,EAAE,QAAQ;4BAChB,MAAM,EAAE,oBAAoB,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,aAAa,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc;yBACpJ;qBACF,EAAE,CAAC,CAAA;YACN,CAAC;YAED,OAAO,IAAA,wBAAgB,EAAC;gBACtB,KAAK;gBACL,IAAI,EAAE,IAAI,IAAI,SAAS;gBACvB,QAAQ;gBACR,cAAc;gBACd,SAAS;gBACT,cAAc,EAAE,OAAO;gBACvB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAA,+BAAuB,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;gBAClE,IAAI;gBACJ,MAAM,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;gBACpD,cAAc;gBACd,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ export declare const singleSelectChannelInfo: import("dist/packages/pieces/commu
|
|
|
3
3
|
export declare const slackChannel: <R extends boolean>(required: R) => R extends true ? import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> : import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
4
4
|
export declare const username: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
5
|
export declare const profilePicture: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
export declare const iconEmoji: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
7
|
export declare const threadTs: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
8
|
export declare const mentionOriginFlow: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
9
|
export declare const blocks: import("@activepieces/pieces-framework").JsonProperty<false>;
|
package/src/lib/common/props.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.actions = exports.text = exports.userId = exports.blocks = exports.mentionOriginFlow = exports.threadTs = exports.profilePicture = exports.username = exports.slackChannel = exports.singleSelectChannelInfo = exports.multiSelectChannelInfo = void 0;
|
|
3
|
+
exports.actions = exports.text = exports.userId = exports.blocks = exports.mentionOriginFlow = exports.threadTs = exports.iconEmoji = exports.profilePicture = exports.username = exports.slackChannel = exports.singleSelectChannelInfo = exports.multiSelectChannelInfo = void 0;
|
|
4
4
|
exports.getChannels = getChannels;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
@@ -58,6 +58,11 @@ exports.profilePicture = pieces_framework_1.Property.ShortText({
|
|
|
58
58
|
description: 'The profile picture of the bot',
|
|
59
59
|
required: false,
|
|
60
60
|
});
|
|
61
|
+
exports.iconEmoji = pieces_framework_1.Property.ShortText({
|
|
62
|
+
displayName: 'Icon Emoji',
|
|
63
|
+
description: 'The icon emoji of the bot',
|
|
64
|
+
required: false,
|
|
65
|
+
});
|
|
61
66
|
exports.threadTs = pieces_framework_1.Property.ShortText({
|
|
62
67
|
displayName: 'Reply to Thread (Thread Message Link/Timestamp)',
|
|
63
68
|
description: 'Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Alternatively, you can easily obtain the message link by clicking on the three dots next to the parent message and selecting the `Copy link` option.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/common/props.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/common/props.ts"],"names":[],"mappings":";;;AAgKA,kCA0BC;;AA1LD,qEAA+E;AAC/E,4CAA8D;AAC9D,uCAAsC;AACtC,MAAM,0BAA0B,GAAG;;;;;GAKhC,CAAC;AAES,QAAA,sBAAsB,GAAG,2BAAQ,CAAC,QAAQ,CAAC;IACtD,KAAK,EACH,0BAA0B;QAC1B,uPAAuP;CAC1P,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,2BAAQ,CAAC,QAAQ,CAAC;IACvD,KAAK,EACH,0BAA0B;QAC1B;GACD;CACF,CAAC,CAAC;AAEI,MAAM,YAAY,GAAG,CAAoB,QAAW,EAAE,EAAE,CAC7D,2BAAQ,CAAC,QAAQ,CAA6B;IAC5C,IAAI,EAAE,iBAAS;IACf,WAAW,EAAE,SAAS;IACtB,WAAW,EACT,mGAAmG;IACrG,QAAQ;IACR,UAAU,EAAE,EAAE;IACR,OAAO;qEAAC,EAAE,IAAI,EAAE;YACpB,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,uBAAuB;oBACpC,OAAO,EAAE,EAAE;iBACZ,CAAC;YACJ,CAAC;YACD,MAAM,cAAc,GAAG,IAA2B,CAAC;YACnD,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;YAEnD,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,WAAW,CAAC,CAAC;YAEhD,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,gBAAgB;gBAC7B,OAAO,EAAE,QAAQ;aAClB,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC;AA3BQ,QAAA,YAAY,gBA2BpB;AAEQ,QAAA,QAAQ,GAAG,2BAAQ,CAAC,SAAS,CAAC;IACzC,WAAW,EAAE,UA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AAE;QAErD,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ApFile } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const slackSendMessage: ({ text, conversationId, username, profilePicture, blocks, threadTs, token, file, replyBroadcast, unfurlLinks, }: SlackSendMessageParams) => Promise<import("@slack/web-api").WebAPICallResult>;
|
|
2
|
+
export declare const slackSendMessage: ({ text, conversationId, username, profilePicture, iconEmoji, blocks, threadTs, token, file, replyBroadcast, unfurlLinks, }: SlackSendMessageParams) => Promise<import("@slack/web-api").WebAPICallResult>;
|
|
3
3
|
type SlackSendMessageParams = {
|
|
4
4
|
token: string;
|
|
5
5
|
conversationId: string;
|
|
6
6
|
username?: string;
|
|
7
7
|
profilePicture?: string;
|
|
8
|
+
iconEmoji?: string;
|
|
8
9
|
blocks?: unknown[] | Record<string, any>;
|
|
9
10
|
text?: string;
|
|
10
11
|
file?: ApFile;
|
package/src/lib/common/utils.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.getFirstFiveOrAll = getFirstFiveOrAll;
|
|
|
6
6
|
exports.parseCommand = parseCommand;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const web_api_1 = require("@slack/web-api");
|
|
9
|
-
const slackSendMessage = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ text, conversationId, username, profilePicture, blocks, threadTs, token, file, replyBroadcast, unfurlLinks, }) {
|
|
9
|
+
const slackSendMessage = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ text, conversationId, username, profilePicture, iconEmoji, blocks, threadTs, token, file, replyBroadcast, unfurlLinks, }) {
|
|
10
10
|
const client = new web_api_1.WebClient(token);
|
|
11
11
|
if (file) {
|
|
12
12
|
return yield client.files.uploadV2({
|
|
@@ -27,6 +27,7 @@ const slackSendMessage = (_a) => tslib_1.__awaiter(void 0, [_a], void 0, functio
|
|
|
27
27
|
channel: conversationId,
|
|
28
28
|
username,
|
|
29
29
|
icon_url: profilePicture,
|
|
30
|
+
icon_emoji: iconEmoji,
|
|
30
31
|
blocks: blocks,
|
|
31
32
|
thread_ts: threadTs,
|
|
32
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/common/utils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/common/utils.ts"],"names":[],"mappings":";;;AAmEA,0DAkBC;AAED,8CAMC;AAKD,oCAkCC;;AAnID,4CAAkD;AAE3C,MAAM,gBAAgB,GAAG,KAYL,EAAE,oDAZU,EACrC,IAAI,EACJ,cAAc,EACd,QAAQ,EACR,cAAc,EACd,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,cAAc,EACd,WAAW,GACY;IACvB,MAAM,MAAM,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;IAEpC,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;YACjC,UAAU,EAAE,cAAc;YAC1B,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE;gBACZ;oBACE,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB;aACF;SACF,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,GAAQ;YACzB,IAAI;YACJ,OAAO,EAAE,cAAc;YACvB,QAAQ;YACR,QAAQ,EAAE,cAAc;YACxB,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,MAAiB;YACzB,SAAS,EAAE,QAAQ;SACpB,CAAC;QAEF,IAAI,cAAc,EAAE,CAAC;YACnB,aAAa,CAAC,eAAe,GAAG,cAAc,CAAC;QACjD,CAAC;QAED,IAAI,W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