import type { PlexObject } from './base/plexObject.ts'; import type { PlexServer } from './server.ts'; export type QueryParamValue = string | number | boolean | null | undefined; export type ItemFilterValue = string | number | boolean; export type PlexItemData = Record; export type PlexItemParent = unknown; export interface PlexItemConstructor { readonly TAG?: string | null; new (server: PlexServer, data: PlexItemData, initpath?: string, parent?: PlexObject): T; } /** * Builds a Plex object query path and ensures object fetches include GUID data. */ export declare function buildQueryKey(ekey: string | number, params?: Record): string; export declare const OPERATORS: { exact: (value: unknown, query: ItemFilterValue) => boolean; iexact: (value: unknown, query: ItemFilterValue) => boolean; contains: (value: unknown, query: ItemFilterValue) => boolean; icontains: (value: unknown, query: ItemFilterValue) => boolean; ne: (value: unknown, query: ItemFilterValue) => boolean; in: (value: unknown, query: ItemFilterValue) => boolean; gt: (value: unknown, query: ItemFilterValue) => boolean; gte: (value: unknown, query: ItemFilterValue) => boolean; lt: (value: unknown, query: ItemFilterValue) => boolean; lte: (value: unknown, query: ItemFilterValue) => boolean; startswith: (value: unknown, query: ItemFilterValue) => boolean; istartswith: (value: unknown, query: ItemFilterValue) => boolean; endswith: (value: unknown, query: ItemFilterValue) => boolean; iendswith: (value: unknown, query: ItemFilterValue) => boolean; }; /** * Load the specified key to find and build the first item with the * specified tag and attrs. If no tag or attrs are specified then * the first item in the result set is returned. * * @param ekey Path in Plex to fetch items from. If an int is passed * in, the key will be translated to /library/metadata/. This allows * fetching an item only knowing its key-id. */ export declare function fetchItem(server: PlexServer, ekey: string | number, options?: Record, cls?: Pick, 'TAG'>): Promise; /** * Load the specified key to find and build all items with the specified tag * and attrs. See :func:`~plexapi.base.PlexObject.fetchItem` for more details * on how this is used. */ export declare function fetchItems(server: PlexServer, ekey: string, options: Record | undefined, Cls: PlexItemConstructor, parent?: PlexItemParent): Promise; export declare function fetchItems(server: PlexServer, ekey: string, options?: Record): Promise; /** * Load the specified data to find and build all items with the specified tag * and attrs. See :func:`~plexapi.base.PlexObject.fetchItem` for more details * on how this is used. */ export declare function findItems(data: readonly unknown[] | undefined, options: Record | undefined, Cls: PlexItemConstructor, server: PlexServer, parent?: PlexItemParent): T[]; export declare function findItems(data: readonly T[] | undefined, options?: Record): T[];