feat: add task workflow and asset downloads
This commit is contained in:
22
lib/types.ts
22
lib/types.ts
@@ -19,6 +19,14 @@ export type GenerationStatus =
|
||||
| "expired"
|
||||
| "cancelled";
|
||||
|
||||
export type WebhookLastStatus = {
|
||||
ok: boolean;
|
||||
status?: number;
|
||||
error?: string;
|
||||
attemptedAt: string;
|
||||
nextAttemptAt?: string;
|
||||
};
|
||||
|
||||
export type Asset = {
|
||||
id: string;
|
||||
ownerId: string;
|
||||
@@ -36,6 +44,7 @@ export type Asset = {
|
||||
export type GenerationJob = {
|
||||
id: string;
|
||||
ownerId: string;
|
||||
externalClientId?: string;
|
||||
capability: GenerationCapability;
|
||||
provider: "volcengine-visual" | "evolink" | "seedance" | "mock";
|
||||
reqKey: string;
|
||||
@@ -53,6 +62,19 @@ export type GenerationJob = {
|
||||
retryable?: boolean;
|
||||
};
|
||||
retryOf?: string;
|
||||
idempotencyKey?: string;
|
||||
idempotencyFingerprint?: string;
|
||||
priority?: number;
|
||||
attempts?: number;
|
||||
maxAttempts?: number;
|
||||
scheduledAt?: string;
|
||||
lockedAt?: string;
|
||||
lockedBy?: string;
|
||||
startedAt?: string;
|
||||
completedAt?: string;
|
||||
webhookUrl?: string;
|
||||
webhookAttempts?: number;
|
||||
webhookLastStatus?: WebhookLastStatus;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user