feat: complete TASK-WP2-03 project lifecycle

This commit is contained in:
suyx
2026-08-02 20:00:18 +08:00
parent da6fa25e60
commit 9b4860cfc2
17 changed files with 1477 additions and 10 deletions
+25
View File
@@ -106,6 +106,31 @@ export const FailedEmptyTrashResponseSchema = Type.Object(
},
{ additionalProperties: false, $id: "FailedEmptyTrashResponse" },
);
export const ProjectTrashResponseSchema = Type.Object(
{
deleted_at: Type.String({ pattern: isoTimestampPattern }),
project_id: Type.Ref(ProjectIdSchema),
purge_at: Type.String({ pattern: isoTimestampPattern }),
status: Type.Literal("trashed"),
},
{ additionalProperties: false, $id: "ProjectTrashResponse" },
);
export const ProjectRestoreResponseSchema = Type.Object(
{
deleted_at: Type.Null(),
project_id: Type.Ref(ProjectIdSchema),
purge_at: Type.Null(),
status: Type.Literal("active"),
},
{ additionalProperties: false, $id: "ProjectRestoreResponse" },
);
export const ProjectPurgeResponseSchema = Type.Object(
{
project_id: Type.Ref(ProjectIdSchema),
status: Type.Literal("purged"),
},
{ additionalProperties: false, $id: "ProjectPurgeResponse" },
);
export type ProjectListQuery = Static<typeof ProjectListQuerySchema>;
export type ProjectParams = Static<typeof ProjectParamsSchema>;