Skip to content

PersistentAI API Documentation / @persistentai/fireflow-vfs / / storageNamespaceV2

Function: storageNamespaceV2()

storageNamespaceV2(bucket, ownerType, ownerId, slug?): string

Defined in: packages/fireflow-vfs/src/utils/id-generate.ts:184

Generate a storage namespace using the new hierarchical pattern

Pattern by owner type:

  • users/{user_id}/{workspace_slug}/
  • flows/{flow_id}/{workspace_slug}/
  • teams/{team_slug}/{workspace_slug}/
  • system/{namespace}/{workspace_slug}/

Parameters

bucket

string

S3 bucket name

ownerType

string

Owner type (user, flow, team, system)

ownerId

string

Owner ID

slug?

string = 'default'

Workspace slug (default: 'default')

Returns

string

Licensed under BUSL-1.1