export type DeleteApiPublicV2EudrCustomersCustomerDdsDdsIdArgs = {ddsId: number}; export type DeleteApiPublicV2EudrCustomersCustomerDdsDdsIdOptions = {baseUrl?: string | undefined, TokenAuthentication?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a customer DDS before successful submission * * DELETE /public/v2/eudr/customers/customer-dds/{ddsId} */ export const deleteApiPublicV2EudrCustomersCustomerDdsDdsId = async (args: DeleteApiPublicV2EudrCustomersCustomerDdsDdsIdArgs, options?: DeleteApiPublicV2EudrCustomersCustomerDdsDdsIdOptions) => { const {baseUrl = "https://api.prewave.com", fetch: fetchFn = fetch, TokenAuthentication} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (TokenAuthentication !== undefined) headers.set("X-Auth-Token", TokenAuthentication) const url = `${baseUrl.replace(/\/+$/, '')}/public/v2/eudr/customers/customer-dds/${encodeURIComponent(String(args.ddsId))}${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 };