{"_id":"@dscodotco/sdk","_rev":"3-88b821b50c3536d95ff20a2d1ceebea9","name":"@dscodotco/sdk","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@dscodotco/sdk","version":"0.0.1","license":"MIT","_id":"@dscodotco/sdk@0.0.1","maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"homepage":"https://github.com/ruopro/flightdeck#readme","bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"dist":{"shasum":"fbf6095e2a75278a526a05439d062902dcfa6958","tarball":"https://registry.npmjs.org/@dscodotco/sdk/-/sdk-0.0.1.tgz","fileCount":9,"integrity":"sha512-BI7hS7MJlUrcBeseKFW88eQYfhqJMnzTo1Bt40MOuTLthjmkaqhx3xnURWuoEMHQhQZY7+5/sunhsVHKcc2w2w==","signatures":[{"sig":"MEUCIQDqXfP7IiHdW58N3+ur2PxmNYl4fdZalb43Z/m8/vOFmAIgME60+XR+xw+9I4+IR7z2SK4ezFU7F1M3dQ3VJ+23P3M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":732173},"main":"./dist/index.cjs","type":"module","_from":"file:dscodotco-sdk-0.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","development":"./src/index.ts"}},"scripts":{"gen":"openapi-typescript ../../openapi.json -o src/types.generated.ts","test":"node --test --import tsx src/*.test.ts","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"williamk","email":"wkasel@gmail.com"},"_resolved":"/private/var/folders/gd/tyl93m8j5j30dvbb98j87smc0000gn/T/d51068e94949bda5fc8c957cc83984b5/dscodotco-sdk-0.0.1.tgz","_integrity":"sha512-BI7hS7MJlUrcBeseKFW88eQYfhqJMnzTo1Bt40MOuTLthjmkaqhx3xnURWuoEMHQhQZY7+5/sunhsVHKcc2w2w==","repository":{"url":"git+https://github.com/ruopro/flightdeck.git","type":"git","directory":"packages/sdk"},"_npmVersion":"10.9.4","description":"Typed TypeScript client for the RUO Pro / Flightdeck commerce API — operator + storefront clients, generated from the OpenAPI spec.","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.5.0","typescript":"^5.7.0","@types/node":"^22.10.0","openapi-typescript":"^7.4.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.0.1_1789151774471_0.0069345061147843","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@dscodotco/sdk","version":"0.0.2","license":"MIT","_id":"@dscodotco/sdk@0.0.2","maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"homepage":"https://github.com/ruopro/flightdeck#readme","bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"dist":{"shasum":"0a2760fe9a71a1b3e6dc6229fe7fadf8d8661e2d","tarball":"https://registry.npmjs.org/@dscodotco/sdk/-/sdk-0.0.2.tgz","fileCount":9,"integrity":"sha512-OYNbk3WtNWoeGUcu6ZmFT3cQJLnYc5rcrCqN2HE5B/95Z6vWI1BcUyYLfjFhORxwprV2LQVxLmc7PQM+WmLpaw==","signatures":[{"sig":"MEYCIQCyYNzcE5uKUDQTa/cC/HBXOMjpR8X6UEls1mMG5wRuLwIhAIg6V0NF4CTsbzQUJiZxl6/Bh3VM7lLDNZqclRs+N6JK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":732134},"main":"./dist/index.cjs","type":"module","_from":"file:dscodotco-sdk-0.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"gen":"openapi-typescript ../../openapi.json -o src/types.generated.ts","test":"node --test --import tsx src/*.test.ts","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"williamk","email":"wkasel@gmail.com"},"_resolved":"/private/var/folders/gd/tyl93m8j5j30dvbb98j87smc0000gn/T/26563599aabc8ae099e32bb6246b8371/dscodotco-sdk-0.0.2.tgz","_integrity":"sha512-OYNbk3WtNWoeGUcu6ZmFT3cQJLnYc5rcrCqN2HE5B/95Z6vWI1BcUyYLfjFhORxwprV2LQVxLmc7PQM+WmLpaw==","repository":{"url":"git+https://github.com/ruopro/flightdeck.git","type":"git","directory":"packages/sdk"},"_npmVersion":"10.9.4","description":"Typed TypeScript client for the RUO Pro / Flightdeck commerce API — operator + storefront clients, generated from the OpenAPI spec.","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.5.0","typescript":"^5.7.0","@types/node":"^22.10.0","openapi-typescript":"^7.4.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.0.2_1789172160508_0.12423283099578897","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@dscodotco/sdk","version":"0.0.3","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"devDependencies":{"@types/node":"^22.10.0","openapi-typescript":"^7.4.0","tsup":"^8.5.0","tsx":"^4.19.0","typescript":"^5.7.0"},"description":"Typed TypeScript client for the RUO Pro / Flightdeck commerce API — operator + storefront clients, generated from the OpenAPI spec.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/ruopro/flightdeck.git","directory":"packages/sdk"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"node --test --import tsx src/*.test.ts","gen":"openapi-typescript ../../openapi.json -o src/types.generated.ts"},"_id":"@dscodotco/sdk@0.0.3","bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"homepage":"https://github.com/ruopro/flightdeck#readme","_integrity":"sha512-U21IWvXNAHeYSopbDiNRE/XAnrX+vdSdv6jKllbrgkpsUxvhaeuESALNZYp4WFMaf76H50gnP8O2IQITVwWlWQ==","_resolved":"/private/var/folders/gd/tyl93m8j5j30dvbb98j87smc0000gn/T/63c6310765888fbbc64312409199ca6c/dscodotco-sdk-0.0.3.tgz","_from":"file:dscodotco-sdk-0.0.3.tgz","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-U21IWvXNAHeYSopbDiNRE/XAnrX+vdSdv6jKllbrgkpsUxvhaeuESALNZYp4WFMaf76H50gnP8O2IQITVwWlWQ==","shasum":"243fc47bb3e692072216d82b8f02a42300709a28","tarball":"https://registry.npmjs.org/@dscodotco/sdk/-/sdk-0.0.3.tgz","fileCount":9,"unpackedSize":732384,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr68R9iT72mTgn0poxpya9NrsTxznz/njbZlIuOyIRlgIgXD6UQHiVs2tH0BXvWpehQCLHRVLX2omuDBZku+StCpI="}]},"_npmUser":{"name":"williamk","email":"wkasel@gmail.com"},"directories":{},"maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.0.3_1789360632158_0.9989299863123045"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-11T18:36:14.248Z","modified":"2026-09-14T04:37:12.454Z","0.0.1":"2026-09-11T18:36:14.642Z","0.0.2":"2026-09-12T00:16:00.652Z","0.0.3":"2026-09-14T04:37:12.317Z"},"bugs":{"url":"https://github.com/ruopro/flightdeck/issues"},"license":"MIT","homepage":"https://github.com/ruopro/flightdeck#readme","repository":{"type":"git","url":"git+https://github.com/ruopro/flightdeck.git","directory":"packages/sdk"},"description":"Typed TypeScript client for the RUO Pro / Flightdeck commerce API — operator + storefront clients, generated from the OpenAPI spec.","maintainers":[{"name":"williamk","email":"wkasel@gmail.com"}],"readme":"# @dscodotco/sdk\n\nTyped TypeScript client for the RUO Pro / Flightdeck commerce platform — a low-level operation client and a tenant-pinned storefront client, fully typed from the platform's OpenAPI spec.\n\n```bash\nnpm install @dscodotco/sdk\n```\n\n## Storefront client\n\nThe client a custom storefront (Next.js, Remix, anything server-side) uses. It is pinned to one tenant and authenticated with the narrow storefront credential — SERVER-SIDE ONLY; the token must never ship in a browser bundle.\n\n```ts\nimport { createStorefrontClient } from \"@dscodotco/sdk\";\n\nconst store = createStorefrontClient({\n  apiUrl: process.env.FLIGHTDECK_API_URL,          // e.g. https://api.ruo.pro\n  tenant: process.env.FLIGHTDECK_TENANT,           // e.g. \"ruo-demo\"\n  storefrontToken: process.env.FLIGHTDECK_STOREFRONT_TOKEN, // x-storefront-token\n});\n\nconst { products } = await store.products.list({ limit: 24 });\nconst product = await store.products.get(\"bpc-157\");        // throws FlightdeckError(404) if unknown\nconst results = await store.search({ q: \"peptide\" });\n\nconst order = await store.checkout.submit({ /* typed checkout body */ });\n```\n\nNamespaces: `products`, `collections`, `search`, `checkout` (+ `checkout.orders.cancel/edit/refund`), `shopper.orders`, `storeCredit.balance`.\n\n## Low-level client\n\nPath-keyed access to the full spec — merchant (`fdk_` bearer) and storefront routes alike. Every path, method, param, and response body is a generated type; a wrong param name or body field is a compile error.\n\n```ts\nimport { createFlightdeckClient, FlightdeckError } from \"@dscodotco/sdk\";\n\nconst fd = createFlightdeckClient({\n  baseUrl: \"https://api.ruo.pro\",\n  fdkToken: process.env.FLIGHTDECK_FDK_TOKEN, // Authorization: Bearer fdk_...\n});\n\nconst orders = await fd.request(\"get\", \"/v1/merchant/orders\", {\n  query: { limit: 50 },\n});\n```\n\nA non-2xx surfaces as a typed `FlightdeckError` carrying `status` and the parsed error `body`; a failed read is never silently an empty result.\n\n## Types\n\n```ts\nimport type { components, operations, paths } from \"@dscodotco/sdk\";\n```\n\nRegenerate `types.generated.ts` from the repo root with `pnpm sdk:gen` (runs `openapi-typescript` against `openapi.json`).\n\n## Status\n\nAlpha (0.x). Zero runtime dependencies — safe to publish and consume standalone.\n","readmeFilename":"README.md"}