From c6f2f444ed0118b17ea970942d0256fe3bd4043a Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 24 Mar 2025 08:35:15 +0200 Subject: [PATCH] fix(js-sdk): fix the return type of the `promotion.listRules` method (#11937) --- .changeset/bright-oranges-obey.md | 5 +++++ packages/core/js-sdk/src/admin/promotion.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/bright-oranges-obey.md diff --git a/.changeset/bright-oranges-obey.md b/.changeset/bright-oranges-obey.md new file mode 100644 index 0000000000..09ea279751 --- /dev/null +++ b/.changeset/bright-oranges-obey.md @@ -0,0 +1,5 @@ +--- +"@medusajs/js-sdk": patch +--- + +fix(js-sdk): fix the return type of the `promotion.listRules` method diff --git a/packages/core/js-sdk/src/admin/promotion.ts b/packages/core/js-sdk/src/admin/promotion.ts index 5d7cc9820f..924fc93dfe 100644 --- a/packages/core/js-sdk/src/admin/promotion.ts +++ b/packages/core/js-sdk/src/admin/promotion.ts @@ -135,7 +135,7 @@ export class Promotion { headers?: ClientHeaders ) { // eslint-disable-next-line max-len - return await this.client.fetch( + return await this.client.fetch( `/admin/promotions/${id}/${ruleType}`, { headers,