{"_id":"@accidentally-awesome-labs/spatula-client","_rev":"2-9299f2dd4ee3a60325283c68fb4ba2ce","name":"@accidentally-awesome-labs/spatula-client","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@accidentally-awesome-labs/spatula-client","version":"0.1.0","license":"MIT","_id":"@accidentally-awesome-labs/spatula-client@0.1.0","maintainers":[{"name":"salarsayyad","email":"salar.sayyad@gmail.com"}],"homepage":"https://github.com/accidentally-awesome-labs/spatula#readme","bugs":{"url":"https://github.com/accidentally-awesome-labs/spatula/issues"},"dist":{"shasum":"7ccc00733706ec7338b08185318c65fc072d2563","tarball":"https://registry.npmjs.org/@accidentally-awesome-labs/spatula-client/-/spatula-client-0.1.0.tgz","fileCount":25,"integrity":"sha512-Ylb2IEyxBM4itlHoz8Y1+XrugSI+15RiF14Z3lmJ1UECtPeMVjohh+Q88zlkSw/kFH90T4IHADnyTbp4ZP8j0A==","signatures":[{"sig":"MEUCIF30UZQ7Scpw+48Yy/BKj4FnDTifCCPHjrI9XK4aJJQJAiEAtE62A0y4PQDeKh6FM0ePydumKFBVxgghFJ4bvOX3Fio=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@accidentally-awesome-labs%2fspatula-client@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56240},"main":"./dist/index.js","type":"module","_from":"file:/home/runner/work/_temp/spatula-npm-packs/accidentally-awesome-labs-spatula-client-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"lint":"eslint src/","size":"size-limit","test":"vitest run","build":"tsc","clean":"rm -rf dist .turbo *.tsbuildinfo","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","gen:errors":"tsx scripts/gen-error-classes.ts","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"salarsayyad","email":"salar.sayyad@gmail.com"},"_resolved":"/home/runner/work/_temp/spatula-npm-packs/accidentally-awesome-labs-spatula-client-0.1.0.tgz","_integrity":"sha512-Ylb2IEyxBM4itlHoz8Y1+XrugSI+15RiF14Z3lmJ1UECtPeMVjohh+Q88zlkSw/kFH90T4IHADnyTbp4ZP8j0A==","repository":{"url":"git+https://github.com/accidentally-awesome-labs/spatula.git","type":"git","directory":"packages/client"},"size-limit":[{"gzip":true,"name":"core client surface","path":"dist/index.js","limit":"50 kB","config":"./size-limit.esbuild.config.js","import":"{ SpatulaClient, createJob, listJobs, getEntities }"}],"_npmVersion":"12.0.1","description":"Spatula API client — TypeScript SDK for the Spatula REST API. ESM-only, browser+Node compatible, fetch-based.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"eventsource":"4.1.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","zod":"^3.24.0","vitest":"^3.2.6","size-limit":"^12.1.0","typescript":"^5.7.0","@types/node":"^22.0.0","@size-limit/esbuild":"^12.1.0","@size-limit/preset-small-lib":"^12.1.0","@accidentally-awesome-labs/spatula-shared":"0.1.0","@accidentally-awesome-labs/spatula-core-types":"0.1.0"},"peerDependencies":{"@accidentally-awesome-labs/spatula-core-types":"0.x"},"_npmOperationalInternal":{"tmp":"tmp/spatula-client_0.1.0_1784125160088_0.08968130012858122","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@accidentally-awesome-labs/spatula-client","version":"0.1.1","description":"Spatula API client — TypeScript SDK for the Spatula REST API. ESM-only, browser+Node compatible, fetch-based.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/accidentally-awesome-labs/spatula.git","directory":"packages/client"},"homepage":"https://github.com/accidentally-awesome-labs/spatula#readme","bugs":{"url":"https://github.com/accidentally-awesome-labs/spatula/issues"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"engines":{"node":">=22"},"sideEffects":false,"publishConfig":{"access":"public","provenance":true},"dependencies":{"eventsource":"4.1.0"},"peerDependencies":{"@accidentally-awesome-labs/spatula-core-types":"0.1.1"},"devDependencies":{"@size-limit/esbuild":"^12.1.0","@size-limit/preset-small-lib":"^12.1.0","@types/node":"^22.0.0","size-limit":"^12.1.0","tsx":"^4.19.0","typescript":"^5.7.0","vitest":"^3.2.6","zod":"^3.24.0","@accidentally-awesome-labs/spatula-core-types":"0.1.1","@accidentally-awesome-labs/spatula-shared":"0.1.1"},"size-limit":[{"name":"core client surface","path":"dist/index.js","import":"{ SpatulaClient, createJob, listJobs, getEntities }","limit":"50 kB","gzip":true,"config":"./size-limit.esbuild.config.js"}],"scripts":{"build":"tsc","test":"vitest run","test:integration":"vitest run --config vitest.integration.config.ts","lint":"eslint src/","lint:fix":"eslint src/ --fix","typecheck":"tsc --noEmit","size":"size-limit","gen:errors":"tsx scripts/gen-error-classes.ts","clean":"rm -rf dist .turbo *.tsbuildinfo"},"_id":"@accidentally-awesome-labs/spatula-client@0.1.1","_integrity":"sha512-qFX+yPIjNeMtInv4EzOiEQlNEDTMEtQdjkfVtcwQvNQRp8sum6g8B9K5jGfFOjDfnQHi7RsDKp8VQLc9NkIEZA==","_resolved":"/home/runner/work/_temp/spatula-npm-packs/accidentally-awesome-labs-spatula-client-0.1.1.tgz","_from":"file:/home/runner/work/_temp/spatula-npm-packs/accidentally-awesome-labs-spatula-client-0.1.1.tgz","_nodeVersion":"22.23.1","_npmVersion":"12.0.1","dist":{"integrity":"sha512-qFX+yPIjNeMtInv4EzOiEQlNEDTMEtQdjkfVtcwQvNQRp8sum6g8B9K5jGfFOjDfnQHi7RsDKp8VQLc9NkIEZA==","shasum":"5b6477121e42956096b948c1870eb7074ead8cae","tarball":"https://registry.npmjs.org/@accidentally-awesome-labs/spatula-client/-/spatula-client-0.1.1.tgz","fileCount":25,"unpackedSize":56242,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@accidentally-awesome-labs%2fspatula-client@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIELlBtEM8YLlV2XO/G6KjcjAMeJXvRr8bRXR0pol0UtjAiEAoEhvs8m4Q7EGcHD+rg/fUawokbu/43c0r7dToIjJYXA="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4b2b189c-618a-4c6d-9e85-42cda5405873"}},"directories":{},"maintainers":[{"name":"salarsayyad","email":"salar.sayyad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spatula-client_0.1.1_1784144313757_0.4605832664309184"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-15T14:19:19.938Z","modified":"2026-07-15T19:38:34.173Z","0.1.0":"2026-07-15T14:19:20.256Z","0.1.1":"2026-07-15T19:38:33.896Z"},"bugs":{"url":"https://github.com/accidentally-awesome-labs/spatula/issues"},"license":"MIT","homepage":"https://github.com/accidentally-awesome-labs/spatula#readme","repository":{"type":"git","url":"git+https://github.com/accidentally-awesome-labs/spatula.git","directory":"packages/client"},"description":"Spatula API client — TypeScript SDK for the Spatula REST API. ESM-only, browser+Node compatible, fetch-based.","maintainers":[{"name":"salarsayyad","email":"salar.sayyad@gmail.com"}],"readme":"# @accidentally-awesome-labs/spatula-client\n\nSpatula API client — TypeScript SDK for the Spatula REST API.\n\n## Properties\n\n- ESM-only (no CommonJS shim — use `@accidentally-awesome-labs/spatula`'s dual build if you need CJS)\n- Browser + Node 22+ compatible\n- Fetch-based — uses global `fetch` (override via constructor option)\n- `sideEffects: false` — fully tree-shakeable\n- **Measured surface ≤ 50 kB gzipped** for `{ SpatulaClient, createJob, listJobs, getEntities }` (see `size-limit.json`)\n\n## Quick start\n\n```typescript\nimport {\n  SpatulaClient,\n  createJob,\n  listJobs,\n  getEntities,\n} from '@accidentally-awesome-labs/spatula-client';\n\nconst client = new SpatulaClient({\n  baseUrl: 'http://localhost:3000',\n  apiKey: process.env.SPATULA_API_KEY!,\n});\n\nconst job = await createJob(client, { name: 'demo', seedUrls: ['https://example.com'] });\nconst { data: jobs, hasMore, nextCursor } = await listJobs(client, { limit: 50 });\nconst { data: entities } = await getEntities(client, job.id);\n```\n\n## Stability\n\nSee `docs/compat-policy.md` for the full SDK ↔ server ↔ `@accidentally-awesome-labs/spatula-core-types` compatibility matrix.\n\n## Size budget\n\nThe 50 kB limit measures ONLY the named surface above (`SpatulaClient` + 3 methods). Importing the full module (e.g., `import * as client from '@accidentally-awesome-labs/spatula-client'`) pulls in additional methods + class-per-code error subclasses (26 classes) and will exceed 50 kB. This is by design — tree-shaking in your bundler eliminates unused subclasses.\n\n## Experimental namespace\n\n`client.experimental` contains explicitly unstable SDK surfaces. v1.0 ships one experimental surface: `client.experimental.forensic`, which calls the admin forensic-extractions endpoint. Any other property access throws.\n\n```typescript\nawait client.experimental.forensic.listExtractions({ limit: 25 });\n\n// Throws: no other experimental surface exists in v1.0.\nclient.experimental.anything;\n```\n\n## Generated error classes\n\nClass-per-code error subclasses live in `src/errors/generated.ts` and are checked into git. The generator script (`scripts/gen-error-classes.ts`) is the source of truth and runs in CI via `pnpm gen:errors && git diff --exit-code` to catch drift between the frozen `ErrorCode` enum and the committed subclasses.\n\n```typescript\nimport {\n  SpatulaClient,\n  JobNotFoundError,\n  RateLimitExceededError,\n} from '@accidentally-awesome-labs/spatula-client';\n\ntry {\n  await createJob(client /* ... */);\n} catch (err) {\n  if (err instanceof JobNotFoundError) {\n    /* ... */\n  } else if (err instanceof RateLimitExceededError) {\n    /* err.details.limit, err.details.resetAt */\n  }\n}\n```\n","readmeFilename":"README.md"}