export type DeleteApiV1HeroesHeroUuidAppsAppUuidDisabledOptions = {baseUrl: string, apiToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Removes hero from disabled list of heroes per app * * DELETE /v1/heroes/{hero_uuid}/apps/{app_uuid}/disabled */ export const deleteApiV1HeroesHeroUuidAppsAppUuidDisabled = async (options: DeleteApiV1HeroesHeroUuidAppsAppUuidDisabledOptions) => { const {baseUrl, fetch: fetchFn = fetch, apiToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiToken !== undefined) headers.set("API-KEY", apiToken) const url = `${baseUrl.replace(/\/+$/, '')}/v1/heroes/${encodeURIComponent(String(args.hero_uuid))}/apps/${encodeURIComponent(String(args.app_uuid))}/disabled${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 };