Skip to content

Build initial official TypeScript SDK - #1

Open
gerald863 wants to merge 5 commits into
masterfrom
feat/initial-typescript-sdk
Open

gerald863 wants to merge 5 commits into
masterfrom
feat/initial-typescript-sdk

Conversation

@gerald863

@gerald863 gerald863 commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  • add the official @scrapecreators/sdk TypeScript client
  • generate typed request params, response payloads, and client methods for all 186 documented operations
  • generate response types from the published OpenAPI sample responses, preferring a formal schema only when one already exists
  • keep every sample-derived response property optional and allow undocumented additive fields
  • preserve the sample's string type for items[].caption.user.pk
  • add API-key auth, typed query/body serialization, structured errors, AbortSignal support, and timeouts that remain active through body reads
  • add deterministic OpenAPI sync/code generation, CI, package checks, and a provenance-ready release workflow

Compatibility scope

This SDK does not coerce or runtime-validate API responses. It models the published sample shape while leaving production response behavior unchanged. Third-party payload fields may be added or omitted. We should normalize specific IDs only when the existing public contract requires it rather than coercing unrelated fields globally.

Verification

  • ✅ 186 generated SDK methods
  • ✅ pnpm check
  • ✅ TypeScript compile-time assertions, including items[].caption.user.pk as string | undefined
  • ✅ 7/7 runtime tests under Node 22
  • ✅ installed-package smoke test under Node 20
  • ✅ package tarball generated successfully
  • ✅ git diff --check

Publication

This PR does not publish the package. Before the first release, configure npm trusted publishing for:

  • package: @scrapecreators/sdk
  • repository: ScrapeCreators/scrapecreators-sdk-typescript
  • workflow: publish.yml
  • environment: npm-publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant