Directory

Directory — hierarchical organization for files within a workspace. Every workspace has a synthetic root directory created on workspace.created; user-created directories descend from it. Both a display `name` and a URL-safe `slug`. Sibling slugs are unique per parent.

Definition

TypeScript
interface Directory {
  id: string;
  workspaceId: string;
  parentId: string | null;
  name: string;
  slug: string;
  slugPath: string;
  isRoot: boolean;
  createdBy: string | null;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
workspaceIdstringrequired — Workspace that owns this directory.
parentIdstring | nullrequired — Parent directory; null for the workspace root directory.
namestringrequired — Display name shown in the UI.
slugstringrequired — URL-safe identifier, unique among siblings sharing the same parent.
slugPathstringrequired — Denormalized slug-based path from workspace root, e.g. '/photos/trips/'. Always ends with '/'.
isRootbooleanrequired — True for the synthetic workspace root directory.
createdBystring | nullrequired — User who created the directory; null for the workspace root.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.