feat: Add tax regions table (#6983)
This commit is contained in:
@@ -6,15 +6,16 @@ import { collections } from "./collections"
|
||||
import { currencies } from "./currencies"
|
||||
import { customers } from "./customers"
|
||||
import { invites } from "./invites"
|
||||
import { payments } from "./payments"
|
||||
import { productTypes } from "./product-types"
|
||||
import { products } from "./products"
|
||||
import { payments } from "./payments"
|
||||
import { promotions } from "./promotions"
|
||||
import { regions } from "./regions"
|
||||
import { salesChannels } from "./sales-channels"
|
||||
import { stockLocations } from "./stock-locations"
|
||||
import { stores } from "./stores"
|
||||
import { tags } from "./tags"
|
||||
import { taxes } from "./taxes"
|
||||
import { users } from "./users"
|
||||
import { workflowExecutions } from "./workflow-executions"
|
||||
|
||||
@@ -33,6 +34,7 @@ export const client = {
|
||||
tags: tags,
|
||||
users: users,
|
||||
regions: regions,
|
||||
taxes: taxes,
|
||||
invites: invites,
|
||||
products: products,
|
||||
productTypes: productTypes,
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import {
|
||||
AdminTaxRegionListResponse,
|
||||
AdminTaxRegionResponse,
|
||||
} from "@medusajs/types"
|
||||
import { getRequest } from "./common"
|
||||
|
||||
async function retrieveTaxRegion(id: string, query?: Record<string, any>) {
|
||||
return getRequest<AdminTaxRegionResponse>(`/admin/tax-regions/${id}`, query)
|
||||
}
|
||||
|
||||
async function listTaxRegions(query?: Record<string, any>) {
|
||||
return getRequest<AdminTaxRegionListResponse>(`/admin/tax-regions`, query)
|
||||
}
|
||||
|
||||
export const taxes = {
|
||||
retrieveTaxRegion,
|
||||
listTaxRegions,
|
||||
}
|
||||
Reference in New Issue
Block a user