chore(medusa,types): [13] Add request types to API routes (#8575)
This commit is contained in:
@@ -10,4 +10,4 @@ export type AdminSalesChannelListResponse = PaginatedResponse<{
|
|||||||
}>
|
}>
|
||||||
|
|
||||||
export interface AdminSalesChannelDeleteResponse
|
export interface AdminSalesChannelDeleteResponse
|
||||||
extends DeleteResponse<"sales_channel"> {}
|
extends DeleteResponse<"sales-channel"> {}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { BatchMethodResponse } from "../../../common"
|
||||||
import { DeleteResponse, PaginatedResponse } from "../../common"
|
import { DeleteResponse, PaginatedResponse } from "../../common"
|
||||||
import { AdminShippingOption, AdminShippingOptionRule } from "./entities"
|
import { AdminShippingOption, AdminShippingOptionRule } from "./entities"
|
||||||
|
|
||||||
@@ -12,12 +13,4 @@ export type AdminShippingOptionListResponse = PaginatedResponse<{
|
|||||||
export interface AdminShippingOptionDeleteResponse
|
export interface AdminShippingOptionDeleteResponse
|
||||||
extends DeleteResponse<"shipping_option"> {}
|
extends DeleteResponse<"shipping_option"> {}
|
||||||
|
|
||||||
export interface AdminUpdateShippingOptionRulesResponse {
|
export type AdminUpdateShippingOptionRulesResponse = BatchMethodResponse<AdminShippingOptionRule>
|
||||||
created: AdminShippingOptionRule[]
|
|
||||||
updated: AdminShippingOptionRule[]
|
|
||||||
deleted: {
|
|
||||||
ids: string[]
|
|
||||||
object: "shipping_option_rule"
|
|
||||||
deleted: boolean
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,12 +4,12 @@ import {
|
|||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
|
|
||||||
import { linkProductsToSalesChannelWorkflow } from "@medusajs/core-flows"
|
import { linkProductsToSalesChannelWorkflow } from "@medusajs/core-flows"
|
||||||
import { LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||||
import { refetchSalesChannel } from "../../helpers"
|
import { refetchSalesChannel } from "../../helpers"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<LinkMethodRequest>,
|
req: AuthenticatedMedusaRequest<LinkMethodRequest>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminSalesChannelResponse>
|
||||||
) => {
|
) => {
|
||||||
const { id } = req.params
|
const { id } = req.params
|
||||||
const { add, remove } = req.validatedBody
|
const { add, remove } = req.validatedBody
|
||||||
|
|||||||
@@ -12,10 +12,11 @@ import {
|
|||||||
AdminGetSalesChannelParamsType,
|
AdminGetSalesChannelParamsType,
|
||||||
AdminUpdateSalesChannelType,
|
AdminUpdateSalesChannelType,
|
||||||
} from "../validators"
|
} from "../validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetSalesChannelParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetSalesChannelParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminSalesChannelResponse>
|
||||||
) => {
|
) => {
|
||||||
const salesChannel = await refetchSalesChannel(
|
const salesChannel = await refetchSalesChannel(
|
||||||
req.params.id,
|
req.params.id,
|
||||||
@@ -35,7 +36,7 @@ export const GET = async (
|
|||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminUpdateSalesChannelType>,
|
req: AuthenticatedMedusaRequest<AdminUpdateSalesChannelType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminSalesChannelResponse>
|
||||||
) => {
|
) => {
|
||||||
await updateSalesChannelsWorkflow(req.scope).run({
|
await updateSalesChannelsWorkflow(req.scope).run({
|
||||||
input: {
|
input: {
|
||||||
@@ -54,7 +55,7 @@ export const POST = async (
|
|||||||
|
|
||||||
export const DELETE = async (
|
export const DELETE = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminSalesChannelDeleteResponse>
|
||||||
) => {
|
) => {
|
||||||
const id = req.params.id
|
const id = req.params.id
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,11 @@ import {
|
|||||||
AdminCreateSalesChannelType,
|
AdminCreateSalesChannelType,
|
||||||
AdminGetSalesChannelsParamsType,
|
AdminGetSalesChannelsParamsType,
|
||||||
} from "./validators"
|
} from "./validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetSalesChannelsParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetSalesChannelsParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminSalesChannelListResponse>
|
||||||
) => {
|
) => {
|
||||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ export const GET = async (
|
|||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminCreateSalesChannelType>,
|
req: AuthenticatedMedusaRequest<AdminCreateSalesChannelType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminSalesChannelResponse>
|
||||||
) => {
|
) => {
|
||||||
const salesChannelsData = [req.validatedBody]
|
const salesChannelsData = [req.validatedBody]
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
AuthenticatedMedusaRequest,
|
AuthenticatedMedusaRequest,
|
||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { BatchMethodRequest } from "@medusajs/types"
|
import { BatchMethodRequest, HttpTypes } from "@medusajs/types"
|
||||||
import {
|
import {
|
||||||
AdminCreateShippingOptionRuleType,
|
AdminCreateShippingOptionRuleType,
|
||||||
AdminUpdateShippingOptionRuleType,
|
AdminUpdateShippingOptionRuleType,
|
||||||
@@ -17,7 +17,7 @@ export const POST = async (
|
|||||||
AdminUpdateShippingOptionRuleType
|
AdminUpdateShippingOptionRuleType
|
||||||
>
|
>
|
||||||
>,
|
>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminUpdateShippingOptionRulesResponse>
|
||||||
) => {
|
) => {
|
||||||
const id = req.params.id
|
const id = req.params.id
|
||||||
const { result } = await batchShippingOptionRulesWorkflow(req.scope).run({
|
const { result } = await batchShippingOptionRulesWorkflow(req.scope).run({
|
||||||
@@ -37,5 +37,9 @@ export const POST = async (
|
|||||||
req.remoteQueryConfig.fields
|
req.remoteQueryConfig.fields
|
||||||
)
|
)
|
||||||
|
|
||||||
res.status(200).json(batchResults)
|
res
|
||||||
|
.status(200)
|
||||||
|
.json(
|
||||||
|
batchResults as unknown as HttpTypes.AdminUpdateShippingOptionRulesResponse
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { batchLinksWorkflow } from "@medusajs/core-flows"
|
import { batchLinksWorkflow } from "@medusajs/core-flows"
|
||||||
import { LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||||
import { Modules } from "@medusajs/utils"
|
import { Modules } from "@medusajs/utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -19,7 +19,7 @@ const buildLinks = (id, fulfillmentProviderIds: string[]) => {
|
|||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<LinkMethodRequest>,
|
req: AuthenticatedMedusaRequest<LinkMethodRequest>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationResponse>
|
||||||
) => {
|
) => {
|
||||||
const { id } = req.params
|
const { id } = req.params
|
||||||
const { add = [], remove = [] } = req.validatedBody
|
const { add = [], remove = [] } = req.validatedBody
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ import {
|
|||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
import { refetchStockLocation } from "../../helpers"
|
import { refetchStockLocation } from "../../helpers"
|
||||||
import { AdminCreateStockLocationFulfillmentSetType } from "../../validators"
|
import { AdminCreateStockLocationFulfillmentSetType } from "../../validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminCreateStockLocationFulfillmentSetType>,
|
req: AuthenticatedMedusaRequest<AdminCreateStockLocationFulfillmentSetType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationResponse>
|
||||||
) => {
|
) => {
|
||||||
await createLocationFulfillmentSetWorkflow(req.scope).run({
|
await createLocationFulfillmentSetWorkflow(req.scope).run({
|
||||||
input: {
|
input: {
|
||||||
|
|||||||
@@ -13,10 +13,11 @@ import {
|
|||||||
AdminGetStockLocationParamsType,
|
AdminGetStockLocationParamsType,
|
||||||
AdminUpdateStockLocationType,
|
AdminUpdateStockLocationType,
|
||||||
} from "../validators"
|
} from "../validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminUpdateStockLocationType>,
|
req: AuthenticatedMedusaRequest<AdminUpdateStockLocationType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationResponse>
|
||||||
) => {
|
) => {
|
||||||
const { id } = req.params
|
const { id } = req.params
|
||||||
await updateStockLocationsWorkflow(req.scope).run({
|
await updateStockLocationsWorkflow(req.scope).run({
|
||||||
@@ -39,7 +40,7 @@ export const POST = async (
|
|||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetStockLocationParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetStockLocationParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationResponse>
|
||||||
) => {
|
) => {
|
||||||
const { id } = req.params
|
const { id } = req.params
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ export const GET = async (
|
|||||||
|
|
||||||
export const DELETE = async (
|
export const DELETE = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationDeleteResponse>
|
||||||
) => {
|
) => {
|
||||||
const { id } = req.params
|
const { id } = req.params
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import {
|
|||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
|
|
||||||
import { linkSalesChannelsToStockLocationWorkflow } from "@medusajs/core-flows"
|
import { linkSalesChannelsToStockLocationWorkflow } from "@medusajs/core-flows"
|
||||||
import { LinkMethodRequest } from "@medusajs/types"
|
import { HttpTypes, LinkMethodRequest } from "@medusajs/types"
|
||||||
import { refetchStockLocation } from "../../helpers"
|
import { refetchStockLocation } from "../../helpers"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<LinkMethodRequest>,
|
req: AuthenticatedMedusaRequest<LinkMethodRequest>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationResponse>
|
||||||
) => {
|
) => {
|
||||||
const { id } = req.params
|
const { id } = req.params
|
||||||
const { add, remove } = req.validatedBody
|
const { add, remove } = req.validatedBody
|
||||||
|
|||||||
@@ -13,11 +13,12 @@ import {
|
|||||||
AdminCreateStockLocationType,
|
AdminCreateStockLocationType,
|
||||||
AdminGetStockLocationsParamsType,
|
AdminGetStockLocationsParamsType,
|
||||||
} from "./validators"
|
} from "./validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
// Create stock location
|
// Create stock location
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminCreateStockLocationType>,
|
req: AuthenticatedMedusaRequest<AdminCreateStockLocationType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationResponse>
|
||||||
) => {
|
) => {
|
||||||
const { result } = await createStockLocationsWorkflow(req.scope).run({
|
const { result } = await createStockLocationsWorkflow(req.scope).run({
|
||||||
input: { locations: [req.validatedBody] },
|
input: { locations: [req.validatedBody] },
|
||||||
@@ -34,7 +35,7 @@ export const POST = async (
|
|||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetStockLocationsParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetStockLocationsParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStockLocationListResponse>
|
||||||
) => {
|
) => {
|
||||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,11 @@ import {
|
|||||||
} from "../../../../types/routing"
|
} from "../../../../types/routing"
|
||||||
import { AdminGetStoreParamsType, AdminUpdateStoreType } from "../validators"
|
import { AdminGetStoreParamsType, AdminUpdateStoreType } from "../validators"
|
||||||
import { refetchStore } from "../helpers"
|
import { refetchStore } from "../helpers"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetStoreParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetStoreParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStoreResponse>
|
||||||
) => {
|
) => {
|
||||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||||
const variables = { id: req.params.id }
|
const variables = { id: req.params.id }
|
||||||
@@ -29,7 +30,7 @@ export const GET = async (
|
|||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminUpdateStoreType>,
|
req: AuthenticatedMedusaRequest<AdminUpdateStoreType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStoreResponse>
|
||||||
) => {
|
) => {
|
||||||
const { result } = await updateStoresWorkflow(req.scope).run({
|
const { result } = await updateStoresWorkflow(req.scope).run({
|
||||||
input: {
|
input: {
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ import {
|
|||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../types/routing"
|
} from "../../../types/routing"
|
||||||
import { AdminGetStoresParamsType } from "./validators"
|
import { AdminGetStoresParamsType } from "./validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetStoresParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetStoresParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminStoreListResponse>
|
||||||
) => {
|
) => {
|
||||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,11 @@ import {
|
|||||||
AdminGetTaxRateParamsType,
|
AdminGetTaxRateParamsType,
|
||||||
AdminUpdateTaxRateType,
|
AdminUpdateTaxRateType,
|
||||||
} from "../validators"
|
} from "../validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminUpdateTaxRateType>,
|
req: AuthenticatedMedusaRequest<AdminUpdateTaxRateType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminTaxRateResponse>
|
||||||
) => {
|
) => {
|
||||||
await updateTaxRatesWorkflow(req.scope).run({
|
await updateTaxRatesWorkflow(req.scope).run({
|
||||||
input: {
|
input: {
|
||||||
@@ -37,7 +38,7 @@ export const POST = async (
|
|||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetTaxRateParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetTaxRateParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminTaxRateResponse>
|
||||||
) => {
|
) => {
|
||||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||||
const variables = { id: req.params.id }
|
const variables = { id: req.params.id }
|
||||||
@@ -54,7 +55,7 @@ export const GET = async (
|
|||||||
|
|
||||||
export const DELETE = async (
|
export const DELETE = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminTaxRateDeleteResponse>
|
||||||
) => {
|
) => {
|
||||||
const id = req.params.id
|
const id = req.params.id
|
||||||
await deleteTaxRatesWorkflow(req.scope).run({
|
await deleteTaxRatesWorkflow(req.scope).run({
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ import {
|
|||||||
MedusaResponse,
|
MedusaResponse,
|
||||||
} from "../../../../../../types/routing"
|
} from "../../../../../../types/routing"
|
||||||
import { refetchTaxRate } from "../../../helpers"
|
import { refetchTaxRate } from "../../../helpers"
|
||||||
|
import { DeleteResponse } from "@medusajs/types"
|
||||||
|
|
||||||
export const DELETE = async (
|
export const DELETE = async (
|
||||||
req: AuthenticatedMedusaRequest,
|
req: AuthenticatedMedusaRequest,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<DeleteResponse<"tax_rate_rule">>
|
||||||
) => {
|
) => {
|
||||||
await deleteTaxRateRulesWorkflow(req.scope).run({
|
await deleteTaxRateRulesWorkflow(req.scope).run({
|
||||||
input: { ids: [req.params.rule_id] },
|
input: { ids: [req.params.rule_id] },
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ import {
|
|||||||
} from "../../../../../types/routing"
|
} from "../../../../../types/routing"
|
||||||
import { AdminCreateTaxRateRuleType } from "../../validators"
|
import { AdminCreateTaxRateRuleType } from "../../validators"
|
||||||
import { refetchTaxRate } from "../../helpers"
|
import { refetchTaxRate } from "../../helpers"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminCreateTaxRateRuleType>,
|
req: AuthenticatedMedusaRequest<AdminCreateTaxRateRuleType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminTaxRateResponse>
|
||||||
) => {
|
) => {
|
||||||
await createTaxRateRulesWorkflow(req.scope).run({
|
await createTaxRateRulesWorkflow(req.scope).run({
|
||||||
input: {
|
input: {
|
||||||
|
|||||||
@@ -12,10 +12,11 @@ import {
|
|||||||
AdminCreateTaxRateType,
|
AdminCreateTaxRateType,
|
||||||
AdminGetTaxRatesParamsType,
|
AdminGetTaxRatesParamsType,
|
||||||
} from "./validators"
|
} from "./validators"
|
||||||
|
import { HttpTypes } from "@medusajs/types"
|
||||||
|
|
||||||
export const POST = async (
|
export const POST = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminCreateTaxRateType>,
|
req: AuthenticatedMedusaRequest<AdminCreateTaxRateType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminTaxRateResponse>
|
||||||
) => {
|
) => {
|
||||||
const { result } = await createTaxRatesWorkflow(req.scope).run({
|
const { result } = await createTaxRatesWorkflow(req.scope).run({
|
||||||
input: [
|
input: [
|
||||||
@@ -36,7 +37,7 @@ export const POST = async (
|
|||||||
|
|
||||||
export const GET = async (
|
export const GET = async (
|
||||||
req: AuthenticatedMedusaRequest<AdminGetTaxRatesParamsType>,
|
req: AuthenticatedMedusaRequest<AdminGetTaxRatesParamsType>,
|
||||||
res: MedusaResponse
|
res: MedusaResponse<HttpTypes.AdminTaxRateListResponse>
|
||||||
) => {
|
) => {
|
||||||
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
const remoteQuery = req.scope.resolve(ContainerRegistrationKeys.REMOTE_QUERY)
|
||||||
const { rows: tax_rates, metadata } = await remoteQuery(
|
const { rows: tax_rates, metadata } = await remoteQuery(
|
||||||
|
|||||||
Reference in New Issue
Block a user