( workflowIds: string[], options: ArchiveWorkflowOptions )
| 286 | } |
| 287 | |
| 288 | async function archiveWorkflows( |
| 289 | workflowIds: string[], |
| 290 | options: ArchiveWorkflowOptions |
| 291 | ): Promise<number> { |
| 292 | const uniqueWorkflowIds = Array.from(new Set(workflowIds)) |
| 293 | let archivedCount = 0 |
| 294 | |
| 295 | for (const workflowId of uniqueWorkflowIds) { |
| 296 | const result = await archiveWorkflow(workflowId, options) |
| 297 | if (result.archived) { |
| 298 | archivedCount += 1 |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | return archivedCount |
| 303 | } |
| 304 | |
| 305 | export async function archiveWorkflowsForWorkspace( |
| 306 | workspaceId: string, |
no test coverage detected