export type DeleteApiV1SystemDomainsSystemDomainIdLogoArgs = {'App-ID': string, 'Auth-Token': string, system_domain_id: string}; export type DeleteApiV1SystemDomainsSystemDomainIdLogoOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete system domain logo image. * * DELETE /v1/system_domains/{system_domain_id}/logo/ */ export const deleteApiV1SystemDomainsSystemDomainIdLogo = async (args: DeleteApiV1SystemDomainsSystemDomainIdLogoArgs, options: DeleteApiV1SystemDomainsSystemDomainIdLogoOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['App-ID'] != null) headers.set("App-ID", String(args['App-ID'])) if (args['Auth-Token'] != null) headers.set("Auth-Token", String(args['Auth-Token'])) const url = `${baseUrl.replace(/\/+$/, '')}/v1/system_domains/${encodeURIComponent(String(args.system_domain_id))}/logo/${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 };