docs: generate JS SDK reference with fixes (#12161)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-04-11 16:42:09 +03:00
1 parent 90f9149735
commit 734f4fecbc
26 files changed
+6189 -6130

No files matched your search

+24 -24
View File
@@ -2176,7 +2176,7 @@ export const generatedEditDates = {
"app/js-sdk/page.mdx": "2025-03-28T09:50:07.617Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2025-04-11T09:04:55.016Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.campaign/page.mdx": "2025-04-11T09:04:55.081Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.claim/page.mdx": "2025-04-11T09:04:54.863Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.claim/page.mdx": "2025-04-11T13:17:47.098Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.currency/page.mdx": "2025-01-13T18:05:58.402Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.customer/page.mdx": "2025-04-11T09:04:54.414Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.customerGroup/page.mdx": "2025-04-11T09:04:55.047Z",
@@ -2186,8 +2186,8 @@ export const generatedEditDates = {
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.fulfillmentSet/page.mdx": "2025-01-13T18:05:58.243Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.inventoryItem/page.mdx": "2025-01-27T11:43:57.620Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.notification/page.mdx": "2025-01-13T18:05:58.273Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.invite/page.mdx": "2025-04-11T09:04:54.389Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.order/page.mdx": "2025-04-11T09:04:54.699Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.invite/page.mdx": "2025-04-11T13:17:46.905Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.order/page.mdx": "2025-04-11T13:17:47.030Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.orderEdit/page.mdx": "2025-04-11T09:04:54.766Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.payment/page.mdx": "2025-01-13T18:05:58.444Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.paymentCollection/page.mdx": "2024-12-26T11:37:18.123Z",
@@ -2234,7 +2234,7 @@ export const generatedEditDates = {
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addInboundShipping/page.mdx": "2025-04-11T09:04:53.801Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addItems/page.mdx": "2025-04-11T09:04:53.776Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundItems/page.mdx": "2025-04-11T09:04:53.810Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundShipping/page.mdx": "2025-04-11T09:04:53.819Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.addOutboundShipping/page.mdx": "2025-04-11T13:17:46.664Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancel/page.mdx": "2024-12-09T13:21:57.036Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.cancelRequest/page.mdx": "2024-12-09T13:21:57.096Z",
"references/js_sdk/admin/Claim/methods/js_sdk.admin.Claim.create/page.mdx": "2025-04-11T09:04:53.769Z",
@@ -2328,7 +2328,7 @@ export const generatedEditDates = {
"references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.update/page.mdx": "2024-12-09T13:21:58.260Z",
"references/js_sdk/admin/InventoryItem/methods/js_sdk.admin.InventoryItem.updateLevel/page.mdx": "2025-01-17T16:43:31.717Z",
"references/js_sdk/admin/InventoryItem/properties/js_sdk.admin.InventoryItem.client/page.mdx": "2025-02-24T10:48:45.102Z",
"references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.accept/page.mdx": "2025-04-11T09:04:55.207Z",
"references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.accept/page.mdx": "2025-04-11T13:17:47.236Z",
"references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.create/page.mdx": "2024-12-10T14:55:10.090Z",
"references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.delete/page.mdx": "2024-12-09T13:21:58.332Z",
"references/js_sdk/admin/Invite/methods/js_sdk.admin.Invite.list/page.mdx": "2024-12-09T13:21:58.328Z",
@@ -5926,15 +5926,15 @@ export const generatedEditDates = {
"app/recipes/erp/page.mdx": "2025-02-25T11:11:02.259Z",
"app/recipes/erp/odoo/page.mdx": "2025-02-25T11:10:05.938Z",
"app/commerce-modules/product/selling-products/page.mdx": "2025-02-13T13:27:09.270Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.draftOrder/page.mdx": "2025-04-11T09:04:54.745Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.draftOrder/page.mdx": "2025-04-11T13:17:47.049Z",
"references/js_sdk/admin/Client/methods/js_sdk.admin.Client.throwError_/page.mdx": "2025-02-24T10:48:47.018Z",
"references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.getItem/page.mdx": "2025-02-24T10:48:47.069Z",
"references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.removeItem/page.mdx": "2025-02-24T10:48:47.072Z",
"references/js_sdk/admin/CustomStorage/methods/js_sdk.admin.CustomStorage.setItem/page.mdx": "2025-02-24T10:48:47.071Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/page.mdx": "2025-04-11T09:04:54.075Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.create/page.mdx": "2025-04-11T13:17:46.773Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.list/page.mdx": "2025-04-11T09:04:54.071Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.retrieve/page.mdx": "2025-04-11T09:04:54.068Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/page.mdx": "2025-04-11T09:04:54.079Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.update/page.mdx": "2025-04-11T13:17:46.774Z",
"references/js_sdk/admin/DraftOrder/properties/js_sdk.admin.DraftOrder.client/page.mdx": "2025-02-24T10:48:44.111Z",
"references/js_sdk/admin/classes/js_sdk.admin.DraftOrder/page.mdx": "2025-04-11T09:04:54.020Z",
"references/js_sdk/admin/interfaces/js_sdk.admin.CustomStorage/page.mdx": "2025-02-24T10:48:47.068Z",
@@ -6079,22 +6079,22 @@ export const generatedEditDates = {
"references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.listAddresses/page.mdx": "2025-04-11T09:04:54.019Z",
"references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.retrieveAddress/page.mdx": "2025-04-11T09:04:54.017Z",
"references/js_sdk/admin/Customer/methods/js_sdk.admin.Customer.updateAddress/page.mdx": "2025-04-11T09:04:54.013Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/page.mdx": "2025-04-11T09:04:54.084Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/page.mdx": "2025-04-11T09:04:54.095Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/page.mdx": "2025-04-11T09:04:54.100Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/page.mdx": "2025-04-11T09:04:54.111Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/page.mdx": "2025-04-11T09:04:54.113Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/page.mdx": "2025-04-11T09:04:54.119Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/page.mdx": "2025-04-11T09:04:54.082Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/page.mdx": "2025-04-11T09:04:54.090Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/page.mdx": "2025-04-11T09:04:54.106Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/page.mdx": "2025-04-11T09:04:54.097Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/page.mdx": "2025-04-11T09:04:54.117Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/page.mdx": "2025-04-11T09:04:54.087Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/page.mdx": "2025-04-11T09:04:54.103Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/page.mdx": "2025-04-11T09:04:54.092Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/page.mdx": "2025-04-11T09:04:54.108Z",
"references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createCreditLine/page.mdx": "2025-04-11T09:04:55.418Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addItems/page.mdx": "2025-04-11T13:17:46.776Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addPromotions/page.mdx": "2025-04-11T13:17:46.782Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.addShippingMethod/page.mdx": "2025-04-11T13:17:46.784Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.beginEdit/page.mdx": "2025-04-11T13:17:46.789Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.cancelEdit/page.mdx": "2025-04-11T13:17:46.790Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.confirmEdit/page.mdx": "2025-04-11T13:17:46.792Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.convertToOrder/page.mdx": "2025-04-11T13:17:46.775Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionItem/page.mdx": "2025-04-11T13:17:46.779Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removeActionShippingMethod/page.mdx": "2025-04-11T13:17:46.786Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.removePromotions/page.mdx": "2025-04-11T13:17:46.783Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.requestEdit/page.mdx": "2025-04-11T13:17:46.791Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionItem/page.mdx": "2025-04-11T13:17:46.778Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateActionShippingMethod/page.mdx": "2025-04-11T13:17:46.785Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateItem/page.mdx": "2025-04-11T13:17:46.780Z",
"references/js_sdk/admin/DraftOrder/methods/js_sdk.admin.DraftOrder.updateShippingMethod/page.mdx": "2025-04-11T13:17:46.788Z",
"references/js_sdk/admin/Order/methods/js_sdk.admin.Order.createCreditLine/page.mdx": "2025-04-11T13:17:47.326Z",
"references/js_sdk/admin/Plugin/methods/js_sdk.admin.Plugin.list/page.mdx": "2025-04-11T09:04:55.576Z",
"references/js_sdk/admin/Plugin/properties/js_sdk.admin.Plugin.client/page.mdx": "2025-04-11T09:04:55.574Z",
"references/js_sdk/admin/classes/js_sdk.admin.Plugin/page.mdx": "2025-04-11T09:04:55.529Z",
@@ -561,7 +561,7 @@ API route.
### Example
```ts
* sdk.admin.claim.addOutboundShipping(
sdk.admin.claim.addOutboundShipping(
"claim_123",
{
shipping_option_id: "so_123",
@@ -114,8 +114,6 @@ This method creates a draft order. It sends a request to the
### Example
To create a draft order:
```ts
sdk.admin.draftOrder.create({
email: "test@test.com",
@@ -150,8 +148,6 @@ This method updates a draft order. It sends a request to the
### Example
To update a draft order:
```ts
sdk.admin.draftOrder.update("order_123", {
email: "test@test.com",
@@ -178,13 +174,12 @@ This method converts a draft order to an order. It sends a request to the
### Example
To convert a draft order to an order:
```ts
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
})
```
### Parameters
@@ -203,8 +198,6 @@ This method adds items to a draft order. It sends a request to the
### Example
To add items to a draft order:
```ts
sdk.admin.draftOrder.addItems("order_123", {
items: [
@@ -236,8 +229,6 @@ This method updates an item that is part of an action in a draft order. It sends
### Example
To update an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.updateActionItem("order_123", "action_123", {
quantity: 2,
@@ -264,8 +255,6 @@ This method removes an item that is part of an action in a draft order. It sends
### Example
To remove an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.removeActionItem("order_123", "action_123")
.then(({ draft_order_preview }) => {
@@ -290,8 +279,6 @@ This method updates an item in a draft order. It sends a request to the
### Example
To update an item in a draft order:
```ts
sdk.admin.draftOrder.updateItem("order_123", "item_123", {
quantity: 2,
@@ -307,7 +294,7 @@ sdk.admin.draftOrder.updateItem("order_123", "item_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates an item in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditemsitem\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the orLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order preview's details.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","dLine truncated
___
@@ -318,8 +305,6 @@ This method adds promotions to a draft order. It sends a request to the
### Example
To add promotions to a draft order:
```ts
sdk.admin.draftOrder.addPromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
@@ -346,8 +331,6 @@ This method removes promotions from a draft order. It sends a request to the
### Example
To remove promotions from a draft order:
```ts
sdk.admin.draftOrder.removePromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
@@ -371,8 +354,6 @@ This method adds a shipping method to a draft order. It sends a request to the
### Example
To add a shipping method to a draft order:
```ts
sdk.admin.draftOrder.addShippingMethod("order_123", {
shipping_option_id: "shipping_option_123",
@@ -399,8 +380,6 @@ This method updates a shipping method in a draft order. It sends a request to th
### Example
To update a shipping method in a draft order:
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", {
shipping_option_id: "shipping_option_123",
@@ -427,8 +406,6 @@ This method removes a shipping method from a draft order. It sends a request to
### Example
To remove a shipping method from a draft order:
```ts
sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123")
.then(({ draft_order_preview }) => {
@@ -448,13 +425,27 @@ ___
## updateShippingMethod
This method updates a shipping method in a draft order. It sends a request to the
[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route.
### Example
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "sm_123", {
shipping_option_id: "so_123",
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderShippingMethod/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","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="updateShippingMethod"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodId","type":"`string`","description":"The shipping method's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderShippingMethod/page.mdx)","description":"The data to update the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","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="updateShippingMethod"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the ordeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order preview's details.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","dLine truncated
___
@@ -465,8 +456,6 @@ This method begins an edit to a draft order. It sends a request to the
### Example
To begin an edit to a draft order:
```ts
sdk.admin.draftOrder.beginEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -491,8 +480,6 @@ This method cancels an edit to a draft order. It sends a request to the
### Example
To cancel an edit to a draft order:
```ts
sdk.admin.draftOrder.cancelEdit("order_123")
.then(({ id, object, deleted }) => {
@@ -517,8 +504,6 @@ This method requests an edit to a draft order. It sends a request to the
### Example
To request an edit to a draft order:
```ts
sdk.admin.draftOrder.requestEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -543,8 +528,6 @@ This method confirms an edit to a draft order. It sends a request to the
### Example
To confirm an edit to a draft order:
```ts
sdk.admin.draftOrder.confirmEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -25,25 +25,20 @@ API route.
### Example
```ts
const token = await sdk.auth.register("user", "emailpass", {
await sdk.auth.register("user", "emailpass", {
email: "user@gmail.com",
password: "supersecret"
})
sdk.admin.invite.accept(
// all subsequent requests will use the token in the header
const { user } = await sdk.admin.invite.accept(
{
email: "user@gmail.com",
first_name: "John",
last_name: "Smith",
invite_token: "12345..."
},
{
Authorization: `Bearer ${token}`
}
)
.then(({ user }) => {
console.log(user)
})
```
### Parameters
@@ -424,10 +424,29 @@ ___
## createCreditLine
This method creates a credit line for an order. It sends a request to the
[Create Credit Line](https://docs.medusajs.com/api/admin#orders\_postordersidcredit-lines) API route.
### Example
```ts
sdk.admin.order.createCreditLine(
"order_123",
{
amount: 100,
reference: "order",
reference_id: "order_123",
}
)
.then(({ order }) => {
console.log(order)
})
```
### Parameters
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"Omit&#60;[CreateOrderCreditLineDTO](../../../../../order/interfaces/order.CreateOrderCreditLineDTO/page.mdx), \"order_id\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../../../order/types/order.BigNumberInput/page.mdx)","description":"The amount of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../order/types/order.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference","type":"`null` \\| `string`","description":"The reference model name that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`null` \\| `string`","description":"The reference model id that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order detail","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/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="createCreditLine"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"Omit&#60;[CreateOrderCreditLineDTO](../../../../../order/interfaces/order.CreateOrderCreditLineDTO/page.mdx), \"order_id\"&#62;","description":"The credit line's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../../../order/types/order.BigNumberInput/page.mdx)","description":"The amount of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../order/types/order.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference","type":"`null` \\| `string`","description":"The reference model name that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`null` \\| `string`","description":"The reference model id that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order detail","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the order.","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="createCreditLine"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"TLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -12,7 +12,7 @@ API route.
## Example
```ts
* sdk.admin.claim.addOutboundShipping(
sdk.admin.claim.addOutboundShipping(
"claim_123",
{
shipping_option_id: "so_123",
@@ -7,8 +7,6 @@ This method adds items to a draft order. It sends a request to the
## Example
To add items to a draft order:
```ts
sdk.admin.draftOrder.addItems("order_123", {
items: [
@@ -7,8 +7,6 @@ This method adds promotions to a draft order. It sends a request to the
## Example
To add promotions to a draft order:
```ts
sdk.admin.draftOrder.addPromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
@@ -7,8 +7,6 @@ This method adds a shipping method to a draft order. It sends a request to the
## Example
To add a shipping method to a draft order:
```ts
sdk.admin.draftOrder.addShippingMethod("order_123", {
shipping_option_id: "shipping_option_123",
@@ -7,8 +7,6 @@ This method begins an edit to a draft order. It sends a request to the
## Example
To begin an edit to a draft order:
```ts
sdk.admin.draftOrder.beginEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method cancels an edit to a draft order. It sends a request to the
## Example
To cancel an edit to a draft order:
```ts
sdk.admin.draftOrder.cancelEdit("order_123")
.then(({ id, object, deleted }) => {
@@ -7,8 +7,6 @@ This method confirms an edit to a draft order. It sends a request to the
## Example
To confirm an edit to a draft order:
```ts
sdk.admin.draftOrder.confirmEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -7,13 +7,12 @@ This method converts a draft order to an order. It sends a request to the
## Example
To convert a draft order to an order:
```ts
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
})
```
## Parameters
@@ -7,8 +7,6 @@ This method creates a draft order. It sends a request to the
## Example
To create a draft order:
```ts
sdk.admin.draftOrder.create({
email: "test@test.com",
@@ -7,8 +7,6 @@ This method removes an item that is part of an action in a draft order. It sends
## Example
To remove an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.removeActionItem("order_123", "action_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method removes a shipping method from a draft order. It sends a request to
## Example
To remove a shipping method from a draft order:
```ts
sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method removes promotions from a draft order. It sends a request to the
## Example
To remove promotions from a draft order:
```ts
sdk.admin.draftOrder.removePromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
@@ -7,8 +7,6 @@ This method requests an edit to a draft order. It sends a request to the
## Example
To request an edit to a draft order:
```ts
sdk.admin.draftOrder.requestEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method updates a draft order. It sends a request to the
## Example
To update a draft order:
```ts
sdk.admin.draftOrder.update("order_123", {
email: "test@test.com",
@@ -7,8 +7,6 @@ This method updates an item that is part of an action in a draft order. It sends
## Example
To update an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.updateActionItem("order_123", "action_123", {
quantity: 2,
@@ -7,8 +7,6 @@ This method updates a shipping method in a draft order. It sends a request to th
## Example
To update a shipping method in a draft order:
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", {
shipping_option_id: "shipping_option_123",
@@ -7,8 +7,6 @@ This method updates an item in a draft order. It sends a request to the
## Example
To update an item in a draft order:
```ts
sdk.admin.draftOrder.updateItem("order_123", "item_123", {
quantity: 2,
@@ -24,4 +22,4 @@ sdk.admin.draftOrder.updateItem("order_123", "item_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates an item in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditemsitem\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the orLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order preview's details.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","dLine truncated
@@ -2,10 +2,24 @@ import { TypeList } from "docs-ui"
# updateShippingMethod
This method updates a shipping method in a draft order. It sends a request to the
[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route.
## Example
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "sm_123", {
shipping_option_id: "so_123",
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderShippingMethod/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","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="updateShippingMethod"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodId","type":"`string`","description":"The shipping method's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderShippingMethod/page.mdx)","description":"The data to update the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","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="updateShippingMethod"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the ordeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order preview's details.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","dLine truncated
@@ -12,25 +12,20 @@ API route.
## Example
```ts
const token = await sdk.auth.register("user", "emailpass", {
await sdk.auth.register("user", "emailpass", {
email: "user@gmail.com",
password: "supersecret"
})
sdk.admin.invite.accept(
// all subsequent requests will use the token in the header
const { user } = await sdk.admin.invite.accept(
{
email: "user@gmail.com",
first_name: "John",
last_name: "Smith",
invite_token: "12345..."
},
{
Authorization: `Bearer ${token}`
}
)
.then(({ user }) => {
console.log(user)
})
```
## Parameters
@@ -2,10 +2,29 @@ import { TypeList } from "docs-ui"
# createCreditLine
This method creates a credit line for an order. It sends a request to the
[Create Credit Line](https://docs.medusajs.com/api/admin#orders\_postordersidcredit-lines) API route.
## Example
```ts
sdk.admin.order.createCreditLine(
"order_123",
{
amount: 100,
reference: "order",
reference_id: "order_123",
}
)
.then(({ order }) => {
console.log(order)
})
```
## Parameters
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"Omit&#60;[CreateOrderCreditLineDTO](../../../../../order/interfaces/order.CreateOrderCreditLineDTO/page.mdx), \"order_id\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../../../order/types/order.BigNumberInput/page.mdx)","description":"The amount of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../order/types/order.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference","type":"`null` \\| `string`","description":"The reference model name that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`null` \\| `string`","description":"The reference model id that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order detail","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/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="createCreditLine"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"Omit&#60;[CreateOrderCreditLineDTO](../../../../../order/interfaces/order.CreateOrderCreditLineDTO/page.mdx), \"order_id\"&#62;","description":"The credit line's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../../../order/types/order.BigNumberInput/page.mdx)","description":"The amount of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../order/types/order.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference","type":"`null` \\| `string`","description":"The reference model name that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`null` \\| `string`","description":"The reference model id that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order detail","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the order.","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="createCreditLine"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"TLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
File diff suppressed because it is too large. Load diff