MCPcopy
hub / github.com/simstudioai/sim / createWorkflow

Function createWorkflow

packages/testing/src/factories/user.factory.ts:84–95  ·  view source on GitHub ↗
(options: WorkflowObjectFactoryOptions = {})

Source from the content-addressed store, hash-verified

82 * ```
83 */
84export function createWorkflow(options: WorkflowObjectFactoryOptions = {}): Workflow {
85 const now = new Date()
86 return {
87 id: options.id ?? `wf-${generateRandomString(8)}`,
88 name: options.name ?? 'Test Workflow',
89 workspaceId: options.workspaceId ?? `ws-${generateRandomString(8)}`,
90 state: options.state ?? createWorkflowState(),
91 createdAt: options.createdAt ?? now,
92 updatedAt: options.updatedAt ?? now,
93 isDeployed: options.isDeployed ?? false,
94 }
95}
96
97/**
98 * Creates a user with an associated workspace.

Callers 2

persistImportedWorkflowFunction · 0.85
sidebar.tsxFile · 0.85

Calls 2

generateRandomStringFunction · 0.90
createWorkflowStateFunction · 0.90

Tested by

no test coverage detected