mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-04 13:19:48 +03:00
48 lines
840 B
TypeScript
48 lines
840 B
TypeScript
import { Patp } from "..";
|
|
import BigIntOrderedMap from "../lib/BigIntOrderedMap";
|
|
|
|
export interface TextContent {
|
|
text: string;
|
|
}
|
|
export interface UrlContent {
|
|
url: string;
|
|
}
|
|
export interface CodeContent {
|
|
code: {
|
|
expresssion: string;
|
|
output: string | undefined;
|
|
}
|
|
}
|
|
|
|
export interface ReferenceContent {
|
|
uid: string;
|
|
}
|
|
export interface MentionContent {
|
|
mention: string;
|
|
}
|
|
export type Content =
|
|
| TextContent
|
|
| UrlContent
|
|
| CodeContent
|
|
| ReferenceContent
|
|
| MentionContent;
|
|
|
|
export interface Post {
|
|
author: Patp;
|
|
contents: Content[];
|
|
hash: string | null;
|
|
index: string;
|
|
pending?: boolean;
|
|
signatures: string[];
|
|
"time-sent": number;
|
|
}
|
|
|
|
export interface GraphNode {
|
|
children: Graph;
|
|
post: Post;
|
|
}
|
|
|
|
export type Graph = BigIntOrderedMap<GraphNode>;
|
|
|
|
export type Graphs = { [rid: string]: Graph };
|