chore(docs): Generated References (automated) (#12154)

Generated the following references:
- `api_key`
- `auth`
- `cart`
- `cart_models`
- `core_flows`
- `currency`
- `customer`
- `event`
- `file_service`
- `fulfillment`
- `fulfillment_provider`
- `inventory_next`
- `js_sdk`
- `locking`
- `medusa`
- `modules`
- `modules_sdk`
- `notification_service`
- `order`
- `payment`
- `payment_provider`
- `pricing`
- `product`
- `promotion`
- `region`
- `sales_channel`
- `stock_location_next`
- `store`
- `tax`
- `types`
- `user`
- `utils`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-04-11 11:15:08 +00:00
1 parent df5d410be2
commit 94e98190ff
1790 files changed
+220057 -187216

No files matched your search

@@ -2,10 +2,27 @@ import { TypeList } from "docs-ui"
# create
This method creates a reservation. It sends a request to the
[Create Reservation](https://docs.medusajs.com/api/admin#reservations\_postreservations)
API route.
## Example
```ts
sdk.admin.reservation.create({
inventory_item_id: "iitem_123",
location_id: "sloc_123",
quantity: 10,
})
.then(({ reservation }) => {
console.log(reservation)
})
```
## Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`Line truncated
<TypeList types={[{"name":"body","type":"[AdminCreateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx)","description":"The details of the reservation to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity\nis reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the inventory item that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item to create the reservation for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"Configure the fields and relations to retrieve in the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of reservations to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of reservations to skip.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the inventory item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the line item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the user(s) to retrieve the\nreservations they created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by reservation description(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../..Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The reservation's details.","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"The reservation's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity is reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the reservation in an external system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"The inventory item that the reservation is for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date that the reservation was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date that the reservation was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date that the reservation was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
@@ -2,10 +2,23 @@ import { TypeList } from "docs-ui"
# delete
This method deletes a reservation by ID. It sends a request to the
[Delete Reservation](https://docs.medusajs.com/api/admin#reservations\_deletereservationsid)
API route.
## Example
```ts
sdk.admin.reservation.delete("res_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
@@ -2,10 +2,53 @@ import { TypeList } from "docs-ui"
# list
This method retrieves a list of reservations. It sends a request to the
[List Reservations](https://docs.medusajs.com/api/admin#reservations\_getreservations)
API route.
## Example
To retrieve the list of reservations:
```ts
sdk.admin.reservation.list()
.then(({ reservations, count, limit, offset }) => {
console.log(reservations)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.reservation.list({
limit: 10,
offset: 10
})
.then(({ reservations, count, limit, offset }) => {
console.log(reservations)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each reservation:
```ts
sdk.admin.reservation.list({
fields: "id,*inventory_item"
})
.then(({ reservations, count, limit, offset }) => {
console.log(reservations)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
## Parameters
<TypeList types={[{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"nLine truncated
<TypeList types={[{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of reservations to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of reservations to skip.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the inventory item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the line item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the user(s) to retrieve the\nreservations they created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by reservation description(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdxLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of reservations.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
@@ -2,10 +2,38 @@ import { TypeList } from "docs-ui"
# retrieve
This method retrieves a reservation by ID. It sends a request to the
[Get Reservation](https://docs.medusajs.com/api/admin#reservations\_getreservationsid)
API route.
## Example
To retrieve a reservation by its ID:
```ts
sdk.admin.reservation.retrieve("res_123")
.then(({ reservation }) => {
console.log(reservation)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.reservation.retrieve("res_123", {
fields: "id,name"
})
.then(({ reservation }) => {
console.log(reservation)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReservationParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReservationParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationParams/page.mdx)","description":"Configure the fields and relations to retrieve in the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The reservation's details.","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"The reservation's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity is reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the reservation in an external system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"The inventory item that the reservation is for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date that the reservation was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date that the reservation was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date that the reservation was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
@@ -2,10 +2,25 @@ import { TypeList } from "docs-ui"
# update
This method updates a reservation. It sends a request to the
[Update Reservation](https://docs.medusajs.com/api/admin#reservations\_postreservationsid)
API route.
## Example
```ts
sdk.admin.reservation.update("res_123", {
quantity: 20,
})
.then(({ reservation }) => {
console.log(reservation)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optionaLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReservation/page.mdx)","description":"The details of the reservation to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity\nis reserved from.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the inventory item that is reserved.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"Configure the fields and relations to retrieve in the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of reservations to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of reservations to skip.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the inventory item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the line item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the user(s) to retrieve the\nreservations they created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by reservation description(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#6Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The reservation's details.","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"The reservation's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity is reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the reservation in an external system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"The inventory item that the reservation is for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date that the reservation was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date that the reservation was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date that the reservation was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>