Skip to content

Commit a725c1c

Browse files
fix: use deleted status and move types to src/types.ts
- Replace cancelled with deleted in ApiCrawlStatus - Add deleted to ApiHistoryStatus - Move types from src/types/index.ts to src/types.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5847b95 commit a725c1c

4 files changed

Lines changed: 6 additions & 12 deletions

File tree

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export type {
4949
ApiTokenUsage,
5050
ApiChunkerMetadata,
5151
ApiBranding,
52-
} from "./types/index.js";
52+
} from "./types.js";
5353

5454
export {
5555
apiScrapeRequestSchema,

src/schemas.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,7 @@ export const apiMonitorUpdateSchema = z
256256
})
257257
.partial();
258258

259-
export const apiCrawlStatusSchema = z.enum([
260-
"running",
261-
"completed",
262-
"failed",
263-
"cancelled",
264-
"paused",
265-
]);
259+
export const apiCrawlStatusSchema = z.enum(["running", "completed", "failed", "paused", "deleted"]);
266260

267261
export const apiCrawlPageStatusSchema = z.enum(["completed", "failed", "skipped"]);
268262

src/scrapegraphai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {
1919
ApiScrapeResponse,
2020
ApiSearchRequest,
2121
ApiSearchResponse,
22-
} from "./types/index.js";
22+
} from "./types.js";
2323

2424
const BASE_URL = process.env.SGAI_API_URL || "https://api.scrapegraphai.com/v2";
2525
const HEALTH_URL = process.env.SGAI_API_URL
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
apiScrapeFormatEntrySchema,
1313
apiScrapeRequestSchema,
1414
apiSearchRequestSchema,
15-
} from "../schemas.js";
15+
} from "./schemas.js";
1616

1717
export type ApiFetchConfig = z.infer<typeof apiFetchConfigSchema>;
1818
export type ApiFetchContentType = z.infer<typeof apiFetchContentTypeSchema>;
@@ -218,7 +218,7 @@ export interface ApiSearchResponse {
218218
metadata: ApiSearchMetadata;
219219
}
220220

221-
export type ApiCrawlStatus = "running" | "completed" | "failed" | "cancelled" | "paused";
221+
export type ApiCrawlStatus = "running" | "completed" | "failed" | "paused" | "deleted";
222222
export type ApiCrawlPageStatus = "completed" | "failed" | "skipped";
223223

224224
export interface ApiCrawlPage {
@@ -307,7 +307,7 @@ export interface ApiMonitorResponse {
307307
}
308308

309309
export type ApiHistoryService = "scrape" | "extract" | "schema" | "search" | "monitor" | "crawl";
310-
export type ApiHistoryStatus = "completed" | "failed" | "running" | "paused";
310+
export type ApiHistoryStatus = "completed" | "failed" | "running" | "paused" | "deleted";
311311

312312
interface ApiHistoryBase {
313313
id: string;

0 commit comments

Comments
 (0)