{"_id":"@arcolab/arcoseo-client","_rev":"3-13330d04b6990fcb610ffe796fbfc167","name":"@arcolab/arcoseo-client","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@arcolab/arcoseo-client","version":"0.1.0","license":"UNLICENSED","_id":"@arcolab/arcoseo-client@0.1.0","maintainers":[{"name":"arcolabs","email":"huikai@arco.video"}],"homepage":"https://github.com/arcolabs/arcoseo#readme","bugs":{"url":"https://github.com/arcolabs/arcoseo/issues"},"dist":{"shasum":"8c8bd90127d7e6203c4bc77e57789a16433dd5c5","tarball":"https://registry.npmjs.org/@arcolab/arcoseo-client/-/arcoseo-client-0.1.0.tgz","fileCount":4,"integrity":"sha512-DTsNPbAtQIiTOHR97TD1X+L5J+iqj8N+ENaibUDrX1lJe98D+0IQuQ5rb7IQzoTvmUj1Lt2WZu/d9Cb5Wt/LJw==","signatures":[{"sig":"MEUCIFJdnuC/Jn8MdiwnzFdBblJtDx8tR9RpN0gJFFe8CofmAiEArMKe3lYnFOPqZOib2OXRHvoS3J6HPY8qfHTa2TkirNM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18042},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"e14158ae9392d52eaf1abafe6bcd698efe1510c3","scripts":{"build":"../../node_modules/.bin/tsup","check":"node ./check-dist.mjs","prepublishOnly":"npm run build && npm run check"},"_npmUser":{"name":"arcolabs","email":"huikai@arco.video"},"repository":{"url":"git+https://github.com/arcolabs/arcoseo.git","type":"git","directory":"packages/client"},"_npmVersion":"10.9.4","description":"Typed HTTP client for arcoseo — the multi-tenant content service.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/arcoseo-client_0.1.0_1783934882480_0.8282463863440737","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@arcolab/arcoseo-client","version":"0.2.0","license":"UNLICENSED","_id":"@arcolab/arcoseo-client@0.2.0","maintainers":[{"name":"arcolabs","email":"huikai@arco.video"}],"homepage":"https://github.com/arcolabs/arcoseo#readme","bugs":{"url":"https://github.com/arcolabs/arcoseo/issues"},"dist":{"shasum":"7848af2dabc0c7d99cd543bd767f0a4b9282ae23","tarball":"https://registry.npmjs.org/@arcolab/arcoseo-client/-/arcoseo-client-0.2.0.tgz","fileCount":4,"integrity":"sha512-Aa0fNwNAPKsNqviUmEtDaJm5LKug+FpBhbA8a/UCPV9sqy7efbq4epuGieOmQsC2ukwHbELpulvsLgjfssSK1w==","signatures":[{"sig":"MEUCIQD5W5p/ZpuZ6u2wnInOcaADwumS9FSi+496+SXur8otiQIgf5M8Q9e/IE2WQ8cv9Y4o1lSCIXC6E2p5Erbe/LaYHYc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18732},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"791923a625c738924e04e4205dba66f2933d3f70","scripts":{"build":"../../node_modules/.bin/tsup","check":"node ./check-dist.mjs","prepublishOnly":"npm run build && npm run check"},"_npmUser":{"name":"arcolabs","email":"huikai@arco.video"},"repository":{"url":"git+https://github.com/arcolabs/arcoseo.git","type":"git","directory":"packages/client"},"_npmVersion":"10.9.4","description":"Typed HTTP client for arcoseo — the multi-tenant content service.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/arcoseo-client_0.2.0_1783936580427_0.17272775627501713","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@arcolab/arcoseo-client","version":"0.3.0","description":"Typed HTTP client for arcoseo — the multi-tenant content service.","type":"module","license":"UNLICENSED","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"build":"../../node_modules/.bin/tsup","check":"node ./check-dist.mjs","prepublishOnly":"npm run build && npm run check"},"repository":{"type":"git","url":"git+https://github.com/arcolabs/arcoseo.git","directory":"packages/client"},"_id":"@arcolab/arcoseo-client@0.3.0","gitHead":"287e16268f339b86cead71dbd8ba20274f1226dd","bugs":{"url":"https://github.com/arcolabs/arcoseo/issues"},"homepage":"https://github.com/arcolabs/arcoseo#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-+uSOjjU2mDlfqSmsazKur+xpytmULQrKzGTBNR4JHysa/4jxVMkHVubCTAAlA/SgQwyldKVz5C6xK7PwsEmt9A==","shasum":"0db7d4828a0c76181a23991c4beb6097a645de44","tarball":"https://registry.npmjs.org/@arcolab/arcoseo-client/-/arcoseo-client-0.3.0.tgz","fileCount":4,"unpackedSize":20561,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBv9t1qtq/IKLB5GMhj+S2lkAjE61V18XOzHekOWNksIAiEAlqt0a0Tuf8p0DNQRBh4YziY6FFfinF8I3tA/YmxG+sQ="}]},"_npmUser":{"name":"arcolabs","email":"huikai@arco.video"},"directories":{},"maintainers":[{"name":"arcolabs","email":"huikai@arco.video"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/arcoseo-client_0.3.0_1784045435248_0.4024239119881854"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-13T09:28:02.292Z","modified":"2026-07-14T16:10:35.521Z","0.1.0":"2026-07-13T09:28:02.611Z","0.2.0":"2026-07-13T09:56:20.564Z","0.3.0":"2026-07-14T16:10:35.395Z"},"bugs":{"url":"https://github.com/arcolabs/arcoseo/issues"},"license":"UNLICENSED","homepage":"https://github.com/arcolabs/arcoseo#readme","repository":{"type":"git","url":"git+https://github.com/arcolabs/arcoseo.git","directory":"packages/client"},"description":"Typed HTTP client for arcoseo — the multi-tenant content service.","maintainers":[{"name":"arcolabs","email":"huikai@arco.video"}],"readme":"# `@arcolab/arcoseo-client`\n\nThe typed HTTP client for **arcoseo**, our multi-tenant content service. A site installs this; it does not\ninstall arcoseo.\n\n```bash\nnpm install @arcolab/arcoseo-client\n```\n\n```ts\nimport { createClient } from '@arcolab/arcoseo-client'\n\nconst cms = createClient({\n  baseUrl: process.env.ARCOSEO_URL!,   // https://tinypost.wiki\n  apiKey: process.env.ARCOSEO_KEY!,    // a reader key — SERVER-SIDE ONLY\n})\n\nconst page = await cms.getBySlug({ site: 'zh-cn', slug: 'chatgpt-china', contentType: 'blog_post' })\nconst list = await cms.listContent({ site: 'zh-cn', contentType: 'blog_post', sort: '-publishedAt' })\nconst urls = await cms.getIndexable({ site: 'zh-cn' })   // for your sitemap\n```\n\n## Three things to get right\n\n**The API key is a server secret.** It is a tenant's credential, not a public token — anything holding it\ncan read that tenant's content. Never expose it to a browser bundle (no `VITE_`/`NEXT_PUBLIC_` prefix, no\nclient component). Call this client from a server route, a loader, or a server function.\n\n**There is no `tenant` argument, and there never will be.** The tenant lives inside the key. An argument\nwould imply the server might honour one.\n\n**`getBySlug` needs a `contentType`.** A slug is unique within a content type, not within a site —\n`/blog/onboarding` and `/resources/onboarding` are different URLs and may both be live. Your `/blog/$slug`\nroute knows it wants a blog post; say so, or the answer is whichever row the index reached first.\n\n**A missing page is `null`. A broken service THROWS.** Do not collapse the two. A client that turns \"arcoseo\nis down\" into \"this page does not exist\" will serve a 404 to Google and delist a page that was fine. If a\nread throws, let it 500 — a 500 tells a crawler to come back, a 404 tells it to forget.\n\n## Errors\n\nFailures are `ArcoseoClientError` and carry the service's stable machine-readable `code`. Branch on the\ncode, never on a substring of the message:\n\n```ts\ncatch (err) {\n  if (err instanceof ArcoseoClientError && err.code === 'VERSION_CONFLICT') { /* someone else edited */ }\n}\n```\n\n## Versioning\n\nThe contract is the service's **`/v1` HTTP API**, not this package. The client is a thin `fetch` wrapper\nover it with zero runtime dependencies — an older client talking to a newer service simply does not know\nabout endpoints added since; it does not break.\n","readmeFilename":"README.md"}