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:
Stevche Radevski
2024-04-15 16:48:29 +02:00
committed by GitHub
parent c3efac5a0d
commit fd83e75e4b
25 changed files with 793 additions and 56 deletions
+15
View File
@@ -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
View File
@@ -1,4 +1,5 @@
export * from "./common"
export * from "./rule"
export * from "./batch"
export * from "./config-module"
export * from "./medusa-container"