( scope: WorkflowListScope, base: ReturnType<typeof eq> | ReturnType<typeof inArray> )
| 54 | } |
| 55 | |
| 56 | function 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 |
no outgoing calls
no test coverage detected