import { Client } from '../client'; import { UriHelper } from '../uri-helper'; import { ThBaseHandler } from '../base'; export interface DiscountsOptions { user?: string; base?: string; } export interface DiscountsQuery { limit?: number; uri?: string; query?: { deleted?: boolean; active?: boolean; }; } export interface DiscountsResponse { data: Discount[]; metadata: Record; next?: () => Promise; } export interface DiscountResponse { data?: Discount; metadata?: { count?: number; patch?: any; }; msg?: string; } export declare type DiscountType = 'percentage' | 'value'; export declare type DiscountGroupType = 'cart' | 'customer'; export interface Discount { id?: string; amount?: number; type: DiscountType; account?: string; name?: string; group: DiscountGroupType; active?: boolean; deleted?: boolean; constraints?: Record | null; } export declare class Discounts extends ThBaseHandler { static baseEndpoint: string; endpoint: string; http: Client; options: DiscountsOptions; uriHelper: UriHelper; constructor(options: DiscountsOptions, http: Client); getAll(queryOrOptions?: DiscountsQuery | undefined): Promise; get(discountId: string): Promise; put(discountId: string, discount: Discount): Promise; create(discount: Discount): Promise; count(): Promise; delete(discountId: string): Promise; }