{"_id":"@bitbasti/chat-adapter-webex","name":"@bitbasti/chat-adapter-webex","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bitbasti/chat-adapter-webex","version":"0.1.0","description":"Webex adapter for Chat SDK","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run --coverage","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rimraf dist coverage"},"dependencies":{"@chat-adapter/shared":"^4.15.0"},"peerDependencies":{"chat":"^4.15.0"},"devDependencies":{"@types/node":"^22.10.2","@vitest/coverage-v8":"^4.0.18","chat":"^4.15.0","rimraf":"^6.0.1","tsup":"^8.3.5","typescript":"^5.7.2","vitest":"^4.0.18"},"repository":{"type":"git","url":"git+https://github.com/SebastianBodza/chat-adapter-webex.git"},"homepage":"https://github.com/SebastianBodza/chat-adapter-webex#readme","bugs":{"url":"https://github.com/SebastianBodza/chat-adapter-webex/issues"},"publishConfig":{"access":"public"},"keywords":["chat-sdk","chat-adapter","webex"],"license":"MIT","_id":"@bitbasti/chat-adapter-webex@0.1.0","gitHead":"36aa3c750737300c754a3e941588452479d8d8dd","_nodeVersion":"24.13.0","_npmVersion":"10.8.0","dist":{"integrity":"sha512-Cl/gy3ifh18y0fs4f/qVNmHXfn+3v40x6QUjOUGZ5mEds2zYiqeVAalRkL+feBdjEz1tE8aQtzf1OUhRGPQeFw==","shasum":"bfba62479b790f4ee8167a07b0b760fc44c63aa9","tarball":"https://registry.npmjs.org/@bitbasti/chat-adapter-webex/-/chat-adapter-webex-0.1.0.tgz","fileCount":6,"unpackedSize":182987,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1WAlW8/hv4S+S2+tt1LHdCY7wdH3xK/lIF47WUBgILwIgCUyAEFoDOhya+J9Fh1TukN9JsxXfPARLXS2lcSeaG1M="}]},"_npmUser":{"name":"bitbasti","email":"sebastian.bodza@gmail.com"},"directories":{},"maintainers":[{"name":"bitbasti","email":"sebastian.bodza@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chat-adapter-webex_0.1.0_1772486245821_0.8825280470910668"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-02T21:17:25.732Z","0.1.0":"2026-03-02T21:17:26.137Z","modified":"2026-03-02T21:17:26.315Z"},"maintainers":[{"name":"bitbasti","email":"sebastian.bodza@gmail.com"}],"description":"Webex adapter for Chat SDK","homepage":"https://github.com/SebastianBodza/chat-adapter-webex#readme","keywords":["chat-sdk","chat-adapter","webex"],"repository":{"type":"git","url":"git+https://github.com/SebastianBodza/chat-adapter-webex.git"},"bugs":{"url":"https://github.com/SebastianBodza/chat-adapter-webex/issues"},"license":"MIT","readme":"# @bitbasti/chat-adapter-webex\n\n[![npm version](https://img.shields.io/npm/v/@bitbasti/chat-adapter-webex)](https://www.npmjs.com/package/@bitbasti/chat-adapter-webex)\n[![npm downloads](https://img.shields.io/npm/dm/@bitbasti/chat-adapter-webex)](https://www.npmjs.com/package/@bitbasti/chat-adapter-webex)\n\nCommunity Webex adapter for [Chat SDK](https://chat-sdk.dev/docs).\n\n## Installation\n\n```bash\nnpm install chat @bitbasti/chat-adapter-webex\n```\n\n## Usage\n\n```ts\nimport { Chat } from \"chat\";\nimport { createWebexAdapter } from \"@bitbasti/chat-adapter-webex\";\n\nconst bot = new Chat({\n  userName: \"mybot\",\n  adapters: {\n    webex: createWebexAdapter({\n      botToken: process.env.WEBEX_BOT_TOKEN!,\n      webhookSecret: process.env.WEBEX_WEBHOOK_SECRET,\n    }),\n  },\n});\n\nbot.onNewMention(async (thread, message) => {\n  await thread.post(`Hello from Webex! You said: ${message.text}`);\n});\n```\n\n## Environment variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `WEBEX_BOT_TOKEN` | Yes | Bot access token from the Webex Developer Portal |\n| `WEBEX_WEBHOOK_SECRET` | Recommended | Shared secret for webhook signature verification |\n| `WEBEX_BASE_URL` | No | Override the Webex API base URL (default: `https://webexapis.com/v1`) |\n| `WEBEX_BOT_USERNAME` | No | Override the bot display name |\n\n## Configuration\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `botToken` | `string` | `WEBEX_BOT_TOKEN` | Bot access token |\n| `webhookSecret` | `string` | `WEBEX_WEBHOOK_SECRET` | Shared secret for verifying webhook signatures |\n| `baseUrl` | `string` | `\"https://webexapis.com/v1\"` | Webex API base URL |\n| `userName` | `string` | `\"webex-bot\"` | Bot display name (overridden by the bot's Webex profile on initialization) |\n| `botUserId` | `string` | Auto-detected via `/people/me` | Webex person ID of the bot (skips the `/people/me` call if provided) |\n| `logger` | `Logger` | `ConsoleLogger` | Custom logger instance |\n\n## Platform setup\n\n1. Go to the [Webex Developer Portal](https://developer.webex.com/) and sign in.\n2. Navigate to **My Webex Apps** → **Create a New App** → **Create a Bot**.\n3. Fill in the bot name, username, and icon, then click **Add Bot**.\n4. Copy the **Bot Access Token** — this is your `WEBEX_BOT_TOKEN`. Store it securely; it is only shown once.\n5. Create a webhook pointing to your server:\n   - **Target URL:** `https://your-domain.com/api/webhooks/webex`\n   - **Resource:** `messages` | **Event:** `created`\n   - **Resource:** `attachmentActions` | **Event:** `created`\n   - **Secret:** a random string — this is your `WEBEX_WEBHOOK_SECRET`\n6. Add the bot to a Webex space and mention it to verify the integration.\n\n> See the [Webex Webhooks Guide](https://developer.webex.com/docs/webhooks) for details on webhook registration.\n\n## Features\n\n- Mentions and DMs\n- Rich text (bold, italic, code, links) via Markdown\n- Adaptive Cards (buttons, selects, radio selects, fields, sections)\n- Modals (form cards with submit/close actions)\n- File uploads (single file per message)\n- Thread support (parentId-based threading)\n- Webhook signature verification (HMAC-SHA1)\n\n### Limitations\n\n- Reactions are not supported by Webex bot tokens — `addReaction` / `removeReaction` throw `NotImplementedError`\n- Typing indicators are not available in the Webex Messaging API\n- Only one file upload per message is supported\n- Cards and file uploads cannot be combined in the same message\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-6ae38a2e3cb26a3c48e9550c714499f4"}