@divyacon/piece-whatsapp 0.0.0-stage → 0.1.0
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/LICENSE.MIT-AP +24 -0
- package/README.md +8 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/actions/send-from-template.d.ts +19 -0
- package/dist/lib/actions/send-from-template.d.ts.map +1 -0
- package/dist/lib/actions/send-from-template.js +111 -0
- package/dist/lib/actions/send-from-template.js.map +1 -0
- package/dist/lib/actions/send-media.d.ts +18 -0
- package/dist/lib/actions/send-media.d.ts.map +1 -0
- package/dist/lib/actions/send-media.js +84 -0
- package/dist/lib/actions/send-media.js.map +1 -0
- package/dist/lib/actions/send-message.d.ts +12 -0
- package/dist/lib/actions/send-message.d.ts.map +1 -0
- package/dist/lib/actions/send-message.js +54 -0
- package/dist/lib/actions/send-message.js.map +1 -0
- package/dist/lib/auth.d.ts +5 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +36 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/common/utils.d.ts +18 -0
- package/dist/lib/common/utils.d.ts.map +1 -0
- package/dist/lib/common/utils.js +196 -0
- package/dist/lib/common/utils.js.map +1 -0
- package/package.json +43 -3
- package/src/index.ts +30 -0
- package/src/lib/actions/send-from-template.ts +108 -0
- package/src/lib/actions/send-media.ts +79 -0
- package/src/lib/actions/send-message.ts +46 -0
- package/src/lib/auth.ts +32 -0
- package/src/lib/common/utils.ts +225 -0
package/LICENSE.MIT-AP
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Activepieces AB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Derived helpers in this folder are adapted from Activepieces (MIT) for use
|
|
24
|
+
inside CX without depending on @activepieces/* packages at runtime.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @divyacon/piece-whatsapp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DivyaCon connector for workflows and automations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
`ash
|
|
8
|
+
npm install @divyacon/piece-whatsapp
|
|
9
|
+
`
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const whatsapp: import("@agnocon/pieces-framework").Piece<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>>;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,QAAQ;;;GASnB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.whatsapp = void 0;
|
|
4
|
+
// Vendored from Activepieces packages/pieces/community/whatsapp/src/index.ts (MIT).
|
|
5
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
6
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
7
|
+
const send_message_1 = require("./lib/actions/send-message");
|
|
8
|
+
const send_media_1 = require("./lib/actions/send-media");
|
|
9
|
+
const send_from_template_1 = require("./lib/actions/send-from-template");
|
|
10
|
+
const auth_1 = require("./lib/auth");
|
|
11
|
+
const markdown = `
|
|
12
|
+
To Obtain a Phone Number ID and a Permanent System User Access Token, follow these steps:
|
|
13
|
+
|
|
14
|
+
1. Go to https://developers.facebook.com/
|
|
15
|
+
2. Make a new app, Select Other for usecase.
|
|
16
|
+
3. Choose Business as the type of app.
|
|
17
|
+
4. Add new Product -> WhatsApp.
|
|
18
|
+
5. Navigate to WhatsApp Settings > API Setup.
|
|
19
|
+
6. Copy the Business Account ID.
|
|
20
|
+
7. Login to your [Meta Business Manager](https://business.facebook.com/).
|
|
21
|
+
8. Click on Settings.
|
|
22
|
+
9. Create a new System User with access over the app and copy the access token.
|
|
23
|
+
`;
|
|
24
|
+
exports.whatsapp = (0, pieces_framework_1.createPiece)({
|
|
25
|
+
displayName: 'WhatsApp Business',
|
|
26
|
+
description: 'Manage your WhatsApp business account',
|
|
27
|
+
auth: auth_1.whatsappAuth,
|
|
28
|
+
minimumSupportedRelease: '0.30.0',
|
|
29
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/whatsapp.png',
|
|
30
|
+
authors: ['LevwTech', 'kishanprmr'],
|
|
31
|
+
actions: [send_message_1.sendMessage, send_media_1.sendMedia, send_from_template_1.sendTemplateMessageAction],
|
|
32
|
+
triggers: [],
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oFAAoF;AACpF,qEAAqE;AACrE,gEAA6E;AAC7E,6DAAyD;AACzD,yDAAqD;AACrD,yEAA6E;AAC7E,qCAA0C;AAE1C,MAAM,QAAQ,GAAG;;;;;;;;;;;;CAYhB,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,mBAAY;IAClB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;IACnC,OAAO,EAAE,CAAC,0BAAW,EAAE,sBAAS,EAAE,8CAAyB,CAAC;IAC5D,QAAQ,EAAE,EAAE;CACZ,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const sendTemplateMessageAction: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
phone_number_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
7
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
to: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
message_template_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
11
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
12
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
}>>;
|
|
14
|
+
message_template_fields: import("@agnocon/pieces-framework").DynamicProperties<true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
15
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
16
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
17
|
+
}>>;
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=send-from-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-from-template.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/send-from-template.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;EAsGpC,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendTemplateMessageAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/whatsapp/src/lib/actions/send-from-template.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
10
|
+
const utils_1 = require("../common/utils");
|
|
11
|
+
exports.sendTemplateMessageAction = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: auth_1.whatsappAuth,
|
|
13
|
+
name: 'send-template-message',
|
|
14
|
+
displayName: 'Send Template Message',
|
|
15
|
+
description: 'Sends a template message.',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: { description: 'Sends a pre-approved WhatsApp message template to a recipient, filling its header, body, and button placeholders from the supplied fields. Choose this to initiate conversations outside the 24-hour customer service window or for notifications/marketing where a registered template is required; the template must already be approved in the WhatsApp Business account. Requires the sender phone number ID, recipient phone number, and the template ID (its name and language are resolved automatically). Not idempotent — each call delivers a new message.', idempotent: false },
|
|
18
|
+
props: {
|
|
19
|
+
phone_number_id: utils_1.commonProps.phone_number_id,
|
|
20
|
+
to: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'To',
|
|
22
|
+
description: 'Recipient phone number.',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
message_template_id: utils_1.commonProps.message_template_id,
|
|
26
|
+
message_template_fields: utils_1.commonProps.message_template_fields,
|
|
27
|
+
},
|
|
28
|
+
run(context) {
|
|
29
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
const phoneNumberId = context.propsValue.phone_number_id;
|
|
31
|
+
const recipientPhoneNumber = context.propsValue.to;
|
|
32
|
+
const templateId = context.propsValue.message_template_id;
|
|
33
|
+
const templateFields = context.propsValue.message_template_fields;
|
|
34
|
+
// construct components object
|
|
35
|
+
// https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages#components-object
|
|
36
|
+
const components = [];
|
|
37
|
+
const headerParameters = [];
|
|
38
|
+
const bodyParameters = [];
|
|
39
|
+
const buttonParameters = [];
|
|
40
|
+
for (const [key, value] of Object.entries(templateFields)) {
|
|
41
|
+
if (key.startsWith('header_')) {
|
|
42
|
+
headerParameters.push({ type: 'text', text: value });
|
|
43
|
+
}
|
|
44
|
+
else if (key.startsWith('body_')) {
|
|
45
|
+
bodyParameters.push({ type: 'text', text: value });
|
|
46
|
+
}
|
|
47
|
+
else if (key.startsWith('button_')) {
|
|
48
|
+
buttonParameters.push({ type: 'text', text: value });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (headerParameters.length) {
|
|
52
|
+
components.push({
|
|
53
|
+
type: 'header',
|
|
54
|
+
parameters: headerParameters,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (bodyParameters.length) {
|
|
58
|
+
components.push({
|
|
59
|
+
type: 'body',
|
|
60
|
+
parameters: bodyParameters,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (buttonParameters.length) {
|
|
64
|
+
components.push({
|
|
65
|
+
type: 'button',
|
|
66
|
+
sub_type: 'url',
|
|
67
|
+
index: 0,
|
|
68
|
+
parameters: buttonParameters,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// fetch template language code
|
|
72
|
+
const templateData = yield pieces_common_1.httpClient.sendRequest({
|
|
73
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
74
|
+
url: `https://graph.facebook.com/v20.0/${templateId}`,
|
|
75
|
+
authentication: {
|
|
76
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
77
|
+
token: context.auth.props.access_token,
|
|
78
|
+
},
|
|
79
|
+
queryParams: {
|
|
80
|
+
fields: 'id,name,language',
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
const templateLanguage = templateData.body['language'];
|
|
84
|
+
const templateName = templateData.body['name'];
|
|
85
|
+
// https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates/#text-based
|
|
86
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
87
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
88
|
+
url: `https://graph.facebook.com/v20.0/${phoneNumberId}/messages`,
|
|
89
|
+
authentication: {
|
|
90
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
91
|
+
token: context.auth.props.access_token,
|
|
92
|
+
},
|
|
93
|
+
body: {
|
|
94
|
+
messaging_product: 'whatsapp',
|
|
95
|
+
recipient_type: 'individual',
|
|
96
|
+
to: recipientPhoneNumber,
|
|
97
|
+
type: 'template',
|
|
98
|
+
template: {
|
|
99
|
+
name: templateName,
|
|
100
|
+
language: {
|
|
101
|
+
code: templateLanguage,
|
|
102
|
+
},
|
|
103
|
+
components,
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
return response.body;
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=send-from-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-from-template.js","sourceRoot":"","sources":["../../../src/lib/actions/send-from-template.ts"],"names":[],"mappings":";;;;AAAA,6GAA6G;AAC7G,qEAAqE;AACrE,kCAAuC;AACvC,0DAAoF;AACpF,gEAAmE;AACnE,2CAA8C;AAEjC,QAAA,yBAAyB,GAAG,IAAA,+BAAY,EAAC;IACrD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,uBAAuB;IACpC,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,siBAAsiB,EAAE,UAAU,EAAE,KAAK,EAAE;IACtlB,KAAK,EAAE;QACN,eAAe,EAAE,mBAAW,CAAC,eAAe;QAC5C,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,mBAAmB,EAAE,mBAAW,CAAC,mBAAmB;QACpD,uBAAuB,EAAE,mBAAW,CAAC,uBAAuB;KAC5D;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,eAAyB,CAAC;YACnE,MAAM,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,EAAY,CAAC;YAC7D,MAAM,UAAU,GAAG,OAAO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YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const sendMedia: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
phone_number_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
7
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
to: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
type: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
11
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
12
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
13
|
+
}>>;
|
|
14
|
+
media: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
15
|
+
caption: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
16
|
+
filename: import("@agnocon/pieces-framework").LongTextProperty<false>;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=send-media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-media.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/send-media.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;EAoEpB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendMedia = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/whatsapp/src/lib/actions/send-media.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const auth_1 = require("../auth");
|
|
10
|
+
const utils_1 = require("../common/utils");
|
|
11
|
+
exports.sendMedia = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: auth_1.whatsappAuth,
|
|
13
|
+
name: 'sendMedia',
|
|
14
|
+
displayName: 'Send Media',
|
|
15
|
+
description: 'Send a media message through WhatsApp',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: { description: 'Sends an image, video, audio, document, or sticker to a WhatsApp recipient by referencing the media via a public URL. Choose this when the message payload is a file rather than plain text; captions are supported for media types that allow them and a filename can be set for documents. Requires the sender phone number ID, recipient phone number, media type, and a reachable media URL; subject to WhatsApp messaging-window rules. Not idempotent — each call delivers a new message.', idempotent: false },
|
|
18
|
+
props: {
|
|
19
|
+
phone_number_id: utils_1.commonProps.phone_number_id,
|
|
20
|
+
to: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'To',
|
|
22
|
+
description: 'The recipient of the message',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
type: pieces_framework_1.Property.Dropdown({
|
|
26
|
+
auth: auth_1.whatsappAuth,
|
|
27
|
+
displayName: 'Type',
|
|
28
|
+
description: 'The type of media to send',
|
|
29
|
+
required: true,
|
|
30
|
+
options: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
return {
|
|
32
|
+
options: utils_1.supportedMediaTypes.map((type) => ({
|
|
33
|
+
label: (0, utils_1.capitalizeFirstLetter)(type),
|
|
34
|
+
value: type,
|
|
35
|
+
})),
|
|
36
|
+
};
|
|
37
|
+
}),
|
|
38
|
+
refreshers: [],
|
|
39
|
+
}),
|
|
40
|
+
media: pieces_framework_1.Property.ShortText({
|
|
41
|
+
displayName: 'Media URL',
|
|
42
|
+
description: 'The URL of the media to send',
|
|
43
|
+
required: true,
|
|
44
|
+
}),
|
|
45
|
+
caption: pieces_framework_1.Property.LongText({
|
|
46
|
+
displayName: 'Caption',
|
|
47
|
+
description: 'A caption for the media',
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
50
|
+
filename: pieces_framework_1.Property.LongText({
|
|
51
|
+
displayName: 'Filename',
|
|
52
|
+
description: 'Filename of the document to send',
|
|
53
|
+
required: false,
|
|
54
|
+
}),
|
|
55
|
+
},
|
|
56
|
+
run(context) {
|
|
57
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const { to, caption, media, type, filename, phone_number_id } = context.propsValue;
|
|
59
|
+
const { access_token } = context.auth.props;
|
|
60
|
+
const body = {
|
|
61
|
+
messaging_product: 'whatsapp',
|
|
62
|
+
recipient_type: 'individual',
|
|
63
|
+
to,
|
|
64
|
+
type,
|
|
65
|
+
[type]: {
|
|
66
|
+
link: media,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
if (caption && (0, utils_1.mediaTypeSupportsCaption)(type))
|
|
70
|
+
body[type].caption = caption;
|
|
71
|
+
if (filename && type === 'document')
|
|
72
|
+
body[type].filename = filename;
|
|
73
|
+
return yield pieces_common_1.httpClient.sendRequest({
|
|
74
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
75
|
+
url: `https://graph.facebook.com/v17.0/${phone_number_id}/messages`,
|
|
76
|
+
headers: {
|
|
77
|
+
Authorization: 'Bearer ' + access_token,
|
|
78
|
+
},
|
|
79
|
+
body,
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=send-media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-media.js","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C,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,KAAK;SACf,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACnF,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAC5C,MAAM,IAAI,GAAG;gBACZ,iBAAiB,EAAE,UAAU;gBAC7B,cAAc,EAAE,YAAY;gBAC5B,EAAE;gBACF,IAAI;gBACJ,CAAC,IAAI,CAAC,EAAE;oBACP,IAAI,EAAE,KAAK;iBACX;aACD,CAAC;YACF,IAAI,OAAO,IAAI,IAAA,gCAAwB,EAAC,IAAI,CAAC;gBAAG,IAAI,CAAC,IAAI,CAAS,CAAC,OAAO,GAAG,OAAO,CAAC;YACrF,IAAI,QAAQ,IAAI,IAAI,KAAK,UAAU;gBAAG,IAAI,CAAC,IAAI,CAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7E,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAC;gBACnC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,oCAAoC,eAAe,WAAW;gBACnE,OAAO,EAAE;oBACR,aAAa,EAAE,SAAS,GAAG,YAAY;iBACvC;gBACD,IAAI;aACJ,CAAC,CAAC;QACJ,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const sendMessage: import("@agnocon/pieces-framework").IAction<import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
phone_number_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
7
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
to: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
text: import("@agnocon/pieces-framework").LongTextProperty<true>;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=send-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../../src/lib/actions/send-message.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW;;;;;;;;;;EAwCtB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendMessage = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Vendored from Activepieces packages/pieces/community/whatsapp/src/lib/actions/send-message.ts (MIT).
|
|
6
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
7
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
8
|
+
const pieces_common_1 = require("@agnocon/pieces-common");
|
|
9
|
+
const auth_1 = require("../auth");
|
|
10
|
+
const utils_1 = require("../common/utils");
|
|
11
|
+
exports.sendMessage = (0, pieces_framework_1.createAction)({
|
|
12
|
+
auth: auth_1.whatsappAuth,
|
|
13
|
+
name: 'sendMessage',
|
|
14
|
+
displayName: 'Send Message',
|
|
15
|
+
description: 'Send a text message through WhatsApp',
|
|
16
|
+
audience: 'both',
|
|
17
|
+
aiMetadata: { description: 'Sends a plain text WhatsApp message from a business phone number to a single recipient via the WhatsApp Cloud API. Choose this for free-form text replies or notifications when no media or pre-approved template is needed; for media use Send Media and for marketing/utility templates use Send Template Message. Requires the sender phone number ID and the recipient phone number in international format; outside the 24-hour customer service window only template messages are deliverable. Not idempotent — each call delivers a new message.', idempotent: false },
|
|
18
|
+
props: {
|
|
19
|
+
phone_number_id: utils_1.commonProps.phone_number_id,
|
|
20
|
+
to: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'To',
|
|
22
|
+
description: 'The recipient of the message',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
text: pieces_framework_1.Property.LongText({
|
|
26
|
+
displayName: 'Message',
|
|
27
|
+
description: 'The message to send',
|
|
28
|
+
required: true,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
run(context) {
|
|
32
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const { to, text, phone_number_id } = context.propsValue;
|
|
34
|
+
const { access_token } = context.auth.props;
|
|
35
|
+
return yield pieces_common_1.httpClient.sendRequest({
|
|
36
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
37
|
+
url: `https://graph.facebook.com/v17.0/${phone_number_id}/messages`,
|
|
38
|
+
headers: {
|
|
39
|
+
Authorization: 'Bearer ' + access_token,
|
|
40
|
+
},
|
|
41
|
+
body: {
|
|
42
|
+
messaging_product: 'whatsapp',
|
|
43
|
+
recipient_type: 'individual',
|
|
44
|
+
to,
|
|
45
|
+
type: 'text',
|
|
46
|
+
text: {
|
|
47
|
+
body: text,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=send-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../../src/lib/actions/send-message.ts"],"names":[],"mappings":";;;;AAAA,uGAAuG;AACvG,qEAAqE;AACrE,gEAAmE;AACnE,0DAAgE;AAChE,kCA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@agnocon/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
3
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/lib/auth.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,YAAY;;;EAevB,CAAC"}
|
package/dist/lib/auth.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.whatsappAuth = void 0;
|
|
4
|
+
// Vendored from Activepieces packages/pieces/community/whatsapp/src/lib/auth.ts (MIT).
|
|
5
|
+
// Generated by packages/scripts/vendor-ap.mjs - do not edit by hand.
|
|
6
|
+
const pieces_framework_1 = require("@agnocon/pieces-framework");
|
|
7
|
+
const markdown = `
|
|
8
|
+
To Obtain a Phone Number ID and a Permanent System User Access Token, follow these steps:
|
|
9
|
+
|
|
10
|
+
1. Go to https://developers.facebook.com/
|
|
11
|
+
2. Make a new app, Select Other for usecase.
|
|
12
|
+
3. Choose Business as the type of app.
|
|
13
|
+
4. Add new Product -> WhatsApp.
|
|
14
|
+
5. Navigate to WhatsApp Settings > API Setup.
|
|
15
|
+
6. Copy the Business Account ID.
|
|
16
|
+
7. Login to your [Meta Business Manager](https://business.facebook.com/).
|
|
17
|
+
8. Click on Settings.
|
|
18
|
+
9. Create a new System User with access over the app and copy the access token.
|
|
19
|
+
`;
|
|
20
|
+
exports.whatsappAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
21
|
+
required: true,
|
|
22
|
+
description: markdown,
|
|
23
|
+
props: {
|
|
24
|
+
access_token: pieces_framework_1.PieceAuth.SecretText({
|
|
25
|
+
displayName: 'System User Access Token',
|
|
26
|
+
description: 'The system user access token of your WhatsApp business account.',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
businessAccountId: pieces_framework_1.Property.ShortText({
|
|
30
|
+
displayName: 'Business Account ID',
|
|
31
|
+
description: 'The business account ID of your WhatsApp business account.',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,uFAAuF;AACvF,qEAAqE;AACrE,gEAAgE;AAEhE,MAAM,QAAQ,GAAG;;;;;;;;;;;;CAYhB,CAAC;AAEW,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE;QACN,YAAY,EAAE,4BAAS,CAAC,UAAU,CAAC;YAClC,WAAW,EAAE,0BAA0B;YACvC,WAAW,EAAE,iEAAiE;YAC9E,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const supportedMediaTypes: string[];
|
|
2
|
+
export declare const capitalizeFirstLetter: (word: string) => string;
|
|
3
|
+
export declare const mediaTypeSupportsCaption: (type: string) => boolean;
|
|
4
|
+
export declare const commonProps: {
|
|
5
|
+
phone_number_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
6
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
7
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>>;
|
|
9
|
+
message_template_id: import("@agnocon/pieces-framework").DropdownProperty<string, true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
10
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
11
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
12
|
+
}>>;
|
|
13
|
+
message_template_fields: import("@agnocon/pieces-framework").DynamicProperties<true, import("@agnocon/pieces-framework").CustomAuthProperty<{
|
|
14
|
+
access_token: import("@agnocon/pieces-framework").SecretTextProperty<true>;
|
|
15
|
+
businessAccountId: import("@agnocon/pieces-framework").ShortTextProperty<true>;
|
|
16
|
+
}>>;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/common/utils.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,mBAAmB,UAAqD,CAAC;AACtF,eAAO,MAAM,qBAAqB,SAAU,MAAM,WAAiD,CAAC;AACpG,eAAO,MAAM,wBAAwB,SAAU,MAAM,YACP,CAAC;AAE/C,eAAO,MAAM,WAAW;;;;;;;;;;;;;CA6MvB,CAAC"}
|