{"_id":"@emiago/diagox-flow-sdk","_rev":"2-f8258ddd1f41417fe05fa9c1af0aea47","name":"@emiago/diagox-flow-sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@emiago/diagox-flow-sdk","version":"0.1.0","keywords":["diagox","sdk","api","client","typescript"],"author":{"name":"Emir Aganovic"},"license":"MIT","_id":"@emiago/diagox-flow-sdk@0.1.0","maintainers":[{"name":"emiago","email":"emirfreelance91@gmail.com"}],"homepage":"https://github.com/emiago/diagox-flow-sdk-js#readme","bugs":{"url":"https://github.com/emiago/diagox-flow-sdk-js/issues"},"dist":{"shasum":"b3916192ea1a383b7120e9782443125fad3f5313","tarball":"https://registry.npmjs.org/@emiago/diagox-flow-sdk/-/diagox-flow-sdk-0.1.0.tgz","fileCount":6,"integrity":"sha512-EjQps9WroTheDqTrsPP5nxT8p+CkIXlKpQSaXrjnRF1c//rSUfY2gsX6PrBEKX5WeGeQOx7iEzLJAJJK40vQBQ==","signatures":[{"sig":"MEUCIG4lbJ2BS8hVTjVLgX9vy1/iyfdIECst+ecXD0FkmXfrAiEAo/pbGLvaDsvcDScIhbkYbpYc6Z5YLuBYF57Zg7q2hZU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16291},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js"}},"gitHead":"30e363a2893d28936d20c70356d0603261c2e0ac","scripts":{"lint":"tsc --noEmit","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"emiago","email":"emirfreelance91@gmail.com"},"repository":{"url":"git+https://github.com/emiago/diagox-flow-sdk-js.git","type":"git"},"_npmVersion":"10.8.2","description":"Official SDK for Diagox Flow RPC API","directories":{},"_nodeVersion":"20.19.1","dependencies":{"ws":"^8.19.0","uuid":"^13.0.0","debug":"^4.4.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","@types/bun":"latest","typescript":"^5.0.0","@types/uuid":"^10.0.0","@types/debug":"^4.1.12"},"_npmOperationalInternal":{"tmp":"tmp/diagox-flow-sdk_0.1.0_1775498671870_0.8721015039319069","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@emiago/diagox-flow-sdk","version":"0.1.1","description":"Official SDK for Diagox Flow RPC API","main":"dist/index.js","types":"dist/index.d.ts","type":"module","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.js","import":"./dist/index.js"}},"scripts":{"build":"tsc","lint":"tsc --noEmit","prepare":"npm run build"},"keywords":["diagox","sdk","api","client","typescript"],"author":{"name":"Emir Aganovic"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emiago/diagox-flow-sdk-js.git"},"devDependencies":{"@types/bun":"latest","@types/debug":"^4.1.12","@types/uuid":"^10.0.0","@types/ws":"^8.18.1","typescript":"^5.0.0"},"dependencies":{"debug":"^4.4.3","uuid":"^13.0.0","ws":"^8.19.0"},"_id":"@emiago/diagox-flow-sdk@0.1.1","gitHead":"80f647db9c2c15451782d1f202f7585e9d3ac83d","bugs":{"url":"https://github.com/emiago/diagox-flow-sdk-js/issues"},"homepage":"https://github.com/emiago/diagox-flow-sdk-js#readme","_nodeVersion":"20.19.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Kmsbr8EnPomR3Ltvmu6E8OATfB3RVTZWEDUkRfQZbzYA5ZNoryfVCXeHFSjv33wRud21GfQF+ynMKBnuqeIW/A==","shasum":"014047df3caad78d1c5c171d8b425053dfa2f937","tarball":"https://registry.npmjs.org/@emiago/diagox-flow-sdk/-/diagox-flow-sdk-0.1.1.tgz","fileCount":5,"unpackedSize":14311,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICci9SlzPggUt7qhVre4KSa5z4MAJmr39WUFVDJb/kLYAiAzBp+tN8USJCT5+STNo9cnm0iYtT/TBaCCw2iAVzaegg=="}]},"_npmUser":{"name":"emiago","email":"emirfreelance91@gmail.com"},"directories":{},"maintainers":[{"name":"emiago","email":"emirfreelance91@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/diagox-flow-sdk_0.1.1_1775500383485_0.1177599079668481"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-06T18:04:31.761Z","modified":"2026-04-06T18:33:03.774Z","0.1.0":"2026-04-06T18:04:32.028Z","0.1.1":"2026-04-06T18:33:03.651Z"},"bugs":{"url":"https://github.com/emiago/diagox-flow-sdk-js/issues"},"author":{"name":"Emir Aganovic"},"license":"MIT","homepage":"https://github.com/emiago/diagox-flow-sdk-js#readme","keywords":["diagox","sdk","api","client","typescript"],"repository":{"type":"git","url":"git+https://github.com/emiago/diagox-flow-sdk-js.git"},"description":"Official SDK for Diagox Flow RPC API","maintainers":[{"name":"emiago","email":"emirfreelance91@gmail.com"}],"readme":"# Diagox Flow API SDK\n\nThis is diagox Flow API SDK for NodeJS folks.\n\n## Setup\nTo install dependencies:\n\n```bash\nbun install\n```\n\n\n\n## Getting Started\n\nSmall example what is needed to connect and run. It is expected that you have endpoint `myagent` configured.\n\n```ts \nconst client = new FlowClient({ url: 'ws://localhost:6000', endpoint: 'myagent' });\n\nclient.onInvite(async (request: Request) => {\n    try {\n        // Accept the dialog\n        const session = await client.acceptDialog(request);\n\n        // Answer\n        const answerResponse = await session.request('answer');\n\n        // Play sound\n        const playResponse = await session.request('play', {\n            uri: 'http://mymediaserver/hello-world.wav'\n        });\n\n        // Redirect call to internal endpoint\n        const redirectResponse = await session.request(`redirect`, { endpoint: \"voicebot\" });\n    } catch (error) {\n        // handle error \n    }\n}\n\n// Connect to diagox and listen \nawait client.connectAndListen();\n```\n\n## Examples\n\nYou can find more examples on [/examples](/examples/).\n\nFor examples you need diagox running \n`CONF_FILE=examples/diagox-agent.yaml diagox` \n\n\nRun any example like:\n```sh\nbun run examples/playback.ts\nbun run examples/read_dtmf.ts\n```\n\n\n## Debuging \n\nUse `DEBUG=diagox-flow-sdk` to have logging from SDK.","readmeFilename":"README.md"}