MCPcopy Create free account
hub / github.com/simstudioai/sim / fetchAuditLogs

Function fetchAuditLogs

apps/sim/ee/audit-logs/hooks/audit-logs.ts:20–38  ·  view source on GitHub ↗
(
  filters: AuditLogFilters,
  cursor?: string,
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

18}
19
20async function fetchAuditLogs(
21 filters: AuditLogFilters,
22 cursor?: string,
23 signal?: AbortSignal
24): Promise<AuditLogPage> {
25 return requestJson(listAuditLogsContract, {
26 query: {
27 limit: '50',
28 search: filters.search,
29 action: filters.action,
30 resourceType: filters.resourceType,
31 actorId: filters.actorId,
32 startDate: filters.startDate,
33 endDate: filters.endDate,
34 cursor,
35 },
36 signal,
37 })
38}
39
40export function useAuditLogs(filters: AuditLogFilters, enabled = true) {
41 return useInfiniteQuery({

Callers 1

useAuditLogsFunction · 0.85

Calls 1

requestJsonFunction · 0.90

Tested by

no test coverage detected