Skip to content

Commit f276b1b

Browse files
refactor(types): drop Api prefix, align with python sdk (#17)
* refactor(types): drop Api prefix, align names with python sdk 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> * bump release version * fix(types): narrow HealthResponse to match api Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3f87301 commit f276b1b

5 files changed

Lines changed: 427 additions & 396 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scrapegraph-js",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"description": "Official JavaScript/TypeScript SDK for the ScrapeGraph AI API — smart web scraping powered by AI",
55
"type": "module",
66
"main": "dist/index.js",

src/index.ts

Lines changed: 104 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,112 @@ export {
1313
} from "./scrapegraphai.js";
1414

1515
export type {
16-
ApiFetchConfig,
17-
ApiFetchContentType,
18-
ApiHtmlMode,
19-
ApiScrapeFormatEntry,
20-
ApiScrapeRequest,
21-
ApiScrapeResponse,
22-
ApiScrapeFormat,
23-
ApiScrapeResultMap,
24-
ApiExtractRequest,
25-
ApiExtractResponse,
26-
ApiSearchRequest,
27-
ApiSearchResponse,
28-
ApiSearchResult,
29-
ApiCrawlRequest,
30-
ApiCrawlResponse,
31-
ApiCrawlResult,
32-
ApiCrawlPage,
33-
ApiCrawlStatus,
34-
ApiCrawlPageStatus,
35-
ApiMonitorCreateInput,
36-
ApiMonitorUpdateInput,
37-
ApiMonitorResponse,
38-
ApiMonitorResult,
39-
ApiMonitorDiffs,
40-
ApiMonitorActivityParams,
41-
ApiMonitorActivityResponse,
42-
ApiMonitorTickEntry,
43-
ApiMonitorTickStatus,
44-
ApiHistoryFilter,
45-
ApiHistoryEntry,
46-
ApiHistoryPage,
47-
ApiHistoryService,
48-
ApiHistoryStatus,
49-
ApiCreditsResponse,
50-
ApiHealthResponse,
5116
ApiResult,
52-
ApiTokenUsage,
53-
ApiChunkerMetadata,
54-
ApiBranding,
17+
Branding,
18+
BrandingColors,
19+
BrandingFontEntry,
20+
BrandingImages,
21+
BrandingMetadata,
22+
BrandingPersonality,
23+
BrandingTypography,
24+
ChunkerMetadata,
25+
ContentPageMetadata,
26+
CrawlHistoryEntry,
27+
CrawlPage,
28+
CrawlPageStatus,
29+
CrawlRequest,
30+
CrawlResponse,
31+
CrawlResult,
32+
CrawlStatus,
33+
CreditsJobs,
34+
CreditsResponse,
35+
ExtractHistoryEntry,
36+
ExtractRequest,
37+
ExtractResponse,
38+
FetchConfig,
39+
FetchContentType,
40+
FetchMode,
41+
FetchWarning,
42+
FetchWarningReason,
43+
FormatConfig,
44+
FormatError,
45+
FormatMetadataMap,
46+
FormatResponseMap,
47+
FormatType,
48+
HealthResponse,
49+
HistoryEntry,
50+
HistoryFilter,
51+
HistoryPage,
52+
HistoryPagination,
53+
HistoryStatus,
54+
HtmlMode,
55+
ImageChange,
56+
ImageContentType,
57+
JobsStatus,
58+
JsonChange,
59+
MarkdownFormatConfig,
60+
HtmlFormatConfig,
61+
ScreenshotFormatConfig,
62+
JsonFormatConfig,
63+
LinksFormatConfig,
64+
ImagesFormatConfig,
65+
SummaryFormatConfig,
66+
BrandingFormatConfig,
67+
MockConfig,
68+
MonitorActivityRequest,
69+
MonitorActivityResponse,
70+
MonitorCreateRequest,
71+
MonitorDiffs,
72+
MonitorHistoryEntry,
73+
MonitorRefs,
74+
MonitorResponse,
75+
MonitorResult,
76+
MonitorTickEntry,
77+
MonitorTickStatus,
78+
MonitorUpdateRequest,
79+
PageResponse,
80+
ScrapeHistoryEntry,
81+
ScrapeMetadata,
82+
ScrapeRequest,
83+
ScrapeResponse,
84+
ScrapeResultMap,
85+
ScreenshotData,
86+
SearchHistoryEntry,
87+
SearchMetadata,
88+
SearchRequest,
89+
SearchResponse,
90+
SearchResult,
91+
Service,
92+
SetChange,
93+
TextChange,
94+
TimeRange,
95+
TokenUsage,
96+
WebhookStatus,
5597
} from "./types.js";
5698

5799
export {
58-
apiScrapeRequestSchema,
59-
apiExtractRequestBaseSchema,
60-
apiSearchRequestSchema,
61-
apiCrawlRequestSchema,
62-
apiMonitorCreateSchema,
63-
apiMonitorUpdateSchema,
64-
apiHistoryFilterSchema,
65-
apiFetchConfigSchema,
66-
apiScrapeFormatEntrySchema,
100+
brandingFormatConfigSchema,
101+
crawlRequestSchema,
102+
extractRequestSchema,
103+
fetchConfigSchema,
104+
fetchContentTypeSchema,
105+
fetchModeSchema,
106+
formatConfigSchema,
107+
historyFilterSchema,
108+
htmlFormatConfigSchema,
109+
htmlModeSchema,
110+
imagesFormatConfigSchema,
111+
jsonFormatConfigSchema,
112+
linksFormatConfigSchema,
113+
markdownFormatConfigSchema,
114+
mockConfigSchema,
115+
monitorActivityRequestSchema,
116+
monitorCreateRequestSchema,
117+
monitorUpdateRequestSchema,
118+
scrapeRequestSchema,
119+
screenshotFormatConfigSchema,
120+
searchRequestSchema,
121+
serviceSchema,
122+
summaryFormatConfigSchema,
123+
timeRangeSchema,
67124
} from "./schemas.js";

0 commit comments

Comments
 (0)