import { ClientInterface, ClientConfiguration, CreateClientOptions } from '@crystallize/js-api-client'; declare function encryptValue(value: string, secretKey: string, algorithm: string): string; declare function decryptValue(value: string, secretKey: string, algorithm: string): string; /** * Create encrypt/decrypt/decryptMape methods based on supplied escret */ declare const cypher: (secret: string) => { encrypt: (value: string) => string; decrypt: (value: string) => string; decryptMap: (map: { [key: string]: string; }) => { [key: string]: string; }; }; type TStoreFrontConfig = { id: string; name: string; identifier: string; tenantIdentifier: string; tenantId: string; language: string; storefront: string; logo: { url: string; key: string; variants: { url: string; key: string; width: number; height: number; }[]; }; theme: string; configuration: Record; superfastVersion: string; taxIncluded: boolean; paymentMethods: string[]; enabled: boolean; }; type TStoreFrontAdapter = { config: (withSecrets: boolean) => Promise; }; type TStoreFront = { config: TStoreFrontConfig; apiClient: ClientInterface; }; declare const createFilesystemAdapter: (filename: string) => TStoreFrontAdapter; declare const createMemoryAdapter: (config: TStoreFrontConfig) => TStoreFrontAdapter; type TStorage = { get: (key: string) => Promise; set: (key: string, value: any, ttl: number) => Promise; }; /** * Create Superfast adapter * * Returns an object with a .config method to load superfast site configuration */ declare const createSuperFastAdapter: (hostname: string, credentials: ClientConfiguration, storageClient: TStorage, ttl: number) => TStoreFrontAdapter; declare const superFastTenantQueryConfig: { id: boolean; name: boolean; path: boolean; components: { id: boolean; content: { __typename: boolean; __on: ({ __typeName: string; text: boolean; html?: undefined; options?: undefined; value?: undefined; firstImage?: undefined; sections?: undefined; } | { __typeName: string; html: boolean; text?: undefined; options?: undefined; value?: undefined; firstImage?: undefined; sections?: undefined; } | { __typeName: string; options: { key: boolean; value: boolean; }; text?: undefined; html?: undefined; value?: undefined; firstImage?: undefined; sections?: undefined; } | { __typeName: string; value: boolean; text?: undefined; html?: undefined; options?: undefined; firstImage?: undefined; sections?: undefined; } | { __typeName: string; firstImage: { url: boolean; key: boolean; variants: { key: boolean; url: boolean; width: boolean; height: boolean; }; }; text?: undefined; html?: undefined; options?: undefined; value?: undefined; sections?: undefined; } | { __typeName: string; sections: { title: boolean; properties: { key: boolean; value: boolean; }; }; text?: undefined; html?: undefined; options?: undefined; value?: undefined; firstImage?: undefined; })[]; }; }; }; declare function mapToStoreConfig(data: { id: string; name: string; path: string; components: Array; }): TStoreFrontConfig; declare function fetchSuperFastConfigWithClient(path: string, client: ClientInterface): Promise; type StoreFrontOptions = { withSecrets?: boolean; }; /** * Create store TStoreFront * Load configuration from adapter and configure an apiClient for the store front * * @param adapter A TStoreFrontAdapter instance * @param options Object with options, or the deprecated syntax of a boolean for just `withSecrets` * @returns The loaded config + a configured api client */ declare const createStoreFront: (adapter: TStoreFrontAdapter, options?: StoreFrontOptions | boolean, clientOptions?: CreateClientOptions) => Promise; export { type StoreFrontOptions, type TStoreFront, type TStoreFrontAdapter, type TStoreFrontConfig, createFilesystemAdapter, createMemoryAdapter, createStoreFront, createSuperFastAdapter, cypher, decryptValue, encryptValue, fetchSuperFastConfigWithClient, mapToStoreConfig, superFastTenantQueryConfig };