chore: fixes to http and request types for inventory (#13827)
* chore: fixes to http and request types for inventory * fix type error
This commit is contained in:
@@ -132,7 +132,7 @@ export class InventoryItem {
|
||||
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
||||
*/
|
||||
async list(
|
||||
query?: HttpTypes.AdminInventoryItemParams,
|
||||
query?: HttpTypes.AdminInventoryItemsParams,
|
||||
headers?: ClientHeaders
|
||||
) {
|
||||
return await this.client.fetch<HttpTypes.AdminInventoryItemListResponse>(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { FindParams } from "../../common"
|
||||
import { BaseFilterable, OperatorMap } from "../../../dal"
|
||||
|
||||
export interface AdminInventoryItemParams
|
||||
export interface AdminInventoryItemsParams
|
||||
extends FindParams,
|
||||
BaseFilterable<AdminInventoryItemParams> {
|
||||
BaseFilterable<AdminInventoryItemsParams> {
|
||||
/**
|
||||
* Filter by inventory item ID(s).
|
||||
*/
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
import { OperatorMap } from "../../../dal"
|
||||
import { SelectParams } from "../../common"
|
||||
import { FindParams, SelectParams } from "../../common"
|
||||
|
||||
export interface AdminGetReservationsParams {
|
||||
export interface AdminGetReservationsParams extends FindParams {
|
||||
/**
|
||||
* The maximum number of reservations to retrieve.
|
||||
* A search term to search for reservations by their searchable fields.
|
||||
*/
|
||||
limit?: number
|
||||
/**
|
||||
* The number of reservations to skip.
|
||||
*/
|
||||
offset?: number
|
||||
q?: string
|
||||
/**
|
||||
* Filter by the ID(s) of the location(s) to retrieve the
|
||||
* reservations for.
|
||||
@@ -25,10 +21,6 @@ export interface AdminGetReservationsParams {
|
||||
* reservations for.
|
||||
*/
|
||||
line_item_id?: string | string[]
|
||||
/**
|
||||
* Sort the reservations by the given field.
|
||||
*/
|
||||
order_id?: string | string[]
|
||||
/**
|
||||
* Filter by the ID(s) of the user(s) to retrieve the
|
||||
* reservations they created.
|
||||
@@ -38,6 +30,10 @@ export interface AdminGetReservationsParams {
|
||||
* Filter by reservation description(s).
|
||||
*/
|
||||
description?: string | OperatorMap<string>
|
||||
/**
|
||||
* Filter by reservation quantity.
|
||||
*/
|
||||
quantity?: OperatorMap<number>
|
||||
/**
|
||||
* Apply filters on the reservation's creation date.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user