import { Category, CommerceAPI, CommonArgs, CustomerGroup, GetProductsArgs, Identifiable, Product } from '../../../../common'; import { Dictionary } from 'lodash'; import { CodecPropertyConfig, CommerceCodecType, CommerceCodec } from '../../core'; import { StringProperty } from '../../../cms-property-types'; /** * REST Codec config properties. */ declare type CodecConfig = { productURL: StringProperty; categoryURL: StringProperty; customerGroupURL: StringProperty; translationsURL: StringProperty; }; /** * Commerce Codec Type that integrates with REST. */ export declare class RestCommerceCodecType extends CommerceCodecType { /** * @inheritdoc */ get vendor(): string; /** * @inheritdoc */ get properties(): CodecConfig; /** * @inheritdoc */ getApi(config: CodecPropertyConfig): Promise; } /** * Commerce Codec that integrates with REST. */ export declare class RestCommerceCodec extends CommerceCodec { config: CodecPropertyConfig; categories: Category[]; products: Product[]; customerGroups: CustomerGroup[]; translations: Dictionary>; updateCategoriesVersion(categories: Category[]): void; /** * @inheritdoc */ cacheCategoryTree(): Promise; /** * @inheritdoc */ getProducts(args: GetProductsArgs, raw?: boolean): Promise; /** * @inheritdoc */ getRawProducts(args: GetProductsArgs): Promise; /** * @inheritdoc */ getCustomerGroups(args: CommonArgs): Promise; } export default RestCommerceCodecType;