Skip to content

refactor(types): drop Api prefix, align with python sdk#17

Merged
VinciGit00 merged 3 commits intomainfrom
feat/align-types-with-python
Apr 22, 2026
Merged

refactor(types): drop Api prefix, align with python sdk#17
VinciGit00 merged 3 commits intomainfrom
feat/align-types-with-python

Conversation

@FrancescoSaverioZuppichini
Copy link
Copy Markdown
Member

@FrancescoSaverioZuppichini FrancescoSaverioZuppichini commented Apr 21, 2026

Summary

  • Rename types and schemas to match scrapegraph-py 1:1 — only ApiResult<T> keeps the prefix
  • Drop Base from extractRequestSchema, rename monitor *Input/*Params*Request, ApiHistoryServiceService
  • Expose previously hidden types: MockConfig, FetchMode, TimeRange, FetchWarningReason, CreditsJobs, HealthServices, HistoryPagination, and the 8 individual *FormatConfig variants
  • Remove dead apiStatusEnumSchema

Test plan

  • bun run format / bun run lint / bunx tsc --noEmit / bun run build — all green
  • Unit tests: 52/52 pass
  • Integration against v2 endpoint: 9/10 pass (only search fails on test-level 5s timeout, endpoint-side slowness unrelated to rename)
  • Bump version before release (breaking type change)

🤖 Generated with Claude Code

rename types and schemas to match scrapegraph-py naming 1:1. only
ApiResult<T> keeps its prefix. also:

- apiExtractRequestBaseSchema -> extractRequestSchema (drop Base)
- ApiMonitorCreateInput/UpdateInput -> MonitorCreateRequest/UpdateRequest
- ApiMonitorActivityParams -> MonitorActivityRequest
- ApiHistoryService -> Service
- expose MockConfig, FetchMode, TimeRange, FetchWarningReason,
  CreditsJobs, HealthServices, HistoryPagination and the 8 individual
  FormatConfig variants
- remove unused apiStatusEnumSchema

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@VinciGit00 VinciGit00 merged commit f276b1b into main Apr 22, 2026
3 checks passed
@VinciGit00 VinciGit00 deleted the feat/align-types-with-python branch April 22, 2026 06:47
VinciGit00 added a commit to ScrapeGraphAI/docs-mintlify that referenced this pull request Apr 22, 2026
Upstream PR ScrapeGraphAI/scrapegraph-js#17 drops the `Api` prefix
from all exported TypeScript types and Zod schemas (only `ApiResult<T>`
keeps it) and renames monitor `*Input`/`*Params` to `*Request`. Runtime
surface is unchanged.

- sdks/javascript.mdx: note the 2.1.0 type/schema rename, bump version
  requirement, rename `FormatEntry[]` -> `FormatConfig[]` in the
  scrape and crawl parameter tables.
- services/{scrape,extract,search,crawl,monitor}.mdx +
  transition-from-v1-to-v2.mdx: bump `scrapegraph-js` version pin
  from >= 2.0.1 to >= 2.1.0.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants