import { ActionTypeEnum } from '../rbac/index.js';

export interface IResourceMetadata {
  id: string;
  name: string;
  updated: Date;
  created: Date;
  isDeployed: boolean;
  folderId?: string | null;

  // TODO(@taha-au) proj:rbac Eventually, we need to remove isEditable and canDelete,
  // and replace them with permissions.
  isEditable: boolean;
  canDelete?: boolean;
  permissions?: ActionTypeEnum[];

  // proj:code-mode This field represents whether the resource has associated cloud dev env(s)
  devEnvEnabled?: boolean;
  /** The name of the template used to create this application (e.g., 'shadcn-demo-app'). Null for legacy apps. */
  templateName?: string | null;
  lastDeployedAt?: Date | null;
  creatorEmail?: string;
  creatorName?: string;
  creatorId?: string;
}
