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
@@ -65,7 +65,7 @@ The first step is to upload the CSV file that you want to import products.
You can do that by sending the following request to the [Upload Files](/api/admin/#tag/Upload/operation/PostUploads) endpoint:
<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 @@ To start a new product import, you must create a batch job.
You can do that by sending the following request to the [Create a Batch Job](/api/admin/#tag/Batch-Job/operation/PostBatchJobs) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -247,7 +247,7 @@ After creating the batch job, it will be pre-processed. At this point, the CSV f
You can retrieve all the details of the batch job, including its status and the brief statistics related to the products by sending the following request:
<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 @@ A batch job can be confirmed only once the batch job has the status `pre_process
To confirm a batch job send the following request:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -53,7 +53,7 @@ You can learn more about [authenticating as an admin user in the API reference](
You can retrieve available categories by sending a request to the [List Categories](/api/admin#tag/Product-Category/operation/GetProductCategories) endpoint:
<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 @@ You can also pass filters and other selection query parameters to the request. C
You can create a category by sending a request to the [Create a Category](/api/admin#tag/Product-Category/operation/PostProductCategories) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -217,7 +217,7 @@ The request returns the newly created product category.
You can retrieve a product category by sending a request to the [Get a Product Category](/api/admin#tag/Product-Category/operation/GetProductCategoriesCategory) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -287,7 +287,7 @@ It returns the full object of the product category.
You can edit a product category by sending a request to the [Update a Product Category](/api/admin#tag/Product-Category/operation/PostProductCategoriesCategory) endpoint:
<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 @@ You can manage the categories of each product individually using the [product AP
You can add more than one product to a category using the [Add Products to a Category](/api/admin#tag/Product-Category/operation/PostProductCategoriesCategoryProductsBatch) 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 @@ The request returns the full object of the product category updated with the new
You can remove products from a category by sending a request to the [Delete Products](/api/admin#tag/Product-Category/operation/DeleteProductCategoriesCategoryProductsBatch) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -610,7 +610,7 @@ The request returns the full object of the product category updated with the its
You can delete a product category by sending a request to the [Delete a Product Category](/api/admin#tag/Product-Category/operation/DeleteProductCategoriesCategory) endpoint:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -54,7 +54,7 @@ You can learn more about [authenticating as an admin user in the API reference](
You can list products as an admin using the [List Products endpoint](/api/admin#tag/Products/operation/GetProducts):
<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 products along with [pagination parameters](/api
You can create a product by sending a request to the [Create a Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProducts):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -401,7 +401,7 @@ You can learn more about pricing and zero-decimal currencies [here](../products.
You can retrieve a single product as an admin by sending a request to the [Get a Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/GetProductsProduct):
<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 @@ The request returns the product as an object.
You can update a product by sending a request to the [Update Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProduct):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -560,7 +560,7 @@ You can retrieve a products options by retrieving the product either using th
You can add a product option to a product by sending a request to the [Add Product Option endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductOptions):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -639,7 +639,7 @@ The request returns the updated product as an option. You can view available opt
You can update a product option by sending a request to the [Update Product Option endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductOptionsOption):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -723,7 +723,7 @@ The request returns the updated product as an option. You can view available opt
You can delete a product option by sending a request to the [Delete Product Option endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/DeleteProductsProductOptionsOption):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -805,7 +805,7 @@ You can retrieve a products variants by retrieving the product either using t
You can create a product variant by sending a request to the [Create Product Variant endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductVariants):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -940,7 +940,7 @@ The request returns the updated product. You can access the products variants
You can update a product variant by sending a request to the [Update a Product Variant endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/PostProductsProductVariantsVariant):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -1024,7 +1024,7 @@ The request returns the updated product. You can access the products variants
You can delete a product variant by sending a request to the [Delete a Product Variant endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/DeleteProductsProductVariantsVariant):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -1098,7 +1098,7 @@ The request returns the following fields:
You can delete a product by sending a request to the [Delete a Product endpoint](https://docs.medusajs.com/api/admin#tag/Products/operation/DeleteProductsProduct):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -51,7 +51,7 @@ If you follow the Medusa React code blocks, it's assumed you already have [Medus
You can list available products using the [List Products endpoint](/api/store#tag/Products/operation/GetProducts):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -122,7 +122,7 @@ The List Products endpoint accepts different query parameters that allow you to
For example, you can filter products by a category ID:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -193,7 +193,7 @@ This will retrieve only products that belong to that category.
To expand the categories of each product, you can pass `categories` to the `expand` query parameter:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -272,7 +272,7 @@ Its recommended to always include the cart and regions IDs when youre l
For example:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -391,7 +391,7 @@ Medusa React provides utility methods such as `formatVariantPrice` that handles
Heres an example of how you can calculate the price with and without Medusa React:
<Tabs groupId="client-preference" wrapperClassName="code-tabs">
<Tabs groupId="client-preference" isCodeTabs={true}>
<TabItem value="client" label="Without Medusa Client" default>
```tsx
@@ -505,7 +505,7 @@ The Search functionality requires either installing a [search plugin](../../../p
You can search products using the [Search Products endpoint](/api/store#tag/Products/operation/PostProductsSearch):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -551,7 +551,7 @@ The request returns a `hits` array holding the result items. The structure of th
You can retrieve the details of a single product by its ID using the [Get a Product endpoint](/api/store#tag/Products/operation/GetProductsProduct):
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -618,7 +618,7 @@ On the storefront, you may use the handle of a product as its pages path. For
You can retrieve the details of a product by its handle by sending a request to the List Products endpoint, passing the `handle` as a filter:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts
@@ -49,7 +49,7 @@ If you follow the Medusa React code blocks, it's assumed you already have [Medus
You can list product categories by sending a request to the [List Product Categories endpoint](/api/store#tag/Product-Category/operation/GetProductCategories):
<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 @@ By default, the categories are not retrieved along with their nested children. T
You can retrieve a single product category by its ID using the [Get a Product Category endpoint](/api/store#tag/Product-Category/operation/GetProductCategoriesCategory):
<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 @@ On the storefront, you may use the handle of a category as its pages path. Fo
You can retrieve the details of a category by its handle by sending a request to the List Categories endpoint, passing the `handle` as a filter:
<Tabs groupId="request-type" wrapperClassName="code-tabs">
<Tabs groupId="request-type" isCodeTabs={true}>
<TabItem value="client" label="Medusa JS Client" default>
```ts