import { type ConstDirectiveNode, type ConstObjectValueNode, type DefinitionNode, type DirectiveDefinitionNode, type NamedTypeNode, type StringValueNode } from 'graphql'; import { type MutableDefinitionNode, type MutableInputValueNode, type MutableTypeNode } from '../../schema-building/ast'; import { type ExecutionMultiResult } from '../../types/results'; import { type ChildTagData, type InterfaceImplementationData, type InterfaceObjectForInternalGraphOptions, type ParentTagData, type SubscriptionFilterData } from './utils'; import { type FieldConfiguration, type SubscriptionCondition, type SubscriptionFieldCondition } from '../../router-configuration/types'; import { type AuthorizationData, type ChildData, type CompositeOutputData, type EntityData, type EntityInterfaceFederationData, type EnumValueData, type FederatedDirectivesData, type FieldData, type InputObjectDefinitionData, type InputValueData, type InterfaceDefinitionData, type NodeData, type ObjectDefinitionData, type ParentDefinitionData, type UnionDefinitionData } from '../../schema-building/types/types'; import { MergeMethod } from '../../schema-building/utils'; import { type FederateTypeParams, type FederateTypeResult } from '../schema-building/type-merging'; import { type Graph } from '../../resolvability-graph/graph'; import { type GraphNode } from '../../resolvability-graph/graph-nodes'; import { type InternalSubgraph } from '../../subgraph/types'; import { type Warning } from '../../warnings/types'; import { type ContractTagOptions, type FederationResult, type FederationResultWithContracts, type MutualParentDefinitionData } from '../../federation/types/types'; import { type SubscriptionFilterTargetResult } from '../../federation/types/results'; import type { GraphFieldData } from '../../utils/types'; import { type DirectiveName, type FieldCoords, type InterfaceTypeName, type SubgraphName, type TypeName } from '../../types/types'; import { type ExtractFederatedDirectivesParams, type FederateSubgraphsContractV1Params, type FederateSubgraphsWithContractsV1Params, type FederationFactoryParams, type FederationParams, type MergeSubscriptionFilterTargetResultParams, type UpsertDirectiveArgumentDataParams, type ValidateOneOfDirectiveParams, type ValidateSubscriptionFilterAndGenerateConfigurationParams } from './types/params'; import type { CompositionOptions } from '../../types/params'; import { type DirectiveArgumentData, type DirectiveDefinitionData } from '../../directive-definition-data/types/types'; export declare class FederationFactory { #private; authorizationDataByParentTypeName: Map; coordsByNamedTypeName: Map>; directiveDefinitionByName: Map; clientDefinitions: Array; currentSubgraphName: string; concreteTypeNamesByAbstractTypeName: Map>; subgraphNamesByNamedTypeNameByFieldCoords: Map>>; entityDataByTypeName: Map; entityInterfaceFederationDataByTypeName: Map; executableDirectiveDatasByName: Map>; errors: Array; federatedDirectiveDataByName: Map; fieldConfigurationByFieldCoords: Map; fieldCoordsByNamedTypeName: Map>; inaccessibleCoords: Set; inaccessibleRequiredInputValueErrorByCoords: Map; interfaceImplementationTypeNamesByInterfaceTypeName: Map>; internalGraph: Graph; internalSubgraphBySubgraphName: Map; invalidORScopesCoords: Set; isMaxDepth: boolean; isVersionTwo: boolean; namedInputValueTypeNames: Set; namedOutputTypeNames: Set; options: CompositionOptions; parentDefinitionDataByTypeName: Map; parentTagDataByTypeName: Map; referencedFederatedDirectiveNames: Set; routerDefinitions: Array; subscriptionFilterDataByFieldPath: Map; tagNamesByCoords: Map>; warnings: Array; constructor({ authorizationDataByParentTypeName, concreteTypeNamesByAbstractTypeName, entityDataByTypeName, entityInterfaceFederationDataByTypeName, executableDirectiveDatasByName, federatedDirectiveDataByName, fieldCoordsByNamedTypeName, interfaceImplementationTypeNamesByInterfaceTypeName, internalGraph, internalSubgraphBySubgraphName, options, warnings, }: FederationFactoryParams); extractFederatedDirectives({ data, directivesByName }: ExtractFederatedDirectivesParams): FederatedDirectivesData; getValidImplementedInterfaces(data: CompositeOutputData): NamedTypeNode[]; addValidPrimaryKeyTargetsToEntityData(typeName: string): void; addValidPrimaryKeyTargetsFromInterfaceObject(internalSubgraph: InternalSubgraph, interfaceObjectTypeName: string, entityData: EntityData, graphNode: GraphNode): void; getEnumValueMergeMethod(enumTypeName: string): MergeMethod; generateTagData(): void; upsertEnumValueData(enumValueDataByName: Map, incomingData: EnumValueData, isParentInaccessible: boolean): void; upsertDirectiveArgumentData({ argumentDataByName, incomingData }: UpsertDirectiveArgumentDataParams): void; upsertInputValueData(inputValueDataByValueName: Map, incomingData: InputValueData, parentCoords: string, isParentInaccessible: boolean): void; handleInputValueInaccessibility(isParentInaccessible: boolean, inputValueData: InputValueData, parentCoords: string): void; handleSubscriptionFilterDirective(incomingData: FieldData, targetData?: FieldData): void; federateOutputType({ current, other, coords, mostRestrictive }: FederateTypeParams): FederateTypeResult; addSubgraphNameToExistingFieldNamedTypeDisparity(incomingData: FieldData): void; upsertFieldData(fieldDataByFieldName: Map, incomingData: FieldData, isParentInaccessible: boolean): void; getClientSchemaUnionMembers(unionData: UnionDefinitionData): NamedTypeNode[]; recordTagNamesByCoords(data: NodeData, coords?: string): void; copyMutualParentDefinitionData(sourceData: ParentDefinitionData): MutualParentDefinitionData; copyDirectiveArgumentData(sourceData: DirectiveArgumentData): DirectiveArgumentData; copyEnumValueData(sourceData: EnumValueData): EnumValueData; copyInputValueData(sourceData: InputValueData): InputValueData; copyInputValueDataByValueName(source: Map, isParentInaccessible: boolean, parentCoords: string): Map; copyFieldData(sourceData: FieldData, isInaccessible: boolean): FieldData; copyEnumValueDataByName(source: Map, isParentInaccessible: boolean): Map; copyFieldDataByName(source: Map, isParentInaccessible: boolean): Map; copyParentDefinitionData(sourceData: ParentDefinitionData): ParentDefinitionData; getParentTargetData({ existingData, incomingData, }: { existingData?: ParentDefinitionData; incomingData: ParentDefinitionData; }): ParentDefinitionData; upsertParentDefinitionData(incomingData: ParentDefinitionData, subgraphName: SubgraphName): void; propagateInaccessibilityToExistingChildren(data: InputObjectDefinitionData | InterfaceDefinitionData | ObjectDefinitionData): void; shouldUpdateFederatedFieldAbstractNamedType(abstractTypeName: string, objectTypeNames: Set): boolean; updateTypeNodeNamedType(typeNode: MutableTypeNode, namedTypeName: string): void; handleDisparateFieldNamedTypes(): void; upsertExecutableDirectiveDatas(): void; federateInternalSubgraphData(): void; handleInterfaceObjectForInternalGraph({ entityData, internalSubgraph, interfaceObjectData, interfaceObjectNode, resolvableKeyFieldSets, subgraphName, }: InterfaceObjectForInternalGraphOptions): void; handleEntityInterfaces(): void; fieldDataToGraphFieldData(fieldData: FieldData): GraphFieldData; getFederatedGraphNodeDescription(data: NodeData): StringValueNode | undefined; getValidFieldArgumentNodes(fieldData: FieldData): MutableInputValueNode[]; validateSemanticNonNull(data: FieldData): void; validateOneOfDirective({ data, inputValueNodes, requiredFieldNames }: ValidateOneOfDirectiveParams): boolean; pushParentDefinitionDataToDocumentDefinitions(interfaceImplementations: InterfaceImplementationData[]): void; pushNamedTypeAuthDataToFields(): void; federateSubgraphData(): void; validateInterfaceImplementationsAndPushToDocumentDefinitions(interfaceImplementations: InterfaceImplementationData[]): void; validatePathSegmentInaccessibility(path: string): boolean; validateReferencesOfInaccessibleType(data: ParentDefinitionData): void; validateQueryRootType(): void; validateSubscriptionFieldConditionFieldPath(conditionFieldPath: string, objectData: ObjectDefinitionData, inputFieldPath: string, directiveSubgraphName: string, fieldErrorMessages: Array): string[]; validateSubscriptionFieldCondition(objectValueNode: ConstObjectValueNode, condition: SubscriptionFieldCondition, objectData: ObjectDefinitionData, depth: number, inputPath: string, directiveSubgraphName: string): ExecutionMultiResult; validateSubscriptionFilterCondition(objectValueNode: ConstObjectValueNode, configuration: SubscriptionCondition, objectData: ObjectDefinitionData, depth: number, inputPath: string, directiveSubgraphName: string): ExecutionMultiResult; validateSubscriptionFilterForTarget(directiveNode: ConstDirectiveNode, target: ObjectDefinitionData, directiveSubgraphName: string): SubscriptionFilterTargetResult; validateSubscriptionFilterAndGenerateConfiguration({ directiveNode, objectData, fieldPath, fieldName, parentTypeName, directiveSubgraphName, }: ValidateSubscriptionFilterAndGenerateConfigurationParams): void; collectSubscriptionFilterConcreteTargets(abstractTypeName: string): Array; validateSubscriptionFiltersAndGenerateConfiguration(): void; mergeSubscriptionFilterTargetResults({ abstractTypeData, directiveNode, directiveSubgraphName, targets, }: MergeSubscriptionFilterTargetResultParams): SubscriptionFilterTargetResult; buildFederationResult(): FederationResult; getClientSchemaObjectBoolean(): { shouldIncludeClientSchema?: undefined; } | { shouldIncludeClientSchema: boolean; }; handleChildTagExclusions(parentDefinitionData: ParentDefinitionData, children: Map, childTagDataByChildName: Map, tagNames: Set): void; handleChildTagInclusions(parentDefinitionData: ParentDefinitionData, children: Map, childTagDataByChildName: Map, tagNames: Set): void; handleCustomDirectiveDefinitionNodes(): void; buildFederationContractResult(contractTagOptions: ContractTagOptions): FederationResult; federateSubgraphsInternal(): FederationResult; } export declare function federateSubgraphs({ options, subgraphs }: FederationParams): FederationResult; export declare function federateSubgraphsWithContracts({ options, subgraphs, tagOptionsByContractName, }: FederateSubgraphsWithContractsV1Params): FederationResultWithContracts; export declare function federateSubgraphsContract({ contractTagOptions, options, subgraphs, }: FederateSubgraphsContractV1Params): FederationResult;