@activepieces/piece-slack 0.7.0 → 0.7.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
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-slack",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.32.35",
|
|
6
6
|
"@slack/web-api": "7.0.4",
|
|
7
7
|
"axios": "1.7.4",
|
|
8
8
|
"dayjs": "1.11.9",
|
|
9
|
+
"deepmerge": "4.3.1",
|
|
9
10
|
"nanoid": "3.3.6",
|
|
10
11
|
"semver": "7.6.0",
|
|
11
12
|
"@activepieces/pieces-common": "0.2.15",
|
|
12
13
|
"@activepieces/pieces-framework": "0.7.34",
|
|
13
14
|
"@activepieces/shared": "0.10.116",
|
|
14
|
-
"tslib": "
|
|
15
|
+
"tslib": "2.6.2"
|
|
15
16
|
},
|
|
16
17
|
"main": "./src/index.js",
|
|
17
18
|
"type": "commonjs"
|
|
@@ -2,4 +2,5 @@ export declare const uploadFile: import("@activepieces/pieces-framework").IActio
|
|
|
2
2
|
file: import("@activepieces/pieces-framework").FileProperty<true>;
|
|
3
3
|
title: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
4
|
filename: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
channel: import("@activepieces/pieces-framework").DropdownProperty<string, false>;
|
|
5
6
|
}>;
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const index_1 = require("../../index");
|
|
7
7
|
const web_api_1 = require("@slack/web-api");
|
|
8
|
+
const props_1 = require("../common/props");
|
|
8
9
|
exports.uploadFile = (0, pieces_framework_1.createAction)({
|
|
9
10
|
auth: index_1.slackAuth,
|
|
10
11
|
name: 'uploadFile',
|
|
@@ -23,15 +24,17 @@ exports.uploadFile = (0, pieces_framework_1.createAction)({
|
|
|
23
24
|
displayName: 'Filename',
|
|
24
25
|
required: false,
|
|
25
26
|
}),
|
|
27
|
+
channel: (0, props_1.slackChannel)(false),
|
|
26
28
|
},
|
|
27
29
|
run(context) {
|
|
28
30
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
31
|
const token = context.auth.access_token;
|
|
30
|
-
const { file, title, filename } = context.propsValue;
|
|
32
|
+
const { file, title, filename, channel } = context.propsValue;
|
|
31
33
|
const client = new web_api_1.WebClient(token);
|
|
32
34
|
return yield client.files.uploadV2({
|
|
33
35
|
file_uploads: [{ file: file.data, filename: filename || file.filename }],
|
|
34
36
|
title: title,
|
|
37
|
+
channel_id: channel,
|
|
35
38
|
});
|
|
36
39
|
});
|
|
37
40
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/upload-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAwC;AACxC,4CAA2C;
|
|
1
|
+
{"version":3,"file":"upload-file.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/slack/src/lib/actions/upload-file.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,uCAAwC;AACxC,4CAA2C;AAC3C,2CAEyB;AAEZ,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,iBAAS;IACf,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,qDAAqD;IAClE,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAClB,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,OAAO,EAAE,IAAA,oBAAY,EAAC,KAAK,CAAC;KAC7B;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;YACxC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC9D,MAAM,MAAM,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;YACpC,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;gBACjC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACxE,KAAK,EAAE,KAAK;gBACZ,UAAU,EAAE,OAAO;aACpB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|