export type DeleteApiV1ExceptionsExceptionIdCommentsCommentIdArgs = {'X-Request-Id'?: string | undefined, exceptionId: string, commentId: string}; export type DeleteApiV1ExceptionsExceptionIdCommentsCommentIdOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an exception comment * * DELETE /v1/exceptions/{exceptionId}/comments/{commentId} */ export const deleteApiV1ExceptionsExceptionIdCommentsCommentId = async (args: DeleteApiV1ExceptionsExceptionIdCommentsCommentIdArgs, options?: DeleteApiV1ExceptionsExceptionIdCommentsCommentIdOptions) => { const {baseUrl = "https://identity.sandbox.lerian.net", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Request-Id'] != null) headers.set("X-Request-Id", String(args['X-Request-Id'])) if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/exceptions/${encodeURIComponent(String(args.exceptionId))}/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 };