/** * Design Table Resource for SolidWorks MCP * Manages design tables with SQL database integration */ import { z } from 'zod'; import { SolidWorksResource, ValidationResult } from './base.js'; import { SolidWorksAPI } from '../solidworks/api.js'; declare const DesignTableSchema: z.ZodObject<{ tableName: z.ZodString; fileName: z.ZodOptional; parameters: z.ZodArray; dataType: z.ZodEnum<["number", "string", "boolean"]>; defaultValue: z.ZodOptional; sqlColumn: z.ZodOptional; formula: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }, { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }>, "many">; configurations: z.ZodOptional; active: z.ZodDefault; }, "strip", z.ZodTypeAny, { values: Record; name: string; active: boolean; }, { values: Record; name: string; active?: boolean | undefined; }>, "many">>; dataSource: z.ZodOptional; connectionString: z.ZodOptional; query: z.ZodOptional; filePath: z.ZodOptional; apiEndpoint: z.ZodOptional; refreshInterval: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; }, { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; }>>; autoUpdate: z.ZodDefault; validation: z.ZodOptional; rules: z.ZodOptional, "many">>; }, "strip", z.ZodTypeAny, { enabled: boolean; rules?: { message: string; parameter: string; rule: string; }[] | undefined; }, { enabled?: boolean | undefined; rules?: { message: string; parameter: string; rule: string; }[] | undefined; }>>; }, "strip", z.ZodTypeAny, { tableName: string; parameters: { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }[]; autoUpdate: boolean; fileName?: string | undefined; validation?: { enabled: boolean; rules?: { message: string; parameter: string; rule: string; }[] | undefined; } | undefined; configurations?: { values: Record; name: string; active: boolean; }[] | undefined; dataSource?: { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; } | undefined; }, { tableName: string; parameters: { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }[]; fileName?: string | undefined; validation?: { enabled?: boolean | undefined; rules?: { message: string; parameter: string; rule: string; }[] | undefined; } | undefined; configurations?: { values: Record; name: string; active?: boolean | undefined; }[] | undefined; dataSource?: { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; } | undefined; autoUpdate?: boolean | undefined; }>; export type DesignTableConfig = z.infer; export declare class DesignTableResource extends SolidWorksResource { readonly type = "design-table"; readonly schema: z.ZodObject<{ tableName: z.ZodString; fileName: z.ZodOptional; parameters: z.ZodArray; dataType: z.ZodEnum<["number", "string", "boolean"]>; defaultValue: z.ZodOptional; sqlColumn: z.ZodOptional; formula: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }, { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }>, "many">; configurations: z.ZodOptional; active: z.ZodDefault; }, "strip", z.ZodTypeAny, { values: Record; name: string; active: boolean; }, { values: Record; name: string; active?: boolean | undefined; }>, "many">>; dataSource: z.ZodOptional; connectionString: z.ZodOptional; query: z.ZodOptional; filePath: z.ZodOptional; apiEndpoint: z.ZodOptional; refreshInterval: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; }, { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; }>>; autoUpdate: z.ZodDefault; validation: z.ZodOptional; rules: z.ZodOptional, "many">>; }, "strip", z.ZodTypeAny, { enabled: boolean; rules?: { message: string; parameter: string; rule: string; }[] | undefined; }, { enabled?: boolean | undefined; rules?: { message: string; parameter: string; rule: string; }[] | undefined; }>>; }, "strip", z.ZodTypeAny, { tableName: string; parameters: { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }[]; autoUpdate: boolean; fileName?: string | undefined; validation?: { enabled: boolean; rules?: { message: string; parameter: string; rule: string; }[] | undefined; } | undefined; configurations?: { values: Record; name: string; active: boolean; }[] | undefined; dataSource?: { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; } | undefined; }, { tableName: string; parameters: { type: "custom" | "dimension" | "feature" | "configuration"; name: string; dataType: "string" | "number" | "boolean"; defaultValue?: any; sqlColumn?: string | undefined; formula?: string | undefined; }[]; fileName?: string | undefined; validation?: { enabled?: boolean | undefined; rules?: { message: string; parameter: string; rule: string; }[] | undefined; } | undefined; configurations?: { values: Record; name: string; active?: boolean | undefined; }[] | undefined; dataSource?: { type: "file" | "sql" | "api" | "manual"; connectionString?: string | undefined; query?: string | undefined; filePath?: string | undefined; apiEndpoint?: string | undefined; refreshInterval?: number | undefined; } | undefined; autoUpdate?: boolean | undefined; }>; private sqlConnection; constructor(id: string, name: string, properties: DesignTableConfig); /** * Execute design table operations */ execute(api: SolidWorksAPI): Promise; /** * Load data from SQL database */ private loadFromSQL; /** * Get simulated data for testing */ private getSimulatedData; /** * Map SQL row data to design table parameters */ private mapSQLToParameters; /** * Convert value to appropriate data type */ private convertValue; /** * Evaluate formula with row data */ private evaluateFormula; /** * Update design table in SolidWorks */ private updateDesignTable; /** * Convert to VBA code */ toVBACode(): string; /** * Convert to macro code */ toMacroCode(): string; /** * Get required capabilities */ getRequiredCapabilities(): string[]; /** * Sanitize name for VBA */ private sanitizeName; /** * Refresh data from source */ refresh(api: SolidWorksAPI): Promise; /** * Validate design table configuration */ validateConfiguration(): ValidationResult; } export declare function isDesignTableResource(resource: any): resource is DesignTableResource; export {}; //# sourceMappingURL=design-table.d.ts.map