docs: refactor to use TypeScript, ESLint, and Tailwind CSS (#4136)

* docs(refactoring): configured eslint and typescript (#3511)

* docs: configured eslint and typescript

* fixed yarn.lock

* docs(refactoring): migrate components directory to typescript (#3517)

* docs: migrate components directory to typescript

* removed vscode settings

* fix following merge

* docs: refactored QueryNote component (#3576)

* docs: refactored first batch of theme components (#3579)

* docs: refactored second batch of theme components (#3580)

* added missing badge styles

* fix after merge

* docs(refactoring): migrated remaining component to TypeScript (#3770)

* docs(refactoring): configured eslint and typescript (#3511)

* docs: configured eslint and typescript

* fixed yarn.lock

* docs(refactoring): migrate components directory to typescript (#3517)

* docs: migrate components directory to typescript

* removed vscode settings

* fix following merge

* docs: refactored QueryNote component (#3576)

* docs: refactored first batch of theme components (#3579)

* docs: refactored second batch of theme components (#3580)

* added missing badge styles

* docs: refactoring second batch of theme components

* fix after merge

* refactored icons and other components

* docs: refactored all components

* docs(refactoring): set up and configured Tailwind Css (#3841)

* docs: added tailwind config

* docs: added more tailwind configurations

* add includes option

* added more tailwind configurations

* fix to configurations

* docs(refactoring): use tailwind css (#4134)

* docs: added tailwind config

* docs: added more tailwind configurations

* add includes option

* added more tailwind configurations

* fix to configurations

* docs(refactoring): refactored all styles to use tailwind css (#4132)

* refactored Badge component to use tailwind css

* refactored Bordered component to use tailwind css

* updated to latest docusaurus

* refactored BorderedIcon component to use tailwind css

* refactored Feedback component to use tailwind css

* refactored icons and footersociallinks to tailwind css

* start refactoring of large card

* refactored large card styling

* refactored until admonitions

* refactored until codeblock

* refactored until Tabs

* refactored Tabs (without testing

* finished refactoring styles to tailwind css

* upgraded to version 2.4.1

* general fixes

* adjusted eslint configurations

* fixed ignore files

* fixes to large card

* fix search styling

* fix npx command

* updated tabs to use isCodeTabs prop

* fixed os tabs

* removed os-tabs class in favor of general styling

* improvements to buttons

* fix for searchbar

* fixed redocly download button

* chore: added eslint code action (#4135)

* small change in commerce modules page
This commit is contained in:
Shahed Nasser
2023-05-19 14:56:48 +03:00
committed by GitHub
parent 29a88bbf98
commit 94907730d2
292 changed files with 11721 additions and 42102 deletions

View File

@@ -82,7 +82,7 @@ Before you can start making changes to an order, you have to create a new order
To do that, send a request to the [Create an OrderEdit](/api/admin/#tag/OrderEdit/operation/PostOrderEdits) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -176,7 +176,7 @@ You can only make changes to items that have not been fulfilled yet in the order
To add a new item to the original order, send a request to the [Add Line Item](/api/admin/#tag/OrderEdit/operation/PostOrderEditsEditLineItems) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -261,7 +261,7 @@ You can edit an items quantity in the original order.
To update an item, send a request to the [Update Line Item](/api/admin/#tag/OrderEdit/operation/PostOrderEditsEditLineItemsLineItem) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -344,7 +344,7 @@ This request returns the Order Edit object. You can access returned item changes
You can remove an item from the original order by sending a request to the [Remove Line Item](/api/admin/#tag/OrderEdit/operation/DeleteOrderEditsOrderEditLineItemsLineItem) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -415,7 +415,7 @@ A merchant might make a mistake while making a change to the original orders
To revert an item change, send a request to the [Delete Item Change](/api/admin/#tag/OrderEdit/operation/DeleteOrderEditsOrderEditItemChange) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -493,7 +493,7 @@ After an Order Edit is created and all the item changes are added, it must be mo
To move an Order Edit into the request state, send a request to the [Request Confirmation](/api/admin/#tag/OrderEdit/operation/PostOrderEditsOrderEditRequest) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -589,7 +589,7 @@ This section covers how the Admin API can be used to force-confirm the Order Edi
To confirm an Order Edit, send a request to the [Confirm Order Edit](/api/admin/#tag/OrderEdit/operation/PostOrderEditsOrderEditConfirm) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -672,7 +672,7 @@ You can learn how to allow customers to authorize payment on the storefront in [
If the payment is authorized by the customer, it can be captured by sending a request to the [Capture Payment](/api/admin/#tag/Payment/operation/PostPaymentsPaymentCapture) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -738,7 +738,7 @@ When the total after the order edit is less than the original order total, the m
To refund the difference to the customer, send a request to the [Refund Payment](/api/admin/#tag/Payment/operation/PostPaymentsPaymentRefunds) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -60,7 +60,7 @@ You can learn more about [authenticating as an admin user in the API reference](
To view an orders claims, you can retrieve the order using the [Get Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder) and access the orders claims:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -139,7 +139,7 @@ The request returns the order as an object. In that object, you can access an ar
You can create a claim by sending a request to the [Create Claim endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaims):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -257,7 +257,7 @@ The request returns the updated order as an object. You can access the orders
You can update a claim by sending a request to the [Update Claim endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaimsClaim):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -348,7 +348,7 @@ Fulfillments are available on a claim object under the `fulfillments` property,
You can create a fulfillment for a claim by sending a request to the [Create Claim Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaimsClaimFulfillments):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -418,7 +418,7 @@ The request returns the updated order as an object. You can access the orders
You can create a shipment for a claim by sending a request to the [Create Claim Shipment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderClaimsClaimShipments):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -510,7 +510,7 @@ You cant cancel a fulfillment that has a shipment
You can cancel a fulfillment by sending a request to the [Cancel Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersClaimFulfillmentsCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -594,7 +594,7 @@ You cant cancel a claim that has been refunded. You must also cancel the clai
You can cancel a claim by sending a request to the [Cancel Claim endpoint](/api/admin#tag/Orders/operation/PostOrdersClaimCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
You can list draft orders by sending a request to the [List Draft Orders endpoint]( /api/admin#tag/Draft-Orders/operation/GetDraftOrders):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -127,7 +127,7 @@ The request returns an array of draft order objects along with [pagination param
You can create a draft order by sending a request to the [Create Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrders):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -300,7 +300,7 @@ The request returns the created draft order as an object.
You can retrieve a draft order by sending a request to the [Get Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/GetDraftOrdersDraftOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -368,7 +368,7 @@ The request returns the draft order as an object.
You can update a draft order by sending a request to the [Update Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -453,7 +453,7 @@ The request returns the updated draft order as an object.
You can add line items to a draft order by sending a request to the [Create Line Items endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrderLineItems):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -543,7 +543,7 @@ The request returns the updated draft order as an object. You can access the dra
You can update a line item by sending a request to the [Update Line Item endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrderLineItemsItem):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -627,7 +627,7 @@ The request returns the updated draft order as an object. You can access the dra
You can delete a line item by sending a request to the [Delete Line Item endpoint]( /api/admin#tag/Draft-Orders/operation/DeleteDraftOrdersDraftOrderLineItemsItem):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -698,7 +698,7 @@ Registering the draft orders payment leads to authorizing and capturing the p
You can register the draft order payment by sending a request to the [Register Draft Order Payment endpoint]( /api/admin#tag/Draft-Orders/operation/PostDraftOrdersDraftOrderRegisterPayment):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -765,7 +765,7 @@ The request returns the order created from the draft order as an object.
You can delete a draft order by sending a request to the [Delete Draft Order endpoint]( /api/admin#tag/Draft-Orders/operation/DeleteDraftOrdersDraftOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -62,7 +62,7 @@ You can learn more about [authenticating as an admin user in the API reference](
You can list orders by sending a request to the [List Orders endpoint](/api/admin#tag/Orders/operation/GetOrders):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -133,7 +133,7 @@ This endpoint accepts a variety of query parameters that allow you to filter ord
For example, you can filter the orders by one or more status:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -214,7 +214,7 @@ You can check available order statuses [here](../../../references/entities/enums
Another example is filtering the orders by a sales channel:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -295,7 +295,7 @@ curl -L -X GET '<BACKEND_URL>/admin/orders?sales_channel_id[]=<CHANNEL_ID>' \
You can also combine filters together:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -382,7 +382,7 @@ curl -L -X GET '<BACKEND_URL>/admin/orders?status[]=completed&sales_channel_id[]
You can retrieve an order by sending a request to the [Get an Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -463,7 +463,7 @@ Updating an orders details can include updating its:
You can update any of the above details of an order by sending a request to the [Update an Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -548,7 +548,7 @@ The request returns the updated order as an object.
You can capture an orders payment by sending a request to the [Capture Orders Payment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderCapture):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -616,7 +616,7 @@ You can refund an amount that is less than `order.refundable_amount`.
To refund payment, send a request to the [Refund Payment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderRefunds):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -710,7 +710,7 @@ The request returns the updated order as an object.
You can create a fulfillment by sending a request to the [Create a Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderFulfillments):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -818,7 +818,7 @@ The request returns the updated order as an object.
You can create a shipment for a fulfillment by sending a request to the [Create Shipment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderShipment):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -899,7 +899,7 @@ The request returns the updated order as an object.
You can cancel a fulfillment by sending a request to the [Cancel Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderFulfillmentsCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -968,7 +968,7 @@ The request returns the updated order as an object.
You can mark an order completed, changing its status, by sending a request to the [Complete an Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderComplete):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -1035,7 +1035,7 @@ The request returns the updated order as an object.
You can cancel an order by sending a request to the [Cancel Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -1102,7 +1102,7 @@ The request returns the updated order as an object.
You can archive an order by sending a request to the [Archive Order endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderArchive):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -59,7 +59,7 @@ Return reasons allow you to specify why an item is returned. They are especially
You can list available return reasons using the [List Return Reasons endpoint](/api/admin#tag/Return-Reasons/operation/GetReturnReasons):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -132,7 +132,7 @@ The request returns an array of return reason objects.
You can create a return reason using the [Create Return Reason endpoint](/api/admin#tag/Return-Reasons/operation/PostReturnReasons):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -218,7 +218,7 @@ This request returns the created return reason as an object.
You can update a return reason by sending a request to the [Update Return Reason endpoint](/api/admin#tag/Return-Reasons/operation/PostReturnReasonsReason):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -299,7 +299,7 @@ The request returns the updated return reason as an object.
You can delete a return reason by sending a request to the [Delete Return Reason endpoint](/api/admin#tag/Return-Reasons/operation/DeleteReturnReason):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -376,7 +376,7 @@ You can view all returns in your commerce system, regardless of which order they
When you retrieve an order using the [Get Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder), you can access the returns within the order object:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -469,7 +469,7 @@ You can retrieve a claim using the Get Order endpoint as explained [here](./mana
You can mark a return as received by sending a request to the [Receive a Return endpoint](/api/admin#tag/Returns/operation/PostReturnsReturnReceive):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -578,7 +578,7 @@ A received return cant be canceled.
You can cancel a return by sending a request to the [Cancel Return endpoint](/api/admin#tag/Returns/operation/PostReturnsReturnCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -67,7 +67,7 @@ If you want to view all swaps in your system, and not swaps specific to an order
You can view an orders swaps by retrieving the order using the [Get Order endpoint](/api/admin#tag/Orders/operation/GetOrdersOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -147,7 +147,7 @@ Processing a swaps payment can mean either refunding or capturing payment, de
Regardless of whether you need to refund or capture the payment, you can process the swaps payment by sending a request to the [Process Swap Payment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderSwapsSwapProcessPayment):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -222,7 +222,7 @@ Fulfillments are available on a swap object under the `fulfillments` property, w
You can create a fulfillment for a swap by sending a request to the [Create Swap Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderSwapsSwapFulfillments):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -294,7 +294,7 @@ The request returns the updated order as an object. You can access the orders
You can create a shipment for a swaps fulfillment using the [Create Swap Shipment endpoint](/api/admin#tag/Orders/operation/PostOrdersOrderSwapsSwapShipments):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -388,7 +388,7 @@ You cant cancel a fulfillment that has a shipment
You can cancel a fulfillment by sending a request to the [Cancel Swap Fulfillment endpoint](/api/admin#tag/Orders/operation/PostOrdersSwapFulfillmentsCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -472,7 +472,7 @@ You cant cancel a swap that has been refunded. You must also cancel all swap
You can cancel a swap by sending a request to the [Cancel Swap endpoint](/api/admin#tag/Orders/operation/PostOrdersSwapCancel):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -59,7 +59,7 @@ When a customer wants to create a return, they must choose the items they want t
You can optionally allow customers to choose a return shipping option that theyll use to return the items. To show the customers the available return shipping options, send a request to the Get [Shipping Options endpoint](/api/store#tag/Shipping-Options/operation/GetShippingOptions):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -131,7 +131,7 @@ The request returns an array of shipping option objects.
You can create the return by sending a request to the [Create Return endpoint](/api/store#tag/Returns/operation/PostReturns):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -62,7 +62,7 @@ You can optionally allow customers to choose a return shipping option that they
After collecting the swap details in step 1, you can create a swap in the Medusa backend by sending a request to the [Create Swap endpoint](/api/store#tag/Swaps/operation/PostSwaps):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -190,7 +190,7 @@ When you complete the cart, the returned `type` field can be used to indicate th
During your checkout flow, you might need to retrieve the swap using the carts ID. For example, if you want to display the swaps details after the cart is successfully completed. You can do that using the [Get by Cart ID endpoint](/api/store#tag/Swaps/operation/GetSwapsSwapCartId):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -72,7 +72,7 @@ You must have an existing order edit in the “request” state.
You can retrieve a single order edit by its ID by sending a request to the [Get Order Edit](/api/store/#tag/OrderEdit/operation/GetOrderEditsOrderEdit) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -200,7 +200,7 @@ If `difference_due` is greater than 0, then additional payment from the customer
1. Show the customer the available payment processors. These can be retrieved from the details of [the region of the order](/api/store/#tag/Region/operation/GetRegionsRegion).
2. When the customer selects the payment processor, initialize the payment session of that provider in the payment collection. You can do that by sending a request to the [Manage Payment Sessions](/api/store/#tag/Payment/operation/PostPaymentCollectionsSessions) endpoint, passing it the payment collections ID as a path parameter, and the payment processor's ID as a request body parameter:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
<!-- eslint-disable max-len -->
@@ -269,7 +269,7 @@ fetch(
1. Show the customer the payment details form based on the payment sessions provider. For example, if the provider ID of a payment session is `stripe`, you must show Stripes card component to enter the customers card details.
2. Authorize the payment using the payment processor. The [Authorize Payment Session](/api/store/#tag/Payment/operation/PostPaymentCollectionsSessionsSessionAuthorize) endpoint accepts the payment collections ID and the ID of the payment session as path parameters:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -337,7 +337,7 @@ After performing the above steps, you can [complete the Order Edit](#complete-th
To confirm and complete the order edit, send a request to the [Complete Order Edit](/api/store/#tag/OrderEdit/operation/PostOrderEditsOrderEditComplete) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -404,7 +404,7 @@ If the payment isnt authorized first, the order edit completion will fail.
If the customer wants to decline the Order Edit, you can do that by sending a request to the Decline Order Edit endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -79,7 +79,7 @@ When the customer wants to claim an order, they must supply its ID.
To allow the customer to claim an order, send a request to the Claim an Order endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -137,7 +137,7 @@ The link in the email that the customer receives should be a page in your storef
Then, you send a request to the Verify Claim Order endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts

View File

@@ -38,7 +38,7 @@ Retrieving an order by its ID is useful for different scenarios, such as using a
You can retrieve an order by its ID using the [Get Order endpoint](/api/store#tag/Orders/operation/GetOrdersOrder):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -100,7 +100,7 @@ Display IDs allow you to show human-readable IDs to your customers. Retrieving a
You can retrieve an order by its display ID using the [Look Up Order endpoint](/api/store#tag/Orders/operation/GetOrders):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -172,7 +172,7 @@ In certain scenarios, you may need to retrieve an orders details using the ID
You can retrieve an order by the cart ID using the [Get by Cart ID endpoint](/api/store#tag/Orders/operation/GetOrdersOrderCartId):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts