export type DeleteApiApiV1AnalyticsReportIdPermalinkArgs = {id: string}; export type DeleteApiApiV1AnalyticsReportIdPermalinkOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Invalidate permalink for report * * DELETE /api/v1/analytics/report/{id}/permalink */ export const deleteApiApiV1AnalyticsReportIdPermalink = async (args: DeleteApiApiV1AnalyticsReportIdPermalinkArgs, options?: DeleteApiApiV1AnalyticsReportIdPermalinkOptions) => { const {baseUrl = "https://xentral.xentral.biz", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/analytics/report/${encodeURIComponent(String(args.id))}/permalink${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 };