export type CreateApiPublicV2EudrCustomersCustomerDdsDdsIdWithdrawArgs = {ddsId: number}; export type CreateApiPublicV2EudrCustomersCustomerDdsDdsIdWithdrawOptions = {baseUrl?: string | undefined, TokenAuthentication?: string | undefined, fetch?: typeof fetch | undefined}; /** * Withdraw a submitted customer DDS * * POST /public/v2/eudr/customers/customer-dds/{ddsId}/withdraw */ export const createApiPublicV2EudrCustomersCustomerDdsDdsIdWithdraw = async (args: CreateApiPublicV2EudrCustomersCustomerDdsDdsIdWithdrawArgs, options?: CreateApiPublicV2EudrCustomersCustomerDdsDdsIdWithdrawOptions) => { 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))}/withdraw${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };