import { ApiClient, type ApiClientOptions } from "../infra/client" import type { ApiPath, ApiRequestBody } from "../infra/types" export const CONFIGURATION_ROUTES = { SALES_TAX_DISCOUNT: "/api/configurations/sales_tax_discount", PURCHASE_TAX_DISCOUNT: "/api/configurations/purchase_tax_discount", GENERAL_PREFERENCES: "/api/configurations/general_preferences", } as const satisfies Record export class ConfigurationsClient extends ApiClient { constructor(baseUrl?: string, defaultOptions?: ApiClientOptions) { super(baseUrl, defaultOptions) } async updateSalesTaxDiscount(payload: ApiRequestBody) { return this.put(CONFIGURATION_ROUTES.SALES_TAX_DISCOUNT, payload) } async updatePurchaseTaxDiscount(payload: ApiRequestBody) { return this.put(CONFIGURATION_ROUTES.PURCHASE_TAX_DISCOUNT, payload) } async updateGeneralPreferences(payload: ApiRequestBody) { return this.put(CONFIGURATION_ROUTES.GENERAL_PREFERENCES, payload) } }