@robinpath/whatsapp 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/README.md +104 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/whatsapp.d.ts +134 -0
- package/dist/whatsapp.d.ts.map +1 -0
- package/dist/whatsapp.js +273 -0
- package/dist/whatsapp.js.map +1 -0
- package/package.json +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# @robinpath/whatsapp
|
|
2
|
+
|
|
3
|
+
> WhatsApp module for RobinPath.
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `whatsapp` module lets you:
|
|
10
|
+
|
|
11
|
+
- Send a text message.
|
|
12
|
+
- Send a pre-approved template message.
|
|
13
|
+
- Send an image message.
|
|
14
|
+
- Send a document message.
|
|
15
|
+
- Send a location message.
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/whatsapp
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
**1. Set up credentials**
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
whatsapp.setCredentials "EAABxxx" "1234567890"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**2. Send a text message.**
|
|
34
|
+
|
|
35
|
+
```robinpath
|
|
36
|
+
whatsapp.sendText "+1234567890" "Hello from RobinPath!"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Available Functions
|
|
40
|
+
|
|
41
|
+
| Function | Description |
|
|
42
|
+
|----------|-------------|
|
|
43
|
+
| `whatsapp.setCredentials` | Set WhatsApp Cloud API credentials. |
|
|
44
|
+
| `whatsapp.sendText` | Send a text message. |
|
|
45
|
+
| `whatsapp.sendTemplate` | Send a pre-approved template message. |
|
|
46
|
+
| `whatsapp.sendImage` | Send an image message. |
|
|
47
|
+
| `whatsapp.sendDocument` | Send a document message. |
|
|
48
|
+
| `whatsapp.sendLocation` | Send a location message. |
|
|
49
|
+
| `whatsapp.sendContact` | Send contact card(s). |
|
|
50
|
+
| `whatsapp.markRead` | Mark a message as read. |
|
|
51
|
+
| `whatsapp.getProfile` | Get the WhatsApp Business profile. |
|
|
52
|
+
| `whatsapp.updateProfile` | Update the WhatsApp Business profile. |
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
### Send a text message.
|
|
57
|
+
|
|
58
|
+
```robinpath
|
|
59
|
+
whatsapp.sendText "+1234567890" "Hello from RobinPath!"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Send a pre-approved template message.
|
|
63
|
+
|
|
64
|
+
```robinpath
|
|
65
|
+
whatsapp.sendTemplate "+1234567890" "hello_world"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Send an image message.
|
|
69
|
+
|
|
70
|
+
```robinpath
|
|
71
|
+
whatsapp.sendImage "+1234567890" "https://example.com/photo.jpg" "Check this out"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Integration with RobinPath
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
78
|
+
import Module from "@robinpath/whatsapp";
|
|
79
|
+
|
|
80
|
+
const rp = new RobinPath();
|
|
81
|
+
rp.registerModule(Module.name, Module.functions);
|
|
82
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
83
|
+
|
|
84
|
+
const result = await rp.executeScript(`
|
|
85
|
+
whatsapp.setCredentials "EAABxxx" "1234567890"
|
|
86
|
+
whatsapp.sendText "+1234567890" "Hello from RobinPath!"
|
|
87
|
+
`);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Full API Reference
|
|
91
|
+
|
|
92
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
93
|
+
|
|
94
|
+
## Related Modules
|
|
95
|
+
|
|
96
|
+
- [`@robinpath/slack`](../slack) — Slack module for complementary functionality
|
|
97
|
+
- [`@robinpath/discord`](../discord) — Discord module for complementary functionality
|
|
98
|
+
- [`@robinpath/teams`](../teams) — Teams module for complementary functionality
|
|
99
|
+
- [`@robinpath/telegram`](../telegram) — Telegram module for complementary functionality
|
|
100
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ModuleAdapter } from "@wiredwp/robinpath";
|
|
2
|
+
declare const WhatsappModule: ModuleAdapter;
|
|
3
|
+
export default WhatsappModule;
|
|
4
|
+
export { WhatsappModule };
|
|
5
|
+
export { WhatsappFunctions, WhatsappFunctionMetadata, WhatsappModuleMetadata } from "./whatsapp.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,QAAA,MAAM,cAAc,EAAE,aAMrB,CAAC;AAEF,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WhatsappFunctions, WhatsappFunctionMetadata, WhatsappModuleMetadata } from "./whatsapp.js";
|
|
2
|
+
const WhatsappModule = {
|
|
3
|
+
name: "whatsapp",
|
|
4
|
+
functions: WhatsappFunctions,
|
|
5
|
+
functionMetadata: WhatsappFunctionMetadata,
|
|
6
|
+
moduleMetadata: WhatsappModuleMetadata,
|
|
7
|
+
global: false,
|
|
8
|
+
}; // as ModuleAdapter
|
|
9
|
+
export default WhatsappModule;
|
|
10
|
+
export { WhatsappModule };
|
|
11
|
+
export { WhatsappFunctions, WhatsappFunctionMetadata, WhatsappModuleMetadata } from "./whatsapp.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEpG,MAAM,cAAc,GAAkB;IACpC,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,iBAAiB;IAC5B,gBAAgB,EAAE,wBAA+B;IACjD,cAAc,EAAE,sBAA6B;IAC7C,MAAM,EAAE,KAAK;CACd,CAAC,CAAC,mBAAmB;AAEtB,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { BuiltinHandler } from "@wiredwp/robinpath";
|
|
2
|
+
export declare const WhatsappFunctions: Record<string, BuiltinHandler>;
|
|
3
|
+
export declare const WhatsappFunctionMetadata: {
|
|
4
|
+
setCredentials: {
|
|
5
|
+
description: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
name: string;
|
|
8
|
+
dataType: string;
|
|
9
|
+
description: string;
|
|
10
|
+
formInputType: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
returnType: string;
|
|
14
|
+
returnDescription: string;
|
|
15
|
+
example: string;
|
|
16
|
+
};
|
|
17
|
+
sendText: {
|
|
18
|
+
description: string;
|
|
19
|
+
parameters: {
|
|
20
|
+
name: string;
|
|
21
|
+
dataType: string;
|
|
22
|
+
description: string;
|
|
23
|
+
formInputType: string;
|
|
24
|
+
required: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
returnType: string;
|
|
27
|
+
returnDescription: string;
|
|
28
|
+
example: string;
|
|
29
|
+
};
|
|
30
|
+
sendTemplate: {
|
|
31
|
+
description: string;
|
|
32
|
+
parameters: {
|
|
33
|
+
name: string;
|
|
34
|
+
dataType: string;
|
|
35
|
+
description: string;
|
|
36
|
+
formInputType: string;
|
|
37
|
+
required: boolean;
|
|
38
|
+
}[];
|
|
39
|
+
returnType: string;
|
|
40
|
+
returnDescription: string;
|
|
41
|
+
example: string;
|
|
42
|
+
};
|
|
43
|
+
sendImage: {
|
|
44
|
+
description: string;
|
|
45
|
+
parameters: {
|
|
46
|
+
name: string;
|
|
47
|
+
dataType: string;
|
|
48
|
+
description: string;
|
|
49
|
+
formInputType: string;
|
|
50
|
+
required: boolean;
|
|
51
|
+
}[];
|
|
52
|
+
returnType: string;
|
|
53
|
+
returnDescription: string;
|
|
54
|
+
example: string;
|
|
55
|
+
};
|
|
56
|
+
sendDocument: {
|
|
57
|
+
description: string;
|
|
58
|
+
parameters: {
|
|
59
|
+
name: string;
|
|
60
|
+
dataType: string;
|
|
61
|
+
description: string;
|
|
62
|
+
formInputType: string;
|
|
63
|
+
required: boolean;
|
|
64
|
+
}[];
|
|
65
|
+
returnType: string;
|
|
66
|
+
returnDescription: string;
|
|
67
|
+
example: string;
|
|
68
|
+
};
|
|
69
|
+
sendLocation: {
|
|
70
|
+
description: string;
|
|
71
|
+
parameters: {
|
|
72
|
+
name: string;
|
|
73
|
+
dataType: string;
|
|
74
|
+
description: string;
|
|
75
|
+
formInputType: string;
|
|
76
|
+
required: boolean;
|
|
77
|
+
}[];
|
|
78
|
+
returnType: string;
|
|
79
|
+
returnDescription: string;
|
|
80
|
+
example: string;
|
|
81
|
+
};
|
|
82
|
+
sendContact: {
|
|
83
|
+
description: string;
|
|
84
|
+
parameters: {
|
|
85
|
+
name: string;
|
|
86
|
+
dataType: string;
|
|
87
|
+
description: string;
|
|
88
|
+
formInputType: string;
|
|
89
|
+
required: boolean;
|
|
90
|
+
}[];
|
|
91
|
+
returnType: string;
|
|
92
|
+
returnDescription: string;
|
|
93
|
+
example: string;
|
|
94
|
+
};
|
|
95
|
+
markRead: {
|
|
96
|
+
description: string;
|
|
97
|
+
parameters: {
|
|
98
|
+
name: string;
|
|
99
|
+
dataType: string;
|
|
100
|
+
description: string;
|
|
101
|
+
formInputType: string;
|
|
102
|
+
required: boolean;
|
|
103
|
+
}[];
|
|
104
|
+
returnType: string;
|
|
105
|
+
returnDescription: string;
|
|
106
|
+
example: string;
|
|
107
|
+
};
|
|
108
|
+
getProfile: {
|
|
109
|
+
description: string;
|
|
110
|
+
parameters: never[];
|
|
111
|
+
returnType: string;
|
|
112
|
+
returnDescription: string;
|
|
113
|
+
example: string;
|
|
114
|
+
};
|
|
115
|
+
updateProfile: {
|
|
116
|
+
description: string;
|
|
117
|
+
parameters: {
|
|
118
|
+
name: string;
|
|
119
|
+
dataType: string;
|
|
120
|
+
description: string;
|
|
121
|
+
formInputType: string;
|
|
122
|
+
required: boolean;
|
|
123
|
+
}[];
|
|
124
|
+
returnType: string;
|
|
125
|
+
returnDescription: string;
|
|
126
|
+
example: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export declare const WhatsappModuleMetadata: {
|
|
130
|
+
description: string;
|
|
131
|
+
methods: string[];
|
|
132
|
+
category: string;
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=whatsapp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp.d.ts","sourceRoot":"","sources":["../src/whatsapp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA2C,MAAM,oBAAoB,CAAC;AAuJlG,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAW5D,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGpC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC"}
|
package/dist/whatsapp.js
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
const config = new Map();
|
|
2
|
+
function getConfig(key) {
|
|
3
|
+
const val = config.get(key);
|
|
4
|
+
if (!val)
|
|
5
|
+
throw new Error(`WhatsApp: "${key}" not configured. Call whatsapp.setCredentials first.`);
|
|
6
|
+
return val;
|
|
7
|
+
}
|
|
8
|
+
async function whatsappApi(path, method = "GET", body) {
|
|
9
|
+
const token = getConfig("accessToken");
|
|
10
|
+
const phoneNumberId = getConfig("phoneNumberId");
|
|
11
|
+
const res = await fetch(`https://graph.facebook.com/v22.0/${phoneNumberId}${path}`, {
|
|
12
|
+
method,
|
|
13
|
+
headers: {
|
|
14
|
+
Authorization: `Bearer ${token}`,
|
|
15
|
+
"Content-Type": "application/json",
|
|
16
|
+
},
|
|
17
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
18
|
+
});
|
|
19
|
+
if (!res.ok) {
|
|
20
|
+
const text = await res.text();
|
|
21
|
+
throw new Error(`WhatsApp API error (${res.status}): ${text}`);
|
|
22
|
+
}
|
|
23
|
+
return res.json();
|
|
24
|
+
}
|
|
25
|
+
const setCredentials = (args) => {
|
|
26
|
+
const accessToken = args[0];
|
|
27
|
+
const phoneNumberId = args[1];
|
|
28
|
+
if (!accessToken || !phoneNumberId)
|
|
29
|
+
throw new Error("whatsapp.setCredentials requires accessToken and phoneNumberId.");
|
|
30
|
+
config.set("accessToken", accessToken);
|
|
31
|
+
config.set("phoneNumberId", phoneNumberId);
|
|
32
|
+
return "WhatsApp credentials configured.";
|
|
33
|
+
};
|
|
34
|
+
const sendText = async (args) => {
|
|
35
|
+
const to = args[0];
|
|
36
|
+
const message = args[1];
|
|
37
|
+
if (!to || !message)
|
|
38
|
+
throw new Error("whatsapp.sendText requires to and message.");
|
|
39
|
+
return whatsappApi("/messages", "POST", {
|
|
40
|
+
messaging_product: "whatsapp",
|
|
41
|
+
to,
|
|
42
|
+
type: "text",
|
|
43
|
+
text: { body: message },
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const sendTemplate = async (args) => {
|
|
47
|
+
const to = args[0];
|
|
48
|
+
const templateName = args[1];
|
|
49
|
+
const languageCode = args[2] ?? "en_US";
|
|
50
|
+
const components = args[3];
|
|
51
|
+
if (!to || !templateName)
|
|
52
|
+
throw new Error("whatsapp.sendTemplate requires to and templateName.");
|
|
53
|
+
const template = {
|
|
54
|
+
name: templateName,
|
|
55
|
+
language: { code: languageCode },
|
|
56
|
+
};
|
|
57
|
+
if (components)
|
|
58
|
+
template.components = components;
|
|
59
|
+
return whatsappApi("/messages", "POST", {
|
|
60
|
+
messaging_product: "whatsapp",
|
|
61
|
+
to,
|
|
62
|
+
type: "template",
|
|
63
|
+
template,
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const sendImage = async (args) => {
|
|
67
|
+
const to = args[0];
|
|
68
|
+
const imageUrl = args[1];
|
|
69
|
+
const caption = args[2];
|
|
70
|
+
if (!to || !imageUrl)
|
|
71
|
+
throw new Error("whatsapp.sendImage requires to and imageUrl.");
|
|
72
|
+
const image = { link: imageUrl };
|
|
73
|
+
if (caption)
|
|
74
|
+
image.caption = caption;
|
|
75
|
+
return whatsappApi("/messages", "POST", {
|
|
76
|
+
messaging_product: "whatsapp",
|
|
77
|
+
to,
|
|
78
|
+
type: "image",
|
|
79
|
+
image,
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
const sendDocument = async (args) => {
|
|
83
|
+
const to = args[0];
|
|
84
|
+
const documentUrl = args[1];
|
|
85
|
+
const opts = (typeof args[2] === "object" && args[2] !== null ? args[2] : {});
|
|
86
|
+
if (!to || !documentUrl)
|
|
87
|
+
throw new Error("whatsapp.sendDocument requires to and documentUrl.");
|
|
88
|
+
const document = { link: documentUrl };
|
|
89
|
+
if (opts.filename)
|
|
90
|
+
document.filename = opts.filename;
|
|
91
|
+
if (opts.caption)
|
|
92
|
+
document.caption = opts.caption;
|
|
93
|
+
return whatsappApi("/messages", "POST", {
|
|
94
|
+
messaging_product: "whatsapp",
|
|
95
|
+
to,
|
|
96
|
+
type: "document",
|
|
97
|
+
document,
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
const sendLocation = async (args) => {
|
|
101
|
+
const to = args[0];
|
|
102
|
+
const latitude = args[1];
|
|
103
|
+
const longitude = args[2];
|
|
104
|
+
const opts = (typeof args[3] === "object" && args[3] !== null ? args[3] : {});
|
|
105
|
+
if (!to || latitude === undefined || longitude === undefined)
|
|
106
|
+
throw new Error("whatsapp.sendLocation requires to, latitude, and longitude.");
|
|
107
|
+
const location = { latitude, longitude };
|
|
108
|
+
if (opts.name)
|
|
109
|
+
location.name = opts.name;
|
|
110
|
+
if (opts.address)
|
|
111
|
+
location.address = opts.address;
|
|
112
|
+
return whatsappApi("/messages", "POST", {
|
|
113
|
+
messaging_product: "whatsapp",
|
|
114
|
+
to,
|
|
115
|
+
type: "location",
|
|
116
|
+
location,
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
const sendContact = async (args) => {
|
|
120
|
+
const to = args[0];
|
|
121
|
+
const contacts = args[1];
|
|
122
|
+
if (!to || !contacts)
|
|
123
|
+
throw new Error("whatsapp.sendContact requires to and contacts array.");
|
|
124
|
+
return whatsappApi("/messages", "POST", {
|
|
125
|
+
messaging_product: "whatsapp",
|
|
126
|
+
to,
|
|
127
|
+
type: "contacts",
|
|
128
|
+
contacts,
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const markRead = async (args) => {
|
|
132
|
+
const messageId = args[0];
|
|
133
|
+
if (!messageId)
|
|
134
|
+
throw new Error("whatsapp.markRead requires a messageId.");
|
|
135
|
+
return whatsappApi("/messages", "POST", {
|
|
136
|
+
messaging_product: "whatsapp",
|
|
137
|
+
status: "read",
|
|
138
|
+
message_id: messageId,
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
const getProfile = async () => {
|
|
142
|
+
return whatsappApi("/whatsapp_business_profile?fields=about,address,description,email,profile_picture_url,websites,vertical");
|
|
143
|
+
};
|
|
144
|
+
const updateProfile = async (args) => {
|
|
145
|
+
const profile = args[0];
|
|
146
|
+
if (!profile)
|
|
147
|
+
throw new Error("whatsapp.updateProfile requires a profile object.");
|
|
148
|
+
return whatsappApi("/whatsapp_business_profile", "POST", {
|
|
149
|
+
messaging_product: "whatsapp",
|
|
150
|
+
...profile,
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
export const WhatsappFunctions = {
|
|
154
|
+
setCredentials,
|
|
155
|
+
sendText,
|
|
156
|
+
sendTemplate,
|
|
157
|
+
sendImage,
|
|
158
|
+
sendDocument,
|
|
159
|
+
sendLocation,
|
|
160
|
+
sendContact,
|
|
161
|
+
markRead,
|
|
162
|
+
getProfile,
|
|
163
|
+
updateProfile,
|
|
164
|
+
};
|
|
165
|
+
export const WhatsappFunctionMetadata = {
|
|
166
|
+
setCredentials: {
|
|
167
|
+
description: "Set WhatsApp Cloud API credentials.",
|
|
168
|
+
parameters: [
|
|
169
|
+
{ name: "accessToken", dataType: "string", description: "Permanent or temporary access token", formInputType: "text", required: true },
|
|
170
|
+
{ name: "phoneNumberId", dataType: "string", description: "WhatsApp Business phone number ID", formInputType: "text", required: true },
|
|
171
|
+
],
|
|
172
|
+
returnType: "string",
|
|
173
|
+
returnDescription: "Confirmation message.",
|
|
174
|
+
example: 'whatsapp.setCredentials "EAABxxx" "1234567890"',
|
|
175
|
+
},
|
|
176
|
+
sendText: {
|
|
177
|
+
description: "Send a text message.",
|
|
178
|
+
parameters: [
|
|
179
|
+
{ name: "to", dataType: "string", description: "Recipient phone number (international format)", formInputType: "text", required: true },
|
|
180
|
+
{ name: "message", dataType: "string", description: "Message text", formInputType: "textarea", required: true },
|
|
181
|
+
],
|
|
182
|
+
returnType: "object",
|
|
183
|
+
returnDescription: "Message send response.",
|
|
184
|
+
example: 'whatsapp.sendText "+1234567890" "Hello from RobinPath!"',
|
|
185
|
+
},
|
|
186
|
+
sendTemplate: {
|
|
187
|
+
description: "Send a pre-approved template message.",
|
|
188
|
+
parameters: [
|
|
189
|
+
{ name: "to", dataType: "string", description: "Recipient phone number", formInputType: "text", required: true },
|
|
190
|
+
{ name: "templateName", dataType: "string", description: "Template name", formInputType: "text", required: true },
|
|
191
|
+
{ name: "languageCode", dataType: "string", description: "Language code (default: en_US)", formInputType: "text", required: false },
|
|
192
|
+
{ name: "components", dataType: "array", description: "Template component parameters", formInputType: "json", required: false },
|
|
193
|
+
],
|
|
194
|
+
returnType: "object",
|
|
195
|
+
returnDescription: "Message send response.",
|
|
196
|
+
example: 'whatsapp.sendTemplate "+1234567890" "hello_world"',
|
|
197
|
+
},
|
|
198
|
+
sendImage: {
|
|
199
|
+
description: "Send an image message.",
|
|
200
|
+
parameters: [
|
|
201
|
+
{ name: "to", dataType: "string", description: "Recipient phone number", formInputType: "text", required: true },
|
|
202
|
+
{ name: "imageUrl", dataType: "string", description: "Public URL of the image", formInputType: "text", required: true },
|
|
203
|
+
{ name: "caption", dataType: "string", description: "Optional image caption", formInputType: "text", required: false },
|
|
204
|
+
],
|
|
205
|
+
returnType: "object",
|
|
206
|
+
returnDescription: "Message send response.",
|
|
207
|
+
example: 'whatsapp.sendImage "+1234567890" "https://example.com/photo.jpg" "Check this out"',
|
|
208
|
+
},
|
|
209
|
+
sendDocument: {
|
|
210
|
+
description: "Send a document message.",
|
|
211
|
+
parameters: [
|
|
212
|
+
{ name: "to", dataType: "string", description: "Recipient phone number", formInputType: "text", required: true },
|
|
213
|
+
{ name: "documentUrl", dataType: "string", description: "Public URL of the document", formInputType: "text", required: true },
|
|
214
|
+
{ name: "options", dataType: "object", description: "Options: filename, caption", formInputType: "json", required: false },
|
|
215
|
+
],
|
|
216
|
+
returnType: "object",
|
|
217
|
+
returnDescription: "Message send response.",
|
|
218
|
+
example: 'whatsapp.sendDocument "+1234567890" "https://example.com/report.pdf" {"filename":"report.pdf"}',
|
|
219
|
+
},
|
|
220
|
+
sendLocation: {
|
|
221
|
+
description: "Send a location message.",
|
|
222
|
+
parameters: [
|
|
223
|
+
{ name: "to", dataType: "string", description: "Recipient phone number", formInputType: "text", required: true },
|
|
224
|
+
{ name: "latitude", dataType: "number", description: "Latitude", formInputType: "number", required: true },
|
|
225
|
+
{ name: "longitude", dataType: "number", description: "Longitude", formInputType: "number", required: true },
|
|
226
|
+
{ name: "options", dataType: "object", description: "Options: name, address", formInputType: "json", required: false },
|
|
227
|
+
],
|
|
228
|
+
returnType: "object",
|
|
229
|
+
returnDescription: "Message send response.",
|
|
230
|
+
example: 'whatsapp.sendLocation "+1234567890" 37.7749 -122.4194 {"name":"San Francisco"}',
|
|
231
|
+
},
|
|
232
|
+
sendContact: {
|
|
233
|
+
description: "Send contact card(s).",
|
|
234
|
+
parameters: [
|
|
235
|
+
{ name: "to", dataType: "string", description: "Recipient phone number", formInputType: "text", required: true },
|
|
236
|
+
{ name: "contacts", dataType: "array", description: "Array of contact objects", formInputType: "json", required: true },
|
|
237
|
+
],
|
|
238
|
+
returnType: "object",
|
|
239
|
+
returnDescription: "Message send response.",
|
|
240
|
+
example: 'whatsapp.sendContact "+1234567890" [{"name":{"formatted_name":"John Doe"},"phones":[{"phone":"+0987654321"}]}]',
|
|
241
|
+
},
|
|
242
|
+
markRead: {
|
|
243
|
+
description: "Mark a message as read.",
|
|
244
|
+
parameters: [
|
|
245
|
+
{ name: "messageId", dataType: "string", description: "Message ID to mark as read", formInputType: "text", required: true },
|
|
246
|
+
],
|
|
247
|
+
returnType: "object",
|
|
248
|
+
returnDescription: "Status response.",
|
|
249
|
+
example: 'whatsapp.markRead "wamid.xxx"',
|
|
250
|
+
},
|
|
251
|
+
getProfile: {
|
|
252
|
+
description: "Get the WhatsApp Business profile.",
|
|
253
|
+
parameters: [],
|
|
254
|
+
returnType: "object",
|
|
255
|
+
returnDescription: "Business profile data.",
|
|
256
|
+
example: "whatsapp.getProfile",
|
|
257
|
+
},
|
|
258
|
+
updateProfile: {
|
|
259
|
+
description: "Update the WhatsApp Business profile.",
|
|
260
|
+
parameters: [
|
|
261
|
+
{ name: "profile", dataType: "object", description: "Profile fields to update (about, address, description, email, websites, vertical)", formInputType: "json", required: true },
|
|
262
|
+
],
|
|
263
|
+
returnType: "object",
|
|
264
|
+
returnDescription: "Update response.",
|
|
265
|
+
example: 'whatsapp.updateProfile {"about":"We are a business","description":"Our business description"}',
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
export const WhatsappModuleMetadata = {
|
|
269
|
+
description: "Send messages, templates, media, and manage WhatsApp Business profiles via the WhatsApp Cloud API.",
|
|
270
|
+
methods: Object.keys(WhatsappFunctions),
|
|
271
|
+
category: "messaging",
|
|
272
|
+
};
|
|
273
|
+
//# sourceMappingURL=whatsapp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp.js","sourceRoot":"","sources":["../src/whatsapp.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEzC,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,cAAc,GAAG,uDAAuD,CAAC,CAAC;IACpG,OAAO,GAAG,CAAC;AACb,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,MAAM,GAAG,KAAK,EAAE,IAAc;IACrE,MAAM,KAAK,GAAG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,EAAE,yBAAyB;QACtC,UAAU,EAAE;YACV,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC5H;QACD,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,kBAAkB;QACrC,OAAO,EAAE,+BAA+B;KACzC;IACD,UAAU,EAAE;QACV,WAAW,EAAE,oCAAoC;QACjD,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,wBAAwB;QAC3C,OAAO,EAAE,qBAAqB;KAC/B;IACD,aAAa,EAAE;QACb,WAAW,EAAE,uCAAuC;QACpD,UAAU,EAAE;YACV,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,mFAAmF,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;SACjL;QACD,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,kBAAkB;QACrC,OAAO,EAAE,+FAA+F;KACzG;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW,EAAE,oGAAoG;IACjH,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACvC,QAAQ,EAAE,WAAW;CACtB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@robinpath/whatsapp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"publishConfig": { "access": "public" },
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": { ".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" } },
|
|
9
|
+
"files": ["dist"],
|
|
10
|
+
"scripts": { "build": "tsc" },
|
|
11
|
+
"peerDependencies": { "@wiredwp/robinpath": ">=0.20.0" },
|
|
12
|
+
"devDependencies": { "@wiredwp/robinpath": "^0.30.1", "typescript": "^5.6.0" }
|
|
13
|
+
}
|