( workspaceId: string, options: ArchiveWorkflowOptions )
| 303 | } |
| 304 | |
| 305 | export async function archiveWorkflowsForWorkspace( |
| 306 | workspaceId: string, |
| 307 | options: ArchiveWorkflowOptions |
| 308 | ): Promise<number> { |
| 309 | const workflows = await db |
| 310 | .select({ id: workflow.id }) |
| 311 | .from(workflow) |
| 312 | .where(and(eq(workflow.workspaceId, workspaceId), isNull(workflow.archivedAt))) |
| 313 | |
| 314 | return archiveWorkflows( |
| 315 | workflows.map((entry) => entry.id), |
| 316 | options |
| 317 | ) |
| 318 | } |
| 319 | |
| 320 | export async function archiveWorkflowsByIdsInWorkspace( |
| 321 | workspaceId: string, |
no test coverage detected