Highly ambitious ATProtocol AppView service and sdks

com.indexer to social.slices

+27 -27
+3 -3
api/README.md
··· 48 48 49 49 ### API Endpoints 50 50 51 - - `GET /xrpc/com.indexer.records.list?collection=app.bsky.feed.post` - List records 52 - - `POST /xrpc/com.indexer.collections.bulkSync` - Bulk sync collections 51 + - `GET /xrpc/social.slices.records.list?collection=app.bsky.feed.post` - List records 52 + - `POST /xrpc/social.slices.collections.bulkSync` - Bulk sync collections 53 53 54 54 ### Example: Bulk Sync Collections 55 55 56 56 ```bash 57 - curl -X POST "http://127.0.0.1:3000/xrpc/com.indexer.collections.bulkSync" \ 57 + curl -X POST "http://127.0.0.1:3000/xrpc/social.slices.collections.bulkSync" \ 58 58 -H "Content-Type: application/json" \ 59 59 -d '{"collections": ["app.bsky.feed.post", "app.bsky.actor.profile"]}' 60 60 ```
+13 -13
api/docs/atproto_indexer_spec.md
··· 286 286 **XRPC Endpoints** with proper lexicon definitions: 287 287 288 288 ``` 289 - GET /xrpc/com.indexer.records.list # List records for collection 290 - GET /xrpc/com.indexer.records.get # Get specific record 291 - POST /xrpc/com.indexer.records.create # Create record 292 - POST /xrpc/com.indexer.records.update # Update record 293 - POST /xrpc/com.indexer.records.delete # Delete record 289 + GET /xrpc/social.slices.records.list # List records for collection 290 + GET /xrpc/social.slices.records.get # Get specific record 291 + POST /xrpc/social.slices.records.create # Create record 292 + POST /xrpc/social.slices.records.update # Update record 293 + POST /xrpc/social.slices.records.delete # Delete record 294 294 295 295 # Advanced query procedures 296 - GET /xrpc/com.indexer.records.search # Full-text search on record content 297 - GET /xrpc/com.indexer.records.filter # JSON field filtering 298 - GET /xrpc/com.indexer.author.listRecords # All records by author (cross-collection) 299 - GET /xrpc/com.indexer.search.global # Global search across all collections 296 + GET /xrpc/social.slices.records.search # Full-text search on record content 297 + GET /xrpc/social.slices.records.filter # JSON field filtering 298 + GET /xrpc/social.slices.author.listRecords # All records by author (cross-collection) 299 + GET /xrpc/social.slices.search.global # Global search across all collections 300 300 ``` 301 301 302 302 **Lexicon Definitions** for indexer procedures: ··· 304 304 ```json 305 305 { 306 306 "lexicon": 1, 307 - "id": "com.indexer.records.list", 307 + "id": "social.slices.records.list", 308 308 "defs": { 309 309 "main": { 310 310 "type": "query", ··· 548 548 // Implementation handles both cases 549 549 async createRecord(input: any): Promise<CreateRecordOutput> { 550 550 const response = await this.client.post( 551 - "/xrpc/com.indexer.records.create", 551 + "/xrpc/social.slices.records.create", 552 552 input, 553 553 ); 554 554 return response.data; ··· 568 568 }): Promise<ListRecordsOutput<string>>; 569 569 570 570 async listRecords(params: any): Promise<any> { 571 - const response = await this.client.get("/xrpc/com.indexer.records.list", { 571 + const response = await this.client.get("/xrpc/social.slices.records.list", { 572 572 params, 573 573 }); 574 574 return response.data; ··· 598 598 } 599 599 600 600 async searchRecords(params: SearchRecordsParams): Promise<SearchOutput> { 601 - const response = await this.client.get("/xrpc/com.indexer.records.search", { 601 + const response = await this.client.get("/xrpc/social.slices.records.search", { 602 602 params, 603 603 }); 604 604 return response.data;
+1 -1
api/scripts/test_codegen.sh
··· 4 4 5 5 # Test with multiple lexicons 6 6 echo "📝 Generating TypeScript client with multiple lexicons..." 7 - curl -s -X POST http://localhost:3000/xrpc/com.indexer.codegen.generate \ 7 + curl -s -X POST http://localhost:3000/xrpc/social.slices.codegen.generate \ 8 8 -H "Content-Type: application/json" \ 9 9 -d '{ 10 10 "target": "typescript-deno",
+4 -4
api/src/main.rs
··· 86 86 // Build application with routes 87 87 let app = Router::new() 88 88 // XRPC endpoints 89 - .route("/xrpc/com.indexer.records.list", get(list_records)) 90 - .route("/xrpc/com.indexer.collections.bulkSync", post(bulk_sync)) 91 - .route("/xrpc/com.indexer.repos.smartSync", post(smart_sync)) 89 + .route("/xrpc/social.slices.records.list", get(list_records)) 90 + .route("/xrpc/social.slices.collections.bulkSync", post(bulk_sync)) 91 + .route("/xrpc/social.slices.repos.smartSync", post(smart_sync)) 92 92 .route( 93 - "/xrpc/com.indexer.codegen.generate", 93 + "/xrpc/social.slices.codegen.generate", 94 94 post(handler_xrpc_codegen::generate_client_xrpc), 95 95 ) 96 96 // Dynamic collection-specific XRPC endpoints
+2 -2
api/templates/index.html
··· 81 81 <div class="space-y-4"> 82 82 <div> 83 83 <code 84 - class="bg-gray-100 px-2 py-1 rounded">GET /xrpc/com.indexer.records.list?collection=app.bsky.feed.post</code> 84 + class="bg-gray-100 px-2 py-1 rounded">GET /xrpc/social.slices.records.list?collection=app.bsky.feed.post</code> 85 85 <p class="text-gray-600 mt-1">List records for a collection</p> 86 86 </div> 87 87 <div> 88 - <code class="bg-gray-100 px-2 py-1 rounded">POST /xrpc/com.indexer.collections.bulkSync</code> 88 + <code class="bg-gray-100 px-2 py-1 rounded">POST /xrpc/social.slices.collections.bulkSync</code> 89 89 <p class="text-gray-600 mt-1">Bulk sync collections (JSON: {"collections": ["app.bsky.feed.post"]})</p> 90 90 </div> 91 91 </div>
+1 -1
api/templates/sync.html
··· 110 110 </li> 111 111 <li class="flex items-start"> 112 112 <span class="font-bold mr-2">•</span> 113 - <span>Use the API endpoint for programmatic access: <code class="bg-blue-100 px-1 rounded">/xrpc/com.indexer.collections.bulkSync</code></span> 113 + <span>Use the API endpoint for programmatic access: <code class="bg-blue-100 px-1 rounded">/xrpc/social.slices.collections.bulkSync</code></span> 114 114 </li> 115 115 <li class="flex items-start"> 116 116 <span class="font-bold mr-2">•</span>
+2 -2
lexicons/xyz/sliceat/lexicon.json lexicons/social/slices/lexicon.json
··· 1 1 { 2 2 "lexicon": 1, 3 - "id": "xyz.sliceat.lexicon", 3 + "id": "social.slices.lexicon", 4 4 "description": "Lexicon definition record type for AT Protocol schema storage", 5 5 "defs": { 6 6 "main": { ··· 38 38 } 39 39 } 40 40 } 41 - } 41 + }
+1 -1
lexicons/xyz/sliceat/slice.json lexicons/social/slices/slice.json
··· 1 1 { 2 2 "lexicon": 1, 3 - "id": "xyz.sliceat.slice", 3 + "id": "social.slices.slice", 4 4 "description": "Slice application record type", 5 5 "defs": { 6 6 "main": {