{"_id":"@aisahub/vibe-analytics","name":"@aisahub/vibe-analytics","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aisahub/vibe-analytics","version":"0.1.0","description":"TypeScript client library for Vibe Analytics BI Bot API - Natural language to chart generation","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","build:watch":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","prepublishOnly":"npm run build"},"keywords":["vibe-analytics","bi-bot","charts","echarts","natural-language","sql-generation","typescript"],"author":{"name":"Aisahub"},"license":"MIT","dependencies":{"axios":"^1.7.9"},"peerDependencies":{"sequelize":"^6.0.0","@prisma/client":"^5.0.0","typeorm":"^0.3.0","firebase-admin":"^13.0.0"},"peerDependenciesMeta":{"sequelize":{"optional":true},"@prisma/client":{"optional":true},"typeorm":{"optional":true},"firebase-admin":{"optional":true}},"devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0","sequelize":"^6.37.5","@prisma/client":"^5.0.0","typeorm":"^0.3.0","firebase-admin":"^13.6.0"},"repository":{"type":"git","url":"git+https://github.com/Aisahub/gsfm.git","directory":"packages/vibe-analytics"},"engines":{"node":">=16.0.0"},"publishConfig":{"access":"public"},"gitHead":"9dac59c96a762c4f2e0f5da286a2f989daea18c4","_id":"@aisahub/vibe-analytics@0.1.0","bugs":{"url":"https://github.com/Aisahub/gsfm/issues"},"homepage":"https://github.com/Aisahub/gsfm#readme","_nodeVersion":"22.14.0","_npmVersion":"11.6.4","dist":{"integrity":"sha512-NwyHeb/8bxLroRF1ZsRXysJqJnZgcdoR1f9DthM2ZQTBHGFzO0Jr277yWePqgywvLhAs1mX/lyHe2Z8fJxJc6g==","shasum":"be5f5fdebb73f2ea4299374b0714b45a6a2bddd3","tarball":"https://registry.npmjs.org/@aisahub/vibe-analytics/-/vibe-analytics-0.1.0.tgz","fileCount":102,"unpackedSize":153759,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD2Z84myc0C7CabOeQxkVa0VxxfH7JBg6uPPryzbVkPngIhAOTV1xHSfpwB3E/+fQhvPwyyU6H3SgfgWXCTJ5sX8shr"}]},"_npmUser":{"name":"fathanabds","email":"abdulshodiqfathan@gmail.com"},"directories":{},"maintainers":[{"name":"zakuby","email":"muhammad.yaqub.baisa@gmail.com"},{"name":"fathanabds","email":"abdulshodiqfathan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vibe-analytics_0.1.0_1767925240045_0.2919944169171842"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-09T02:20:39.626Z","0.1.0":"2026-01-09T02:20:40.227Z","modified":"2026-01-09T02:20:40.637Z"},"maintainers":[{"name":"zakuby","email":"muhammad.yaqub.baisa@gmail.com"},{"name":"fathanabds","email":"abdulshodiqfathan@gmail.com"}],"description":"TypeScript client library for Vibe Analytics BI Bot API - Natural language to chart generation","homepage":"https://github.com/Aisahub/gsfm#readme","keywords":["vibe-analytics","bi-bot","charts","echarts","natural-language","sql-generation","typescript"],"repository":{"type":"git","url":"git+https://github.com/Aisahub/gsfm.git","directory":"packages/vibe-analytics"},"author":{"name":"Aisahub"},"bugs":{"url":"https://github.com/Aisahub/gsfm/issues"},"license":"MIT","readme":"# @aisahub/vibe-analytics\n\nTypeScript client library for Vibe Analytics BI Bot API - Natural language to chart generation.\n\n## Installation\n\n```bash\nnpm install @aisahub/vibe-analytics\n```\n\n### Peer Dependencies\n\nInstall the adapters you need:\n\n```bash\n# For Sequelize support\nnpm install sequelize\n\n# For Prisma support\nnpm install @prisma/client\n\n# For TypeORM support\nnpm install typeorm\n\n# For Firebase streaming (optional)\nnpm install firebase-admin\n```\n\n## Quick Start\n\n```typescript\nimport {\n  ChartManager,\n  SequelizeAdapter,\n  SequelizeSchemaProvider,\n  FirebaseStreamingProvider\n} from '@aisahub/vibe-analytics';\n\n// Initialize adapters\nconst storage = new SequelizeAdapter(models.ChartRequest, sequelize);\nconst schemaProvider = new SequelizeSchemaProvider(db);\n\n// Optional: Firebase for real-time updates\nconst streaming = new FirebaseStreamingProvider({\n  credentials: {\n    projectId: process.env.FIREBASE_CHARTS_PROJECT_ID!,\n    privateKey: Buffer.from(process.env.FIREBASE_CHARTS_PRIVATE_KEY_BASE64!, 'base64').toString('utf8'),\n    privateKeyId: process.env.FIREBASE_CHARTS_PRIVATE_KEY_ID!,\n    clientEmail: process.env.FIREBASE_CHARTS_CLIENT_EMAIL!,\n    clientId: process.env.FIREBASE_CHARTS_CLIENT_ID!,\n    clientX509CertUrl: process.env.FIREBASE_CHARTS_CLIENT_X509_CERT_URL!,\n  },\n  databaseURL: process.env.FIREBASE_CHARTS_URL!,\n});\n\n// Create the chart manager\nconst chartManager = new ChartManager({\n  apiUrl: process.env.BI_BOT_API_URL!,\n  apiKey: process.env.BI_BOT_SECRET_KEY!,\n  storage,\n  schemaProvider,\n  streaming, // optional\n});\n\n// Create a chart from natural language\nconst chart = await chartManager.createChart('Show sales by region');\n\n// Get all charts\nconst charts = await chartManager.getAllCharts();\n\n// Refresh all charts with fresh data\nconst result = await chartManager.refreshAllCharts();\nconsole.log(`Refreshed ${result.successfulCharts}/${result.totalCharts} charts`);\n\n// Refresh a single chart\nconst updatedChart = await chartManager.refreshChart(chartId);\n\n// Delete a chart\nawait chartManager.deleteChart(chartId);\n```\n\n## Features\n\n- ✅ **TypeScript Support**: Full type definitions for autocomplete and type safety\n- ✅ **Multiple ORMs**: Built-in support for Sequelize, Prisma, and TypeORM\n- ✅ **Real-time Updates**: Optional Firebase streaming for chart refresh progress\n- ✅ **Retry Logic**: Exponential backoff with jitter for resilient API calls\n- ✅ **Concurrency Control**: Batch processing with configurable concurrency\n- ✅ **Framework Agnostic**: Works with Express, Fastify, or standalone\n- ✅ **Extensible**: Easy to create custom storage and schema adapters\n\n## Documentation\n\n- [API Documentation](./docs/API.md)\n- [Migration Guide](./docs/MIGRATION.md)\n- [Custom Adapters](./docs/ADAPTERS.md)\n- [Examples](./examples/)\n\n## Project Status\n\n🎉 **Beta Ready** - v0.1.0 (75% Complete)\n\nThis library is ready for beta testing! The following components are complete:\n\n- [x] Project structure and configuration\n- [x] TypeScript type definitions\n- [x] Error classes\n- [x] Core utilities (retry, concurrency, validators)\n- [x] BiBotClient (API client)\n- [x] Storage adapters (Sequelize, Prisma, TypeORM, InMemory)\n- [x] Schema providers (Sequelize, Prisma, TypeORM, Manual)\n- [x] Streaming providers (Firebase, NoOp)\n- [x] ChartProcessor (chart refresh orchestration)\n- [x] ChartManager (high-level API)\n- [x] Examples (Express + Sequelize, Custom Storage, Standalone)\n- [x] Documentation (API, Migration Guide, Adapter Guide)\n- [ ] Tests (in progress)\n- [ ] Publishing (pending)\n\n**Ready to use!** Check out the [examples](./examples/) to get started.\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the library\nnpm run build\n\n# Run tests\nnpm test\n\n# Run tests with coverage\nnpm test:coverage\n\n# Lint code\nnpm run lint\n\n# Build and watch for changes\nnpm run build:watch\n```\n\n## License\n\nMIT\n\n## Support\n\nFor issues and questions, please open an issue on GitHub.\n","readmeFilename":"README.md","_rev":"1-3467ddb67ad275dfac9970831f158265"}