diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index e03ef39e05..3da4c57742 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -10643,23 +10643,6 @@ paths: schema: $ref: '#/components/schemas/AdminPostProductCategoriesReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.create({ - name: 'Jeans', - }) - - .then(({ productCategory }) => { - console.log(productCategory.id); - }); - lang: Shell label: cURL source: > @@ -10686,7 +10669,7 @@ paths: schema: type: object properties: - productCategory: + product_category: $ref: '#/components/schemas/ProductCategory' '400': $ref: '#/components/responses/400_error' @@ -10739,21 +10722,6 @@ paths: type: integer default: 100 x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.list() - - .then(({ product_category, limit, offset, count }) => { - console.log(product_category.length); - }); - lang: Shell label: cURL source: > @@ -10765,7 +10733,7 @@ paths: - api_token: [] - cookie_auth: [] tags: - - Product Categories + - Product Category responses: '200': description: OK @@ -10774,7 +10742,7 @@ paths: schema: type: object properties: - product_category: + product_categories: type: array items: $ref: '#/components/schemas/ProductCategory' @@ -10813,21 +10781,6 @@ paths: schema: type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.delete(product_category_id) - - .then(({ id, object, deleted }) => { - console.log(id); - }); - lang: Shell label: cURL source: > @@ -10886,21 +10839,6 @@ paths: schema: type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.retrieve("pcat-id") - - .then(({ productCategory }) => { - console.log(productCategory.id); - }); - lang: Shell label: cURL source: > @@ -10912,7 +10850,7 @@ paths: - api_token: [] - cookie_auth: [] tags: - - Category + - Product Category responses: '200': description: OK @@ -10921,7 +10859,7 @@ paths: schema: type: object properties: - productCategory: + product_category: $ref: '#/components/schemas/ProductCategory' '400': $ref: '#/components/responses/400_error' @@ -22847,6 +22785,10 @@ components: items: type: object description: A product category object. + parent_category_id: + description: The ID of the parent category. + type: string + default: null parent_category: description: >- A product category object. Available if the relation diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index e03ef39e05..3da4c57742 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -10643,23 +10643,6 @@ paths: schema: $ref: '#/components/schemas/AdminPostProductCategoriesReq' x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.create({ - name: 'Jeans', - }) - - .then(({ productCategory }) => { - console.log(productCategory.id); - }); - lang: Shell label: cURL source: > @@ -10686,7 +10669,7 @@ paths: schema: type: object properties: - productCategory: + product_category: $ref: '#/components/schemas/ProductCategory' '400': $ref: '#/components/responses/400_error' @@ -10739,21 +10722,6 @@ paths: type: integer default: 100 x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.list() - - .then(({ product_category, limit, offset, count }) => { - console.log(product_category.length); - }); - lang: Shell label: cURL source: > @@ -10765,7 +10733,7 @@ paths: - api_token: [] - cookie_auth: [] tags: - - Product Categories + - Product Category responses: '200': description: OK @@ -10774,7 +10742,7 @@ paths: schema: type: object properties: - product_category: + product_categories: type: array items: $ref: '#/components/schemas/ProductCategory' @@ -10813,21 +10781,6 @@ paths: schema: type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.delete(product_category_id) - - .then(({ id, object, deleted }) => { - console.log(id); - }); - lang: Shell label: cURL source: > @@ -10886,21 +10839,6 @@ paths: schema: type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: > - import Medusa from "@medusajs/medusa-js" - - const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: - 3 }) - - // must be previously logged in or use api token - - medusa.admin.productCategories.retrieve("pcat-id") - - .then(({ productCategory }) => { - console.log(productCategory.id); - }); - lang: Shell label: cURL source: > @@ -10912,7 +10850,7 @@ paths: - api_token: [] - cookie_auth: [] tags: - - Category + - Product Category responses: '200': description: OK @@ -10921,7 +10859,7 @@ paths: schema: type: object properties: - productCategory: + product_category: $ref: '#/components/schemas/ProductCategory' '400': $ref: '#/components/responses/400_error' @@ -22847,6 +22785,10 @@ components: items: type: object description: A product category object. + parent_category_id: + description: The ID of the parent category. + type: string + default: null parent_category: description: >- A product category object. Available if the relation diff --git a/docs/api/admin/code_samples/JavaScript/product-categories/getundefined b/docs/api/admin/code_samples/JavaScript/product-categories/getundefined deleted file mode 100644 index 328cf218a4..0000000000 --- a/docs/api/admin/code_samples/JavaScript/product-categories/getundefined +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.list() -.then(({ product_category, limit, offset, count }) => { - console.log(product_category.length); -}); diff --git a/docs/api/admin/code_samples/JavaScript/product-categories/postundefined b/docs/api/admin/code_samples/JavaScript/product-categories/postundefined deleted file mode 100644 index cd4b7f79e6..0000000000 --- a/docs/api/admin/code_samples/JavaScript/product-categories/postundefined +++ /dev/null @@ -1,9 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.create({ - name: 'Jeans', -}) -.then(({ productCategory }) => { - console.log(productCategory.id); -}); diff --git a/docs/api/admin/code_samples/JavaScript/product-categories_{id}/deleteundefined b/docs/api/admin/code_samples/JavaScript/product-categories_{id}/deleteundefined deleted file mode 100644 index 3f79a9da46..0000000000 --- a/docs/api/admin/code_samples/JavaScript/product-categories_{id}/deleteundefined +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.delete(product_category_id) -.then(({ id, object, deleted }) => { - console.log(id); -}); diff --git a/docs/api/admin/code_samples/JavaScript/product-categories_{id}/getundefined b/docs/api/admin/code_samples/JavaScript/product-categories_{id}/getundefined deleted file mode 100644 index 9956745cd5..0000000000 --- a/docs/api/admin/code_samples/JavaScript/product-categories_{id}/getundefined +++ /dev/null @@ -1,7 +0,0 @@ -import Medusa from "@medusajs/medusa-js" -const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) -// must be previously logged in or use api token -medusa.admin.productCategories.retrieve("pcat-id") -.then(({ productCategory }) => { - console.log(productCategory.id); -}); diff --git a/docs/api/admin/components/schemas/ProductCategory.yaml b/docs/api/admin/components/schemas/ProductCategory.yaml index 135a745936..2a4074e25d 100644 --- a/docs/api/admin/components/schemas/ProductCategory.yaml +++ b/docs/api/admin/components/schemas/ProductCategory.yaml @@ -37,6 +37,10 @@ properties: items: type: object description: A product category object. + parent_category_id: + description: The ID of the parent category. + type: string + default: null parent_category: description: >- A product category object. Available if the relation `parent_category` is diff --git a/docs/api/admin/paths/product-categories.yaml b/docs/api/admin/paths/product-categories.yaml index 1510953bf8..34fb79228e 100644 --- a/docs/api/admin/paths/product-categories.yaml +++ b/docs/api/admin/paths/product-categories.yaml @@ -24,10 +24,6 @@ post: schema: $ref: ../components/schemas/AdminPostProductCategoriesReq.yaml x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/product-categories/postundefined - lang: Shell label: cURL source: @@ -45,7 +41,7 @@ post: schema: type: object properties: - productCategory: + product_category: $ref: ../components/schemas/ProductCategory.yaml '400': $ref: ../components/responses/400_error.yaml @@ -98,10 +94,6 @@ get: type: integer default: 100 x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/product-categories/getundefined - lang: Shell label: cURL source: @@ -110,7 +102,7 @@ get: - api_token: [] - cookie_auth: [] tags: - - Product Categories + - Product Category responses: '200': description: OK @@ -119,7 +111,7 @@ get: schema: type: object properties: - product_category: + product_categories: type: array items: $ref: ../components/schemas/ProductCategory.yaml diff --git a/docs/api/admin/paths/product-categories_{id}.yaml b/docs/api/admin/paths/product-categories_{id}.yaml index 2c89a0f662..47550ecb39 100644 --- a/docs/api/admin/paths/product-categories_{id}.yaml +++ b/docs/api/admin/paths/product-categories_{id}.yaml @@ -11,10 +11,6 @@ delete: schema: type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/product-categories_{id}/deleteundefined - lang: Shell label: cURL source: @@ -68,10 +64,6 @@ get: schema: type: string x-codeSamples: - - lang: JavaScript - label: JS Client - source: - $ref: ../code_samples/JavaScript/product-categories_{id}/getundefined - lang: Shell label: cURL source: @@ -80,7 +72,7 @@ get: - api_token: [] - cookie_auth: [] tags: - - Category + - Product Category responses: '200': description: OK @@ -89,7 +81,7 @@ get: schema: type: object properties: - productCategory: + product_category: $ref: ../components/schemas/ProductCategory.yaml '400': $ref: ../components/responses/400_error.yaml diff --git a/docs/api/store-spec3.json b/docs/api/store-spec3.json index 8259e2d33f..c234b6d583 100644 --- a/docs/api/store-spec3.json +++ b/docs/api/store-spec3.json @@ -8224,6 +8224,10 @@ components: items: type: object description: A product category object. + parent_category_id: + description: The ID of the parent category. + type: string + default: null parent_category: description: >- A product category object. Available if the relation diff --git a/docs/api/store-spec3.yaml b/docs/api/store-spec3.yaml index 8259e2d33f..c234b6d583 100644 --- a/docs/api/store-spec3.yaml +++ b/docs/api/store-spec3.yaml @@ -8224,6 +8224,10 @@ components: items: type: object description: A product category object. + parent_category_id: + description: The ID of the parent category. + type: string + default: null parent_category: description: >- A product category object. Available if the relation diff --git a/docs/api/store/components/schemas/ProductCategory.yaml b/docs/api/store/components/schemas/ProductCategory.yaml index 135a745936..2a4074e25d 100644 --- a/docs/api/store/components/schemas/ProductCategory.yaml +++ b/docs/api/store/components/schemas/ProductCategory.yaml @@ -37,6 +37,10 @@ properties: items: type: object description: A product category object. + parent_category_id: + description: The ID of the parent category. + type: string + default: null parent_category: description: >- A product category object. Available if the relation `parent_category` is