export type ResellerSalesPriceType = 1 | 2 | 3 | 4 | 5 | 6; export type ResellerSalesPriceObjectType = 1 | 2 | 3 | 4 | 5 | 6; export type DeleteApiApiV1ResellerSalesPricesArgs = {Type?: ResellerSalesPriceType | undefined, ObjectId?: number | undefined, ObjectType?: ResellerSalesPriceObjectType | undefined, FromDate?: (string | null) | undefined}; export type DeleteApiApiV1ResellerSalesPricesOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * DELETE /api/v1/ResellerSalesPrices */ export const deleteApiApiV1ResellerSalesPrices = async (args: DeleteApiApiV1ResellerSalesPricesArgs, options: DeleteApiApiV1ResellerSalesPricesOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Type != null) query.append("Type", String(args.Type)) if (args.ObjectId != null) query.append("ObjectId", String(args.ObjectId)) if (args.ObjectType != null) query.append("ObjectType", String(args.ObjectType)) if (args.FromDate != null) query.append("FromDate", String(args.FromDate)) if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/ResellerSalesPrices${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };