Skip to content

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

Class: TypedFileWorkflows

Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:65

DBOS Workflow for creating typed files with pre-create hooks

Extends

  • ConfiguredInstance

Constructors

Constructor

new TypedFileWorkflows(db, name?): TypedFileWorkflows

Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:68

Parameters

db

DB

name?

string = 'TypedFileWorkflows'

Returns

TypedFileWorkflows

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

createTypedFile()

createTypedFile(workspaceId, branchName, path, typeId, params, userId): Promise<CreateTypedFileResult>

Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:91

Create a typed file with pre-create hook

Steps:

  1. Check permissions and validate type
  2. Execute pre-create hook (if defined)
  3. Generate file content with resourceId
  4. Write to lakeFS
  5. Create commit
  6. Emit event

Parameters

workspaceId

string

branchName

string

path

string

typeId

string

params

Record<string, unknown>

userId

string

Returns

Promise<CreateTypedFileResult>


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


registerHook()

registerHook(hookId, executor): void

Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:75

Register a pre-create hook executor

Parameters

hookId

string

executor

PreCreateHookExecutor

Returns

void

Licensed under BUSL-1.1