{"_id":"@dlepin/hubdox-chat-sdk","_rev":"8-f4e4f1773d4e10248864317b5a22b7bd","name":"@dlepin/hubdox-chat-sdk","dist-tags":{"latest":"1.7.5"},"versions":{"1.6.0":{"name":"@dlepin/hubdox-chat-sdk","version":"1.6.0","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.6.0","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"e7b359cced50f3335bf958ca088f7ba7a71a74fb","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.6.0.tgz","fileCount":38,"integrity":"sha512-1XN/mow7CZ6JKTmf4qYPoc2glJLejiMveXl/jRevLApL8o8Pgme0cLjA2SYCziU/hH7mF9JbV4U3DLz5rIUPOQ==","signatures":[{"sig":"MEYCIQCNN66CwOdD21xCl1X4jAfoPCYq3IxUxk21HI5HRykYagIhAPFFqqMhHWW62aBua6EQm2FYn26NskblHLjIK0LBI4ZN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":602307},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.6.0_1765141358975_0.07492650502856302","host":"s3://npm-registry-packages-npm-production"}},"1.6.1":{"name":"@dlepin/hubdox-chat-sdk","version":"1.6.1","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.6.1","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"2888cd29dc44b3bdf42e870a3167551579511f01","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.6.1.tgz","fileCount":38,"integrity":"sha512-gBas+pQ6orSi6EmZB/r2rn3ZtiA8R0Q/hP9i7+HoRPeh8nAswoay5KFm4wHOJW7A715jB2F/pQrNl9MhGXKZkw==","signatures":[{"sig":"MEUCIQCE5MQpqb4RGtYH5Ctyk8mw58epi8N//cib8JqfDRM5xwIgCmSkX8I4iX41I1R3eUMtnH4NshHEXNWKh0ABlazn38A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":603857},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.6.1_1765144315371_0.516501726538318","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"@dlepin/hubdox-chat-sdk","version":"1.7.0","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.7.0","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"2901fcb3a5e3915774607b1043df6223587d38f2","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.7.0.tgz","fileCount":38,"integrity":"sha512-a7uqsK6RGIkNPXlQ8EWTcjBANwnnRNV8pxnw6phLuYiKNOeCi8QTERxBhjK0+2BZJ1P/2n7xenZeyFw6pfOXvA==","signatures":[{"sig":"MEQCIGikybokFuVhcX380NHJTAGahVERfPicHAC14JvVIrgoAiAyXmRG54sp9DMge6zaNMqVMBvVBFpWli/XxfNJJmaebA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":618590},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.7.0_1765286362744_0.5797348702440861","host":"s3://npm-registry-packages-npm-production"}},"1.7.1":{"name":"@dlepin/hubdox-chat-sdk","version":"1.7.1","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.7.1","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"0880b18fcb4f04e909b81931d1777cd0ca2ff7fb","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.7.1.tgz","fileCount":38,"integrity":"sha512-X4aeT3DsNZ6k4GtxhhQnmMYh846/BePbABwEBUbApqBPMxYarVJlZNdNdkN6/2F6l+9FdyJT2qCsq5lniORsdQ==","signatures":[{"sig":"MEUCIQDiDisyxvy1nbu+FhK6AayA4g2eeoXi60ROBtuI7eWuEQIgCC9fnLPWacuqDA8x195cz8npmqyBCPIh8JylBhqWCdQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":619506},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.7.1_1765287840285_0.32444004419719974","host":"s3://npm-registry-packages-npm-production"}},"1.7.2":{"name":"@dlepin/hubdox-chat-sdk","version":"1.7.2","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.7.2","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"bafb35927100c02432d32766eceef52da49101bc","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.7.2.tgz","fileCount":38,"integrity":"sha512-BcozCjFwVMWP2rI8WU6yiYCkJ4dqDHgSgXIENUYvhqtBAva40FpAAoYwxTHRm447ZEzb2d4fAqtgDIiwfjP5Pg==","signatures":[{"sig":"MEQCIGOBqL2DRcA5aF4UWTlfExiFyiUTfKpX16gJru6j3LrPAiBnYrpPZskUbfWWA0izoApY7MSPi45cBlIrICOJlEoKCQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":621144},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.7.2_1765288938481_0.0761757595496706","host":"s3://npm-registry-packages-npm-production"}},"1.7.3":{"name":"@dlepin/hubdox-chat-sdk","version":"1.7.3","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.7.3","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"47d9be058e2e79c6b64ccb85576bd6793c3d257f","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.7.3.tgz","fileCount":38,"integrity":"sha512-L5oAicR2vugnod3bTENUN1hrEYj65b0HFJ9PtzYAA/s5ycKNCF78HnFFgXfme/MjPnyeEMrsfxRu/AcGYRHXmg==","signatures":[{"sig":"MEYCIQDzhjpfdchytaQk9RMFtxUx6x1cfZfBylHdMViPdkyEyAIhAOUDpiATrSYPst/6Z88UFuxvtHCOaZqyhydDnR9COecA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":620370},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.7.3_1765336836068_0.866993153395045","host":"s3://npm-registry-packages-npm-production"}},"1.7.4":{"name":"@dlepin/hubdox-chat-sdk","version":"1.7.4","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","_id":"@dlepin/hubdox-chat-sdk@1.7.4","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"dist":{"shasum":"71cc65e3b94d9fb53e3f68e6b419ba6cca4934fd","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.7.4.tgz","fileCount":38,"integrity":"sha512-2JDjgUhsVkUBFllB6y+odmXFmaACzmy2k/vo5HMZT7W+ovLKUnCe4oPgeFiBWq8vM6u1vVKoQeIbdpaUm6wBtg==","signatures":[{"sig":"MEUCIDdvuMzcDGNBUIsUR1jFCFMTdCa61WHAykVVm8ar4E+WAiEAmz897PesPfoz9iZ2+DA5RHNXOlnZDPGSCAn5plHh4kg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":621516},"jest":{"watchman":false,"testMatch":["**/tests/**/*.test.js"],"transform":{},"testEnvironment":"jsdom","coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"moduleFileExtensions":["js","json"],"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchPathIgnorePatterns":[]},"main":"src/index.js","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","scripts":{"test":"jest","test:debug":"jest --detectOpenHandles","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"repository":{"url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git","type":"git"},"_npmVersion":"11.5.1","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","directories":{},"_nodeVersion":"24.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"_npmOperationalInternal":{"tmp":"tmp/hubdox-chat-sdk_1.7.4_1765406487387_0.9098927603623435","host":"s3://npm-registry-packages-npm-production"}},"1.7.5":{"name":"@dlepin/hubdox-chat-sdk","version":"1.7.5","description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","main":"src/index.js","publishConfig":{"access":"public"},"scripts":{"test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:debug":"jest --detectOpenHandles"},"keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"author":{"name":"Bemtorres"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git"},"bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","devDependencies":{"jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","@testing-library/jest-dom":"^6.1.5"},"jest":{"testEnvironment":"jsdom","setupFilesAfterEnv":["<rootDir>/tests/setup.js"],"collectCoverageFrom":["src/**/*.js","!src/**/*.test.js"],"coverageDirectory":"coverage","coverageReporters":["text","lcov","html"],"moduleFileExtensions":["js","json"],"testMatch":["**/tests/**/*.test.js"],"transform":{},"transformIgnorePatterns":["node_modules/(?!(@testing-library)/)"],"watchman":false,"watchPathIgnorePatterns":[]},"_id":"@dlepin/hubdox-chat-sdk@1.7.5","gitHead":"b3ba531f3110a51d3773104cffad90c918dad1a2","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-VJ6oCcRB6nIq5Yt+zxBmgryIc76FJifJmmFzzc994P06xA8qcQCwBuSFr/pBvxpB+8ZwEp5MGVzOP5ismFahxg==","shasum":"f3ff33a80657900e89c2cb498c84f527d7064583","tarball":"https://registry.npmjs.org/@dlepin/hubdox-chat-sdk/-/hubdox-chat-sdk-1.7.5.tgz","fileCount":38,"unpackedSize":612926,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDfeMDUoMQnP2Cp2XoQmsJKNN0IdT5bjgkN9eBDkIB2jQIhALWBCSIgRDZhKY2CAAH2l7rdE2rzsZiiEgyQYebuxoP0"}]},"_npmUser":{"name":"dlepin","email":"dlepin@cread.org.pe"},"directories":{},"maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hubdox-chat-sdk_1.7.5_1765482060871_0.39580124079375456"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-07T21:02:38.928Z","modified":"2025-12-11T19:41:01.215Z","1.6.0":"2025-12-07T21:02:39.127Z","1.6.1":"2025-12-07T21:51:55.555Z","1.7.0":"2025-12-09T13:19:22.914Z","1.7.1":"2025-12-09T13:44:00.443Z","1.7.2":"2025-12-09T14:02:18.639Z","1.7.3":"2025-12-10T03:20:36.247Z","1.7.4":"2025-12-10T22:41:27.555Z","1.7.5":"2025-12-11T19:41:01.020Z"},"bugs":{"url":"https://github.com/bemtorres/hubdox-chat-sdk/issues"},"author":{"name":"Bemtorres"},"license":"ISC","homepage":"https://github.com/bemtorres/hubdox-chat-sdk#readme","keywords":["chat","sdk","hubdox","chatbot","widget","floating","javascript","api","registration"],"repository":{"type":"git","url":"git+https://github.com/bemtorres/hubdox-chat-sdk.git"},"description":"SDK de JavaScript para integrar chatbots flotantes en sitios web con soporte para registro de usuarios y APIs personalizables","maintainers":[{"name":"dlepin","email":"dlepin@cread.org.pe"}],"readme":"# Hubdox Chat SDK\r\n\r\n[![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](https://www.npmjs.com/package/hubdox-chat-sdk)\r\n[![License](https://img.shields.io/badge/license-ISC-green.svg)](LICENSE)\r\n\r\nDeveloped by [Bemtorres](https://github.com/bemtorres)\r\n\r\nA lightweight and easy-to-use JavaScript SDK for integrating a floating chatbot into any website. The chat widget is highly customizable and integrates seamlessly with existing chat APIs.\r\n\r\n## 🚀 Features\r\n\r\n- **Floating widget**: A floating button that expands into a full chat panel.\r\n- **Responsive design**: Automatically adapts to different screen sizes.\r\n- **Fullscreen mode on mobile**: Automatic expansion to fullscreen on mobile devices.\r\n- **Separate registration screen**: A dedicated welcome screen where the bot greets and asks for the user's name before starting the chat.\r\n- **Highly customizable**: Configurable colors, texts, images, and styles.\r\n- **Easy integration**: Single line of code to implement.\r\n- **Bootstrap included**: Uses Bootstrap 5 for modern and professional design.\r\n- **Avatar support**: Profile images for user and bot.\r\n- **Typing indicator**: Shows when the bot is processing a response.\r\n- **State management**: Automatic handling of messages and sessions, with optional caching.\r\n- **Minimalist design**: Clean and easy-to-use interface.\r\n- **Simplified system**: Only 2 APIs (registration and message).\r\n- **Automatic configuration**: The bot configures itself automatically from the API.\r\n- **Dynamic updates**: The user interface updates automatically with the bot's configuration.\r\n- **Test mode**: A test mode for development and testing without a live API.\r\n- **Markdown support**: Automatic rendering of Markdown text in bot responses.\r\n- **Simulated streaming**: Character-by-character typing effect to simulate real-time writing.\r\n- **Development mode**: Configurable logging system for development and production.\r\n- **Sound notifications**: Optional sound notification on the bot's first message.\r\n- **Auto-reminder system**: Automatically asks the user if they need help after a configurable timeout.\r\n- **Complete multi-language support**: 7 languages fully supported with comprehensive translations for all UI elements, messages, and test responses.\r\n- **Dynamic language switching**: Change language at runtime with automatic UI updates.\r\n- **Internationalization ready**: All texts use translation system, no hardcoded strings.\r\n\r\n## 🌍 Multi-Language Support\r\n\r\nThe SDK includes a comprehensive multi-language system that supports 7 different languages with complete translations for all features:\r\n\r\n### Supported Languages\r\n\r\n- **Spanish (es)**: Default language with complete translations\r\n- **English (en)**: Complete English translations\r\n- **Portuguese (pt)**: Complete Portuguese translations\r\n- **Russian (ru)**: Complete Russian translations\r\n- **German (de)**: Complete German translations\r\n- **Chinese (zh)**: Complete Chinese translations\r\n- **Japanese (ja)**: Complete Japanese translations\r\n\r\n### Translation Coverage\r\n\r\nAll UI elements and messages are fully translated:\r\n\r\n#### UI Elements\r\n- Button texts (Send, Clear history, Close, etc.)\r\n- Placeholders (Write a message...)\r\n- Modal titles and confirmations\r\n- Error messages and notifications\r\n- Footer text and branding\r\n\r\n#### Test Mode Messages\r\n- Welcome messages (4 variations)\r\n- Greeting messages (4 variations)\r\n- Curiosity facts (10 variations)\r\n- Help messages (4 variations)\r\n- Unknown question responses (4 variations)\r\n\r\n#### Registration System\r\n- Registration prompts and instructions\r\n- Name validation messages\r\n- Welcome and completion messages\r\n\r\n### Language Configuration\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  custom: {\r\n    language: 'en',  // Change language\r\n    // language: 'pt',  // Portuguese\r\n    // language: 'ru',  // Russian\r\n    // language: 'de',  // German\r\n    // language: 'zh',  // Chinese\r\n    // language: 'ja',  // Japanese\r\n  }\r\n});\r\n```\r\n\r\n### Dynamic Language Switching\r\n\r\n```javascript\r\n// Change language at runtime\r\nchat.setLanguage('en'); // Returns true if successful, false if not\r\n\r\n// Get current language\r\nconst currentLang = chat.getLanguage(); // 'es', 'en', 'pt', etc.\r\n\r\n// Get supported languages\r\nconst supported = chat.getSupportedLanguages();\r\n// ['es', 'en', 'pt', 'ru', 'de', 'zh', 'ja']\r\n```\r\n\r\n### Language Features\r\n\r\n- **Default language**: Spanish (es)\r\n- **Dynamic switching**: Change language at runtime with automatic UI updates\r\n- **Complete translation**: All UI elements, messages, and placeholders are translated\r\n- **Persistent state**: Language preference is saved in cache\r\n- **Variable replacement**: Supports dynamic content like user names and bot names\r\n- **No hardcoded strings**: All texts use the translation system\r\n- **Test mode support**: All test responses are fully translated in all languages\r\n\r\n## 📦 Installation\r\n\r\n### CDN (Recommended)\r\n\r\nLatest version:\r\n```html\r\n<script src=\"https://cdn.jsdelivr.net/npm/hubdox-chat-sdk\"></script>\r\n```\r\n\r\n### NPM\r\n\r\n```bash\r\nnpm install hubdox-chat-sdk\r\n```\r\n\r\n```javascript\r\nimport ChatBot from 'hubdox-chat-sdk';\r\n```\r\n\r\n## 🛠️ Basic Usage\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  baseUrl: 'https://your-api.com',\r\n  apiKey: 'your-api-key',\r\n  tenant: 'your-tenant',\r\n  options: {\r\n    register: true, // Optional: requests user information on startup\r\n  },\r\n  user: {\r\n    name: 'User',\r\n    email: 'user@example.com',\r\n    photo: 'https://example.com/avatar.jpg'\r\n  },\r\n  bot: {\r\n    name: 'Assistant',\r\n    img: 'https://example.com/bot-avatar.jpg'\r\n  }\r\n});\r\n```\r\n\r\n## ⚙️ Configuration\r\n\r\n### Required Options\r\n\r\n| Parameter | Type   | Description                            |\r\n|-----------|--------|----------------------------------------|\r\n| `baseUrl` | string | Base URL of your chat API              |\r\n| `apiKey`  | string | API key for authentication (Bearer token) |\r\n| `tenant`  | string | Tenant/organization identifier         |\r\n\r\n### `options` Object (Optional)\r\n\r\n| Parameter  | Type    | Default | Description                                                                 |\r\n|------------|---------|---------|-----------------------------------------------------------------------------|\r\n| `register` | boolean | `false` | If `true`, shows a registration screen where the bot asks for the user's name before starting the chat. |\r\n| `show`     | boolean | `true`  | Shows or hides the chat widget on initialization.                           |\r\n| `cache`    | boolean | `true`  | Enables or disables caching of chat session and messages.                   |\r\n| `testMode` | boolean | `false` | Enables or disables test mode with fully translated responses.             |\r\n| `stream`   | boolean | `false` | If `true`, simulates typing effect showing the message character by character. |\r\n| `devMode`  | boolean | `false` | Enables development logs. Should be `false` in production.                 |\r\n\r\n### `user` Object (Optional)\r\n\r\n| Parameter | Type   | Default                                                                              | Description              |\r\n|-----------|--------|--------------------------------------------------------------------------------------|--------------------------|\r\n| `name`    | string | `'User'`                                                                             | User's name.             |\r\n| `email`   | string | `'test@mail.com'`                                                                    | User's email address.    |\r\n| `photo`   | string | `'https://res.cloudinary.com/dienilw2p/image/upload/v1747635921/hubdox/lgvqg0648leq6meeusid.png'` | User's profile photo URL. |\r\n\r\n### `bot` Object (Optional)\r\n\r\n| Parameter | Type   | Default                                                                              | Description           |\r\n|-----------|--------|--------------------------------------------------------------------------------------|-----------------------|\r\n| `name`    | string | `'Bot'`                                                                              | Bot's name.           |\r\n| `img`     | string | `'https://res.cloudinary.com/dienilw2p/image/upload/v1747635921/hubdox/xevgjbvb1ri3ytpletzk.png'` | Bot's image URL.      |\r\n\r\n### `custom` Object (Optional)\r\n\r\n| Parameter           | Type    | Default        | Description                                                              |\r\n|---------------------|---------|----------------|--------------------------------------------------------------------------|\r\n| `primaryColor`      | string  | `'#0d6efd'`    | The primary color of the chat widget.                                    |\r\n| `botName`           | string  | `'Bot'`        | The bot's name displayed in the chat header.                             |\r\n| `headerBgColor`     | string  | `primaryColor` | The background color of the chat header.                                 |\r\n| `headerTextColor`   | string  | `'#ffffff'`    | The text color of the chat header.                                       |\r\n| `sendButtonText`    | string  | `null`         | The send button text.                                                     |\r\n| `iconButton`        | string  | `null`         | The URL of a custom icon for the floating button.                        |\r\n| `chatWidth`         | string  | `'400px'`      | The width of the chat panel on desktop.                                  |\r\n| `chatHeight`        | string  | `'60vh'`       | The height of the chat panel on desktop.                                 |\r\n| `chatMaxWidth`      | string  | `'90vw'`       | The maximum width of the chat panel on mobile.                           |\r\n| `chatMaxHeight`     | string  | `'90vh'`       | The maximum height of the chat panel on mobile.                          |\r\n| `messagesHeight`    | string  | `'350px'`      | The height of the messages container.                                    |\r\n| `buttonSize`        | string  | `'56px'`       | The size of the floating button.                                         |\r\n| `fullscreenEnabled` | boolean | `true`         | Enables or disables fullscreen mode on mobile.                           |\r\n| `showTime`          | boolean | `true`         | If `true`, shows the time in each chat message.                          |\r\n| `sound`             | boolean | `false`        | If `true`, plays a notification sound on the bot's first message.        |\r\n| `reminderTimeout`   | number  | `60000`        | Time in milliseconds before showing a reminder message (default: 60 seconds). |\r\n| `language`          | string  | `'es'`         | Language for the chat interface (es, en, pt, ru, de, zh, ja).           |\r\n| `position`          | object  | `{ bottom: '24px', right: '24px' }` | The position of the floating button with `top`, `bottom`, `left`, `right` and `transform` properties. |\r\n\r\n## 📝 Examples\r\n\r\n### Basic Example\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n  <title>My Website</title>\r\n</head>\r\n<body>\r\n  <h1>Welcome to my site</h1>\r\n  \r\n  <script src=\"https://cdn.jsdelivr.net/npm/hubdox-chat-sdk@0.1.0\"></script>\r\n  <script>\r\n    const chat = new ChatBot({\r\n      baseUrl: 'https://my-api.com',\r\n      apiKey: 'my-api-key-123',\r\n      tenant: 'my-tenant',\r\n      options: {\r\n        register: true, // Enables conversational registration\r\n      },\r\n      user: {\r\n        name: 'John Doe',\r\n        email: 'john@example.com',\r\n        photo: 'https://example.com/john-avatar.jpg'\r\n      },\r\n      bot: {\r\n        name: 'Virtual Assistant',\r\n        img: 'https://example.com/bot-avatar.jpg'\r\n      }\r\n    });\r\n  </script>\r\n</body>\r\n</html>\r\n```\r\n\r\n### Multi-Language Example\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  baseUrl: 'https://api.mycompany.com',\r\n  apiKey: 'sk-1234567890abcdef',\r\n  tenant: 'mycompany-prod',\r\n  options: {\r\n    register: true,\r\n    testMode: true, // Test mode with translated responses\r\n  },\r\n  user: {\r\n    name: 'User',\r\n    email: 'user@mycompany.com',\r\n    photo: 'https://mycompany.com/avatars/default.jpg'\r\n  },\r\n  bot: {\r\n    name: 'AI Assistant',\r\n    img: 'https://mycompany.com/bots/assistant.jpg'\r\n  },\r\n  custom: {\r\n    language: 'en', // Set initial language\r\n    primaryColor: '#6366f1',\r\n    botName: 'Virtual Assistant',\r\n    headerBgColor: '#4f46e5',\r\n    headerTextColor: '#ffffff',\r\n    showTime: true\r\n  }\r\n});\r\n\r\n// Change language dynamically\r\nchat.setLanguage('pt'); // Switch to Portuguese\r\n```\r\n\r\n### Registration Screen Example\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  baseUrl: 'https://api.mycompany.com',\r\n  apiKey: 'sk-1234567890abcdef',\r\n  tenant: 'mycompany-prod',\r\n  options: {\r\n    register: true, // Enables registration screen\r\n  },\r\n  user: {\r\n    name: 'User', // Registration screen will be shown\r\n    email: 'user@mycompany.com',\r\n    photo: 'https://mycompany.com/avatars/default.jpg'\r\n  },\r\n  bot: {\r\n    name: 'Virtual Assistant',\r\n    img: 'https://mycompany.com/bots/assistant.jpg'\r\n  },\r\n  custom: {\r\n    primaryColor: '#ff6b35',\r\n    botName: 'AI Support',\r\n    headerBgColor: '#2c3e50',\r\n    headerTextColor: '#ecf0f1',\r\n    sendButtonText: 'Send Message',\r\n    showTime: true,\r\n    language: 'es' // Spanish interface\r\n  }\r\n});\r\n```\r\n\r\n### Custom Example (No Registration)\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  baseUrl: 'https://api.mycompany.com',\r\n  apiKey: 'sk-1234567890abcdef',\r\n  tenant: 'mycompany-prod',\r\n  options: {\r\n    register: false, // No registration screen\r\n  },\r\n  user: {\r\n    name: 'Mary Garcia', // Already registered user\r\n    email: 'mary@mycompany.com',\r\n    photo: 'https://mycompany.com/avatars/mary.jpg'\r\n  },\r\n  bot: {\r\n    name: 'Technical Support',\r\n    img: 'https://mycompany.com/bots/support.jpg'\r\n  },\r\n  custom: {\r\n    primaryColor: '#ff6b35',\r\n    botName: 'AI Support',\r\n    headerBgColor: '#2c3e50',\r\n    headerTextColor: '#ecf0f1',\r\n    sendButtonText: 'Send Message',\r\n    showTime: true,\r\n    language: 'de' // German interface\r\n  }\r\n});\r\n```\r\n\r\n### Streaming Example\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  baseUrl: 'https://api.mycompany.com',\r\n  apiKey: 'sk-1234567890abcdef',\r\n  tenant: 'mycompany-prod',\r\n  options: {\r\n    register: true,\r\n    stream: true,      // Enables streaming effect\r\n    devMode: true,     // Development logs (development only)\r\n  },\r\n  user: {\r\n    name: 'User',\r\n    email: 'user@mycompany.com',\r\n    photo: 'https://mycompany.com/avatars/default.jpg'\r\n  },\r\n  bot: {\r\n    name: 'AI Assistant',\r\n    img: 'https://mycompany.com/bots/assistant.jpg'\r\n  },\r\n  custom: {\r\n    primaryColor: '#6366f1',\r\n    botName: 'Virtual Assistant',\r\n    headerBgColor: '#4f46e5',\r\n    headerTextColor: '#ffffff',\r\n    showTime: true,\r\n    language: 'ja' // Japanese interface\r\n  }\r\n});\r\n```\r\n\r\n## 🔧 Server API\r\n\r\nThe SDK is designed to communicate with two main endpoints on your backend server.\r\n\r\n### 1. Session Registration (`/api/sdk/v1/register`)\r\n\r\nThis endpoint is called when the chat widget is initialized. Its purpose is to register a new chat session and obtain the initial bot and license configuration.\r\n\r\n- **Method:** `POST`\r\n- **Headers:**\r\n  - `Authorization`: `Bearer {apiKey}`\r\n  - `Content-Type`: `application/json`\r\n\r\n#### Request Parameters (Request Body)\r\n\r\n| Parameter | Type   | Required | Description                           |\r\n|-----------|--------|----------|---------------------------------------|\r\n| `apiKey`  | string | Yes      | The API key for authentication.       |\r\n| `tenant`  | string | Yes      | The tenant/organization identifier.   |\r\n\r\n**Request Example:**\r\n```json\r\n{\r\n  \"apiKey\": \"sk-1234567890abcdef\",\r\n  \"tenant\": \"my-tenant\"\r\n}\r\n```\r\n\r\n#### Response Parameters (Response Body)\r\n\r\n| Parameter | Type   | Description                                                                                             |\r\n|-----------|--------|---------------------------------------------------------------------------------------------------------|\r\n| `session` | string | A unique identifier for the chat session. The SDK will store it and send it in subsequent message requests. |\r\n| `license` | object | An object containing information about the client's license.                                           |\r\n| `chatbot` | object | An object containing the bot's configuration.                                                          |\r\n\r\n**License Object Structure:**\r\n\r\n| Parameter    | Type    | Description                                            |\r\n|--------------|---------|--------------------------------------------------------|\r\n| `name`       | string  | The license holder's name (e.g., \"Hubdox\").           |\r\n| `logo`       | string  | The URL of the license holder's logo.                  |\r\n| `active`     | boolean | Indicates if the license is active.                    |\r\n| `url`        | string  | The URL that the license footer will link to.          |\r\n| `showFooter` | boolean | If `true`, a \"Powered by\" footer will be displayed.    |\r\n\r\n**Chatbot Object Structure:**\r\n\r\n| Parameter         | Type   | Description                                           |\r\n|-------------------|--------|-------------------------------------------------------|\r\n| `name`            | string | The bot's name (e.g., \"Virtual Assistant\").          |\r\n| `photo`           | string | The URL of the bot's profile image.                   |\r\n| `initial_message` | string | The first message the bot will send to the user.      |\r\n\r\n**Response Example:**\r\n```json\r\n{\r\n  \"session\": \"sess_a1b2c3d4e5f6\",\r\n  \"license\": {\r\n    \"name\": \"Hubdox\",\r\n    \"logo\": \"https://cdn.hubdox.com/logo.png\",\r\n    \"active\": true,\r\n    \"url\": \"https://hubdox.com\",\r\n    \"showFooter\": true\r\n  },\r\n  \"chatbot\": {\r\n    \"name\": \"Sales Assistant\",\r\n    \"photo\": \"https://cdn.example.com/bot-avatar.png\",\r\n    \"initial_message\": \"Hello! 👋 How can I help you find the perfect product today?\"\r\n  }\r\n}\r\n```\r\n\r\n---\r\n\r\n### 2. Message Sending (`/api/sdk/v1/message`)\r\n\r\nThis endpoint is called every time a user sends a message through the chat widget.\r\n\r\n- **Method:** `POST`\r\n- **Headers:**\r\n  - `Authorization`: `Bearer {apiKey}`\r\n  - `Content-Type`: `application/json`\r\n\r\n#### Request Parameters (Request Body)\r\n\r\n| Parameter | Type   | Required | Description                                      |\r\n|-----------|--------|----------|--------------------------------------------------|\r\n| `apiKey`  | string | Yes      | The API key for authentication.                  |\r\n| `tenant`  | string | Yes      | The tenant/organization identifier.              |\r\n| `session` | string | Yes      | The session ID obtained from the registration endpoint. |\r\n| `message` | string | Yes      | The user's text message.                         |\r\n| `name`    | string | No       | The user's name.                                 |\r\n| `stream`  | boolean| No       | If `true`, indicates that streaming should be used. |\r\n\r\n**Request Example:**\r\n```json\r\n{\r\n  \"apiKey\": \"sk-1234567890abcdef\",\r\n  \"tenant\": \"my-tenant\",\r\n  \"session\": \"sess_a1b2c3d4e5f6\",\r\n  \"message\": \"Hello, I'd like to know more about product X.\",\r\n  \"name\": \"John Doe\",\r\n  \"stream\": false\r\n}\r\n```\r\n\r\n#### Response Parameters (Response Body)\r\n\r\n| Parameter | Type   | Description                     |\r\n|-----------|--------|---------------------------------|\r\n| `answer`  | string | The bot's text response.        |\r\n\r\n**Streaming Note**: If `stream: true` is sent in the request, the SDK will simulate the streaming effect by showing the response character by character, regardless of whether the server supports real streaming or not.\r\n\r\n**Response Example:**\r\n```json\r\n{\r\n  \"answer\": \"Of course! Product X is one of our best options. What would you like to know specifically about it?\"\r\n}\r\n```\r\n\r\n## ⚙️ Public Methods\r\n\r\n### `toggleChatPanel()`\r\n\r\nToggles the chat panel visibility.\r\n\r\n```javascript\r\nchat.toggleChatPanel();\r\n```\r\n\r\n### `hideChatPanel()`\r\n\r\nHides the chat panel.\r\n\r\n```javascript\r\nchat.hideChatPanel();\r\n```\r\n\r\n### `sendMessage(message)`\r\n\r\nSends a message to the bot.\r\n\r\n```javascript\r\nchat.sendMessage('Hello, I need help.');\r\n```\r\n\r\n### `clearCache()`\r\n\r\nClears the cached chat session and messages.\r\n\r\n```javascript\r\nchat.clearCache();\r\n```\r\n\r\n### `reloadFromCache()`\r\n\r\nReloads the chat session and messages from cache.\r\n\r\n```javascript\r\nchat.reloadFromCache();\r\n```\r\n\r\n### `getCacheStatus()`\r\n\r\nGets the cache status.\r\n\r\n```javascript\r\nconst status = chat.getCacheStatus();\r\nconsole.log(status);\r\n```\r\n\r\n### `getRegistrationStatus()`\r\n\r\nGets the user registration status.\r\n\r\n```javascript\r\nconst status = chat.getRegistrationStatus();\r\nconsole.log(status);\r\n```\r\n\r\n### `setLanguage(language)`\r\n\r\nChanges the chat interface language dynamically.\r\n\r\n```javascript\r\n// Change to English\r\nchat.setLanguage('en');\r\n\r\n// Change to Portuguese\r\nchat.setLanguage('pt');\r\n\r\n// Change to Russian\r\nchat.setLanguage('ru');\r\n```\r\n\r\n### `getLanguage()`\r\n\r\nGets the current language.\r\n\r\n```javascript\r\nconst currentLang = chat.getLanguage(); // Returns 'es', 'en', 'pt', etc.\r\n```\r\n\r\n### `getSupportedLanguages()`\r\n\r\nGets the list of supported languages.\r\n\r\n```javascript\r\nconst languages = chat.getSupportedLanguages();\r\n// Returns ['es', 'en', 'pt', 'ru', 'de', 'zh', 'ja']\r\n```\r\n\r\n### `setReminderTimeout(timeout)`\r\n\r\nConfigures the reminder timeout.\r\n\r\n```javascript\r\nchat.setReminderTimeout(30000); // 30 seconds\r\n```\r\n\r\n### `getReminderStatus()`\r\n\r\nGets the reminder system status.\r\n\r\n```javascript\r\nconst status = chat.getReminderStatus();\r\nconsole.log(status);\r\n```\r\n\r\n## 🎯 Registration Screen\r\n\r\nThe new registration screen functionality clearly separates the registration process from normal chat, avoiding confusion and improving user experience.\r\n\r\n### When is the registration screen shown?\r\n\r\nThe registration screen is automatically displayed when any of these conditions are met:\r\n\r\n1. **When `register: true`** - The registration option is enabled\r\n2. **When the user's name doesn't exist** - The user doesn't have a valid name\r\n3. **When the user is not registered** - The registration process hasn't been completed\r\n\r\n### Registration screen flow\r\n\r\n1. **Welcome**: The bot shows a welcome screen with its image\r\n2. **Name request**: Asks the user to type their name\r\n3. **Confirmation**: Confirms the name and transitions to chat\r\n4. **Normal chat**: Starts the chat with a personalized message\r\n\r\n### Configuration example\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  baseUrl: 'https://your-api.com',\r\n  apiKey: 'your-api-key',\r\n  tenant: 'your-tenant',\r\n  options: {\r\n    register: true, // Enables registration screen\r\n    testMode: true  // For testing without real API\r\n  },\r\n  user: {\r\n    name: \"User\", // Registration screen will be shown\r\n    email: 'user@example.com'\r\n  }\r\n});\r\n```\r\n\r\n## 🧪 Test Mode\r\n\r\nWhen `testMode: true` is enabled, the chat widget uses a predefined set of responses for testing purposes, without needing a live API. All responses are fully translated in all supported languages.\r\n\r\n### Test Mode Features\r\n\r\n- **Complete translations**: All test responses are available in 7 languages\r\n- **Dynamic responses**: Responses change based on user input keywords\r\n- **Realistic interactions**: Simulates real bot behavior\r\n- **No API required**: Perfect for development and testing\r\n\r\n### Test Response Categories\r\n\r\n1. **Welcome messages** (4 variations) - Shown during registration\r\n2. **Greeting messages** (4 variations) - For hello/hi messages\r\n3. **Curiosity facts** (10 variations) - For curiosity/dato questions\r\n4. **Help messages** (4 variations) - For help/ayuda questions\r\n5. **Unknown responses** (4 variations) - For unrecognized messages\r\n\r\n### Configuration\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  options: {\r\n    testMode: true, // Enables test mode with translated responses\r\n  },\r\n  custom: {\r\n    language: 'en', // Test responses will be in English\r\n  }\r\n});\r\n```\r\n\r\n### Example Test Interactions\r\n\r\n```javascript\r\n// User: \"Hola\" or \"Hello\"\r\n// Bot: Random greeting message in selected language\r\n\r\n// User: \"Ayuda\" or \"Help\"\r\n// Bot: Random help message in selected language\r\n\r\n// User: \"Curiosidad\" or \"Interesting fact\"\r\n// Bot: Random curiosity fact in selected language\r\n\r\n// User: \"Random question\"\r\n// Bot: Random unknown response in selected language\r\n```\r\n\r\n## 📝 Markdown Support\r\n\r\nThe ChatBot includes complete support for rendering Markdown text in bot responses. The following formats are supported:\r\n\r\n### Supported Formats\r\n\r\n| Format | Syntax | Result |\r\n|--------|--------|--------|\r\n| **Bold** | `**text**` | **text** |\r\n| *Italic* | `*text*` | *text* |\r\n| `Inline code` | `` `code` `` | `code` |\r\n| **Code block** | ```` ```code``` ```` | Code block with highlighting |\r\n| [Links](https://example.com) | `[text](url)` | External links |\r\n| **Headers** | `# Header`, `## Subheader` | Headers with hierarchy |\r\n| **Lists** | `- item` or `1. item` | Ordered and unordered lists |\r\n\r\n### Response with Markdown Example\r\n\r\n```javascript\r\n// The bot can respond with Markdown\r\nconst response = `# Hello! 👋\r\n\r\nI help you with **Markdown formatting**. Here are some examples:\r\n\r\n## Main features:\r\n- **Bold** for emphasis\r\n- *Italic* for details\r\n- \\`inline code\\` for commands\r\n- [Links](https://example.com) for resources\r\n\r\n## Code example:\r\n\\`\\`\\`javascript\r\nfunction greet() {\r\n    console.log(\"Hello world!\");\r\n}\r\n\\`\\`\\``;\r\n```\r\n\r\n### Security\r\n\r\nThe Markdown parser includes protection against XSS (Cross-Site Scripting) by automatically escaping malicious HTML in the input text.\r\n\r\n## ⚡ Simulated Streaming\r\n\r\nThe ChatBot SDK includes a simulated streaming functionality that allows showing bot responses character by character, creating a visual effect similar to ChatGPT.\r\n\r\n### How does it work?\r\n\r\nWhen `stream: true` is enabled:\r\n\r\n1. **Typing indicator**: The \"is typing...\" indicator is shown first\r\n2. **Text streaming**: The message appears progressively character by character\r\n3. **Blinking cursor**: An animated cursor indicates the bot is \"typing\"\r\n4. **Variable speed**: Different speeds for spaces, punctuation, and normal characters\r\n\r\n### Configuration\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  options: {\r\n    stream: true,  // Enables simulated streaming\r\n  }\r\n});\r\n```\r\n\r\n### Behavior\r\n\r\n- **With `stream: true`**: Message appears character by character with blinking cursor\r\n- **With `stream: false`**: Message appears complete at once\r\n\r\n### Customization\r\n\r\nThe streaming includes:\r\n- **Blinking cursor** with the chat's primary color\r\n- **Left border** special during streaming\r\n- **Subtle gradient background** to highlight the message\r\n- **Variable speed** that simulates human typing\r\n\r\n## 🔧 Development Mode\r\n\r\nThe SDK includes a configurable logging system to facilitate development and debugging.\r\n\r\n### Configuration\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  options: {\r\n    devMode: true,  // Enables development logs\r\n  }\r\n});\r\n```\r\n\r\n### Log Types\r\n\r\n- **`_log()`**: General informational logs\r\n- **`_logError()`**: Errors (always visible)\r\n- **`_logWarn()`**: Warnings (development mode only)\r\n- **`_logInfo()`**: Additional information (development mode only)\r\n- **`_logDebug()`**: Debugging information (development mode only)\r\n\r\n### Production Usage\r\n\r\n```javascript\r\n// For production, disable logs\r\noptions: {\r\n  devMode: false,  // Disables logs for better performance\r\n}\r\n```\r\n\r\n## 🔄 Caching\r\n\r\nThe chat widget can cache the chat session and messages in the browser's local storage to maintain the conversation across page reloads.\r\n\r\nTo disable caching, set `cache: false` in the `options` object.\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  options: {\r\n    cache: false,\r\n  }\r\n});\r\n```\r\n\r\n## 🎨 Customization\r\n\r\n### Colors\r\n\r\nYou can completely customize the widget's appearance:\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  custom: {\r\n    primaryColor: '#e74c3c',      // Primary color\r\n    headerBgColor: '#2c3e50',     // Header background\r\n    headerTextColor: '#ffffff',   // Header text\r\n  }\r\n});\r\n```\r\n\r\n### Texts\r\n\r\nCustomize the texts that appear in the widget:\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  custom: {\r\n    botName: 'My Personal Assistant',\r\n    sendButtonText: 'Send Message'\r\n  }\r\n});\r\n```\r\n\r\n## 📁 Example Files\r\n\r\nThe SDK includes several example files for different use cases:\r\n\r\n### Main Files\r\n\r\n- **`example/text.html`**: Basic example with all functionalities\r\n- **`example/streaming-test.html`**: Specific test for simulated streaming\r\n- **`example/options-menu.html`**: Visual configurator with Bootstrap\r\n- **`example/options-menu-tailwind.html`**: Visual configurator with Tailwind CSS\r\n- **`example/registration-screen-example.html`**: Registration screen example\r\n- **`example/sound-test.html`**: Sound notification testing\r\n- **`example/reminder-test.html`**: Auto-reminder system testing\r\n- **`example/multilanguage-test.html`**: Multi-language system testing\r\n- **`example/server-limit-test.html`**: Server-side message limit testing\r\n- **`example/simple-language-test.html`**: Simple language switching test\r\n- **`example/test-language-test.html`**: Test mode with different languages\r\n- **`index.html`**: 30 different configuration examples\r\n\r\n### Tests\r\n\r\n- **`tests/`**: Complete unit test suite\r\n- **`tests/RegistrationScreen.test.js`**: Specific tests for registration screen\r\n- **`tests/streaming.test.js`**: Tests for streaming functionality\r\n\r\n## 🚀 Deployment\r\n\r\n### Local Development\r\n\r\n1. Clone the repository.\r\n2. Open `example/streaming-test.html` to test streaming.\r\n3. Open `example/text.html` to see all functionalities.\r\n4. Open `example/multilanguage-test.html` to test language switching.\r\n5. Modify the configuration according to your needs.\r\n\r\n### Production\r\n\r\n1. Include the script from CDN.\r\n2. Configure your API endpoint.\r\n3. Customize the appearance according to your brand.\r\n4. Set the appropriate language for your users.\r\n\r\n## 🔊 Sound Notifications\r\n\r\nThe SDK includes an optional sound notification feature that plays when the bot sends its first message.\r\n\r\n### Configuration\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  custom: {\r\n    sound: true,  // Enable sound notifications\r\n  }\r\n});\r\n```\r\n\r\n### Sound Features\r\n\r\n- **Disabled by default**: `sound: false`\r\n- **Plays only once**: Sound is reproduced only on the bot's first message\r\n- **Persistent state**: The sound state is saved in cache\r\n- **Fixed sound**: Uses the provided notification sound (cannot be modified)\r\n- **Volume control**: Plays at 50% volume for better user experience\r\n\r\n### Sound Attribution\r\n\r\nThe notification sound used in this SDK is:\r\n\r\n**Sound Effect by [Universfield](https://pixabay.com/es/users/universfield-28281460/?utm_source=link-attribution&utm_medium=referral&utm_campaign=music&utm_content=352755) from [Pixabay](https://pixabay.com/sound-effects//?utm_source=link-attribution&utm_medium=referral&utm_campaign=music&utm_content=352755)**\r\n\r\n**URL**: `https://res.cloudinary.com/dhqqkf4hy/video/upload/v1754209978/new-notification-010-352755_jjgjfu.mp3`\r\n\r\n## ⏰ Auto-Reminder System\r\n\r\nThe SDK includes an automatic reminder system that prompts the user if they haven't written anything for a configurable period.\r\n\r\n### Configuration\r\n\r\n```javascript\r\nconst chat = new ChatBot({\r\n  // ... other options\r\n  custom: {\r\n    sound: true,             // Enable sound notifications\r\n    reminderTimeout: 30000,  // 30 seconds\r\n    // reminderTimeout: 60000,  // 60 seconds (default)\r\n    // reminderTimeout: 120000, // 2 minutes\r\n  }\r\n});\r\n```\r\n\r\n### Reminder Features\r\n\r\n- **Configurable timeout**: Default is 60 seconds, can be customized\r\n- **Sound notification**: Plays notification sound when reminder is shown (if sound is enabled)\r\n- **Smart behavior**: Only works when chat is open and not in registration screen\r\n- **Waits for complete response**: Timer starts only after the bot finishes responding completely\r\n- **Streaming compatible**: Waits for typing effect to finish before starting the timer\r\n- **Auto-reset**: Timer resets every time the user sends a message\r\n- **Persistent state**: Reminder state is saved in cache\r\n- **Intelligent pausing**: Automatically pauses when chat is closed\r\n\r\n### Reminder Message\r\n\r\nWhen the timeout is reached, the bot automatically sends:\r\n> \"¿Hay algo más en lo que pueda ayudarte? 😊\"\r\n\r\n**Note**: If sound is enabled (`sound: true`), a notification sound will also play when the reminder message is shown.\r\n\r\n### Public Methods\r\n\r\n```javascript\r\n// Configure reminder timeout\r\nchat.setReminderTimeout(30000); // 30 seconds\r\n\r\n// Get reminder status\r\nconst status = chat.getReminderStatus();\r\nconsole.log(status);\r\n// {\r\n//   reminderTimeout: 30000,\r\n//   lastUserMessageTime: 1234567890,\r\n//   hasActiveTimer: true,\r\n//   timeSinceLastMessage: 45000\r\n// }\r\n```\r\n\r\n## 🔄 Recent Updates\r\n\r\n### Version 0.1.0 (Latest)\r\n\r\n- ✅ **Complete multi-language support**: All 7 languages now have full translations\r\n- ✅ **Fixed hardcoded texts**: All UI elements now use the translation system\r\n- ✅ **Enhanced test mode**: Test responses are fully translated in all languages\r\n- ✅ **Dynamic language switching**: Real-time language changes with automatic UI updates\r\n- ✅ **Improved registration system**: Better user experience with translated prompts\r\n- ✅ **Comprehensive translation coverage**: UI elements, messages, placeholders, and test responses\r\n- ✅ **No hardcoded strings**: All texts use the internationalization system\r\n\r\n### Previous Updates\r\n\r\n- ✅ **Registration screen**: Dedicated welcome screen with name collection\r\n- ✅ **Test mode**: Complete testing environment with translated responses\r\n- ✅ **Markdown support**: Full Markdown rendering in bot responses\r\n- ✅ **Streaming simulation**: Character-by-character typing effect\r\n- ✅ **Sound notifications**: Optional notification sounds\r\n- ✅ **Auto-reminder system**: Configurable reminder messages\r\n- ✅ **Development mode**: Comprehensive logging system\r\n\r\n## 🤝 Contributing\r\n\r\n1. Fork the project.\r\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`).\r\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).\r\n4. Push to the branch (`git push origin feature/AmazingFeature`).\r\n5. Open a Pull Request.\r\n\r\n## 📄 License\r\n\r\nThis project is under the ISC License. See the `LICENSE` file for more details.\r\n\r\n## 👨‍💻 Author\r\n\r\n**Bemtorres**\r\n\r\n- GitHub: [@bemtorres](https://github.com/bemtorres)\r\n\r\n## 🙏 Acknowledgments\r\n\r\n- [Bootstrap](https://getbootstrap.com/) for the CSS framework.\r\n- [Cloudinary](https://cloudinary.com/) for default image hosting.\r\n- [Universfield](https://pixabay.com/es/users/universfield-28281460/) for the notification sound effect.\r\n","readmeFilename":"README.md"}