atproto pastebin service: https://plonk.li
at main 12 kB view raw
1/** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4import { LexiconDoc, Lexicons } from "@atproto/lexicon"; 5 6export const schemaDict = { 7 LiPlonkComment: { 8 lexicon: 1, 9 id: "li.plonk.comment", 10 defs: { 11 main: { 12 type: "record", 13 key: "tid", 14 record: { 15 type: "object", 16 required: ["content", "createdAt", "post"], 17 properties: { 18 content: { 19 type: "string", 20 maxLength: 100000, 21 maxGraphemes: 10000, 22 description: "comment body", 23 }, 24 createdAt: { 25 type: "string", 26 format: "datetime", 27 description: "comment creation timestamp", 28 }, 29 post: { 30 type: "ref", 31 ref: "lex:com.atproto.repo.strongRef", 32 }, 33 }, 34 }, 35 }, 36 }, 37 }, 38 ComAtprotoLabelDefs: { 39 lexicon: 1, 40 id: "com.atproto.label.defs", 41 defs: { 42 label: { 43 type: "object", 44 description: 45 "Metadata tag on an atproto resource (eg, repo or record).", 46 required: ["src", "uri", "val", "cts"], 47 properties: { 48 ver: { 49 type: "integer", 50 description: "The AT Protocol version of the label object.", 51 }, 52 src: { 53 type: "string", 54 format: "did", 55 description: "DID of the actor who created this label.", 56 }, 57 uri: { 58 type: "string", 59 format: "uri", 60 description: 61 "AT URI of the record, repository (account), or other resource that this label applies to.", 62 }, 63 cid: { 64 type: "string", 65 format: "cid", 66 description: 67 "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", 68 }, 69 val: { 70 type: "string", 71 maxLength: 128, 72 description: 73 "The short string name of the value or type of this label.", 74 }, 75 neg: { 76 type: "boolean", 77 description: 78 "If true, this is a negation label, overwriting a previous label.", 79 }, 80 cts: { 81 type: "string", 82 format: "datetime", 83 description: "Timestamp when this label was created.", 84 }, 85 exp: { 86 type: "string", 87 format: "datetime", 88 description: 89 "Timestamp at which this label expires (no longer applies).", 90 }, 91 sig: { 92 type: "bytes", 93 description: "Signature of dag-cbor encoded label.", 94 }, 95 }, 96 }, 97 selfLabels: { 98 type: "object", 99 description: 100 "Metadata tags on an atproto record, published by the author within the record.", 101 required: ["values"], 102 properties: { 103 values: { 104 type: "array", 105 items: { 106 type: "ref", 107 ref: "lex:com.atproto.label.defs#selfLabel", 108 }, 109 maxLength: 10, 110 }, 111 }, 112 }, 113 selfLabel: { 114 type: "object", 115 description: 116 "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", 117 required: ["val"], 118 properties: { 119 val: { 120 type: "string", 121 maxLength: 128, 122 description: 123 "The short string name of the value or type of this label.", 124 }, 125 }, 126 }, 127 labelValueDefinition: { 128 type: "object", 129 description: 130 "Declares a label value and its expected interpretations and behaviors.", 131 required: ["identifier", "severity", "blurs", "locales"], 132 properties: { 133 identifier: { 134 type: "string", 135 description: 136 "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", 137 maxLength: 100, 138 maxGraphemes: 100, 139 }, 140 severity: { 141 type: "string", 142 description: 143 "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", 144 knownValues: ["inform", "alert", "none"], 145 }, 146 blurs: { 147 type: "string", 148 description: 149 "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", 150 knownValues: ["content", "media", "none"], 151 }, 152 defaultSetting: { 153 type: "string", 154 description: "The default setting for this label.", 155 knownValues: ["ignore", "warn", "hide"], 156 default: "warn", 157 }, 158 adultOnly: { 159 type: "boolean", 160 description: 161 "Does the user need to have adult content enabled in order to configure this label?", 162 }, 163 locales: { 164 type: "array", 165 items: { 166 type: "ref", 167 ref: "lex:com.atproto.label.defs#labelValueDefinitionStrings", 168 }, 169 }, 170 }, 171 }, 172 labelValueDefinitionStrings: { 173 type: "object", 174 description: 175 "Strings which describe the label in the UI, localized into a specific language.", 176 required: ["lang", "name", "description"], 177 properties: { 178 lang: { 179 type: "string", 180 description: 181 "The code of the language these strings are written in.", 182 format: "language", 183 }, 184 name: { 185 type: "string", 186 description: "A short human-readable name for the label.", 187 maxGraphemes: 64, 188 maxLength: 640, 189 }, 190 description: { 191 type: "string", 192 description: 193 "A longer description of what the label means and why it might be applied.", 194 maxGraphemes: 10000, 195 maxLength: 100000, 196 }, 197 }, 198 }, 199 labelValue: { 200 type: "string", 201 knownValues: [ 202 "!hide", 203 "!no-promote", 204 "!warn", 205 "!no-unauthenticated", 206 "dmca-violation", 207 "doxxing", 208 "porn", 209 "sexual", 210 "nudity", 211 "nsfl", 212 "gore", 213 ], 214 }, 215 }, 216 }, 217 ComAtprotoRepoGetRecord: { 218 lexicon: 1, 219 id: "com.atproto.repo.getRecord", 220 defs: { 221 main: { 222 type: "query", 223 description: 224 "Get a single record from a repository. Does not require auth.", 225 parameters: { 226 type: "params", 227 required: ["repo", "collection", "rkey"], 228 properties: { 229 repo: { 230 type: "string", 231 format: "at-identifier", 232 description: "The handle or DID of the repo.", 233 }, 234 collection: { 235 type: "string", 236 format: "nsid", 237 description: "The NSID of the record collection.", 238 }, 239 rkey: { 240 type: "string", 241 description: "The Record Key.", 242 }, 243 cid: { 244 type: "string", 245 format: "cid", 246 description: 247 "The CID of the version of the record. If not specified, then return the most recent version.", 248 }, 249 }, 250 }, 251 output: { 252 encoding: "application/json", 253 schema: { 254 type: "object", 255 required: ["uri", "value"], 256 properties: { 257 uri: { 258 type: "string", 259 format: "at-uri", 260 }, 261 cid: { 262 type: "string", 263 format: "cid", 264 }, 265 value: { 266 type: "unknown", 267 }, 268 }, 269 }, 270 }, 271 errors: [ 272 { 273 name: "RecordNotFound", 274 }, 275 ], 276 }, 277 }, 278 }, 279 ComAtprotoRepoListRecords: { 280 lexicon: 1, 281 id: "com.atproto.repo.listRecords", 282 defs: { 283 main: { 284 type: "query", 285 description: 286 "List a range of records in a repository, matching a specific collection. Does not require auth.", 287 parameters: { 288 type: "params", 289 required: ["repo", "collection"], 290 properties: { 291 repo: { 292 type: "string", 293 format: "at-identifier", 294 description: "The handle or DID of the repo.", 295 }, 296 collection: { 297 type: "string", 298 format: "nsid", 299 description: "The NSID of the record type.", 300 }, 301 limit: { 302 type: "integer", 303 minimum: 1, 304 maximum: 100, 305 default: 50, 306 description: "The number of records to return.", 307 }, 308 cursor: { 309 type: "string", 310 }, 311 rkeyStart: { 312 type: "string", 313 description: 314 "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)", 315 }, 316 rkeyEnd: { 317 type: "string", 318 description: 319 "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)", 320 }, 321 reverse: { 322 type: "boolean", 323 description: "Flag to reverse the order of the returned records.", 324 }, 325 }, 326 }, 327 output: { 328 encoding: "application/json", 329 schema: { 330 type: "object", 331 required: ["records"], 332 properties: { 333 cursor: { 334 type: "string", 335 }, 336 records: { 337 type: "array", 338 items: { 339 type: "ref", 340 ref: "lex:com.atproto.repo.listRecords#record", 341 }, 342 }, 343 }, 344 }, 345 }, 346 }, 347 record: { 348 type: "object", 349 required: ["uri", "cid", "value"], 350 properties: { 351 uri: { 352 type: "string", 353 format: "at-uri", 354 }, 355 cid: { 356 type: "string", 357 format: "cid", 358 }, 359 value: { 360 type: "unknown", 361 }, 362 }, 363 }, 364 }, 365 }, 366 LiPlonkPaste: { 367 lexicon: 1, 368 id: "li.plonk.paste", 369 defs: { 370 main: { 371 type: "record", 372 key: "tid", 373 record: { 374 type: "object", 375 required: ["code", "shortUrl", "lang", "title", "createdAt"], 376 properties: { 377 code: { 378 type: "string", 379 minLength: 1, 380 maxGraphemes: 65536, 381 maxLength: 65536, 382 }, 383 shortUrl: { 384 type: "string", 385 minLength: 2, 386 maxGraphemes: 10, 387 maxLength: 10, 388 }, 389 lang: { 390 type: "string", 391 minLength: 1, 392 maxGraphemes: 20, 393 maxLength: 20, 394 }, 395 title: { 396 type: "string", 397 minLength: 1, 398 maxGraphemes: 100, 399 maxLength: 100, 400 }, 401 createdAt: { 402 type: "string", 403 format: "datetime", 404 }, 405 }, 406 }, 407 }, 408 }, 409 }, 410 AppBskyActorProfile: { 411 lexicon: 1, 412 id: "app.bsky.actor.profile", 413 defs: { 414 main: { 415 type: "record", 416 description: "A declaration of a Bluesky account profile.", 417 key: "literal:self", 418 record: { 419 type: "object", 420 properties: { 421 displayName: { 422 type: "string", 423 maxGraphemes: 64, 424 maxLength: 640, 425 }, 426 description: { 427 type: "string", 428 description: "Free-form profile description text.", 429 maxGraphemes: 256, 430 maxLength: 2560, 431 }, 432 avatar: { 433 type: "blob", 434 description: 435 "Small image to be displayed next to posts from account. AKA, 'profile picture'", 436 accept: ["image/png", "image/jpeg"], 437 maxSize: 1000000, 438 }, 439 banner: { 440 type: "blob", 441 description: 442 "Larger horizontal image to display behind profile view.", 443 accept: ["image/png", "image/jpeg"], 444 maxSize: 1000000, 445 }, 446 labels: { 447 type: "union", 448 description: 449 "Self-label values, specific to the Bluesky application, on the overall account.", 450 refs: ["lex:com.atproto.label.defs#selfLabels"], 451 }, 452 joinedViaStarterPack: { 453 type: "ref", 454 ref: "lex:com.atproto.repo.strongRef", 455 }, 456 createdAt: { 457 type: "string", 458 format: "datetime", 459 }, 460 }, 461 }, 462 }, 463 }, 464 }, 465 ComAtprotoRepoStrongRef: { 466 lexicon: 1, 467 id: "com.atproto.repo.strongRef", 468 description: "A URI with a content-hash fingerprint.", 469 defs: { 470 main: { 471 type: "object", 472 required: ["uri", "cid"], 473 properties: { 474 uri: { 475 type: "string", 476 format: "at-uri", 477 }, 478 cid: { 479 type: "string", 480 format: "cid", 481 }, 482 }, 483 }, 484 }, 485 }, 486}; 487export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]; 488export const lexicons: Lexicons = new Lexicons(schemas); 489export const ids = { 490 LiPlonkComment: "li.plonk.comment", 491 ComAtprotoLabelDefs: "com.atproto.label.defs", 492 ComAtprotoRepoGetRecord: "com.atproto.repo.getRecord", 493 ComAtprotoRepoListRecords: "com.atproto.repo.listRecords", 494 LiPlonkPaste: "li.plonk.paste", 495 AppBskyActorProfile: "app.bsky.actor.profile", 496 ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef", 497};