export type DeleteApiV3BoardsBoardIdArgs = {'Accept-Language'?: string | undefined, board_id: string}; export type DeleteApiV3BoardsBoardIdOptions = {baseUrl: string, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a board * * DELETE /v3/boards/{board_id} * * Also accepts auth: OAuth2 */ export const deleteApiV3BoardsBoardId = async (args: DeleteApiV3BoardsBoardIdArgs, options: DeleteApiV3BoardsBoardIdOptions) => { 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))}${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 };