@activepieces/piece-slack 0.16.4 → 0.16.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.
- package/package.json +5 -115
- package/src/i18n/translation.json +3 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/lib/actions/get-group-by-handle.d.ts +7 -0
- package/src/lib/actions/get-group-by-handle.d.ts.map +1 -0
- package/src/lib/actions/get-group-by-handle.js +36 -0
- package/src/lib/actions/get-group-by-handle.js.map +1 -0
- package/src/lib/actions/update-user-groups.d.ts +9 -0
- package/src/lib/actions/update-user-groups.d.ts.map +1 -0
- package/src/lib/actions/update-user-groups.js +60 -0
- package/src/lib/actions/update-user-groups.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,126 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-slack",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.5",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
8
|
+
"@activepieces/pieces-framework": "0.28.1",
|
|
9
|
+
"@activepieces/shared": "0.68.3",
|
|
7
10
|
"@slack/web-api": "7.9.0",
|
|
8
11
|
"slackify-markdown": "4.4.0",
|
|
9
12
|
"zod": "4.3.6",
|
|
10
|
-
"tslib": "2.6.2"
|
|
11
|
-
"@slack/logger": "4.0.1",
|
|
12
|
-
"@slack/types": "2.20.1",
|
|
13
|
-
"@types/node": "24.11.0",
|
|
14
|
-
"@types/retry": "0.12.0",
|
|
15
|
-
"axios": "1.13.5",
|
|
16
|
-
"eventemitter3": "5.0.4",
|
|
17
|
-
"form-data": "4.0.4",
|
|
18
|
-
"is-electron": "2.2.2",
|
|
19
|
-
"is-stream": "2.0.1",
|
|
20
|
-
"p-queue": "6.6.2",
|
|
21
|
-
"p-retry": "4.6.2",
|
|
22
|
-
"retry": "0.13.1",
|
|
23
|
-
"mdast-util-to-markdown": "0.6.5",
|
|
24
|
-
"remark-gfm": "1.0.0",
|
|
25
|
-
"remark-parse": "9.0.0",
|
|
26
|
-
"remark-stringify": "9.0.1",
|
|
27
|
-
"unified": "9.2.2",
|
|
28
|
-
"unist-util-remove": "2.1.0",
|
|
29
|
-
"unist-util-visit": "2.0.3",
|
|
30
|
-
"undici-types": "7.16.0",
|
|
31
|
-
"follow-redirects": "1.15.11",
|
|
32
|
-
"proxy-from-env": "1.1.0",
|
|
33
|
-
"asynckit": "0.4.0",
|
|
34
|
-
"combined-stream": "1.0.8",
|
|
35
|
-
"es-set-tostringtag": "2.1.0",
|
|
36
|
-
"hasown": "2.0.2",
|
|
37
|
-
"mime-types": "2.1.35",
|
|
38
|
-
"p-timeout": "3.2.0",
|
|
39
|
-
"@types/unist": "2.0.11",
|
|
40
|
-
"longest-streak": "2.0.4",
|
|
41
|
-
"mdast-util-to-string": "2.0.0",
|
|
42
|
-
"parse-entities": "2.0.0",
|
|
43
|
-
"repeat-string": "1.6.1",
|
|
44
|
-
"zwitch": "1.0.5",
|
|
45
|
-
"mdast-util-gfm": "0.1.2",
|
|
46
|
-
"micromark-extension-gfm": "0.3.3",
|
|
47
|
-
"mdast-util-from-markdown": "0.8.5",
|
|
48
|
-
"bail": "1.0.5",
|
|
49
|
-
"extend": "3.0.2",
|
|
50
|
-
"is-buffer": "2.0.5",
|
|
51
|
-
"is-plain-obj": "2.1.0",
|
|
52
|
-
"trough": "1.0.5",
|
|
53
|
-
"vfile": "4.2.1",
|
|
54
|
-
"unist-util-is": "4.1.0",
|
|
55
|
-
"unist-util-visit-parents": "3.1.1",
|
|
56
|
-
"delayed-stream": "1.0.0",
|
|
57
|
-
"es-errors": "1.3.0",
|
|
58
|
-
"get-intrinsic": "1.3.0",
|
|
59
|
-
"has-tostringtag": "1.0.2",
|
|
60
|
-
"function-bind": "1.1.2",
|
|
61
|
-
"mime-db": "1.52.0",
|
|
62
|
-
"p-finally": "1.0.0",
|
|
63
|
-
"character-entities": "1.2.4",
|
|
64
|
-
"character-entities-legacy": "1.1.4",
|
|
65
|
-
"character-reference-invalid": "1.1.4",
|
|
66
|
-
"is-alphanumerical": "1.0.4",
|
|
67
|
-
"is-decimal": "1.0.4",
|
|
68
|
-
"is-hexadecimal": "1.0.4",
|
|
69
|
-
"mdast-util-gfm-autolink-literal": "0.1.3",
|
|
70
|
-
"mdast-util-gfm-strikethrough": "0.2.3",
|
|
71
|
-
"mdast-util-gfm-table": "0.1.6",
|
|
72
|
-
"mdast-util-gfm-task-list-item": "0.1.6",
|
|
73
|
-
"micromark": "2.11.4",
|
|
74
|
-
"micromark-extension-gfm-autolink-literal": "0.5.7",
|
|
75
|
-
"micromark-extension-gfm-strikethrough": "0.6.5",
|
|
76
|
-
"micromark-extension-gfm-table": "0.4.3",
|
|
77
|
-
"micromark-extension-gfm-tagfilter": "0.3.0",
|
|
78
|
-
"micromark-extension-gfm-task-list-item": "0.3.3",
|
|
79
|
-
"@types/mdast": "3.0.15",
|
|
80
|
-
"unist-util-stringify-position": "2.0.3",
|
|
81
|
-
"vfile-message": "2.0.4",
|
|
82
|
-
"call-bind-apply-helpers": "1.0.2",
|
|
83
|
-
"es-define-property": "1.0.1",
|
|
84
|
-
"es-object-atoms": "1.1.1",
|
|
85
|
-
"get-proto": "1.0.1",
|
|
86
|
-
"gopd": "1.2.0",
|
|
87
|
-
"has-symbols": "1.1.0",
|
|
88
|
-
"math-intrinsics": "1.1.0",
|
|
89
|
-
"is-alphabetical": "1.0.4",
|
|
90
|
-
"ccount": "1.1.0",
|
|
91
|
-
"mdast-util-find-and-replace": "1.1.1",
|
|
92
|
-
"markdown-table": "2.0.0",
|
|
93
|
-
"debug": "4.4.3",
|
|
94
|
-
"dunder-proto": "1.0.1",
|
|
95
|
-
"escape-string-regexp": "4.0.0",
|
|
96
|
-
"ms": "2.1.3",
|
|
97
|
-
"@types/debug": "4.1.13",
|
|
98
|
-
"decode-named-character-reference": "1.3.0",
|
|
99
|
-
"devlop": "1.1.0",
|
|
100
|
-
"micromark-core-commonmark": "2.0.3",
|
|
101
|
-
"micromark-factory-space": "2.0.1",
|
|
102
|
-
"micromark-util-character": "2.1.1",
|
|
103
|
-
"micromark-util-chunked": "2.0.1",
|
|
104
|
-
"micromark-util-combine-extensions": "2.0.1",
|
|
105
|
-
"micromark-util-decode-numeric-character-reference": "2.0.2",
|
|
106
|
-
"micromark-util-encode": "2.0.1",
|
|
107
|
-
"micromark-util-normalize-identifier": "2.0.1",
|
|
108
|
-
"micromark-util-resolve-all": "2.0.1",
|
|
109
|
-
"micromark-util-sanitize-uri": "2.0.1",
|
|
110
|
-
"micromark-util-subtokenize": "2.1.0",
|
|
111
|
-
"micromark-util-symbol": "2.0.1",
|
|
112
|
-
"micromark-util-types": "2.0.2",
|
|
113
|
-
"@types/ms": "2.1.0",
|
|
114
|
-
"dequal": "2.0.3",
|
|
115
|
-
"micromark-factory-destination": "2.0.1",
|
|
116
|
-
"micromark-factory-label": "2.0.1",
|
|
117
|
-
"micromark-factory-title": "2.0.1",
|
|
118
|
-
"micromark-factory-whitespace": "2.0.1",
|
|
119
|
-
"micromark-util-classify-character": "2.0.1",
|
|
120
|
-
"micromark-util-html-tag-name": "2.0.1",
|
|
121
|
-
"@activepieces/pieces-common": "0.12.1",
|
|
122
|
-
"@activepieces/pieces-framework": "0.27.2",
|
|
123
|
-
"@activepieces/shared": "0.60.0"
|
|
13
|
+
"tslib": "2.6.2"
|
|
124
14
|
},
|
|
125
15
|
"scripts": {
|
|
126
16
|
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
@@ -150,6 +150,7 @@
|
|
|
150
150
|
"New Mention in Channel": "New Mention in Channel",
|
|
151
151
|
"New Mention in Direct Message": "New Mention in Direct Message",
|
|
152
152
|
"New Reaction": "New Reaction",
|
|
153
|
+
"Reaction Removed": "Reaction Removed",
|
|
153
154
|
"Channel created": "Channel created",
|
|
154
155
|
"New Command in Channel": "New Command in Channel",
|
|
155
156
|
"New Command in Direct Message": "New Command in Direct Message",
|
|
@@ -163,6 +164,7 @@
|
|
|
163
164
|
"Triggers when a user or user group is mentioned.": "Triggers when a user or user group is mentioned.",
|
|
164
165
|
"Triggers when a username is mentioned in a direct message channel.": "Triggers when a username is mentioned in a direct message channel.",
|
|
165
166
|
"Triggers when a new reaction is added to a message": "Triggers when a new reaction is added to a message",
|
|
167
|
+
"Triggers when a reaction is removed from a message": "Triggers when a reaction is removed from a message",
|
|
166
168
|
"Triggers when a channel is created": "Triggers when a channel is created",
|
|
167
169
|
"Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2)": "Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2)",
|
|
168
170
|
"Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2) via Direct Message.": "Triggers when a specific command is sent to the bot (e.g., @bot command arg1 arg2) via Direct Message.",
|
|
@@ -184,6 +186,7 @@
|
|
|
184
186
|
"If enabled, provides a clean_text field with the user and user group mentions removed from the message.": "If enabled, provides a clean_text field with the user and user group mentions removed from the message.",
|
|
185
187
|
"Select emojis to trigger on": "Select emojis to trigger on",
|
|
186
188
|
"If no channel is selected, the flow will be triggered for reactions in all channels the app has access to": "If no channel is selected, the flow will be triggered for reactions in all channels the app has access to",
|
|
189
|
+
"If no channel is selected, the flow will be triggered for reactions removed in all channels the app has access to": "If no channel is selected, the flow will be triggered for reactions removed in all channels the app has access to",
|
|
187
190
|
"List of valid commands that the bot should respond to (e.g., help, ocr, remind)": "List of valid commands that the bot should respond to (e.g., help, ocr, remind)",
|
|
188
191
|
"If no channel is selected, the flow will be triggered for commands in all channels": "If no channel is selected, the flow will be triggered for commands in all channels",
|
|
189
192
|
"Select the type of modal interaction to trigger on.": "Select the type of modal interaction to trigger on.",
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAqDA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,KAAK;;;MAoKhB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -47,6 +47,8 @@ const delete_message_1 = require("./lib/actions/delete-message");
|
|
|
47
47
|
const new_modal_interaction_1 = require("./lib/triggers/new-modal-interaction");
|
|
48
48
|
const auth_1 = require("./lib/auth");
|
|
49
49
|
const auth_helpers_1 = require("./lib/common/auth-helpers");
|
|
50
|
+
const update_user_groups_1 = require("./lib/actions/update-user-groups");
|
|
51
|
+
const get_group_by_handle_1 = require("./lib/actions/get-group-by-handle");
|
|
50
52
|
var auth_2 = require("./lib/auth");
|
|
51
53
|
Object.defineProperty(exports, "slackAuth", { enumerable: true, get: function () { return auth_2.slackAuth; } });
|
|
52
54
|
Object.defineProperty(exports, "slackOAuth2Auth", { enumerable: true, get: function () { return auth_2.slackOAuth2Auth; } });
|
|
@@ -155,6 +157,8 @@ exports.slack = (0, pieces_framework_1.createPiece)({
|
|
|
155
157
|
set_channel_topic_1.setChannelTopicAction,
|
|
156
158
|
get_message_1.getMessageAction,
|
|
157
159
|
invite_user_to_channel_1.inviteUserToChannelAction,
|
|
160
|
+
get_group_by_handle_1.getGroupByHandleAction,
|
|
161
|
+
update_user_groups_1.updateGroupUsersAction,
|
|
158
162
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
159
163
|
baseUrl: () => {
|
|
160
164
|
return 'https://slack.com/api';
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAgG;AAChG,qEAGwC;AAExC,iDAAqD;AACrD,sEAAiC;AACjC,+FAA+F;AAC/F,iFAAkF;AAClF,mGAAmG;AACnG,qFAA0F;AAC1F,yFAAwF;AACxF,2EAA2E;AAC3E,0EAAqE;AACrE,8EAAyE;AACzE,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;AAChF,gGAAgG;AAChG,gGAAgG;AAChG,uEAAwE;AACxE,2DAA6D;AAC7D,mEAAmE;AACnE,sDAAyD;AACzD,wEAA0E;AAC1E,gFAAiF;AACjF,iFAAiF;AACjF,yDAAqD;AACrD,iEAAmE;AACnE,gFAAkF;AAClF,qCAAuC;AACvC,4DAAsE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAgG;AAChG,qEAGwC;AAExC,iDAAqD;AACrD,sEAAiC;AACjC,+FAA+F;AAC/F,iFAAkF;AAClF,mGAAmG;AACnG,qFAA0F;AAC1F,yFAAwF;AACxF,2EAA2E;AAC3E,0EAAqE;AACrE,8EAAyE;AACzE,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;AAChF,gGAAgG;AAChG,gGAAgG;AAChG,uEAAwE;AACxE,2DAA6D;AAC7D,mEAAmE;AACnE,sDAAyD;AACzD,wEAA0E;AAC1E,gFAAiF;AACjF,iFAAiF;AACj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,EAAE;gBACV,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;oBAC9B,WAAW,EAAE,gBAAgB;oBAC7B,WAAW,EAAE,qCAAqC;oBAClD,QAAQ,EAAE,IAAI;oBACd,YAAY,EAAE,KAAK;iBACpB,CAAC;aACH;SACF,CAAC;KACH;IACD,QAAQ,EAAE;QACR,+BAAiB;QACjB,mDAA0B;QAC1B,4CAAuB;QACvB,wBAAU;QACV,gEAAgC;QAChC,qCAAgB;QAChB,yCAAkB;QAClB,4BAAc;QACd,wBAAU;QACV,gEAAgC;QAChC,yBAAc;QACd,0CAAsB;QACtB,iDAAyB;QACzB,kDAA0B;KAC3B;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const getGroupByHandleAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
botToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
userToken: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
handle: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=get-group-by-handle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-group-by-handle.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-group-by-handle.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB;;;;;EA6BjC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGroupByHandleAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
|
+
const web_api_1 = require("@slack/web-api");
|
|
8
|
+
const auth_helpers_1 = require("../common/auth-helpers");
|
|
9
|
+
exports.getGroupByHandleAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.slackAuth,
|
|
11
|
+
name: 'get_group_by_handle',
|
|
12
|
+
displayName: 'Get User Group by Handle',
|
|
13
|
+
description: 'Finds a Slack user group by its handle (e.g., @user-group) and returns its details. To mention this group in a message, map the returned ID using the syntax <!subteam^ID>. Read more: https://api.slack.com/reference/surfaces/formatting#mentioning-groups',
|
|
14
|
+
props: {
|
|
15
|
+
handle: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Group Handle',
|
|
17
|
+
description: 'Group handle without the leading @',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a;
|
|
24
|
+
const token = (0, auth_helpers_1.getBotToken)(context.auth);
|
|
25
|
+
const client = new web_api_1.WebClient(token);
|
|
26
|
+
const searchHandle = context.propsValue.handle.replace('@', '').toLowerCase();
|
|
27
|
+
const response = yield client.usergroups.list();
|
|
28
|
+
const group = (_a = response.usergroups) === null || _a === void 0 ? void 0 : _a.find((g) => g.handle && g.handle.toLowerCase() === searchHandle);
|
|
29
|
+
if (!group) {
|
|
30
|
+
throw new Error(`User group with handle '@${searchHandle}' not found.`);
|
|
31
|
+
}
|
|
32
|
+
return group;
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=get-group-by-handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-group-by-handle.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-group-by-handle.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,kCAAoC;AACpC,4CAA2C;AAC3C,yDAAqE;AAExD,QAAA,sBAAsB,GAAG,IAAA,+BAAY,EAAC;IACjD,IAAI,EAAE,gBAAS;IACf,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,8PAA8P;IAC3Q,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,KAAK,GAAG,IAAA,0BAAW,EAAC,OAAO,CAAC,IAAsB,CAAC,CAAC;YAC1D,MAAM,MAAM,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;YACpC,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;YAE9E,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YAEhD,MAAM,KAAK,GAAG,MAAA,QAAQ,CAAC,UAAU,0CAAE,IAAI,CACrC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,YAAY,CAC3D,CAAC;YAEF,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,4BAA4B,YAAY,cAAc,CAAC,CAAC;YAC1E,CAAC;YAED,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const updateGroupUsersAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
botToken: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
userToken: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
handle: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
userIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
7
|
+
appendUsers: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=update-user-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-user-groups.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-user-groups.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB;;;;;;;EAyDjC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateGroupUsersAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
|
+
const web_api_1 = require("@slack/web-api");
|
|
8
|
+
const auth_helpers_1 = require("../common/auth-helpers");
|
|
9
|
+
exports.updateGroupUsersAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.slackAuth,
|
|
11
|
+
name: 'update_group_users',
|
|
12
|
+
displayName: 'Update User Group Members',
|
|
13
|
+
description: 'Add users to or overwrite the member list of a Slack user group.',
|
|
14
|
+
props: {
|
|
15
|
+
handle: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Group Handle',
|
|
17
|
+
description: 'Group handle without the leading @',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
userIds: pieces_framework_1.Property.Array({
|
|
21
|
+
displayName: 'User IDs',
|
|
22
|
+
description: 'The list of Slack User IDs to update this group with. Leave empty to clear the group (if not appending).',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
appendUsers: pieces_framework_1.Property.Checkbox({
|
|
26
|
+
displayName: 'Append to existing members?',
|
|
27
|
+
description: 'If checked, these users will be added to the current group. If unchecked, the current group members will be completely replaced by these users.',
|
|
28
|
+
required: true,
|
|
29
|
+
defaultValue: true,
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
run(context) {
|
|
33
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
var _a;
|
|
35
|
+
const token = (0, auth_helpers_1.getBotToken)(context.auth);
|
|
36
|
+
const client = new web_api_1.WebClient(token);
|
|
37
|
+
const searchHandle = context.propsValue.handle.replace('@', '').toLowerCase();
|
|
38
|
+
const rawUserIds = (context.propsValue.userIds || []);
|
|
39
|
+
const userIds = rawUserIds.filter((id) => id && id.trim() !== '');
|
|
40
|
+
const appendUsers = context.propsValue.appendUsers;
|
|
41
|
+
const listResponse = yield client.usergroups.list({ include_users: true });
|
|
42
|
+
const group = (_a = listResponse.usergroups) === null || _a === void 0 ? void 0 : _a.find((g) => g.handle && g.handle.toLowerCase() === searchHandle);
|
|
43
|
+
if (!group || !group.id) {
|
|
44
|
+
throw new Error(`User group with handle '@${searchHandle}' not found.`);
|
|
45
|
+
}
|
|
46
|
+
let finalUserIds = userIds;
|
|
47
|
+
if (appendUsers) {
|
|
48
|
+
const existingUsers = group.users || [];
|
|
49
|
+
finalUserIds = Array.from(new Set([...existingUsers, ...userIds]));
|
|
50
|
+
}
|
|
51
|
+
const usersString = finalUserIds.join(', ');
|
|
52
|
+
const updateResponse = yield client.usergroups.users.update({
|
|
53
|
+
usergroup: group.id,
|
|
54
|
+
users: usersString,
|
|
55
|
+
});
|
|
56
|
+
return updateResponse;
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=update-user-groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-user-groups.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-user-groups.ts"],"names":[],"mappings":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