UNPKG

toast-pos-sdk

Version:
58 lines 2.28 kB
import { HttpClient } from '../client/http-client'; import { ToastApiResponse } from '../types'; import { Order, OrdersBulkParams, GetOrderParams } from '../types/orders'; /** * Toast Orders API client */ export declare class OrdersApi { private httpClient; constructor(httpClient: HttpClient); /** * Get orders in bulk with optional filtering parameters * * @param params Query parameters and restaurant ID for the request * @returns Promise resolving to an array of orders */ listOrdersBulk(params: OrdersBulkParams): Promise<ToastApiResponse<Order[]>>; /** * Get a specific order by its GUID * * @param params Order GUID and restaurant ID for the request * @returns Promise resolving to the order details */ getOrder(params: GetOrderParams): Promise<ToastApiResponse<Order>>; /** * Convenience method to get orders for a specific date range * * @param restaurantExternalId Restaurant external ID * @param startDate Start date in ISO format * @param endDate End date in ISO format * @param options Additional options like page size * @returns Promise resolving to an array of orders */ getOrdersByDateRange(restaurantExternalId: string, startDate: string, endDate: string, options?: { page?: number; pageSize?: number; }): Promise<ToastApiResponse<Order[]>>; /** * Convenience method to get orders for a specific business date * * @param restaurantExternalId Restaurant external ID * @param businessDate Business date in ISO format * @param options Additional options like page size * @returns Promise resolving to an array of orders */ getOrdersByBusinessDate(restaurantExternalId: string, businessDate: string, options?: { page?: number; pageSize?: number; }): Promise<ToastApiResponse<Order[]>>; /** * Get all orders with automatic pagination * * @param params Base parameters for the request * @param maxPages Maximum number of pages to fetch (default: 10) * @returns Promise resolving to all orders across pages */ getAllOrders(params: OrdersBulkParams, maxPages?: number): Promise<Order[]>; } //# sourceMappingURL=orders.d.ts.map