@wishcbg/bobcode
Version:
基於店家同步功能的需求,讓店家能夠在不同的店家之間同步各項功能設定,並且能夠檢視各項功能的異動情況。 規劃出一套店家設定即程式碼的機制,讓店家能夠以 config file (.sac) 來定義各項功能設定,並且能夠還原店家各項功能設定。 暫且稱這個機制為「Settings as Code」「店家設定即程式碼」。
61 lines (60 loc) • 2.47 kB
TypeScript
import { z } from 'zod';
import { BaseResourceSchema } from './base.js';
export declare const shopPointResourceSettingSchema: z.ZodObject<{
name: z.ZodDefault<z.ZodString>;
unitName: z.ZodDefault<z.ZodString>;
daysUntilExpiration: z.ZodOptional<z.ZodNumber>;
annualSettlementDate: z.ZodString;
daysDiffExpirationNotify: z.ZodNumber;
type: z.ZodEnum<["year", "none"]>;
moduleType: z.ZodDefault<z.ZodEnum<["basic", "external"]>>;
feature: z.ZodOptional<z.ZodObject<{
findPointWalletBalance: z.ZodDefault<z.ZodBoolean>;
findPointWalletRecord: z.ZodDefault<z.ZodBoolean>;
addPointWalletRecord: z.ZodDefault<z.ZodBoolean>;
usePointWalletRecord: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
findPointWalletBalance: boolean;
findPointWalletRecord: boolean;
addPointWalletRecord: boolean;
usePointWalletRecord: boolean;
}, {
findPointWalletBalance?: boolean | undefined;
findPointWalletRecord?: boolean | undefined;
addPointWalletRecord?: boolean | undefined;
usePointWalletRecord?: boolean | undefined;
}>>;
shopCustomModuleLogicId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "none" | "year";
name: string;
unitName: string;
annualSettlementDate: string;
daysDiffExpirationNotify: number;
moduleType: "basic" | "external";
daysUntilExpiration?: number | undefined;
feature?: {
findPointWalletBalance: boolean;
findPointWalletRecord: boolean;
addPointWalletRecord: boolean;
usePointWalletRecord: boolean;
} | undefined;
shopCustomModuleLogicId?: string | undefined;
}, {
type: "none" | "year";
annualSettlementDate: string;
daysDiffExpirationNotify: number;
name?: string | undefined;
unitName?: string | undefined;
daysUntilExpiration?: number | undefined;
moduleType?: "basic" | "external" | undefined;
feature?: {
findPointWalletBalance?: boolean | undefined;
findPointWalletRecord?: boolean | undefined;
addPointWalletRecord?: boolean | undefined;
usePointWalletRecord?: boolean | undefined;
} | undefined;
shopCustomModuleLogicId?: string | undefined;
}>;
export type IShopPointResourceSettingSchema = z.infer<typeof shopPointResourceSettingSchema>;
export declare const ShopPointResourceSchema: BaseResourceSchema<typeof shopPointResourceSettingSchema>;