{"_id":"@ait-kit/api-core","_rev":"9-310d8c40637ebe7d8282d53c685bc350","name":"@ait-kit/api-core","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@ait-kit/api-core","version":"0.1.0","_id":"@ait-kit/api-core@0.1.0","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"dist":{"shasum":"98fe5ee880264da99a1143ccd1aed07042dbe93c","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.1.0.tgz","fileCount":20,"integrity":"sha512-Fo/7jMpqm8FBcjaf5ljc0IwGxooR0xJguKHoM+ei2+Jy5k8WBTusa3Yfr9xfU38nq8rQsZ6yf963+Xf2Svm8xw==","signatures":[{"sig":"MEQCICWxoUidMXZuRUQmclyRKOeEG5h6+g1WdmbLthPCw089AiBD8ye+ZkElnUrAJICdw5sHMbDCt7O5RkWKh9Twii/+yQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68713},"type":"module","types":"./dist/index.d.ts","shasum":"98fe5ee880264da99a1143ccd1aed07042dbe93c","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"imjlk","email":"i@m.junglei.kim"},"_integrity":"sha512-Fo/7jMpqm8FBcjaf5ljc0IwGxooR0xJguKHoM+ei2+Jy5k8WBTusa3Yfr9xfU38nq8rQsZ6yf963+Xf2Svm8xw==","_npmVersion":"10.8.3","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.1.0_1782806817814_0.3228033298486306","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ait-kit/api-core","version":"0.1.1","_id":"@ait-kit/api-core@0.1.1","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"189809cc70aed303098b85c63e11f9abff2f2e9b","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.1.1.tgz","fileCount":20,"integrity":"sha512-Q1PDPPJluCocJsUWMnlZFeqAEDRRTJg/ssW2j2Uc4uo5Qy+ncKFGUJXOsVJdokugdA8oL+vMWzyZfnPTf6IzHg==","signatures":[{"sig":"MEQCIBJjjxb3Y7BNTwVGuCHSL8h99L+QiIN2B2Io5f+MlPcZAiAKcVqH44ylndsqZh4RpTP6VZIFzzz+tcU8IrimdcRNRQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":68986},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b104891f6ff9389e3de0f2a77585ac3d2138ba51","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git"},"_npmVersion":"11.13.0","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.1.1_1782910472318_0.6487776167133561","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ait-kit/api-core","version":"0.1.2","_id":"@ait-kit/api-core@0.1.2","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"9d9b7411d63e980632c074ffda9cd5110d5e1285","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.1.2.tgz","fileCount":20,"integrity":"sha512-53TOnGWroOAPlAR4jJDvlPm0jhE0Vynlb6fpDESb40GmDZEAIijCsriygi9PM00d3PkQL9MSAuFsHKzRXHgy3A==","signatures":[{"sig":"MEUCIQDzUWP7r+lNsAbs8JVBvCTx1sD8o1azZVxGog+scH8dmwIgYdOGzQMzda+uhuPHNT0bg/8e55vEtEem0xhOxr51Yhc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":69137},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"310a89a99fd1bcdbd37b5eaf2f9fc673c2ab49e1","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git"},"_npmVersion":"11.13.0","directories":{},"sideEffects":false,"_nodeVersion":"24.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.1.2_1782923055744_0.8662534076649744","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ait-kit/api-core","version":"0.2.0","keywords":["apps-in-toss","toss","mtls","api","typescript"],"license":"MIT","_id":"@ait-kit/api-core@0.2.0","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"367674836048a43b5201d6b920e6337decbc49bc","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.2.0.tgz","fileCount":22,"integrity":"sha512-uqokeh6BVDAhSEDxuJ75kyaZ4RHzcPApsgC5rxXqire1thwmuHZ3otZdF4uU3iqMf+Jm8xS7QElnlhnyAeCNzw==","signatures":[{"sig":"MEUCIHJSZhf9A2lEUE0meCLX5/0GWrDJFkgkgwkX276bgflsAiEA9TBF15Ua17lASZNWuWHxpd6kk2TK0OGRLzPNcdNHReo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":74795},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7be148dcf1b2fcf48193684d264cecb9c0296207","scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"_npmVersion":"11.16.0","description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.2.0_1783936009890_0.24530413349742264","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ait-kit/api-core","version":"0.3.0","keywords":["apps-in-toss","toss","mtls","api","typescript"],"license":"MIT","_id":"@ait-kit/api-core@0.3.0","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"ebc8d6b65711b1e522e5d457b6030d2ebb6de3eb","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.3.0.tgz","fileCount":26,"integrity":"sha512-R0j3EMvfzbFhe5GYKonopHiuZ19r+l+rHJ7Ul9yLka5YrTJFISUjrij2fQVbkIpmNSQWrmbXwpgG9UYcC+Mf7w==","signatures":[{"sig":"MEYCIQCMZuWCOGhYX/qfsrJMEq9CZNX4kJdCQHOyuHJ3bMZL7QIhANBPJe0T294j7gpmBrSPON6515r8H8yaWv9d6vMHwUcA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHIFygVVk8R/LHbTvRUxi91n2inbkBKM110P4e2+BoD/AiBUQbCQZ3iqm+rYyazLuaPr8m7gn4hUa0L02cspLh0p+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":117907},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"17574608ab580ca41441cea4cc12a3c4c5c7564c","scripts":{"test":"bun test test","build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"_npmVersion":"11.19.0","description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.3.0_1789476464633_0.568054800445897","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@ait-kit/api-core","version":"0.4.0","keywords":["apps-in-toss","toss","mtls","api","typescript"],"license":"MIT","_id":"@ait-kit/api-core@0.4.0","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"41ad51028b908a37f096fdaa3593123a12555fbd","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.4.0.tgz","fileCount":26,"integrity":"sha512-3XxJkgt4sW6dHrfyWepHSRofIS6GXM5bv03t1+jkB5fKDIQT3ui/jqAkd+pj3si92qjSth//oi1b8gLtwJu1gg==","signatures":[{"sig":"MEQCIE1vRw2alP/6Cplal2VciGIQPSYxinvn/KtnFQzXy1+4AiAkvyIF57pXea+CH/lBVQWAvQdaTWeWC6jVYBlT09+zZg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDrUYAcdWxSHn83ElwBjFgxEwosJaFYGK2QT73a1JojMQIgYMD3T1+d2VEoUPEfB21QgBBvXZyJzLHd/LIHp/1dZvg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":137868},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0365625b8981cbe95e9ab6af48f53775580f2591","scripts":{"test":"bun test test","build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"_npmVersion":"11.19.0","description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.4.0_1789510045229_0.7847490236988928","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@ait-kit/api-core","version":"0.4.1","keywords":["apps-in-toss","toss","mtls","api","typescript"],"license":"MIT","_id":"@ait-kit/api-core@0.4.1","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"7c73e99e10a36eb148235b9a5da2b16b941182b4","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.4.1.tgz","fileCount":26,"integrity":"sha512-9FnzGrwu26SQLKHHV5Vbw3nE2FNsjl1sP1+8HBmMtOzNVGh4HZ2c26ZqHMQR3JAeorVm844N17Qn0EhTB5eGGA==","signatures":[{"sig":"MEUCIQCISfvBgJR5+EWRV3rewbIBNvHHqvgmfxjznjW8bw64IQIgfPidqSVuEZ0A1mAv3D8zx2alX61pdxILraHMRatojU8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIDXVwceHQ/mP95Xiaq4PtLoi9wHHiwBuC94I/rbM3zJAAiBnqqizzMjgKyxWw/fYzbVgRi8+ac9Of/NVW9ON3eHAPQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":137868},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"490c5902d18b0a3dd9caeae9a1e17cf3818639c5","scripts":{"test":"bun test test","build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"_npmVersion":"11.19.0","description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.4.1_1789553206905_0.7699068218350282","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@ait-kit/api-core","version":"0.4.2","keywords":["apps-in-toss","toss","mtls","api","typescript"],"license":"MIT","_id":"@ait-kit/api-core@0.4.2","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"homepage":"https://github.com/imjlk/ait-kit#readme","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"85d8617eb26c365826457cd69f1a67961b5e197b","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.4.2.tgz","fileCount":26,"integrity":"sha512-HrBjf+wB259jqE8rQBVZft4l9er3y+uWaUVxrj6CwiXsr66yjcrJFTfJXAMjFmyQjnwnQ4nbeYcpPJ59xyF6BA==","signatures":[{"sig":"MEUCIQCglvNeEMpMT0x8gBWN10R4GrwBfzntHPezv9lD6rlkhgIgPfMvG2nDKg9H4ANI/LJ609/iK0AghvWteWksQ1s29jQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDiV7VfsnzhmU4Y+iEUC+zRdoR+4aO+rKeId4mZzjvhogIhAMeg8W4waDgPgKj1UfqYdOYvH30YLIkNdodZtY5LgoUX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":137936},"type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"566a2ac220cba19e1aa11c909624a5c3576da625","scripts":{"test":"bun test test","build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"_npmVersion":"11.19.0","description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-core_0.4.2_1789576861506_0.45026548438609004","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"_id":"@ait-kit/api-core@0.5.0","bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"dist":{"shasum":"76285049d4ccd23efaa9c02e052070c2b8e446f8","tarball":"https://registry.npmjs.org/@ait-kit/api-core/-/api-core-0.5.0.tgz","fileCount":26,"integrity":"sha512-PAURuVdPKqtjCaUupKvKjEjkp6FZNeNtTi9XA9rBlXl5VwF4cls4djdLlWR/J0VnvtPcmoT6u0UeQsM2Rx1rpA==","signatures":[{"sig":"MEUCIQCJvJV5juvSdvzSiMtHVBFpRRfN0liqix/hi36FjbCZVwIgQXti3/0wF7fsI4Nd/0cG+JpXPJ2UtScebvOVgOOtKvA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFPLFoKxuP8BXOhmSlsQbwtX6hSMNWgIg4QTNdBzDgfZAiEA7sd6Gn2ELuYjm48fpNSck2NST2cDEgTMZXnkiQke+iI="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ait-kit%2fapi-core@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":139399},"name":"@ait-kit/api-core","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"349a359c9fa613e71903946203a6ac2aff1ae2ac","license":"MIT","scripts":{"test":"bun test test","build":"rm -rf dist && tsc -p tsconfig.build.json && bun build src/index.ts --outfile dist/index.js --format esm --target browser --packages external","prepack":"bun run build","typecheck":"tsc -p tsconfig.json"},"version":"0.5.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3ee85da-e86f-4334-bbf4-6fee63fea6c1"}},"homepage":"https://github.com/imjlk/ait-kit#readme","keywords":["apps-in-toss","toss","mtls","api","typescript"],"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"_npmVersion":"11.19.0","description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","directories":{},"maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"sideEffects":false,"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/api-core_0.5.0_1789611873832_0.901133205375213"}}},"time":{"created":"2026-06-30T08:06:57.632Z","modified":"2026-09-17T02:24:34.261Z","0.1.0":"2026-06-30T08:06:57.970Z","0.1.1":"2026-07-01T12:54:32.454Z","0.1.2":"2026-07-01T16:24:15.876Z","0.2.0":"2026-07-13T09:46:50.017Z","0.3.0":"2026-09-15T12:47:44.708Z","0.4.0":"2026-09-15T22:07:25.312Z","0.4.1":"2026-09-16T10:06:46.996Z","0.4.2":"2026-09-16T16:41:01.592Z","0.5.0":"2026-09-17T02:24:33.932Z"},"bugs":{"url":"https://github.com/imjlk/ait-kit/issues"},"license":"MIT","homepage":"https://github.com/imjlk/ait-kit#readme","keywords":["apps-in-toss","toss","mtls","api","typescript"],"repository":{"url":"git+https://github.com/imjlk/ait-kit.git","type":"git","directory":"packages/api-core"},"description":"Runtime-neutral typed Apps in Toss server API adapters and mTLS transport ports.","maintainers":[{"name":"imjlk","email":"i@m.junglei.kim"}],"readme":"# @ait-kit/api-core\n\nRuntime-neutral typed adapters for Apps in Toss server APIs and mTLS transports.\n\n```bash\nnpm install @ait-kit/api-core\n```\n\n```ts\nimport { createAppsInTossApiRpcFromOptions } from \"@ait-kit/api-core\";\n\nconst tossApi = createAppsInTossApiRpcFromOptions({\n  mode: \"forward\",\n  mtlsClient\n});\n```\n\n## IAP order verification contract\n\n`iapOrderStatus` separates what the provider attested from what the caller\nasked. Grant decisions must gate on `verified`, never on `ok`:\n\n- `ok: true` — the `get-order-status` query succeeded and the provider\n  returned a well-formed payload. A payload missing the spec-required\n  `orderId` or `status` fails with `error: \"INVALID_RESPONSE\"` instead of\n  being patched up from the request. Evidence fields must be real strings:\n  an `orderId`, `status`, or present optional field (`sku`,\n  `statusDeterminedAt`, `reason`) arriving as an array, object, number, or\n  boolean is `INVALID_RESPONSE` too — coerced values are never used as\n  verification evidence. Failure envelopes (`FAIL`, `ERROR`,\n  `NETWORK_ERROR`, `TIMEOUT`) yield no evidence even when a contradictory\n  `success` payload rides along, and unrecognized `resultType` values are\n  `INVALID_RESPONSE`, never optimistic successes.\n- `verified: true` — the provider-attested status is `PAYMENT_COMPLETED` or\n  `PURCHASED` **and** the provider-returned `orderId` matches the request.\n  Response `orderId`/`sku` come exclusively from the provider payload;\n  request values are expectations, never evidence.\n- `verificationCode` — required on every unverified success:\n  `PAYMENT_INCOMPLETE` (retryable, the pending re-query flow is preserved),\n  `PAYMENT_FAILED`, `PAYMENT_REFUNDED`, `MINIAPP_MISMATCH`,\n  `ORDER_NOT_FOUND` (retryable), `ORDER_ID_MISMATCH`, `UNKNOWN_STATUS`,\n  `PROVIDER_STATUS_ERROR`, or `STUB_EVIDENCE`.\n- `skuCheck` — present when the caller passes an expected `sku`:\n  `MATCHED`, `MISMATCHED`, or `NOT_PROVIDED`. The provider `sku` is optional\n  in the official API, so a missing SKU never flips `verified`; there is no\n  supplementary lookup endpoint, so incomplete evidence on a payable status\n  can only be re-queried through this same call.\n- `stub: true` — marks synthetic stub-mode output. Stub responses fabricate\n  a `PAYMENT_COMPLETED` order for development but are never `verified`\n  (`verificationCode: \"STUB_EVIDENCE\"`), so a deployment that accidentally\n  runs in stub mode cannot grant purchases on fabricated data. Development\n  flows that want to exercise grant logic must explicitly opt in by checking\n  `stub: true`.\n\nGrant gating example — `verified` alone confirms a payable order for the\nrequested order ID; when your catalog expects a specific product, also\nrequire the SKU comparison before crediting:\n\n```ts\nconst result = await tossApi.iapOrderStatus({ orderId, sku: \"SKU_100_COINS\" });\nif (!result.ok) {\n  // The lookup itself failed (transport, provider error, INVALID_RESPONSE):\n  // no grant decision can be made from this response.\n  throw new Error(`order status lookup failed: ${result.failureReason ?? result.error}`);\n}\n\n// verified: provider attests a payable status for THIS order.\n// skuCheck: the product evidence matches what the caller expects.\nconst grantable =\n  result.verified === true && !result.stub && result.skuCheck?.status === \"MATCHED\";\n// NOT_PROVIDED means the provider omitted SKU evidence: the order is paid,\n// but which product it bought is unconfirmed — decide explicitly.\n```\n\n## Message recipients\n\n`normalizeMessageRecipient` turns legacy `{ userKey, tossUserKey, anonKey }`\ninputs into a single `MessageRecipient` (`{ kind: \"user\", userKey }` or\n`{ kind: \"anonymous\", anonKey }`). Exactly one identifier must be supplied:\nrequests with none, more than one, values of the wrong type, or empty\nstrings are rejected (`INVALID_MESSAGE_RECIPIENT` for single sends,\n`INVALID_CONTEXT_RECIPIENT` for bulk `contextList` items) — identically in\nstub and forward mode. Each API converts the recipient itself:\n\n- **Single (and test) sends** carry the recipient in request headers:\n  `x-toss-user-key` for user recipients, `x-anon-key` for anonymous ones.\n  (Earlier releases emitted `x-user-key`, which the official API does not\n  define; consumer proxy code that rewrote the header can now be removed.)\n- **Bulk sends** carry recipients in `contextList` body fields (`userKey` /\n  `anonKey`), never in headers.\n\n## Smart message send results\n\n`smartMessageSend` / `smartMessageBulkSend` only report success from\nsend-result evidence the provider actually returned. `providerStatus`\ncarries three meanings:\n\n- `\"SENT\"` — the send result contained real counts (an explicit `msgCount`\n  of `0` included) or channel counts confirming delivery.\n- `\"FAILED\"` — a definite failure: explicit failure entries on a zero-send\n  result, a `FAIL`/`ERROR` envelope, or a 4xx rejection. `providerErrorCode`\n  mirrors a code the provider returned; channel results, failure reasons,\n  and `contentIds` are preserved for partial successes.\n- `\"UNKNOWN\"` — the outcome could not be determined: an evidence-free body\n  (empty object, HTML error page, `SUCCESS` envelope without a send\n  result), wrong-typed counts, an unrecognized or outcome-ambiguous\n  `resultType` (`NETWORK_ERROR`, `TIMEOUT`), or a 5xx response. These\n  carry the internal `error: \"INVALID_RESPONSE\"` marker (parse/validation)\n  and keep `providerRequestId` correlation, but never a fabricated\n  `sentAt`. The message may or may not have been delivered: resolve the\n  state out of band — do not assert non-delivery and do not auto-resend on\n  this signal alone.\n\nThe same evidence rule applies to single and bulk sends, and to\nalready-normalized responses (only this module's own `SENT`/`FAILED`\nvocabulary round-trips; anything else is `UNKNOWN`).\n\n## Anonymous keys and verification\n\n`verifyAnonKey` calls `POST /api-partner/v1/apps-in-toss/users/anon-key/verify`\nwith the key in the `x-anon-key` header. Results are tri-state:\n\n- `{ ok: true, valid: true }` / `{ ok: true, valid: false }` — definitive\n  provider verdicts.\n- `{ ok: false, ... }` (`ProviderFailure`) — no verdict was obtained\n  (transport failure, non-2xx, FAIL envelope such as errorCode `4010`,\n  malformed response). Never translate this into `valid: false`.\n\n**Prefixes:** the SDK's `getAnonymousKey()` resolves to `{ type: \"HASH\",\nhash }` and the `hash` value is the key. Server APIs expect exactly that\nvalue. Applications that decorate stored identifiers with their own prefix\n(for example `anon:` or `anonymous-`) must strip their own prefix before\ncalling; the kit transmits keys byte-for-byte and never adds or removes\nprefixes in either direction.\n\n## Recoverable promotion grants\n\n`promotionRewardGrant` (legacy) chains key issuance, execution, and a result\nlookup in one call. The explicit three-step flow decouples them so your\ndatabase sits between the phases:\n\n```ts\n// The recipient identity the grant is for — exactly one of userKey /\n// tossUserKey / anonKey, the same value you will execute with. Strip your\n// own storage prefix first; the kit transmits identifiers byte-for-byte.\nconst recipientKey = \"anon:stored-hash\"; // your app-prefixed storage form\nconst recipientAnonKey = recipientKey.replace(/^anon:/, \"\");\n\n// 1. Issue a transaction key for that recipient. Prepare carries the\n//    recipient as the single identity header and sends no request body;\n//    a call with a missing, duplicated, or malformed recipient is rejected\n//    before anything is dispatched.\nconst prepared = await tossApi.promotionPrepareReward({ anonKey: recipientAnonKey });\nif (!prepared.ok) throw new Error(prepared.failureReason);\n\n// 2. Persist the key BEFORE executing. Bind it to the owner, the recipient\n//    identifier you prepared with, the promotion code, the amount, and\n//    your own request id — see the storage guidance below.\nawait db.promotionGrants.insert({\n  providerTransactionKey: prepared.providerTransactionKey,\n  ownerId: session.userId,          // who initiated the grant\n  recipientKey,                     // exactly what you prepared with\n  promotionCode: \"WELCOME_EVENT\",\n  amount: 1000,\n  requestId: request.id,            // your idempotency/tracing id\n  stage: \"PREPARED\"\n});\n\n// 3. Execute the grant with the stored key and the SAME recipient.\nconst executed = await tossApi.promotionExecuteReward({\n  providerTransactionKey: prepared.providerTransactionKey,\n  promotionCode: \"WELCOME_EVENT\",\n  amount: 1000,\n  anonKey: recipientAnonKey // or userKey / tossUserKey\n});\n\n// 4. Confirm the outcome. If step 3 crashed or returned UNKNOWN, re-run\n//    only this step — status issues no keys and executes no grants.\nconst status = await tossApi.promotionRewardStatus({\n  providerTransactionKey: prepared.providerTransactionKey,\n  promotionCode: \"WELCOME_EVENT\",\n  anonKey: recipientAnonKey\n});\n// status.status: \"GRANTED\" | \"PENDING\" | \"FAILED\" | \"NOT_FOUND\" | \"UNKNOWN\"\n```\n\n### Outcome semantics\n\n- `SUBMITTED` (execute) means the provider accepted the request — confirm\n  with the status step; it is not the final grant state.\n- `UNKNOWN` means no verdict was obtained: transport failures, 5xx, or\n  unparseable responses. The transaction key is always preserved so you can\n  resolve the outcome with a status query. **Never** treat `UNKNOWN` as a\n  definite failure, and do not automatically re-execute: the provider\n  rejects same-key re-execution with error 4113 (\"already granted/\n  retracted\"), but the official contract does not document idempotency for\n  repeated execution.\n- Explicit failures (execute `ok: false`, status `\"FAILED\"`) come only from\n  a provider verdict — FAIL envelopes with error codes, 4xx, or the\n  documented `FAILED` status (the provider rolls back the used budget).\n- `\"NOT_FOUND\"` is the documented error 4111: no grant record exists for\n  the key (never executed, or the record is gone).\n- The official API supplies **no grant timestamp and no documented key\n  expiry**. Status responses report `checkedAt` (when you observed the\n  status) and never fabricate a `grantedAt` from your request time.\n- Passing a request identifier of your own does **not** make an external\n  grant idempotent — treat it as tracing metadata only.\n\n### Consumer responsibilities\n\nThe provider only deduplicates by transaction key. Your application owns:\n\n- **Storage**: save the key bound to the owner, recipient identifier,\n  promotion code, amount, and your request id before executing, so a lost\n  execute response can always be resolved against what you intended to do.\n- **Ownership checks**: verify the caller owns the stored grant before\n  executing or polling it.\n- **Concurrency control**: prevent two executes for the same key from\n  racing (the legacy 4113 rejection is the provider's backstop, not a\n  contract).\n- **Ledger updates**: credit balances only on `GRANTED`, and design\n  `UNKNOWN` handling (retry the status query with backoff) rather than\n  guessing.\n\nThe legacy `promotionRewardGrant` keeps its original behavior, including\ntreating a caller-supplied `providerTransactionKey` as a result lookup\nonly — passing an existing key never triggers an execute through that API.\n\nSee the [AIT Kit repository](https://github.com/imjlk/ait-kit) for supported APIs, Cloudflare\nbindings, examples, and release notes.\n","readmeFilename":"README.md"}