Add missing file status values and make gameVersionTypeId nullable
This commit is contained in:
parent
52ef5bf927
commit
3b077d75f4
@ -3,9 +3,28 @@ import { z } from "zod";
|
|||||||
// region FileStatus — 文件状态
|
// region FileStatus — 文件状态
|
||||||
export const FileStatusSchema = z.union([
|
export const FileStatusSchema = z.union([
|
||||||
z.literal(1), // Processing
|
z.literal(1), // Processing
|
||||||
|
z.literal(2), // ChangesRequired
|
||||||
|
z.literal(3), // UnderReview
|
||||||
z.literal(4), // Approved
|
z.literal(4), // Approved
|
||||||
|
z.literal(5), // Rejected
|
||||||
|
z.literal(6), // MalwareDetected
|
||||||
|
z.literal(7), // Deleted
|
||||||
|
z.literal(8), // Archived
|
||||||
|
z.literal(9), // Testing
|
||||||
z.literal(10), // Released
|
z.literal(10), // Released
|
||||||
|
z.literal(11), // ReadyForReview
|
||||||
z.literal(12), // Deprecated
|
z.literal(12), // Deprecated
|
||||||
|
z.literal(13), // Baking
|
||||||
|
z.literal(14), // AwaitingPublishing
|
||||||
|
z.literal(15), // FailedPublishing
|
||||||
|
z.literal(16), // Cooking
|
||||||
|
z.literal(17), // Cooked
|
||||||
|
z.literal(18), // UnderManualReview
|
||||||
|
z.literal(19), // ScanningForMalware
|
||||||
|
z.literal(20), // ProcessingFile
|
||||||
|
z.literal(21), // PendingRelease
|
||||||
|
z.literal(22), // ReadyForCooking
|
||||||
|
z.literal(23), // PostProcessing
|
||||||
]);
|
]);
|
||||||
export type FileStatus = z.infer<typeof FileStatusSchema>;
|
export type FileStatus = z.infer<typeof FileStatusSchema>;
|
||||||
// endregion
|
// endregion
|
||||||
@ -73,7 +92,7 @@ export const SortableGameVersionSchema = z.object({
|
|||||||
/** 游戏版本发布日期(ISO-8601) */
|
/** 游戏版本发布日期(ISO-8601) */
|
||||||
gameVersionReleaseDate: z.string(),
|
gameVersionReleaseDate: z.string(),
|
||||||
/** 版本类型 ID,对应 Game Version Types API 中的 id */
|
/** 版本类型 ID,对应 Game Version Types API 中的 id */
|
||||||
gameVersionTypeId: z.number().int(),
|
gameVersionTypeId: z.number().int().nullable().optional(),
|
||||||
});
|
});
|
||||||
export type SortableGameVersion = z.infer<typeof SortableGameVersionSchema>;
|
export type SortableGameVersion = z.infer<typeof SortableGameVersionSchema>;
|
||||||
// endregion
|
// endregion
|
||||||
@ -179,7 +198,7 @@ export const GetModFilesParamsSchema = z.object({
|
|||||||
/** 按 Mod Loader 类型过滤 */
|
/** 按 Mod Loader 类型过滤 */
|
||||||
modLoaderType: ModLoaderTypeSchema.optional(),
|
modLoaderType: ModLoaderTypeSchema.optional(),
|
||||||
/** 按 gameVersionTypeId 过滤 */
|
/** 按 gameVersionTypeId 过滤 */
|
||||||
gameVersionTypeId: z.number().int().optional(),
|
gameVersionTypeId: z.number().int().nullable().optional(),
|
||||||
/** 分页起始索引(从 0 开始) */
|
/** 分页起始索引(从 0 开始) */
|
||||||
index: z.number().int().optional(),
|
index: z.number().int().optional(),
|
||||||
/** 每页数量,默认/最大 50 */
|
/** 每页数量,默认/最大 50 */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user