{"_id":"@anmho/bluebubbles-sdk","_rev":"4-c1bdb4ed26b0b1c2f1379465636a32fb","name":"@anmho/bluebubbles-sdk","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@anmho/bluebubbles-sdk","version":"0.1.0","keywords":["bluebubbles","sdk","typescript"],"license":"MIT","_id":"@anmho/bluebubbles-sdk@0.1.0","maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"homepage":"https://github.com/anmho/bluebubbles-sdk#readme","bugs":{"url":"https://github.com/anmho/bluebubbles-sdk/issues"},"dist":{"shasum":"a44f39cbfa1ca0c39e2d612df50c30ea4a9d42bb","tarball":"https://registry.npmjs.org/@anmho/bluebubbles-sdk/-/bluebubbles-sdk-0.1.0.tgz","fileCount":40,"integrity":"sha512-oBQGsCiZF1jG4Qx+GaBMomZs9yix00WKloZdpegGvrszruD9jbr7+WkC7FoACyfGQsQRK9W4XeNPV8m+rf8vTw==","signatures":[{"sig":"MEUCIFzERSGCZt403a42HhIbbT9wsp0nPqM3cLR4fzCG9GYcAiEAh8q5mohXSIbDZ/Up9yuIlx5Rm+ftvz59j/Xl1lLAbkM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":214854},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","scripts":{"test":"npm run build && tsx --test tests/**/*.test.ts","build":"npm run generate && rm -rf dist && tsc -p tsconfig.json && tsc-alias -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","prepack":"npm run build","docs:dev":"npm run docs:sync-openapi && cd docs && mint dev --no-open","generate":"npx openapi-ts -f openapi-ts.config.ts","docs:validate":"npm run docs:sync-openapi && cd docs && mint validate","spec:download":"curl -L 'https://documenter.gw.postman.com/api/collections/765844/UV5RnfwM?environment=765844-a726906e-f1b7-4919-83d5-e740cd155ddb&segregateAuth=true&versionTag=latest' -o /tmp/bluebubbles.postman.json && tsx scripts/prepare_postman.ts /tmp/bluebubbles.postman.json && npx postman-to-openapi -s /tmp/bluebubbles.postman.json -o spec/openapi.yaml","docs:sync-openapi":"cp spec/openapi.yaml docs/openapi.yaml"},"_npmUser":{"name":"anmho","email":"andyminhtuanho@gmail.com"},"repository":{"url":"git+https://github.com/anmho/bluebubbles-sdk.git","type":"git"},"_npmVersion":"10.9.4","description":"Resource-grouped TypeScript SDK for BlueBubbles","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","mint":"^4.2.507","tsc-alias":"^1.8.16","typescript":"^5.8.3","postman-to-openapi":"^1.7.3","@hey-api/openapi-ts":"^0.95.0","postman-to-openapi-cli":"^1.1.2"},"_npmOperationalInternal":{"tmp":"tmp/bluebubbles-sdk_0.1.0_1776050566682_0.8363755302814542","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anmho/bluebubbles-sdk","version":"0.1.1","keywords":["bluebubbles","sdk","typescript"],"license":"MIT","_id":"@anmho/bluebubbles-sdk@0.1.1","maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"homepage":"https://bluebubbles.anmho.com/","bugs":{"url":"https://github.com/anmho/bluebubbles-sdk/issues"},"dist":{"shasum":"a03ddc678e4dc512f41fc20fedcfd2797d9069d8","tarball":"https://registry.npmjs.org/@anmho/bluebubbles-sdk/-/bluebubbles-sdk-0.1.1.tgz","fileCount":40,"integrity":"sha512-0aUxuQS2mx1ZnnOjb9MmKvmKHtOwsOCsvmeT92Wzei61CLauUNI4CEmfA3YrUItjbnfcclwFZuIuIvdVoUIrew==","signatures":[{"sig":"MEYCIQDK3LB5M40Ul/0TCpPTxVYaq1LH38umexpj0HkGr3TwtAIhAO4H1UveaNBti5r9rLoGT6MnnKlehCV9UpxrOnQn2xFn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":221195},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","scripts":{"test":"npm run build && tsx --test tests/**/*.test.ts","build":"npm run generate && rm -rf dist && tsc -p tsconfig.json && tsc-alias -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","prepack":"npm run build","docs:dev":"npm run docs:sync-openapi && cd docs && mint dev --no-open","generate":"npx openapi-ts -f openapi-ts.config.ts","docs:validate":"npm run docs:sync-openapi && cd docs && mint validate","spec:download":"curl -L 'https://documenter.gw.postman.com/api/collections/765844/UV5RnfwM?environment=765844-a726906e-f1b7-4919-83d5-e740cd155ddb&segregateAuth=true&versionTag=latest' -o /tmp/bluebubbles.postman.json && tsx scripts/prepare_postman.ts /tmp/bluebubbles.postman.json && npx postman-to-openapi -s /tmp/bluebubbles.postman.json -o spec/openapi.yaml","docs:sync-openapi":"cp spec/openapi.yaml docs/openapi.yaml"},"_npmUser":{"name":"anmho","email":"andyminhtuanho@gmail.com"},"repository":{"url":"git+https://github.com/anmho/bluebubbles-sdk.git","type":"git"},"_npmVersion":"10.9.4","description":"Resource-grouped TypeScript SDK for BlueBubbles","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","mint":"^4.2.507","tsc-alias":"^1.8.16","typescript":"^5.8.3","postman-to-openapi":"^1.7.3","@hey-api/openapi-ts":"^0.95.0","postman-to-openapi-cli":"^1.1.2"},"_npmOperationalInternal":{"tmp":"tmp/bluebubbles-sdk_0.1.1_1776056051788_0.4156185909969565","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@anmho/bluebubbles-sdk","version":"0.1.2","keywords":["bluebubbles","sdk","typescript"],"license":"MIT","_id":"@anmho/bluebubbles-sdk@0.1.2","maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"homepage":"https://bluebubbles.anmho.com/","bugs":{"url":"https://github.com/anmho/bluebubbles-sdk/issues"},"dist":{"shasum":"7046b4870fdf527989f78596bb713f85937dd77a","tarball":"https://registry.npmjs.org/@anmho/bluebubbles-sdk/-/bluebubbles-sdk-0.1.2.tgz","fileCount":42,"integrity":"sha512-wxwfb4DJAwvAosavOkqkOBrkQyqJYt4g9ZgyrQ9cTJWKvnCT8GKMkw/r70pNj2LoUzGA+t8RAHnuh76w9VW/kg==","signatures":[{"sig":"MEUCIDhaV3tLsfG+2Z4ZJf94bJTvIjZA1rFvX+jUopvDmmoeAiEA+CShGKE+MwwQMgC9vdSM6ramkNB81nXpsEJJf7J4iHs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230362},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"64823efa1730623aa4297d5e5f1793143d5c10ad","scripts":{"test":"npm run build && tsx --test tests/**/*.test.ts","build":"npm run generate && rm -rf dist && tsc -p tsconfig.json && tsc-alias -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","prepack":"npm run build","release":"changeset publish --access public","docs:dev":"npm run docs:sync-openapi && cd docs && mint dev --no-open","generate":"npx openapi-ts -f openapi-ts.config.ts","changeset":"changeset","docs:validate":"npm run docs:sync-openapi && cd docs && mint validate","spec:download":"mkdir -p spec && curl -L 'https://documenter.gw.postman.com/api/collections/765844/UV5RnfwM?environment=765844-a726906e-f1b7-4919-83d5-e740cd155ddb&segregateAuth=true&versionTag=latest' -o /tmp/bluebubbles.postman.json && tsx scripts/prepare_postman.ts /tmp/bluebubbles.postman.json && npx postman-to-openapi -s /tmp/bluebubbles.postman.json -o spec/openapi.yaml","release:publish":"npm run spec:download && npx changeset publish --access public --provenance","version-packages":"changeset version","docs:sync-openapi":"cp spec/openapi.yaml docs/openapi.yaml"},"_npmUser":{"name":"anmho","email":"andyminhtuanho@gmail.com"},"repository":{"url":"git+https://github.com/anmho/bluebubbles-sdk.git","type":"git"},"_npmVersion":"10.9.4","description":"Resource-grouped TypeScript SDK for BlueBubbles","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","mint":"^4.2.507","tsc-alias":"^1.8.16","typescript":"^5.8.3","@changesets/cli":"^2.29.6","postman-to-openapi":"^1.7.3","@hey-api/openapi-ts":"^0.95.0","postman-to-openapi-cli":"^1.1.2","@changesets/changelog-github":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/bluebubbles-sdk_0.1.2_1776326770282_0.22724030200951773","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@anmho/bluebubbles-sdk","version":"0.1.3","description":"Resource-grouped TypeScript SDK for BlueBubbles","main":"./dist/index.js","types":"./dist/index.d.ts","type":"module","scripts":{"spec:download":"mkdir -p spec && curl -L 'https://documenter.gw.postman.com/api/collections/765844/UV5RnfwM?environment=765844-a726906e-f1b7-4919-83d5-e740cd155ddb&segregateAuth=true&versionTag=latest' -o /tmp/bluebubbles.postman.json && tsx scripts/prepare_postman.ts /tmp/bluebubbles.postman.json && npx postman-to-openapi -s /tmp/bluebubbles.postman.json -o spec/openapi.yaml","generate":"npx openapi-ts -f openapi-ts.config.ts","build":"rm -rf dist && tsc -p tsconfig.json && tsc-alias -p tsconfig.json","changeset":"changeset","version-packages":"changeset version","release":"changeset publish --access public","release:publish":"npm run build && npx changeset publish --access public","prepack":"npm run build","check":"tsc -p tsconfig.json --noEmit","test":"npm run build && tsx --test tests/**/*.test.ts","docs:sync-openapi":"cp spec/openapi.yaml docs/openapi.yaml","docs:dev":"npm run docs:sync-openapi && cd docs && mint dev --no-open","docs:validate":"npm run docs:sync-openapi && cd docs && mint validate"},"keywords":["bluebubbles","sdk","typescript"],"license":"MIT","homepage":"https://bluebubbles.anmho.com/","bugs":{"url":"https://github.com/anmho/bluebubbles-sdk/issues"},"repository":{"type":"git","url":"git+https://github.com/anmho/bluebubbles-sdk.git"},"devDependencies":{"@changesets/changelog-github":"^0.5.1","@changesets/cli":"^2.29.6","@hey-api/openapi-ts":"^0.95.0","mint":"^4.2.507","postman-to-openapi":"^1.7.3","postman-to-openapi-cli":"^1.1.2","tsx":"^4.20.5","tsc-alias":"^1.8.16","typescript":"^5.8.3"},"gitHead":"b6dbc6abf9c474b97e8e666f884944dc1d2e9489","_id":"@anmho/bluebubbles-sdk@0.1.3","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-ZfmgMfkhru+SdQgJjAp9BVMcbXpIzMcKGBeDuZwI3RT7OOib84iuRitgW7USudEtotUjg+lHWz51Vwb1jDsIOg==","shasum":"5d4a70192553de3b301fc3db7f1940a425f7accd","tarball":"https://registry.npmjs.org/@anmho/bluebubbles-sdk/-/bluebubbles-sdk-0.1.3.tgz","fileCount":42,"unpackedSize":230347,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anmho%2fbluebubbles-sdk@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCztI0T37ikAW0IB/OfnB1sJ0LhkuKo9q8U7NM/gUNOKQIgdebvgSsCr3rrTwx8EpyicjQOO0E0vk3yz3koDGwErAM="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:da557b05-a18c-4527-a364-e7feb4502986"}},"directories":{},"maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bluebubbles-sdk_0.1.3_1777365486652_0.7101578536080031"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T03:22:46.569Z","modified":"2026-04-28T08:38:07.079Z","0.1.0":"2026-04-13T03:22:46.814Z","0.1.1":"2026-04-13T04:54:11.908Z","0.1.2":"2026-04-16T08:06:10.458Z","0.1.3":"2026-04-28T08:38:06.799Z"},"bugs":{"url":"https://github.com/anmho/bluebubbles-sdk/issues"},"license":"MIT","homepage":"https://bluebubbles.anmho.com/","keywords":["bluebubbles","sdk","typescript"],"repository":{"type":"git","url":"git+https://github.com/anmho/bluebubbles-sdk.git"},"description":"Resource-grouped TypeScript SDK for BlueBubbles","maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"readme":"# @anmho/bluebubbles-sdk\n\nResource-grouped TypeScript SDK for BlueBubbles.\n\n- Primitives and types are generated by Hey API.\n- Public client is a thin static wrapper over generated primitives.\n- OpenAPI spec is derived from the official BlueBubbles Postman collection.\n- Documentation: https://bluebubbles.anmho.com/\n\n## Install\n\n```bash\nnpm install @anmho/bluebubbles-sdk\n```\n\n## Usage\n\n```ts\nimport { BlueBubblesClient } from '@anmho/bluebubbles-sdk';\n\nconst client = new BlueBubblesClient({\n  baseUrl: 'http://localhost:1234',\n  password: 'your-server-password',\n});\n\nconst chat = await client.chats.get({ path: { chatGuid: 'iMessage;+;12345' } });\nconst chats = await client.chats.query(); // optional input\n\nawait client.messages.sendText({\n  body: {\n    chatGuid: 'iMessage;+;12345',\n    message: 'hello from sdk',\n  },\n});\n\nconst attachment = await client.attachments.download({ path: { guid: 'ATTACHMENT_GUID' } });\n```\n\n## Resources\n\n`client.attachments`, `client.backups`, `client.chats`, `client.contacts`, `client.fcm`, `client.handles`, `client.icloud`, `client.macos`, `client.messages`, `client.server`, `client.web`, `client.webhooks`\n\n## Event constants\n\n```ts\nimport { WEBHOOK_EVENT_TYPES } from '@anmho/bluebubbles-sdk';\n\nawait client.webhooks.create({\n  url: 'https://example.com/webhooks/bluebubbles',\n  events: [WEBHOOK_EVENT_TYPES.NEW_MESSAGE, WEBHOOK_EVENT_TYPES.UPDATED_MESSAGE],\n});\n\nconst event = client.webhooks.constructEvent(rawBody);\nif (event.type === WEBHOOK_EVENT_TYPES.NEW_MESSAGE) {\n  console.log(event.data);\n}\n```\n\n## Generation\n\n```bash\nnpm run spec:download\nnpm run generate\n```\n\n`spec:download` (optional spec refresh):\n1. Downloads the official Postman collection.\n2. Normalizes unresolved placeholders required by the converter.\n3. Converts Postman -> OpenAPI (`spec/openapi.yaml`).\n\n`generate` (normal SDK build path):\n1. Generates Hey API primitives and types to `src/generated`.\n\n`spec/openapi.yaml` is the source of truth for generation.  \n`prepare_postman.ts` is only used during `spec:download` to make Postman conversion reproducible.\n\n## Repro Steps\n\nFrom a clean checkout:\n\n```bash\nnpm ci\nnpm run generate\nnpm test\n```\n\nIf you want to refresh the spec first:\n\n```bash\nnpm run spec:download\nnpm run generate\nnpm test\n```\n\n## Contributing\n\n1. Create a feature branch and make your changes.\n2. Run local checks before opening a PR:\n\n```bash\nnpm run generate\nnpm run build\nnpm test\n```\n\n3. For any user-facing SDK change, add a changeset:\n\n```bash\nnpm run changeset\n```\n\nChoose `patch`, `minor`, or `major` for `@anmho/bluebubbles-sdk` and include a short summary.\n\n4. Commit both your code changes and the generated `.changeset/*.md` file.\n\nRelease flow:\n- Merging PRs into `main` updates or creates a release PR.\n- Merging the release PR publishes to npm and creates a GitHub Release.\n\nRelease troubleshooting:\n- Merging a normal PR does not publish immediately. Publish happens only after the release PR is merged.\n- If no `.changeset/*.md` file is included in merged PRs, no release PR is created.\n- The npm Trusted Publisher mapping for `anmho/bluebubbles-sdk` and `release.yml` must remain configured on npm.\n- The publish build must be green (`npm run build`) in CI.\n\n### Example release-ready PR\n\nUse this sequence when your PR includes user-facing SDK changes:\n\n```bash\n# 1) Make your code/docs change\ngit checkout -b feat/my-change\n\n# 2) Add release metadata\nnpm run changeset\n\n# 3) Validate locally\nnpm run generate\nnpm run build\nnpm test\n\n# 4) Commit and open PR\ngit add .\ngit commit -m \"feat: describe your change\"\ngit push\n```\n\nThe changeset file should look like:\n\n```md\n---\n\"@anmho/bluebubbles-sdk\": patch\n---\n\nBrief release note for users.\n```\n\nAfter merge to `main`, automation opens or updates a release PR. Merging that release PR publishes to npm and creates a GitHub Release.\n\nThe publish workflow lives in `.github/workflows/release.yml` and uses npm trusted publishing via GitHub OIDC, not `NPM_TOKEN`.\n\n## Scripts\n\n- `spec:download`\n- `generate`\n- `build`\n- `check`\n- `test`\n- `docs:sync-openapi`\n- `docs:dev`\n- `docs:validate`\n\n## Notes\n\n- Do not hand-edit generated files in `src/generated`.\n- The wrapper keeps BlueBubbles semantics and groups methods by resource.\n","readmeFilename":"README.md"}