UNPKG

@renegade-fi/core

Version:
19 lines 696 B
import { getTaskHistory, } from '../actions/getTaskHistory.js'; import { filterQueryOptions } from './utils.js'; export function getTaskHistoryQueryOptions(config, options = {}) { return { async queryFn({ queryKey }) { const { scopeKey: _, ...parameters } = queryKey[1]; const history = await getTaskHistory(config, parameters); return history ?? null; }, queryKey: getTaskHistoryQueryKey({ scopeKey: config.state.id, ...options, }), }; } export function getTaskHistoryQueryKey(options = {}) { return ['task-history', filterQueryOptions(options)]; } //# sourceMappingURL=getTaskHistory.js.map