kentico-cloud-delivery
Version:
Official Kentico Cloud Delivery SDK
50 lines (49 loc) • 1.87 kB
TypeScript
import { IDeliveryClientConfig } from '../config';
import { ContentItem } from '../models';
import { ElementQuery, MultipleItemQuery, MultipleTypeQuery, SingleItemQuery, SingleTypeQuery, TaxonomiesQuery, TaxonomyQuery } from '../query';
import { IMappingService } from '../services';
import { IDeliveryClient } from './idelivery-client.interface';
export declare class DeliveryClient implements IDeliveryClient {
protected config: IDeliveryClientConfig;
private queryService;
mappingService: IMappingService;
/**
* Delivery client used to fetch data from Kentico Cloud
* @constructor
* @param {IDeliveryClientConfig} config - The client configuration
*/
constructor(config: IDeliveryClientConfig);
/**
* Gets query for multiple types
*/
types(): MultipleTypeQuery;
/**
* Gets query for single type
* @param {string} typeCodename - Codename of the type to fetch
*/
type(typeCodename: string): SingleTypeQuery;
/**
* Gets query for multiple items
*/
items<TItem extends ContentItem>(): MultipleItemQuery<TItem>;
/**
* Gets query for single item
* @param {string} codename - Codename of item to fetch
*/
item<TItem extends ContentItem>(codename: string): SingleItemQuery<TItem>;
/**
* Gets query for single taxonomy
* @param {string} codename - Codename of taxonomy to fetch
*/
taxonomy(codename: string): TaxonomyQuery;
/**
* Gets query for multiple taxonomies
*/
taxonomies(): TaxonomiesQuery;
/**
* Gets query for an element within a type
* @param {string} typeCodename - Codename of the type
* @param {string} elementCodename - Codename of the element
*/
element(typeCodename: string, elementCodename: string): ElementQuery;
}