@activepieces/piece-line 0.0.1 → 0.0.2
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 +6 -6
- package/src/index.js +14 -5
- package/src/index.js.map +1 -1
- package/src/lib/actions/push-message.js +8 -8
- package/src/lib/actions/push-message.js.map +1 -1
- package/src/lib/trigger/new-message.d.ts +5 -1
- package/src/lib/trigger/new-message.js +2 -2
- package/src/lib/trigger/new-message.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-line",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.26.8",
|
|
6
|
-
"axios": "^1.6.
|
|
6
|
+
"axios": "^1.6.3",
|
|
7
7
|
"dayjs": "1.11.9",
|
|
8
8
|
"is-base64": "1.1.0",
|
|
9
9
|
"lodash": "4.17.21",
|
|
10
10
|
"nanoid": "3.3.6",
|
|
11
11
|
"semver": "7.5.4",
|
|
12
|
-
"@activepieces/pieces-common": "0.2.
|
|
13
|
-
"@activepieces/pieces-framework": "0.7.
|
|
14
|
-
"@activepieces/shared": "0.10.
|
|
15
|
-
"tslib": "
|
|
12
|
+
"@activepieces/pieces-common": "0.2.8",
|
|
13
|
+
"@activepieces/pieces-framework": "0.7.14",
|
|
14
|
+
"@activepieces/shared": "0.10.66",
|
|
15
|
+
"tslib": "2.6.2"
|
|
16
16
|
},
|
|
17
17
|
"main": "./src/index.js",
|
|
18
18
|
"type": "commonjs"
|
package/src/index.js
CHANGED
|
@@ -4,17 +4,26 @@ exports.line = exports.lineAuth2 = void 0;
|
|
|
4
4
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
5
|
const push_message_1 = require("./lib/actions/push-message");
|
|
6
6
|
const new_message_1 = require("./lib/trigger/new-message");
|
|
7
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
8
|
exports.lineAuth2 = pieces_framework_1.PieceAuth.SecretText({
|
|
8
|
-
displayName:
|
|
9
|
+
displayName: 'Bot Token',
|
|
9
10
|
required: true,
|
|
10
11
|
});
|
|
11
12
|
exports.line = (0, pieces_framework_1.createPiece)({
|
|
12
|
-
displayName:
|
|
13
|
+
displayName: 'Line Bot',
|
|
13
14
|
auth: exports.lineAuth2,
|
|
14
15
|
minimumSupportedRelease: '0.9.0',
|
|
15
|
-
logoUrl:
|
|
16
|
-
authors: [
|
|
17
|
-
actions: [push_message_1.pushMessage
|
|
16
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/line.png',
|
|
17
|
+
authors: ['abuaboud'],
|
|
18
|
+
actions: [push_message_1.pushMessage,
|
|
19
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
20
|
+
baseUrl: () => 'https://api.line.me/v2',
|
|
21
|
+
auth: exports.lineAuth2,
|
|
22
|
+
authMapping: (auth) => ({
|
|
23
|
+
'Authorization': `Bearer ${auth}`,
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
],
|
|
18
27
|
triggers: [new_message_1.newMessage],
|
|
19
28
|
});
|
|
20
29
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/line/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AACxE,6DAAyD;AACzD,2DAAuD;AACvD,+DAAwE;AAE3D,QAAA,SAAS,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC5C,WAAW,EAAE,WAAW;IACxB,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEU,QAAA,IAAI,GAAG,IAAA,8BAAW,EAAC;IAC9B,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,iBAAS;IACf,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,8CAA8C;IACvD,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,OAAO,EAAE,CAAC,0BAAW;QACnB,IAAA,yCAAyB,EAAC;YACtB,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB;YACvC,IAAI,EAAE,iBAAS;YACf,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACpB,eAAe,EAAE,UAAU,IAAI,EAAE;aACpC,CAAC;SACL,CAAC;KACL;IACC,QAAQ,EAAE,CAAC,wBAAU,CAAC;CACvB,CAAC,CAAC"}
|
|
@@ -19,7 +19,7 @@ exports.pushMessage = (0, pieces_framework_1.createAction)({
|
|
|
19
19
|
text: pieces_framework_1.Property.ShortText({
|
|
20
20
|
displayName: 'Text',
|
|
21
21
|
required: true,
|
|
22
|
-
})
|
|
22
|
+
}),
|
|
23
23
|
},
|
|
24
24
|
run(context) {
|
|
25
25
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -31,14 +31,14 @@ exports.pushMessage = (0, pieces_framework_1.createAction)({
|
|
|
31
31
|
token: context.auth,
|
|
32
32
|
},
|
|
33
33
|
body: {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
to: context.propsValue.userId,
|
|
35
|
+
messages: [
|
|
36
36
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
37
|
+
type: 'text',
|
|
38
|
+
text: context.propsValue.text,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-message.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"push-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/line/src/lib/actions/push-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,6BAAkC;AAClC,+DAIqC;AAExB,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,aAAS;IACf,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kCAAkC;IAC/C,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,OAAO,0BAAU,CAAC,WAAW,CAAC;gBAC5B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,yCAAyC;gBAC9C,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI;iBACpB;gBACD,IAAI,EAAE;oBACJ,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;oBAC7B,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI;yBAC9B;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
2
|
export declare const newMessage: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").PieceAuthProperty, {
|
|
3
|
-
md: import("
|
|
3
|
+
md: import("../../../../../../../dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
4
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").PieceAuthProperty, {
|
|
5
|
+
md: import("../../../../../../../dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").PieceAuthProperty, {
|
|
7
|
+
md: import("../../../../../../../dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
4
8
|
}>;
|
|
@@ -17,7 +17,7 @@ exports.newMessage = (0, pieces_framework_1.createTrigger)({
|
|
|
17
17
|
description: 'Triggers when a new message is received',
|
|
18
18
|
props: {
|
|
19
19
|
md: pieces_framework_1.Property.MarkDown({
|
|
20
|
-
value: markdown
|
|
20
|
+
value: markdown,
|
|
21
21
|
}),
|
|
22
22
|
},
|
|
23
23
|
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
@@ -40,6 +40,6 @@ exports.newMessage = (0, pieces_framework_1.createTrigger)({
|
|
|
40
40
|
}
|
|
41
41
|
return events.filter((event) => event.mode === 'active' && event.type === 'message');
|
|
42
42
|
});
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
44
|
});
|
|
45
45
|
//# sourceMappingURL=new-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-message.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"new-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/line/src/lib/trigger/new-message.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AAExC,MAAM,QAAQ,GAAG;;;;;;CAMhB,CAAC;AAEW,QAAA,UAAU,GAAG,IAAA,gCAAa,EAAC;IACtC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,4BAAS,CAAC,IAAI,EAAE;IACtB,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACpB,KAAK,EAAE,QAAQ;SAChB,CAAC;KACH;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,UAAU,EAAE,EAAE;IACR,QAAQ,CAAC,OAAO;;YACpB,QAAQ;QACV,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACrB,QAAQ;QACV,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,IAA6B,CAAC;YACjE,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,EAAE,CAAC;aACX;YACD,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CACpE,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|