@wishcbg/bobcode
Version:
基於店家同步功能的需求,讓店家能夠在不同的店家之間同步各項功能設定,並且能夠檢視各項功能的異動情況。 規劃出一套店家設定即程式碼的機制,讓店家能夠以 config file (.sac) 來定義各項功能設定,並且能夠還原店家各項功能設定。 暫且稱這個機制為「Settings as Code」「店家設定即程式碼」。
55 lines (54 loc) • 2.02 kB
TypeScript
import { z } from 'zod';
import { BaseResourceSchema } from './base.js';
export declare const lotteryAwardResourceSettingSchema: z.ZodObject<{
name: z.ZodString;
availableStock: z.ZodNumber;
showAvailableStock: z.ZodBoolean;
unlimitedStock: z.ZodBoolean;
award: z.ZodObject<{
type: z.ZodEnum<["coin", "coupon", "cashback", "point", "miss"]>;
amount: z.ZodOptional<z.ZodNumber>;
couponLogicId: z.ZodOptional<z.ZodString>;
shopPointKey: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "coupon" | "coin" | "cashback" | "point" | "miss";
shopPointKey?: string | undefined;
amount?: number | undefined;
couponLogicId?: string | undefined;
}, {
type: "coupon" | "coin" | "cashback" | "point" | "miss";
shopPointKey?: string | undefined;
amount?: number | undefined;
couponLogicId?: string | undefined;
}>;
imageId: z.ZodOptional<z.ZodString>;
lotteryLogicId: z.ZodString;
}, "strip", z.ZodTypeAny, {
name: string;
availableStock: number;
showAvailableStock: boolean;
unlimitedStock: boolean;
award: {
type: "coupon" | "coin" | "cashback" | "point" | "miss";
shopPointKey?: string | undefined;
amount?: number | undefined;
couponLogicId?: string | undefined;
};
lotteryLogicId: string;
imageId?: string | undefined;
}, {
name: string;
availableStock: number;
showAvailableStock: boolean;
unlimitedStock: boolean;
award: {
type: "coupon" | "coin" | "cashback" | "point" | "miss";
shopPointKey?: string | undefined;
amount?: number | undefined;
couponLogicId?: string | undefined;
};
lotteryLogicId: string;
imageId?: string | undefined;
}>;
export type ILotteryAwardResourceSettingSchema = z.infer<typeof lotteryAwardResourceSettingSchema>;
export declare const LotteryAwardResourceSchema: BaseResourceSchema<typeof lotteryAwardResourceSettingSchema>;