{"_id":"@1kairoos/aics-core","_rev":"9-657994ce66f9859ad2b883e27ef5e8f7","name":"@1kairoos/aics-core","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@1kairoos/aics-core","version":"0.1.0","keywords":["kurly","aics","chat","sdk"],"license":"UNLICENSED","_id":"@1kairoos/aics-core@0.1.0","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"dist":{"shasum":"73793d3b8754e4a89d5bb3ceac829430ae5f9664","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.1.0.tgz","fileCount":6,"integrity":"sha512-mRHFbSNWJ/Xl4TBy7Kk/pA4jOylMuO0tvBl9huUuGodVIVaehyBC5ias/t1pOaONuY6Q30k6DyFRkfhrAq/jkQ==","signatures":[{"sig":"MEYCIQCKbjjfsRlx7fI17yoLlbOer/ij1uwuUzDttdyIUVi81gIhANBYIdG4+a06IegnXH1LMhM+B+8Hm941pxMZI1ftn7uo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186741},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"7938423ca6544f9d049b7e48b720d6c0b5e9d92b","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"_npmVersion":"10.9.4","description":"Headless client for the Kurly AICS chat SDK internal alpha.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@rails/actioncable":"^8.0.200"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aics-core_0.1.0_1777284610042_0.25247805754151664","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@1kairoos/aics-core","version":"0.1.1","keywords":["kurly","aics","chat","sdk"],"license":"UNLICENSED","_id":"@1kairoos/aics-core@0.1.1","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"dist":{"shasum":"8b28f22dc8b9c5b8f9e7cdbb6139c62cd5918c6c","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.1.1.tgz","fileCount":6,"integrity":"sha512-ml7U0ZIvraqmQFWj9ZwiW7dhv4mmMjwCdIKr9GymTy+W7q7l9tDzwgk4ICgZqfj1BInofICkxE+jtAi7FZ+xdw==","signatures":[{"sig":"MEYCIQCaKsKYUFKx8VWflcl2xW6Xh50b3sAOTF7dUoxwiCsPFgIhAOGGWjpO8dFvNx7pIvIAKjeOsh/QAtZ3LasckGdDg/js","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":195632},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ddebae3fb23825c94fc329d602a31ebfff2d1cda","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"_npmVersion":"10.9.4","description":"Headless client for the Kurly AICS chat SDK internal alpha.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@rails/actioncable":"^8.0.200"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aics-core_0.1.1_1777304660754_0.29003289691709067","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@1kairoos/aics-core","version":"0.1.2","keywords":["kurly","aics","chat","sdk"],"license":"UNLICENSED","_id":"@1kairoos/aics-core@0.1.2","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"dist":{"shasum":"8f5c2f5c86971a0a9d34b78688c0784c2319730c","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.1.2.tgz","fileCount":6,"integrity":"sha512-WT4mucxM9wgrPKfrVqSrX/TAGJtv2vRsWYeNBiptgTAQyp3AYYgesq9cA4IEeuP+qNiLT9bUwDMimUxvEVNJVg==","signatures":[{"sig":"MEUCIQDNaYYoi9VUHaDvC5bxSS6/kfZxljHTT/B+XyiHRWQwxQIgCDoCNf5y2ElbyqDYFiq2IR190xj/68fSQOOXPVk5pMM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":212929},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a9a62bfed88bf5534450ba0575b55b0282bd1d7e","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"_npmVersion":"10.9.4","description":"Headless client for the Kurly AICS chat SDK internal alpha.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@rails/actioncable":"^8.0.200"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aics-core_0.1.2_1777331340357_0.04308928254669375","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@1kairoos/aics-core","version":"0.1.3","keywords":["aics","chat","sdk"],"license":"UNLICENSED","_id":"@1kairoos/aics-core@0.1.3","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"dist":{"shasum":"b45ed98e915ad539265f4f10606c3390098575fe","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.1.3.tgz","fileCount":6,"integrity":"sha512-biHFIj5eJlg95yW2fvdlHcOrRw4cNhBTUTpjZM7NBFjDUK00RWAAYD1krNu+DGJvHQEHxFh5nHyPBT+lAj/96Q==","signatures":[{"sig":"MEQCIHl03dI6nClZCC2tFzG4IOxgo4SphZKMTL/ReJKLyF8qAiA7kfVp+R02tfBpgtlNng4fZtMv7/Usihlxhg1TCaMxCg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":212682},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a9a62bfed88bf5534450ba0575b55b0282bd1d7e","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"_npmVersion":"10.9.4","description":"Headless client for AICS chat integrations.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@rails/actioncable":"^8.0.200"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aics-core_0.1.3_1777331911344_0.23962790469205464","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@1kairoos/aics-core","version":"0.1.4","keywords":["aics","chat","sdk"],"license":"UNLICENSED","_id":"@1kairoos/aics-core@0.1.4","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"dist":{"shasum":"0d871843688c9e5f233cb867ba280ccd8d44610d","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.1.4.tgz","fileCount":6,"integrity":"sha512-OVgvwq+a0upeGhUompzeQ75dAIFdTygLj7EYBwFXV9WpiWn/KhibDAFL3vER3ym/NVLPh1ja/l3IpwHYdDFpGA==","signatures":[{"sig":"MEQCIBpIP3RkoRY0rvDZulXXLHjWMsa+xCvOPQtSEmKiNsPgAiBEpJL8SiTjIbHjQLRAtdUOCS95Gv8zbnPNWfTdi3BXaw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":213036},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"6b891faf2f86c9c918ea43198b0e2e1f317861c4","scripts":{"test":"npm run build && node --test test","build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"_npmVersion":"11.2.0","description":"Headless client for AICS chat integrations.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.0","dependencies":{"@rails/actioncable":"^8.0.200"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aics-core_0.1.4_1778053928951_0.4850691508157856","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@1kairoos/aics-core","version":"0.2.0","keywords":["aics","chat","sdk"],"license":"UNLICENSED","_id":"@1kairoos/aics-core@0.2.0","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"dist":{"shasum":"dd122d36d9d2cbecf368aac740a501d4773d7e7b","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.2.0.tgz","fileCount":6,"integrity":"sha512-un5uMupzcCiQ4Ou0wpDqN9DGSNObjhq1t2pb0T0oKacZQUD2sGfh8t+3Oji+urR3FpPF5U6lqDflO4Al/vJ67w==","signatures":[{"sig":"MEUCIQDGCUOZtdkkYU7NPNvYvLM6u2iub9bLlEpHc228ZSMuwgIgIOG/w3jxERG4qdRniKRJ9wSnT92do6cRDkAHAMGJ4L0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":227464},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"a27d38bd29aa5e515b89473fcaefbab1b947b252","scripts":{"test":"npm run build && node --test test","build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"_npmVersion":"11.7.0","description":"Headless client for AICS chat integrations.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"@rails/actioncable":"^8.0.200"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aics-core_0.2.0_1780029470873_0.765511773144737","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@1kairoos/aics-core","version":"0.2.1","description":"Headless client for AICS chat integrations.","license":"UNLICENSED","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts","prepack":"npm run build","test":"npm run build && node --test test/client-api.test.mjs test/normalize.test.mjs","typecheck":"tsc --noEmit -p tsconfig.json"},"publishConfig":{"access":"public"},"keywords":["aics","chat","sdk"],"dependencies":{"@rails/actioncable":"^8.0.200"},"_id":"@1kairoos/aics-core@0.2.1","_nodeVersion":"20.19.5","_npmVersion":"11.7.0","dist":{"integrity":"sha512-O4YmNwb0nDxUBJpKSo6ip4nAtXbiT8X72qyfhTXbLH3uEGZ1/AfyQqCXZhGj6flGt4atOqfzimtkAj856Tw8lg==","shasum":"1d9728417e4d08a1e09997c2e7e51906cd0fa276","tarball":"https://registry.npmjs.org/@1kairoos/aics-core/-/aics-core-0.2.1.tgz","fileCount":6,"unpackedSize":227550,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDQL5QqkBIL0j8lDSsnNiullp7f9NFPf8jktBCkCjwjwwIgEx9C4CUF+vl8biiwkirhPbK9gOQcm3psanbzoINTFpY="}]},"_npmUser":{"name":"robyoon","email":"rob@1zlabs.com"},"directories":{},"maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aics-core_0.2.1_1785566735404_0.5207081499347053"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-27T10:10:09.906Z","modified":"2026-08-01T06:45:35.728Z","0.1.0":"2026-04-27T10:10:10.223Z","0.1.1":"2026-04-27T15:44:20.886Z","0.1.2":"2026-04-27T23:09:00.508Z","0.1.3":"2026-04-27T23:18:31.468Z","0.1.4":"2026-05-06T07:52:09.106Z","0.2.0":"2026-05-29T04:37:51.000Z","0.2.1":"2026-08-01T06:45:35.542Z"},"license":"UNLICENSED","keywords":["aics","chat","sdk"],"description":"Headless client for AICS chat integrations.","maintainers":[{"name":"robyoon","email":"rob@1zlabs.com"}],"readme":"# @1kairoos/aics-core\n\nHeadless TypeScript client for AICS chat integrations.\n\n## Install\n\nThis package is distributed as a public npm package.\n\n```bash\nnpm install @1kairoos/aics-core\n```\n\n## Target Runtime\n\n```ts\nimport { createAicsClient } from \"@1kairoos/aics-core\";\n\nconst client = createAicsClient({\n  endpoint: {\n    apiBaseUrl: \"https://api.example.com\",\n    tokenExchangeUrl: \"https://api.example.com/aics/token/verify\",\n    wsUrl: \"wss://api.example.com/cable\"\n  },\n  session: {\n    mode: \"host_managed\",\n    getChatJoinToken: async () => {\n      const response = await fetch(\"/chat/join-token\");\n      return response.json();\n    }\n  }\n});\n```\n\nThe host application should provide a short-lived `chatJoinToken`. The SDK\nthen exchanges it for a runtime session token and uses that token for REST and\nWebSocket calls.\n\n## Session lookup\n\n```ts\nconst session = await client.getSession();\nconsole.log(session.session.conversationStatus);\n```\n\n## Close or cancel live-chat waiting\n\n```ts\nawait client.closeSession({ reason: \"USER_CLOSE\" });\n\nconst result = await client.closeSession({\n  reason: \"cancel_livechat_waiting\"\n});\n\nif (!result.closed && result.canceledHandoff) {\n  console.log(result.conversationStatus); // usually \"AI_ANSWERED\"\n}\n```\n\n`cancel_livechat_waiting` does not end the chat session. The SDK emits\n`handoff.canceled` and restores the AI conversation status.\n\n## Attachments\n\n```ts\nimport { AICS_ATTACHMENT_POLICY } from \"@1kairoos/aics-core\";\n\nconsole.log(AICS_ATTACHMENT_POLICY.allowedMimeTypes);\n```\n\nDefault attachment policy is JPEG/PNG/WebP, 10 MB per file, and 3 files per\nmessage.\n\n## Satisfaction survey\n\n```ts\nclient.on(\"survey.inline_footer\", async (event) => {\n  await client.submitSurvey({\n    surveyId: event.payload.surveyId,\n    score: \"satisfied\",\n    closeSession: event.payload.closeOnSubmit,\n    source: \"inline_footer\"\n  });\n});\n\nclient.on(\"survey.requested\", async (event) => {\n  await client.submitSurvey({\n    surveyId: event.payload.surveyId,\n    score: \"satisfied\",\n    comment: \"Resolved quickly.\"\n  });\n});\n```\n\n## Typing\n\n```ts\nawait client.sendTyping({ isTyping: true });\nawait client.sendTyping({ isTyping: false });\n```\n\nThis package is intended for controlled integration environments.\n","readmeFilename":"README.md"}