kentico-cloud-delivery
Version:
Official Kentico Cloud Delivery SDK
29 lines (28 loc) • 1.14 kB
TypeScript
import { Observable } from 'rxjs';
import { IDeliveryClientConfig } from '../../config';
import { ICloudResponse, IQueryConfig, IQueryParameter, IHeader } from '../../interfaces';
import { QueryService } from '../../services';
export declare abstract class BaseQuery<TResponse extends ICloudResponse> {
protected config: IDeliveryClientConfig;
protected queryService: QueryService;
protected parameters: IQueryParameter[];
protected customUrl?: string;
protected abstract _queryConfig: IQueryConfig;
constructor(config: IDeliveryClientConfig, queryService: QueryService);
abstract getUrl(): string;
abstract getObservable(): Observable<TResponse>;
/**
* Adds parameter to query
* @param name Name of parameter
* @param value Value of parameter
*/
withParameter(name: string, value: string): this;
/**
* Gets headers used by this query
*/
getHeaders(): IHeader[];
withUrl(url: string): this;
getParameters(): IQueryParameter[];
getPromise(): Promise<TResponse>;
protected resolveUrlInternal(action: string): string;
}