@kontent-ai/sync-sdk
Version:
Sync API v2 for Kontent.ai
37 lines (36 loc) • 1.26 kB
TypeScript
import type { CreateSyncClientOptions, SyncClient, SyncClientTypes } from "../models/core.models.js";
type GetSyncClient<TSyncApiTypes extends SyncClientTypes = SyncClientTypes> = {
/**
* Use publicly available API for requests.
*/
publicApi: () => {
create: (options?: CreateSyncClientOptions) => SyncClient<TSyncApiTypes>;
};
/**
* Use preview API for requests.
*
* Requires a delivery API key with preview access.
*/
previewApi: (deliveryApiKey: string) => {
create: (options?: CreateSyncClientOptions) => SyncClient<TSyncApiTypes>;
};
/**
* Use secure API for requests.
*
* Requires a delivery API key with secure access.
*/
secureApi: (deliveryApiKey: string) => {
create: (options?: CreateSyncClientOptions) => SyncClient<TSyncApiTypes>;
};
};
/**
* Creates a new sync client instance using fluent API.
*
* You may choose to use public, preview or secure API.
*
* Options can be set within the 'create' function.
*
* @param environmentId - The Id of the Kontent.ai environment.
*/
export declare function getSyncClient<TSyncApiTypes extends SyncClientTypes = SyncClientTypes>(environmentId: string): GetSyncClient<TSyncApiTypes>;
export {};