chore(types, medusa): [1/n] add missing query type arguments (#8877)
Add missing type arguments in listing requests. 1/n
This commit is contained in:
@@ -11,7 +11,7 @@ import { AdminCreateApiKeyType } from "./validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetApiKeysParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminApiKeyListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -12,7 +12,7 @@ import { refetchCampaign } from "./helpers"
|
||||
import { AdditionalData, HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCampaignParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminCampaignListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { AdminPostOrderClaimsReqSchemaType } from "./validators"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminClaimListParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminClaimListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -13,7 +13,7 @@ import { refetchCollection } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCollectionListParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminCollectionListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -6,7 +6,7 @@ import { MedusaRequest, MedusaResponse } from "../../../types/routing"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest,
|
||||
req: MedusaRequest<HttpTypes.AdminCurrencyListParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminCurrencyListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -12,7 +12,7 @@ import { refetchCustomerGroup } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetCustomerGroupsParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminCustomerGroupListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -13,7 +13,7 @@ import { refetchCustomer } from "./helpers"
|
||||
import { AdminCreateCustomerType } from "./validators"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCustomerFilters>,
|
||||
res: MedusaResponse<HttpTypes.AdminCustomerListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -14,7 +14,7 @@ import { refetchOrder } from "./helpers"
|
||||
import { AdditionalData, CreateOrderDTO, HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: MedusaRequest,
|
||||
req: MedusaRequest<HttpTypes.AdminOrderFilters>,
|
||||
res: MedusaResponse<HttpTypes.AdminDraftOrderListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { AdminPostOrderExchangesReqSchemaType } from "./validators"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminExchangeListParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminExchangeListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -6,11 +6,10 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
import { AdminFulfillmentProvidersParamsType } from "./validators"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<AdminFulfillmentProvidersParamsType>,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetFulfillmentProvidersParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminFulfillmentProviderListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -8,15 +8,11 @@ import {
|
||||
} from "@medusajs/utils"
|
||||
|
||||
import { createInventoryItemsWorkflow } from "@medusajs/core-flows"
|
||||
import {
|
||||
AdminCreateInventoryItemType,
|
||||
AdminGetInventoryItemsParamsType,
|
||||
} from "./validators"
|
||||
import { refetchInventoryItem } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminCreateInventoryItemType>,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCreateInventoryItem>,
|
||||
res: MedusaResponse<HttpTypes.AdminInventoryItemResponse>
|
||||
) => {
|
||||
const { result } = await createInventoryItemsWorkflow(req.scope).run({
|
||||
@@ -33,7 +29,7 @@ export const POST = async (
|
||||
}
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<AdminGetInventoryItemsParamsType>,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminInventoryItemParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminInventoryItemListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
|
||||
@@ -8,12 +8,11 @@ import {
|
||||
} from "@medusajs/utils"
|
||||
|
||||
import { createInvitesWorkflow } from "@medusajs/core-flows"
|
||||
import { AdminCreateInviteType, AdminGetInvitesParamsType } from "./validators"
|
||||
import { refetchInvite } from "./helpers"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<AdminGetInvitesParamsType>,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminGetInvitesParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminInviteListResponse>
|
||||
) => {
|
||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||
@@ -37,7 +36,7 @@ export const GET = async (
|
||||
}
|
||||
|
||||
export const POST = async (
|
||||
req: AuthenticatedMedusaRequest<AdminCreateInviteType>,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminCreateInvite>,
|
||||
res: MedusaResponse<HttpTypes.AdminInviteResponse>
|
||||
) => {
|
||||
const workflow = createInvitesWorkflow(req.scope)
|
||||
|
||||
@@ -2,12 +2,11 @@ import {
|
||||
AuthenticatedMedusaRequest,
|
||||
MedusaResponse,
|
||||
} from "../../../types/routing"
|
||||
import { AdminGetNotificationsParamsType } from "./validators"
|
||||
import { refetchEntities } from "../../utils/refetch-entity"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest<AdminGetNotificationsParamsType>,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminNotificationListParams>,
|
||||
res: MedusaResponse<HttpTypes.AdminNotificationListResponse>
|
||||
) => {
|
||||
const { rows: notifications, metadata } = await refetchEntities(
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from "../../../types/routing"
|
||||
|
||||
export const GET = async (
|
||||
req: AuthenticatedMedusaRequest,
|
||||
req: AuthenticatedMedusaRequest<HttpTypes.AdminOrderFilters>,
|
||||
res: MedusaResponse<HttpTypes.AdminOrderListResponse>
|
||||
) => {
|
||||
const variables = {
|
||||
|
||||
Reference in New Issue
Block a user