@activepieces/piece-twilio 0.0.0-pre1

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-twilio
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running lint
6
+
7
+ Run `nx lint pieces-twilio` to execute the lint via [ESLint](https://eslint.org/).
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@activepieces/piece-twilio",
3
+ "version": "0.0.0-pre1",
4
+ "dependencies": {
5
+ "@sinclair/typebox": "0.24.51",
6
+ "axios": "1.2.4",
7
+ "cron-validator": "1.3.1",
8
+ "nanoid": "3.3.4"
9
+ },
10
+ "peerDependencies": {
11
+ "@activepieces/framework": "0.0.1",
12
+ "@activepieces/shared": "0.0.1",
13
+ "tslib": "2.4.1"
14
+ },
15
+ "main": "./src/index.js",
16
+ "types": "./src/index.d.ts"
17
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const twilio: import("@activepieces/framework").Piece;
package/src/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.twilio = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const framework_1 = require("@activepieces/framework");
7
+ const send_sms_1 = require("./lib/action/send-sms");
8
+ const new_incoming_sms_1 = require("./lib/trigger/new-incoming-sms");
9
+ exports.twilio = (0, framework_1.createPiece)({
10
+ name: 'twilio',
11
+ displayName: 'Twilio',
12
+ logoUrl: 'https://cdn.activepieces.com/pieces/twilio.png',
13
+ version: package_json_1.default.version,
14
+ actions: [send_sms_1.twilioSendSms],
15
+ authors: ['abuaboud'],
16
+ triggers: [new_incoming_sms_1.twilioNewIncomingSms],
17
+ });
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/twilio/src/index.ts"],"names":[],"mappings":";;;;AAAA,2EAA0C;AAC1C,uDAAsD;AACtD,oDAAsD;AACtD,qEAAsE;AAEzD,QAAA,MAAM,GAAG,IAAA,uBAAW,EAAC;IAC9B,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,gDAAgD;IACzD,OAAO,EAAE,sBAAW,CAAC,OAAO;IAC5B,OAAO,EAAE,CAAC,wBAAa,CAAC;IACxB,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,QAAQ,EAAE,CAAC,uCAAoB,CAAC;CACnC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const twilioSendSms: import("@activepieces/framework").Action;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.twilioSendSms = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const framework_1 = require("@activepieces/framework");
6
+ const common_1 = require("../common");
7
+ exports.twilioSendSms = (0, framework_1.createAction)({
8
+ name: 'send_sms',
9
+ description: 'Send a new SMS message',
10
+ displayName: 'Send SMS',
11
+ props: {
12
+ authentication: common_1.twilioCommon.authentication,
13
+ from: common_1.twilioCommon.phone_number,
14
+ body: framework_1.Property.ShortText({
15
+ description: 'The body of the message to send',
16
+ displayName: 'Message Body',
17
+ required: true,
18
+ }),
19
+ to: framework_1.Property.ShortText({
20
+ description: 'The phone number to send the message to',
21
+ displayName: 'To',
22
+ required: true,
23
+ })
24
+ },
25
+ run(context) {
26
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
+ const { body, to, from } = context.propsValue;
28
+ const account_sid = context.propsValue['authentication']['username'];
29
+ const auth_token = context.propsValue['authentication']['password'];
30
+ return yield (0, common_1.callTwilioApi)(framework_1.HttpMethod.POST, 'Messages.json', { account_sid, auth_token }, {
31
+ From: from,
32
+ Body: body,
33
+ To: to,
34
+ });
35
+ });
36
+ }
37
+ });
38
+ //# sourceMappingURL=send-sms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send-sms.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/twilio/src/lib/action/send-sms.ts"],"names":[],"mappings":";;;;AAAA,uDAA6E;AAC7E,sCAAwD;AAE3C,QAAA,aAAa,GAAG,IAAA,wBAAY,EAAC;IACtC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,UAAU;IACvB,KAAK,EAAE;QACH,cAAc,EAAE,qBAAY,CAAC,cAAc;QAC3C,IAAI,EAAE,qBAAY,CAAC,YAAY;QAC/B,IAAI,EAAE,oBAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,iCAAiC;YAC9C,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACjB,CAAC;QACF,EAAE,EAAE,oBAAQ,CAAC,SAAS,CAAC;YACnB,WAAW,EAAE,yCAAyC;YACtD,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,IAAI;SACjB,CAAC;KACL;IACK,GAAG,CAAC,OAAO;;YACb,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC9C,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAE,CAAC,UAAU,CAAE,CAAC;YACvE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAE,CAAC,UAAU,CAAE,CAAC;YACtE,OAAO,MAAM,IAAA,sBAAa,EAAC,sBAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE;gBACtF,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,IAAI;gBACV,EAAE,EAAE,EAAE;aACT,CAAC,CAAC;QAEP,CAAC;KAAA;CACJ,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { HttpMethod, HttpMessageBody } from "@activepieces/framework";
2
+ export declare const twilioCommon: {
3
+ authentication: import("@activepieces/framework").BasicAuthProperty<true>;
4
+ phone_number: import("@activepieces/framework").DropdownProperty<any, true>;
5
+ };
6
+ export declare const callTwilioApi: <T extends HttpMessageBody>(method: HttpMethod, path: string, auth: {
7
+ account_sid: string;
8
+ auth_token: string;
9
+ }, body?: any) => Promise<import("@activepieces/framework").HttpResponse<T>>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.callTwilioApi = exports.twilioCommon = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const framework_1 = require("@activepieces/framework");
6
+ exports.twilioCommon = {
7
+ authentication: framework_1.Property.BasicAuth({
8
+ description: 'The authentication to use to connect to Twilio',
9
+ displayName: 'Authentication',
10
+ required: true,
11
+ username: {
12
+ displayName: 'Account SID',
13
+ description: 'The account SID to use to connect to Twilio',
14
+ },
15
+ password: {
16
+ displayName: 'Auth token',
17
+ description: 'The auth token to use to connect to Twilio',
18
+ }
19
+ }),
20
+ phone_number: framework_1.Property.Dropdown({
21
+ description: 'The phone number to send the message from',
22
+ displayName: 'From',
23
+ required: true,
24
+ refreshers: ['authentication'],
25
+ options: (propsValue) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
26
+ if (!propsValue['authentication']) {
27
+ return {
28
+ disabled: true,
29
+ placeholder: 'connect your account first',
30
+ options: [],
31
+ };
32
+ }
33
+ const basicAuthProperty = propsValue['authentication'];
34
+ const response = yield (0, exports.callTwilioApi)(framework_1.HttpMethod.GET, 'IncomingPhoneNumbers.json', {
35
+ account_sid: basicAuthProperty.username,
36
+ auth_token: basicAuthProperty.password
37
+ });
38
+ return {
39
+ disabled: false,
40
+ options: response.body.incoming_phone_numbers.map((number) => ({
41
+ value: number.phone_number,
42
+ label: number.friendly_name,
43
+ })),
44
+ };
45
+ })
46
+ })
47
+ };
48
+ const callTwilioApi = (method, path, auth, body) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
49
+ return yield framework_1.httpClient.sendRequest({
50
+ method,
51
+ url: `https://api.twilio.com/2010-04-01/Accounts/${auth.account_sid}/${path}`,
52
+ authentication: {
53
+ type: framework_1.AuthenticationType.BASIC,
54
+ username: auth.account_sid,
55
+ password: auth.auth_token,
56
+ },
57
+ headers: {
58
+ 'Content-Type': 'application/x-www-form-urlencoded',
59
+ },
60
+ body: body,
61
+ });
62
+ });
63
+ exports.callTwilioApi = callTwilioApi;
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/twilio/src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,uDAAwI;AAE3H,QAAA,YAAY,GAAG;IACxB,cAAc,EAAE,oBAAQ,CAAC,SAAS,CAAC;QAC/B,WAAW,EAAE,gDAAgD;QAC7D,WAAW,EAAE,gBAAgB;QAC7B,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE;YACN,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,6CAA6C;SAC7D;QACD,QAAQ,EAAE;YACN,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,4CAA4C;SAC5D;KACJ,CAAC;IACF,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC;QAC5B,WAAW,EAAE,2CAA2C;QACxD,WAAW,EAAE,MAAM;QACnB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,CAAC,gBAAgB,CAAC;QAC9B,OAAO,EAAE,CAAO,UAAU,EAAE,EAAE;YAC1B,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBAC/B,OAAO;oBACH,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,4BAA4B;oBACzC,OAAO,EAAE,EAAE;iBACd,CAAC;aACL;YAED,MAAM,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAA2B,CAAC;YACjF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAa,EAAgF,sBAAU,CAAC,GAAG,EAAE,2BAA2B,EAAE;gBAC7J,WAAW,EAAE,iBAAiB,CAAC,QAAQ;gBACvC,UAAU,EAAE,iBAAiB,CAAC,QAAQ;aACzC,CAAC,CAAC;YACH,OAAO;gBACH,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,CAAC;oBAChE,KAAK,EAAE,MAAM,CAAC,YAAY;oBAC1B,KAAK,EAAE,MAAM,CAAC,aAAa;iBAC9B,CAAC,CAAC;aACN,CAAA;QACL,CAAC,CAAA;KACJ,CAAC;CACL,CAAA;AAEM,MAAM,aAAa,GAAG,CAAkC,MAAkB,EAAE,IAAY,EAAE,IAAiD,EAAE,IAAU,EAAE,EAAE;IAC9J,OAAO,MAAM,sBAAU,CAAC,WAAW,CAAI;QACnC,MAAM;QACN,GAAG,EAAE,8CAA8C,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;QAC7E,cAAc,EAAE;YACZ,IAAI,EAAE,8BAAkB,CAAC,KAAK;YAC9B,QAAQ,EAAE,IAAI,CAAC,WAAW;YAC1B,QAAQ,EAAE,IAAI,CAAC,UAAU;SAC5B;QACD,OAAO,EAAE;YACL,cAAc,EAAE,mCAAmC;SACtD;QACD,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC,CAAA,CAAA;AAdY,QAAA,aAAa,iBAczB"}
@@ -0,0 +1 @@
1
+ export declare const twilioNewIncomingSms: import("@activepieces/framework").Trigger;
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.twilioNewIncomingSms = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const framework_1 = require("@activepieces/framework");
6
+ const common_1 = require("../common");
7
+ exports.twilioNewIncomingSms = (0, framework_1.createTrigger)({
8
+ name: 'new_incoming_sms',
9
+ displayName: 'New Incoming SMS',
10
+ description: 'Triggers when a new SMS message is received',
11
+ props: {
12
+ authentication: common_1.twilioCommon.authentication,
13
+ phone_number: common_1.twilioCommon.phone_number,
14
+ },
15
+ sampleData: {
16
+ "body": "Hello",
17
+ "num_segments": "1",
18
+ "direction": "inbound",
19
+ "from": "+12184191735",
20
+ "date_updated": "Wed, 08 Feb 2023 01:40:51 +0000",
21
+ "price": null,
22
+ "error_message": null,
23
+ "uri": "/2010-04-01/Accounts/ACc0ea1238d61fe90d78a69a3de71d45619/Messages/SM8c3920d3f2ac481ba83e639a69dadd63.json",
24
+ "account_sid": "ACc0ea716d61fe90d78a123a3de71d45619",
25
+ "num_media": "0",
26
+ "to": "+12184191735",
27
+ "date_created": "Wed, 08 Feb 2023 01:40:50 +0000",
28
+ "status": "failed",
29
+ "sid": "SM8c3920d3f2ac481ba83e639a69dadd63",
30
+ "date_sent": "Wed, 08 Feb 2023 01:40:51 +0000",
31
+ "messaging_service_sid": "MG88e323e6a88ce67ba3bf12e1bcb7e0b8",
32
+ "error_code": 21211,
33
+ "price_unit": "USD",
34
+ "api_version": "2010-04-01",
35
+ "subresource_uris": {
36
+ "media": "/2010-04-01/Accounts/ACc0ea716d61fe90d78a69a3de71d45619/Messages/SM8c3920d3f2ac481ba83e639a69dadd63/Media.json",
37
+ "feedback": "/2010-04-01/Accounts/ACc0ea716d61fe90d78a69a3de71d45619/Messages/SM8c3920d3f2ac481ba83e639a69dadd63/Feedback.json"
38
+ }
39
+ },
40
+ // Twilio API only allows one webhook per phone number, so we need to poll
41
+ type: framework_1.TriggerStrategy.POLLING,
42
+ onEnable(context) {
43
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
44
+ const { phone_number } = context.propsValue;
45
+ const account_sid = context.propsValue['authentication']['username'];
46
+ const auth_token = context.propsValue['authentication']['password'];
47
+ const response = yield (0, common_1.callTwilioApi)(framework_1.HttpMethod.GET, `Messages.json?PageSize=20&To=${phone_number}`, { account_sid, auth_token, }, {});
48
+ yield context.store.put('_new_incoming_sms_trigger', {
49
+ lastMessageId: response.body.messages.length === 0 ? null : response.body.messages[0].sid,
50
+ });
51
+ });
52
+ },
53
+ onDisable(context) {
54
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
+ yield context.store.put('_new_incoming_sms_trigger', null);
56
+ });
57
+ },
58
+ run(context) {
59
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
60
+ const account_sid = context.propsValue['authentication']['username'];
61
+ const auth_token = context.propsValue['authentication']['password'];
62
+ const newMessages = [];
63
+ const lastMessage = yield context.store.get('_new_incoming_sms_trigger');
64
+ let currentUri = `2010-04-01/Accounts/${account_sid}/Messages.json?PageSize=20&To=${context.propsValue.phone_number}`;
65
+ let firstMessageId = undefined;
66
+ while (currentUri !== undefined && currentUri !== null) {
67
+ const res = (yield framework_1.httpClient.sendRequest({
68
+ method: framework_1.HttpMethod.GET,
69
+ url: `https://api.twilio.com/${currentUri}`,
70
+ authentication: {
71
+ type: framework_1.AuthenticationType.BASIC,
72
+ username: account_sid,
73
+ password: auth_token,
74
+ }
75
+ }));
76
+ const messages = res.body.messages;
77
+ if (!firstMessageId && messages.length > 0) {
78
+ firstMessageId = messages[0].sid;
79
+ }
80
+ currentUri = res.body.next_page_uri;
81
+ for (let i = 0; i < messages.length; i++) {
82
+ const message = messages[i];
83
+ if (message.sid === (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.lastMessageId)) {
84
+ currentUri = null;
85
+ break;
86
+ }
87
+ if (message.direction === 'inbound') {
88
+ newMessages.push(message);
89
+ }
90
+ }
91
+ }
92
+ yield context.store.put('_new_incoming_sms_trigger', {
93
+ lastMessageId: firstMessageId !== null && firstMessageId !== void 0 ? firstMessageId : lastMessage.lastMessageId,
94
+ });
95
+ return newMessages;
96
+ });
97
+ }
98
+ });
99
+ ;
100
+ //# sourceMappingURL=new-incoming-sms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-incoming-sms.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/twilio/src/lib/trigger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