You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Types are generated from the included OpenAPI specification. Regenerate types and build the library with:
84
+
85
+
```bash
86
+
# regenerate types from OpenAPI
87
+
npm run generate:types
88
+
89
+
# build all bundles (CJS/ESM/UMD + d.ts)
90
+
npm run build
91
+
92
+
# or build only browser-targeted bundles
93
+
npm run build:browser
94
+
```
95
+
96
+
The build process will output files to `dist/` including `index.d.ts` for TypeScript consumers.
97
+
98
+
28
99
## Quick Start
29
100
30
101
```typescript
@@ -266,6 +337,15 @@ This client implements all 147 WAHA API endpoints organized into the following c
266
337
-`getMessages()` / `getMessagesAlt()` - Get messages
267
338
-`checkNumberStatus()` - Check if number is on WhatsApp
268
339
340
+
## Migration / Compatibility notes
341
+
342
+
We made the client follow the OpenAPI canonical endpoints for sending messages. Concretely:
343
+
344
+
- The library now uses the documented POST endpoints such as `POST /api/sendText`, `POST /api/sendImage`, `POST /api/sendFile`, `POST /api/sendVoice`, and `POST /api/sendVideo` and includes the required `session` field in the request body when calling those endpoints.
345
+
- Legacy/alternative helpers (for example `sendTextGet()`, `getMessagesAlt()`, `sendTextAlt()`) remain in the client for backwards compatibility but are annotated as deprecated in the source. Prefer the modern methods such as `sendText()` and `getMessages(chatId)`.
346
+
347
+
If you previously relied on internal session-prefixed send URLs (e.g. `/api/{session}/messages/text`), update your calls to use the canonical methods above. If you need the library to retain automatic fallback to legacy endpoints (try canonical first, fallback to legacy), tell me and I can add graceful retry/fallback behavior.
0 commit comments