import type { Transport, PageResult } from '@23blocks/contracts'; import type { FlexibleOrder, CreateFlexibleOrderRequest, UpdateFlexibleOrderRequest, AddFlexibleOrderDetailRequest, AddFlexibleOrderTipsRequest, AddFlexibleOrderPaymentMethodRequest, AddFlexibleOrderPaymentRequest, UpdateFlexibleOrderLogisticsRequest, ListFlexibleOrdersParams } from '../types/flexible-order.js'; import type { Payment } from '../types/payment.js'; export interface FlexibleOrdersService { /** * List flexible orders with optional filtering and sorting. * @returns Paginated list of FlexibleOrder records with metadata. */ list(params?: ListFlexibleOrdersParams): Promise>; /** * Get a flexible order by unique ID. * @returns The matching FlexibleOrder record. */ get(uniqueId: string): Promise; /** * Create a new flexible order. * @returns The newly created FlexibleOrder record. */ create(data: CreateFlexibleOrderRequest): Promise; /** * Update an existing flexible order. * @returns The updated FlexibleOrder record. */ update(uniqueId: string, data: UpdateFlexibleOrderRequest): Promise; /** * Add line item details to a flexible order. * @returns The updated FlexibleOrder record with the new detail. */ addDetails(uniqueId: string, data: AddFlexibleOrderDetailRequest): Promise; /** * Add tips to a flexible order. * @returns The updated FlexibleOrder record with tips applied. */ addTips(uniqueId: string, data: AddFlexibleOrderTipsRequest): Promise; /** * Set the payment method for a flexible order. * @returns The updated FlexibleOrder record. */ addPaymentMethod(uniqueId: string, data: AddFlexibleOrderPaymentMethodRequest): Promise; /** * Add a payment to a flexible order. * @returns The updated FlexibleOrder record with the new payment. */ addPayment(uniqueId: string, data: AddFlexibleOrderPaymentRequest): Promise; /** * Confirm a specific payment on a flexible order. * @returns The updated FlexibleOrder record. */ confirmPayment(uniqueId: string, paymentUniqueId: string): Promise; /** * Update the status of a flexible order. * @returns The updated FlexibleOrder record. */ updateStatus(uniqueId: string, status: string): Promise; /** * Update the status of a specific order detail. * @returns The updated FlexibleOrder record. */ updateDetailStatus(uniqueId: string, detailUniqueId: string, status: string): Promise; /** * Cancel a flexible order. */ cancel(uniqueId: string): Promise; /** * Update logistics information for a flexible order. * @returns The updated FlexibleOrder record with logistics data. */ updateLogistics(uniqueId: string, data: UpdateFlexibleOrderLogisticsRequest): Promise; /** * Update logistics information for a specific order detail. * @returns The updated FlexibleOrder record with detail logistics data. */ updateDetailLogistics(uniqueId: string, detailUniqueId: string, data: UpdateFlexibleOrderLogisticsRequest): Promise; /** * Get payments for a flexible order. * @returns Paginated list of Payment records. */ getPayments(uniqueId: string): Promise>; } export declare function createFlexibleOrdersService(transport: Transport, _config: { apiKey: string; }): FlexibleOrdersService; //# sourceMappingURL=flexible-orders.service.d.ts.map