bbgun 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 ADDED
@@ -0,0 +1,48 @@
1
+ # bbgun
2
+
3
+ Drop-in replacement for `@photon-ai/advanced-imessage-kit` backed by [BlueBubbles Server](https://bluebubbles.app).
4
+
5
+ Same method signatures, same types, same events. Change the import, point `serverUrl` at your BlueBubbles instance, pass your server password as `apiKey`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { SDK } from "bbgun";
11
+
12
+ const sdk = SDK({
13
+ serverUrl: "http://localhost:1234",
14
+ apiKey: "your-bluebubbles-password",
15
+ });
16
+
17
+ await sdk.connect();
18
+
19
+ sdk.on("new-message", (message) => {
20
+ console.log(message.text);
21
+ });
22
+
23
+ await sdk.messages.sendMessage({
24
+ chatGuid: "iMessage;-;+15551234567",
25
+ message: "hello from bbgun",
26
+ });
27
+ ```
28
+
29
+ ## Migration
30
+
31
+ ```diff
32
+ -import { AdvancedIMessageKit, SDK } from "@photon-ai/advanced-imessage-kit";
33
+ +import { BBGun, SDK } from "bbgun";
34
+ ```
35
+
36
+ `SDK()`, all module methods (`.messages`, `.chats`, `.attachments`, `.contacts`, `.handles`, `.facetime`, `.icloud`, `.polls`, `.scheduledMessages`, `.server`), event names, and types are identical.
37
+
38
+ ## What differs internally
39
+
40
+ - REST auth uses BlueBubbles' `password` query param instead of `X-API-Key` header
41
+ - Socket.IO handshake sends `{ password }` instead of `{ apiKey }`
42
+ - Live photo download path: `/attachment/:guid/download/live`
43
+ - Contact lookup uses `POST /contact/query` with `{ addresses }` body
44
+ - No `reflect-metadata`, `sharp`, `consola`, or `zod` dependencies
45
+
46
+ ## License
47
+
48
+ AGPL-3.0