feat: Add support for batch method for products and product variants (#7038)
* feat(products): Add batch methods for product and variants * chore: Rename batch validator and minor changes based on PR review
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export type BatchMethodRequest<TCreate extends any, TUpdate extends any> = {
|
||||
create?: TCreate[]
|
||||
update?: TUpdate[]
|
||||
delete?: string[]
|
||||
}
|
||||
|
||||
export type BatchMethodResponse<T extends any> = {
|
||||
created: T[]
|
||||
updated: T[]
|
||||
deleted: {
|
||||
ids: string[]
|
||||
object: string
|
||||
deleted: boolean
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from "./common"
|
||||
export * from "./rule"
|
||||
export * from "./batch"
|
||||
export * from "./config-module"
|
||||
export * from "./medusa-container"
|
||||
|
||||
Reference in New Issue
Block a user