export type DeleteApiV3BoardsBoardIdAssetsAssetIdArgs = {'Accept-Language'?: string | undefined, board_id: string, asset_id: string}; export type DeleteApiV3BoardsBoardIdAssetsAssetIdOptions = {baseUrl: string, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove an asset from a board * * DELETE /v3/boards/{board_id}/assets/{asset_id} * * Also accepts auth: OAuth2 */ export const deleteApiV3BoardsBoardIdAssetsAssetId = async (args: DeleteApiV3BoardsBoardIdAssetsAssetIdArgs, options: DeleteApiV3BoardsBoardIdAssetsAssetIdOptions) => { 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))}/assets/${encodeURIComponent(String(args.asset_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 };