feat: Update product category (#7092)

* feat: Update product category

* Disable V2 FF in product category tes

* clean up
This commit is contained in:
Oli Juhl authored and GitHub committed 2024-04-22 12:30:27 +02:00
1 parent 5c71e8304d
commit 67a21c3e45
15 files changed
+383 -110

No files matched your search

+18 -6
View File
@@ -287,23 +287,27 @@ export interface ProductCategoryDTO {
/**
* The description of the product category.
*/
description?: string
description: string
/**
* The handle of the product category. The handle can be used to create slug URL paths.
*/
handle?: string
handle: string
/**
* Whether the product category is active.
*/
is_active?: boolean
is_active: boolean
/**
* Whether the product category is internal. This can be used to only show the product category to admins and hide it from customers.
*/
is_internal?: boolean
is_internal: boolean
/**
* The ranking of the product category among sibling categories.
*/
rank?: number
rank: number
/**
* The ranking of the product category among sibling categories.
*/
metadata?: Record<string, unknown> | null
/**
* The associated parent category.
*
@@ -340,6 +344,10 @@ export interface CreateProductCategoryDTO {
* The product category's name.
*/
name: string
/**
* The product category's description.
*/
description?: string
/**
* The product category's handle.
*/
@@ -376,6 +384,10 @@ export interface UpdateProductCategoryDTO {
* The name of the product category.
*/
name?: string
/**
* The product category's description.
*/
description?: string
/**
* The handle of the product category.
*/
@@ -399,7 +411,7 @@ export interface UpdateProductCategoryDTO {
/**
* Holds custom data in key-value pairs.
*/
metadata?: Record<string, unknown>
metadata?: Record<string, unknown> | null
}
/**
@@ -1,5 +1,16 @@
import { CreateProductCategoryDTO } from "../../product"
import {
CreateProductCategoryDTO,
UpdateProductCategoryDTO,
} from "../../product"
export interface CreateProductCategoryWorkflowInput {
product_category: CreateProductCategoryDTO
}
// TODO: Should we converted to bulk update
export interface UpdateProductCategoryWorkflowInput {
// selector: FilterableProductCategoryProps
// data: UpdateProductCategoryDTO
id: string
data: UpdateProductCategoryDTO
}