fix: allow to pass external_id on create/update (#9694)
This commit is contained in:
@@ -69,6 +69,7 @@ export interface AdminCreateProduct {
|
|||||||
handle?: string
|
handle?: string
|
||||||
status?: ProductStatus
|
status?: ProductStatus
|
||||||
type_id?: string
|
type_id?: string
|
||||||
|
external_id?: string
|
||||||
collection_id?: string
|
collection_id?: string
|
||||||
categories?: { id: string }[]
|
categories?: { id: string }[]
|
||||||
tags?: { id: string }[]
|
tags?: { id: string }[]
|
||||||
@@ -119,6 +120,7 @@ export interface AdminUpdateProduct {
|
|||||||
handle?: string
|
handle?: string
|
||||||
status?: ProductStatus
|
status?: ProductStatus
|
||||||
type_id?: string | null
|
type_id?: string | null
|
||||||
|
external_id?: string | null
|
||||||
collection_id?: string | null
|
collection_id?: string | null
|
||||||
categories?: { id: string }[]
|
categories?: { id: string }[]
|
||||||
tags?: { id: string }[]
|
tags?: { id: string }[]
|
||||||
|
|||||||
@@ -1453,6 +1453,10 @@ export interface CreateProductDTO {
|
|||||||
* The associated images to created or updated.
|
* The associated images to created or updated.
|
||||||
*/
|
*/
|
||||||
images?: UpsertProductImageDTO[]
|
images?: UpsertProductImageDTO[]
|
||||||
|
/**
|
||||||
|
* The id of the product in an external system
|
||||||
|
*/
|
||||||
|
external_id?: string
|
||||||
/**
|
/**
|
||||||
* The product type id to associate with the product.
|
* The product type id to associate with the product.
|
||||||
*/
|
*/
|
||||||
@@ -1569,6 +1573,10 @@ export interface UpdateProductDTO {
|
|||||||
* The associated images to create or update.
|
* The associated images to create or update.
|
||||||
*/
|
*/
|
||||||
images?: UpsertProductImageDTO[]
|
images?: UpsertProductImageDTO[]
|
||||||
|
/**
|
||||||
|
* The id of the product in an external system
|
||||||
|
*/
|
||||||
|
external_id?: string | null
|
||||||
/**
|
/**
|
||||||
* The product type to associate with the product.
|
* The product type to associate with the product.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ export const CreateProduct = z
|
|||||||
thumbnail: z.string().nullish(),
|
thumbnail: z.string().nullish(),
|
||||||
handle: z.string().optional(),
|
handle: z.string().optional(),
|
||||||
status: statusEnum.nullish().default(ProductStatus.DRAFT),
|
status: statusEnum.nullish().default(ProductStatus.DRAFT),
|
||||||
|
external_id: z.string().nullish(),
|
||||||
type_id: z.string().nullish(),
|
type_id: z.string().nullish(),
|
||||||
collection_id: z.string().nullish(),
|
collection_id: z.string().nullish(),
|
||||||
categories: z.array(IdAssociation).optional(),
|
categories: z.array(IdAssociation).optional(),
|
||||||
@@ -254,6 +255,7 @@ export const UpdateProduct = z
|
|||||||
thumbnail: z.string().nullish(),
|
thumbnail: z.string().nullish(),
|
||||||
handle: z.string().nullish(),
|
handle: z.string().nullish(),
|
||||||
type_id: z.string().nullish(),
|
type_id: z.string().nullish(),
|
||||||
|
external_id: z.string().nullish(),
|
||||||
collection_id: z.string().nullish(),
|
collection_id: z.string().nullish(),
|
||||||
categories: z.array(IdAssociation).optional(),
|
categories: z.array(IdAssociation).optional(),
|
||||||
tags: z.array(IdAssociation).optional(),
|
tags: z.array(IdAssociation).optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user