Skip to content

Commit

Permalink
fix(framework): add missing query type argument in request types (#10456
Browse files Browse the repository at this point in the history
)

* fix(framework): add missing query type argument in request types

* fix types
  • Loading branch information
shahednasser authored Dec 6, 2024
1 parent bed00e1 commit 597bffa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-cars-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/framework": patch
---

fix(framework): add missing query type argument in request types
7 changes: 4 additions & 3 deletions packages/core/framework/src/http/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ export interface PublishableKeyContext {
sales_channel_ids: string[]
}

export interface AuthenticatedMedusaRequest<Body = never>
extends MedusaRequest<Body> {
export interface AuthenticatedMedusaRequest<Body = unknown, QueryFields = Record<string, unknown>>
extends MedusaRequest<Body, QueryFields> {
auth_context: AuthContext
publishable_key_context?: PublishableKeyContext
}

export interface MedusaStoreRequest<Body = never> extends MedusaRequest<Body> {
export interface MedusaStoreRequest<Body = unknown, QueryFields = Record<string, unknown>>
extends MedusaRequest<Body, QueryFields> {
auth_context?: AuthContext
publishable_key_context: PublishableKeyContext
}
Expand Down

0 comments on commit 597bffa

Please sign in to comment.