[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.

generator model on ingester

+40
+40
services/appview/src/db.ts
··· 304 304 musicSchema.index({ authorDid: 1, createdAt: -1 }) 305 305 musicSchema.index({ tags: 1, createdAt: -1 }) 306 306 307 + export interface GeneratorDocument extends Document { 308 + uri: string 309 + did: string 310 + displayName: string 311 + description?: string 312 + descriptionFacets?: Array<any> 313 + avatar?: string 314 + acceptsInteractions?: boolean 315 + labels?: any 316 + contentMode?: string 317 + authorDid: string 318 + authorHandle: string 319 + createdAt: string 320 + indexedAt: string 321 + cid: string 322 + } 323 + 324 + export const generatorSchema = new Schema<GeneratorDocument>({ 325 + uri: { type: String, required: true, unique: true, index: true }, 326 + did: { type: String, required: true, index: true }, 327 + displayName: { type: String, required: true }, 328 + description: { type: String, required: false }, 329 + descriptionFacets: { type: [Object], required: false }, 330 + avatar: { type: String, required: false }, 331 + acceptsInteractions: { type: Boolean, required: false }, 332 + labels: { type: Object, required: false }, 333 + contentMode: { type: String, required: false }, 334 + authorDid: { type: String, required: true, index: true }, 335 + authorHandle: { type: String, required: true }, 336 + createdAt: { type: String, required: true }, 337 + indexedAt: { type: String, required: true }, 338 + cid: { type: String, required: true }, 339 + }) 340 + 341 + // Add compound indexes for Generator 342 + generatorSchema.index({ authorDid: 1, createdAt: -1 }) 343 + generatorSchema.index({ did: 1, createdAt: -1 }) 344 + 307 345 export interface DatabaseModels { 308 346 Like: Model<LikeDocument> 309 347 Post: Model<PostDocument> ··· 314 352 Repost: Model<RepostDocument> 315 353 Music: Model<MusicDocument> 316 354 Look: Model<LookDocument> 355 + Generator: Model<GeneratorDocument> 317 356 } 318 357 319 358 export class Database { ··· 333 372 Repost: this.connection.model<RepostDocument>('Repost', repostSchema), 334 373 Music: this.connection.model<MusicDocument>('Music', musicSchema), 335 374 Look: this.connection.model<LookDocument>('Look', lookSchema), 375 + Generator: this.connection.model<GeneratorDocument>('Generator', generatorSchema), 336 376 } 337 377 } 338 378