import { Data } from "./Data"; import { Query } from "./Query"; import { ResponseHandlers } from "./Requests/ExecutableRequest"; import { BatchRequest } from "./Requests/BatchRequest"; export declare class Sitefinity { static Query: typeof Query; private factory; private baseUrl; private siteId; /** * The constructor of the Sitefinity JavaScript SDK. This is the entry point for the SDK. */ constructor(options: SDKOptions); data(options: TypeOptions): Data; batch(success?: Function, failure?: Function, progress?: Function, options?: TypeOptions): BatchRequest; /** * Sets the authentication token. */ setToken(token: Token): void; } interface OptionsBase { /** * Your service url that points to the configured instance of Sitefinity service. */ baseUrl?: string; /** * The ID of the site, for which the queries will be executed. */ siteId?: string; } /** * Defines an object containing configuration options for the SDK object. */ export interface SDKOptions extends OptionsBase { /** * The global handlers for request execution */ handlers?: ResponseHandlers; enableUnlimitedChoices?: boolean; integrationMode?: boolean; } /** * Defines an object containing configuration options related to a specific type. */ export interface TypeOptions extends OptionsBase { /** * The URL name of the type. */ entitySet?: string; /** * The name of the provider. If empty the default provider for the site will be used. */ provider?: string; /** * The name of the culture. If empty the default culture for the site will be used. */ culture?: string; /** * Query params to be added to the request url. */ additionalQueryParams?: { [key: string]: string; }; /** * Headers to be added to the request. */ additionalHeaders?: { [key: string]: string; }; } export interface Token { type: string; value: string; } export {};