import { type PluginExecutionVersions, type SemVer } from "@superblocksteam/shared";
import type { ClarkStateHandlerParams } from "../../../state-machine/clark-fsm.js";
/**
 * Core type definitions - control flow and base types only
 * Integration-specific types are provided by getIntegrationTypeDefinition
 *
 * @remarks Exported for testing purposes to validate completeness
 */
export declare const TYPE_DEFINITIONS = "\n## Core Type Definitions\n\nThese are the core type definitions for control flow blocks and base types in Superblocks APIs:\n\n```typescript\n// @superblocksteam/library\n\nexport type JsonValue = any;\n\nexport type State = { [key: string]: JsonValue };\n\nexport type Binding<T> = T | ((state: State) => T);\n\nexport declare abstract class Block {\n  protected name: string;\n\n  constructor(name: string);\n}\n\nexport declare abstract class Integration extends Block {\n  constructor(name: string, integration: string);\n}\n\n// Control Flow Blocks\n\nexport type Condition = {\n  when: Binding<boolean>;\n  then: Block[];\n};\n\nexport type Conditions = {\n  if: Condition;\n  elif?: Condition[];\n  else?: Block[];\n};\n\nexport declare class Conditional extends Block {\n  public conditions: Conditions;\n\n  constructor(name: string, config: Conditions);\n}\n\nexport declare class Loop extends Block {\n  constructor(\n    name: string,\n    config:\n      | {\n          type?: \"TYPE_FOREACH\"; // Optional - defaults to TYPE_FOREACH\n          over: Binding<JsonValue[]>;\n          variables: { item: string; index: string };\n          blocks: Block[];\n        }\n      | {\n          type: \"TYPE_WHILE\"; // Required for TYPE_WHILE\n          condition: Binding<boolean>;\n          blocks: Block[];\n        }\n  );\n  public static fromJSON(json: any, entities: string[]): Loop;\n}\n\nexport declare class Parallel extends Block {\n  constructor(\n    name: string,\n    config:\n      | {\n          mode: \"dynamic\";\n          over: Binding<JsonValue[]>;\n          // variables defaults to { item: \"item\" } - only specify if you need a different name\n          blocks: Block[];\n        }\n      | {\n          mode: \"static\";\n          paths: Record<string, Block[]>;\n        }\n  );\n  public static fromJSON(json: any, entities: string[]): Parallel;\n}\n\nexport declare class Variables extends Block {\n  constructor(\n    name: string,\n    variables: { key: string; value: Binding<JsonValue> }[],\n  );\n  public static fromJSON(json: any, entities: string[]): Variables;\n}\n\nexport declare class TryCatch extends Block {\n  constructor(\n    name: string,\n    config: {\n      try: Block[];\n      catch: Block[];\n      finally?: Block[];\n      variables: { error: string };\n    },\n  );\n}\n\nexport declare class Throw extends Block {\n  constructor(\n    name: string,\n    config: {\n      error: Binding<JsonValue>;\n    },\n  );\n}\n\nexport declare class Return extends Block {\n  constructor(\n    name: string,\n    config: {\n      data: Binding<JsonValue>;\n    },\n  );\n}\n\nexport declare class Break extends Block {\n  constructor(\n    name: string,\n    config: {\n      condition: Binding<JsonValue>;\n    },\n  );\n}\n\n// API and Authorization\n\nexport type Authorization =\n  | {\n      type: \"AUTHORIZATION_TYPE_APP_USERS\";\n    }\n  | {\n      type: \"AUTHORIZATION_TYPE_JS_EXPRESSION\";\n      expression: Binding<boolean>;\n    };\n\nexport declare class Api {\n  constructor(name: string, blocks?: Block[], authorization?: Authorization);\n}\n```\n\n**Note:** Integration-specific type definitions (PostgreSQL, Snowflake, OpenApi, etc.) are provided when you specify `integrationIds` in the tool call. JavaScript and Python block definitions are included in the \"Built-in Blocks\" section.\n";
/**
 * Minimum plugin versions required for parameterized query support.
 * These versions align with VERSION_SPECIFIC_TYPE_DEFINITIONS in integration-types.ts.
 *
 * @remarks Exported for testing purposes to validate consistency with VERSION_SPECIFIC_TYPE_DEFINITIONS
 */
export declare const SQL_PLUGIN_MIN_VERSIONS_FOR_PARAMETERS: Record<string, SemVer>;
/**
 * Check if any SQL plugin in the organization supports parameterized queries
 * based on its execution version.
 *
 * @param pluginVersions - Map of plugin IDs to their execution versions
 * @returns true if at least one SQL plugin has a version that supports parameters
 *
 * @remarks Exported for testing purposes
 */
export declare function anySqlPluginSupportsParameters(pluginVersions?: PluginExecutionVersions): boolean;
/**
 * Get SQL best practices section with conditional parameterized queries documentation.
 * Only includes parameterized queries guidance when:
 * 1. The feature flag is enabled, AND
 * 2. At least one SQL plugin has a version that supports parameters
 *
 * @param options - Configuration options including feature flags and plugin versions
 * @returns SQL best practices documentation string
 *
 * @remarks Exported for testing purposes
 */
export declare function getSqlBestPractices(options?: {
    parameterizedApisEnabled?: boolean;
    pluginExecutionVersions?: PluginExecutionVersions;
}): string;
/**
 * API structure requirements
 *
 * @remarks Exported for testing purposes to validate completeness
 */
export declare const API_STRUCTURE = "\n## \uD83C\uDFD7\uFE0F API Structure Requirements\n\n### File Structure\n```typescript\n// Path: /apis/apiName.ts\n\n// \u2705 ALWAYS import the required types from the library\nimport {\n  Api,\n  JavaScript,\n  Python,\n  Databricks,\n  Snowflake,\n  PostgreSQL,\n  GraphQL,\n  RestApi,\n  S3,\n  Email,\n  Conditional,\n  TryCatch,\n  Loop,\n  Parallel,\n  Throw,\n  Return,\n  Break,\n} from \"@superblocksteam/library\";\n\n// \u274C NEVER define constants here - they won't be serialized!\n\n// \u2705 ALL logic must be inside new Api()\nexport default new Api(\"apiName\", [\n  // Workflow blocks here\n]);\n```\n\n**\uD83D\uDEA8 CRITICAL:** Only code inside `new Api()` is serialized. Constants/helpers defined outside cause `ReferenceError` at runtime.\n\n### Basic Workflow Structure\n```typescript\n// 1. Input validation\n// 2. Data fetching (integrations)\n// 3. Data processing (JavaScript/Python)\n// 4. Error handling (Try/Catch)\n// 5. Return formatted output\n```\n";
/**
 * Get integration-specific documentation based on plugin type
 */
export declare function getIntegrationSpecificDocs(pluginId: string): string;
/**
 * Build documentation for specific integrations including TypeScript types
 */
export declare function buildIntegrationDocumentation(integrationIds: string[], services: ClarkStateHandlerParams): string;
/**
 * Get relevant examples based on integration types
 */
export declare function getRelevantExamples(integrationIds: string[], services: ClarkStateHandlerParams): string;
export declare const getApiDocsToolFactory: import("../../tools2/types.js").ToolFactory<ClarkStateHandlerParams, import("../../tools2/types.js").Tool<{
    integrationIds?: string[] | undefined;
    sections?: ("checklist" | "examples" | "error-handling" | "core" | "types" | "integration-workflow" | "scoping" | "patterns" | "sql-best-practices" | "database-naming" | "response-interface" | "runtime-safety" | "error-recovery" | "loop-control" | "api-structure" | "critical-mistakes" | "built-in-blocks")[] | undefined;
    verbosity?: "minimal" | "standard" | "comprehensive" | undefined;
}, {
    documentation: string;
    integrationCount: number;
    sectionsIncluded: string[];
    verbosity: "minimal" | "standard" | "comprehensive";
}>>;
//# sourceMappingURL=get-api-docs.d.ts.map