feat: Add tax regions table (#6983)

This commit is contained in:
Oli Juhl
2024-04-07 15:02:48 +02:00
committed by GitHub
parent 44bcde92c8
commit 31b07aea3d
69 changed files with 381 additions and 2923 deletions
@@ -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,
}