Auto-indexing service and GraphQL API for AT Protocol Records

chore: remove feed example

-4481
examples/01-statusphere-html/README.md examples/01-statusphere/README.md
examples/01-statusphere-html/index.html examples/01-statusphere/index.html
examples/01-statusphere-html/lexicons/app/bsky/actor/profile.json examples/01-statusphere/lexicons/app/bsky/actor/profile.json
examples/01-statusphere-html/lexicons/com/atproto/label/defs.json examples/01-statusphere/lexicons/com/atproto/label/defs.json
examples/01-statusphere-html/lexicons/com/atproto/repo/strongRef.json examples/01-statusphere/lexicons/com/atproto/repo/strongRef.json
examples/01-statusphere-html/lexicons/xyz/statusphere/status.json examples/01-statusphere/lexicons/xyz/statusphere/status.json
-63
examples/02-following-feed-wip/README.md
··· 1 - # Following Feed Example 2 - 3 - A simple HTML example demonstrating how to view Bluesky profile posts using Quickslice's GraphQL API. 4 - 5 - ## Features 6 - 7 - - OAuth login with PKCE flow 8 - - Client-side routing (`/profile/{handle}`) 9 - - View any user's posts (excluding replies) 10 - - Display post text and embedded images 11 - 12 - ## Setup 13 - 14 - 1. Start the Quickslice server on `localhost:8080` 15 - 2. Open `index.html` in a browser 16 - 3. Enter your OAuth Client ID and Bluesky handle 17 - 4. After login, you'll be redirected to your profile page 18 - 19 - ## Routes 20 - 21 - - `/` - Home page (redirects to profile when logged in) 22 - - `/profile/{handle}` - View posts from a specific user 23 - 24 - ## GraphQL Query Used 25 - 26 - ```graphql 27 - query GetPosts($handle: String!) { 28 - appBskyFeedPost( 29 - sortBy: [{direction: DESC, field: createdAt}] 30 - where: { 31 - and: [ 32 - {actorHandle: {eq: $handle}}, 33 - {reply: {isNull: true}} 34 - ] 35 - } 36 - ) { 37 - edges { 38 - node { 39 - text 40 - createdAt 41 - appBskyActorProfileByDid { 42 - displayName 43 - actorHandle 44 - avatar { url } 45 - } 46 - embed { 47 - ... on AppBskyEmbedImages { 48 - images { 49 - image { url } 50 - } 51 - } 52 - } 53 - } 54 - } 55 - } 56 - } 57 - ``` 58 - 59 - ## Notes 60 - 61 - - Requires authentication to view profiles 62 - - Posts are sorted by creation date (newest first) 63 - - Replies are filtered out to show only original posts
-1049
examples/02-following-feed-wip/index.html
··· 1 - <!DOCTYPE html> 2 - <html lang="en"> 3 - <head> 4 - <meta charset="UTF-8"> 5 - <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 - <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src http://localhost:8080; img-src 'self' https: data:;"> 7 - <title>Following Feed</title> 8 - <style> 9 - /* CSS Reset */ 10 - *, *::before, *::after { 11 - box-sizing: border-box; 12 - } 13 - * { 14 - margin: 0; 15 - } 16 - body { 17 - line-height: 1.5; 18 - -webkit-font-smoothing: antialiased; 19 - } 20 - input, button { 21 - font: inherit; 22 - } 23 - 24 - /* CSS Variables */ 25 - :root { 26 - --primary-500: #0078ff; 27 - --primary-400: #339dff; 28 - --primary-600: #0060cc; 29 - --gray-100: #f5f5f5; 30 - --gray-200: #e5e5e5; 31 - --gray-500: #737373; 32 - --gray-700: #404040; 33 - --gray-900: #171717; 34 - --border-color: #e5e5e5; 35 - --error-bg: #fef2f2; 36 - --error-border: #fecaca; 37 - --error-text: #dc2626; 38 - } 39 - 40 - /* Layout */ 41 - body { 42 - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 43 - background: var(--gray-100); 44 - color: var(--gray-900); 45 - min-height: 100vh; 46 - padding: 2rem 1rem; 47 - } 48 - 49 - #app { 50 - max-width: 600px; 51 - margin: 0 auto; 52 - } 53 - 54 - /* Header */ 55 - header { 56 - text-align: center; 57 - margin-bottom: 2rem; 58 - } 59 - 60 - header h1 { 61 - font-size: 2.5rem; 62 - color: var(--primary-500); 63 - margin-bottom: 0.25rem; 64 - } 65 - 66 - .tagline { 67 - color: var(--gray-500); 68 - font-size: 1rem; 69 - } 70 - 71 - /* Cards */ 72 - .card { 73 - background: white; 74 - border-radius: 0.5rem; 75 - padding: 1.5rem; 76 - margin-bottom: 1rem; 77 - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 78 - } 79 - 80 - /* Auth Section */ 81 - .login-form { 82 - display: flex; 83 - flex-direction: column; 84 - gap: 1rem; 85 - } 86 - 87 - .form-group { 88 - display: flex; 89 - flex-direction: column; 90 - gap: 0.25rem; 91 - } 92 - 93 - .form-group label { 94 - font-size: 0.875rem; 95 - font-weight: 500; 96 - color: var(--gray-700); 97 - } 98 - 99 - .form-group input { 100 - padding: 0.75rem; 101 - border: 1px solid var(--border-color); 102 - border-radius: 0.375rem; 103 - font-size: 1rem; 104 - } 105 - 106 - .form-group input:focus { 107 - outline: none; 108 - border-color: var(--primary-500); 109 - box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.1); 110 - } 111 - 112 - .btn { 113 - padding: 0.75rem 1.5rem; 114 - border: none; 115 - border-radius: 0.375rem; 116 - font-size: 1rem; 117 - font-weight: 500; 118 - cursor: pointer; 119 - transition: background-color 0.15s; 120 - } 121 - 122 - .btn-primary { 123 - background: var(--primary-500); 124 - color: white; 125 - } 126 - 127 - .btn-primary:hover { 128 - background: var(--primary-600); 129 - } 130 - 131 - .btn-primary:disabled { 132 - background: var(--gray-200); 133 - color: var(--gray-500); 134 - cursor: not-allowed; 135 - } 136 - 137 - .btn-secondary { 138 - background: var(--gray-200); 139 - color: var(--gray-700); 140 - } 141 - 142 - .btn-secondary:hover { 143 - background: var(--border-color); 144 - } 145 - 146 - /* User Card */ 147 - .user-card { 148 - display: flex; 149 - align-items: center; 150 - justify-content: space-between; 151 - } 152 - 153 - .user-info { 154 - display: flex; 155 - align-items: center; 156 - gap: 0.75rem; 157 - } 158 - 159 - .user-avatar { 160 - width: 48px; 161 - height: 48px; 162 - border-radius: 50%; 163 - background: var(--gray-200); 164 - display: flex; 165 - align-items: center; 166 - justify-content: center; 167 - font-size: 1.5rem; 168 - } 169 - 170 - .user-avatar img { 171 - width: 100%; 172 - height: 100%; 173 - border-radius: 50%; 174 - object-fit: cover; 175 - } 176 - 177 - .user-name { 178 - font-weight: 600; 179 - } 180 - 181 - .user-handle { 182 - font-size: 0.875rem; 183 - color: var(--gray-500); 184 - } 185 - 186 - a.user-info { 187 - text-decoration: none; 188 - color: inherit; 189 - } 190 - 191 - a.user-info:hover .user-name { 192 - color: var(--primary-500); 193 - } 194 - 195 - /* Post Cards */ 196 - .posts-list { 197 - display: flex; 198 - flex-direction: column; 199 - gap: 1rem; 200 - } 201 - 202 - .post-card { 203 - background: white; 204 - border-radius: 0.5rem; 205 - padding: 1rem; 206 - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 207 - } 208 - 209 - .post-header { 210 - display: flex; 211 - align-items: center; 212 - gap: 0.75rem; 213 - margin-bottom: 0.75rem; 214 - } 215 - 216 - .post-avatar { 217 - width: 40px; 218 - height: 40px; 219 - border-radius: 50%; 220 - background: var(--gray-200); 221 - overflow: hidden; 222 - flex-shrink: 0; 223 - } 224 - 225 - .post-avatar img { 226 - width: 100%; 227 - height: 100%; 228 - object-fit: cover; 229 - } 230 - 231 - .post-author-info { 232 - flex: 1; 233 - min-width: 0; 234 - } 235 - 236 - .post-author-name { 237 - font-weight: 600; 238 - color: var(--gray-900); 239 - white-space: nowrap; 240 - overflow: hidden; 241 - text-overflow: ellipsis; 242 - } 243 - 244 - .post-author-handle { 245 - font-size: 0.875rem; 246 - color: var(--gray-500); 247 - } 248 - 249 - .post-text { 250 - color: var(--gray-700); 251 - line-height: 1.5; 252 - white-space: pre-wrap; 253 - word-break: break-word; 254 - } 255 - 256 - .post-images { 257 - display: grid; 258 - gap: 0.5rem; 259 - margin-top: 0.75rem; 260 - } 261 - 262 - .post-images.single { 263 - grid-template-columns: 1fr; 264 - } 265 - 266 - .post-images.multiple { 267 - grid-template-columns: repeat(2, 1fr); 268 - } 269 - 270 - .post-images img { 271 - width: 100%; 272 - border-radius: 0.5rem; 273 - max-height: 300px; 274 - object-fit: cover; 275 - } 276 - 277 - .post-date { 278 - font-size: 0.75rem; 279 - color: var(--gray-500); 280 - margin-top: 0.75rem; 281 - } 282 - 283 - /* Profile Header */ 284 - .profile-header { 285 - display: flex; 286 - align-items: center; 287 - gap: 1rem; 288 - margin-bottom: 1.5rem; 289 - } 290 - 291 - .profile-avatar { 292 - width: 64px; 293 - height: 64px; 294 - border-radius: 50%; 295 - background: var(--gray-200); 296 - overflow: hidden; 297 - flex-shrink: 0; 298 - } 299 - 300 - .profile-avatar img { 301 - width: 100%; 302 - height: 100%; 303 - object-fit: cover; 304 - } 305 - 306 - .profile-name { 307 - font-size: 1.25rem; 308 - font-weight: 600; 309 - } 310 - 311 - .profile-handle { 312 - color: var(--gray-500); 313 - } 314 - 315 - /* Error Banner */ 316 - #error-banner { 317 - position: fixed; 318 - top: 1rem; 319 - left: 50%; 320 - transform: translateX(-50%); 321 - background: var(--error-bg); 322 - border: 1px solid var(--error-border); 323 - color: var(--error-text); 324 - padding: 0.75rem 1rem; 325 - border-radius: 0.375rem; 326 - display: flex; 327 - align-items: center; 328 - gap: 0.75rem; 329 - max-width: 90%; 330 - z-index: 100; 331 - } 332 - 333 - #error-banner.hidden { 334 - display: none; 335 - } 336 - 337 - #error-banner button { 338 - background: none; 339 - border: none; 340 - color: var(--error-text); 341 - cursor: pointer; 342 - font-size: 1.25rem; 343 - line-height: 1; 344 - } 345 - 346 - /* Loading State */ 347 - .loading { 348 - text-align: center; 349 - color: var(--gray-500); 350 - padding: 2rem; 351 - } 352 - 353 - /* Responsive */ 354 - @media (max-width: 480px) { 355 - .emoji-grid { 356 - grid-template-columns: repeat(6, 1fr); 357 - } 358 - 359 - .emoji-btn { 360 - font-size: 1.25rem; 361 - } 362 - } 363 - 364 - /* Hidden utility */ 365 - .hidden { 366 - display: none !important; 367 - } 368 - </style> 369 - </head> 370 - <body> 371 - <div id="app"> 372 - <header> 373 - <h1>Following Feed</h1> 374 - <p class="tagline">View posts on the Atmosphere</p> 375 - </header> 376 - <main> 377 - <div id="auth-section"></div> 378 - <div id="posts-feed"></div> 379 - </main> 380 - <div id="error-banner" class="hidden"></div> 381 - </div> 382 - <script> 383 - // ============================================================================= 384 - // CONSTANTS 385 - // ============================================================================= 386 - 387 - const GRAPHQL_URL = 'http://localhost:8080/graphql'; 388 - const OAUTH_AUTHORIZE_URL = 'http://localhost:8080/oauth/authorize'; 389 - const OAUTH_TOKEN_URL = 'http://localhost:8080/oauth/token'; 390 - 391 - const STORAGE_KEYS = { 392 - accessToken: 'qs_access_token', 393 - refreshToken: 'qs_refresh_token', 394 - userDid: 'qs_user_did', 395 - codeVerifier: 'qs_code_verifier', 396 - oauthState: 'qs_oauth_state', 397 - clientId: 'qs_client_id' 398 - }; 399 - 400 - // ============================================================================= 401 - // STORAGE UTILITIES 402 - // ============================================================================= 403 - 404 - const storage = { 405 - get(key) { 406 - return sessionStorage.getItem(key); 407 - }, 408 - set(key, value) { 409 - sessionStorage.setItem(key, value); 410 - }, 411 - remove(key) { 412 - sessionStorage.removeItem(key); 413 - }, 414 - clear() { 415 - Object.values(STORAGE_KEYS).forEach(key => sessionStorage.removeItem(key)); 416 - } 417 - }; 418 - 419 - // ============================================================================= 420 - // ROUTING 421 - // ============================================================================= 422 - 423 - const router = { 424 - getPath() { 425 - return window.location.pathname; 426 - }, 427 - 428 - getProfileHandle() { 429 - const match = this.getPath().match(/^\/profile\/(.+)$/); 430 - return match ? decodeURIComponent(match[1]) : null; 431 - }, 432 - 433 - navigateTo(path) { 434 - window.history.pushState({}, '', path); 435 - renderApp(); 436 - }, 437 - 438 - isProfilePage() { 439 - return this.getPath().startsWith('/profile/'); 440 - } 441 - }; 442 - 443 - // Handle browser back/forward 444 - window.addEventListener('popstate', () => renderApp()); 445 - 446 - // ============================================================================= 447 - // PKCE UTILITIES 448 - // ============================================================================= 449 - 450 - function base64UrlEncode(buffer) { 451 - const bytes = new Uint8Array(buffer); 452 - let binary = ''; 453 - for (let i = 0; i < bytes.length; i++) { 454 - binary += String.fromCharCode(bytes[i]); 455 - } 456 - return btoa(binary) 457 - .replace(/\+/g, '-') 458 - .replace(/\//g, '_') 459 - .replace(/=+$/, ''); 460 - } 461 - 462 - async function generateCodeVerifier() { 463 - const randomBytes = new Uint8Array(32); 464 - crypto.getRandomValues(randomBytes); 465 - return base64UrlEncode(randomBytes); 466 - } 467 - 468 - async function generateCodeChallenge(verifier) { 469 - const encoder = new TextEncoder(); 470 - const data = encoder.encode(verifier); 471 - const hash = await crypto.subtle.digest('SHA-256', data); 472 - return base64UrlEncode(hash); 473 - } 474 - 475 - function generateState() { 476 - const randomBytes = new Uint8Array(16); 477 - crypto.getRandomValues(randomBytes); 478 - return base64UrlEncode(randomBytes); 479 - } 480 - 481 - // ============================================================================= 482 - // OAUTH FUNCTIONS 483 - // ============================================================================= 484 - 485 - async function initiateLogin(clientId, handle) { 486 - const codeVerifier = await generateCodeVerifier(); 487 - const codeChallenge = await generateCodeChallenge(codeVerifier); 488 - const state = generateState(); 489 - 490 - // Store for callback 491 - storage.set(STORAGE_KEYS.codeVerifier, codeVerifier); 492 - storage.set(STORAGE_KEYS.oauthState, state); 493 - storage.set(STORAGE_KEYS.clientId, clientId); 494 - 495 - // Build redirect URI (always use origin root for SPA compatibility) 496 - const redirectUri = window.location.origin + '/'; 497 - 498 - // Build authorization URL 499 - const params = new URLSearchParams({ 500 - client_id: clientId, 501 - redirect_uri: redirectUri, 502 - response_type: 'code', 503 - code_challenge: codeChallenge, 504 - code_challenge_method: 'S256', 505 - state: state, 506 - login_hint: handle 507 - }); 508 - 509 - window.location.href = `${OAUTH_AUTHORIZE_URL}?${params.toString()}`; 510 - } 511 - 512 - async function handleOAuthCallback() { 513 - const params = new URLSearchParams(window.location.search); 514 - const code = params.get('code'); 515 - const state = params.get('state'); 516 - const error = params.get('error'); 517 - 518 - if (error) { 519 - throw new Error(`OAuth error: ${error} - ${params.get('error_description') || ''}`); 520 - } 521 - 522 - if (!code || !state) { 523 - return false; // Not a callback 524 - } 525 - 526 - // Verify state 527 - const storedState = storage.get(STORAGE_KEYS.oauthState); 528 - if (state !== storedState) { 529 - throw new Error('OAuth state mismatch - possible CSRF attack'); 530 - } 531 - 532 - // Get stored values 533 - const codeVerifier = storage.get(STORAGE_KEYS.codeVerifier); 534 - const clientId = storage.get(STORAGE_KEYS.clientId); 535 - const redirectUri = window.location.origin + '/'; 536 - 537 - if (!codeVerifier || !clientId) { 538 - throw new Error('Missing OAuth session data'); 539 - } 540 - 541 - // Exchange code for tokens 542 - const tokenResponse = await fetch(OAUTH_TOKEN_URL, { 543 - method: 'POST', 544 - headers: { 545 - 'Content-Type': 'application/x-www-form-urlencoded' 546 - }, 547 - body: new URLSearchParams({ 548 - grant_type: 'authorization_code', 549 - code: code, 550 - redirect_uri: redirectUri, 551 - client_id: clientId, 552 - code_verifier: codeVerifier 553 - }) 554 - }); 555 - 556 - if (!tokenResponse.ok) { 557 - const errorData = await tokenResponse.json().catch(() => ({})); 558 - throw new Error(`Token exchange failed: ${errorData.error_description || tokenResponse.statusText}`); 559 - } 560 - 561 - const tokens = await tokenResponse.json(); 562 - 563 - // Store tokens 564 - storage.set(STORAGE_KEYS.accessToken, tokens.access_token); 565 - if (tokens.refresh_token) { 566 - storage.set(STORAGE_KEYS.refreshToken, tokens.refresh_token); 567 - } 568 - 569 - // Extract DID from token response (sub claim) or we'll fetch it later 570 - if (tokens.sub) { 571 - storage.set(STORAGE_KEYS.userDid, tokens.sub); 572 - } 573 - 574 - // Clean up OAuth state 575 - storage.remove(STORAGE_KEYS.codeVerifier); 576 - storage.remove(STORAGE_KEYS.oauthState); 577 - 578 - // Clear URL params 579 - window.history.replaceState({}, document.title, window.location.pathname); 580 - 581 - return true; 582 - } 583 - 584 - function logout() { 585 - storage.clear(); 586 - window.location.reload(); 587 - } 588 - 589 - function isLoggedIn() { 590 - return !!storage.get(STORAGE_KEYS.accessToken); 591 - } 592 - 593 - function getAccessToken() { 594 - return storage.get(STORAGE_KEYS.accessToken); 595 - } 596 - 597 - function getUserDid() { 598 - return storage.get(STORAGE_KEYS.userDid); 599 - } 600 - 601 - // ============================================================================= 602 - // GRAPHQL UTILITIES 603 - // ============================================================================= 604 - 605 - async function graphqlQuery(query, variables = {}, requireAuth = false) { 606 - const headers = { 607 - 'Content-Type': 'application/json' 608 - }; 609 - 610 - if (requireAuth) { 611 - const token = getAccessToken(); 612 - if (!token) { 613 - throw new Error('Not authenticated'); 614 - } 615 - headers['Authorization'] = `Bearer ${token}`; 616 - } 617 - 618 - const response = await fetch(GRAPHQL_URL, { 619 - method: 'POST', 620 - headers, 621 - body: JSON.stringify({ query, variables }) 622 - }); 623 - 624 - if (!response.ok) { 625 - throw new Error(`GraphQL request failed: ${response.statusText}`); 626 - } 627 - 628 - const result = await response.json(); 629 - 630 - if (result.errors && result.errors.length > 0) { 631 - throw new Error(`GraphQL error: ${result.errors[0].message}`); 632 - } 633 - 634 - return result.data; 635 - } 636 - 637 - // ============================================================================= 638 - // DATA FETCHING 639 - // ============================================================================= 640 - 641 - async function fetchViewer() { 642 - const query = ` 643 - query { 644 - viewer { 645 - did 646 - handle 647 - appBskyActorProfileByDid { 648 - displayName 649 - avatar { url } 650 - } 651 - } 652 - } 653 - `; 654 - 655 - const data = await graphqlQuery(query, {}, true); 656 - return data?.viewer; 657 - } 658 - 659 - async function fetchPosts(handle) { 660 - const query = ` 661 - query GetPosts($handle: String!) { 662 - appBskyFeedPost( 663 - sortBy: [{direction: DESC, field: createdAt}] 664 - where: { 665 - and: [ 666 - {actorHandle: {eq: $handle}}, 667 - {reply: {isNull: true}} 668 - ] 669 - } 670 - ) { 671 - edges { 672 - node { 673 - uri 674 - text 675 - createdAt 676 - appBskyActorProfileByDid { 677 - displayName 678 - actorHandle 679 - avatar { 680 - url 681 - } 682 - } 683 - embed { 684 - ... on AppBskyEmbedImages { 685 - images { 686 - image { 687 - url 688 - } 689 - } 690 - } 691 - } 692 - } 693 - } 694 - } 695 - } 696 - `; 697 - 698 - const data = await graphqlQuery(query, { handle }, true); 699 - return data.appBskyFeedPost?.edges?.map(e => e.node) || []; 700 - } 701 - 702 - async function fetchProfile(handle) { 703 - const query = ` 704 - query GetProfile($handle: String!) { 705 - appBskyActorProfile( 706 - where: {actorHandle: {eq: $handle}} 707 - first: 1 708 - ) { 709 - edges { 710 - node { 711 - did 712 - actorHandle 713 - displayName 714 - avatar { 715 - url 716 - } 717 - } 718 - } 719 - } 720 - } 721 - `; 722 - 723 - const data = await graphqlQuery(query, { handle }, true); 724 - const edges = data.appBskyActorProfile?.edges || []; 725 - return edges.length > 0 ? edges[0].node : null; 726 - } 727 - 728 - // ============================================================================= 729 - // UI RENDERING 730 - // ============================================================================= 731 - 732 - function showError(message) { 733 - const banner = document.getElementById('error-banner'); 734 - banner.innerHTML = ` 735 - <span>${escapeHtml(message)}</span> 736 - <button onclick="hideError()">&times;</button> 737 - `; 738 - banner.classList.remove('hidden'); 739 - } 740 - 741 - function hideError() { 742 - document.getElementById('error-banner').classList.add('hidden'); 743 - } 744 - 745 - function escapeHtml(text) { 746 - const div = document.createElement('div'); 747 - div.textContent = text; 748 - return div.innerHTML; 749 - } 750 - 751 - function formatDate(dateString) { 752 - const date = new Date(dateString); 753 - const now = new Date(); 754 - const isToday = date.toDateString() === now.toDateString(); 755 - 756 - if (isToday) { 757 - return 'today'; 758 - } 759 - 760 - return date.toLocaleDateString('en-US', { 761 - month: 'short', 762 - day: 'numeric', 763 - year: date.getFullYear() !== now.getFullYear() ? 'numeric' : undefined 764 - }); 765 - } 766 - 767 - function renderPostsFeed(posts) { 768 - const container = document.getElementById('posts-feed'); 769 - 770 - if (posts.length === 0) { 771 - container.innerHTML = ` 772 - <div class="card"> 773 - <p class="loading">No posts found.</p> 774 - </div> 775 - `; 776 - return; 777 - } 778 - 779 - container.innerHTML = ` 780 - <div class="posts-list"> 781 - ${posts.map(post => { 782 - const profile = post.appBskyActorProfileByDid; 783 - const displayName = profile?.displayName || profile?.actorHandle || 'Unknown'; 784 - const handle = profile?.actorHandle || ''; 785 - const avatarUrl = profile?.avatar?.url; 786 - const images = post.embed?.images || []; 787 - 788 - return ` 789 - <div class="post-card"> 790 - <div class="post-header"> 791 - <div class="post-avatar"> 792 - ${avatarUrl ? `<img src="${escapeHtml(avatarUrl)}" alt="">` : ''} 793 - </div> 794 - <div class="post-author-info"> 795 - <div class="post-author-name">${escapeHtml(displayName)}</div> 796 - <div class="post-author-handle">@${escapeHtml(handle)}</div> 797 - </div> 798 - </div> 799 - <div class="post-text">${escapeHtml(post.text || '')}</div> 800 - ${images.length > 0 ? ` 801 - <div class="post-images ${images.length === 1 ? 'single' : 'multiple'}"> 802 - ${images.map(img => ` 803 - <img src="${escapeHtml(img.image?.url || '')}" alt="" loading="lazy"> 804 - `).join('')} 805 - </div> 806 - ` : ''} 807 - <div class="post-date">${formatDate(post.createdAt)}</div> 808 - </div> 809 - `; 810 - }).join('')} 811 - </div> 812 - `; 813 - } 814 - 815 - function renderProfileHeader(profile) { 816 - const displayName = profile?.displayName || profile?.actorHandle || 'Unknown'; 817 - const handle = profile?.actorHandle || ''; 818 - const avatarUrl = profile?.avatar?.url; 819 - 820 - return ` 821 - <div class="profile-header"> 822 - <div class="profile-avatar"> 823 - ${avatarUrl ? `<img src="${escapeHtml(avatarUrl)}" alt="">` : ''} 824 - </div> 825 - <div> 826 - <div class="profile-name">${escapeHtml(displayName)}</div> 827 - <div class="profile-handle">@${escapeHtml(handle)}</div> 828 - </div> 829 - </div> 830 - `; 831 - } 832 - 833 - async function renderProfilePage(handle) { 834 - const container = document.getElementById('posts-feed'); 835 - 836 - // Show loading state 837 - container.innerHTML = ` 838 - <div class="card"> 839 - <p class="loading">Loading profile...</p> 840 - </div> 841 - `; 842 - 843 - try { 844 - // Fetch profile and posts in parallel 845 - const [profile, posts] = await Promise.all([ 846 - fetchProfile(handle), 847 - fetchPosts(handle) 848 - ]); 849 - 850 - if (!profile) { 851 - container.innerHTML = ` 852 - <div class="card"> 853 - <p class="loading" style="color: var(--error-text);">Profile not found: @${escapeHtml(handle)}</p> 854 - </div> 855 - `; 856 - return; 857 - } 858 - 859 - // Render profile header + posts 860 - container.innerHTML = ` 861 - <div class="card"> 862 - ${renderProfileHeader(profile)} 863 - </div> 864 - `; 865 - 866 - renderPostsFeed(posts); 867 - } catch (error) { 868 - console.error('Failed to load profile:', error); 869 - container.innerHTML = ` 870 - <div class="card"> 871 - <p class="loading" style="color: var(--error-text);"> 872 - Failed to load profile. ${error.message} 873 - </p> 874 - </div> 875 - `; 876 - } 877 - } 878 - 879 - function renderLoginForm() { 880 - const container = document.getElementById('auth-section'); 881 - const savedClientId = storage.get(STORAGE_KEYS.clientId) || ''; 882 - const profileHandle = router.getProfileHandle(); 883 - 884 - const message = profileHandle 885 - ? `<p style="margin-bottom: 1rem; color: var(--gray-700);">Login to view @${escapeHtml(profileHandle)}'s posts</p>` 886 - : ''; 887 - 888 - container.innerHTML = ` 889 - <div class="card"> 890 - ${message} 891 - <form class="login-form" onsubmit="handleLogin(event)"> 892 - <div class="form-group"> 893 - <label for="client-id">OAuth Client ID</label> 894 - <input 895 - type="text" 896 - id="client-id" 897 - placeholder="your-client-id" 898 - value="${escapeHtml(savedClientId)}" 899 - required 900 - > 901 - </div> 902 - <div class="form-group"> 903 - <label for="handle">Bluesky Handle</label> 904 - <input 905 - type="text" 906 - id="handle" 907 - placeholder="you.bsky.social" 908 - required 909 - > 910 - </div> 911 - <button type="submit" class="btn btn-primary">Login with Bluesky</button> 912 - </form> 913 - <p style="margin-top: 1rem; font-size: 0.875rem; color: var(--gray-500); text-align: center;"> 914 - Don't have a Bluesky account? <a href="https://bsky.app" target="_blank">Sign up</a> 915 - </p> 916 - </div> 917 - `; 918 - } 919 - 920 - function renderUserCard(viewer) { 921 - const container = document.getElementById('auth-section'); 922 - const displayName = viewer?.appBskyActorProfileByDid?.displayName || 'User'; 923 - const handle = viewer?.handle || 'unknown'; 924 - const avatarUrl = viewer?.appBskyActorProfileByDid?.avatar?.url; 925 - 926 - container.innerHTML = ` 927 - <div class="card user-card"> 928 - <a href="/profile/${escapeHtml(handle)}" class="user-info" onclick="event.preventDefault(); router.navigateTo('/profile/${escapeHtml(handle)}')"> 929 - <div class="user-avatar"> 930 - ${avatarUrl 931 - ? `<img src="${escapeHtml(avatarUrl)}" alt="Avatar">` 932 - : '👤'} 933 - </div> 934 - <div> 935 - <div class="user-name">${escapeHtml(displayName)}</div> 936 - <div class="user-handle">@${escapeHtml(handle)}</div> 937 - </div> 938 - </a> 939 - <button class="btn btn-secondary" onclick="logout()">Logout</button> 940 - </div> 941 - `; 942 - } 943 - 944 - function renderLoading(container) { 945 - document.getElementById(container).innerHTML = ` 946 - <div class="card"> 947 - <p class="loading">Loading...</p> 948 - </div> 949 - `; 950 - } 951 - 952 - // ============================================================================= 953 - // EVENT HANDLERS 954 - // ============================================================================= 955 - 956 - async function handleLogin(event) { 957 - event.preventDefault(); 958 - 959 - const clientId = document.getElementById('client-id').value.trim(); 960 - const handle = document.getElementById('handle').value.trim(); 961 - 962 - if (!clientId || !handle) { 963 - showError('Please enter both Client ID and Handle'); 964 - return; 965 - } 966 - 967 - try { 968 - await initiateLogin(clientId, handle); 969 - } catch (error) { 970 - showError(`Login failed: ${error.message}`); 971 - } 972 - } 973 - 974 - // ============================================================================= 975 - // MAIN APPLICATION 976 - // ============================================================================= 977 - 978 - let currentViewer = null; 979 - 980 - async function renderApp() { 981 - const profileHandle = router.getProfileHandle(); 982 - 983 - // Always render auth section first 984 - if (isLoggedIn()) { 985 - try { 986 - if (!currentViewer) { 987 - currentViewer = await fetchViewer(); 988 - } 989 - renderUserCard(currentViewer); 990 - } catch (error) { 991 - console.error('Failed to fetch viewer:', error); 992 - renderUserCard(null); 993 - } 994 - } else { 995 - renderLoginForm(); 996 - } 997 - 998 - // Clear posts feed 999 - document.getElementById('posts-feed').innerHTML = ''; 1000 - 1001 - // Route handling 1002 - if (profileHandle) { 1003 - // Profile page 1004 - if (!isLoggedIn()) { 1005 - document.getElementById('posts-feed').innerHTML = ` 1006 - <div class="card"> 1007 - <p class="loading">Please login to view profiles.</p> 1008 - </div> 1009 - `; 1010 - return; 1011 - } 1012 - await renderProfilePage(profileHandle); 1013 - } else { 1014 - // Home page 1015 - if (isLoggedIn() && currentViewer?.handle) { 1016 - // Redirect logged-in users to their profile 1017 - router.navigateTo(`/profile/${currentViewer.handle}`); 1018 - } 1019 - } 1020 - } 1021 - 1022 - async function init() { 1023 - try { 1024 - // Check if this is an OAuth callback 1025 - const isCallback = await handleOAuthCallback(); 1026 - if (isCallback) { 1027 - console.log('OAuth callback handled successfully'); 1028 - // Fetch viewer and redirect to profile 1029 - const viewer = await fetchViewer(); 1030 - currentViewer = viewer; 1031 - if (viewer?.handle) { 1032 - router.navigateTo(`/profile/${viewer.handle}`); 1033 - return; 1034 - } 1035 - } 1036 - } catch (error) { 1037 - showError(`Authentication failed: ${error.message}`); 1038 - storage.clear(); 1039 - } 1040 - 1041 - // Render the app 1042 - await renderApp(); 1043 - } 1044 - 1045 - // Run on page load 1046 - init(); 1047 - </script> 1048 - </body> 1049 - </html>
-7
examples/02-following-feed-wip/lexicons.json
··· 1 - { 2 - "lexicons": [ 3 - "app.bsky.feed.post", 4 - "app.bsky.graph.follow", 5 - "app.bsky.actor.profile" 6 - ] 7 - }
-882
examples/02-following-feed-wip/lexicons/app/bsky/actor/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.actor.defs", 4 - "defs": { 5 - "nux": { 6 - "type": "object", 7 - "required": [ 8 - "id", 9 - "completed" 10 - ], 11 - "properties": { 12 - "id": { 13 - "type": "string", 14 - "maxLength": 100 15 - }, 16 - "data": { 17 - "type": "string", 18 - "maxLength": 3000, 19 - "description": "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", 20 - "maxGraphemes": 300 21 - }, 22 - "completed": { 23 - "type": "boolean", 24 - "default": false 25 - }, 26 - "expiresAt": { 27 - "type": "string", 28 - "format": "datetime", 29 - "description": "The date and time at which the NUX will expire and should be considered completed." 30 - } 31 - }, 32 - "description": "A new user experiences (NUX) storage object" 33 - }, 34 - "mutedWord": { 35 - "type": "object", 36 - "required": [ 37 - "value", 38 - "targets" 39 - ], 40 - "properties": { 41 - "id": { 42 - "type": "string" 43 - }, 44 - "value": { 45 - "type": "string", 46 - "maxLength": 10000, 47 - "description": "The muted word itself.", 48 - "maxGraphemes": 1000 49 - }, 50 - "targets": { 51 - "type": "array", 52 - "items": { 53 - "ref": "app.bsky.actor.defs#mutedWordTarget", 54 - "type": "ref" 55 - }, 56 - "description": "The intended targets of the muted word." 57 - }, 58 - "expiresAt": { 59 - "type": "string", 60 - "format": "datetime", 61 - "description": "The date and time at which the muted word will expire and no longer be applied." 62 - }, 63 - "actorTarget": { 64 - "type": "string", 65 - "default": "all", 66 - "description": "Groups of users to apply the muted word to. If undefined, applies to all users.", 67 - "knownValues": [ 68 - "all", 69 - "exclude-following" 70 - ] 71 - } 72 - }, 73 - "description": "A word that the account owner has muted." 74 - }, 75 - "savedFeed": { 76 - "type": "object", 77 - "required": [ 78 - "id", 79 - "type", 80 - "value", 81 - "pinned" 82 - ], 83 - "properties": { 84 - "id": { 85 - "type": "string" 86 - }, 87 - "type": { 88 - "type": "string", 89 - "knownValues": [ 90 - "feed", 91 - "list", 92 - "timeline" 93 - ] 94 - }, 95 - "value": { 96 - "type": "string" 97 - }, 98 - "pinned": { 99 - "type": "boolean" 100 - } 101 - } 102 - }, 103 - "statusView": { 104 - "type": "object", 105 - "required": [ 106 - "status", 107 - "record" 108 - ], 109 - "properties": { 110 - "embed": { 111 - "refs": [ 112 - "app.bsky.embed.external#view" 113 - ], 114 - "type": "union", 115 - "description": "An optional embed associated with the status." 116 - }, 117 - "record": { 118 - "type": "unknown" 119 - }, 120 - "status": { 121 - "type": "string", 122 - "description": "The status for the account.", 123 - "knownValues": [ 124 - "app.bsky.actor.status#live" 125 - ] 126 - }, 127 - "isActive": { 128 - "type": "boolean", 129 - "description": "True if the status is not expired, false if it is expired. Only present if expiration was set." 130 - }, 131 - "expiresAt": { 132 - "type": "string", 133 - "format": "datetime", 134 - "description": "The date when this status will expire. The application might choose to no longer return the status after expiration." 135 - } 136 - } 137 - }, 138 - "preferences": { 139 - "type": "array", 140 - "items": { 141 - "refs": [ 142 - "#adultContentPref", 143 - "#contentLabelPref", 144 - "#savedFeedsPref", 145 - "#savedFeedsPrefV2", 146 - "#personalDetailsPref", 147 - "#feedViewPref", 148 - "#threadViewPref", 149 - "#interestsPref", 150 - "#mutedWordsPref", 151 - "#hiddenPostsPref", 152 - "#bskyAppStatePref", 153 - "#labelersPref", 154 - "#postInteractionSettingsPref", 155 - "#verificationPrefs" 156 - ], 157 - "type": "union" 158 - } 159 - }, 160 - "profileView": { 161 - "type": "object", 162 - "required": [ 163 - "did", 164 - "handle" 165 - ], 166 - "properties": { 167 - "did": { 168 - "type": "string", 169 - "format": "did" 170 - }, 171 - "debug": { 172 - "type": "unknown", 173 - "description": "Debug information for internal development" 174 - }, 175 - "avatar": { 176 - "type": "string", 177 - "format": "uri" 178 - }, 179 - "handle": { 180 - "type": "string", 181 - "format": "handle" 182 - }, 183 - "labels": { 184 - "type": "array", 185 - "items": { 186 - "ref": "com.atproto.label.defs#label", 187 - "type": "ref" 188 - } 189 - }, 190 - "status": { 191 - "ref": "#statusView", 192 - "type": "ref" 193 - }, 194 - "viewer": { 195 - "ref": "#viewerState", 196 - "type": "ref" 197 - }, 198 - "pronouns": { 199 - "type": "string" 200 - }, 201 - "createdAt": { 202 - "type": "string", 203 - "format": "datetime" 204 - }, 205 - "indexedAt": { 206 - "type": "string", 207 - "format": "datetime" 208 - }, 209 - "associated": { 210 - "ref": "#profileAssociated", 211 - "type": "ref" 212 - }, 213 - "description": { 214 - "type": "string", 215 - "maxLength": 2560, 216 - "maxGraphemes": 256 217 - }, 218 - "displayName": { 219 - "type": "string", 220 - "maxLength": 640, 221 - "maxGraphemes": 64 222 - }, 223 - "verification": { 224 - "ref": "#verificationState", 225 - "type": "ref" 226 - } 227 - } 228 - }, 229 - "viewerState": { 230 - "type": "object", 231 - "properties": { 232 - "muted": { 233 - "type": "boolean" 234 - }, 235 - "blocking": { 236 - "type": "string", 237 - "format": "at-uri" 238 - }, 239 - "blockedBy": { 240 - "type": "boolean" 241 - }, 242 - "following": { 243 - "type": "string", 244 - "format": "at-uri" 245 - }, 246 - "followedBy": { 247 - "type": "string", 248 - "format": "at-uri" 249 - }, 250 - "mutedByList": { 251 - "ref": "app.bsky.graph.defs#listViewBasic", 252 - "type": "ref" 253 - }, 254 - "blockingByList": { 255 - "ref": "app.bsky.graph.defs#listViewBasic", 256 - "type": "ref" 257 - }, 258 - "knownFollowers": { 259 - "ref": "#knownFollowers", 260 - "type": "ref", 261 - "description": "This property is present only in selected cases, as an optimization." 262 - }, 263 - "activitySubscription": { 264 - "ref": "app.bsky.notification.defs#activitySubscription", 265 - "type": "ref", 266 - "description": "This property is present only in selected cases, as an optimization." 267 - } 268 - }, 269 - "description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests." 270 - }, 271 - "feedViewPref": { 272 - "type": "object", 273 - "required": [ 274 - "feed" 275 - ], 276 - "properties": { 277 - "feed": { 278 - "type": "string", 279 - "description": "The URI of the feed, or an identifier which describes the feed." 280 - }, 281 - "hideReplies": { 282 - "type": "boolean", 283 - "description": "Hide replies in the feed." 284 - }, 285 - "hideReposts": { 286 - "type": "boolean", 287 - "description": "Hide reposts in the feed." 288 - }, 289 - "hideQuotePosts": { 290 - "type": "boolean", 291 - "description": "Hide quote posts in the feed." 292 - }, 293 - "hideRepliesByLikeCount": { 294 - "type": "integer", 295 - "description": "Hide replies in the feed if they do not have this number of likes." 296 - }, 297 - "hideRepliesByUnfollowed": { 298 - "type": "boolean", 299 - "default": true, 300 - "description": "Hide replies in the feed if they are not by followed users." 301 - } 302 - } 303 - }, 304 - "labelersPref": { 305 - "type": "object", 306 - "required": [ 307 - "labelers" 308 - ], 309 - "properties": { 310 - "labelers": { 311 - "type": "array", 312 - "items": { 313 - "ref": "#labelerPrefItem", 314 - "type": "ref" 315 - } 316 - } 317 - } 318 - }, 319 - "interestsPref": { 320 - "type": "object", 321 - "required": [ 322 - "tags" 323 - ], 324 - "properties": { 325 - "tags": { 326 - "type": "array", 327 - "items": { 328 - "type": "string", 329 - "maxLength": 640, 330 - "maxGraphemes": 64 331 - }, 332 - "maxLength": 100, 333 - "description": "A list of tags which describe the account owner's interests gathered during onboarding." 334 - } 335 - } 336 - }, 337 - "knownFollowers": { 338 - "type": "object", 339 - "required": [ 340 - "count", 341 - "followers" 342 - ], 343 - "properties": { 344 - "count": { 345 - "type": "integer" 346 - }, 347 - "followers": { 348 - "type": "array", 349 - "items": { 350 - "ref": "#profileViewBasic", 351 - "type": "ref" 352 - }, 353 - "maxLength": 5, 354 - "minLength": 0 355 - } 356 - }, 357 - "description": "The subject's followers whom you also follow" 358 - }, 359 - "mutedWordsPref": { 360 - "type": "object", 361 - "required": [ 362 - "items" 363 - ], 364 - "properties": { 365 - "items": { 366 - "type": "array", 367 - "items": { 368 - "ref": "app.bsky.actor.defs#mutedWord", 369 - "type": "ref" 370 - }, 371 - "description": "A list of words the account owner has muted." 372 - } 373 - } 374 - }, 375 - "savedFeedsPref": { 376 - "type": "object", 377 - "required": [ 378 - "pinned", 379 - "saved" 380 - ], 381 - "properties": { 382 - "saved": { 383 - "type": "array", 384 - "items": { 385 - "type": "string", 386 - "format": "at-uri" 387 - } 388 - }, 389 - "pinned": { 390 - "type": "array", 391 - "items": { 392 - "type": "string", 393 - "format": "at-uri" 394 - } 395 - }, 396 - "timelineIndex": { 397 - "type": "integer" 398 - } 399 - } 400 - }, 401 - "threadViewPref": { 402 - "type": "object", 403 - "properties": { 404 - "sort": { 405 - "type": "string", 406 - "description": "Sorting mode for threads.", 407 - "knownValues": [ 408 - "oldest", 409 - "newest", 410 - "most-likes", 411 - "random", 412 - "hotness" 413 - ] 414 - } 415 - } 416 - }, 417 - "hiddenPostsPref": { 418 - "type": "object", 419 - "required": [ 420 - "items" 421 - ], 422 - "properties": { 423 - "items": { 424 - "type": "array", 425 - "items": { 426 - "type": "string", 427 - "format": "at-uri" 428 - }, 429 - "description": "A list of URIs of posts the account owner has hidden." 430 - } 431 - } 432 - }, 433 - "labelerPrefItem": { 434 - "type": "object", 435 - "required": [ 436 - "did" 437 - ], 438 - "properties": { 439 - "did": { 440 - "type": "string", 441 - "format": "did" 442 - } 443 - } 444 - }, 445 - "mutedWordTarget": { 446 - "type": "string", 447 - "maxLength": 640, 448 - "knownValues": [ 449 - "content", 450 - "tag" 451 - ], 452 - "maxGraphemes": 64 453 - }, 454 - "adultContentPref": { 455 - "type": "object", 456 - "required": [ 457 - "enabled" 458 - ], 459 - "properties": { 460 - "enabled": { 461 - "type": "boolean", 462 - "default": false 463 - } 464 - } 465 - }, 466 - "bskyAppStatePref": { 467 - "type": "object", 468 - "properties": { 469 - "nuxs": { 470 - "type": "array", 471 - "items": { 472 - "ref": "app.bsky.actor.defs#nux", 473 - "type": "ref" 474 - }, 475 - "maxLength": 100, 476 - "description": "Storage for NUXs the user has encountered." 477 - }, 478 - "queuedNudges": { 479 - "type": "array", 480 - "items": { 481 - "type": "string", 482 - "maxLength": 100 483 - }, 484 - "maxLength": 1000, 485 - "description": "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user." 486 - }, 487 - "activeProgressGuide": { 488 - "ref": "#bskyAppProgressGuide", 489 - "type": "ref" 490 - } 491 - }, 492 - "description": "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this." 493 - }, 494 - "contentLabelPref": { 495 - "type": "object", 496 - "required": [ 497 - "label", 498 - "visibility" 499 - ], 500 - "properties": { 501 - "label": { 502 - "type": "string" 503 - }, 504 - "labelerDid": { 505 - "type": "string", 506 - "format": "did", 507 - "description": "Which labeler does this preference apply to? If undefined, applies globally." 508 - }, 509 - "visibility": { 510 - "type": "string", 511 - "knownValues": [ 512 - "ignore", 513 - "show", 514 - "warn", 515 - "hide" 516 - ] 517 - } 518 - } 519 - }, 520 - "profileViewBasic": { 521 - "type": "object", 522 - "required": [ 523 - "did", 524 - "handle" 525 - ], 526 - "properties": { 527 - "did": { 528 - "type": "string", 529 - "format": "did" 530 - }, 531 - "debug": { 532 - "type": "unknown", 533 - "description": "Debug information for internal development" 534 - }, 535 - "avatar": { 536 - "type": "string", 537 - "format": "uri" 538 - }, 539 - "handle": { 540 - "type": "string", 541 - "format": "handle" 542 - }, 543 - "labels": { 544 - "type": "array", 545 - "items": { 546 - "ref": "com.atproto.label.defs#label", 547 - "type": "ref" 548 - } 549 - }, 550 - "status": { 551 - "ref": "#statusView", 552 - "type": "ref" 553 - }, 554 - "viewer": { 555 - "ref": "#viewerState", 556 - "type": "ref" 557 - }, 558 - "pronouns": { 559 - "type": "string" 560 - }, 561 - "createdAt": { 562 - "type": "string", 563 - "format": "datetime" 564 - }, 565 - "associated": { 566 - "ref": "#profileAssociated", 567 - "type": "ref" 568 - }, 569 - "displayName": { 570 - "type": "string", 571 - "maxLength": 640, 572 - "maxGraphemes": 64 573 - }, 574 - "verification": { 575 - "ref": "#verificationState", 576 - "type": "ref" 577 - } 578 - } 579 - }, 580 - "savedFeedsPrefV2": { 581 - "type": "object", 582 - "required": [ 583 - "items" 584 - ], 585 - "properties": { 586 - "items": { 587 - "type": "array", 588 - "items": { 589 - "ref": "app.bsky.actor.defs#savedFeed", 590 - "type": "ref" 591 - } 592 - } 593 - } 594 - }, 595 - "verificationView": { 596 - "type": "object", 597 - "required": [ 598 - "issuer", 599 - "uri", 600 - "isValid", 601 - "createdAt" 602 - ], 603 - "properties": { 604 - "uri": { 605 - "type": "string", 606 - "format": "at-uri", 607 - "description": "The AT-URI of the verification record." 608 - }, 609 - "issuer": { 610 - "type": "string", 611 - "format": "did", 612 - "description": "The user who issued this verification." 613 - }, 614 - "isValid": { 615 - "type": "boolean", 616 - "description": "True if the verification passes validation, otherwise false." 617 - }, 618 - "createdAt": { 619 - "type": "string", 620 - "format": "datetime", 621 - "description": "Timestamp when the verification was created." 622 - } 623 - }, 624 - "description": "An individual verification for an associated subject." 625 - }, 626 - "profileAssociated": { 627 - "type": "object", 628 - "properties": { 629 - "chat": { 630 - "ref": "#profileAssociatedChat", 631 - "type": "ref" 632 - }, 633 - "lists": { 634 - "type": "integer" 635 - }, 636 - "labeler": { 637 - "type": "boolean" 638 - }, 639 - "feedgens": { 640 - "type": "integer" 641 - }, 642 - "starterPacks": { 643 - "type": "integer" 644 - }, 645 - "activitySubscription": { 646 - "ref": "#profileAssociatedActivitySubscription", 647 - "type": "ref" 648 - } 649 - } 650 - }, 651 - "verificationPrefs": { 652 - "type": "object", 653 - "required": [], 654 - "properties": { 655 - "hideBadges": { 656 - "type": "boolean", 657 - "default": false, 658 - "description": "Hide the blue check badges for verified accounts and trusted verifiers." 659 - } 660 - }, 661 - "description": "Preferences for how verified accounts appear in the app." 662 - }, 663 - "verificationState": { 664 - "type": "object", 665 - "required": [ 666 - "verifications", 667 - "verifiedStatus", 668 - "trustedVerifierStatus" 669 - ], 670 - "properties": { 671 - "verifications": { 672 - "type": "array", 673 - "items": { 674 - "ref": "#verificationView", 675 - "type": "ref" 676 - }, 677 - "description": "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included." 678 - }, 679 - "verifiedStatus": { 680 - "type": "string", 681 - "description": "The user's status as a verified account.", 682 - "knownValues": [ 683 - "valid", 684 - "invalid", 685 - "none" 686 - ] 687 - }, 688 - "trustedVerifierStatus": { 689 - "type": "string", 690 - "description": "The user's status as a trusted verifier.", 691 - "knownValues": [ 692 - "valid", 693 - "invalid", 694 - "none" 695 - ] 696 - } 697 - }, 698 - "description": "Represents the verification information about the user this object is attached to." 699 - }, 700 - "personalDetailsPref": { 701 - "type": "object", 702 - "properties": { 703 - "birthDate": { 704 - "type": "string", 705 - "format": "datetime", 706 - "description": "The birth date of account owner." 707 - } 708 - } 709 - }, 710 - "profileViewDetailed": { 711 - "type": "object", 712 - "required": [ 713 - "did", 714 - "handle" 715 - ], 716 - "properties": { 717 - "did": { 718 - "type": "string", 719 - "format": "did" 720 - }, 721 - "debug": { 722 - "type": "unknown", 723 - "description": "Debug information for internal development" 724 - }, 725 - "avatar": { 726 - "type": "string", 727 - "format": "uri" 728 - }, 729 - "banner": { 730 - "type": "string", 731 - "format": "uri" 732 - }, 733 - "handle": { 734 - "type": "string", 735 - "format": "handle" 736 - }, 737 - "labels": { 738 - "type": "array", 739 - "items": { 740 - "ref": "com.atproto.label.defs#label", 741 - "type": "ref" 742 - } 743 - }, 744 - "status": { 745 - "ref": "#statusView", 746 - "type": "ref" 747 - }, 748 - "viewer": { 749 - "ref": "#viewerState", 750 - "type": "ref" 751 - }, 752 - "website": { 753 - "type": "string", 754 - "format": "uri" 755 - }, 756 - "pronouns": { 757 - "type": "string" 758 - }, 759 - "createdAt": { 760 - "type": "string", 761 - "format": "datetime" 762 - }, 763 - "indexedAt": { 764 - "type": "string", 765 - "format": "datetime" 766 - }, 767 - "associated": { 768 - "ref": "#profileAssociated", 769 - "type": "ref" 770 - }, 771 - "pinnedPost": { 772 - "ref": "com.atproto.repo.strongRef", 773 - "type": "ref" 774 - }, 775 - "postsCount": { 776 - "type": "integer" 777 - }, 778 - "description": { 779 - "type": "string", 780 - "maxLength": 2560, 781 - "maxGraphemes": 256 782 - }, 783 - "displayName": { 784 - "type": "string", 785 - "maxLength": 640, 786 - "maxGraphemes": 64 787 - }, 788 - "followsCount": { 789 - "type": "integer" 790 - }, 791 - "verification": { 792 - "ref": "#verificationState", 793 - "type": "ref" 794 - }, 795 - "followersCount": { 796 - "type": "integer" 797 - }, 798 - "joinedViaStarterPack": { 799 - "ref": "app.bsky.graph.defs#starterPackViewBasic", 800 - "type": "ref" 801 - } 802 - } 803 - }, 804 - "bskyAppProgressGuide": { 805 - "type": "object", 806 - "required": [ 807 - "guide" 808 - ], 809 - "properties": { 810 - "guide": { 811 - "type": "string", 812 - "maxLength": 100 813 - } 814 - }, 815 - "description": "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress." 816 - }, 817 - "profileAssociatedChat": { 818 - "type": "object", 819 - "required": [ 820 - "allowIncoming" 821 - ], 822 - "properties": { 823 - "allowIncoming": { 824 - "type": "string", 825 - "knownValues": [ 826 - "all", 827 - "none", 828 - "following" 829 - ] 830 - } 831 - } 832 - }, 833 - "postInteractionSettingsPref": { 834 - "type": "object", 835 - "required": [], 836 - "properties": { 837 - "threadgateAllowRules": { 838 - "type": "array", 839 - "items": { 840 - "refs": [ 841 - "app.bsky.feed.threadgate#mentionRule", 842 - "app.bsky.feed.threadgate#followerRule", 843 - "app.bsky.feed.threadgate#followingRule", 844 - "app.bsky.feed.threadgate#listRule" 845 - ], 846 - "type": "union" 847 - }, 848 - "maxLength": 5, 849 - "description": "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply." 850 - }, 851 - "postgateEmbeddingRules": { 852 - "type": "array", 853 - "items": { 854 - "refs": [ 855 - "app.bsky.feed.postgate#disableRule" 856 - ], 857 - "type": "union" 858 - }, 859 - "maxLength": 5, 860 - "description": "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed." 861 - } 862 - }, 863 - "description": "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly." 864 - }, 865 - "profileAssociatedActivitySubscription": { 866 - "type": "object", 867 - "required": [ 868 - "allowSubscriptions" 869 - ], 870 - "properties": { 871 - "allowSubscriptions": { 872 - "type": "string", 873 - "knownValues": [ 874 - "followers", 875 - "mutuals", 876 - "none" 877 - ] 878 - } 879 - } 880 - } 881 - } 882 - }
-74
examples/02-following-feed-wip/lexicons/app/bsky/actor/profile.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.actor.profile", 4 - "defs": { 5 - "main": { 6 - "key": "literal:self", 7 - "type": "record", 8 - "record": { 9 - "type": "object", 10 - "properties": { 11 - "avatar": { 12 - "type": "blob", 13 - "accept": [ 14 - "image/png", 15 - "image/jpeg" 16 - ], 17 - "maxSize": 1000000, 18 - "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'" 19 - }, 20 - "banner": { 21 - "type": "blob", 22 - "accept": [ 23 - "image/png", 24 - "image/jpeg" 25 - ], 26 - "maxSize": 1000000, 27 - "description": "Larger horizontal image to display behind profile view." 28 - }, 29 - "labels": { 30 - "refs": [ 31 - "com.atproto.label.defs#selfLabels" 32 - ], 33 - "type": "union", 34 - "description": "Self-label values, specific to the Bluesky application, on the overall account." 35 - }, 36 - "website": { 37 - "type": "string", 38 - "format": "uri" 39 - }, 40 - "pronouns": { 41 - "type": "string", 42 - "maxLength": 200, 43 - "description": "Free-form pronouns text.", 44 - "maxGraphemes": 20 45 - }, 46 - "createdAt": { 47 - "type": "string", 48 - "format": "datetime" 49 - }, 50 - "pinnedPost": { 51 - "ref": "com.atproto.repo.strongRef", 52 - "type": "ref" 53 - }, 54 - "description": { 55 - "type": "string", 56 - "maxLength": 2560, 57 - "description": "Free-form profile description text.", 58 - "maxGraphemes": 256 59 - }, 60 - "displayName": { 61 - "type": "string", 62 - "maxLength": 640, 63 - "maxGraphemes": 64 64 - }, 65 - "joinedViaStarterPack": { 66 - "ref": "com.atproto.repo.strongRef", 67 - "type": "ref" 68 - } 69 - } 70 - }, 71 - "description": "A declaration of a Bluesky account profile." 72 - } 73 - } 74 - }
-24
examples/02-following-feed-wip/lexicons/app/bsky/embed/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.embed.defs", 4 - "defs": { 5 - "aspectRatio": { 6 - "type": "object", 7 - "required": [ 8 - "width", 9 - "height" 10 - ], 11 - "properties": { 12 - "width": { 13 - "type": "integer", 14 - "minimum": 1 15 - }, 16 - "height": { 17 - "type": "integer", 18 - "minimum": 1 19 - } 20 - }, 21 - "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit." 22 - } 23 - } 24 - }
-82
examples/02-following-feed-wip/lexicons/app/bsky/embed/external.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.embed.external", 4 - "defs": { 5 - "main": { 6 - "type": "object", 7 - "required": [ 8 - "external" 9 - ], 10 - "properties": { 11 - "external": { 12 - "ref": "#external", 13 - "type": "ref" 14 - } 15 - }, 16 - "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post)." 17 - }, 18 - "view": { 19 - "type": "object", 20 - "required": [ 21 - "external" 22 - ], 23 - "properties": { 24 - "external": { 25 - "ref": "#viewExternal", 26 - "type": "ref" 27 - } 28 - } 29 - }, 30 - "external": { 31 - "type": "object", 32 - "required": [ 33 - "uri", 34 - "title", 35 - "description" 36 - ], 37 - "properties": { 38 - "uri": { 39 - "type": "string", 40 - "format": "uri" 41 - }, 42 - "thumb": { 43 - "type": "blob", 44 - "accept": [ 45 - "image/*" 46 - ], 47 - "maxSize": 1000000 48 - }, 49 - "title": { 50 - "type": "string" 51 - }, 52 - "description": { 53 - "type": "string" 54 - } 55 - } 56 - }, 57 - "viewExternal": { 58 - "type": "object", 59 - "required": [ 60 - "uri", 61 - "title", 62 - "description" 63 - ], 64 - "properties": { 65 - "uri": { 66 - "type": "string", 67 - "format": "uri" 68 - }, 69 - "thumb": { 70 - "type": "string", 71 - "format": "uri" 72 - }, 73 - "title": { 74 - "type": "string" 75 - }, 76 - "description": { 77 - "type": "string" 78 - } 79 - } 80 - } 81 - } 82 - }
-91
examples/02-following-feed-wip/lexicons/app/bsky/embed/images.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.embed.images", 4 - "description": "A set of images embedded in a Bluesky record (eg, a post).", 5 - "defs": { 6 - "main": { 7 - "type": "object", 8 - "required": [ 9 - "images" 10 - ], 11 - "properties": { 12 - "images": { 13 - "type": "array", 14 - "items": { 15 - "ref": "#image", 16 - "type": "ref" 17 - }, 18 - "maxLength": 4 19 - } 20 - } 21 - }, 22 - "view": { 23 - "type": "object", 24 - "required": [ 25 - "images" 26 - ], 27 - "properties": { 28 - "images": { 29 - "type": "array", 30 - "items": { 31 - "ref": "#viewImage", 32 - "type": "ref" 33 - }, 34 - "maxLength": 4 35 - } 36 - } 37 - }, 38 - "image": { 39 - "type": "object", 40 - "required": [ 41 - "image", 42 - "alt" 43 - ], 44 - "properties": { 45 - "alt": { 46 - "type": "string", 47 - "description": "Alt text description of the image, for accessibility." 48 - }, 49 - "image": { 50 - "type": "blob", 51 - "accept": [ 52 - "image/*" 53 - ], 54 - "maxSize": 1000000 55 - }, 56 - "aspectRatio": { 57 - "ref": "app.bsky.embed.defs#aspectRatio", 58 - "type": "ref" 59 - } 60 - } 61 - }, 62 - "viewImage": { 63 - "type": "object", 64 - "required": [ 65 - "thumb", 66 - "fullsize", 67 - "alt" 68 - ], 69 - "properties": { 70 - "alt": { 71 - "type": "string", 72 - "description": "Alt text description of the image, for accessibility." 73 - }, 74 - "thumb": { 75 - "type": "string", 76 - "format": "uri", 77 - "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View." 78 - }, 79 - "fullsize": { 80 - "type": "string", 81 - "format": "uri", 82 - "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View." 83 - }, 84 - "aspectRatio": { 85 - "ref": "app.bsky.embed.defs#aspectRatio", 86 - "type": "ref" 87 - } 88 - } 89 - } 90 - } 91 - }
-160
examples/02-following-feed-wip/lexicons/app/bsky/embed/record.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.embed.record", 4 - "description": "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.", 5 - "defs": { 6 - "main": { 7 - "type": "object", 8 - "required": [ 9 - "record" 10 - ], 11 - "properties": { 12 - "record": { 13 - "ref": "com.atproto.repo.strongRef", 14 - "type": "ref" 15 - } 16 - } 17 - }, 18 - "view": { 19 - "type": "object", 20 - "required": [ 21 - "record" 22 - ], 23 - "properties": { 24 - "record": { 25 - "refs": [ 26 - "#viewRecord", 27 - "#viewNotFound", 28 - "#viewBlocked", 29 - "#viewDetached", 30 - "app.bsky.feed.defs#generatorView", 31 - "app.bsky.graph.defs#listView", 32 - "app.bsky.labeler.defs#labelerView", 33 - "app.bsky.graph.defs#starterPackViewBasic" 34 - ], 35 - "type": "union" 36 - } 37 - } 38 - }, 39 - "viewRecord": { 40 - "type": "object", 41 - "required": [ 42 - "uri", 43 - "cid", 44 - "author", 45 - "value", 46 - "indexedAt" 47 - ], 48 - "properties": { 49 - "cid": { 50 - "type": "string", 51 - "format": "cid" 52 - }, 53 - "uri": { 54 - "type": "string", 55 - "format": "at-uri" 56 - }, 57 - "value": { 58 - "type": "unknown", 59 - "description": "The record data itself." 60 - }, 61 - "author": { 62 - "ref": "app.bsky.actor.defs#profileViewBasic", 63 - "type": "ref" 64 - }, 65 - "embeds": { 66 - "type": "array", 67 - "items": { 68 - "refs": [ 69 - "app.bsky.embed.images#view", 70 - "app.bsky.embed.video#view", 71 - "app.bsky.embed.external#view", 72 - "app.bsky.embed.record#view", 73 - "app.bsky.embed.recordWithMedia#view" 74 - ], 75 - "type": "union" 76 - } 77 - }, 78 - "labels": { 79 - "type": "array", 80 - "items": { 81 - "ref": "com.atproto.label.defs#label", 82 - "type": "ref" 83 - } 84 - }, 85 - "indexedAt": { 86 - "type": "string", 87 - "format": "datetime" 88 - }, 89 - "likeCount": { 90 - "type": "integer" 91 - }, 92 - "quoteCount": { 93 - "type": "integer" 94 - }, 95 - "replyCount": { 96 - "type": "integer" 97 - }, 98 - "repostCount": { 99 - "type": "integer" 100 - } 101 - } 102 - }, 103 - "viewBlocked": { 104 - "type": "object", 105 - "required": [ 106 - "uri", 107 - "blocked", 108 - "author" 109 - ], 110 - "properties": { 111 - "uri": { 112 - "type": "string", 113 - "format": "at-uri" 114 - }, 115 - "author": { 116 - "ref": "app.bsky.feed.defs#blockedAuthor", 117 - "type": "ref" 118 - }, 119 - "blocked": { 120 - "type": "boolean", 121 - "const": true 122 - } 123 - } 124 - }, 125 - "viewDetached": { 126 - "type": "object", 127 - "required": [ 128 - "uri", 129 - "detached" 130 - ], 131 - "properties": { 132 - "uri": { 133 - "type": "string", 134 - "format": "at-uri" 135 - }, 136 - "detached": { 137 - "type": "boolean", 138 - "const": true 139 - } 140 - } 141 - }, 142 - "viewNotFound": { 143 - "type": "object", 144 - "required": [ 145 - "uri", 146 - "notFound" 147 - ], 148 - "properties": { 149 - "uri": { 150 - "type": "string", 151 - "format": "at-uri" 152 - }, 153 - "notFound": { 154 - "type": "boolean", 155 - "const": true 156 - } 157 - } 158 - } 159 - } 160 - }
-49
examples/02-following-feed-wip/lexicons/app/bsky/embed/recordWithMedia.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.embed.recordWithMedia", 4 - "description": "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", 5 - "defs": { 6 - "main": { 7 - "type": "object", 8 - "required": [ 9 - "record", 10 - "media" 11 - ], 12 - "properties": { 13 - "media": { 14 - "refs": [ 15 - "app.bsky.embed.images", 16 - "app.bsky.embed.video", 17 - "app.bsky.embed.external" 18 - ], 19 - "type": "union" 20 - }, 21 - "record": { 22 - "ref": "app.bsky.embed.record", 23 - "type": "ref" 24 - } 25 - } 26 - }, 27 - "view": { 28 - "type": "object", 29 - "required": [ 30 - "record", 31 - "media" 32 - ], 33 - "properties": { 34 - "media": { 35 - "refs": [ 36 - "app.bsky.embed.images#view", 37 - "app.bsky.embed.video#view", 38 - "app.bsky.embed.external#view" 39 - ], 40 - "type": "union" 41 - }, 42 - "record": { 43 - "ref": "app.bsky.embed.record#view", 44 - "type": "ref" 45 - } 46 - } 47 - } 48 - } 49 - }
-91
examples/02-following-feed-wip/lexicons/app/bsky/embed/video.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.embed.video", 4 - "description": "A video embedded in a Bluesky record (eg, a post).", 5 - "defs": { 6 - "main": { 7 - "type": "object", 8 - "required": [ 9 - "video" 10 - ], 11 - "properties": { 12 - "alt": { 13 - "type": "string", 14 - "maxLength": 10000, 15 - "description": "Alt text description of the video, for accessibility.", 16 - "maxGraphemes": 1000 17 - }, 18 - "video": { 19 - "type": "blob", 20 - "accept": [ 21 - "video/mp4" 22 - ], 23 - "maxSize": 100000000, 24 - "description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb." 25 - }, 26 - "captions": { 27 - "type": "array", 28 - "items": { 29 - "ref": "#caption", 30 - "type": "ref" 31 - }, 32 - "maxLength": 20 33 - }, 34 - "aspectRatio": { 35 - "ref": "app.bsky.embed.defs#aspectRatio", 36 - "type": "ref" 37 - } 38 - } 39 - }, 40 - "view": { 41 - "type": "object", 42 - "required": [ 43 - "cid", 44 - "playlist" 45 - ], 46 - "properties": { 47 - "alt": { 48 - "type": "string", 49 - "maxLength": 10000, 50 - "maxGraphemes": 1000 51 - }, 52 - "cid": { 53 - "type": "string", 54 - "format": "cid" 55 - }, 56 - "playlist": { 57 - "type": "string", 58 - "format": "uri" 59 - }, 60 - "thumbnail": { 61 - "type": "string", 62 - "format": "uri" 63 - }, 64 - "aspectRatio": { 65 - "ref": "app.bsky.embed.defs#aspectRatio", 66 - "type": "ref" 67 - } 68 - } 69 - }, 70 - "caption": { 71 - "type": "object", 72 - "required": [ 73 - "lang", 74 - "file" 75 - ], 76 - "properties": { 77 - "file": { 78 - "type": "blob", 79 - "accept": [ 80 - "text/vtt" 81 - ], 82 - "maxSize": 20000 83 - }, 84 - "lang": { 85 - "type": "string", 86 - "format": "language" 87 - } 88 - } 89 - } 90 - } 91 - }
-543
examples/02-following-feed-wip/lexicons/app/bsky/feed/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.feed.defs", 4 - "defs": { 5 - "postView": { 6 - "type": "object", 7 - "required": [ 8 - "uri", 9 - "cid", 10 - "author", 11 - "record", 12 - "indexedAt" 13 - ], 14 - "properties": { 15 - "cid": { 16 - "type": "string", 17 - "format": "cid" 18 - }, 19 - "uri": { 20 - "type": "string", 21 - "format": "at-uri" 22 - }, 23 - "debug": { 24 - "type": "unknown", 25 - "description": "Debug information for internal development" 26 - }, 27 - "embed": { 28 - "refs": [ 29 - "app.bsky.embed.images#view", 30 - "app.bsky.embed.video#view", 31 - "app.bsky.embed.external#view", 32 - "app.bsky.embed.record#view", 33 - "app.bsky.embed.recordWithMedia#view" 34 - ], 35 - "type": "union" 36 - }, 37 - "author": { 38 - "ref": "app.bsky.actor.defs#profileViewBasic", 39 - "type": "ref" 40 - }, 41 - "labels": { 42 - "type": "array", 43 - "items": { 44 - "ref": "com.atproto.label.defs#label", 45 - "type": "ref" 46 - } 47 - }, 48 - "record": { 49 - "type": "unknown" 50 - }, 51 - "viewer": { 52 - "ref": "#viewerState", 53 - "type": "ref" 54 - }, 55 - "indexedAt": { 56 - "type": "string", 57 - "format": "datetime" 58 - }, 59 - "likeCount": { 60 - "type": "integer" 61 - }, 62 - "quoteCount": { 63 - "type": "integer" 64 - }, 65 - "replyCount": { 66 - "type": "integer" 67 - }, 68 - "threadgate": { 69 - "ref": "#threadgateView", 70 - "type": "ref" 71 - }, 72 - "repostCount": { 73 - "type": "integer" 74 - }, 75 - "bookmarkCount": { 76 - "type": "integer" 77 - } 78 - } 79 - }, 80 - "replyRef": { 81 - "type": "object", 82 - "required": [ 83 - "root", 84 - "parent" 85 - ], 86 - "properties": { 87 - "root": { 88 - "refs": [ 89 - "#postView", 90 - "#notFoundPost", 91 - "#blockedPost" 92 - ], 93 - "type": "union" 94 - }, 95 - "parent": { 96 - "refs": [ 97 - "#postView", 98 - "#notFoundPost", 99 - "#blockedPost" 100 - ], 101 - "type": "union" 102 - }, 103 - "grandparentAuthor": { 104 - "ref": "app.bsky.actor.defs#profileViewBasic", 105 - "type": "ref", 106 - "description": "When parent is a reply to another post, this is the author of that post." 107 - } 108 - } 109 - }, 110 - "reasonPin": { 111 - "type": "object", 112 - "properties": {} 113 - }, 114 - "blockedPost": { 115 - "type": "object", 116 - "required": [ 117 - "uri", 118 - "blocked", 119 - "author" 120 - ], 121 - "properties": { 122 - "uri": { 123 - "type": "string", 124 - "format": "at-uri" 125 - }, 126 - "author": { 127 - "ref": "#blockedAuthor", 128 - "type": "ref" 129 - }, 130 - "blocked": { 131 - "type": "boolean", 132 - "const": true 133 - } 134 - } 135 - }, 136 - "interaction": { 137 - "type": "object", 138 - "properties": { 139 - "item": { 140 - "type": "string", 141 - "format": "at-uri" 142 - }, 143 - "event": { 144 - "type": "string", 145 - "knownValues": [ 146 - "app.bsky.feed.defs#requestLess", 147 - "app.bsky.feed.defs#requestMore", 148 - "app.bsky.feed.defs#clickthroughItem", 149 - "app.bsky.feed.defs#clickthroughAuthor", 150 - "app.bsky.feed.defs#clickthroughReposter", 151 - "app.bsky.feed.defs#clickthroughEmbed", 152 - "app.bsky.feed.defs#interactionSeen", 153 - "app.bsky.feed.defs#interactionLike", 154 - "app.bsky.feed.defs#interactionRepost", 155 - "app.bsky.feed.defs#interactionReply", 156 - "app.bsky.feed.defs#interactionQuote", 157 - "app.bsky.feed.defs#interactionShare" 158 - ] 159 - }, 160 - "reqId": { 161 - "type": "string", 162 - "maxLength": 100, 163 - "description": "Unique identifier per request that may be passed back alongside interactions." 164 - }, 165 - "feedContext": { 166 - "type": "string", 167 - "maxLength": 2000, 168 - "description": "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton." 169 - } 170 - } 171 - }, 172 - "requestLess": { 173 - "type": "token", 174 - "description": "Request that less content like the given feed item be shown in the feed" 175 - }, 176 - "requestMore": { 177 - "type": "token", 178 - "description": "Request that more content like the given feed item be shown in the feed" 179 - }, 180 - "viewerState": { 181 - "type": "object", 182 - "properties": { 183 - "like": { 184 - "type": "string", 185 - "format": "at-uri" 186 - }, 187 - "pinned": { 188 - "type": "boolean" 189 - }, 190 - "repost": { 191 - "type": "string", 192 - "format": "at-uri" 193 - }, 194 - "bookmarked": { 195 - "type": "boolean" 196 - }, 197 - "threadMuted": { 198 - "type": "boolean" 199 - }, 200 - "replyDisabled": { 201 - "type": "boolean" 202 - }, 203 - "embeddingDisabled": { 204 - "type": "boolean" 205 - } 206 - }, 207 - "description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests." 208 - }, 209 - "feedViewPost": { 210 - "type": "object", 211 - "required": [ 212 - "post" 213 - ], 214 - "properties": { 215 - "post": { 216 - "ref": "#postView", 217 - "type": "ref" 218 - }, 219 - "reply": { 220 - "ref": "#replyRef", 221 - "type": "ref" 222 - }, 223 - "reqId": { 224 - "type": "string", 225 - "maxLength": 100, 226 - "description": "Unique identifier per request that may be passed back alongside interactions." 227 - }, 228 - "reason": { 229 - "refs": [ 230 - "#reasonRepost", 231 - "#reasonPin" 232 - ], 233 - "type": "union" 234 - }, 235 - "feedContext": { 236 - "type": "string", 237 - "maxLength": 2000, 238 - "description": "Context provided by feed generator that may be passed back alongside interactions." 239 - } 240 - } 241 - }, 242 - "notFoundPost": { 243 - "type": "object", 244 - "required": [ 245 - "uri", 246 - "notFound" 247 - ], 248 - "properties": { 249 - "uri": { 250 - "type": "string", 251 - "format": "at-uri" 252 - }, 253 - "notFound": { 254 - "type": "boolean", 255 - "const": true 256 - } 257 - } 258 - }, 259 - "reasonRepost": { 260 - "type": "object", 261 - "required": [ 262 - "by", 263 - "indexedAt" 264 - ], 265 - "properties": { 266 - "by": { 267 - "ref": "app.bsky.actor.defs#profileViewBasic", 268 - "type": "ref" 269 - }, 270 - "cid": { 271 - "type": "string", 272 - "format": "cid" 273 - }, 274 - "uri": { 275 - "type": "string", 276 - "format": "at-uri" 277 - }, 278 - "indexedAt": { 279 - "type": "string", 280 - "format": "datetime" 281 - } 282 - } 283 - }, 284 - "blockedAuthor": { 285 - "type": "object", 286 - "required": [ 287 - "did" 288 - ], 289 - "properties": { 290 - "did": { 291 - "type": "string", 292 - "format": "did" 293 - }, 294 - "viewer": { 295 - "ref": "app.bsky.actor.defs#viewerState", 296 - "type": "ref" 297 - } 298 - } 299 - }, 300 - "generatorView": { 301 - "type": "object", 302 - "required": [ 303 - "uri", 304 - "cid", 305 - "did", 306 - "creator", 307 - "displayName", 308 - "indexedAt" 309 - ], 310 - "properties": { 311 - "cid": { 312 - "type": "string", 313 - "format": "cid" 314 - }, 315 - "did": { 316 - "type": "string", 317 - "format": "did" 318 - }, 319 - "uri": { 320 - "type": "string", 321 - "format": "at-uri" 322 - }, 323 - "avatar": { 324 - "type": "string", 325 - "format": "uri" 326 - }, 327 - "labels": { 328 - "type": "array", 329 - "items": { 330 - "ref": "com.atproto.label.defs#label", 331 - "type": "ref" 332 - } 333 - }, 334 - "viewer": { 335 - "ref": "#generatorViewerState", 336 - "type": "ref" 337 - }, 338 - "creator": { 339 - "ref": "app.bsky.actor.defs#profileView", 340 - "type": "ref" 341 - }, 342 - "indexedAt": { 343 - "type": "string", 344 - "format": "datetime" 345 - }, 346 - "likeCount": { 347 - "type": "integer", 348 - "minimum": 0 349 - }, 350 - "contentMode": { 351 - "type": "string", 352 - "knownValues": [ 353 - "app.bsky.feed.defs#contentModeUnspecified", 354 - "app.bsky.feed.defs#contentModeVideo" 355 - ] 356 - }, 357 - "description": { 358 - "type": "string", 359 - "maxLength": 3000, 360 - "maxGraphemes": 300 361 - }, 362 - "displayName": { 363 - "type": "string" 364 - }, 365 - "descriptionFacets": { 366 - "type": "array", 367 - "items": { 368 - "ref": "app.bsky.richtext.facet", 369 - "type": "ref" 370 - } 371 - }, 372 - "acceptsInteractions": { 373 - "type": "boolean" 374 - } 375 - } 376 - }, 377 - "threadContext": { 378 - "type": "object", 379 - "properties": { 380 - "rootAuthorLike": { 381 - "type": "string", 382 - "format": "at-uri" 383 - } 384 - }, 385 - "description": "Metadata about this post within the context of the thread it is in." 386 - }, 387 - "threadViewPost": { 388 - "type": "object", 389 - "required": [ 390 - "post" 391 - ], 392 - "properties": { 393 - "post": { 394 - "ref": "#postView", 395 - "type": "ref" 396 - }, 397 - "parent": { 398 - "refs": [ 399 - "#threadViewPost", 400 - "#notFoundPost", 401 - "#blockedPost" 402 - ], 403 - "type": "union" 404 - }, 405 - "replies": { 406 - "type": "array", 407 - "items": { 408 - "refs": [ 409 - "#threadViewPost", 410 - "#notFoundPost", 411 - "#blockedPost" 412 - ], 413 - "type": "union" 414 - } 415 - }, 416 - "threadContext": { 417 - "ref": "#threadContext", 418 - "type": "ref" 419 - } 420 - } 421 - }, 422 - "threadgateView": { 423 - "type": "object", 424 - "properties": { 425 - "cid": { 426 - "type": "string", 427 - "format": "cid" 428 - }, 429 - "uri": { 430 - "type": "string", 431 - "format": "at-uri" 432 - }, 433 - "lists": { 434 - "type": "array", 435 - "items": { 436 - "ref": "app.bsky.graph.defs#listViewBasic", 437 - "type": "ref" 438 - } 439 - }, 440 - "record": { 441 - "type": "unknown" 442 - } 443 - } 444 - }, 445 - "interactionLike": { 446 - "type": "token", 447 - "description": "User liked the feed item" 448 - }, 449 - "interactionSeen": { 450 - "type": "token", 451 - "description": "Feed item was seen by user" 452 - }, 453 - "clickthroughItem": { 454 - "type": "token", 455 - "description": "User clicked through to the feed item" 456 - }, 457 - "contentModeVideo": { 458 - "type": "token", 459 - "description": "Declares the feed generator returns posts containing app.bsky.embed.video embeds." 460 - }, 461 - "interactionQuote": { 462 - "type": "token", 463 - "description": "User quoted the feed item" 464 - }, 465 - "interactionReply": { 466 - "type": "token", 467 - "description": "User replied to the feed item" 468 - }, 469 - "interactionShare": { 470 - "type": "token", 471 - "description": "User shared the feed item" 472 - }, 473 - "skeletonFeedPost": { 474 - "type": "object", 475 - "required": [ 476 - "post" 477 - ], 478 - "properties": { 479 - "post": { 480 - "type": "string", 481 - "format": "at-uri" 482 - }, 483 - "reason": { 484 - "refs": [ 485 - "#skeletonReasonRepost", 486 - "#skeletonReasonPin" 487 - ], 488 - "type": "union" 489 - }, 490 - "feedContext": { 491 - "type": "string", 492 - "maxLength": 2000, 493 - "description": "Context that will be passed through to client and may be passed to feed generator back alongside interactions." 494 - } 495 - } 496 - }, 497 - "clickthroughEmbed": { 498 - "type": "token", 499 - "description": "User clicked through to the embedded content of the feed item" 500 - }, 501 - "interactionRepost": { 502 - "type": "token", 503 - "description": "User reposted the feed item" 504 - }, 505 - "skeletonReasonPin": { 506 - "type": "object", 507 - "properties": {} 508 - }, 509 - "clickthroughAuthor": { 510 - "type": "token", 511 - "description": "User clicked through to the author of the feed item" 512 - }, 513 - "clickthroughReposter": { 514 - "type": "token", 515 - "description": "User clicked through to the reposter of the feed item" 516 - }, 517 - "generatorViewerState": { 518 - "type": "object", 519 - "properties": { 520 - "like": { 521 - "type": "string", 522 - "format": "at-uri" 523 - } 524 - } 525 - }, 526 - "skeletonReasonRepost": { 527 - "type": "object", 528 - "required": [ 529 - "repost" 530 - ], 531 - "properties": { 532 - "repost": { 533 - "type": "string", 534 - "format": "at-uri" 535 - } 536 - } 537 - }, 538 - "contentModeUnspecified": { 539 - "type": "token", 540 - "description": "Declares the feed generator returns any types of posts." 541 - } 542 - } 543 - }
-144
examples/02-following-feed-wip/lexicons/app/bsky/feed/post.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.feed.post", 4 - "defs": { 5 - "main": { 6 - "key": "tid", 7 - "type": "record", 8 - "record": { 9 - "type": "object", 10 - "required": [ 11 - "text", 12 - "createdAt" 13 - ], 14 - "properties": { 15 - "tags": { 16 - "type": "array", 17 - "items": { 18 - "type": "string", 19 - "maxLength": 640, 20 - "maxGraphemes": 64 21 - }, 22 - "maxLength": 8, 23 - "description": "Additional hashtags, in addition to any included in post text and facets." 24 - }, 25 - "text": { 26 - "type": "string", 27 - "maxLength": 3000, 28 - "description": "The primary post content. May be an empty string, if there are embeds.", 29 - "maxGraphemes": 300 30 - }, 31 - "embed": { 32 - "refs": [ 33 - "app.bsky.embed.images", 34 - "app.bsky.embed.video", 35 - "app.bsky.embed.external", 36 - "app.bsky.embed.record", 37 - "app.bsky.embed.recordWithMedia" 38 - ], 39 - "type": "union" 40 - }, 41 - "langs": { 42 - "type": "array", 43 - "items": { 44 - "type": "string", 45 - "format": "language" 46 - }, 47 - "maxLength": 3, 48 - "description": "Indicates human language of post primary text content." 49 - }, 50 - "reply": { 51 - "ref": "#replyRef", 52 - "type": "ref" 53 - }, 54 - "facets": { 55 - "type": "array", 56 - "items": { 57 - "ref": "app.bsky.richtext.facet", 58 - "type": "ref" 59 - }, 60 - "description": "Annotations of text (mentions, URLs, hashtags, etc)" 61 - }, 62 - "labels": { 63 - "refs": [ 64 - "com.atproto.label.defs#selfLabels" 65 - ], 66 - "type": "union", 67 - "description": "Self-label values for this post. Effectively content warnings." 68 - }, 69 - "entities": { 70 - "type": "array", 71 - "items": { 72 - "ref": "#entity", 73 - "type": "ref" 74 - }, 75 - "description": "DEPRECATED: replaced by app.bsky.richtext.facet." 76 - }, 77 - "createdAt": { 78 - "type": "string", 79 - "format": "datetime", 80 - "description": "Client-declared timestamp when this post was originally created." 81 - } 82 - } 83 - }, 84 - "description": "Record containing a Bluesky post." 85 - }, 86 - "entity": { 87 - "type": "object", 88 - "required": [ 89 - "index", 90 - "type", 91 - "value" 92 - ], 93 - "properties": { 94 - "type": { 95 - "type": "string", 96 - "description": "Expected values are 'mention' and 'link'." 97 - }, 98 - "index": { 99 - "ref": "#textSlice", 100 - "type": "ref" 101 - }, 102 - "value": { 103 - "type": "string" 104 - } 105 - }, 106 - "description": "Deprecated: use facets instead." 107 - }, 108 - "replyRef": { 109 - "type": "object", 110 - "required": [ 111 - "root", 112 - "parent" 113 - ], 114 - "properties": { 115 - "root": { 116 - "ref": "com.atproto.repo.strongRef", 117 - "type": "ref" 118 - }, 119 - "parent": { 120 - "ref": "com.atproto.repo.strongRef", 121 - "type": "ref" 122 - } 123 - } 124 - }, 125 - "textSlice": { 126 - "type": "object", 127 - "required": [ 128 - "start", 129 - "end" 130 - ], 131 - "properties": { 132 - "end": { 133 - "type": "integer", 134 - "minimum": 0 135 - }, 136 - "start": { 137 - "type": "integer", 138 - "minimum": 0 139 - } 140 - }, 141 - "description": "Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings." 142 - } 143 - } 144 - }
-54
examples/02-following-feed-wip/lexicons/app/bsky/feed/postgate.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.feed.postgate", 4 - "defs": { 5 - "main": { 6 - "key": "tid", 7 - "type": "record", 8 - "record": { 9 - "type": "object", 10 - "required": [ 11 - "post", 12 - "createdAt" 13 - ], 14 - "properties": { 15 - "post": { 16 - "type": "string", 17 - "format": "at-uri", 18 - "description": "Reference (AT-URI) to the post record." 19 - }, 20 - "createdAt": { 21 - "type": "string", 22 - "format": "datetime" 23 - }, 24 - "embeddingRules": { 25 - "type": "array", 26 - "items": { 27 - "refs": [ 28 - "#disableRule" 29 - ], 30 - "type": "union" 31 - }, 32 - "maxLength": 5, 33 - "description": "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed." 34 - }, 35 - "detachedEmbeddingUris": { 36 - "type": "array", 37 - "items": { 38 - "type": "string", 39 - "format": "at-uri" 40 - }, 41 - "maxLength": 50, 42 - "description": "List of AT-URIs embedding this post that the author has detached from." 43 - } 44 - } 45 - }, 46 - "description": "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository." 47 - }, 48 - "disableRule": { 49 - "type": "object", 50 - "properties": {}, 51 - "description": "Disables embedding of this post." 52 - } 53 - } 54 - }
-80
examples/02-following-feed-wip/lexicons/app/bsky/feed/threadgate.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.feed.threadgate", 4 - "defs": { 5 - "main": { 6 - "key": "tid", 7 - "type": "record", 8 - "record": { 9 - "type": "object", 10 - "required": [ 11 - "post", 12 - "createdAt" 13 - ], 14 - "properties": { 15 - "post": { 16 - "type": "string", 17 - "format": "at-uri", 18 - "description": "Reference (AT-URI) to the post record." 19 - }, 20 - "allow": { 21 - "type": "array", 22 - "items": { 23 - "refs": [ 24 - "#mentionRule", 25 - "#followerRule", 26 - "#followingRule", 27 - "#listRule" 28 - ], 29 - "type": "union" 30 - }, 31 - "maxLength": 5, 32 - "description": "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply." 33 - }, 34 - "createdAt": { 35 - "type": "string", 36 - "format": "datetime" 37 - }, 38 - "hiddenReplies": { 39 - "type": "array", 40 - "items": { 41 - "type": "string", 42 - "format": "at-uri" 43 - }, 44 - "maxLength": 300, 45 - "description": "List of hidden reply URIs." 46 - } 47 - } 48 - }, 49 - "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository." 50 - }, 51 - "listRule": { 52 - "type": "object", 53 - "required": [ 54 - "list" 55 - ], 56 - "properties": { 57 - "list": { 58 - "type": "string", 59 - "format": "at-uri" 60 - } 61 - }, 62 - "description": "Allow replies from actors on a list." 63 - }, 64 - "mentionRule": { 65 - "type": "object", 66 - "properties": {}, 67 - "description": "Allow replies from actors mentioned in your post." 68 - }, 69 - "followerRule": { 70 - "type": "object", 71 - "properties": {}, 72 - "description": "Allow replies from actors who follow you." 73 - }, 74 - "followingRule": { 75 - "type": "object", 76 - "properties": {}, 77 - "description": "Allow replies from actors you follow." 78 - } 79 - } 80 - }
-332
examples/02-following-feed-wip/lexicons/app/bsky/graph/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.graph.defs", 4 - "defs": { 5 - "modlist": { 6 - "type": "token", 7 - "description": "A list of actors to apply an aggregate moderation action (mute/block) on." 8 - }, 9 - "listView": { 10 - "type": "object", 11 - "required": [ 12 - "uri", 13 - "cid", 14 - "creator", 15 - "name", 16 - "purpose", 17 - "indexedAt" 18 - ], 19 - "properties": { 20 - "cid": { 21 - "type": "string", 22 - "format": "cid" 23 - }, 24 - "uri": { 25 - "type": "string", 26 - "format": "at-uri" 27 - }, 28 - "name": { 29 - "type": "string", 30 - "maxLength": 64, 31 - "minLength": 1 32 - }, 33 - "avatar": { 34 - "type": "string", 35 - "format": "uri" 36 - }, 37 - "labels": { 38 - "type": "array", 39 - "items": { 40 - "ref": "com.atproto.label.defs#label", 41 - "type": "ref" 42 - } 43 - }, 44 - "viewer": { 45 - "ref": "#listViewerState", 46 - "type": "ref" 47 - }, 48 - "creator": { 49 - "ref": "app.bsky.actor.defs#profileView", 50 - "type": "ref" 51 - }, 52 - "purpose": { 53 - "ref": "#listPurpose", 54 - "type": "ref" 55 - }, 56 - "indexedAt": { 57 - "type": "string", 58 - "format": "datetime" 59 - }, 60 - "description": { 61 - "type": "string", 62 - "maxLength": 3000, 63 - "maxGraphemes": 300 64 - }, 65 - "listItemCount": { 66 - "type": "integer", 67 - "minimum": 0 68 - }, 69 - "descriptionFacets": { 70 - "type": "array", 71 - "items": { 72 - "ref": "app.bsky.richtext.facet", 73 - "type": "ref" 74 - } 75 - } 76 - } 77 - }, 78 - "curatelist": { 79 - "type": "token", 80 - "description": "A list of actors used for curation purposes such as list feeds or interaction gating." 81 - }, 82 - "listPurpose": { 83 - "type": "string", 84 - "knownValues": [ 85 - "app.bsky.graph.defs#modlist", 86 - "app.bsky.graph.defs#curatelist", 87 - "app.bsky.graph.defs#referencelist" 88 - ] 89 - }, 90 - "listItemView": { 91 - "type": "object", 92 - "required": [ 93 - "uri", 94 - "subject" 95 - ], 96 - "properties": { 97 - "uri": { 98 - "type": "string", 99 - "format": "at-uri" 100 - }, 101 - "subject": { 102 - "ref": "app.bsky.actor.defs#profileView", 103 - "type": "ref" 104 - } 105 - } 106 - }, 107 - "relationship": { 108 - "type": "object", 109 - "required": [ 110 - "did" 111 - ], 112 - "properties": { 113 - "did": { 114 - "type": "string", 115 - "format": "did" 116 - }, 117 - "following": { 118 - "type": "string", 119 - "format": "at-uri", 120 - "description": "if the actor follows this DID, this is the AT-URI of the follow record" 121 - }, 122 - "followedBy": { 123 - "type": "string", 124 - "format": "at-uri", 125 - "description": "if the actor is followed by this DID, contains the AT-URI of the follow record" 126 - } 127 - }, 128 - "description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)" 129 - }, 130 - "listViewBasic": { 131 - "type": "object", 132 - "required": [ 133 - "uri", 134 - "cid", 135 - "name", 136 - "purpose" 137 - ], 138 - "properties": { 139 - "cid": { 140 - "type": "string", 141 - "format": "cid" 142 - }, 143 - "uri": { 144 - "type": "string", 145 - "format": "at-uri" 146 - }, 147 - "name": { 148 - "type": "string", 149 - "maxLength": 64, 150 - "minLength": 1 151 - }, 152 - "avatar": { 153 - "type": "string", 154 - "format": "uri" 155 - }, 156 - "labels": { 157 - "type": "array", 158 - "items": { 159 - "ref": "com.atproto.label.defs#label", 160 - "type": "ref" 161 - } 162 - }, 163 - "viewer": { 164 - "ref": "#listViewerState", 165 - "type": "ref" 166 - }, 167 - "purpose": { 168 - "ref": "#listPurpose", 169 - "type": "ref" 170 - }, 171 - "indexedAt": { 172 - "type": "string", 173 - "format": "datetime" 174 - }, 175 - "listItemCount": { 176 - "type": "integer", 177 - "minimum": 0 178 - } 179 - } 180 - }, 181 - "notFoundActor": { 182 - "type": "object", 183 - "required": [ 184 - "actor", 185 - "notFound" 186 - ], 187 - "properties": { 188 - "actor": { 189 - "type": "string", 190 - "format": "at-identifier" 191 - }, 192 - "notFound": { 193 - "type": "boolean", 194 - "const": true 195 - } 196 - }, 197 - "description": "indicates that a handle or DID could not be resolved" 198 - }, 199 - "referencelist": { 200 - "type": "token", 201 - "description": "A list of actors used for only for reference purposes such as within a starter pack." 202 - }, 203 - "listViewerState": { 204 - "type": "object", 205 - "properties": { 206 - "muted": { 207 - "type": "boolean" 208 - }, 209 - "blocked": { 210 - "type": "string", 211 - "format": "at-uri" 212 - } 213 - } 214 - }, 215 - "starterPackView": { 216 - "type": "object", 217 - "required": [ 218 - "uri", 219 - "cid", 220 - "record", 221 - "creator", 222 - "indexedAt" 223 - ], 224 - "properties": { 225 - "cid": { 226 - "type": "string", 227 - "format": "cid" 228 - }, 229 - "uri": { 230 - "type": "string", 231 - "format": "at-uri" 232 - }, 233 - "list": { 234 - "ref": "#listViewBasic", 235 - "type": "ref" 236 - }, 237 - "feeds": { 238 - "type": "array", 239 - "items": { 240 - "ref": "app.bsky.feed.defs#generatorView", 241 - "type": "ref" 242 - }, 243 - "maxLength": 3 244 - }, 245 - "labels": { 246 - "type": "array", 247 - "items": { 248 - "ref": "com.atproto.label.defs#label", 249 - "type": "ref" 250 - } 251 - }, 252 - "record": { 253 - "type": "unknown" 254 - }, 255 - "creator": { 256 - "ref": "app.bsky.actor.defs#profileViewBasic", 257 - "type": "ref" 258 - }, 259 - "indexedAt": { 260 - "type": "string", 261 - "format": "datetime" 262 - }, 263 - "joinedWeekCount": { 264 - "type": "integer", 265 - "minimum": 0 266 - }, 267 - "listItemsSample": { 268 - "type": "array", 269 - "items": { 270 - "ref": "#listItemView", 271 - "type": "ref" 272 - }, 273 - "maxLength": 12 274 - }, 275 - "joinedAllTimeCount": { 276 - "type": "integer", 277 - "minimum": 0 278 - } 279 - } 280 - }, 281 - "starterPackViewBasic": { 282 - "type": "object", 283 - "required": [ 284 - "uri", 285 - "cid", 286 - "record", 287 - "creator", 288 - "indexedAt" 289 - ], 290 - "properties": { 291 - "cid": { 292 - "type": "string", 293 - "format": "cid" 294 - }, 295 - "uri": { 296 - "type": "string", 297 - "format": "at-uri" 298 - }, 299 - "labels": { 300 - "type": "array", 301 - "items": { 302 - "ref": "com.atproto.label.defs#label", 303 - "type": "ref" 304 - } 305 - }, 306 - "record": { 307 - "type": "unknown" 308 - }, 309 - "creator": { 310 - "ref": "app.bsky.actor.defs#profileViewBasic", 311 - "type": "ref" 312 - }, 313 - "indexedAt": { 314 - "type": "string", 315 - "format": "datetime" 316 - }, 317 - "listItemCount": { 318 - "type": "integer", 319 - "minimum": 0 320 - }, 321 - "joinedWeekCount": { 322 - "type": "integer", 323 - "minimum": 0 324 - }, 325 - "joinedAllTimeCount": { 326 - "type": "integer", 327 - "minimum": 0 328 - } 329 - } 330 - } 331 - } 332 - }
-32
examples/02-following-feed-wip/lexicons/app/bsky/graph/follow.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.graph.follow", 4 - "defs": { 5 - "main": { 6 - "key": "tid", 7 - "type": "record", 8 - "record": { 9 - "type": "object", 10 - "required": [ 11 - "subject", 12 - "createdAt" 13 - ], 14 - "properties": { 15 - "via": { 16 - "ref": "com.atproto.repo.strongRef", 17 - "type": "ref" 18 - }, 19 - "subject": { 20 - "type": "string", 21 - "format": "did" 22 - }, 23 - "createdAt": { 24 - "type": "string", 25 - "format": "datetime" 26 - } 27 - } 28 - }, 29 - "description": "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView." 30 - } 31 - } 32 - }
-152
examples/02-following-feed-wip/lexicons/app/bsky/labeler/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.labeler.defs", 4 - "defs": { 5 - "labelerView": { 6 - "type": "object", 7 - "required": [ 8 - "uri", 9 - "cid", 10 - "creator", 11 - "indexedAt" 12 - ], 13 - "properties": { 14 - "cid": { 15 - "type": "string", 16 - "format": "cid" 17 - }, 18 - "uri": { 19 - "type": "string", 20 - "format": "at-uri" 21 - }, 22 - "labels": { 23 - "type": "array", 24 - "items": { 25 - "ref": "com.atproto.label.defs#label", 26 - "type": "ref" 27 - } 28 - }, 29 - "viewer": { 30 - "ref": "#labelerViewerState", 31 - "type": "ref" 32 - }, 33 - "creator": { 34 - "ref": "app.bsky.actor.defs#profileView", 35 - "type": "ref" 36 - }, 37 - "indexedAt": { 38 - "type": "string", 39 - "format": "datetime" 40 - }, 41 - "likeCount": { 42 - "type": "integer", 43 - "minimum": 0 44 - } 45 - } 46 - }, 47 - "labelerPolicies": { 48 - "type": "object", 49 - "required": [ 50 - "labelValues" 51 - ], 52 - "properties": { 53 - "labelValues": { 54 - "type": "array", 55 - "items": { 56 - "ref": "com.atproto.label.defs#labelValue", 57 - "type": "ref" 58 - }, 59 - "description": "The label values which this labeler publishes. May include global or custom labels." 60 - }, 61 - "labelValueDefinitions": { 62 - "type": "array", 63 - "items": { 64 - "ref": "com.atproto.label.defs#labelValueDefinition", 65 - "type": "ref" 66 - }, 67 - "description": "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler." 68 - } 69 - } 70 - }, 71 - "labelerViewerState": { 72 - "type": "object", 73 - "properties": { 74 - "like": { 75 - "type": "string", 76 - "format": "at-uri" 77 - } 78 - } 79 - }, 80 - "labelerViewDetailed": { 81 - "type": "object", 82 - "required": [ 83 - "uri", 84 - "cid", 85 - "creator", 86 - "policies", 87 - "indexedAt" 88 - ], 89 - "properties": { 90 - "cid": { 91 - "type": "string", 92 - "format": "cid" 93 - }, 94 - "uri": { 95 - "type": "string", 96 - "format": "at-uri" 97 - }, 98 - "labels": { 99 - "type": "array", 100 - "items": { 101 - "ref": "com.atproto.label.defs#label", 102 - "type": "ref" 103 - } 104 - }, 105 - "viewer": { 106 - "ref": "#labelerViewerState", 107 - "type": "ref" 108 - }, 109 - "creator": { 110 - "ref": "app.bsky.actor.defs#profileView", 111 - "type": "ref" 112 - }, 113 - "policies": { 114 - "ref": "app.bsky.labeler.defs#labelerPolicies", 115 - "type": "ref" 116 - }, 117 - "indexedAt": { 118 - "type": "string", 119 - "format": "datetime" 120 - }, 121 - "likeCount": { 122 - "type": "integer", 123 - "minimum": 0 124 - }, 125 - "reasonTypes": { 126 - "type": "array", 127 - "items": { 128 - "ref": "com.atproto.moderation.defs#reasonType", 129 - "type": "ref" 130 - }, 131 - "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed." 132 - }, 133 - "subjectTypes": { 134 - "type": "array", 135 - "items": { 136 - "ref": "com.atproto.moderation.defs#subjectType", 137 - "type": "ref" 138 - }, 139 - "description": "The set of subject types (account, record, etc) this service accepts reports on." 140 - }, 141 - "subjectCollections": { 142 - "type": "array", 143 - "items": { 144 - "type": "string", 145 - "format": "nsid" 146 - }, 147 - "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type." 148 - } 149 - } 150 - } 151 - } 152 - }
-172
examples/02-following-feed-wip/lexicons/app/bsky/notification/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.notification.defs", 4 - "defs": { 5 - "preference": { 6 - "type": "object", 7 - "required": [ 8 - "list", 9 - "push" 10 - ], 11 - "properties": { 12 - "list": { 13 - "type": "boolean" 14 - }, 15 - "push": { 16 - "type": "boolean" 17 - } 18 - } 19 - }, 20 - "preferences": { 21 - "type": "object", 22 - "required": [ 23 - "chat", 24 - "follow", 25 - "like", 26 - "likeViaRepost", 27 - "mention", 28 - "quote", 29 - "reply", 30 - "repost", 31 - "repostViaRepost", 32 - "starterpackJoined", 33 - "subscribedPost", 34 - "unverified", 35 - "verified" 36 - ], 37 - "properties": { 38 - "chat": { 39 - "ref": "#chatPreference", 40 - "type": "ref" 41 - }, 42 - "like": { 43 - "ref": "#filterablePreference", 44 - "type": "ref" 45 - }, 46 - "quote": { 47 - "ref": "#filterablePreference", 48 - "type": "ref" 49 - }, 50 - "reply": { 51 - "ref": "#filterablePreference", 52 - "type": "ref" 53 - }, 54 - "follow": { 55 - "ref": "#filterablePreference", 56 - "type": "ref" 57 - }, 58 - "repost": { 59 - "ref": "#filterablePreference", 60 - "type": "ref" 61 - }, 62 - "mention": { 63 - "ref": "#filterablePreference", 64 - "type": "ref" 65 - }, 66 - "verified": { 67 - "ref": "#preference", 68 - "type": "ref" 69 - }, 70 - "unverified": { 71 - "ref": "#preference", 72 - "type": "ref" 73 - }, 74 - "likeViaRepost": { 75 - "ref": "#filterablePreference", 76 - "type": "ref" 77 - }, 78 - "subscribedPost": { 79 - "ref": "#preference", 80 - "type": "ref" 81 - }, 82 - "repostViaRepost": { 83 - "ref": "#filterablePreference", 84 - "type": "ref" 85 - }, 86 - "starterpackJoined": { 87 - "ref": "#preference", 88 - "type": "ref" 89 - } 90 - } 91 - }, 92 - "recordDeleted": { 93 - "type": "object", 94 - "properties": {} 95 - }, 96 - "chatPreference": { 97 - "type": "object", 98 - "required": [ 99 - "include", 100 - "push" 101 - ], 102 - "properties": { 103 - "push": { 104 - "type": "boolean" 105 - }, 106 - "include": { 107 - "type": "string", 108 - "knownValues": [ 109 - "all", 110 - "accepted" 111 - ] 112 - } 113 - } 114 - }, 115 - "activitySubscription": { 116 - "type": "object", 117 - "required": [ 118 - "post", 119 - "reply" 120 - ], 121 - "properties": { 122 - "post": { 123 - "type": "boolean" 124 - }, 125 - "reply": { 126 - "type": "boolean" 127 - } 128 - } 129 - }, 130 - "filterablePreference": { 131 - "type": "object", 132 - "required": [ 133 - "include", 134 - "list", 135 - "push" 136 - ], 137 - "properties": { 138 - "list": { 139 - "type": "boolean" 140 - }, 141 - "push": { 142 - "type": "boolean" 143 - }, 144 - "include": { 145 - "type": "string", 146 - "knownValues": [ 147 - "all", 148 - "follows" 149 - ] 150 - } 151 - } 152 - }, 153 - "subjectActivitySubscription": { 154 - "type": "object", 155 - "required": [ 156 - "subject", 157 - "activitySubscription" 158 - ], 159 - "properties": { 160 - "subject": { 161 - "type": "string", 162 - "format": "did" 163 - }, 164 - "activitySubscription": { 165 - "ref": "#activitySubscription", 166 - "type": "ref" 167 - } 168 - }, 169 - "description": "Object used to store activity subscription data in stash." 170 - } 171 - } 172 - }
-89
examples/02-following-feed-wip/lexicons/app/bsky/richtext/facet.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "app.bsky.richtext.facet", 4 - "defs": { 5 - "tag": { 6 - "type": "object", 7 - "required": [ 8 - "tag" 9 - ], 10 - "properties": { 11 - "tag": { 12 - "type": "string", 13 - "maxLength": 640, 14 - "maxGraphemes": 64 15 - } 16 - }, 17 - "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags')." 18 - }, 19 - "link": { 20 - "type": "object", 21 - "required": [ 22 - "uri" 23 - ], 24 - "properties": { 25 - "uri": { 26 - "type": "string", 27 - "format": "uri" 28 - } 29 - }, 30 - "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL." 31 - }, 32 - "main": { 33 - "type": "object", 34 - "required": [ 35 - "index", 36 - "features" 37 - ], 38 - "properties": { 39 - "index": { 40 - "ref": "#byteSlice", 41 - "type": "ref" 42 - }, 43 - "features": { 44 - "type": "array", 45 - "items": { 46 - "refs": [ 47 - "#mention", 48 - "#link", 49 - "#tag" 50 - ], 51 - "type": "union" 52 - } 53 - } 54 - }, 55 - "description": "Annotation of a sub-string within rich text." 56 - }, 57 - "mention": { 58 - "type": "object", 59 - "required": [ 60 - "did" 61 - ], 62 - "properties": { 63 - "did": { 64 - "type": "string", 65 - "format": "did" 66 - } 67 - }, 68 - "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID." 69 - }, 70 - "byteSlice": { 71 - "type": "object", 72 - "required": [ 73 - "byteStart", 74 - "byteEnd" 75 - ], 76 - "properties": { 77 - "byteEnd": { 78 - "type": "integer", 79 - "minimum": 0 80 - }, 81 - "byteStart": { 82 - "type": "integer", 83 - "minimum": 0 84 - } 85 - }, 86 - "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets." 87 - } 88 - } 89 - }
-192
examples/02-following-feed-wip/lexicons/com/atproto/label/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "com.atproto.label.defs", 4 - "defs": { 5 - "label": { 6 - "type": "object", 7 - "required": [ 8 - "src", 9 - "uri", 10 - "val", 11 - "cts" 12 - ], 13 - "properties": { 14 - "cid": { 15 - "type": "string", 16 - "format": "cid", 17 - "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to." 18 - }, 19 - "cts": { 20 - "type": "string", 21 - "format": "datetime", 22 - "description": "Timestamp when this label was created." 23 - }, 24 - "exp": { 25 - "type": "string", 26 - "format": "datetime", 27 - "description": "Timestamp at which this label expires (no longer applies)." 28 - }, 29 - "neg": { 30 - "type": "boolean", 31 - "description": "If true, this is a negation label, overwriting a previous label." 32 - }, 33 - "sig": { 34 - "type": "bytes", 35 - "description": "Signature of dag-cbor encoded label." 36 - }, 37 - "src": { 38 - "type": "string", 39 - "format": "did", 40 - "description": "DID of the actor who created this label." 41 - }, 42 - "uri": { 43 - "type": "string", 44 - "format": "uri", 45 - "description": "AT URI of the record, repository (account), or other resource that this label applies to." 46 - }, 47 - "val": { 48 - "type": "string", 49 - "maxLength": 128, 50 - "description": "The short string name of the value or type of this label." 51 - }, 52 - "ver": { 53 - "type": "integer", 54 - "description": "The AT Protocol version of the label object." 55 - } 56 - }, 57 - "description": "Metadata tag on an atproto resource (eg, repo or record)." 58 - }, 59 - "selfLabel": { 60 - "type": "object", 61 - "required": [ 62 - "val" 63 - ], 64 - "properties": { 65 - "val": { 66 - "type": "string", 67 - "maxLength": 128, 68 - "description": "The short string name of the value or type of this label." 69 - } 70 - }, 71 - "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel." 72 - }, 73 - "labelValue": { 74 - "type": "string", 75 - "knownValues": [ 76 - "!hide", 77 - "!no-promote", 78 - "!warn", 79 - "!no-unauthenticated", 80 - "dmca-violation", 81 - "doxxing", 82 - "porn", 83 - "sexual", 84 - "nudity", 85 - "nsfl", 86 - "gore" 87 - ] 88 - }, 89 - "selfLabels": { 90 - "type": "object", 91 - "required": [ 92 - "values" 93 - ], 94 - "properties": { 95 - "values": { 96 - "type": "array", 97 - "items": { 98 - "ref": "#selfLabel", 99 - "type": "ref" 100 - }, 101 - "maxLength": 10 102 - } 103 - }, 104 - "description": "Metadata tags on an atproto record, published by the author within the record." 105 - }, 106 - "labelValueDefinition": { 107 - "type": "object", 108 - "required": [ 109 - "identifier", 110 - "severity", 111 - "blurs", 112 - "locales" 113 - ], 114 - "properties": { 115 - "blurs": { 116 - "type": "string", 117 - "description": "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.", 118 - "knownValues": [ 119 - "content", 120 - "media", 121 - "none" 122 - ] 123 - }, 124 - "locales": { 125 - "type": "array", 126 - "items": { 127 - "ref": "#labelValueDefinitionStrings", 128 - "type": "ref" 129 - } 130 - }, 131 - "severity": { 132 - "type": "string", 133 - "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", 134 - "knownValues": [ 135 - "inform", 136 - "alert", 137 - "none" 138 - ] 139 - }, 140 - "adultOnly": { 141 - "type": "boolean", 142 - "description": "Does the user need to have adult content enabled in order to configure this label?" 143 - }, 144 - "identifier": { 145 - "type": "string", 146 - "maxLength": 100, 147 - "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", 148 - "maxGraphemes": 100 149 - }, 150 - "defaultSetting": { 151 - "type": "string", 152 - "default": "warn", 153 - "description": "The default setting for this label.", 154 - "knownValues": [ 155 - "ignore", 156 - "warn", 157 - "hide" 158 - ] 159 - } 160 - }, 161 - "description": "Declares a label value and its expected interpretations and behaviors." 162 - }, 163 - "labelValueDefinitionStrings": { 164 - "type": "object", 165 - "required": [ 166 - "lang", 167 - "name", 168 - "description" 169 - ], 170 - "properties": { 171 - "lang": { 172 - "type": "string", 173 - "format": "language", 174 - "description": "The code of the language these strings are written in." 175 - }, 176 - "name": { 177 - "type": "string", 178 - "maxLength": 640, 179 - "description": "A short human-readable name for the label.", 180 - "maxGraphemes": 64 181 - }, 182 - "description": { 183 - "type": "string", 184 - "maxLength": 100000, 185 - "description": "A longer description of what the label means and why it might be applied.", 186 - "maxGraphemes": 10000 187 - } 188 - }, 189 - "description": "Strings which describe the label in the UI, localized into a specific language." 190 - } 191 - } 192 - }
-95
examples/02-following-feed-wip/lexicons/com/atproto/moderation/defs.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "com.atproto.moderation.defs", 4 - "defs": { 5 - "reasonRude": { 6 - "type": "token", 7 - "description": "Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`." 8 - }, 9 - "reasonSpam": { 10 - "type": "token", 11 - "description": "Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`." 12 - }, 13 - "reasonType": { 14 - "type": "string", 15 - "knownValues": [ 16 - "com.atproto.moderation.defs#reasonSpam", 17 - "com.atproto.moderation.defs#reasonViolation", 18 - "com.atproto.moderation.defs#reasonMisleading", 19 - "com.atproto.moderation.defs#reasonSexual", 20 - "com.atproto.moderation.defs#reasonRude", 21 - "com.atproto.moderation.defs#reasonOther", 22 - "com.atproto.moderation.defs#reasonAppeal", 23 - "tools.ozone.report.defs#reasonAppeal", 24 - "tools.ozone.report.defs#reasonOther", 25 - "tools.ozone.report.defs#reasonViolenceAnimal", 26 - "tools.ozone.report.defs#reasonViolenceThreats", 27 - "tools.ozone.report.defs#reasonViolenceGraphicContent", 28 - "tools.ozone.report.defs#reasonViolenceGlorification", 29 - "tools.ozone.report.defs#reasonViolenceExtremistContent", 30 - "tools.ozone.report.defs#reasonViolenceTrafficking", 31 - "tools.ozone.report.defs#reasonViolenceOther", 32 - "tools.ozone.report.defs#reasonSexualAbuseContent", 33 - "tools.ozone.report.defs#reasonSexualNCII", 34 - "tools.ozone.report.defs#reasonSexualDeepfake", 35 - "tools.ozone.report.defs#reasonSexualAnimal", 36 - "tools.ozone.report.defs#reasonSexualUnlabeled", 37 - "tools.ozone.report.defs#reasonSexualOther", 38 - "tools.ozone.report.defs#reasonChildSafetyCSAM", 39 - "tools.ozone.report.defs#reasonChildSafetyGroom", 40 - "tools.ozone.report.defs#reasonChildSafetyPrivacy", 41 - "tools.ozone.report.defs#reasonChildSafetyHarassment", 42 - "tools.ozone.report.defs#reasonChildSafetyOther", 43 - "tools.ozone.report.defs#reasonHarassmentTroll", 44 - "tools.ozone.report.defs#reasonHarassmentTargeted", 45 - "tools.ozone.report.defs#reasonHarassmentHateSpeech", 46 - "tools.ozone.report.defs#reasonHarassmentDoxxing", 47 - "tools.ozone.report.defs#reasonHarassmentOther", 48 - "tools.ozone.report.defs#reasonMisleadingBot", 49 - "tools.ozone.report.defs#reasonMisleadingImpersonation", 50 - "tools.ozone.report.defs#reasonMisleadingSpam", 51 - "tools.ozone.report.defs#reasonMisleadingScam", 52 - "tools.ozone.report.defs#reasonMisleadingElections", 53 - "tools.ozone.report.defs#reasonMisleadingOther", 54 - "tools.ozone.report.defs#reasonRuleSiteSecurity", 55 - "tools.ozone.report.defs#reasonRuleProhibitedSales", 56 - "tools.ozone.report.defs#reasonRuleBanEvasion", 57 - "tools.ozone.report.defs#reasonRuleOther", 58 - "tools.ozone.report.defs#reasonSelfHarmContent", 59 - "tools.ozone.report.defs#reasonSelfHarmED", 60 - "tools.ozone.report.defs#reasonSelfHarmStunts", 61 - "tools.ozone.report.defs#reasonSelfHarmSubstances", 62 - "tools.ozone.report.defs#reasonSelfHarmOther" 63 - ] 64 - }, 65 - "reasonOther": { 66 - "type": "token", 67 - "description": "Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`." 68 - }, 69 - "subjectType": { 70 - "type": "string", 71 - "description": "Tag describing a type of subject that might be reported.", 72 - "knownValues": [ 73 - "account", 74 - "record", 75 - "chat" 76 - ] 77 - }, 78 - "reasonAppeal": { 79 - "type": "token", 80 - "description": "Appeal a previously taken moderation action" 81 - }, 82 - "reasonSexual": { 83 - "type": "token", 84 - "description": "Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`." 85 - }, 86 - "reasonViolation": { 87 - "type": "token", 88 - "description": "Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`." 89 - }, 90 - "reasonMisleading": { 91 - "type": "token", 92 - "description": "Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`." 93 - } 94 - } 95 - }
-24
examples/02-following-feed-wip/lexicons/com/atproto/repo/strongRef.json
··· 1 - { 2 - "lexicon": 1, 3 - "id": "com.atproto.repo.strongRef", 4 - "description": "A URI with a content-hash fingerprint.", 5 - "defs": { 6 - "main": { 7 - "type": "object", 8 - "required": [ 9 - "uri", 10 - "cid" 11 - ], 12 - "properties": { 13 - "cid": { 14 - "type": "string", 15 - "format": "cid" 16 - }, 17 - "uri": { 18 - "type": "string", 19 - "format": "at-uri" 20 - } 21 - } 22 - } 23 - } 24 - }