Write on the margins of the internet. Powered by the AT Protocol.
margin.at
extension
web
atproto
comments
1export interface MarginSession {
2 authenticated: boolean;
3 did?: string;
4 handle?: string;
5 accessJwt?: string;
6 refreshJwt?: string;
7}
8
9export interface TextSelector {
10 type?: string;
11 exact: string;
12 prefix?: string;
13 suffix?: string;
14}
15
16export interface Annotation {
17 uri?: string;
18 id?: string;
19 cid?: string;
20 type?: 'Annotation' | 'Bookmark' | 'Highlight';
21 body?: { value: string };
22 text?: string;
23 target?: {
24 source?: string;
25 selector?: TextSelector;
26 };
27 selector?: TextSelector;
28 color?: string;
29 tags?: string[];
30 created?: string;
31 createdAt?: string;
32 creator?: Author;
33 author?: Author;
34}
35
36export interface Author {
37 did?: string;
38 handle?: string;
39 displayName?: string;
40 avatar?: string;
41}
42
43export interface Bookmark {
44 uri?: string;
45 id?: string;
46 source?: string;
47 url?: string;
48 title?: string;
49 description?: string;
50 image?: string;
51 tags?: string[];
52 createdAt?: string;
53}
54
55export interface Highlight {
56 uri?: string;
57 id?: string;
58 target?: {
59 source?: string;
60 selector?: TextSelector;
61 };
62 color?: string;
63 tags?: string[];
64 title?: string;
65 createdAt?: string;
66}
67
68export interface Collection {
69 uri?: string;
70 id?: string;
71 name: string;
72 description?: string;
73 icon?: string;
74 createdAt?: string;
75 itemCount?: number;
76}
77
78export const DEFAULT_API_URL = 'https://margin.at';
79export const APP_URL = 'https://margin.at';