docs: added manage products documentation (#3867)
* docs: added manage products documentation * lint fixes * generated oas types
This commit is contained in:
1 parent
9836adeec7
commit
8766b16e3b
8 files changed
+1185
-73
No files matched your search
@@ -191,25 +191,6 @@ For other distributions, you can check out [PostgreSQL’s website for more guid
|
|||||||
|
|
||||||
You can download PostgreSQL on your macOS using [the installer on their website](https://www.postgresql.org/download/macosx/).
|
You can download PostgreSQL on your macOS using [the installer on their website](https://www.postgresql.org/download/macosx/).
|
||||||
|
|
||||||
</TabItem>
|
|
||||||
<TabItem value="docker" label="Docker">
|
|
||||||
|
|
||||||
Make sure the Docker Desktop app is running, then run the following command to quickly spin up a PostgreSQL instance:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --name postgres -e POSTGRES_USER=postgres \
|
|
||||||
-e POSTGRES_PASSWORD=postgres -e \
|
|
||||||
POSTGRES_DB=medusa-docker -p 5432:5432 -d postgres
|
|
||||||
```
|
|
||||||
|
|
||||||
Where:
|
|
||||||
|
|
||||||
- `--name` creates a new container named `postgres`.
|
|
||||||
- `-e` creates environment variables `POSTGRES_USER`, `POSTGRES_PASSWORD` and `POSTGRES_DB`. These will be used to set up a database named `medusa-docker` with the username and password being `postgres`.
|
|
||||||
- `-p` maps the container port `5432` to the external host `5432`. This allows you to connect to the database backend from outside of the container.
|
|
||||||
- `-d` enables Docker to run the container in the background.
|
|
||||||
- The last section of the command, `postgres` grabs the latest postgres image from the Docker hub.
|
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -24,7 +24,7 @@ Admins can manage unlimited amount of products and their variants. They can mana
|
|||||||
<DocCardList colSize={4} items={[
|
<DocCardList colSize={4} items={[
|
||||||
{
|
{
|
||||||
type: 'link',
|
type: 'link',
|
||||||
href: '#',
|
href: '/modules/products/admin/manage-products',
|
||||||
label: 'Admin: Manage Products',
|
label: 'Admin: Manage Products',
|
||||||
customProps: {
|
customProps: {
|
||||||
icon: Icons['academic-cap-solid'],
|
icon: Icons['academic-cap-solid'],
|
||||||
@@ -127,7 +127,7 @@ Admins can bulk import and export products using CSV files. This facilitates mov
|
|||||||
|
|
||||||
Learn how product-related entities are build, their relation to other modules, and more.
|
Learn how product-related entities are build, their relation to other modules, and more.
|
||||||
|
|
||||||
<DocCardList colSize={4} items={[
|
<DocCardList colSize={6} items={[
|
||||||
{
|
{
|
||||||
type: 'link',
|
type: 'link',
|
||||||
href: '/modules/products',
|
href: '/modules/products',
|
||||||
@@ -146,16 +146,6 @@ Learn how product-related entities are build, their relation to other modules, a
|
|||||||
description: 'Learn about the Product Category Architecture.',
|
description: 'Learn about the Product Category Architecture.',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'link',
|
|
||||||
href: '#',
|
|
||||||
label: 'Architecture: Collection',
|
|
||||||
customProps: {
|
|
||||||
icon: Icons['circle-stack-solid'],
|
|
||||||
description: 'Learn about the Collection Architecture.',
|
|
||||||
isSoon: true,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]} />
|
]} />
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ export interface AdminPostProductsProductVariantsVariantReq {
|
|||||||
* An optional set of key-value pairs with additional information.
|
* An optional set of key-value pairs with additional information.
|
||||||
*/
|
*/
|
||||||
metadata?: Record<string, any>
|
metadata?: Record<string, any>
|
||||||
prices: Array<{
|
prices?: Array<{
|
||||||
/**
|
/**
|
||||||
* The ID of the price.
|
* The ID of the price.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { EntityManager } from "typeorm"
|
|||||||
/**
|
/**
|
||||||
* @oas [post] /admin/products/{id}/options
|
* @oas [post] /admin/products/{id}/options
|
||||||
* operationId: "PostProductsProductOptions"
|
* operationId: "PostProductsProductOptions"
|
||||||
* summary: "Add an Option"
|
* summary: "Add a Product Option"
|
||||||
* x-authenticated: true
|
* x-authenticated: true
|
||||||
* description: "Adds a Product Option to a Product"
|
* description: "Adds a Product Option to a Product"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { ProductService } from "../../../../services"
|
|||||||
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
* // must be previously logged in or use api token
|
* // must be previously logged in or use api token
|
||||||
* medusa.admin.products.deleteOption(product_id, option_id)
|
* medusa.admin.products.deleteOption(product_id, option_id)
|
||||||
* .then(({ option_id, object, delete, product }) => {
|
* .then(({ option_id, object, deleted, product }) => {
|
||||||
* console.log(product.id);
|
* console.log(product.id);
|
||||||
* });
|
* });
|
||||||
* - lang: Shell
|
* - lang: Shell
|
||||||
|
|||||||
@@ -150,8 +150,6 @@ class ProductVariantOptionReq {
|
|||||||
/**
|
/**
|
||||||
* @schema AdminPostProductsProductVariantsVariantReq
|
* @schema AdminPostProductsProductVariantsVariantReq
|
||||||
* type: object
|
* type: object
|
||||||
* required:
|
|
||||||
* - prices
|
|
||||||
* properties:
|
* properties:
|
||||||
* title:
|
* title:
|
||||||
* description: The title to identify the Product Variant by.
|
* description: The title to identify the Product Variant by.
|
||||||
|
|||||||
+11
-37
@@ -210,16 +210,17 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'doc',
|
type: "doc",
|
||||||
id: 'deployments/server/deploying-on-microtica',
|
id: "deployments/server/deploying-on-microtica",
|
||||||
label: 'Deploy on Microtica',
|
label: "Deploy on Microtica",
|
||||||
customProps: {
|
customProps: {
|
||||||
themedImage: {
|
themedImage: {
|
||||||
light: 'https://res.cloudinary.com/dza7lstvk/image/upload/v1681296578/Medusa%20Docs/Other/aF4ZuDS_t11rcu.png',
|
light:
|
||||||
dark: 'https://res.cloudinary.com/dza7lstvk/image/upload/v1681296612/Medusa%20Docs/Other/Lg7NHQk_qo6oax.png'
|
"https://res.cloudinary.com/dza7lstvk/image/upload/v1681296578/Medusa%20Docs/Other/aF4ZuDS_t11rcu.png",
|
||||||
}
|
dark: "https://res.cloudinary.com/dza7lstvk/image/upload/v1681296612/Medusa%20Docs/Other/Lg7NHQk_qo6oax.png",
|
||||||
}
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "doc",
|
type: "doc",
|
||||||
@@ -597,14 +598,6 @@ module.exports = {
|
|||||||
id: "modules/products/categories",
|
id: "modules/products/categories",
|
||||||
label: "Categories",
|
label: "Categories",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "link",
|
|
||||||
href: "#",
|
|
||||||
label: "Collections",
|
|
||||||
customProps: {
|
|
||||||
sidebar_is_soon: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: "html",
|
type: "html",
|
||||||
value: "How-to",
|
value: "How-to",
|
||||||
@@ -613,26 +606,15 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "doc",
|
||||||
href: "#",
|
id: "modules/products/admin/manage-products",
|
||||||
label: "Admin: Manage Products",
|
label: "Admin: Manage Products",
|
||||||
customProps: {
|
|
||||||
sidebar_is_soon: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "doc",
|
type: "doc",
|
||||||
id: "modules/products/admin/manage-categories",
|
id: "modules/products/admin/manage-categories",
|
||||||
label: "Admin: Manage Categories",
|
label: "Admin: Manage Categories",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "link",
|
|
||||||
href: "#",
|
|
||||||
label: "Admin: Manage Collections",
|
|
||||||
customProps: {
|
|
||||||
sidebar_is_soon: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: "doc",
|
type: "doc",
|
||||||
id: "modules/products/admin/import-products",
|
id: "modules/products/admin/import-products",
|
||||||
@@ -648,14 +630,6 @@ module.exports = {
|
|||||||
id: "modules/products/storefront/use-categories",
|
id: "modules/products/storefront/use-categories",
|
||||||
label: "Storefront: Use Categories",
|
label: "Storefront: Use Categories",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "link",
|
|
||||||
href: "#",
|
|
||||||
label: "Storefront: Show Collections",
|
|
||||||
customProps: {
|
|
||||||
sidebar_is_soon: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user