/** * Integration client registry and factory. * * Maps plugin IDs to their corresponding client implementations * and provides factory functions for creating clients. */ import type { IntegrationConfig, IntegrationClientImpl } from "./types.js"; /** * Supported plugin IDs mapped to their client constructors. */ export declare const SUPPORTED_PLUGINS: { readonly postgres: "postgres"; readonly slack: "slack"; readonly openai_v2: "openai_v2"; readonly anthropic: "anthropic"; readonly stripe: "stripe"; readonly github: "github"; readonly notion: "notion"; readonly snowflake: "snowflake"; readonly snowflakecortex: "snowflakecortex"; readonly airtable: "airtable"; readonly asana: "asana"; readonly bitbucket: "bitbucket"; readonly box: "box"; readonly circleci: "circleci"; readonly cohere: "cohere"; readonly confluence: "confluence"; readonly datadog: "datadog"; readonly dropbox: "dropbox"; readonly elasticsearch: "elasticsearch"; readonly fireworks: "fireworks"; readonly front: "front"; readonly gemini: "gemini"; readonly googleanalytics: "googleanalytics"; readonly googledrive: "googledrive"; readonly graphqlintegration: "graphqlintegration"; readonly groq: "groq"; readonly hubspot: "hubspot"; readonly intercom: "intercom"; readonly jira: "jira"; readonly launchdarkly: "launchdarkly"; readonly mistral: "mistral"; readonly pagerduty: "pagerduty"; readonly perplexity: "perplexity"; readonly segment: "segment"; readonly sendgrid: "sendgrid"; readonly stabilityai: "stabilityai"; readonly twilio: "twilio"; readonly zendesk: "zendesk"; readonly zoom: "zoom"; readonly mysql: "mysql"; readonly mariadb: "mariadb"; readonly mssql: "mssql"; readonly cockroachdb: "cockroachdb"; readonly oracledb: "oracledb"; readonly redshift: "redshift"; readonly athena: "athena"; readonly databricks: "databricks"; readonly bigquery: "bigquery"; readonly mongodb: "mongodb"; readonly dynamodb: "dynamodb"; readonly cosmosdb: "cosmosdb"; readonly s3: "s3"; readonly gcs: "gcs"; readonly gsheets: "gsheets"; readonly salesforce: "salesforce"; readonly "superblocks-ocr": "superblocks-ocr"; readonly lakebase: "lakebase"; readonly snowflakepostgres: "snowflakepostgres"; readonly smtp: "smtp"; readonly restapiintegration: "restapiintegration"; }; export type SupportedPluginId = (typeof SUPPORTED_PLUGINS)[keyof typeof SUPPORTED_PLUGINS]; /** * Flat list of SDK-supported plugin IDs. * Useful for compatibility checks where only the ID set matters. */ export declare const SUPPORTED_PLUGIN_IDS: SupportedPluginId[]; /** * Optional metadata attached to an integration call for diagnostics. * * When `includeDiagnostics` is enabled, the `label` and `description` * are captured alongside the standard timing/input/output data and * surfaced in the Trace View UI. * * **Security:** Do not include secrets, passwords, access tokens, or other * sensitive/PII data in trace metadata, as it may be stored in logs or trace * payloads and visible to others with access to diagnostics. */ export interface TraceMetadata { /** Short human-readable label for this call (e.g., "Fetch active users"). */ label?: string; /** Longer description of what this call does and why. */ description?: string; } /** * Type for the query executor function provided by the orchestrator. * * Accepts a plugin request object that matches the protobuf Plugin definition * for the specific integration type (e.g., postgresql.v1.Plugin, restapi.v1.Plugin). * * @param request - Plugin-specific request object matching the proto schema * @param bindings - Optional bindings data for binding resolution * @param metadata - Optional trace metadata (label, description) for diagnostics * @returns Promise resolving to the operation result */ export type QueryExecutor = (request: Record, bindings?: Record, metadata?: TraceMetadata) => Promise; /** * Options for creating an integration client. */ export interface CreateClientOptions { /** Integration configuration from the orchestrator */ config: IntegrationConfig; /** Function to execute queries/operations against the integration */ executeQuery: QueryExecutor; } /** * Creates an integration client based on the plugin ID. * * This factory function is called by the runtime to create typed * integration clients that the user's API code can interact with. * * @param options - Client creation options * @returns The appropriate typed client implementation * @throws Error if the plugin ID is not supported * * @example * ```typescript * const client = createClient({ * config: { * id: 'int_123', * name: 'Production Postgres', * pluginId: 'postgres', * configuration: {}, * }, * executeQuery: orchestratorExecutor, * }); * ``` */ export declare function createClient(options: CreateClientOptions): IntegrationClientImpl; /** * Checks if a plugin ID is supported by the SDK. * * @param pluginId - The plugin ID to check * @returns True if the plugin is supported */ export declare function isPluginSupported(pluginId: string): pluginId is SupportedPluginId; //# sourceMappingURL=registry.d.ts.map