import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { Create, Search, Trigger } from 'zapier-platform-core'; import { Transformer, ActionExtender, ToolExtender, NamedImport } from '../types.js'; /** * Create an action extender for fluent modification * @param action The action to extend * @returns An ActionExtender instance */ export declare function extendAction(action: T): ActionExtender; /** * Define transformations for customizing MCP tool conversion to Zapier actions * * @example * ```typescript * import { defineTransformer } from '@zapier/mcp-integration'; * import updatePageInputFields from '../utils/updatePageInputFields'; * import { withNamedImport } from '@zapier/mcp-integration'; * * export const transformer = defineTransformer({ * transformCreate: (action, tool) => { * if (tool.name === 'notion-update-page') { * return extendAction(action) * .appendFields(updatePageInputFields) * .replaceSample(withNamedImport('../samples/updatePageSample.js', 'updatePageSample')) * .build(); * } * return action; * } * }); * * // Use in MCPIntegration config: * const mcp = new MCPIntegration({ * transformer, * // ... other config * }); * ``` * * @param transformer The transformer definition * @returns A validated transformer instance */ export declare function defineTransformer(transformer: Transformer): Transformer; /** * Create a tool extender for fluent modification * @param tool The tool to extend * @returns A ToolExtender instance */ export declare function extendTool(tool: Tool): ToolExtender; /** * Creates a named import reference for use in action generation * * @example * ```typescript * action.replacePerform(withNamedImport('../utils/updatePagePerform.js', 'updatePagePerform')) * action.replaceSample(withNamedImport('../samples/updatePageSample.js', 'updatePageSample')) * ``` * * @param path - Path to the module to import from (relative to the generated file) * @param name - Name of the export to import * @returns A NamedImport object that will be converted to an import statement during generation */ export declare function withNamedImport(path: string, name: string): NamedImport; //# sourceMappingURL=defineTransformer.d.ts.map