import { type BooleanValueNode, type ConstDirectiveNode, type ConstValueNode, type EnumValueDefinitionNode, type EnumValueNode, type FieldDefinitionNode, type FloatValueNode, type InputValueDefinitionNode, type IntValueNode, Kind, type NullValueNode, OperationTypeNode, type StringValueNode, type TypeNode } from 'graphql'; import { type AuthorizationData, type ChildData, type CompositeOutputData, type ConditionalFieldData, type DefinitionData, type EnumDefinitionData, type EnumValueData, type ExternalFieldData, type FederatedDirectivesData, type FieldData, type InputObjectDefinitionData, type InterfaceDefinitionData, type NodeData, type ObjectDefinitionData, type ParentDefinitionData, type SchemaData } from './types/types'; import { type MutableFieldNode } from './ast'; import { type InterfaceTypeNode, type ObjectTypeNode, type ParentTypeNode } from '../ast/utils'; import { type SubscriptionFilterValue } from '../router-configuration/types'; import { type InputNodeKind, type OutputNodeKind } from '../utils/types'; import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../types/types'; import { type CompareAndValidateInputDefaultValuesParams, type DirectiveDefinitionNodeFromDataParams, type GetRouterFederatedDirectiveNodesParams, type IsTypeValidImplementationParams, type RouterSchemaFieldNodeFromDataParams, type RouterSchemaInputValueNodeFromDataParams, type RouterSchemaNodeFromDataParams, type SanitizeDefaultValueParams } from './types/params'; import { type GetFederatedDirectiveNodesResult, type RouterSchemaFieldNodeFromDataResult, type RouterSchemaInputValueNodeFromDataResult, type RouterSchemaNodeFromDataResult } from './types/results'; import { type ExecutionMultiResult, type ExecutionSingleFailureResult } from '../types/results'; import { type DirectiveArgumentData } from '../directive-definition-data/types/types'; export declare function newFederatedDirectivesData(): FederatedDirectivesData; type IsNodeExternalOrShareableResult = { isExternal: boolean; isShareable: boolean; }; export declare function isNodeExternalOrShareable(node: ObjectTypeNode | FieldDefinitionNode, areAllFieldsShareable: boolean, directivesByName: Map>): IsNodeExternalOrShareableResult; export declare function isTypeRequired(node: TypeNode): boolean; export declare function isTypeNodeListType(node: TypeNode): boolean; export declare function areDefaultValuesCompatible(typeNode: TypeNode, incomingDefaultValue: ConstValueNode): boolean; export declare function compareAndValidateInputDefaultValues({ existingData, incomingData, }: CompareAndValidateInputDefaultValuesParams): ExecutionSingleFailureResult; export declare function isTypeNameRootType(typeName: string, operationByTypeName: Map): boolean; export declare function getRenamedRootTypeName(typeName: string, operationByTypeName: Map): string; type ChildDefinitionNode = EnumValueDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode; export declare function childMapToValueArray(map: Map): Array; export declare function setLongestDescription(existingData: DefinitionData, incomingData: DefinitionData): void; export declare function isParentDataRootType(parentData: ParentDefinitionData): boolean; export declare function isInterfaceDefinitionData(data: ParentDefinitionData): data is InterfaceDefinitionData; export declare function setParentDataExtensionType(existingData: ParentDefinitionData, incomingData: ParentDefinitionData): void; export declare function upsertDeprecatedDirective(federatedDirectivesData: FederatedDirectivesData, incomingDirectiveNode: ConstDirectiveNode): void; export declare function upsertTagDirectives(federatedDirectivesData: FederatedDirectivesData, incomingDirectiveNodes: ConstDirectiveNode[]): void; export declare function propagateAuthDirectives(parentData: ParentDefinitionData, authData?: AuthorizationData): void; export declare function propagateFieldAuthDirectives(fieldData: FieldData, authData?: AuthorizationData): void; export declare function generateDeprecatedDirective(reason: string): ConstDirectiveNode; export declare function getNodeCoords(data: NodeData): string; export declare function extractUniqueDirectiveNodes(directiveNodes: Array): Array; export declare function getRouterSchemaDirectiveNodes({ data, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: GetRouterFederatedDirectiveNodesParams): GetFederatedDirectiveNodesResult; export declare function getClientFederatedDirectiveNodes(nodeData: T): ConstDirectiveNode[]; export declare function getClientSchemaFieldNodeByFieldData(fieldData: FieldData): MutableFieldNode; export declare function routerSchemaFieldNodeFromData({ argumentNodes, data, description, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: RouterSchemaFieldNodeFromDataParams): RouterSchemaFieldNodeFromDataResult; export declare function routerSchemaInputValueNodeFromData({ data, description, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: RouterSchemaInputValueNodeFromDataParams): RouterSchemaInputValueNodeFromDataResult; export declare function routerSchemaNodeFromData({ data, description, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: RouterSchemaNodeFromDataParams): RouterSchemaNodeFromDataResult; export declare function propagateDirectiveDefinitionNodeFromData({ data, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: DirectiveDefinitionNodeFromDataParams): ExecutionMultiResult; type InvalidFieldNames = { byShareable: Set; subgraphNamesByExternalFieldName: Map>; }; export declare function newInvalidFieldNames(): { byShareable: Set; subgraphNamesByExternalFieldName: Map; }; export declare function validateExternalAndShareable(fieldData: FieldData, invalidFieldNames: InvalidFieldNames): void; export declare enum MergeMethod { UNION = 0, INTERSECTION = 1, CONSISTENT = 2 } export declare function isTypeValidImplementation({ concreteTypeNamesByAbstractTypeName, implementationType, interfaceImplementationTypeNamesByInterfaceTypeName, originalType, }: IsTypeValidImplementationParams): boolean; export declare function isNodeDataInaccessible(data: NodeData): boolean; export declare function isLeafKind(kind: Kind): boolean; export declare function getSubscriptionFilterValue(valueNode: BooleanValueNode | EnumValueNode | FloatValueNode | IntValueNode | NullValueNode | StringValueNode): SubscriptionFilterValue; export declare function getParentTypeName(parentData: CompositeOutputData): TypeName; export declare function newConditionalFieldData(): ConditionalFieldData; export declare function getDefinitionDataCoords(data: NodeData, useFederatedCoords: boolean): string; export declare function isParentDataCompositeOutputType(data: ParentDefinitionData): data is ObjectDefinitionData | InterfaceDefinitionData; export declare function newExternalFieldData(isDefinedExternal: boolean): ExternalFieldData; export declare function getInitialFederatedDescription(data: NodeData | DirectiveArgumentData): StringValueNode | undefined; export declare function areKindsEqual(a: T, b: ParentDefinitionData): b is T; export declare function isFieldData(data: ChildData | NodeData | SchemaData): data is FieldData; export declare function isInputObjectDefinitionData(data: ParentDefinitionData): data is InputObjectDefinitionData; export declare function isInputNodeKind(kind: Kind): kind is InputNodeKind; export declare function isOutputNodeKind(kind: Kind): kind is OutputNodeKind; export declare function isInterfaceNode(node: ParentTypeNode): node is InterfaceTypeNode; export declare function isEnumData(data: ParentDefinitionData): data is EnumDefinitionData; export declare function sanitizeDefaultValue({ data, namedTypeData, node }: SanitizeDefaultValueParams): void; export {};