LogoBetaFlow

Types

Types used to build your app with betaflow

User

interface TUser {
  // Identity
  name: string;
  username: string;
  displayName?: string | null;
  image?: string | null;

  // Public Profile
  publicInfo?: {
    bio: string;

    socialMediaAccounts: {
      platform: string;
      url: string;
    }[];

    // UI Preferences
    blogView: {
      showTitle: boolean;
      showDescription: boolean;
      showCoverImage: boolean;
      showDate: boolean;
      showGroup: boolean;
      showAuthor: boolean;
    };

    fileView: {
      showTitle: boolean;
      showDate: boolean;
      showGroup: boolean;
      showAuthor: boolean;
      showPreview: boolean;
      showFileType: boolean;
      showFileSize: boolean;
    };
  } | null;

  // Timestamps
  updatedAt: number;
}

Blog

interface TBlog {
  // Identity
  title: string;
  slug: string;

  // Content
  content: string;
  description?: string;
  emoji?: string;
  coverImage?: string;

  // Grouping
  group: {
    title?: string;
    slug?: string;
  };

  // Metadata
  status: "draft" | "published" | "archived" | "deleted";
  isPinned: boolean;

  // Analytics
  counter: {
    words: number;
    characters: number;
  };

  // Timestamps
  createdAt: number;
  updatedAt: number;
}

File

interface TFile {
  // Identity
  title: string;
  slug: string;

  // File Data
  url: string;
  contentType?: string;
  size?: number;

  // Grouping
  group: {
    title?: string;
    slug?: string;
  };

  // Metadata
  status: "draft" | "published" | "archived" | "deleted";
  isPinned: boolean;

  // Timestamps
  createdAt: number;
  updatedAt: number;
}

On this page