export type DeleteApi202601MarketingSolutionsAdsIdArgs = {id: unknown}; export type DeleteApi202601MarketingSolutionsAdsIdOptions = {baseUrl?: string | undefined, oauth?: string | undefined, fetch?: typeof fetch | undefined}; /** * /2026-01/marketing-solutions/ads/{id} * * DELETE /2026-01/marketing-solutions/ads/{id} */ export const deleteApi202601MarketingSolutionsAdsId = async (args: DeleteApi202601MarketingSolutionsAdsIdArgs, options?: DeleteApi202601MarketingSolutionsAdsIdOptions) => { const {baseUrl = "https://api.criteo.com", fetch: fetchFn = fetch, oauth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (oauth !== undefined) headers.set('authorization', `Bearer ${oauth}`) const url = `${baseUrl.replace(/\/+$/, '')}/2026-01/marketing-solutions/ads/${encodeURIComponent(String(args.id))}${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 };