export type DeleteApiV3BoardsBoardIdCommentsCommentIdArgs = {'Accept-Language'?: string | undefined, board_id: string, comment_id: string}; export type DeleteApiV3BoardsBoardIdCommentsCommentIdOptions = {baseUrl: string, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a comment from a board * * DELETE /v3/boards/{board_id}/comments/{comment_id} * * Also accepts auth: OAuth2 */ export const deleteApiV3BoardsBoardIdCommentsCommentId = async (args: DeleteApiV3BoardsBoardIdCommentsCommentIdArgs, options: DeleteApiV3BoardsBoardIdCommentsCommentIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['Accept-Language'] != null) headers.set("Accept-Language", String(args['Accept-Language'])) if (ApiKey !== undefined) headers.set("Api-Key", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v3/boards/${encodeURIComponent(String(args.board_id))}/comments/${encodeURIComponent(String(args.comment_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 };