Various AT Protocol integrations with obsidian
20
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix remove generated lex code

-1063
-13
src/lexicons/index.ts
··· 1 - export * as AtMarginAnnotation from "./types/at/margin/annotation.js"; 2 - export * as AtMarginBookmark from "./types/at/margin/bookmark.js"; 3 - export * as AtMarginCollection from "./types/at/margin/collection.js"; 4 - export * as AtMarginCollectionItem from "./types/at/margin/collectionItem.js"; 5 - export * as AtMarginHighlight from "./types/at/margin/highlight.js"; 6 - export * as AtMarginLike from "./types/at/margin/like.js"; 7 - export * as AtMarginProfile from "./types/at/margin/profile.js"; 8 - export * as AtMarginReply from "./types/at/margin/reply.js"; 9 - export * as ComAtprotoRepoStrongRef from "./types/com/atproto/repo/strongRef.js"; 10 - export * as NetworkCosmikCard from "./types/network/cosmik/card.js"; 11 - export * as NetworkCosmikCollection from "./types/network/cosmik/collection.js"; 12 - export * as NetworkCosmikCollectionLink from "./types/network/cosmik/collectionLink.js"; 13 - export * as NetworkCosmikDefs from "./types/network/cosmik/defs.js";
-330
src/lexicons/types/at/margin/annotation.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _bodySchema = /*#__PURE__*/ v.object({ 6 - $type: /*#__PURE__*/ v.optional( 7 - /*#__PURE__*/ v.literal("at.margin.annotation#body"), 8 - ), 9 - /** 10 - * MIME type of the body content 11 - * @default "text/plain" 12 - */ 13 - format: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), "text/plain"), 14 - /** 15 - * BCP47 language tag 16 - */ 17 - language: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 18 - /** 19 - * Reference to external body content 20 - */ 21 - uri: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 22 - /** 23 - * Text content of the annotation 24 - * @maxLength 10000 25 - * @maxGraphemes 3000 26 - */ 27 - value: /*#__PURE__*/ v.optional( 28 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 29 - /*#__PURE__*/ v.stringLength(0, 10000), 30 - /*#__PURE__*/ v.stringGraphemes(0, 3000), 31 - ]), 32 - ), 33 - }); 34 - const _cssSelectorSchema = /*#__PURE__*/ v.object({ 35 - $type: /*#__PURE__*/ v.optional( 36 - /*#__PURE__*/ v.literal("at.margin.annotation#cssSelector"), 37 - ), 38 - type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("CssSelector")), 39 - /** 40 - * CSS selector string 41 - * @maxLength 2000 42 - */ 43 - value: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 44 - /*#__PURE__*/ v.stringLength(0, 2000), 45 - ]), 46 - }); 47 - const _fragmentSelectorSchema = /*#__PURE__*/ v.object({ 48 - $type: /*#__PURE__*/ v.optional( 49 - /*#__PURE__*/ v.literal("at.margin.annotation#fragmentSelector"), 50 - ), 51 - /** 52 - * Specification the fragment conforms to 53 - */ 54 - conformsTo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 55 - type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("FragmentSelector")), 56 - /** 57 - * Fragment identifier value 58 - * @maxLength 1000 59 - */ 60 - value: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 61 - /*#__PURE__*/ v.stringLength(0, 1000), 62 - ]), 63 - }); 64 - const _mainSchema = /*#__PURE__*/ v.record( 65 - /*#__PURE__*/ v.tidString(), 66 - /*#__PURE__*/ v.object({ 67 - $type: /*#__PURE__*/ v.literal("at.margin.annotation"), 68 - /** 69 - * The annotation content (text or reference) 70 - */ 71 - get body() { 72 - return /*#__PURE__*/ v.optional(bodySchema); 73 - }, 74 - createdAt: /*#__PURE__*/ v.datetimeString(), 75 - /** 76 - * W3C motivation for the annotation 77 - */ 78 - motivation: /*#__PURE__*/ v.optional( 79 - /*#__PURE__*/ v.string< 80 - | "assessing" 81 - | "bookmarking" 82 - | "commenting" 83 - | "describing" 84 - | "editing" 85 - | "highlighting" 86 - | "linking" 87 - | "questioning" 88 - | "replying" 89 - | "tagging" 90 - | (string & {}) 91 - >(), 92 - ), 93 - /** 94 - * Tags for categorization 95 - * @maxLength 10 96 - */ 97 - tags: /*#__PURE__*/ v.optional( 98 - /*#__PURE__*/ v.constrain( 99 - /*#__PURE__*/ v.array( 100 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 101 - /*#__PURE__*/ v.stringLength(0, 64), 102 - /*#__PURE__*/ v.stringGraphemes(0, 32), 103 - ]), 104 - ), 105 - [/*#__PURE__*/ v.arrayLength(0, 10)], 106 - ), 107 - ), 108 - /** 109 - * The resource being annotated with optional selector 110 - */ 111 - get target() { 112 - return targetSchema; 113 - }, 114 - }), 115 - ); 116 - const _rangeSelectorSchema = /*#__PURE__*/ v.object({ 117 - $type: /*#__PURE__*/ v.optional( 118 - /*#__PURE__*/ v.literal("at.margin.annotation#rangeSelector"), 119 - ), 120 - /** 121 - * Selector for range end 122 - */ 123 - get endSelector() { 124 - return /*#__PURE__*/ v.variant([ 125 - cssSelectorSchema, 126 - textPositionSelectorSchema, 127 - textQuoteSelectorSchema, 128 - xpathSelectorSchema, 129 - ]); 130 - }, 131 - /** 132 - * Selector for range start 133 - */ 134 - get startSelector() { 135 - return /*#__PURE__*/ v.variant([ 136 - cssSelectorSchema, 137 - textPositionSelectorSchema, 138 - textQuoteSelectorSchema, 139 - xpathSelectorSchema, 140 - ]); 141 - }, 142 - type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("RangeSelector")), 143 - }); 144 - const _targetSchema = /*#__PURE__*/ v.object({ 145 - $type: /*#__PURE__*/ v.optional( 146 - /*#__PURE__*/ v.literal("at.margin.annotation#target"), 147 - ), 148 - /** 149 - * Selector to identify the specific segment 150 - */ 151 - get selector() { 152 - return /*#__PURE__*/ v.optional( 153 - /*#__PURE__*/ v.variant([ 154 - cssSelectorSchema, 155 - fragmentSelectorSchema, 156 - rangeSelectorSchema, 157 - textPositionSelectorSchema, 158 - textQuoteSelectorSchema, 159 - xpathSelectorSchema, 160 - ]), 161 - ); 162 - }, 163 - /** 164 - * The URL being annotated 165 - */ 166 - source: /*#__PURE__*/ v.genericUriString(), 167 - /** 168 - * SHA256 hash of normalized URL for indexing 169 - */ 170 - sourceHash: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 171 - /** 172 - * State of the resource at annotation time 173 - */ 174 - get state() { 175 - return /*#__PURE__*/ v.optional(timeStateSchema); 176 - }, 177 - /** 178 - * Page title at time of annotation 179 - * @maxLength 500 180 - */ 181 - title: /*#__PURE__*/ v.optional( 182 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 183 - /*#__PURE__*/ v.stringLength(0, 500), 184 - ]), 185 - ), 186 - }); 187 - const _textPositionSelectorSchema = /*#__PURE__*/ v.object({ 188 - $type: /*#__PURE__*/ v.optional( 189 - /*#__PURE__*/ v.literal("at.margin.annotation#textPositionSelector"), 190 - ), 191 - /** 192 - * Ending character position (exclusive) 193 - * @minimum 0 194 - */ 195 - end: /*#__PURE__*/ v.integer(), 196 - /** 197 - * Starting character position (0-indexed, inclusive) 198 - * @minimum 0 199 - */ 200 - start: /*#__PURE__*/ v.integer(), 201 - type: /*#__PURE__*/ v.optional( 202 - /*#__PURE__*/ v.literal("TextPositionSelector"), 203 - ), 204 - }); 205 - const _textQuoteSelectorSchema = /*#__PURE__*/ v.object({ 206 - $type: /*#__PURE__*/ v.optional( 207 - /*#__PURE__*/ v.literal("at.margin.annotation#textQuoteSelector"), 208 - ), 209 - /** 210 - * The exact text to match 211 - * @maxLength 5000 212 - * @maxGraphemes 1500 213 - */ 214 - exact: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 215 - /*#__PURE__*/ v.stringLength(0, 5000), 216 - /*#__PURE__*/ v.stringGraphemes(0, 1500), 217 - ]), 218 - /** 219 - * Text immediately before the selection 220 - * @maxLength 500 221 - * @maxGraphemes 150 222 - */ 223 - prefix: /*#__PURE__*/ v.optional( 224 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 225 - /*#__PURE__*/ v.stringLength(0, 500), 226 - /*#__PURE__*/ v.stringGraphemes(0, 150), 227 - ]), 228 - ), 229 - /** 230 - * Text immediately after the selection 231 - * @maxLength 500 232 - * @maxGraphemes 150 233 - */ 234 - suffix: /*#__PURE__*/ v.optional( 235 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 236 - /*#__PURE__*/ v.stringLength(0, 500), 237 - /*#__PURE__*/ v.stringGraphemes(0, 150), 238 - ]), 239 - ), 240 - type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("TextQuoteSelector")), 241 - }); 242 - const _timeStateSchema = /*#__PURE__*/ v.object({ 243 - $type: /*#__PURE__*/ v.optional( 244 - /*#__PURE__*/ v.literal("at.margin.annotation#timeState"), 245 - ), 246 - /** 247 - * URL to cached/archived version 248 - */ 249 - cached: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 250 - /** 251 - * When the source was accessed 252 - */ 253 - sourceDate: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 254 - }); 255 - const _xpathSelectorSchema = /*#__PURE__*/ v.object({ 256 - $type: /*#__PURE__*/ v.optional( 257 - /*#__PURE__*/ v.literal("at.margin.annotation#xpathSelector"), 258 - ), 259 - type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("XPathSelector")), 260 - /** 261 - * XPath expression 262 - * @maxLength 2000 263 - */ 264 - value: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 265 - /*#__PURE__*/ v.stringLength(0, 2000), 266 - ]), 267 - }); 268 - 269 - type body$schematype = typeof _bodySchema; 270 - type cssSelector$schematype = typeof _cssSelectorSchema; 271 - type fragmentSelector$schematype = typeof _fragmentSelectorSchema; 272 - type main$schematype = typeof _mainSchema; 273 - type rangeSelector$schematype = typeof _rangeSelectorSchema; 274 - type target$schematype = typeof _targetSchema; 275 - type textPositionSelector$schematype = typeof _textPositionSelectorSchema; 276 - type textQuoteSelector$schematype = typeof _textQuoteSelectorSchema; 277 - type timeState$schematype = typeof _timeStateSchema; 278 - type xpathSelector$schematype = typeof _xpathSelectorSchema; 279 - 280 - export interface bodySchema extends body$schematype {} 281 - export interface cssSelectorSchema extends cssSelector$schematype {} 282 - export interface fragmentSelectorSchema extends fragmentSelector$schematype {} 283 - export interface mainSchema extends main$schematype {} 284 - export interface rangeSelectorSchema extends rangeSelector$schematype {} 285 - export interface targetSchema extends target$schematype {} 286 - export interface textPositionSelectorSchema extends textPositionSelector$schematype {} 287 - export interface textQuoteSelectorSchema extends textQuoteSelector$schematype {} 288 - export interface timeStateSchema extends timeState$schematype {} 289 - export interface xpathSelectorSchema extends xpathSelector$schematype {} 290 - 291 - export const bodySchema = _bodySchema as bodySchema; 292 - export const cssSelectorSchema = _cssSelectorSchema as cssSelectorSchema; 293 - export const fragmentSelectorSchema = 294 - _fragmentSelectorSchema as fragmentSelectorSchema; 295 - export const mainSchema = _mainSchema as mainSchema; 296 - export const rangeSelectorSchema = _rangeSelectorSchema as rangeSelectorSchema; 297 - export const targetSchema = _targetSchema as targetSchema; 298 - export const textPositionSelectorSchema = 299 - _textPositionSelectorSchema as textPositionSelectorSchema; 300 - export const textQuoteSelectorSchema = 301 - _textQuoteSelectorSchema as textQuoteSelectorSchema; 302 - export const timeStateSchema = _timeStateSchema as timeStateSchema; 303 - export const xpathSelectorSchema = _xpathSelectorSchema as xpathSelectorSchema; 304 - 305 - export interface Body extends v.InferInput<typeof bodySchema> {} 306 - export interface CssSelector extends v.InferInput<typeof cssSelectorSchema> {} 307 - export interface FragmentSelector extends v.InferInput< 308 - typeof fragmentSelectorSchema 309 - > {} 310 - export interface Main extends v.InferInput<typeof mainSchema> {} 311 - export interface RangeSelector extends v.InferInput< 312 - typeof rangeSelectorSchema 313 - > {} 314 - export interface Target extends v.InferInput<typeof targetSchema> {} 315 - export interface TextPositionSelector extends v.InferInput< 316 - typeof textPositionSelectorSchema 317 - > {} 318 - export interface TextQuoteSelector extends v.InferInput< 319 - typeof textQuoteSelectorSchema 320 - > {} 321 - export interface TimeState extends v.InferInput<typeof timeStateSchema> {} 322 - export interface XpathSelector extends v.InferInput< 323 - typeof xpathSelectorSchema 324 - > {} 325 - 326 - declare module "@atcute/lexicons/ambient" { 327 - interface Records { 328 - "at.margin.annotation": mainSchema; 329 - } 330 - }
-68
src/lexicons/types/at/margin/bookmark.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.tidString(), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("at.margin.bookmark"), 9 - createdAt: /*#__PURE__*/ v.datetimeString(), 10 - /** 11 - * Optional description/note 12 - * @maxLength 1000 13 - * @maxGraphemes 300 14 - */ 15 - description: /*#__PURE__*/ v.optional( 16 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 17 - /*#__PURE__*/ v.stringLength(0, 1000), 18 - /*#__PURE__*/ v.stringGraphemes(0, 300), 19 - ]), 20 - ), 21 - /** 22 - * The bookmarked URL 23 - */ 24 - source: /*#__PURE__*/ v.genericUriString(), 25 - /** 26 - * SHA256 hash of normalized URL for indexing 27 - */ 28 - sourceHash: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 29 - /** 30 - * Tags for categorization 31 - * @maxLength 10 32 - */ 33 - tags: /*#__PURE__*/ v.optional( 34 - /*#__PURE__*/ v.constrain( 35 - /*#__PURE__*/ v.array( 36 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 37 - /*#__PURE__*/ v.stringLength(0, 64), 38 - /*#__PURE__*/ v.stringGraphemes(0, 32), 39 - ]), 40 - ), 41 - [/*#__PURE__*/ v.arrayLength(0, 10)], 42 - ), 43 - ), 44 - /** 45 - * Page title 46 - * @maxLength 500 47 - */ 48 - title: /*#__PURE__*/ v.optional( 49 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 50 - /*#__PURE__*/ v.stringLength(0, 500), 51 - ]), 52 - ), 53 - }), 54 - ); 55 - 56 - type main$schematype = typeof _mainSchema; 57 - 58 - export interface mainSchema extends main$schematype {} 59 - 60 - export const mainSchema = _mainSchema as mainSchema; 61 - 62 - export interface Main extends v.InferInput<typeof mainSchema> {} 63 - 64 - declare module "@atcute/lexicons/ambient" { 65 - interface Records { 66 - "at.margin.bookmark": mainSchema; 67 - } 68 - }
-56
src/lexicons/types/at/margin/collection.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.tidString(), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("at.margin.collection"), 9 - createdAt: /*#__PURE__*/ v.datetimeString(), 10 - /** 11 - * Collection description 12 - * @maxLength 500 13 - * @maxGraphemes 150 14 - */ 15 - description: /*#__PURE__*/ v.optional( 16 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 17 - /*#__PURE__*/ v.stringLength(0, 500), 18 - /*#__PURE__*/ v.stringGraphemes(0, 150), 19 - ]), 20 - ), 21 - /** 22 - * Emoji icon or icon identifier for the collection 23 - * @maxLength 100 24 - * @maxGraphemes 100 25 - */ 26 - icon: /*#__PURE__*/ v.optional( 27 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 28 - /*#__PURE__*/ v.stringLength(0, 100), 29 - /*#__PURE__*/ v.stringGraphemes(0, 100), 30 - ]), 31 - ), 32 - /** 33 - * Collection name 34 - * @maxLength 100 35 - * @maxGraphemes 50 36 - */ 37 - name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 38 - /*#__PURE__*/ v.stringLength(0, 100), 39 - /*#__PURE__*/ v.stringGraphemes(0, 50), 40 - ]), 41 - }), 42 - ); 43 - 44 - type main$schematype = typeof _mainSchema; 45 - 46 - export interface mainSchema extends main$schematype {} 47 - 48 - export const mainSchema = _mainSchema as mainSchema; 49 - 50 - export interface Main extends v.InferInput<typeof mainSchema> {} 51 - 52 - declare module "@atcute/lexicons/ambient" { 53 - interface Records { 54 - "at.margin.collection": mainSchema; 55 - } 56 - }
-38
src/lexicons/types/at/margin/collectionItem.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.tidString(), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("at.margin.collectionItem"), 9 - /** 10 - * AT URI of the annotation, highlight, or bookmark 11 - */ 12 - annotation: /*#__PURE__*/ v.resourceUriString(), 13 - /** 14 - * AT URI of the collection 15 - */ 16 - collection: /*#__PURE__*/ v.resourceUriString(), 17 - createdAt: /*#__PURE__*/ v.datetimeString(), 18 - /** 19 - * Sort order within the collection 20 - * @minimum 0 21 - */ 22 - position: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 23 - }), 24 - ); 25 - 26 - type main$schematype = typeof _mainSchema; 27 - 28 - export interface mainSchema extends main$schematype {} 29 - 30 - export const mainSchema = _mainSchema as mainSchema; 31 - 32 - export interface Main extends v.InferInput<typeof mainSchema> {} 33 - 34 - declare module "@atcute/lexicons/ambient" { 35 - interface Records { 36 - "at.margin.collectionItem": mainSchema; 37 - } 38 - }
-56
src/lexicons/types/at/margin/highlight.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - import * as AtMarginAnnotation from "./annotation.js"; 5 - 6 - const _mainSchema = /*#__PURE__*/ v.record( 7 - /*#__PURE__*/ v.tidString(), 8 - /*#__PURE__*/ v.object({ 9 - $type: /*#__PURE__*/ v.literal("at.margin.highlight"), 10 - /** 11 - * Highlight color (hex or named) 12 - * @maxLength 20 13 - */ 14 - color: /*#__PURE__*/ v.optional( 15 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 16 - /*#__PURE__*/ v.stringLength(0, 20), 17 - ]), 18 - ), 19 - createdAt: /*#__PURE__*/ v.datetimeString(), 20 - /** 21 - * Tags for categorization 22 - * @maxLength 10 23 - */ 24 - tags: /*#__PURE__*/ v.optional( 25 - /*#__PURE__*/ v.constrain( 26 - /*#__PURE__*/ v.array( 27 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 28 - /*#__PURE__*/ v.stringLength(0, 64), 29 - /*#__PURE__*/ v.stringGraphemes(0, 32), 30 - ]), 31 - ), 32 - [/*#__PURE__*/ v.arrayLength(0, 10)], 33 - ), 34 - ), 35 - /** 36 - * The resource and segment being highlighted 37 - */ 38 - get target() { 39 - return AtMarginAnnotation.targetSchema; 40 - }, 41 - }), 42 - ); 43 - 44 - type main$schematype = typeof _mainSchema; 45 - 46 - export interface mainSchema extends main$schematype {} 47 - 48 - export const mainSchema = _mainSchema as mainSchema; 49 - 50 - export interface Main extends v.InferInput<typeof mainSchema> {} 51 - 52 - declare module "@atcute/lexicons/ambient" { 53 - interface Records { 54 - "at.margin.highlight": mainSchema; 55 - } 56 - }
-42
src/lexicons/types/at/margin/like.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.tidString(), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("at.margin.like"), 9 - createdAt: /*#__PURE__*/ v.datetimeString(), 10 - /** 11 - * Reference to the annotation or reply being liked 12 - */ 13 - get subject() { 14 - return subjectRefSchema; 15 - }, 16 - }), 17 - ); 18 - const _subjectRefSchema = /*#__PURE__*/ v.object({ 19 - $type: /*#__PURE__*/ v.optional( 20 - /*#__PURE__*/ v.literal("at.margin.like#subjectRef"), 21 - ), 22 - cid: /*#__PURE__*/ v.cidString(), 23 - uri: /*#__PURE__*/ v.resourceUriString(), 24 - }); 25 - 26 - type main$schematype = typeof _mainSchema; 27 - type subjectRef$schematype = typeof _subjectRefSchema; 28 - 29 - export interface mainSchema extends main$schematype {} 30 - export interface subjectRefSchema extends subjectRef$schematype {} 31 - 32 - export const mainSchema = _mainSchema as mainSchema; 33 - export const subjectRefSchema = _subjectRefSchema as subjectRefSchema; 34 - 35 - export interface Main extends v.InferInput<typeof mainSchema> {} 36 - export interface SubjectRef extends v.InferInput<typeof subjectRefSchema> {} 37 - 38 - declare module "@atcute/lexicons/ambient" { 39 - interface Records { 40 - "at.margin.like": mainSchema; 41 - } 42 - }
-72
src/lexicons/types/at/margin/profile.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.literal("self"), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("at.margin.profile"), 9 - /** 10 - * User avatar image. 11 - * @accept image/png, image/jpeg 12 - * @maxSize 1000000 13 - */ 14 - avatar: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 15 - /** 16 - * User biography or description. 17 - * @maxLength 5000 18 - */ 19 - bio: /*#__PURE__*/ v.optional( 20 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 21 - /*#__PURE__*/ v.stringLength(0, 5000), 22 - ]), 23 - ), 24 - createdAt: /*#__PURE__*/ v.datetimeString(), 25 - /** 26 - * Display name for the user. 27 - * @maxLength 640 28 - */ 29 - displayName: /*#__PURE__*/ v.optional( 30 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 31 - /*#__PURE__*/ v.stringLength(0, 640), 32 - ]), 33 - ), 34 - /** 35 - * List of other relevant links (e.g. GitHub, Bluesky, etc). 36 - * @maxLength 20 37 - */ 38 - links: /*#__PURE__*/ v.optional( 39 - /*#__PURE__*/ v.constrain( 40 - /*#__PURE__*/ v.array( 41 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 42 - /*#__PURE__*/ v.stringLength(0, 1000), 43 - ]), 44 - ), 45 - [/*#__PURE__*/ v.arrayLength(0, 20)], 46 - ), 47 - ), 48 - /** 49 - * User website URL. 50 - * @maxLength 1000 51 - */ 52 - website: /*#__PURE__*/ v.optional( 53 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 54 - /*#__PURE__*/ v.stringLength(0, 1000), 55 - ]), 56 - ), 57 - }), 58 - ); 59 - 60 - type main$schematype = typeof _mainSchema; 61 - 62 - export interface mainSchema extends main$schematype {} 63 - 64 - export const mainSchema = _mainSchema as mainSchema; 65 - 66 - export interface Main extends v.InferInput<typeof mainSchema> {} 67 - 68 - declare module "@atcute/lexicons/ambient" { 69 - interface Records { 70 - "at.margin.profile": mainSchema; 71 - } 72 - }
-62
src/lexicons/types/at/margin/reply.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.tidString(), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("at.margin.reply"), 9 - createdAt: /*#__PURE__*/ v.datetimeString(), 10 - /** 11 - * MIME type of the text content 12 - * @default "text/plain" 13 - */ 14 - format: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), "text/plain"), 15 - /** 16 - * Reference to the parent annotation or reply 17 - */ 18 - get parent() { 19 - return replyRefSchema; 20 - }, 21 - /** 22 - * Reference to the root annotation of the thread 23 - */ 24 - get root() { 25 - return replyRefSchema; 26 - }, 27 - /** 28 - * Reply text content 29 - * @maxLength 10000 30 - * @maxGraphemes 3000 31 - */ 32 - text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 33 - /*#__PURE__*/ v.stringLength(0, 10000), 34 - /*#__PURE__*/ v.stringGraphemes(0, 3000), 35 - ]), 36 - }), 37 - ); 38 - const _replyRefSchema = /*#__PURE__*/ v.object({ 39 - $type: /*#__PURE__*/ v.optional( 40 - /*#__PURE__*/ v.literal("at.margin.reply#replyRef"), 41 - ), 42 - cid: /*#__PURE__*/ v.cidString(), 43 - uri: /*#__PURE__*/ v.resourceUriString(), 44 - }); 45 - 46 - type main$schematype = typeof _mainSchema; 47 - type replyRef$schematype = typeof _replyRefSchema; 48 - 49 - export interface mainSchema extends main$schematype {} 50 - export interface replyRefSchema extends replyRef$schematype {} 51 - 52 - export const mainSchema = _mainSchema as mainSchema; 53 - export const replyRefSchema = _replyRefSchema as replyRefSchema; 54 - 55 - export interface Main extends v.InferInput<typeof mainSchema> {} 56 - export interface ReplyRef extends v.InferInput<typeof replyRefSchema> {} 57 - 58 - declare module "@atcute/lexicons/ambient" { 59 - interface Records { 60 - "at.margin.reply": mainSchema; 61 - } 62 - }
-18
src/lexicons/types/com/atproto/repo/strongRef.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - 4 - const _mainSchema = /*#__PURE__*/ v.object({ 5 - $type: /*#__PURE__*/ v.optional( 6 - /*#__PURE__*/ v.literal("com.atproto.repo.strongRef"), 7 - ), 8 - cid: /*#__PURE__*/ v.cidString(), 9 - uri: /*#__PURE__*/ v.resourceUriString(), 10 - }); 11 - 12 - type main$schematype = typeof _mainSchema; 13 - 14 - export interface mainSchema extends main$schematype {} 15 - 16 - export const mainSchema = _mainSchema as mainSchema; 17 - 18 - export interface Main extends v.InferInput<typeof mainSchema> {}
-19
src/lexicons/types/community/lexicon/bookmarks/bookmark.ts
··· 1 - /** 2 - * community.lexicon.bookmarks.bookmark 3 - */ 4 - 5 - export interface Main { 6 - $type?: "community.lexicon.bookmarks.bookmark"; 7 - subject: string; 8 - title?: string; 9 - description?: string; 10 - tags?: string[]; 11 - enriched?: { 12 - title?: string; 13 - description?: string; 14 - image?: string; 15 - thumb?: string; 16 - siteName?: string; 17 - }; 18 - createdAt: string; 19 - }
-146
src/lexicons/types/network/cosmik/card.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - import * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef.js"; 5 - import * as NetworkCosmikDefs from "./defs.js"; 6 - 7 - const _mainSchema = /*#__PURE__*/ v.record( 8 - /*#__PURE__*/ v.tidString(), 9 - /*#__PURE__*/ v.object({ 10 - $type: /*#__PURE__*/ v.literal("network.cosmik.card"), 11 - /** 12 - * The specific content of the card, determined by the card type. 13 - */ 14 - get content() { 15 - return /*#__PURE__*/ v.variant([noteContentSchema, urlContentSchema]); 16 - }, 17 - /** 18 - * Timestamp when this card was created (usually set by PDS). 19 - */ 20 - createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 21 - /** 22 - * Optional strong reference to the original card (for NOTE cards). 23 - */ 24 - get originalCard() { 25 - return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema); 26 - }, 27 - /** 28 - * Optional strong reference to a parent card (for NOTE cards). 29 - */ 30 - get parentCard() { 31 - return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema); 32 - }, 33 - /** 34 - * Optional provenance information for this card. 35 - */ 36 - get provenance() { 37 - return /*#__PURE__*/ v.optional(NetworkCosmikDefs.provenanceSchema); 38 - }, 39 - /** 40 - * The type of card 41 - */ 42 - type: /*#__PURE__*/ v.string<"NOTE" | "URL" | (string & {})>(), 43 - /** 44 - * Optional URL associated with the card. Required for URL cards, optional for NOTE cards. 45 - */ 46 - url: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 47 - }), 48 - ); 49 - const _noteContentSchema = /*#__PURE__*/ v.object({ 50 - $type: /*#__PURE__*/ v.optional( 51 - /*#__PURE__*/ v.literal("network.cosmik.card#noteContent"), 52 - ), 53 - /** 54 - * The note text content 55 - * @maxLength 10000 56 - */ 57 - text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 58 - /*#__PURE__*/ v.stringLength(0, 10000), 59 - ]), 60 - }); 61 - const _urlContentSchema = /*#__PURE__*/ v.object({ 62 - $type: /*#__PURE__*/ v.optional( 63 - /*#__PURE__*/ v.literal("network.cosmik.card#urlContent"), 64 - ), 65 - /** 66 - * Optional metadata about the URL 67 - */ 68 - get metadata() { 69 - return /*#__PURE__*/ v.optional(urlMetadataSchema); 70 - }, 71 - /** 72 - * The URL being saved 73 - */ 74 - url: /*#__PURE__*/ v.genericUriString(), 75 - }); 76 - const _urlMetadataSchema = /*#__PURE__*/ v.object({ 77 - $type: /*#__PURE__*/ v.optional( 78 - /*#__PURE__*/ v.literal("network.cosmik.card#urlMetadata"), 79 - ), 80 - /** 81 - * Author of the content 82 - */ 83 - author: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 84 - /** 85 - * Description of the page 86 - */ 87 - description: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 88 - /** 89 - * Digital Object Identifier (DOI) for academic content 90 - */ 91 - doi: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 92 - /** 93 - * URL of a representative image 94 - */ 95 - imageUrl: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 96 - /** 97 - * International Standard Book Number (ISBN) for books 98 - */ 99 - isbn: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 100 - /** 101 - * When the content was published 102 - */ 103 - publishedDate: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 104 - /** 105 - * When the metadata was retrieved 106 - */ 107 - retrievedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 108 - /** 109 - * Name of the site 110 - */ 111 - siteName: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 112 - /** 113 - * Title of the page 114 - */ 115 - title: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 116 - /** 117 - * Type of content (e.g., 'video', 'article') 118 - */ 119 - type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 120 - }); 121 - 122 - type main$schematype = typeof _mainSchema; 123 - type noteContent$schematype = typeof _noteContentSchema; 124 - type urlContent$schematype = typeof _urlContentSchema; 125 - type urlMetadata$schematype = typeof _urlMetadataSchema; 126 - 127 - export interface mainSchema extends main$schematype {} 128 - export interface noteContentSchema extends noteContent$schematype {} 129 - export interface urlContentSchema extends urlContent$schematype {} 130 - export interface urlMetadataSchema extends urlMetadata$schematype {} 131 - 132 - export const mainSchema = _mainSchema as mainSchema; 133 - export const noteContentSchema = _noteContentSchema as noteContentSchema; 134 - export const urlContentSchema = _urlContentSchema as urlContentSchema; 135 - export const urlMetadataSchema = _urlMetadataSchema as urlMetadataSchema; 136 - 137 - export interface Main extends v.InferInput<typeof mainSchema> {} 138 - export interface NoteContent extends v.InferInput<typeof noteContentSchema> {} 139 - export interface UrlContent extends v.InferInput<typeof urlContentSchema> {} 140 - export interface UrlMetadata extends v.InferInput<typeof urlMetadataSchema> {} 141 - 142 - declare module "@atcute/lexicons/ambient" { 143 - interface Records { 144 - "network.cosmik.card": mainSchema; 145 - } 146 - }
-58
src/lexicons/types/network/cosmik/collection.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - 5 - const _mainSchema = /*#__PURE__*/ v.record( 6 - /*#__PURE__*/ v.tidString(), 7 - /*#__PURE__*/ v.object({ 8 - $type: /*#__PURE__*/ v.literal("network.cosmik.collection"), 9 - /** 10 - * Access control for the collection 11 - */ 12 - accessType: /*#__PURE__*/ v.string<"CLOSED" | "OPEN" | (string & {})>(), 13 - /** 14 - * List of collaborator DIDs who can add cards to closed collections 15 - */ 16 - collaborators: /*#__PURE__*/ v.optional( 17 - /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 18 - ), 19 - /** 20 - * Timestamp when this collection was created (usually set by PDS). 21 - */ 22 - createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 23 - /** 24 - * Description of the collection 25 - * @maxLength 500 26 - */ 27 - description: /*#__PURE__*/ v.optional( 28 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 29 - /*#__PURE__*/ v.stringLength(0, 500), 30 - ]), 31 - ), 32 - /** 33 - * Name of the collection 34 - * @maxLength 100 35 - */ 36 - name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 37 - /*#__PURE__*/ v.stringLength(0, 100), 38 - ]), 39 - /** 40 - * Timestamp when this collection was last updated. 41 - */ 42 - updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 43 - }), 44 - ); 45 - 46 - type main$schematype = typeof _mainSchema; 47 - 48 - export interface mainSchema extends main$schematype {} 49 - 50 - export const mainSchema = _mainSchema as mainSchema; 51 - 52 - export interface Main extends v.InferInput<typeof mainSchema> {} 53 - 54 - declare module "@atcute/lexicons/ambient" { 55 - interface Records { 56 - "network.cosmik.collection": mainSchema; 57 - } 58 - }
-62
src/lexicons/types/network/cosmik/collectionLink.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import type {} from "@atcute/lexicons/ambient"; 4 - import * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef.js"; 5 - import * as NetworkCosmikDefs from "./defs.js"; 6 - 7 - const _mainSchema = /*#__PURE__*/ v.record( 8 - /*#__PURE__*/ v.tidString(), 9 - /*#__PURE__*/ v.object({ 10 - $type: /*#__PURE__*/ v.literal("network.cosmik.collectionLink"), 11 - /** 12 - * Timestamp when the card was added to the collection. 13 - */ 14 - addedAt: /*#__PURE__*/ v.datetimeString(), 15 - /** 16 - * DID of the user who added the card to the collection 17 - */ 18 - addedBy: /*#__PURE__*/ v.string(), 19 - /** 20 - * Strong reference to the card record in the users library. 21 - */ 22 - get card() { 23 - return ComAtprotoRepoStrongRef.mainSchema; 24 - }, 25 - /** 26 - * Strong reference to the collection record. 27 - */ 28 - get collection() { 29 - return ComAtprotoRepoStrongRef.mainSchema; 30 - }, 31 - /** 32 - * Timestamp when this link record was created (usually set by PDS). 33 - */ 34 - createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 35 - /** 36 - * Strong reference to the original card record (may be in another library). 37 - */ 38 - get originalCard() { 39 - return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema); 40 - }, 41 - /** 42 - * Optional provenance information for this link. 43 - */ 44 - get provenance() { 45 - return /*#__PURE__*/ v.optional(NetworkCosmikDefs.provenanceSchema); 46 - }, 47 - }), 48 - ); 49 - 50 - type main$schematype = typeof _mainSchema; 51 - 52 - export interface mainSchema extends main$schematype {} 53 - 54 - export const mainSchema = _mainSchema as mainSchema; 55 - 56 - export interface Main extends v.InferInput<typeof mainSchema> {} 57 - 58 - declare module "@atcute/lexicons/ambient" { 59 - interface Records { 60 - "network.cosmik.collectionLink": mainSchema; 61 - } 62 - }
-23
src/lexicons/types/network/cosmik/defs.ts
··· 1 - import type {} from "@atcute/lexicons"; 2 - import * as v from "@atcute/lexicons/validations"; 3 - import * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef.js"; 4 - 5 - const _provenanceSchema = /*#__PURE__*/ v.object({ 6 - $type: /*#__PURE__*/ v.optional( 7 - /*#__PURE__*/ v.literal("network.cosmik.defs#provenance"), 8 - ), 9 - /** 10 - * Strong reference to the card that led to this record. 11 - */ 12 - get via() { 13 - return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema); 14 - }, 15 - }); 16 - 17 - type provenance$schematype = typeof _provenanceSchema; 18 - 19 - export interface provenanceSchema extends provenance$schematype {} 20 - 21 - export const provenanceSchema = _provenanceSchema as provenanceSchema; 22 - 23 - export interface Provenance extends v.InferInput<typeof provenanceSchema> {}