// API response types from backend
export type ApiMemo = {
  id: string; // MongoDB ObjectId
  uid?: string; // User-defined unique ID (preferred for URLs)
  content: string;
  visibility?: string | null;
  tags?: string[];
  creator_id?: string;
  create_time?: string;
  update_time?: string;
  display_time?: string;
  parent?: string | null; // ID of parent memo (if this is a comment)
  comment_count?: number; // Number of comments for this memo
};

export type ApiAttachment = {
  id: string;
  filename: string;
  url: string;
};

export type ApiShortcut = {
  id: string;
  name: string;
  filter: string;
};

export type ApiActivity = {
  id: string;
  type?: string | null;
  description?: string | null;
};

export type ApiIdentityProvider = {
  id: string;
  name: string;
  type?: string | null;
};

export type ApiInstanceInfo = {
  mode?: string | null;
  version?: string | null;
};

export type ApiUser = {
  id: string;
  email?: string | null;
  nickname?: string | null;
};

export type RequestOptions = {
  method?: string;
  body?: unknown;
  headers?: HeadersInit;
};

