@wishcbg/bobcode
Version:
基於店家同步功能的需求,讓店家能夠在不同的店家之間同步各項功能設定,並且能夠檢視各項功能的異動情況。 規劃出一套店家設定即程式碼的機制,讓店家能夠以 config file (.sac) 來定義各項功能設定,並且能夠還原店家各項功能設定。 暫且稱這個機制為「Settings as Code」「店家設定即程式碼」。
77 lines (76 loc) • 2.99 kB
TypeScript
import { z } from 'zod';
import { BaseResourceSchema } from './base.js';
export declare const memberGameResourceSettingSchema: z.ZodObject<{
name: z.ZodString;
enable: z.ZodBoolean;
startAt: z.ZodDate;
endAt: z.ZodDate;
checkEnableTimerNotifyId: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
notice: z.ZodOptional<z.ZodString>;
againDelay: z.ZodDefault<z.ZodBoolean>;
requirements: z.ZodArray<z.ZodObject<{
type: z.ZodEnum<["memberCard", "totalUsed", "dayUsed", "memberTag", "costPoint"]>;
levels: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
tags: z.ZodArray<z.ZodOptional<z.ZodString>, "many">;
times: z.ZodOptional<z.ZodNumber>;
costAmount: z.ZodOptional<z.ZodNumber>;
shopPointKey: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "memberCard" | "totalUsed" | "dayUsed" | "memberTag" | "costPoint";
tags: (string | undefined)[];
levels?: number[] | undefined;
times?: number | undefined;
costAmount?: number | undefined;
shopPointKey?: string | undefined;
}, {
type: "memberCard" | "totalUsed" | "dayUsed" | "memberTag" | "costPoint";
tags: (string | undefined)[];
levels?: number[] | undefined;
times?: number | undefined;
costAmount?: number | undefined;
shopPointKey?: string | undefined;
}>, "many">;
imageLogicId: z.ZodOptional<z.ZodString>;
memberGameModeLogicId: z.ZodString;
}, "strip", z.ZodTypeAny, {
name: string;
startAt: Date;
endAt: Date;
enable: boolean;
againDelay: boolean;
requirements: {
type: "memberCard" | "totalUsed" | "dayUsed" | "memberTag" | "costPoint";
tags: (string | undefined)[];
levels?: number[] | undefined;
times?: number | undefined;
costAmount?: number | undefined;
shopPointKey?: string | undefined;
}[];
memberGameModeLogicId: string;
description?: string | undefined;
notice?: string | undefined;
checkEnableTimerNotifyId?: string | undefined;
imageLogicId?: string | undefined;
}, {
name: string;
startAt: Date;
endAt: Date;
enable: boolean;
requirements: {
type: "memberCard" | "totalUsed" | "dayUsed" | "memberTag" | "costPoint";
tags: (string | undefined)[];
levels?: number[] | undefined;
times?: number | undefined;
costAmount?: number | undefined;
shopPointKey?: string | undefined;
}[];
memberGameModeLogicId: string;
description?: string | undefined;
notice?: string | undefined;
checkEnableTimerNotifyId?: string | undefined;
againDelay?: boolean | undefined;
imageLogicId?: string | undefined;
}>;
export type IMemberGameResourceSettingSchema = z.infer<typeof memberGameResourceSettingSchema>;
export declare const MemberGameResourceSchema: BaseResourceSchema<typeof memberGameResourceSettingSchema>;