chore: fixes to http and request types for users (#13828)

This commit is contained in:
Shahed Nasser
2025-10-28 11:08:51 +02:00
committed by GitHub
parent aa34d0fe9c
commit 83f2d87fa5
5 changed files with 12 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ import { refetchInvite } from "../../helpers"
import { HttpTypes } from "@medusajs/framework/types"
export const POST = async (
req: MedusaRequest,
req: MedusaRequest<{}, HttpTypes.SelectParams>,
res: MedusaResponse<HttpTypes.AdminInviteResponse>
) => {
const workflow = refreshInviteTokensWorkflow(req.scope)

View File

@@ -9,7 +9,7 @@ import { refetchInvite } from "../helpers"
import { HttpTypes } from "@medusajs/framework/types"
export const GET = async (
req: AuthenticatedMedusaRequest,
req: AuthenticatedMedusaRequest<HttpTypes.SelectParams>,
res: MedusaResponse<HttpTypes.AdminInviteResponse>
) => {
const { id } = req.params

View File

@@ -36,7 +36,10 @@ export const GET = async (
}
export const POST = async (
req: AuthenticatedMedusaRequest<HttpTypes.AdminCreateInvite>,
req: AuthenticatedMedusaRequest<
HttpTypes.AdminCreateInvite,
HttpTypes.SelectParams
>,
res: MedusaResponse<HttpTypes.AdminInviteResponse>
) => {
const workflow = createInvitesWorkflow(req.scope)

View File

@@ -14,11 +14,10 @@ import {
remoteQueryObjectFromString,
} from "@medusajs/framework/utils"
import { refetchUser } from "../helpers"
import { AdminUpdateUserType } from "../validators"
// Get user
export const GET = async (
req: AuthenticatedMedusaRequest,
req: AuthenticatedMedusaRequest<HttpTypes.AdminUserParams>,
res: MedusaResponse<HttpTypes.AdminUserResponse>
) => {
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
@@ -43,7 +42,10 @@ export const GET = async (
// update user
export const POST = async (
req: AuthenticatedMedusaRequest<AdminUpdateUserType>,
req: AuthenticatedMedusaRequest<
HttpTypes.AdminUpdateUser,
HttpTypes.AdminUserParams
>,
res: MedusaResponse<HttpTypes.AdminUserResponse>
) => {
const workflow = updateUsersWorkflow(req.scope)

View File

@@ -10,7 +10,7 @@ import {
import { HttpTypes } from "@medusajs/framework/types"
export const GET = async (
req: AuthenticatedMedusaRequest,
req: AuthenticatedMedusaRequest<HttpTypes.AdminUserParams>,
res: MedusaResponse<HttpTypes.AdminUserResponse>
) => {
const id = req.auth_context.actor_id