UNPKG

@datocms/cma-client

Version:
44 lines (43 loc) 1.93 kB
import * as Utils from '@datocms/rest-client-utils'; import BaseResource from '../../BaseResource'; import type * as ApiTypes from '../ApiTypes'; import type * as RawApiTypes from '../RawApiTypes'; export default class SearchResult extends BaseResource { static readonly TYPE: "search_result"; /** * Search for results * * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances * * @throws {ApiError} * @throws {TimeoutError} */ list(queryParams: ApiTypes.SearchResultInstancesHrefSchema): Promise<ApiTypes.SearchResultInstancesTargetSchema>; /** * Search for results * * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances * * @throws {ApiError} * @throws {TimeoutError} */ rawList(queryParams: RawApiTypes.SearchResultInstancesHrefSchema): Promise<RawApiTypes.SearchResultInstancesTargetSchema>; /** * Async iterator to auto-paginate over elements returned by list() * * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances * * @throws {ApiError} * @throws {TimeoutError} */ listPagedIterator(queryParams: Utils.OmitFromKnownKeys<ApiTypes.SearchResultInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.SearchResult, void, unknown>; /** * Async iterator to auto-paginate over elements returned by rawList() * * Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances * * @throws {ApiError} * @throws {TimeoutError} */ rawListPagedIterator(queryParams: Utils.OmitFromKnownKeys<RawApiTypes.SearchResultInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.SearchResult, void, unknown>; }