export type DeleteApiV1AccountIdIncidentsIncidentIdCommentsCommentIdArgs = {accountId: string, incidentId: string, commentId: string}; export type DeleteApiV1AccountIdIncidentsIncidentIdCommentsCommentIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a specific comment. * * DELETE /v1/{accountId}/incidents/{incidentId}/comments/{commentId} */ export const deleteApiV1AccountIdIncidentsIncidentIdCommentsCommentId = async (args: DeleteApiV1AccountIdIncidentsIncidentIdCommentsCommentIdArgs, options?: DeleteApiV1AccountIdIncidentsIncidentIdCommentsCommentIdOptions) => { const {baseUrl = "https://api.usa.cloud.watchguard.com/rest/threatsync/management", fetch: fetchFn = fetch, ApiKeyAuth, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("WatchGuard-API-Key", ApiKeyAuth) if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/${encodeURIComponent(String(args.accountId))}/incidents/${encodeURIComponent(String(args.incidentId))}/comments/${encodeURIComponent(String(args.commentId))}${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 };