import { IBaseResponse, IHeader, IHttpService, IQueryParameter, ISDKInfo } from 'kentico-cloud-core'; import { Observable } from 'rxjs'; import { IContentManagementClientConfig } from '../config/icontent-management-client-config.interface'; import { IContentManagementQueryConfig, IContentManagementInternalQueryConfig } from '../models'; export declare abstract class BaseContentManagementQueryService { protected config: IContentManagementClientConfig; protected httpService: IHttpService; protected sdkInfo: ISDKInfo; /** * Default base url for content management API */ private readonly defaultBaseCMUrl; /** * Default number of retry attempts when user did not set any */ private readonly defaultRetryAttempts; /** * Default retry status codes */ private readonly defaultRetryStatusCodes; constructor(config: IContentManagementClientConfig, httpService: IHttpService, sdkInfo: ISDKInfo); retryPromise(promise: Promise): Promise; /** * Gets url based on the action, query configuration and options (parameters) * @param action Action (= url part) that will be hit * @param options Query options */ getFullUrl(action: string, options?: IQueryParameter[]): string; /** * Gets proper set of headers for given request. */ getHeaders(extraHeaders?: IHeader[]): IHeader[]; /** * Http GET response * @param url Url of request * @param config Query configuration */ protected getResponse(url: string, internalConfig: IContentManagementInternalQueryConfig, config: IContentManagementQueryConfig): Observable>; /** * Http POST response * @param url Url of request * @param body Body of the request (names and values) * @param config Query configuration * @param extraHeaders Extra headers */ protected postResponse(url: string, body: any, internalConfig: IContentManagementInternalQueryConfig, config: IContentManagementQueryConfig, extraHeaders?: IHeader[]): Observable>; /** * Http PUT response * @param url Url of request * @param body Body of the request (names and values) * @param config Query configuration * @param extraHeaders Extra headers */ protected putResponse(url: string, body: any, internalConfig: IContentManagementInternalQueryConfig, config: IContentManagementQueryConfig, extraHeaders?: IHeader[]): Observable>; /** * Http Delete response * @param url Url of request * @param body Body of the request (names and values) * @param config Query configuration * @param extraHeaders Extra headers */ protected deleteResponse(url: string, internalConfig: IContentManagementInternalQueryConfig, config: IContentManagementQueryConfig, extraHeaders?: IHeader[]): Observable>; private mapContentManagementError; /** * Gets retry status code array */ private getRetryStatusCodes; /** * Gets authorization header. This is used for 'preview' functionality */ private getAuthorizationHeader; /** * Gets number of retry attempts used by queries */ private getRetryAttempts; /** * Gets base URL of the request including the project Id */ private getBaseUrl; /** * Gets API endpoint url */ private GetEndpointUrl; }