From 1f73281ab88c064404ecf7cc9dd0977dfd369723 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Sun, 13 Apr 2025 16:16:57 +0300 Subject: [PATCH] fix(types): fix type of application_method_type filter (#12160) The `application_method_type` filter has a `string` type in the HTTP types. This PR accurately sets the type. This is useful for the generated OAS to show the possible filter values. --- .changeset/spotty-spies-act.md | 5 +++++ packages/core/types/src/http/promotion/admin/queries.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/spotty-spies-act.md diff --git a/.changeset/spotty-spies-act.md b/.changeset/spotty-spies-act.md new file mode 100644 index 0000000000..9c29bf8900 --- /dev/null +++ b/.changeset/spotty-spies-act.md @@ -0,0 +1,5 @@ +--- +"@medusajs/types": patch +--- + +fix(types): fix type of application_method_type filter diff --git a/packages/core/types/src/http/promotion/admin/queries.ts b/packages/core/types/src/http/promotion/admin/queries.ts index 4109adcdfc..0805c9a169 100644 --- a/packages/core/types/src/http/promotion/admin/queries.ts +++ b/packages/core/types/src/http/promotion/admin/queries.ts @@ -1,4 +1,5 @@ import { BaseFilterable, OperatorMap } from "../../../dal" +import { ApplicationMethodTypeValues } from "../../../promotion" import { FindParams, SelectParams } from "../../common" export interface AdminGetPromotionParams extends SelectParams {} @@ -46,7 +47,7 @@ export interface AdminGetPromotionsParams /** * Filter by the promotion's application method type. */ - application_method_type?: string | string[] + application_method_type?: ApplicationMethodTypeValues | ApplicationMethodTypeValues[] /** * An array of filters to apply on the entity, where each item in the array is joined with an "and" condition. */