Skip to content

PersistentAI API Documentation / @persistentai/fireflow-vfs / server / WorkspaceWorkflows

Class: WorkspaceWorkflows

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:43

Workspace workflows class

Extends

  • ConfiguredInstance

Constructors

Constructor

new WorkspaceWorkflows(db, name?): WorkspaceWorkflows

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:44

Parameters

db

DB

name?

string = 'WorkspaceWorkflows'

Returns

WorkspaceWorkflows

Overrides

ConfiguredInstance.constructor

Properties

name

readonly name: string

Defined in: node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:126

Inherited from

ConfiguredInstance.name

Methods

addCollaborator()

addCollaborator(workspaceId, targetUserId, role, invitedByUserId): Promise<void>

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:287

Add collaborator to workspace

Parameters

workspaceId

string

targetUserId

string

role

"editor" | "viewer"

invitedByUserId

string

Returns

Promise<void>


createWorkspace()

createWorkspace(name, userId, options?): Promise<Workspace>

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:60

Create a new workspace

Steps:

  1. Generate IDs
  2. Create lakeFS repository
  3. Create FireFlow workspace record
  4. Add owner as collaborator
  5. Deploy webhook action configuration
  6. Emit event

Parameters

name

string

userId

string

options?
description?

string

settings?

Partial<WorkspaceSettings>

visibility?

WorkspaceVisibility

Returns

Promise<Workspace>


deleteWorkspace()

deleteWorkspace(workspaceId, userId): Promise<void>

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:174

Delete a workspace

Steps:

  1. Check ownership
  2. Delete lakeFS repository
  3. Delete FireFlow records (cascades to collaborators, shares)
  4. Emit event

Parameters

workspaceId

string

userId

string

Returns

Promise<void>


initialize()

initialize(): Promise<void>

Defined in: node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:131

Override this method to perform async initialization between construction and DBOS.launch().

Returns

Promise<void>

Inherited from

ConfiguredInstance.initialize


removeCollaborator()

removeCollaborator(workspaceId, targetUserId, removedByUserId): Promise<void>

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:343

Remove collaborator from workspace

Parameters

workspaceId

string

targetUserId

string

removedByUserId

string

Returns

Promise<void>


updateWorkspaceSettings()

updateWorkspaceSettings(workspaceId, userId, updates): Promise<Workspace>

Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:228

Update workspace settings

Parameters

workspaceId

string

userId

string

updates
description?

string

name?

string

visibility?

WorkspaceVisibility

Returns

Promise<Workspace>

Licensed under BUSL-1.1