{"_id":"@yellowdotai/yellow-chat-sdk","_rev":"8-46ebb7031fda2d965625573e583736cf","name":"@yellowdotai/yellow-chat-sdk","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.0.0","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"license":"MIT","_id":"@yellowdotai/yellow-chat-sdk@1.0.0","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"a1ed88730aa81d0515a8e3a7e7d0e7f8c6e72855","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.0.0.tgz","fileCount":6,"integrity":"sha512-n0l3FwcCGbah59f4nOX5wcLjZ/wL/CMbQ9ZzWwGoukJbM2R94O69a8SzqeIFrYpXHcabz1DN0vp3Zcx+VILYVg==","signatures":[{"sig":"MEUCIA9wfKgOQ8Ywn2Te7bmTXpFaweai7nfm1+uNJ98RL+gxAiEAx/AvJy66gTcNK7ofQAVUIal5iL/OuX7k6oTyF98MuEw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":470441},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"ea706b6cb3511bf40cfc50ebd8706d87bdef4c54","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"22.14.0","dependencies":{"strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.0.0_1770269257873_0.9246576822014081","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.0.1","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"license":"MIT","_id":"@yellowdotai/yellow-chat-sdk@1.0.1","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"c3868b1f9e9cc1e43541a0c8288a2002b6816150","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.0.1.tgz","fileCount":6,"integrity":"sha512-r28OngZ5vdQbqlE7Cqb+9QZS9oN7hr4opkJWoxAcroWafPmeMdXi6CbxF5id5XyGc50HLFpd3SoNFAX0+k+DOA==","signatures":[{"sig":"MEYCIQDWv5F0vazfaDBcml2vDfz+GGbxlBdSn/lP4Cmsg6JZbAIhAOwqEQuhaGtyL45LW58rKOcwoJqqUA0qCzAn/N5ym+XX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":470441},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"11154c89246ec89883612aeaab12f52bc3e1e5a0","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"22.14.0","dependencies":{"strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.0.1_1770364995311_0.7255745410021175","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.0.2","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"license":"MIT","_id":"@yellowdotai/yellow-chat-sdk@1.0.2","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"ca198218ed623f7ed770f13db917dad8eb28669f","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.0.2.tgz","fileCount":6,"integrity":"sha512-TlWcJToYDorNsuKjyDu5hBFu4E3sk7nrnWsAqCcYB+qKpzXmJ2O/iZNGybp4F5wKfRaNzsmaktW9lJkB4qRtFA==","signatures":[{"sig":"MEUCIQCNIuoDQdlms73SZQKU9E6sIF1NmTubeKryWOj0nctdlgIgC3bzSV6D0wWqNXhXWSk1Suguyg29a3M2uz14ksyDPLw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":470381},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"11154c89246ec89883612aeaab12f52bc3e1e5a0","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"22.14.0","dependencies":{"strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.0.2_1770365490067_0.4583427471503354","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.0.3","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"license":"MIT","_id":"@yellowdotai/yellow-chat-sdk@1.0.3","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"67518793b7361d80ed87e41eed079f4dcd9b738a","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.0.3.tgz","fileCount":6,"integrity":"sha512-VIbrUZL/HQYyBWpgogA2HhnLy535oW5u8NSFxnYTD8y14XSpG1KeeHUzr25TSR3an/Bsz3M0MEgFM44it8Odkg==","signatures":[{"sig":"MEUCIQCGNhxTsRkAZWUGjroVH+4TMW6rdXe07Q8PeZlOqt1qowIgNrCd/7SjiE2NDf3Tvw6JpjkFDFBB06Mc+cVbZWU9bDg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":470228},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"11154c89246ec89883612aeaab12f52bc3e1e5a0","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"22.14.0","dependencies":{"strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.0.3_1770365956720_0.1135544367155481","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.0.4","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"_id":"@yellowdotai/yellow-chat-sdk@1.0.4","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"7060c5fa092c5256d5666e16903362c435c9886f","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.0.4.tgz","fileCount":6,"integrity":"sha512-yL86W+2qzaXzHtG0ee53S3lPQjJwOwGpid+AG+frBiWnsrrUVwdxPISx6bIWgoYcyCeSwNS5H5xlrSldedP+tw==","signatures":[{"sig":"MEYCIQCInerurwQKkWKL2R5CncKKhrFNbbs1RzenCeU01ELqNAIhAMxgeHs+VJd6V6u+/8f/oNkagvETZn/E22da4sEKUH/p","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":470191},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"841b3f881b84587af10a553d03d33fe52f9e106f","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"22.14.0","dependencies":{"strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.0.4_1770618099596_0.6411334060516842","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.0.5","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"_id":"@yellowdotai/yellow-chat-sdk@1.0.5","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"b579e9e2328d7b5b1c741e6813a33ffeb2bc5c5b","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.0.5.tgz","fileCount":6,"integrity":"sha512-ZNyFrXdRhWe3PaqPTZuV4lr5yOQ/QDGzdQGhtxnuEq6oaTOjwRoL434uyGUGF7ZGguaoK7JrvJruGwogBaqYSg==","signatures":[{"sig":"MEQCIC3zJotvlD5DB+zx82pCrlglfm0XmiBGDVKBW6coybnLAiA1BhL4Mo+Hjoz3/rAtbO9WNZsqckC16pXOYVdE8SE+IA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":559479},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"2091df40067ff3c9301e37b3565ddb960dd4e00f","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"10.9.2","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"22.14.0","dependencies":{"dompurify":"^3.3.1","strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@types/dompurify":"^3.0.5","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.0.5_1771845006941_0.061724110085742856","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.1.0","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"_id":"@yellowdotai/yellow-chat-sdk@1.1.0","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"homepage":"https://github.com/yellowdotai/yellow-true-sdk#readme","bugs":{"url":"https://github.com/yellowdotai/yellow-true-sdk/issues"},"dist":{"shasum":"99e21ca791f43b57284d9284d814e6ff6afacd09","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.1.0.tgz","fileCount":6,"integrity":"sha512-aZ7uzEnDFay6o4TtUmtGjZD+dqYeUX4QAaaJw/Erh6Hx1HRlNbFb9Ttq1erkFKyVruaU0D+qh9YhaZN3hj6A1Q==","signatures":[{"sig":"MEUCIC8Gzsv4uSbXeliS9hjEbp4oQnQttdGxClOt+OABbp67AiEA4N7I80DzO+Jfuo+UyC2G0TQS+SEDKRJAUaCOhrpyT+M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":564524},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.js"}},"gitHead":"1ebd332f7230b22af9aab059834561c520c7cdaa","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"rollup -c rollup.config.js && npm run build:cleanup","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc --noEmit","test:watch":"jest --watch","build:watch":"rollup -c rollup.config.js -w","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"repository":{"url":"git+https://github.com/yellowdotai/yellow-true-sdk.git","type":"git"},"_npmVersion":"11.6.0","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","directories":{},"_nodeVersion":"24.8.0","dependencies":{"dompurify":"^3.3.1","strophe.js":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","tslib":"^2.6.0","eslint":"^8.0.0","rollup":"^4.0.0","ts-jest":"^29.0.0","typescript":"^5.0.0","@types/jest":"^29.0.0","@types/node":"^20.0.0","@types/dompurify":"^3.0.5","rollup-plugin-dts":"^6.0.0","@rollup/plugin-terser":"^0.4.4","jest-environment-jsdom":"^29.0.0","@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-typescript":"^11.0.0","@typescript-eslint/parser":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/yellow-chat-sdk_1.1.0_1783968775915_0.2612379886715379","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@yellowdotai/yellow-chat-sdk","version":"1.1.1","description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"rollup -c rollup.config.js && npm run build:cleanup","build:cleanup":"node -e \"const fs=require('fs');['types','api','constants','core','parsers','transport','utils'].forEach(d=>{const p='dist/'+d;if(fs.existsSync(p))fs.rmSync(p,{recursive:true})});['YellowChat.d.ts','YellowChat.d.ts.map','index.d.ts.map'].forEach(f=>{const p='dist/'+f;if(fs.existsSync(p))fs.unlinkSync(p)})\"","build:watch":"rollup -c rollup.config.js -w","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","prepublishOnly":"npm run clean && npm run build","test":"jest","test:watch":"jest --watch","typecheck":"tsc --noEmit","lint":"eslint src --ext .ts"},"keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"author":{"name":"Yellow.ai"},"repository":{"type":"git","url":"git+https://github.com/yellowdotai/messaging-sdk.git"},"bugs":{"url":"https://github.com/yellowdotai/messaging-sdk/issues"},"homepage":"https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/headless-sdk","dependencies":{"dompurify":"^3.3.1","strophe.js":"^1.6.0"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.0","@rollup/plugin-node-resolve":"^15.0.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^11.0.0","@types/dompurify":"^3.0.5","@types/jest":"^29.0.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.0.0","jest-environment-jsdom":"^29.0.0","rollup":"^4.0.0","rollup-plugin-dts":"^6.0.0","ts-jest":"^29.0.0","tslib":"^2.6.0","typescript":"^5.0.0"},"engines":{"node":">=16.0.0"},"_id":"@yellowdotai/yellow-chat-sdk@1.1.1","gitHead":"8a11922901ce4b914df1a8796546e016cb451b33","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-/aJGa4k6jLmssBkUZBMUfGthKCOWjkpZNf6NAJbdtzoT5SS03bdURlDuSAI6wK37Qx0IVD6w4I4IpaBQmtAW9w==","shasum":"ab1fc4ba0e5bff81d507577264d0b3cb88f97580","tarball":"https://registry.npmjs.org/@yellowdotai/yellow-chat-sdk/-/yellow-chat-sdk-1.1.1.tgz","fileCount":6,"unpackedSize":564550,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAcarjuYV33+6LOl7QAMSBqJVepz27CjAupZdeYJt5+LAiEA20zl4n90pp/AE6q9Psn0VyTznsHUa4MfjtscWm7Go/4="}]},"_npmUser":{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},"directories":{},"maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yellow-chat-sdk_1.1.1_1783970009564_0.384163435101486"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-05T05:27:37.786Z","modified":"2026-07-13T19:13:29.859Z","1.0.0":"2026-02-05T05:27:38.067Z","1.0.1":"2026-02-06T08:03:15.467Z","1.0.2":"2026-02-06T08:11:30.232Z","1.0.3":"2026-02-06T08:19:16.874Z","1.0.4":"2026-02-09T06:21:39.764Z","1.0.5":"2026-02-23T11:10:07.106Z","1.1.0":"2026-07-13T18:52:56.088Z","1.1.1":"2026-07-13T19:13:29.720Z"},"bugs":{"url":"https://github.com/yellowdotai/messaging-sdk/issues"},"author":{"name":"Yellow.ai"},"homepage":"https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/headless-sdk","keywords":["yellow-messenger","chat","sdk","xmpp","messaging","chatbot","typescript"],"repository":{"type":"git","url":"git+https://github.com/yellowdotai/messaging-sdk.git"},"description":"Yellow Chat SDK - A TypeScript SDK for Yellow.ai chat integration","maintainers":[{"name":"yellowintegrations","email":"integrations@yellow.ai"},{"name":"dwij1305","email":"dwij.jindal@yellow.ai"},{"name":"sankalpym","email":"sankalp.gupta@yellow.ai"}],"readme":"# Yellow Chat SDK\n\nA TypeScript SDK for integrating Yellow.ai chat functionality into web applications. This SDK provides event-based communication for a clean separation between the data layer and UI layer.\n\n## Installation\n\n```bash\nnpm install @yellowdotai/yellow-chat-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { YellowChat } from '@yellowdotai/yellow-chat-sdk';\n\n// Create SDK instance\nconst sdk = new YellowChat();\n\n// Subscribe to events BEFORE connecting\nsdk.on('connection:connected', ({ userId }) => {\n  console.log('Connected as:', userId);\n});\n\nsdk.on('message:received', (message) => {\n  console.log('New message:', message);\n  // message.type = 'text' | 'image' | 'video' | 'audio' | 'file' | 'location' | 'system'\n  // message.content = { message: \"...\" } for text, { url: \"...\" } for media\n  // Render message in your UI based on type\n});\n\nsdk.on('agent:assigned', (agentProfile) => {\n  // Update UI to show agent info\n  console.log('Agent joined:', agentProfile.name);\n});\n\nsdk.on('agent:left', () => {\n  // Agent has left the conversation\n  console.log('Agent left the conversation');\n});\n\n// Initialize and connect\nawait sdk.init({\n  bot: 'your-bot-id',\n  host: 'https://cloud.yellow.ai'\n});\n\nawait sdk.connect();\n\n// Send messages\nawait sdk.sendMessage('Hello!');\n```\n\n## Configuration\n\n```typescript\ninterface SDKConfig {\n  // Required\n  bot: string;                    // Your bot ID\n\n  // Server\n  host?: string;                  // API host URL (default: 'https://cloud.yellow.ai')\n\n  // Message Source (IMPORTANT for live agent integrations)\n  source?: string;                // 'yellowmessenger' (default) or 'syncApi'\n\n  // User\n  userId?: string;                // User ID (auto-generated if not provided)\n  name?: string;                  // User display name\n\n  // Authentication\n  ymAuthenticationToken?: string; // Auth token (if required by your bot)\n\n  // Custom Payload\n  payload?: Record<string, unknown>;\n\n  // Journey Triggers\n  triggerJourney?: string;\n\n  // UTM Parameters\n  utmSource?: string;\n  utmCampaign?: string;\n  utmMedium?: string;\n\n  // Debug\n  debug?: boolean;                // Enable debug logging\n}\n```\n\n### Source Configuration\n\nThe `source` parameter is critical when integrating with live agent functionality:\n\n| Source | Use Case | Description |\n|--------|----------|-------------|\n| `yellowmessenger` | **Fully Headless** | Default. Use when SDK is your only communication channel. All messages sent/received via WebSocket. |\n| `syncApi` | **Hybrid Mode (REST + SDK)** | Use when integrating with `/integrations/sync/v1/message` REST API. Required for hybrid architectures. |\n\n#### When to use `yellowmessenger` (default)\n\nUse this for a **fully headless** approach where the SDK handles all communication:\n\n```typescript\nawait sdk.init({\n  bot: 'your-bot-id',\n  source: 'yellowmessenger'  // or omit - this is the default\n});\n\nawait sdk.connect(userId);\n\n// All communication via SDK\nawait sdk.sendMessage('Hello');\n```\n\n#### When to use `syncApi`\n\nUse this for a **hybrid approach** where you:\n1. Start with REST API calls to `/integrations/sync/v1/message` for bot interactions\n2. Switch to SDK WebSocket connection when a live agent connects\n3. Continue using SDK for real-time agent communication\n\n```typescript\n// Step 1: Initially use REST API for bot messages\nconst response = await fetch('/integrations/sync/v1/message', {\n  method: 'POST',\n  body: JSON.stringify({\n    botId: 'your-bot-id',\n    sender: senderId,\n    data: { message: 'Hello' }\n  })\n});\n\n// Step 2: When live agent connects, switch to SDK with syncApi source\nif (response.data.includes('live agent connected')) {\n  await sdk.init({\n    bot: 'your-bot-id',\n    source: 'syncApi'  // IMPORTANT: Must match REST API source for ticket consistency\n  });\n  \n  await sdk.connect(senderId);  // Use same senderId from REST API\n  \n  // Now receive agent messages via SDK events\n  sdk.on('message:received', (msg) => console.log('Agent:', msg));\n}\n```\n\n> **Important:** When using hybrid mode, the `source` must be set to `syncApi` to maintain ticket consistency between REST API and WebSocket channels. Using mismatched sources will cause live agent tickets to close unexpectedly.\n\n### Live agent (agent inbox) — use `yellowmessenger`\n\nIf your custom UI needs to **receive live-agent messages** (agent inbox), use\n`source: 'yellowmessenger'` and send **all** messages through the SDK\n(`sdk.sendMessage(...)`). This keeps sending and receiving on the **same\nwidget/WebSocket channel**, which is how the backend routes agent replies — and\nticket lifecycle events like `ticket:resolved` — back to your widget over XMPP.\n\n```typescript\nawait sdk.init({ bot: 'your-bot-id', source: 'yellowmessenger' });\nawait sdk.connect(userId);\nawait sdk.sendMessage('Hi'); // send via SDK; agent replies arrive on 'message:received'\n```\n\n> **Why not `syncApi` for agent chat?** The sync API (`/integrations/sync/v1/message`)\n> is a request/response channel — the agent's reply comes later, asynchronously, and\n> there's no open channel on the sync side to push it back. So in `syncApi` mode,\n> agent → user messages are **not guaranteed** to reach the SDK. They only arrive if\n> **(a)** the same user id is used for the sync `sender` and `sdk.connect(userId)`, **and**\n> **(b)** the platform is configured to route that bot's agent messages to XMPP.\n> If you must keep sending via the sync API, either arrange that backend routing, or\n> **poll conversation history** to fetch agent replies. For a purely headless widget\n> that must show agent messages, prefer `yellowmessenger`.\n\n## API\n\n### Lifecycle\n\n```typescript\n// Initialize\nawait sdk.init(config);\n\n// Connect (optionally with a specific user ID)\nawait sdk.connect(userId?);\n\n// Disconnect\nsdk.disconnect();\n```\n\n### Messaging\n\n```typescript\n// Send text message\nawait sdk.sendMessage('Hello!');\n\n// Send a file (see File Upload below)\nawait sdk.sendFile(file);\n```\n\n> **Note:** Message history is **automatically fetched** when you call `connect()`. Listen to the `history:previousMessages` event to receive it.\n\n### File Upload\n\n```typescript\nsendFile(file: File): Promise<FileUploadResponse>\n```\n\nUploads a `File` and posts it into the conversation. This is a **single call** — the\nSDK uploads the file to the server and then delivers the file message into the\nconversation, so both the bot/agent and your own UI receive it. Works in bot and live\nagent conversations alike.\n\n```typescript\n// From a file input\nconst input = document.querySelector('input[type=\"file\"]');\n\ninput.addEventListener('change', async (e) => {\n  const file = e.target.files[0];\n  if (!file) return;\n\n  try {\n    const result = await sdk.sendFile(file);\n    console.log('Uploaded:', result.url); // { url, name, size }\n  } catch (error) {\n    console.error('Upload failed:', error);\n  }\n});\n\n// Track progress/status via events\nsdk.on('file:uploadStarted', ({ fileId, fileName }) => showSpinner(fileName));\nsdk.on('file:uploadCompleted', ({ fileId, file }) => showPreview(file.url));\nsdk.on('file:uploadFailed', ({ fileId, error }) => showError(error.message));\n```\n\n`FileUploadResponse`:\n\n```typescript\ninterface FileUploadResponse {\n  url: string;   // Hosted URL of the uploaded file\n  name: string;  // Original file name\n  size: number;  // File size in bytes\n}\n```\n\n> Uploads are sent as `multipart/form-data`; no `Content-Type` header should be set\n> manually (the SDK handles this). Failures throw a `YellowChatError` with code\n> `FILE_UPLOAD_FAILED` or `FILE_TOO_LARGE`.\n\n### State\n\n```typescript\n// Check connection\nconst connected = sdk.isConnected();\n\n// Get user ID\nconst userId = sdk.getUserId();\n\n// Get bot info\nconst botInfo = sdk.getBotInfo();\n```\n\n### Events\n\n```typescript\n// Subscribe to events (returns unsubscribe function)\nconst unsubscribe = sdk.on('message:received', (message) => {\n  console.log(message);\n});\n\n// Unsubscribe later\nunsubscribe();\n\n// Or use off()\nsdk.off('message:received', handler);\n```\n\n## Events\n\n### Connection Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `connection:connecting` | - | Connection attempt started |\n| `connection:connected` | `{ userId }` | Successfully connected |\n| `connection:disconnected` | `{ code, message, wasClean }` | Disconnected |\n| `connection:reconnecting` | `{ attempt, delay }` | Reconnecting |\n| `connection:reconnected` | `{ userId }` | Successfully reconnected |\n| `connection:error` | `SDKError` | Connection error |\n\n### Message Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `message:received` | `IncomingMessage` | Message from bot/agent |\n| `message:sent` | `{ id, message }` | Message sent successfully |\n| `message:failed` | `{ messageId, error }` | Message failed to send |\n\n### Agent Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `agent:assigned` | `AgentProfile` | Live agent joined the conversation |\n| `agent:left` | - | Agent left or ticket closed/resolved |\n| `agent:typing` | `boolean` | Agent is typing |\n\n### Ticket Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `ticket:closed` | - | Ticket has been closed |\n| `ticket:resolved` | - | Ticket has been resolved |\n\n### File Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `file:uploadStarted` | `{ fileId, fileName }` | File upload started |\n| `file:uploadProgress` | `{ fileId, progress }` | Upload progress (0–100), if supported |\n| `file:uploadCompleted` | `{ fileId, file }` | Upload completed (`file` = `{ url, name, size }`) |\n| `file:uploadFailed` | `{ fileId, error }` | Upload failed |\n\n### History Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `history:previousMessages` | `Message[]` | Previous conversation messages (auto-fetched on connect) |\n\n> History is automatically fetched when `connect()` is called. On reconnection, only missed messages are fetched.\n\n### Network Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `network:online` | - | Network connection restored |\n| `network:offline` | - | Network connection lost |\n\n## Integration Modes\n\n### Mode 1: Fully Headless (SDK Only)\n\nUse the SDK as your only communication channel. Best for custom chat widgets.\n\n```typescript\nimport { YellowChat } from 'yellow-chat-sdk';\n\nconst sdk = new YellowChat();\n\nsdk.on('message:received', (message) => {\n  console.log('Message:', message);\n});\n\nawait sdk.init({\n  bot: 'your-bot-id',\n  source: 'yellowmessenger'  // Default - can be omitted\n});\n\nawait sdk.connect();\nawait sdk.sendMessage('Hello');\n```\n\n### Mode 2: Hybrid Mode (REST API + SDK)\n\nStart with REST API for bot interactions, switch to SDK when live agent connects.\n\n**Why use Hybrid Mode?**\n- Server-side control over bot conversations\n- Reduced client-side complexity for bot-only flows\n- Real-time WebSocket only when needed (live agent)\n\n```typescript\nimport { YellowChat } from 'yellow-chat-sdk';\n\nlet chatMode = 'rest';\nlet sdk = null;\nconst senderId = 'unique-user-id';\n\n// REST API for bot messages\nasync function sendMessageViaREST(message) {\n  const response = await fetch('https://cloud.yellow.ai/integrations/sync/v1/message', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'x-api-key': 'your-api-key'\n    },\n    body: JSON.stringify({\n      botId: 'your-bot-id',\n      sender: senderId,\n      data: { message }\n    })\n  });\n  \n  const data = await response.json();\n  \n  // Check if live agent connected\n  if (data.data?.messageArray?.some(m => \n    m.message?.toLowerCase().includes('live agent') && \n    m.message?.toLowerCase().includes('connected')\n  )) {\n    await switchToWebSocketMode();\n  }\n  \n  return data;\n}\n\n// Switch to SDK when live agent connects\nasync function switchToWebSocketMode() {\n  sdk = new YellowChat();\n  \n  sdk.on('message:received', (message) => {\n    console.log('Agent message:', message);\n  });\n  \n  sdk.on('ticket:closed', () => {\n    console.log('Ticket closed - switching back to REST');\n    chatMode = 'rest';\n  });\n  \n  sdk.on('ticket:resolved', () => {\n    console.log('Ticket resolved - switching back to REST');\n    chatMode = 'rest';\n  });\n  \n  await sdk.init({\n    bot: 'your-bot-id',\n    source: 'syncApi'  // CRITICAL: Must be 'syncApi' for hybrid mode!\n  });\n  \n  await sdk.connect(senderId);  // Use same senderId from REST API\n  chatMode = 'websocket';\n}\n\n// Send message based on current mode\nasync function sendMessage(message) {\n  if (chatMode === 'rest') {\n    return sendMessageViaREST(message);\n  } else {\n    return sdk.sendMessage(message);\n  }\n}\n```\n\n> **Critical:** When using hybrid mode, you **MUST** set `source: 'syncApi'` in the SDK configuration. This ensures that messages sent via the SDK are correctly associated with tickets created via the REST API. Using mismatched sources will cause tickets to close unexpectedly.\n\n## Message Types\n\nAll messages from the SDK follow a **standardized, flattened format**:\n\n```typescript\ninterface IncomingMessage {\n  id: string;                                    // Unique message ID\n  timestamp: Date;                               // Message timestamp\n  type: MessageType;                             // Message type\n  content: MessageContent;                       // Flattened content\n  sender: 'bot' | 'agent' | 'user' | 'system';  // Who sent the message\n}\n\n// Message types\ntype MessageType = 'text' | 'image' | 'video' | 'audio' | 'file' | 'location' | 'system' | 'cards' | 'quickReplies';\n\n// Content is FLATTENED based on type:\n// Text:     { message: \"Hello\" }\n// Image:    { url: \"https://...\" }\n// Video:    { url: \"https://...\", controls: true, autoplay: false, ... }\n// Audio:    { url: \"https://...\" }\n// File:     { url: \"https://...\", name: \"document.pdf\", size?: 1024, mimeType?: \"application/pdf\" }\n// Location: { latitude: 12.34, longitude: 56.78 }\n// System:   { message: \"Agent joined the conversation\" }\n```\n\n### Example: Handling Different Message Types\n\n```typescript\nsdk.on('message:received', (message) => {\n  switch (message.type) {\n    case 'text':\n      console.log('Text:', message.content.message);\n      break;\n    case 'image':\n      console.log('Image URL:', message.content.url);\n      break;\n    case 'video':\n      console.log('Video URL:', message.content.url);\n      // Optional: message.content.controls, message.content.autoplay\n      break;\n    case 'file':\n      console.log('File:', message.content.name, message.content.url);\n      break;\n    case 'system':\n      console.log('System:', message.content.message);\n      // e.g., \"Agent joined the conversation\", \"Conversation ended\"\n      break;\n  }\n});\n```\n\n## Error Handling\n\n```typescript\nimport { YellowChatError } from 'yellow-chat-sdk';\n\ntry {\n  await sdk.sendMessage('Hello');\n} catch (error) {\n  if (error instanceof YellowChatError) {\n    console.error('SDK Error:', error.code, error.message);\n    if (error.recoverable) {\n      // Retry logic\n    }\n  }\n}\n\n// Or listen for error events\nsdk.on('connection:error', (error) => {\n  console.error('Connection error:', error);\n});\n\nsdk.on('message:failed', ({ messageId, error }) => {\n  console.error('Message failed:', messageId, error);\n});\n```\n\n## TypeScript\n\nThe SDK is written in TypeScript and includes full type definitions.\n\n```typescript\nimport type {\n  SDKConfig,\n  IncomingMessage,\n  AgentProfile,\n  SDKEvents,\n  SDKEventName\n} from 'yellow-chat-sdk';\n```\n\n## Browser Support\n\n- Chrome 60+\n- Firefox 55+\n- Safari 11+\n- Edge 79+\n","readmeFilename":"README.md"}