export type EventIdList = {eventIdList?: Array | undefined}; export type DeleteApiV1SellerEventArgs = {body: EventIdList}; export type DeleteApiV1SellerEventOptions = {baseUrl?: string | undefined, SellerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Acknowledge Events * * DELETE /v1/seller/event */ export const deleteApiV1SellerEvent = async (args: DeleteApiV1SellerEventArgs, options?: DeleteApiV1SellerEventOptions) => { const {baseUrl = "https://scx-sbx.api.jtl-software.com", fetch: fetchFn = fetch, SellerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (SellerAuth !== undefined) headers.set('authorization', `Bearer ${SellerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/seller/event${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };