[페이지 분류 강화 작업]

This commit is contained in:
LASTA_DEV01\lasta
2026-05-22 20:16:28 +09:00
parent 93980da14d
commit a358f221ff
29 changed files with 5633 additions and 52 deletions

View File

@@ -86,6 +86,26 @@ export function isCrawlTerminal(status: string): boolean {
return TERMINAL_CRAWL_STATUSES.has(status);
}
export const extractorModelsResponseSchema = z.object({
ok: z.boolean(),
error: z.string().optional(),
models: z
.array(
z
.object({
id: z.string(),
owned_by: z.string().optional(),
})
.passthrough(),
)
.optional()
.default([]),
});
export type ExtractorModelsResponse = z.infer<
typeof extractorModelsResponseSchema
>;
export const crawlApi = {
startByProject: (body: StartSiteCrawlRequest) =>
apiClient.post("/crawl-site/by-project", crawlJobSchema, body),
@@ -99,4 +119,9 @@ export const crawlApi = {
`/crawl-site/jobs/${encodeURIComponent(jobId)}/cancel`,
crawlJobSchema,
),
listExtractorModels: (provider: string, baseUrl?: string | null) =>
apiClient.post("/extractors/models", extractorModelsResponseSchema, {
provider,
base_url: baseUrl || null,
}),
};