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

Function scopeCondition

apps/sim/lib/workflows/queries.ts:56–63  ·  view source on GitHub ↗
(
  scope: WorkflowListScope,
  base: ReturnType<typeof eq> | ReturnType<typeof inArray>
)

Source from the content-addressed store, hash-verified

54}
55
56function scopeCondition(
57 scope: WorkflowListScope,
58 base: ReturnType<typeof eq> | ReturnType<typeof inArray>
59) {
60 if (scope === 'all') return base
61 if (scope === 'archived') return and(base, sql`${workflow.archivedAt} IS NOT NULL`)
62 return and(base, isNull(workflow.archivedAt))
63}
64
65/**
66 * Lists workflows visible to a user as the contract wire shape, shared by the

Callers 1

listWorkflowsForUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected