import { type FilterShape, type VariationMode } from './filters.js'; import { FragmentOptions, QueryContext } from '../util/queryUtils.js'; /** * Result of fragment generation containing both the fragment strings and metadata. */ type FragmentResult = { fragments: string[]; includesDamAssetsFragments: boolean; }; export type ItemsResponse = { _Content: { items: ({ __typename: string; _metadata: { variation: string; }; } & T)[]; }; }; /** * Builds a GraphQL fragment for the requested content-type **and** returns every nested fragment it depends on. * @param contentTypeName Name/key of the content-type to expand. * @param visited Set of fragment names already on the stack. * @param suffix Optional suffix for the fragment name. * @param ctx Settings fixed for the whole query. Passed through recursion * unchanged, so every fragment in the document agrees. * @param options Settings that may differ between one fragment and the next. * @returns Fragment result containing fragments array and DAM flag. */ export declare const createFragment: (contentTypeName: string, visited?: Set, suffix?: string, ctx?: QueryContext, options?: FragmentOptions) => FragmentResult; /** * The public shape callers pass to the query builders: every field optional, so * a caller only states what it cares about. It is turned into a strict * {@linkcode QueryContext} once, at the boundary, and never rebuilt after that. */ export type QueryOptions = Partial & FragmentOptions & { filterShape?: FilterShape; variationMode?: VariationMode; publishedOnly?: boolean; }; /** * Generates a complete GraphQL query for fetching one item. * * @param contentType - The key of the content type to query. * @param options - Query metadata options controlling fragment and DAM behavior. * @returns A string representing the GraphQL query. */ export declare const createSingleContentQuery: (contentType: string, options?: Partial & FragmentOptions & { filterShape?: FilterShape; variationMode?: VariationMode; publishedOnly?: boolean; }) => string; /** * Generates a complete GraphQL query for fetching multiple items. * All items must have the same content type. * * @param contentType - The key of the content type to query. * @param options - Query metadata options controlling fragment and DAM behavior. * @returns A string representing the GraphQL query. */ export declare const createMultipleContentQuery: (contentType: string, options?: Partial & FragmentOptions & { filterShape?: FilterShape; variationMode?: VariationMode; publishedOnly?: boolean; }) => string; export {};