23 lines
524 B
TypeScript
23 lines
524 B
TypeScript
import { z } from "zod";
|
|
|
|
export const DownloadOrderRequestSchema = z.object({
|
|
game_id: z.string().max(5),
|
|
ver: z.string().max(5),
|
|
serial: z.string().max(11),
|
|
ip: z.string().ip().optional(),
|
|
encode: z.enum(["Shift_JIS", "EUC-JP", "UTF-8"]).default("EUC-JP"),
|
|
});
|
|
|
|
export type DownloadOrderRequest = z.infer<typeof DownloadOrderRequestSchema>;
|
|
|
|
export const enum DownloadOrderStatus {
|
|
FAILURE = 0,
|
|
SUCCESS = 1,
|
|
}
|
|
|
|
export interface DownloadOrderResponse {
|
|
stat: DownloadOrderStatus;
|
|
serial?: string;
|
|
uri?: string;
|
|
}
|