import * as zod from 'zod';
import Bob from '../utils/bobAPI.js';
type RelationScope = 'shop' | 'org';
type RelationType = 'single' | 'multi';
export type RelationResource = {
    resourceType: string;
    settingSchemaField: string;
    relationType: RelationType;
    useLogicIdToResourceId?: boolean;
    logicIdToResourceIdNewField?: string;
    acceptsNullValue?: boolean;
};
export type PathParams = {
    shopId: string;
    resourceId?: string;
};
export interface BaseResourceSchema<S extends zod.ZodTypeAny = zod.ZodTypeAny> {
    /** 資源識別 */
    resourceType: string;
    resourceName: string;
    /** 設定結構 (Zod schema) */
    resourceSettingSchema: S;
    /** 關聯範圍 & 類型 */
    relationScope: RelationScope;
    relationType: RelationType;
    /** 定義關聯資源 */
    relationResources: RelationResource[];
    /** Apply API 路徑 */
    applySingleUpdateApiPath: string | null;
    applyCreateApiPath: string | null;
    applyUpdateApiPath: string | null;
    applyDestroyApiPath: string | null;
    /** Apply API config (可動態調整 query/body) */
    applySingleUpdateApiBodyTransform?: (pathParams: PathParams, body: any, bobApi: Bob) => Promise<{
        apiPath: string | null;
        apiBody: any;
    }>;
    applyCreateApiBodyTransform?: (pathParams: PathParams, body: any, bobApi: Bob) => Promise<{
        apiPath: string | null;
        apiBody: any;
    }>;
    applyUpdateApiBodyTransform?: (pathParams: PathParams, body: any, bobApi: Bob) => Promise<{
        apiPath: string | null;
        apiBody: any;
    }>;
    applyDestroyApiBodyTransform?: (pathParams: PathParams, body: any, bobApi: Bob) => Promise<{
        apiPath: string | null;
        apiBody: any;
    }>;
}
export {};
