// Copyright © 2022-2026 Partium, Inc. DBA Partium import { PFile } from '../../core'; import { TextSearchQueries } from '../services/search/text-search.service'; import { ImageCropArea } from './search-status/cv-search-status'; /** * Search-Input for searches */ export interface SearchInput { /** needed for a new search-session (can not be changed for existing search-session) */ organizationName: string; /** needed for a new search-session (can not be changed for existing search-session) */ searchLanguage: string; /** needed to continue an existing search-session */ searchSessionId?: string; /** @deprecated use the text attribute instead*/ searchQueries?: TextSearchQueries; text?: string; /** either searchImageAssetId or searchImage can be set to perform image-search */ searchImageAssetId?: string; /** either searchImageAssetId or searchImage can be set to perform image-search */ searchImage?: PFile; searchImageCropArea?: ImageCropArea; /** ids of hierarchy-nodes to filter for */ hierarchyFilters?: string[]; /** filter-names and filter-values to add as filters */ attributeFilters?: Record; /** Search for parts, similar to the one with the given id (can not be combined with any other search input, such as text, image or filter) */ similarTo?: { id?: string; partiumId?: string; }; /** Search for parts, that are duplicates of the one with the given id (can not be combined with any other search input, such as text, image or filter) */ duplicateOf?: { id?: string; partiumId?: string; }; /** Search for parts, that have related parts or are suggestions for relations/duplicates. */ hasRelatedParts?: boolean; }