/** * GraphQL integration client base class. * * Provides the foundation for GraphQL integration clients with query() and mutation() methods. * Handles proto message construction and response validation. */ import { z } from "zod"; import type { QueryExecutor, TraceMetadata } from "../registry.js"; import type { IntegrationConfig, IntegrationClientImpl } from "../types.js"; /** * Base class for GraphQL integration clients. * * This class handles: * - Building graphql.v1.Plugin proto messages * - Executing queries and mutations through the orchestrator * - Required Zod schema validation on full GraphQL response * - Variables serialization for parameterized queries * - Optional per-request HTTP headers (in addition to any headers configured * on the integration) */ export declare abstract class GraphQLIntegrationClient implements IntegrationClientImpl { readonly name: string; readonly pluginId: string; readonly config: IntegrationConfig; private executeQuery; constructor(config: IntegrationConfig, executeQuery: QueryExecutor); /** * Execute a GraphQL query. * * @param query - GraphQL query string * @param schema - Zod schema for full response validation (REQUIRED) * @param variables - Optional variables for the query * @param metadata - Optional trace metadata for observability * @param headers - Optional HTTP headers to send with the request * @returns Validated query result */ query(query: string, schema: { response: z.ZodSchema; }, variables?: Record, metadata?: TraceMetadata, headers?: Record): Promise; /** * Execute a GraphQL mutation. * * @param mutation - GraphQL mutation string * @param schema - Zod schema for full response validation (REQUIRED) * @param variables - Optional variables for the mutation * @param metadata - Optional trace metadata for observability * @param headers - Optional HTTP headers to send with the request * @returns Validated mutation result */ mutation(mutation: string, schema: { response: z.ZodSchema; }, variables?: Record, metadata?: TraceMetadata, headers?: Record): Promise; /** * Execute a GraphQL operation (query or mutation). * * Builds the graphql.v1.Plugin proto message, executes through orchestrator, * and validates the full response against the required schema. */ private executeGraphQL; } //# sourceMappingURL=graphql-integration-client.d.ts.map