UNPKG

pancake-client-sdk

Version:
87 lines (86 loc) 2.49 kB
import { SalesReport, InventoryReport, CustomerReport, MarketingReport, CustomFormula, ReportSchedule, CreateReportScheduleRequest, ExportReportRequest, ReportExportResult, DateRange } from '../types/reports'; import { BaseResource } from './base'; export declare class ReportResource extends BaseResource { /** * Get sales report */ getSalesReport(params: DateRange & { group_by?: 'day' | 'week' | 'month'; include_refunds?: boolean; }): Promise<SalesReport>; /** * Get inventory report */ getInventoryReport(params?: { warehouse_id?: string; category_ids?: number[]; low_stock_threshold?: number; }): Promise<InventoryReport>; /** * Get customer report */ getCustomerReport(params: DateRange & { segment?: string; include_inactive?: boolean; }): Promise<CustomerReport>; /** * Get marketing report */ getMarketingReport(params: DateRange & { platforms?: string[]; campaign_ids?: string[]; }): Promise<MarketingReport>; /** * List custom formulas */ listFormulas(): Promise<{ data: CustomFormula[]; }>; /** * Create custom formula */ createFormula(data: Omit<CustomFormula, 'id'>): Promise<CustomFormula>; /** * Update custom formula */ updateFormula(formulaId: string, data: Partial<CustomFormula>): Promise<CustomFormula>; /** * Delete custom formula */ deleteFormula(formulaId: string): Promise<void>; /** * List report schedules */ listSchedules(): Promise<{ data: ReportSchedule[]; }>; /** * Create report schedule */ createSchedule(data: CreateReportScheduleRequest): Promise<ReportSchedule>; /** * Update report schedule */ updateSchedule(scheduleId: string, data: Partial<ReportSchedule>): Promise<ReportSchedule>; /** * Delete report schedule */ deleteSchedule(scheduleId: string): Promise<void>; /** * Export report */ exportReport(data: ExportReportRequest): Promise<ReportExportResult>; /** * Get export status */ getExportStatus(exportId: string): Promise<ReportExportResult>; /** * Get default metrics */ getDefaultMetrics(): Promise<{ sales_metrics: string[]; inventory_metrics: string[]; customer_metrics: string[]; marketing_metrics: string[]; }>; }