// Copyright © 2022-2026 Partium, Inc. DBA Partium import { Observable } from 'rxjs'; import { BaseService, PaginatedRequestService, ServiceProvider } from '../../core'; import { FilterKey } from '../models/filter-key'; import { FilterOptionValue } from '../models/filter-option-value'; export interface FilterService { /** * Retrieves a filter key for a certain filter-id. * * @param filterKeyPartiumId the filterKeyPartiumId of the FilterKey. * @returns observable that emits with a FilterKey object. * */ getFilterKey(filterKeyPartiumId: string): Observable; /** * Retrieves all filter keys for a certain language. * * @param language (optional) language for which the filter keys should be * @param pageSize (optional) the amount of items in a page * @param cursorPaginationEnabled if true, the data will be fetched using the cursor as a paginator and return a string with the next and previous pages * retrieved for (if not provided default organization language will be used) * Language is expected to be a two-letter string, according to * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) * @returns observable that emits with a Service of type PaginatedRequestService. * This service can be used to retrieve a paginated list of the * requested filter keys. */ getFilterKeys(language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService; /** * Retrieves all filter options for the provided filter key partiumId. * * @param filterKeyPartiumId the partiumId of the FilterKey * @param cursorPaginationEnabled if true, the data will be fetched using the cursor as a paginator and return a string with the next and previous pages * @returns observable that emits with a Service of type PaginatedRequestService. * This service can be used to retrieve a paginated list of the * requested filter options. */ getFilterOptions(filterKeyPartiumId: string, cursorPaginationEnabled?: boolean): PaginatedRequestService; /** * Search for filter keys by the given text query. * * @param query the text query to search for * @param language (optional) language field the query should be searched in * (if not provided default organization language will be used) * Language is expected to be a two-letter string, according to * ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) * @param pageSize the amount of items per page * @param cursorPaginationEnabled if true, the data will be fetched using the cursor as a paginator and return a string with the next and previous pages * @returns observable that emits with a Service of type PaginatedRequestService. * This service can be used to retrieve a paginated list of the * requested filter keys. */ searchFilterKeys(query: string, language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService; /** * Search for filter options by the given filter-key's partiumId and text query. * * @param filterKeyPartiumId the partiumId of the FilterKey * @param query the text query to search for * @param cursorPaginationEnabled if true, the data will be fetched using the cursor as a paginator and return a string with the next and previous pages * @returns observable that emits with a Service of type PaginatedRequestService. * This service can be used to retrieve a paginated list of the * requested filter values. */ searchFilterOptions(filterKeyPartiumId: string, query: string, cursorPaginationEnabled?: boolean): PaginatedRequestService; } export declare class FilterServiceImpl extends BaseService implements FilterService { private PAGINATION_PAGE_SIZE; private httpsService; constructor(serviceProvider: ServiceProvider); onCreate(): void; getFilterKey(filterKeyPartiumId: string): Observable; getFilterKeys(language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService; getFilterOptions(filterKeyPartiumId: string, cursorPaginationEnabled?: boolean): PaginatedRequestService; searchFilterKeys(query: string, language?: string, pageSize?: number, cursorPaginationEnabled?: boolean): PaginatedRequestService; searchFilterOptions(filterKeyPartiumId: string, query: string, cursorPaginationEnabled?: boolean): PaginatedRequestService; }