meta-cloud-api 0.1.22 → 0.1.23
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 +21 -0
- package/README.md +210 -140
- package/dist/api/base.d.mts +1 -1
- package/dist/api/base.d.ts +1 -1
- package/dist/api/businessProfile.d.mts +1 -1
- package/dist/api/businessProfile.d.ts +1 -1
- package/dist/api/businessProfile.js +1 -1
- package/dist/api/encryption.d.mts +1 -1
- package/dist/api/encryption.d.ts +1 -1
- package/dist/api/flow.d.mts +1 -1
- package/dist/api/flow.d.ts +1 -1
- package/dist/api/flow.js +1 -1
- package/dist/api/flow.mjs +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/api/media.d.mts +1 -1
- package/dist/api/media.d.ts +1 -1
- package/dist/api/media.js +1 -1
- package/dist/api/messages.d.mts +1 -1
- package/dist/api/messages.d.ts +1 -1
- package/dist/api/phoneNumber.d.mts +1 -1
- package/dist/api/phoneNumber.d.ts +1 -1
- package/dist/api/phoneNumber.js +1 -1
- package/dist/api/phoneNumber.mjs +1 -1
- package/dist/api/qrCode.d.mts +1 -1
- package/dist/api/qrCode.d.ts +1 -1
- package/dist/api/qrCode.js +1 -1
- package/dist/api/qrCode.mjs +1 -1
- package/dist/api/registration.d.mts +1 -1
- package/dist/api/registration.d.ts +1 -1
- package/dist/api/template.d.mts +1 -1
- package/dist/api/template.d.ts +1 -1
- package/dist/api/template.js +1 -1
- package/dist/api/template.mjs +1 -1
- package/dist/api/twoStepVerification.d.mts +1 -1
- package/dist/api/twoStepVerification.d.ts +1 -1
- package/dist/api/twoStepVerification.js +1 -1
- package/dist/api/twoStepVerification.mjs +1 -1
- package/dist/api/waba.d.mts +1 -1
- package/dist/api/waba.d.ts +1 -1
- package/dist/api/waba.js +1 -1
- package/dist/api/waba.mjs +1 -1
- package/dist/{enums-BYfW0iLO.d.mts → enums-Bcd3jLw2.d.mts} +0 -1
- package/dist/{enums-BYfW0iLO.d.ts → enums-Bcd3jLw2.d.ts} +0 -1
- package/dist/httpsClient.d.mts +1 -1
- package/dist/httpsClient.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/request.js +1 -1
- package/dist/request.js.map +1 -1
- package/dist/request.mjs +1 -1
- package/dist/request.mjs.map +1 -1
- package/dist/types/base.d.mts +1 -1
- package/dist/types/base.d.ts +1 -1
- package/dist/types/businessProfile.d.mts +1 -1
- package/dist/types/businessProfile.d.ts +1 -1
- package/dist/types/config.d.mts +1 -6
- package/dist/types/config.d.ts +1 -6
- package/dist/types/config.js.map +1 -1
- package/dist/types/encryption.d.mts +1 -1
- package/dist/types/encryption.d.ts +1 -1
- package/dist/types/enums.d.mts +1 -1
- package/dist/types/enums.d.ts +1 -1
- package/dist/types/enums.js +1 -1
- package/dist/types/enums.js.map +1 -1
- package/dist/types/enums.mjs +1 -1
- package/dist/types/enums.mjs.map +1 -1
- package/dist/types/flow.d.mts +1 -1
- package/dist/types/flow.d.ts +1 -1
- package/dist/types/httpsClient.d.mts +1 -1
- package/dist/types/httpsClient.d.ts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/types/media.d.mts +1 -1
- package/dist/types/media.d.ts +1 -1
- package/dist/types/messages.d.mts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/phoneNumber.d.mts +1 -1
- package/dist/types/phoneNumber.d.ts +1 -1
- package/dist/types/qrCode.d.mts +1 -1
- package/dist/types/qrCode.d.ts +1 -1
- package/dist/types/registration.d.mts +1 -1
- package/dist/types/registration.d.ts +1 -1
- package/dist/types/request.d.mts +2 -2
- package/dist/types/request.d.ts +2 -2
- package/dist/types/request.js.map +1 -1
- package/dist/types/template.d.mts +1 -1
- package/dist/types/template.d.ts +1 -1
- package/dist/types/twoStepVerification.d.mts +1 -1
- package/dist/types/twoStepVerification.d.ts +1 -1
- package/dist/types/waba.d.mts +1 -1
- package/dist/types/waba.d.ts +1 -1
- package/dist/types/webhook.d.mts +1 -1
- package/dist/types/webhook.d.ts +1 -1
- package/dist/types/whatsapp.d.mts +1 -2
- package/dist/types/whatsapp.d.ts +1 -2
- package/dist/types/whatsapp.js.map +1 -1
- package/dist/utils/filters.d.mts +1 -1
- package/dist/utils/filters.d.ts +1 -1
- package/dist/utils/importConfig.d.mts +1 -1
- package/dist/utils/importConfig.d.ts +1 -1
- package/dist/utils/importConfig.js +1 -1
- package/dist/utils/importConfig.js.map +1 -1
- package/dist/utils/importConfig.mjs +1 -1
- package/dist/utils/importConfig.mjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/dist/webhook.d.mts +1 -1
- package/dist/webhook.d.ts +1 -1
- package/dist/webhook.js +1 -1
- package/dist/webhook.js.map +1 -1
- package/dist/webhook.mjs +1 -1
- package/dist/webhook.mjs.map +1 -1
- package/dist/whatsapp.d.mts +1 -1
- package/dist/whatsapp.d.ts +1 -1
- package/dist/whatsapp.js +1 -1
- package/dist/whatsapp.js.map +1 -1
- package/dist/whatsapp.mjs +1 -1
- package/dist/whatsapp.mjs.map +1 -1
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2025] [froggy1014]
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
# Meta Cloud API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div style="display: flex; align-items: center;">
|
|
4
|
+
<img src="../../public/README.svg" alt="Meta Cloud API" style="flex: 1; width: 100px;">
|
|
5
|
+
<div style="flex: 1; padding-left: 20px;">
|
|
6
|
+
<p>Meta Cloud API - A powerful TypeScript wrapper for Meta's Cloud API, providing a clean and type-safe interface for WhatsApp Business Platform integration.</p>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[
|
|
10
|
+
## Resources
|
|
11
|
+
|
|
12
|
+
- [Documentation](https://www.meta-cloud-api.xyz/)
|
|
13
|
+
- [API Reference (Swagger)](https://meta-cloud-api-swagger.vercel.app/api-docs/)
|
|
8
14
|
|
|
9
15
|
## Features
|
|
10
16
|
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
- Templates API
|
|
17
|
-
- Media API
|
|
18
|
-
- Phone Number API
|
|
19
|
-
- Flow API
|
|
20
|
-
- QR Code API
|
|
21
|
-
- Registration API
|
|
22
|
-
- WABA (WhatsApp Business Account) API
|
|
23
|
-
- Two-Step Verification API
|
|
24
|
-
- Encryption API
|
|
17
|
+
- **Type-Safe Development** - Built with TypeScript to provide code completion and catch errors during development
|
|
18
|
+
- **Comprehensive Coverage** - Full support for WhatsApp Business Platform APIs
|
|
19
|
+
- **Clean Interface** - Intuitive methods organized by domain for improved code readability
|
|
20
|
+
- **Error Handling** - Standardized error handling with detailed Meta API error information
|
|
21
|
+
- **Webhook Handler** - Built-in support for webhook verification and message handling
|
|
25
22
|
|
|
26
23
|
## Installation
|
|
27
24
|
|
|
@@ -36,122 +33,193 @@ pnpm add meta-cloud-api
|
|
|
36
33
|
## Quick Start
|
|
37
34
|
|
|
38
35
|
```typescript
|
|
39
|
-
import WhatsApp from 'meta-cloud-api';
|
|
40
|
-
|
|
41
|
-
// Initialize with configuration object
|
|
42
|
-
const whatsapp = new WhatsApp({
|
|
43
|
-
phoneNumberId: YOUR_PHONE_NUMBER_ID,
|
|
44
|
-
accessToken: 'YOUR_ACCESS_TOKEN'
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// You can also use environment variables (.env file)
|
|
48
|
-
// const whatsapp = new WhatsApp();
|
|
49
|
-
|
|
50
|
-
// Send a text message
|
|
51
|
-
async function sendMessage() {
|
|
52
|
-
try {
|
|
53
|
-
const response = await whatsapp.messages.text(
|
|
54
|
-
{ body: "Hello from Meta Cloud API!" },
|
|
55
|
-
15551234567
|
|
56
|
-
);
|
|
57
|
-
console.log(`Message sent successfully with ID: ${response.messages[0].id}`);
|
|
58
|
-
} catch (error) {
|
|
59
|
-
console.error('Error sending message:', error);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
```
|
|
36
|
+
import WhatsApp, { MessageTypesEnum } from 'meta-cloud-api';
|
|
63
37
|
|
|
64
|
-
|
|
38
|
+
// Initialize the client
|
|
39
|
+
const client = new WhatsApp({
|
|
40
|
+
accessToken: process.env.CLOUD_API_ACCESS_TOKEN,
|
|
41
|
+
phoneNumberId: Number(process.env.WA_PHONE_NUMBER_ID),
|
|
42
|
+
businessAcctId: process.env.WA_BUSINESS_ACCOUNT_ID
|
|
43
|
+
});
|
|
65
44
|
|
|
66
|
-
|
|
45
|
+
// Send a WhatsApp text message
|
|
46
|
+
const response = await client.messages.text({
|
|
47
|
+
to: '+1234567890',
|
|
48
|
+
body: 'Hello from Meta Cloud API!'
|
|
49
|
+
});
|
|
67
50
|
|
|
51
|
+
console.log(`Message ID: ${response.messages[0].id}`);
|
|
68
52
|
```
|
|
69
|
-
WA_BASE_URL=graph.facebook.com
|
|
70
|
-
M4D_APP_ID=your_app_id
|
|
71
|
-
M4D_APP_SECRET=your_app_secret
|
|
72
|
-
WA_PHONE_NUMBER_ID=your_phone_number_id
|
|
73
|
-
WA_BUSINESS_ACCOUNT_ID=your_business_account_id
|
|
74
|
-
CLOUD_API_ACCESS_TOKEN=your_access_token
|
|
75
|
-
CLOUD_API_VERSION=17.0
|
|
76
|
-
```
|
|
77
53
|
|
|
78
|
-
##
|
|
54
|
+
## Usage Examples
|
|
55
|
+
|
|
56
|
+
### Messaging
|
|
57
|
+
|
|
58
|
+
Send different types of messages through WhatsApp Business Platform:
|
|
79
59
|
|
|
80
|
-
|
|
60
|
+
#### Text Message
|
|
81
61
|
|
|
82
|
-
|
|
62
|
+
```typescript
|
|
63
|
+
const result = await client.messages.text({
|
|
64
|
+
to: "15551234567",
|
|
65
|
+
body: "Hello from Meta Cloud API!"
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### Template Message
|
|
83
70
|
|
|
84
71
|
```typescript
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
15551234567
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
// Document message
|
|
98
|
-
await whatsapp.messages.document(
|
|
99
|
-
{
|
|
100
|
-
link: "https://example.com/document.pdf",
|
|
101
|
-
filename: "Important Document.pdf"
|
|
102
|
-
},
|
|
103
|
-
15551234567
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
// Template message
|
|
107
|
-
await whatsapp.messages.template(
|
|
108
|
-
{
|
|
109
|
-
name: "sample_shipping_confirmation",
|
|
110
|
-
language: { code: "en_US" },
|
|
72
|
+
import { ComponentTypesEnum, LanguagesEnum, ParametersTypesEnum } from 'meta-cloud-api';
|
|
73
|
+
|
|
74
|
+
const result = await client.messages.template({
|
|
75
|
+
to: "15551234567",
|
|
76
|
+
body: {
|
|
77
|
+
name: "shipping_confirmation",
|
|
78
|
+
language: {
|
|
79
|
+
code: LanguagesEnum.English_US,
|
|
80
|
+
policy: "deterministic"
|
|
81
|
+
},
|
|
111
82
|
components: [
|
|
112
83
|
{
|
|
113
|
-
type:
|
|
84
|
+
type: ComponentTypesEnum.Body,
|
|
114
85
|
parameters: [
|
|
115
|
-
{
|
|
116
|
-
|
|
86
|
+
{
|
|
87
|
+
type: ParametersTypesEnum.Text,
|
|
88
|
+
text: "John Doe"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: ParametersTypesEnum.Text,
|
|
92
|
+
text: "12345"
|
|
93
|
+
}
|
|
117
94
|
]
|
|
118
95
|
}
|
|
119
96
|
]
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Media Message
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
const result = await client.messages.image({
|
|
105
|
+
to: "15551234567",
|
|
106
|
+
body: {
|
|
107
|
+
link: "https://example.com/image.jpg"
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Interactive Message
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { InteractiveTypesEnum } from 'meta-cloud-api';
|
|
116
|
+
|
|
117
|
+
const result = await client.messages.interactive({
|
|
118
|
+
to: "15551234567",
|
|
119
|
+
body: {
|
|
120
|
+
type: InteractiveTypesEnum.Button,
|
|
121
|
+
body: {
|
|
122
|
+
text: "What would you like to do?"
|
|
123
|
+
},
|
|
129
124
|
action: {
|
|
130
125
|
buttons: [
|
|
131
|
-
{
|
|
132
|
-
|
|
126
|
+
{
|
|
127
|
+
type: "reply",
|
|
128
|
+
reply: {
|
|
129
|
+
id: "help_button",
|
|
130
|
+
title: "Get Help"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: "reply",
|
|
135
|
+
reply: {
|
|
136
|
+
id: "info_button",
|
|
137
|
+
title: "Account Info"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
133
140
|
]
|
|
134
141
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Example Projects
|
|
147
|
+
|
|
148
|
+
We provide ready-to-use example projects demonstrating how to integrate Meta Cloud API in different frameworks:
|
|
149
|
+
|
|
150
|
+
- [Express.js Example](./examples/express-example) - A simple Express.js server with webhook handling for WhatsApp messages
|
|
151
|
+
- [Next.js Example](./examples/nextjs-page-router-example) - Integration with Next.js Pages Router, showing how to handle webhooks in a Next.js API route
|
|
152
|
+
|
|
153
|
+
Each example includes its own README with setup instructions and demonstration of core features.
|
|
154
|
+
|
|
155
|
+
### Webhook Integration
|
|
156
|
+
|
|
157
|
+
Set up a webhook to receive messages and events from the WhatsApp API:
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
import WhatsApp, {
|
|
161
|
+
WebhookHandler,
|
|
162
|
+
MessageTypesEnum,
|
|
163
|
+
WebhookMessage
|
|
164
|
+
} from 'meta-cloud-api';
|
|
165
|
+
|
|
166
|
+
// Initialize the handler
|
|
167
|
+
const webhookHandler = new WebhookHandler({
|
|
168
|
+
accessToken: process.env.CLOUD_API_ACCESS_TOKEN,
|
|
169
|
+
phoneNumberId: Number(process.env.WA_PHONE_NUMBER_ID),
|
|
170
|
+
businessAcctId: process.env.WA_BUSINESS_ACCOUNT_ID,
|
|
171
|
+
webhookVerificationToken: process.env.WEBHOOK_VERIFICATION_TOKEN
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// Handle webhook verification
|
|
175
|
+
app.get('/webhook', (req, res) => {
|
|
176
|
+
webhookHandler.handleVerificationRequest(req, res);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// Handle incoming messages
|
|
180
|
+
app.post('/webhook', (req, res) => {
|
|
181
|
+
webhookHandler.handleWebhookRequest(req, res);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
// Pre-process all messages (e.g., mark as read)
|
|
185
|
+
webhookHandler.onMessagePreProcess(async (client: WhatsApp, message: WebhookMessage) => {
|
|
186
|
+
await client.messages.markAsRead({ messageId: message.id });
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
// Handle text messages
|
|
190
|
+
webhookHandler.onMessage(MessageTypesEnum.Text, async (client: WhatsApp, message: WebhookMessage) => {
|
|
191
|
+
if (message.text?.body) {
|
|
192
|
+
await client.messages.text({
|
|
193
|
+
body: `You said: "${message.text.body}"`,
|
|
194
|
+
to: message.from
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// Handle image messages
|
|
200
|
+
webhookHandler.onMessage(MessageTypesEnum.Image, async (client: WhatsApp, message: WebhookMessage) => {
|
|
201
|
+
await client.messages.text({
|
|
202
|
+
body: "Thanks for the image!",
|
|
203
|
+
to: message.from
|
|
204
|
+
});
|
|
205
|
+
});
|
|
138
206
|
```
|
|
139
207
|
|
|
140
|
-
### Templates
|
|
208
|
+
### Templates
|
|
141
209
|
|
|
142
|
-
|
|
210
|
+
Manage message templates for your WhatsApp Business account:
|
|
143
211
|
|
|
144
212
|
```typescript
|
|
145
|
-
//
|
|
146
|
-
const templates = await
|
|
147
|
-
|
|
213
|
+
// List all templates
|
|
214
|
+
const templates = await client.templates.list({
|
|
215
|
+
businessId: process.env.WA_BUSINESS_ACCOUNT_ID
|
|
148
216
|
});
|
|
149
217
|
|
|
150
218
|
// Create a new template
|
|
151
|
-
await
|
|
152
|
-
|
|
219
|
+
const newTemplate = await client.templates.create({
|
|
220
|
+
businessId: process.env.WA_BUSINESS_ACCOUNT_ID,
|
|
221
|
+
name: "my_special_template",
|
|
153
222
|
category: "MARKETING",
|
|
154
|
-
language: "en_US",
|
|
155
223
|
components: [
|
|
156
224
|
{
|
|
157
225
|
type: "HEADER",
|
|
@@ -160,57 +228,59 @@ await whatsapp.template.createTemplate({
|
|
|
160
228
|
},
|
|
161
229
|
{
|
|
162
230
|
type: "BODY",
|
|
163
|
-
text: "Hi {{1}},
|
|
231
|
+
text: "Hi {{1}}, we have a special offer for you: {{2}}% off your next purchase!"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
type: "FOOTER",
|
|
235
|
+
text: "Tap the button below to shop now"
|
|
164
236
|
}
|
|
165
|
-
]
|
|
237
|
+
],
|
|
238
|
+
language: "en_US"
|
|
166
239
|
});
|
|
167
240
|
```
|
|
168
241
|
|
|
169
|
-
### Media
|
|
242
|
+
### Media Management
|
|
170
243
|
|
|
171
|
-
|
|
244
|
+
Upload and retrieve media for your messages:
|
|
172
245
|
|
|
173
246
|
```typescript
|
|
174
|
-
|
|
175
|
-
const mediaResponse = await whatsapp.media.uploadMedia(
|
|
176
|
-
new File(['...'], 'image.jpg', { type: 'image/jpeg' })
|
|
177
|
-
);
|
|
247
|
+
import fs from 'fs';
|
|
178
248
|
|
|
179
|
-
//
|
|
180
|
-
const
|
|
249
|
+
// Upload media
|
|
250
|
+
const mediaUpload = await client.media.upload({
|
|
251
|
+
file: fs.createReadStream("./path/to/image.jpg"),
|
|
252
|
+
type: "image/jpeg"
|
|
253
|
+
});
|
|
181
254
|
|
|
182
|
-
//
|
|
183
|
-
await
|
|
255
|
+
// Get media URL
|
|
256
|
+
const media = await client.media.get({
|
|
257
|
+
mediaId: mediaUpload.id
|
|
258
|
+
});
|
|
184
259
|
```
|
|
185
260
|
|
|
186
|
-
|
|
261
|
+
### Business Profile
|
|
187
262
|
|
|
188
|
-
|
|
263
|
+
Update your WhatsApp Business profile information:
|
|
189
264
|
|
|
190
265
|
```typescript
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
console.error(`Meta API Error: ${error.error.message}`);
|
|
199
|
-
console.error(`Error Code: ${error.error.code}`);
|
|
200
|
-
|
|
201
|
-
if (error.error.error_data) {
|
|
202
|
-
console.error(`Details: ${error.error.error_data.details}`);
|
|
203
|
-
}
|
|
204
|
-
} else {
|
|
205
|
-
console.error('Unexpected error:', error);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
266
|
+
const profile = await client.businessProfile.update({
|
|
267
|
+
about: "We provide the best service!",
|
|
268
|
+
address: "123 Business St, City",
|
|
269
|
+
description: "Premium products and services",
|
|
270
|
+
email: "contact@business.com",
|
|
271
|
+
websites: ["https://www.business.com"]
|
|
272
|
+
});
|
|
208
273
|
```
|
|
209
274
|
|
|
210
|
-
##
|
|
275
|
+
## Requirements
|
|
211
276
|
|
|
212
|
-
|
|
277
|
+
- TypeScript 4.5+
|
|
278
|
+
- Node.js 18 LTS or later
|
|
213
279
|
|
|
214
280
|
## Contributing
|
|
215
281
|
|
|
216
|
-
|
|
282
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
283
|
+
|
|
284
|
+
## License
|
|
285
|
+
|
|
286
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/dist/api/base.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpMethodsEnum } from '../enums-
|
|
1
|
+
import { H as HttpMethodsEnum } from '../enums-Bcd3jLw2.mjs';
|
|
2
2
|
import { BaseClass } from '../types/base.mjs';
|
|
3
3
|
import { WabaConfigType } from '../types/config.mjs';
|
|
4
4
|
import { RequesterClass } from '../types/request.mjs';
|
package/dist/api/base.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpMethodsEnum } from '../enums-
|
|
1
|
+
import { H as HttpMethodsEnum } from '../enums-Bcd3jLw2.js';
|
|
2
2
|
import { BaseClass } from '../types/base.js';
|
|
3
3
|
import { WabaConfigType } from '../types/config.js';
|
|
4
4
|
import { RequesterClass } from '../types/request.js';
|
|
@@ -2,7 +2,7 @@ import { BusinessProfileClass, BusinessProfileFieldsParam, BusinessProfileRespon
|
|
|
2
2
|
import { WabaConfigType } from '../types/config.mjs';
|
|
3
3
|
import { RequesterClass, ResponseSuccess } from '../types/request.mjs';
|
|
4
4
|
import BaseAPI from './base.mjs';
|
|
5
|
-
import '../enums-
|
|
5
|
+
import '../enums-Bcd3jLw2.mjs';
|
|
6
6
|
import '../types/base.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -2,7 +2,7 @@ import { BusinessProfileClass, BusinessProfileFieldsParam, BusinessProfileRespon
|
|
|
2
2
|
import { WabaConfigType } from '../types/config.js';
|
|
3
3
|
import { RequesterClass, ResponseSuccess } from '../types/request.js';
|
|
4
4
|
import BaseAPI from './base.js';
|
|
5
|
-
import '../enums-
|
|
5
|
+
import '../enums-Bcd3jLw2.js';
|
|
6
6
|
import '../types/base.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var U=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var T=(i,t)=>{for(var R in t)U(i,R,{get:t[R],enumerable:!0})},I=(i,t,R,P)=>{if(t&&typeof t=="object"||typeof t=="function")for(let A of O(t))!p.call(i,A)&&A!==R&&U(i,A,{get:()=>t[A],enumerable:!(P=G(t,A))||P.enumerable});return i};var K=i=>I(U({},"__esModule",{value:!0}),i);var F={};T(F,{default:()=>N});module.exports=K(F);function l(i){if(!i)return"";let t="";return Array.isArray(i)?t=i.join(","):t=Object.entries(i).filter(([R,P])=>P).map(([R])=>R).join(","),t?`?fields=${t}`:""}var B=i=>{if(!i||Object.keys(i).length===0)return"";let t=new URLSearchParams;for(let[P,A]of Object.entries(i))A!==void 0&&t.append(P,String(A));let R=t.toString();return R?`?${R}`:""};var S=class{name;debug;constructor(t,R=!1){this.name=t,this.debug=R}log(...t){if(this.debug){let R=`[ ${Date.now()} ]`;this.name&&(R+=` - ${this.name}`),console.log.apply(console,[R,": ",...t])}}error(...t){let R=`[ ${Date.now()} ] - ERROR`;this.name&&(R+=` - ${this.name}`),console.error.apply(console,[R,": ",...t])}warn(...t){let R=`[ ${Date.now()} ] - WARN`;this.name&&(R+=` - ${this.name}`),console.warn.apply(console,[R,": ",...t])}info(...t){let R=`[ ${Date.now()} ] - INFO`;this.name&&(R+=` - ${this.name}`),console.info.apply(console,[R,": ",...t])}};var
|
|
1
|
+
"use strict";var U=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var T=(i,t)=>{for(var R in t)U(i,R,{get:t[R],enumerable:!0})},I=(i,t,R,P)=>{if(t&&typeof t=="object"||typeof t=="function")for(let A of O(t))!p.call(i,A)&&A!==R&&U(i,A,{get:()=>t[A],enumerable:!(P=G(t,A))||P.enumerable});return i};var K=i=>I(U({},"__esModule",{value:!0}),i);var F={};T(F,{default:()=>N});module.exports=K(F);function l(i){if(!i)return"";let t="";return Array.isArray(i)?t=i.join(","):t=Object.entries(i).filter(([R,P])=>P).map(([R])=>R).join(","),t?`?fields=${t}`:""}var B=i=>{if(!i||Object.keys(i).length===0)return"";let t=new URLSearchParams;for(let[P,A]of Object.entries(i))A!==void 0&&t.append(P,String(A));let R=t.toString();return R?`?${R}`:""};var S=class{name;debug;constructor(t,R=!1){this.name=t,this.debug=R}log(...t){if(this.debug){let R=`[ ${Date.now()} ]`;this.name&&(R+=` - ${this.name}`),console.log.apply(console,[R,": ",...t])}}error(...t){let R=`[ ${Date.now()} ] - ERROR`;this.name&&(R+=` - ${this.name}`),console.error.apply(console,[R,": ",...t])}warn(...t){let R=`[ ${Date.now()} ] - WARN`;this.name&&(R+=` - ${this.name}`),console.warn.apply(console,[R,": ",...t])}info(...t){let R=`[ ${Date.now()} ] - INFO`;this.name&&(R+=` - ${this.name}`),console.info.apply(console,[R,": ",...t])}};var f="BaseAPI",M=!1,_=new S(f,process.env.DEBUG==="true"||M),D=class{config;client;constructor(t,R){this.config=t,this.client=R,_.log("Initialized with HTTPSClient")}sendJson(t,R,P,A){return this.client.getJson(t,R,P,A)}sendFormData(t,R,P,A){return this.client.sendFormData(t,R,P,A)}sendUrlEncodedForm(t,R,P,A){return this.client.sendUrlEncodedForm(t,R,P,A)}};var N=class extends D{endpoint="whatsapp_business_profile";constructor(t,R){super(t,R)}async getBusinessProfile(t){return this.sendJson("GET",`${this.config.WA_PHONE_NUMBER_ID}/${this.endpoint}${l(t)}`,this.config.REQUEST_TIMEOUT,null)}async updateBusinessProfile(t){return this.sendJson("POST",`${this.config.WA_PHONE_NUMBER_ID}/${this.endpoint}`,this.config.REQUEST_TIMEOUT,JSON.stringify(t))}async createUploadSession(t,R,P){let A=B({file_length:t,file_type:R,file_name:P});return this.sendJson("POST",`app/uploads/${A}`,this.config.REQUEST_TIMEOUT,null)}async uploadMedia(t,R){return this.sendJson("POST",`${t}`,this.config.REQUEST_TIMEOUT,R)}async getUploadHandle(t){return this.sendJson("GET",`${t}`,this.config.REQUEST_TIMEOUT,null)}};
|
|
2
2
|
//# sourceMappingURL=businessProfile.js.map
|
|
@@ -2,7 +2,7 @@ import { WabaConfigType } from '../types/config.mjs';
|
|
|
2
2
|
import { EncryptionClass, EncryptionPublicKeyResponse } from '../types/encryption.mjs';
|
|
3
3
|
import { RequesterClass, ResponseSuccess } from '../types/request.mjs';
|
|
4
4
|
import BaseAPI from './base.mjs';
|
|
5
|
-
import '../enums-
|
|
5
|
+
import '../enums-Bcd3jLw2.mjs';
|
|
6
6
|
import '../types/base.mjs';
|
|
7
7
|
|
|
8
8
|
declare class EncryptionAPI extends BaseAPI implements EncryptionClass {
|
package/dist/api/encryption.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { WabaConfigType } from '../types/config.js';
|
|
|
2
2
|
import { EncryptionClass, EncryptionPublicKeyResponse } from '../types/encryption.js';
|
|
3
3
|
import { RequesterClass, ResponseSuccess } from '../types/request.js';
|
|
4
4
|
import BaseAPI from './base.js';
|
|
5
|
-
import '../enums-
|
|
5
|
+
import '../enums-Bcd3jLw2.js';
|
|
6
6
|
import '../types/base.js';
|
|
7
7
|
|
|
8
8
|
declare class EncryptionAPI extends BaseAPI implements EncryptionClass {
|
package/dist/api/flow.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { WabaConfigType } from '../types/config.mjs';
|
|
|
2
2
|
import { FlowClass, FlowsListResponse, FlowCategoryEnum, CreateFlowResponse, Flow, FlowPreviewResponse, FlowAssetsResponse, UpdateFlowResponse, ValidateFlowJsonResponse, FlowMigrationResponse } from '../types/flow.mjs';
|
|
3
3
|
import { RequesterClass, ResponseSuccess } from '../types/request.mjs';
|
|
4
4
|
import BaseAPI from './base.mjs';
|
|
5
|
-
import '../enums-
|
|
5
|
+
import '../enums-Bcd3jLw2.mjs';
|
|
6
6
|
import '../types/base.mjs';
|
|
7
7
|
|
|
8
8
|
declare class FlowAPI extends BaseAPI implements FlowClass {
|
package/dist/api/flow.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { WabaConfigType } from '../types/config.js';
|
|
|
2
2
|
import { FlowClass, FlowsListResponse, FlowCategoryEnum, CreateFlowResponse, Flow, FlowPreviewResponse, FlowAssetsResponse, UpdateFlowResponse, ValidateFlowJsonResponse, FlowMigrationResponse } from '../types/flow.js';
|
|
3
3
|
import { RequesterClass, ResponseSuccess } from '../types/request.js';
|
|
4
4
|
import BaseAPI from './base.js';
|
|
5
|
-
import '../enums-
|
|
5
|
+
import '../enums-Bcd3jLw2.js';
|
|
6
6
|
import '../types/base.js';
|
|
7
7
|
|
|
8
8
|
declare class FlowAPI extends BaseAPI implements FlowClass {
|
package/dist/api/flow.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var N=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var N=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var _=(A,i)=>{for(var t in i)N(A,t,{get:i[t],enumerable:!0})},f=(A,i,t,l)=>{if(i&&typeof i=="object"||typeof i=="function")for(let R of G(i))!U.call(A,R)&&R!==t&&N(A,R,{get:()=>i[R],enumerable:!(l=O(i,R))||l.enumerable});return A};var F=A=>f(N({},"__esModule",{value:!0}),A);var M={};_(M,{default:()=>D});module.exports=F(M);var S=class{name;debug;constructor(i,t=!1){this.name=i,this.debug=t}log(...i){if(this.debug){let t=`[ ${Date.now()} ]`;this.name&&(t+=` - ${this.name}`),console.log.apply(console,[t,": ",...i])}}error(...i){let t=`[ ${Date.now()} ] - ERROR`;this.name&&(t+=` - ${this.name}`),console.error.apply(console,[t,": ",...i])}warn(...i){let t=`[ ${Date.now()} ] - WARN`;this.name&&(t+=` - ${this.name}`),console.warn.apply(console,[t,": ",...i])}info(...i){let t=`[ ${Date.now()} ] - INFO`;this.name&&(t+=` - ${this.name}`),console.info.apply(console,[t,": ",...i])}};var w="BaseAPI",T=!1,I=new S(w,process.env.DEBUG==="true"||T),P=class{config;client;constructor(i,t){this.config=i,this.client=t,I.log("Initialized with HTTPSClient")}sendJson(i,t,l,R){return this.client.getJson(i,t,l,R)}sendFormData(i,t,l,R){return this.client.sendFormData(i,t,l,R)}sendUrlEncodedForm(i,t,l,R){return this.client.sendUrlEncodedForm(i,t,l,R)}};var K="FlowAPI",h=!1,B=new S(K,process.env.DEBUG==="true"||h),D=class extends P{constructor(i,t){super(i,t),B.log("FlowAPI initialized")}async listFlows(i){return this.sendJson("GET",`/${i}/flows`,this.config.REQUEST_TIMEOUT,null)}async createFlow(i,t){let l={name:t.name,categories:t.categories,...t.endpoint_uri&&{endpoint_uri:t.endpoint_uri},...t.clone_flow_id&&{clone_flow_id:t.clone_flow_id},...t.flow_json&&{flow_json:t.flow_json},...t.publish!==void 0&&{publish:t.publish}};return this.sendJson("POST",`/${i}/flows`,this.config.REQUEST_TIMEOUT,JSON.stringify(l))}async getFlow(i,t,l){let R=new URLSearchParams;t&&R.append("fields",t),l&&R.append("date_format",l);let p=R.toString()?`?${R.toString()}`:"";return this.sendJson("GET",`/${i}${p}`,this.config.REQUEST_TIMEOUT,null)}async getFlowPreview(i,t=!1){let l=`preview.invalidate(${t})`;return this.getFlow(i,l)}async updateFlowMetadata(i,t){let l={...t.name&&{name:t.name},...t.categories&&{categories:t.categories},...t.endpoint_uri&&{endpoint_uri:t.endpoint_uri},...t.application_id&&{application_id:t.application_id}};return this.sendJson("POST",`/${i}`,this.config.REQUEST_TIMEOUT,JSON.stringify(l))}async deleteFlow(i){return this.sendJson("DELETE",`/${i}`,this.config.REQUEST_TIMEOUT,null)}async listAssets(i){return this.sendJson("GET",`/${i}/assets`,this.config.REQUEST_TIMEOUT,null)}async updateFlowJson(i,t){let l=new FormData,R;if(t.file instanceof Buffer)R=new globalThis.Blob([t.file]),l.append("file",R);else if(typeof t.file=="object"&&!(t.file instanceof Blob))try{R=new globalThis.Blob([JSON.stringify(t.file,null,2)],{type:"application/json"}),l.append("file",R)}catch{throw new Error("Failed to stringify JSON object for Flow JSON update.")}else if(t.file instanceof Blob)R=t.file,l.append("file",R);else throw new Error("Invalid file type provided for Flow JSON update. Must be a Buffer, JSON object, or Blob.");return l.append("asset_type","FLOW_JSON"),l.append("name",t.name||"flow.json"),this.sendFormData("POST",`/${i}/assets`,this.config.REQUEST_TIMEOUT,l)}async validateFlowJson(i,t){try{let l=await this.updateFlowJson(i,{file:t}),R=!l.validation_errors||l.validation_errors.length===0;return{...l,valid:R}}catch(l){throw B.error("Error during Flow JSON validation attempt:",l),l}}async publishFlow(i){return this.sendJson("POST",`/${i}/publish`,this.config.REQUEST_TIMEOUT,JSON.stringify({}))}async deprecateFlow(i){return this.sendJson("POST",`/${i}/deprecate`,this.config.REQUEST_TIMEOUT,JSON.stringify({}))}async migrateFlows(i,t){let l={source_waba_id:t.source_waba_id,...t.source_flow_names&&{source_flow_names:t.source_flow_names}};return this.sendJson("POST",`/${i}/migrate_flows`,this.config.REQUEST_TIMEOUT,JSON.stringify(l))}};
|
|
2
2
|
//# sourceMappingURL=flow.js.map
|
package/dist/api/flow.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var A=class{name;debug;constructor(i,t=!1){this.name=i,this.debug=t}log(...i){if(this.debug){let t=`[ ${Date.now()} ]`;this.name&&(t+=` - ${this.name}`),console.log.apply(console,[t,": ",...i])}}error(...i){let t=`[ ${Date.now()} ] - ERROR`;this.name&&(t+=` - ${this.name}`),console.error.apply(console,[t,": ",...i])}warn(...i){let t=`[ ${Date.now()} ] - WARN`;this.name&&(t+=` - ${this.name}`),console.warn.apply(console,[t,": ",...i])}info(...i){let t=`[ ${Date.now()} ] - INFO`;this.name&&(t+=` - ${this.name}`),console.info.apply(console,[t,": ",...i])}};var B="BaseAPI",O=!1,
|
|
1
|
+
var A=class{name;debug;constructor(i,t=!1){this.name=i,this.debug=t}log(...i){if(this.debug){let t=`[ ${Date.now()} ]`;this.name&&(t+=` - ${this.name}`),console.log.apply(console,[t,": ",...i])}}error(...i){let t=`[ ${Date.now()} ] - ERROR`;this.name&&(t+=` - ${this.name}`),console.error.apply(console,[t,": ",...i])}warn(...i){let t=`[ ${Date.now()} ] - WARN`;this.name&&(t+=` - ${this.name}`),console.warn.apply(console,[t,": ",...i])}info(...i){let t=`[ ${Date.now()} ] - INFO`;this.name&&(t+=` - ${this.name}`),console.info.apply(console,[t,": ",...i])}};var B="BaseAPI",O=!1,G=new A(B,process.env.DEBUG==="true"||O),S=class{config;client;constructor(i,t){this.config=i,this.client=t,G.log("Initialized with HTTPSClient")}sendJson(i,t,l,R){return this.client.getJson(i,t,l,R)}sendFormData(i,t,l,R){return this.client.sendFormData(i,t,l,R)}sendUrlEncodedForm(i,t,l,R){return this.client.sendUrlEncodedForm(i,t,l,R)}};var U="FlowAPI",_=!1,N=new A(U,process.env.DEBUG==="true"||_),D=class extends S{constructor(i,t){super(i,t),N.log("FlowAPI initialized")}async listFlows(i){return this.sendJson("GET",`/${i}/flows`,this.config.REQUEST_TIMEOUT,null)}async createFlow(i,t){let l={name:t.name,categories:t.categories,...t.endpoint_uri&&{endpoint_uri:t.endpoint_uri},...t.clone_flow_id&&{clone_flow_id:t.clone_flow_id},...t.flow_json&&{flow_json:t.flow_json},...t.publish!==void 0&&{publish:t.publish}};return this.sendJson("POST",`/${i}/flows`,this.config.REQUEST_TIMEOUT,JSON.stringify(l))}async getFlow(i,t,l){let R=new URLSearchParams;t&&R.append("fields",t),l&&R.append("date_format",l);let P=R.toString()?`?${R.toString()}`:"";return this.sendJson("GET",`/${i}${P}`,this.config.REQUEST_TIMEOUT,null)}async getFlowPreview(i,t=!1){let l=`preview.invalidate(${t})`;return this.getFlow(i,l)}async updateFlowMetadata(i,t){let l={...t.name&&{name:t.name},...t.categories&&{categories:t.categories},...t.endpoint_uri&&{endpoint_uri:t.endpoint_uri},...t.application_id&&{application_id:t.application_id}};return this.sendJson("POST",`/${i}`,this.config.REQUEST_TIMEOUT,JSON.stringify(l))}async deleteFlow(i){return this.sendJson("DELETE",`/${i}`,this.config.REQUEST_TIMEOUT,null)}async listAssets(i){return this.sendJson("GET",`/${i}/assets`,this.config.REQUEST_TIMEOUT,null)}async updateFlowJson(i,t){let l=new FormData,R;if(t.file instanceof Buffer)R=new globalThis.Blob([t.file]),l.append("file",R);else if(typeof t.file=="object"&&!(t.file instanceof Blob))try{R=new globalThis.Blob([JSON.stringify(t.file,null,2)],{type:"application/json"}),l.append("file",R)}catch{throw new Error("Failed to stringify JSON object for Flow JSON update.")}else if(t.file instanceof Blob)R=t.file,l.append("file",R);else throw new Error("Invalid file type provided for Flow JSON update. Must be a Buffer, JSON object, or Blob.");return l.append("asset_type","FLOW_JSON"),l.append("name",t.name||"flow.json"),this.sendFormData("POST",`/${i}/assets`,this.config.REQUEST_TIMEOUT,l)}async validateFlowJson(i,t){try{let l=await this.updateFlowJson(i,{file:t}),R=!l.validation_errors||l.validation_errors.length===0;return{...l,valid:R}}catch(l){throw N.error("Error during Flow JSON validation attempt:",l),l}}async publishFlow(i){return this.sendJson("POST",`/${i}/publish`,this.config.REQUEST_TIMEOUT,JSON.stringify({}))}async deprecateFlow(i){return this.sendJson("POST",`/${i}/deprecate`,this.config.REQUEST_TIMEOUT,JSON.stringify({}))}async migrateFlows(i,t){let l={source_waba_id:t.source_waba_id,...t.source_flow_names&&{source_flow_names:t.source_flow_names}};return this.sendJson("POST",`/${i}/migrate_flows`,this.config.REQUEST_TIMEOUT,JSON.stringify(l))}};export{D as default};
|
|
2
2
|
//# sourceMappingURL=flow.mjs.map
|
package/dist/api/index.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ export { default as RegistrationAPI } from './registration.mjs';
|
|
|
10
10
|
export { default as TemplateAPI } from './template.mjs';
|
|
11
11
|
export { default as TwoStepVerificationAPI } from './twoStepVerification.mjs';
|
|
12
12
|
export { default as WabaAPI } from './waba.mjs';
|
|
13
|
-
import '../enums-
|
|
13
|
+
import '../enums-Bcd3jLw2.mjs';
|
|
14
14
|
import '../types/base.mjs';
|
|
15
15
|
import '../types/config.mjs';
|
|
16
16
|
import '../types/request.mjs';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { default as RegistrationAPI } from './registration.js';
|
|
|
10
10
|
export { default as TemplateAPI } from './template.js';
|
|
11
11
|
export { default as TwoStepVerificationAPI } from './twoStepVerification.js';
|
|
12
12
|
export { default as WabaAPI } from './waba.js';
|
|
13
|
-
import '../enums-
|
|
13
|
+
import '../enums-Bcd3jLw2.js';
|
|
14
14
|
import '../types/base.js';
|
|
15
15
|
import '../types/config.js';
|
|
16
16
|
import '../types/request.js';
|