/** * This module contains the TypeScript definitions of a Graph Query * and functions to build those filters based on path, * preview parameters, etc. * * This is used internally in the SDK */ /** * Creates a {@linkcode ContentInput} object that filters results by a specific URL path. * * @param path - The URL path to filter by. * @param host - Optional base URL/domain to filter by. Useful when multiple sites share the same CMS instance, * ensuring content is retrieved only from the specified domain (e.g., "https://example.com"). * @returns A `GraphQueryArguments` object with a `where` clause that matches the given path. */ export declare function pathFilter(path: string, host?: string): ContentInput; /** * Creates a {@linkcode ContentInput} object for previewing content based on key, version, and locale. * * @param params - An object containing the following properties: * @param params.key - The unique key identifying the content. * @param params.ver - The version of the content to preview. * @param params.loc - The locale of the content to preview. * * @returns A `GraphQueryArguments` object with a `where` clause filtering by key, version, and locale. */ export declare function previewFilter(params: { key: string; ver: string; loc: string; }): ContentInput; export declare function variationFilter(value: string): ContentInput; export declare function localeFilter(locale?: string[]): ContentInput; /** * Creates a {@linkcode ContentInput} object that filters by GraphReference (key, locale, version). * * @param reference - GraphReference object containing key and optional parameters * @returns A `ContentInput` object with a `where` clause filtering by the reference */ export declare function referenceFilter(reference: { key: string; locale?: string; version?: string; }): ContentInput; /** * Arguments for querying content via the Graph API. */ export type ContentInput = { locale?: string[]; variation?: GraphVariationInput; where?: ContentWhereInput; }; export type GraphVariationInput = { include: 'NONE'; } | { include: 'ALL'; } | { include: 'SOME'; value: string[]; includeOriginal?: boolean; }; type ContentWhereInput = { _and?: ContentWhereInput[]; _or?: ContentWhereInput[]; _fulltext?: StringFilterInput; _modified?: DateFilterInput; _metadata?: IContentMetadataWhereInput; }; type StringFilterInput = ScalarFilterInput & { like?: string; startsWith?: string; endsWith?: string; in?: string[]; notIn?: string[]; match?: string; contains?: string; synonyms?: ('ONE' | 'TWO')[]; fuzzly?: boolean; }; type DateFilterInput = ScalarFilterInput & { gt?: string; gte?: string; lt?: string; lte?: string; decay?: { origin?: string; scale?: number; rate?: number; }; }; type IContentMetadataWhereInput = { key?: StringFilterInput; locale?: StringFilterInput; fallbackForLocale?: StringFilterInput; version?: StringFilterInput; displayName?: StringFilterInput; url?: ContentUrlInput; types?: StringFilterInput; published?: DateFilterInput; status?: StringFilterInput; changeset?: StringFilterInput; created?: DateFilterInput; lastModified?: DateFilterInput; sortOrder?: IntFilterInput; variation?: StringFilterInput; }; type IntFilterInput = ScalarFilterInput & { gt?: number; gte?: number; lt?: number; lte?: number; in?: number[]; notIn?: number[]; factor?: { value?: number; modifier?: 'NONE' | 'SQUARE' | 'SQRT' | 'LOG' | 'RECIPROCAL'; }; }; type ContentUrlInput = { type?: T; default?: T; hierarchical?: T; internal?: T; graph?: T; base?: T; }; type ScalarFilterInput = { eq?: T; notEq?: T; exist?: boolean; boost?: number; }; export {};