[READ ONLY MIRROR] Spark Social AppView Server github.com/sprksocial/server
atproto deno hono lexicon
5
fork

Configure Feed

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

at 17a4453b336a3693a4e2b55eced2d8a4a0cf1bd5 86 lines 2.8 kB view raw
1import { IdResolver } from "@atp/identity"; 2import { Database } from "./db/index.ts"; 3import { getLogger, Logger } from "@logtape/logtape"; 4import { Blocks } from "./routes/blocks.ts"; 5import { FeedGens } from "./routes/feed-gens.ts"; 6import { Feeds } from "./routes/feeds.ts"; 7import { Follows } from "./routes/follows.ts"; 8import { Likes } from "./routes/likes.ts"; 9import { Moderation } from "./routes/moderation.ts"; 10import { Actors } from "./routes/actors.ts"; 11import { Identity } from "./routes/identity.ts"; 12import { Records } from "./routes/records.ts"; 13import { Relationships } from "./routes/relationships.ts"; 14import { Interactions } from "./routes/interactions.ts"; 15import { Reposts } from "./routes/reposts.ts"; 16import { Sounds } from "./routes/sounds.ts"; 17import { Stories } from "./routes/stories.ts"; 18import { Sync } from "./routes/sync.ts"; 19import { Threads } from "./routes/threads.ts"; 20import { Preferences } from "./routes/preferences.ts"; 21import { Search } from "./routes/search.ts"; 22import { Labels } from "./routes/labels.ts"; 23 24export { RepoSubscription } from "./subscription.ts"; 25 26export type ServerContext = { 27 db: Database; 28 idResolver?: IdResolver; 29}; 30 31export class DataPlane { 32 private db: Database; 33 public logger: Logger; 34 private idResolver?: IdResolver; 35 36 // Route handlers as root-level properties 37 public blocks: Blocks; 38 public feedGens: FeedGens; 39 public feeds: Feeds; 40 public follows: Follows; 41 public likes: Likes; 42 public moderation: Moderation; 43 public actors: Actors; 44 public identity: Identity; 45 public records: Records; 46 public relationships: Relationships; 47 public interactions: Interactions; 48 public reposts: Reposts; 49 public sounds: Sounds; 50 public stories: Stories; 51 public sync: Sync; 52 public threads: Threads; 53 public preferences: Preferences; 54 public search: Search; 55 public labels: Labels; 56 57 constructor( 58 db: Database, 59 idResolver?: IdResolver, 60 ) { 61 this.db = db; 62 this.idResolver = idResolver; 63 this.logger = getLogger(["appview", "data-plane"]); 64 65 // Initialize all route handlers 66 this.blocks = new Blocks(db); 67 this.feedGens = new FeedGens(db); 68 this.feeds = new Feeds(db); 69 this.follows = new Follows(db); 70 this.likes = new Likes(db); 71 this.moderation = new Moderation(db); 72 this.actors = new Actors(db); 73 this.identity = new Identity(idResolver); 74 this.records = new Records(db); 75 this.relationships = new Relationships(db); 76 this.interactions = new Interactions(db); 77 this.reposts = new Reposts(db); 78 this.sounds = new Sounds(db); 79 this.stories = new Stories(db); 80 this.sync = new Sync(db); 81 this.threads = new Threads(db); 82 this.preferences = new Preferences(db); 83 this.search = new Search(db); 84 this.labels = new Labels(db); 85 } 86}