{"_id":"@abernardo/api-client","_rev":"7-c0d577b7355110d8206a70cbfea07c68","name":"@abernardo/api-client","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@abernardo/api-client","version":"1.0.0","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","_id":"@abernardo/api-client@1.0.0","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"dist":{"shasum":"296ef1e3ffa37cef50867f097399d1e9adf0a7b5","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.0.tgz","fileCount":27,"integrity":"sha512-ZE/IXBh9iGa36lvJs+Qpi2IY7NhP2ZYHokLlv8lwn5ZWKp8AFrK68A6XbTmHz2ZmwVBu5sWi5SUkRUjcJA/Ouw==","signatures":[{"sig":"MEQCIFJXkcaNgovt1oySOO4X2dLqt15IavkHm18NKWelQVRoAiB7bdTFJo2wl+ZFkUJeuDyJwRtGYIYUzZ9MbdzTjRe/kw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86833},"main":"./dist/bundle.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bundle.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bundle.mjs","require":"./dist/bundle.cjs"}},"scripts":{"test":"echo \"No tests yet\"","build":"npm run build:types && npm run build:bundle","clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"repository":{"url":"","type":"git"},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","directories":{},"dependencies":{"axios":"^1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.1","typescript":"^5.3.3","rollup-plugin-dts":"^6.1.0","@rollup/plugin-json":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/api-client_1.0.0_1768410145658_0.6867967271615598","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@abernardo/api-client","version":"1.0.1","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","_id":"@abernardo/api-client@1.0.1","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"dist":{"shasum":"9b52aa1bdb991aaf59f13a229049ef1be5b3105e","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.1.tgz","fileCount":27,"integrity":"sha512-8y0hX9LJ5xD3ZYFmySFCF3bUM2kIykQz9MW2a9gp0IahTMwPba+VZHq4TnBzjWworD/rPYM1KG3g8GLhxUUzQg==","signatures":[{"sig":"MEUCICAQoN90nH1I+jqSRrQxoyV6tN1SdEZl7cBZzvbfYL6lAiEAuDjiAQ3GhFivA7cGH6gUfdAeWh9hWXNX05LO4TPInM4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86876},"main":"./dist/bundle.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bundle.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bundle.mjs","require":"./dist/bundle.cjs"}},"scripts":{"test":"echo \"No tests yet\"","build":"npm run build:types && npm run build:bundle","clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"repository":{"url":"","type":"git"},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","directories":{},"dependencies":{"axios":"^1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.1","typescript":"^5.3.3","rollup-plugin-dts":"^6.1.0","@rollup/plugin-json":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/api-client_1.0.1_1768425929228_0.32706173583040554","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@abernardo/api-client","version":"1.0.2","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","_id":"@abernardo/api-client@1.0.2","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"dist":{"shasum":"a260fca9926d674e59e1a312220b4fbbc3186b39","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.2.tgz","fileCount":27,"integrity":"sha512-QTC6w0B8kNbTLGlYmAuc21YujnZSsvzgtqvr8fG1jxr4SS6FksjA/91e5T0Sokwo5YAp7SUVf4+YVfYEXVrypA==","signatures":[{"sig":"MEQCIAFMzeP4D5zGivhjCe8t1oNmbkUQ/CIKuONlkuhrHqyMAiAvTcoR6lvIRXEF8YZNvyYWloRiuY4ehKMwzPVoVw9EYw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90311},"main":"./dist/bundle.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bundle.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bundle.mjs","require":"./dist/bundle.cjs"}},"scripts":{"test":"echo \"No tests yet\"","build":"npm run build:types && npm run build:bundle","clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"repository":{"url":"","type":"git"},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","directories":{},"dependencies":{"axios":"^1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.1","typescript":"^5.3.3","rollup-plugin-dts":"^6.1.0","@rollup/plugin-json":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/api-client_1.0.2_1768468648008_0.07189219510911182","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@abernardo/api-client","version":"1.0.3","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","_id":"@abernardo/api-client@1.0.3","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"dist":{"shasum":"1b119720177ba5ce136a24d414781d80c74de1a9","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.3.tgz","fileCount":27,"integrity":"sha512-1IamiA5y9tr1l83KXQzrXgZ/DmlHswV65ULvnjhQEOVxRH4xpf8firE4uzqgFSonmJmNl+ZUNxJkSl6aE+YR4g==","signatures":[{"sig":"MEYCIQDihEum8ObQYkaJF0SNiPhv9wBJ/Ij2ptOYkbBty3PTKgIhAOteNjB7MYN5YzGR3+Zpm1FSAygxDIgSRdRDUWiqWSFD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90946},"main":"./dist/bundle.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bundle.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bundle.mjs","require":"./dist/bundle.cjs"}},"scripts":{"test":"echo \"No tests yet\"","build":"npm run build:types && npm run build:bundle","clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"repository":{"url":"","type":"git"},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","directories":{},"dependencies":{"axios":"^1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.1","typescript":"^5.3.3","rollup-plugin-dts":"^6.1.0","@rollup/plugin-json":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/api-client_1.0.3_1768470273924_0.1627154280622891","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@abernardo/api-client","version":"1.0.4","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","_id":"@abernardo/api-client@1.0.4","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"dist":{"shasum":"fe9b583b7d170c0a31368729894c460915bbba21","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.4.tgz","fileCount":27,"integrity":"sha512-q/+IuvU1jt7MEXIw1mQRBSeeE7iO5E5ugO/przrpsOe87maGI82te2Y+aU1hRud0oCbJbtLbPkIgAL6gStLnZQ==","signatures":[{"sig":"MEQCIF8Y41W4SgWnBaxJLDnt9pBidpAXZ4/6X5ZB29BHJ5omAiBhMvyeTZzTy3YSp0rFOZyfVVXWgguUE534xdz8t3LSIg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93724},"main":"./dist/bundle.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bundle.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bundle.mjs","require":"./dist/bundle.cjs"}},"scripts":{"test":"echo \"No tests yet\"","build":"npm run build:types && npm run build:bundle","clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"repository":{"url":"","type":"git"},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","directories":{},"dependencies":{"axios":"^1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.1","typescript":"^5.3.3","rollup-plugin-dts":"^6.1.0","@rollup/plugin-json":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/api-client_1.0.4_1768471108692_0.1482889869739612","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@abernardo/api-client","version":"1.0.5","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","_id":"@abernardo/api-client@1.0.5","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"dist":{"shasum":"ceb17c16af10e93e9ca58ff5858922531e3791ec","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.5.tgz","fileCount":27,"integrity":"sha512-bmuT9gNHArGqWHPuKRf9pD5tyB52fDVjrZufSvn0CZmD5LZcMdnBKCLRJKZw2LMO6Irl4QjosuLC0aeqSr9j3A==","signatures":[{"sig":"MEUCIQDcfvH1Wk5OEVWO6KGJRBpzjghX5oDrlYEckWMtE1wQmAIgZNYm4lFmFiNDlNLGu6UJLvz5e/3i6eyUH0Grjfar3Uk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":94758},"main":"./dist/bundle.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bundle.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bundle.mjs","require":"./dist/bundle.cjs"}},"scripts":{"test":"echo \"No tests yet\"","build":"npm run build:types && npm run build:bundle","clean":"rm -rf dist","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"repository":{"url":"","type":"git"},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","directories":{},"dependencies":{"axios":"^1.6.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.2","rollup":"^4.9.1","typescript":"^5.3.3","rollup-plugin-dts":"^6.1.0","@rollup/plugin-json":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.5","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/api-client_1.0.5_1768471750711_0.28782612526141094","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@abernardo/api-client","version":"1.0.6","description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","type":"module","main":"./dist/bundle.cjs","module":"./dist/bundle.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/bundle.cjs","import":"./dist/bundle.mjs","types":"./dist/index.d.ts"}},"scripts":{"build":"npm run build:types && npm run build:bundle","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","build:bundle":"node rollup.config.mjs","clean":"rm -rf dist","prepublishOnly":"npm run clean && npm run build","test":"echo \"No tests yet\""},"keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"author":{},"license":"MIT","dependencies":{"axios":"^1.6.2"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-typescript":"^11.1.5","rollup":"^4.9.1","rollup-plugin-dts":"^6.1.0","tslib":"^2.6.2","typescript":"^5.3.3"},"engines":{"node":">=18.0.0"},"repository":{"type":"git","url":""},"publishConfig":{"access":"public"},"_id":"@abernardo/api-client@1.0.6","dist":{"shasum":"ad36fc23a5eb9386e1dc43f0f423ed53b6468f1f","integrity":"sha512-KoCaKJWXEYnx+ECLxp6ungWwKoTwtNtIpT2EEzqDvbQdWqu5t2STyPjf7CY+h+19oCXO1qIhTFb5iOTmhFuOqA==","tarball":"https://registry.npmjs.org/@abernardo/api-client/-/api-client-1.0.6.tgz","fileCount":27,"unpackedSize":99156,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBZ7yda08qPzlRkHOj8S+9FPzBMRoQ3/1SIax90yPynYAiB0WEk6M4MJLOwRYWkT/sBszHw7trGzPrz9LC/5UGTY9w=="}]},"_npmUser":{"name":"abernardo.br","email":"abernardo.br@gmail.com"},"directories":{},"maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/api-client_1.0.6_1768472479473_0.8831319502680886"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-14T17:02:25.557Z","modified":"2026-01-15T10:21:19.799Z","1.0.0":"2026-01-14T17:02:25.809Z","1.0.1":"2026-01-14T21:25:29.373Z","1.0.2":"2026-01-15T09:17:28.185Z","1.0.3":"2026-01-15T09:44:34.088Z","1.0.4":"2026-01-15T09:58:28.826Z","1.0.5":"2026-01-15T10:09:10.850Z","1.0.6":"2026-01-15T10:21:19.643Z"},"author":{},"license":"MIT","keywords":["botcrud","api","client","sdk","typescript","axios","bots","workers","logs"],"repository":{"type":"git","url":""},"description":"TypeScript API client for BotCRUD Backend - Works in Node.js and Browser","maintainers":[{"name":"abernardo.br","email":"abernardo.br@gmail.com"}],"readme":"# @abernardo/api-client\n\nTypeScript API client for the BotCRUD Backend. Works in both Node.js and browser environments.\n\n## Installation\n\n```bash\nnpm install @abernardo/api-client\n```\n\n## Quick Start\n\n```typescript\nimport { BotCrudApi } from '@abernardo/api-client';\n\n// Initialize the client\nconst api = new BotCrudApi({\n  baseUrl: 'http://localhost:3001',\n  timeout: 30000,  // optional, defaults to 30000ms\n  debug: false,    // optional, enables console logging\n});\n\n// Create a bot\nconst bot = await api.bots.create({\n  name: 'MyBot',\n  description: 'My first bot',\n  status: 'ENABLED'\n});\n\n// Create a worker\nconst worker = await api.workers.create({\n  name: 'Worker1',\n  description: 'Bot worker',\n  bot: bot.id\n});\n\n// Create a log entry\nconst log = await api.logs.create({\n  message: 'Bot started successfully',\n  bot: bot.id,\n  worker: worker.id\n});\n```\n\n## Configuration\n\n```typescript\ninterface ApiConfig {\n  /** Base URL for the API (required) */\n  baseUrl: string;\n\n  /** Request timeout in milliseconds (default: 30000) */\n  timeout?: number;\n\n  /** Custom headers to include in all requests */\n  headers?: Record<string, string>;\n\n  /** Enable debug logging (default: false) */\n  debug?: boolean;\n}\n```\n\n## API Reference\n\n### Bots Service\n\nManage bot entities.\n\n```typescript\n// Create a bot\nconst bot = await api.bots.create({\n  name: 'BotName',\n  description: 'Optional description',\n  status: 'DISABLED' // 'DISABLED' | 'ENABLED' | 'PAUSED'\n});\n\n// List all bots\nconst bots = await api.bots.list();\n\n// List bots by status\nconst enabledBots = await api.bots.list({ status: 'ENABLED' });\n// or use the helper method\nconst enabledBots = await api.bots.getByStatus('ENABLED');\n\n// Get a bot by ID\nconst bot = await api.bots.get('507f1f77bcf86cd799439011');\n\n// Update a bot\nconst updatedBot = await api.bots.update('507f1f77bcf86cd799439011', {\n  name: 'NewName',\n  status: 'ENABLED'\n});\n\n// Delete a bot\nconst deletedBot = await api.bots.delete('507f1f77bcf86cd799439011');\n\n// Quick status change helpers\nawait api.bots.enable('507f1f77bcf86cd799439011');\nawait api.bots.disable('507f1f77bcf86cd799439011');\nawait api.bots.pause('507f1f77bcf86cd799439011');\n```\n\n### Workers Service\n\nManage worker entities (belong to bots).\n\n```typescript\n// Create a worker\nconst worker = await api.workers.create({\n  name: 'WorkerName',\n  description: 'Optional description',\n  bot: '507f1f77bcf86cd799439011' // Required: parent bot ID\n});\n\n// List all workers\nconst workers = await api.workers.list();\n\n// List workers for a specific bot\nconst botWorkers = await api.workers.list({ bot: '507f1f77bcf86cd799439011' });\n// or use the helper method\nconst botWorkers = await api.workers.getByBot('507f1f77bcf86cd799439011');\n\n// Get a worker by ID\nconst worker = await api.workers.get('507f1f77bcf86cd799439012');\n\n// Update a worker\nconst updatedWorker = await api.workers.update('507f1f77bcf86cd799439012', {\n  name: 'NewName',\n  description: 'Updated description'\n});\n\n// Reassign worker to a different bot\nconst reassigned = await api.workers.reassign(\n  '507f1f77bcf86cd799439012', // worker ID\n  '507f1f77bcf86cd799439013'  // new bot ID\n);\n\n// Delete a worker\nconst deletedWorker = await api.workers.delete('507f1f77bcf86cd799439012');\n```\n\n### Logs Service\n\nManage log entries (belong to bots and workers).\n\n```typescript\n// Create a log entry\nconst log = await api.logs.create({\n  message: 'Log message (max 1000 chars)',\n  bot: '507f1f77bcf86cd799439011',\n  worker: '507f1f77bcf86cd799439012'\n});\n\n// Quick logging helper\nconst log = await api.logs.log(\n  'Quick log message',\n  '507f1f77bcf86cd799439011', // bot ID\n  '507f1f77bcf86cd799439012'  // worker ID\n);\n\n// List all logs\nconst logs = await api.logs.list();\n\n// Filter logs by bot\nconst botLogs = await api.logs.list({ bot: '507f1f77bcf86cd799439011' });\n// or use the helper\nconst botLogs = await api.logs.getByBot('507f1f77bcf86cd799439011');\n\n// Filter logs by worker\nconst workerLogs = await api.logs.getByWorker('507f1f77bcf86cd799439012');\n\n// Filter by both bot and worker\nconst logs = await api.logs.getByBotAndWorker(\n  '507f1f77bcf86cd799439011',\n  '507f1f77bcf86cd799439012'\n);\n\n// Get a log by ID\nconst log = await api.logs.get('507f1f77bcf86cd799439014');\n\n// Update a log (message only)\nconst updatedLog = await api.logs.update('507f1f77bcf86cd799439014', {\n  message: 'Updated message'\n});\n\n// Delete a log\nconst deletedLog = await api.logs.delete('507f1f77bcf86cd799439014');\n```\n\n### Health Service\n\nMonitor API health and statistics.\n\n```typescript\n// Basic health check\nconst health = await api.health.check();\n// Returns: { status: 'healthy', timestamp: '2024-01-01T00:00:00.000Z', service: 'BotCRUD API' }\n\n// Detailed health with stats\nconst detailed = await api.health.detailed();\n// Returns: {\n//   status: 'healthy',\n//   timestamp: '2024-01-01T00:00:00.000Z',\n//   service: 'BotCRUD API',\n//   environment: 'development',\n//   uptime: 3600,\n//   memory: { rss: 50000000, heapTotal: 20000000, heapUsed: 15000000, ... },\n//   stats: { bots: 10, workers: 25, logs: 1000 }\n// }\n\n// Check if API is healthy (returns boolean)\nconst isHealthy = await api.health.isHealthy();\n\n// Get entity statistics\nconst stats = await api.health.getStats();\n// Returns: { bots: 10, workers: 25, logs: 1000 }\n\n// Get memory usage\nconst memory = await api.health.getMemoryUsage();\n\n// Get server uptime in seconds\nconst uptime = await api.health.getUptime();\n```\n\n## Error Handling\n\nThe client throws `ApiClientError` for API errors:\n\n```typescript\nimport { BotCrudApi, ApiClientError } from '@botcrud/api-client';\n\nconst api = new BotCrudApi({ baseUrl: 'http://localhost:3001' });\n\ntry {\n  const bot = await api.bots.get('nonexistent-id');\n} catch (error) {\n  if (error instanceof ApiClientError) {\n    console.log(error.message);      // Error message\n    console.log(error.statusCode);   // HTTP status code\n    console.log(error.errorType);    // Error type from API\n\n    // Convenience methods\n    if (error.isNotFound()) {\n      console.log('Bot not found');\n    }\n    if (error.isValidationError()) {\n      console.log('Invalid request');\n    }\n    if (error.isConflict()) {\n      console.log('Duplicate name conflict');\n    }\n  }\n}\n```\n\n## TypeScript Types\n\nAll types are exported for use in your application:\n\n```typescript\nimport {\n  // Entities\n  Bot,\n  Worker,\n  Log,\n\n  // Create payloads\n  CreateBotPayload,\n  CreateWorkerPayload,\n  CreateLogPayload,\n\n  // Update payloads\n  UpdateBotPayload,\n  UpdateWorkerPayload,\n  UpdateLogPayload,\n\n  // Query parameters\n  ListBotsQuery,\n  ListWorkersQuery,\n  ListLogsQuery,\n\n  // Health types\n  HealthCheck,\n  DetailedHealthCheck,\n\n  // Config\n  ApiConfig,\n\n  // Status type\n  BotStatus,\n\n  // Utility\n  ObjectId,\n  isValidObjectId,\n} from '@botcrud/api-client';\n\n// Validate an ObjectId\nif (isValidObjectId('507f1f77bcf86cd799439011')) {\n  // Valid MongoDB ObjectId\n}\n```\n\n## Browser Usage\n\nThe client works in browser environments. For use with bundlers like Webpack, Vite, or directly in the browser:\n\n```html\n<script type=\"module\">\n  import { BotCrudApi } from '@abernardo/api-client';\n\n  const api = new BotCrudApi({ baseUrl: 'http://localhost:3001' });\n  const bots = await api.bots.list();\n  console.log(bots);\n</script>\n```\n\n## Quasar/Vue.js Integration\n\nExample usage in a Quasar application:\n\n```typescript\n// src/boot/api.ts\nimport { boot } from 'quasar/wrappers';\nimport { BotCrudApi } from '@abernardo/api-client';\n\ndeclare module '@vue/runtime-core' {\n  interface ComponentCustomProperties {\n    $api: BotCrudApi;\n  }\n}\n\nexport default boot(({ app }) => {\n  const api = new BotCrudApi({\n    baseUrl: process.env.API_URL || 'http://localhost:3001',\n    debug: process.env.DEV === 'true',\n  });\n\n  app.config.globalProperties.$api = api;\n});\n\nexport { api };\n```\n\n```typescript\n// In a component\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n  async mounted() {\n    const bots = await this.$api.bots.list();\n    console.log(bots);\n  }\n});\n```\n\n## Building from Source\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the package\nnpm run build\n\n# Clean build artifacts\nnpm run clean\n```\n\n## API Endpoints\n\n| Method | Endpoint | Service Method |\n|--------|----------|----------------|\n| GET | /health | `health.check()` |\n| GET | /health/detailed | `health.detailed()` |\n| GET | /bots | `bots.list()` |\n| POST | /bots | `bots.create()` |\n| GET | /bots/:id | `bots.get()` |\n| PUT | /bots/:id | `bots.update()` |\n| DELETE | /bots/:id | `bots.delete()` |\n| GET | /workers | `workers.list()` |\n| POST | /workers | `workers.create()` |\n| GET | /workers/:id | `workers.get()` |\n| PUT | /workers/:id | `workers.update()` |\n| DELETE | /workers/:id | `workers.delete()` |\n| GET | /logs | `logs.list()` |\n| POST | /logs | `logs.create()` |\n| GET | /logs/:id | `logs.get()` |\n| PUT | /logs/:id | `logs.update()` |\n| DELETE | /logs/:id | `logs.delete()` |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}