export type DeleteApiApiCdpSettingsV1AppAppIdActivationIdOptions = {baseUrl?: string | undefined, JWTAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete activation * * DELETE /api/cdp/settings/v1/app/{app_id}/activation/{id} */ export const deleteApiApiCdpSettingsV1AppAppIdActivationId = async (options?: DeleteApiApiCdpSettingsV1AppAppIdActivationIdOptions) => { const {baseUrl = "https://example.piwik.pro", fetch: fetchFn = fetch, JWTAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (JWTAuth !== undefined) headers.set('authorization', `Bearer ${JWTAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/cdp/settings/v1/app/${encodeURIComponent(String(args.app_id))}/activation/${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 };