Represents operations to search for orders.

interface OrderSearch {
    FindAll: ((pageIndex: number, pageSize: number) => PagedList<Order>);
    ForCustomer: ((customerId: number) => OrderSearch);
    ForImpersonator: ((customerId: number) => OrderSearch);
    LoadOrderData: ((property: OrderLoadType) => OrderSearch);
    OrderBy: ((orderBy: OrderOrderBy) => OrderSearch);
    OrderByDescending: ((orderBy: OrderOrderBy) => OrderSearch);
    Since: ((since: Date) => OrderSearch);
    Until: ((until: Date) => OrderSearch);
    WithOrderStatus: ((status: string) => OrderSearch);
    WithPaymentStatus: ((status: string) => OrderSearch);
    WithShippingStatus: ((status: string) => OrderSearch);
}

Properties

FindAll: ((pageIndex: number, pageSize: number) => PagedList<Order>)

Retrieves all orders matching the search criteria.

Type declaration

    • (pageIndex, pageSize): PagedList<Order>
    • Parameters

      • pageIndex: number

        The index of the page to retrieve (starting from 1).

      • pageSize: number

        The number of orders per page.

      Returns PagedList<Order>

      A paged list of orders matching the search criteria.

ForCustomer: ((customerId: number) => OrderSearch)

Filters orders for a specific customer ID.

Type declaration

    • (customerId): OrderSearch
    • Parameters

      • customerId: number

        The ID of the customer to filter orders for.

      Returns OrderSearch

      The updated order search object.

ForImpersonator: ((customerId: number) => OrderSearch)

Filters orders for a specific impersonator customer ID.

Type declaration

    • (customerId): OrderSearch
    • Parameters

      • customerId: number

        The ID of the impersonator customer to filter orders for.

      Returns OrderSearch

      The updated order search object.

LoadOrderData: ((property: OrderLoadType) => OrderSearch)

Specifies what additional order data to load.

Type declaration

    • (property): OrderSearch
    • Parameters

      • property: OrderLoadType

        The type of additional data to load (e.g., shipping address, order line items).

      Returns OrderSearch

      The updated order search object.

OrderBy: ((orderBy: OrderOrderBy) => OrderSearch)

Specifies the order in which orders should be returned.

Type declaration

OrderByDescending: ((orderBy: OrderOrderBy) => OrderSearch)

Specifies the order in which orders should be returned (descending).

Type declaration

Since: ((since: Date) => OrderSearch)

Filters orders placed since a specific date.

Type declaration

    • (since): OrderSearch
    • Parameters

      • since: Date

        The date since which orders should be filtered.

      Returns OrderSearch

      The updated order search object.

Until: ((until: Date) => OrderSearch)

Filters orders placed until a specific date.

Type declaration

    • (until): OrderSearch
    • Parameters

      • until: Date

        The date until which orders should be filtered.

      Returns OrderSearch

      The updated order search object.

WithOrderStatus: ((status: string) => OrderSearch)

Filters orders by their status.

Type declaration

    • (status): OrderSearch
    • Parameters

      • status: string

        The order status to filter by.

      Returns OrderSearch

      The updated order search object.

WithPaymentStatus: ((status: string) => OrderSearch)

Filters orders by their payment status.

Type declaration

    • (status): OrderSearch
    • Parameters

      • status: string

        The payment status to filter by.

      Returns OrderSearch

      The updated order search object.

WithShippingStatus: ((status: string) => OrderSearch)

Filters orders by their shipping status.

Type declaration

    • (status): OrderSearch
    • Parameters

      • status: string

        The shipping status to filter by.

      Returns OrderSearch

      The updated order search object.