export type UpdateApiRestApiV1ProjectsProjectIdLogsIdAcknowledgeArgs = {projectId: string, id: number}; export type UpdateApiRestApiV1ProjectsProjectIdLogsIdAcknowledgeOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Acknowledge a log * * PUT /rest/api/v1/projects/{projectId}/logs/{id}/acknowledge */ export const updateApiRestApiV1ProjectsProjectIdLogsIdAcknowledge = async (args: UpdateApiRestApiV1ProjectsProjectIdLogsIdAcknowledgeArgs, options?: UpdateApiRestApiV1ProjectsProjectIdLogsIdAcknowledgeOptions) => { const {baseUrl = "https://api.metacopier.io", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-API-KEY", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/rest/api/v1/projects/${encodeURIComponent(String(args.projectId))}/logs/${encodeURIComponent(String(args.id))}/acknowledge${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };