Margin is an open annotation layer for the internet. Powered by the AT Protocol. margin.at
extension web atproto comments
at frontend-rewrite 76 lines 1.4 kB view raw
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 created?: string; 30 createdAt?: string; 31 creator?: Author; 32 author?: Author; 33} 34 35export interface Author { 36 did?: string; 37 handle?: string; 38 displayName?: string; 39 avatar?: string; 40} 41 42export interface Bookmark { 43 uri?: string; 44 id?: string; 45 source?: string; 46 url?: string; 47 title?: string; 48 description?: string; 49 image?: string; 50 createdAt?: string; 51} 52 53export interface Highlight { 54 uri?: string; 55 id?: string; 56 target?: { 57 source?: string; 58 selector?: TextSelector; 59 }; 60 color?: string; 61 title?: string; 62 createdAt?: string; 63} 64 65export interface Collection { 66 uri?: string; 67 id?: string; 68 name: string; 69 description?: string; 70 icon?: string; 71 createdAt?: string; 72 itemCount?: number; 73} 74 75export const DEFAULT_API_URL = 'https://margin.at'; 76export const APP_URL = 'https://margin.at';