@eclipse-ditto/ditto-javascript-client-dom
Version:
DOM implementation of Eclipse Ditto JavaScript API to be used in browsers.
89 lines • 3.23 kB
TypeScript
/*!
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
import { SearchThingsResponse } from '../../model/response';
import { CountOptions, SearchOptions } from '../../options/request.options';
import { RequestSender, RequestSenderFactory } from '../request-factory/request-sender';
export interface SearchHandle {
/**
* Searches for Things that match the restrictions set in options.
*
* @param options - Options to use for the search.
* @returns The search result
*/
search(options?: SearchOptions): Promise<SearchThingsResponse>;
/**
* Searches for Things that match the restrictions set in options using a http post request.
*
* @param options - Options to use for the search.
* @returns The search result
*/
postSearch(options?: SearchOptions): Promise<SearchThingsResponse>;
/**
* Counts the Things that match the restrictions set in options.
*
* @param options - Options to use for the search.
* @returns The count
*/
count(options?: CountOptions): Promise<number>;
/**
* Counts the Things that match the restrictions set in options using a http post request.
*
* @param options - Options to use for the search.
* @returns The count
*/
postCount(options?: CountOptions): Promise<number>;
}
/**
* Handle to send Search requests.
*/
export declare class DefaultSearchHandle implements SearchHandle {
readonly requestFactory: RequestSender;
private constructor();
/**
* returns an instance of SearchHandle using the provided RequestSender.
*
* @param builder - The builder for the RequestSender to work with.
* @returns The SearchHandle
*/
static getInstance(builder: RequestSenderFactory): DefaultSearchHandle;
/**
* Searches for Things that match the restrictions set in options.
*
* @param options - Options to use for the search.
* @returns The search result
*/
search(options?: SearchOptions): Promise<SearchThingsResponse>;
/**
* Searches for Things that match the restrictions set in options using a http post request.
*
* @param options - Options to use for the search.
* @returns The search result
*/
postSearch(options?: SearchOptions): Promise<SearchThingsResponse>;
/**
* Counts the Things that match the restrictions set in options.
*
* @param options - Options to use for the search.
* @returns The count
*/
count(options?: CountOptions): Promise<number>;
/**
* Counts the Things that match the restrictions set in options using a http post request.
*
* @param options - Options to use for the search.
* @returns The count
*/
postCount(options?: CountOptions): Promise<number>;
private getFormRequestOptions;
}
//# sourceMappingURL=search.d.ts.map