export type DeleteApiCaseCaseIdNotifiedUserNotifiedUserIdArgs = {caseId: number, notifiedUserId: number}; export type DeleteApiCaseCaseIdNotifiedUserNotifiedUserIdOptions = {baseUrl?: string | undefined, sessionAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a single notified user based on the ID supplied * * DELETE /case/{caseId}/notifiedUser/{notifiedUserId} */ export const deleteApiCaseCaseIdNotifiedUserNotifiedUserId = async (args: DeleteApiCaseCaseIdNotifiedUserNotifiedUserIdArgs, options?: DeleteApiCaseCaseIdNotifiedUserNotifiedUserIdOptions) => { const {baseUrl = "https://small-eod.siecobywatelska.pl/v1", fetch: fetchFn = fetch, sessionAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (sessionAuth !== undefined) cookies.push("session=" + encodeURIComponent(sessionAuth)) const url = `${baseUrl.replace(/\/+$/, '')}/case/${encodeURIComponent(String(args.caseId))}/notifiedUser/${encodeURIComponent(String(args.notifiedUserId))}${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 };