@scayle/storefront-core
Version:
Collection of essential utilities to work with the Storefront API
18 lines (17 loc) • 674 B
TypeScript
import type { Order, RpcHandler } from '../../../types';
/**
* Retrieves an order by its ID.
*
* @param params The parameters for retrieving an order by its ID.
* @param params.orderId The ID of the order to retrieve.
* @param context The RPC context.
*
* @returns The order details if found. It will return an `ErrorResponse` alternatively
* if the order ID is invalid, no access token is present,
* the order does not belong to the current user, the order is not found,
* or an unknown error occurs.
*/
export declare const getOrderById: RpcHandler<{
orderId: number;
}, Order>;
export declare const getOrderCustomData: RpcHandler<Record<string, unknown>>;