feat(studio): recover matching Nitro sources and persist import phases
This commit is contained in:
1 parent
00e33623f7
commit
13bd3695cb
45 files changed
+903
-28
No files matched your search
@@ -20,7 +20,7 @@ import {
|
||||
uuid as zUuid,
|
||||
} from "zod/mini";
|
||||
import { adminFetch } from "@/lib/admin-fetch";
|
||||
import type { ImportJob } from "@/lib/furni/import-job";
|
||||
import { IMPORT_PHASES, type ImportJob } from "@/lib/furni/import-job";
|
||||
|
||||
const endpoint = "/api/admin/studio/import-jobs";
|
||||
const historyTimeoutMs = 15_000;
|
||||
@@ -55,6 +55,16 @@ const jobSchema = zLooseObject({
|
||||
"cancelled",
|
||||
"interrupted",
|
||||
]),
|
||||
phase: zOptional(zEnum(IMPORT_PHASES)),
|
||||
phaseStartedAt: zOptional(zIso.datetime({ offset: true })),
|
||||
sourceAttempt: zOptional(zString()),
|
||||
recoveredSource: zOptional(
|
||||
zObject({
|
||||
sourceId: zString(),
|
||||
sourceName: zString(),
|
||||
revision: zNumber(),
|
||||
}),
|
||||
),
|
||||
error: zOptional(zString()),
|
||||
warnings: zOptional(zArray(zString())),
|
||||
itemId: zOptional(zNumber()),
|
||||
|
||||
Reference in new issue
Block a user