export type DeleteApiApiV1ChangelogIdArgs = {id: string, Authorization: string}; export type DeleteApiApiV1ChangelogIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete Changelog * * DELETE /api/v1/changelog/{id} */ export const deleteApiApiV1ChangelogId = async (args: DeleteApiApiV1ChangelogIdArgs, options: DeleteApiApiV1ChangelogIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json") if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/changelog/${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 (await res.json()) as unknown };