UNPKG

@hoxhaolsi/cloud-sdk

Version:

LiquidCommerce Cloud SDK

20 lines (19 loc) 969 B
import type { ILiquidCommerceClient } from './interfaces'; import type { ILiquidCommerceConfig } from './types'; /** * Factory function to create and initialize a LiquidCommerceClient instance. * * @param {string} apiKey - The API key used for authenticating with the Liquid Commerce Cloud API. * @param {ILiquidCommerceConfig} config - The configuration object containing options such as environment settings, base URLs, and other preferences. * @return {Promise<LiquidCommerceClient>} - A promise that resolves to a fully initialized LiquidCommerceClient instance. * * @example * // Example usage: * const liquidClient = await LiquidCommerce('your-api-key', { * env: LIQUID_COMMERCE_ENV.STAGE, * googlePlacesApiKey: 'your-google-places-api-key', * }); * * @throws {Error} - Throws an error if the client initialization fails. */ export declare function LiquidCommerce(apiKey: string, config: ILiquidCommerceConfig): Promise<ILiquidCommerceClient>;