From 34f4f695c0b8359a6e9efd45fd081ea743a1c439 Mon Sep 17 00:00:00 2001 From: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:30:44 +0100 Subject: [PATCH] fix(types): Add AdminBatchUpdateProductVariant type (#10009) --- .changeset/real-gifts-grow.md | 5 +++++ packages/core/types/src/http/product/admin/payloads.ts | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/real-gifts-grow.md diff --git a/.changeset/real-gifts-grow.md b/.changeset/real-gifts-grow.md new file mode 100644 index 0000000000000..65f6c12f36f4c --- /dev/null +++ b/.changeset/real-gifts-grow.md @@ -0,0 +1,5 @@ +--- +"@medusajs/types": patch +--- + +fix(types): Add AdminBatchUpdateProductVariant type, which includes ID. diff --git a/packages/core/types/src/http/product/admin/payloads.ts b/packages/core/types/src/http/product/admin/payloads.ts index c976542ef600d..796a30c859c19 100644 --- a/packages/core/types/src/http/product/admin/payloads.ts +++ b/packages/core/types/src/http/product/admin/payloads.ts @@ -11,7 +11,7 @@ export interface AdminBatchProductRequest export interface AdminBatchProductVariantRequest extends BatchMethodRequest< AdminCreateProductVariant, - AdminUpdateProductVariant + AdminBatchUpdateProductVariant > {} export interface AdminBatchProductVariantInventoryItemRequest @@ -109,6 +109,10 @@ export interface AdminUpdateProductVariant { options?: Record } +export interface AdminBatchUpdateProductVariant extends AdminUpdateProductVariant { + id: string +} + export interface AdminUpdateProduct { title?: string subtitle?: string | null