@pelygo/janus 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +27 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2149,6 +2149,21 @@ declare interface LegacyOrderMeta {
|
|
|
2149
2149
|
order: LegacyOrder;
|
|
2150
2150
|
}
|
|
2151
2151
|
|
|
2152
|
+
/**
|
|
2153
|
+
* Filters for legacy orders (janus.orders.getAll).
|
|
2154
|
+
*
|
|
2155
|
+
* Extends standard pagination with date range filtering.
|
|
2156
|
+
* The server translates `clientId` to the legacy `customer_id` internally.
|
|
2157
|
+
*/
|
|
2158
|
+
export declare interface LegacyOrdersFilters extends ClientScopedPaginatedQueryFilters {
|
|
2159
|
+
/** Filter by creation date from (ISO date, e.g. '2025-01-01') */
|
|
2160
|
+
createdAt?: string;
|
|
2161
|
+
/** Filter by creation date to (ISO date, e.g. '2025-12-31') */
|
|
2162
|
+
createdTo?: string;
|
|
2163
|
+
/** Include child records (order items, dispatches) */
|
|
2164
|
+
includeChildren?: boolean;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2152
2167
|
/**
|
|
2153
2168
|
* Legacy post service entity
|
|
2154
2169
|
*/
|
|
@@ -2562,18 +2577,27 @@ export declare interface OrdersQueryFilters extends BaseFilters {
|
|
|
2562
2577
|
*/
|
|
2563
2578
|
export declare interface OrdersResource {
|
|
2564
2579
|
/**
|
|
2565
|
-
* Get all orders with pagination and optional
|
|
2580
|
+
* Get all orders with pagination, date filtering, and optional text search.
|
|
2566
2581
|
*
|
|
2567
2582
|
* Requires `clientId`. The server translates the Janus client ID to the
|
|
2568
2583
|
* legacy customer ID internally.
|
|
2569
2584
|
*
|
|
2585
|
+
* Supports date range filtering via `createdAt` and `createdTo` (ISO date strings).
|
|
2586
|
+
* When date filters are provided, the server queries by `order.created` column.
|
|
2587
|
+
*
|
|
2570
2588
|
* @example
|
|
2571
|
-
* const { data, meta } = await janus.orders.getAll({
|
|
2589
|
+
* const { data, meta } = await janus.orders.getAll({
|
|
2590
|
+
* clientId,
|
|
2591
|
+
* pageSize: 25,
|
|
2592
|
+
* createdAt: '2025-01-01',
|
|
2593
|
+
* createdTo: '2025-12-31',
|
|
2594
|
+
* orderDirection: 'DESC',
|
|
2595
|
+
* });
|
|
2572
2596
|
* // data = LegacyOrder[] — each with: id, reference, channel, transaction_type,
|
|
2573
2597
|
* // orderDate (ISO), orderStatus, created (ISO), modified (ISO), orderItems[], dispatches[]
|
|
2574
2598
|
* // meta = { total_items, total_pages, current_page, page_size }
|
|
2575
2599
|
*/
|
|
2576
|
-
getAll(filters:
|
|
2600
|
+
getAll(filters: LegacyOrdersFilters): Promise<PaginatedListResponse<LegacyOrder>>;
|
|
2577
2601
|
/**
|
|
2578
2602
|
* Get a single order by ID with full details (items, dispatches, addresses).
|
|
2579
2603
|
*
|