feat(tax): v2 api tax rates and regions deletes (#6541)

This commit is contained in:
Sebastian Rindom
2024-02-29 12:06:11 +00:00
committed by GitHub
parent 6279fb3c67
commit c4760dfd5f
11 changed files with 229 additions and 2 deletions
+1
View File
@@ -78,6 +78,7 @@ export interface TaxRegionDTO {
created_at: string | Date
updated_at: string | Date
created_by: string | null
deleted_at: string | Date | null
}
export interface FilterableTaxRegionProps
+13 -1
View File
@@ -1,5 +1,5 @@
import { FindConfig } from "../common"
import { SoftDeleteReturn } from "../dal"
import { RestoreReturn, SoftDeleteReturn } from "../dal"
import { IModuleService } from "../modules-sdk"
import { Context } from "../shared-context"
import {
@@ -73,6 +73,12 @@ export interface ITaxModuleService extends IModuleService {
delete(taxRateIds: string[], sharedContext?: Context): Promise<void>
delete(taxRateId: string, sharedContext?: Context): Promise<void>
restore<TReturnableLinkableKeys extends string = string>(
taxRateIds: string[],
config?: RestoreReturn<TReturnableLinkableKeys>,
sharedContext?: Context
): Promise<Record<string, string[]> | void>
createTaxRegions(
data: CreateTaxRegionDTO,
sharedContext?: Context
@@ -136,6 +142,12 @@ export interface ITaxModuleService extends IModuleService {
sharedContext?: Context
): Promise<Record<string, string[]> | void>
restoreTaxRegions<TReturnableLinkableKeys extends string = string>(
taxRegionIds: string[],
config?: RestoreReturn<TReturnableLinkableKeys>,
sharedContext?: Context
): Promise<Record<string, string[]> | void>
softDeleteTaxRateRules<TReturnableLinkableKeys extends string = string>(
taxRateRulePairs: { tax_rate_id: string; reference_id: string }[],
config?: SoftDeleteReturn<TReturnableLinkableKeys>,