@datocms/cma-client
Version:
JS client for DatoCMS REST Content Management API
44 lines (43 loc) • 1.98 kB
TypeScript
import * as Utils from '@datocms/rest-client-utils';
import BaseResource from '../../BaseResource';
import type * as SchemaTypes from '../SchemaTypes';
import type * as SimpleSchemaTypes from '../SimpleSchemaTypes';
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: SimpleSchemaTypes.SearchResultInstancesHrefSchema): Promise<SimpleSchemaTypes.SearchResultInstancesTargetSchema>;
/**
* Search for results
*
* Read more: https://www.datocms.com/docs/content-management-api/resources/search-result/instances
*
* @throws {ApiError}
* @throws {TimeoutError}
*/
rawList(queryParams: SchemaTypes.SearchResultInstancesHrefSchema): Promise<SchemaTypes.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<SimpleSchemaTypes.SearchResultInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SimpleSchemaTypes.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<SchemaTypes.SearchResultInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SchemaTypes.SearchResult, void, unknown>;
}