import type * as v from 'valibot'; import type { GqlOperation } from '../../../gql/operation/GqlOperation.js'; import type { EnrichmentRequest } from '../../../types/EnrichmentRequest.js'; import type { IsSupportedGqlOperationArgs, ToGqlOperationPreviewModuleArgs, TransformGqlOperationArgs } from './types.js'; import type { PreviewModule } from '../../../types/Preview.js'; /** * Configuration arguments for creating GraphQL operation generator entries. * * Defines the structure for operation generator configuration including transform * functions, enrichment schemas, preview/mapping modules, and support validation. * * @template EnrichmentType - Type of enrichment data this operation can provide */ export type ToGqlOperationConfigArgs = { id: string; transform: ({ context, operation, variant }: TransformGqlOperationArgs) => void; toEnrichmentSchema: () => v.GenericSchema; isSupported?: (args: IsSupportedGqlOperationArgs) => boolean; /** * Optional: whether this generator entry supports variants. Defaults to a * function returning `false` when omitted. */ supportsVariant?: () => boolean; toPreviewModule?: ({ context, operation }: ToGqlOperationPreviewModuleArgs) => PreviewModule; toEnrichmentRequest?: (operation: GqlOperation) => EnrichmentRequest | undefined; }; export type GqlOperationEntry = { id: string; type: 'gqlOperation'; transform: ({ context, operation, variant }: TransformGqlOperationArgs) => void; toEnrichmentSchema: () => v.GenericSchema; isSupported: (args: IsSupportedGqlOperationArgs) => boolean; supportsVariant: () => boolean; toPreviewModule?: ({ context, operation }: ToGqlOperationPreviewModuleArgs) => PreviewModule; toEnrichmentRequest?: (operation: GqlOperation) => EnrichmentRequest | undefined; }; /** * Creates a configured GraphQL operation generator entry. * * Transforms operation configuration arguments into a standardized operation generator * entry that can be used within the SKMTC generation pipeline. Provides type-safe * GraphQL-operation processing with optional enrichment support and preview capabilities. * * @template EnrichmentType - Type of enrichment data this operation provides * @param config - Configuration object defining operation behavior * @returns Configured operation generator entry ready for pipeline integration */ export declare const toGqlOperationEntry: ({ id, transform, toEnrichmentSchema, isSupported, supportsVariant, toPreviewModule, toEnrichmentRequest }: ToGqlOperationConfigArgs) => GqlOperationEntry;