UNPKG

pancake-client-sdk

Version:
69 lines (68 loc) 1.81 kB
import { Promotion, PromotionListParams, CreatePromotionRequest, Voucher, VoucherListParams, CreateVoucherRequest, ComboProduct, CreateComboRequest } from '../types/promotion'; import { BaseResource } from './base'; export declare class PromotionResource extends BaseResource { /** * Get list of promotions */ list(params?: PromotionListParams): Promise<{ data: Promotion[]; }>; /** * Get promotion by ID */ getById(promotionId: string): Promise<Promotion>; /** * Create new promotion */ create(data: CreatePromotionRequest): Promise<Promotion>; /** * Update promotion */ update(promotionId: string, data: Partial<Promotion>): Promise<Promotion>; /** * Get list of vouchers */ listVouchers(params?: VoucherListParams): Promise<{ data: Voucher[]; }>; /** * Get voucher by ID */ getVoucherById(voucherId: string): Promise<Voucher>; /** * Create new voucher */ createVoucher(data: CreateVoucherRequest): Promise<Voucher>; /** * Create multiple vouchers */ createBulkVouchers(data: { count: number; prefix?: string; voucher: CreateVoucherRequest; }): Promise<{ codes: string[]; }>; /** * Get list of combo products */ listCombos(): Promise<{ data: ComboProduct[]; }>; /** * Get combo by ID */ getComboById(comboId: number): Promise<ComboProduct>; /** * Create new combo */ createCombo(data: CreateComboRequest): Promise<ComboProduct>; /** * Update combo */ updateCombo(comboId: number, data: Partial<ComboProduct>): Promise<ComboProduct>; /** * Delete combo */ deleteCombo(comboId: number): Promise<void>; }