feat: Improve how options are defined and handled for product (#7007)

* feat: Improve how options are defined and handled for product

* fix: Updating option values supports passing without id
This commit is contained in:
Stevche Radevski
2024-04-08 15:29:41 +02:00
committed by GitHub
parent 7b4ff1ae57
commit fa5c9bbe8f
18 changed files with 320 additions and 437 deletions
+1 -40
View File
@@ -237,7 +237,7 @@ export interface ProductVariantDTO {
*
* @expandable
*/
options: ProductVariantOptionDTO[]
options: ProductOptionValueDTO[]
/**
* Holds custom data in key-value pairs.
*/
@@ -554,45 +554,6 @@ export interface ProductOptionDTO {
deleted_at?: string | Date
}
export interface ProductVariantOptionDTO {
/**
* The ID of the product variant option.
*/
id: string
/**
* The value of the product variant option.
*
* @expandable
*/
option_value?: ProductOptionValueDTO | null
/**
* The value of the product variant option id.
*/
option_value_id?: string | null
/**
* The associated product variant.
*
* @expandable
*/
variant?: ProductVariantDTO | null
/**
* The associated product variant id.
*/
variant_id?: string | null
/**
* When the product variant option was created.
*/
created_at: string | Date
/**
* When the product variant option was updated.
*/
updated_at: string | Date
/**
* When the product variant option was deleted.
*/
deleted_at?: string | Date
}
/**
* @interface
*