MCPcopy Index your code
hub / github.com/simstudioai/sim / fetchDashboardStats

Function fetchDashboardStats

apps/sim/hooks/queries/logs.ts:232–247  ·  view source on GitHub ↗
(
  workspaceId: string,
  filters: Omit<LogFilters, 'limit' | 'sortBy' | 'sortOrder'>,
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

230}
231
232async function fetchDashboardStats(
233 workspaceId: string,
234 filters: Omit<LogFilters, 'limit' | 'sortBy' | 'sortOrder'>,
235 signal?: AbortSignal
236): Promise<DashboardStatsResponse> {
237 const params = new URLSearchParams()
238 applyFilterParams(params, filters)
239
240 return requestJson(getDashboardStatsContract, {
241 query: {
242 workspaceId,
243 ...Object.fromEntries(params.entries()),
244 },
245 signal,
246 })
247}
248
249interface UseDashboardStatsOptions {
250 enabled?: boolean

Callers 1

useDashboardStatsFunction · 0.85

Calls 2

requestJsonFunction · 0.90
applyFilterParamsFunction · 0.85

Tested by

no test coverage detected