Something went wrong. Try again.
A social knowledge tool for research trails, built on ATProto semble.so
research-tool social-network tools-for-thought atproto
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193export interface CollectionQueryOptions { page: number; limit: number; sortBy: CollectionSortField; sortOrder: SortOrder; searchText?: string;}
export interface PaginatedQueryResult<T> { items: T[]; totalCount: number; hasMore: boolean;}
export enum CollectionSortField { NAME = 'name', CREATED_AT = 'createdAt', UPDATED_AT = 'updatedAt', CARD_COUNT = 'cardCount', ADDED_AT = 'addedAt',}
export enum SortOrder { ASC = 'asc', DESC = 'desc',}
export interface CollectionQueryResultDTO { id: string; uri?: string; name: string; description?: string; accessType: string; updatedAt: Date; createdAt: Date; cardCount: number; authorId: string;}
// Collection with the subset of queried URLs it contains, used for ranking// recommended collections to save a URL toexport interface CollectionWithMatchedUrlsDTO extends CollectionQueryResultDTO { matchedUrls: string[];}
export interface CollectionContainingCardDTO { id: string; uri?: string; name: string; description?: string; authorId: string; accessType: string; cardCount: number; createdAt: Date; updatedAt: Date;}
// Raw repository DTO - what the repository returns (not enriched)export interface CollectionForUrlRawDTO { id: string; uri?: string; name: string; description?: string; accessType: string; authorId: string; cardCount: number; createdAt: Date; updatedAt: Date;}
// Public DTO - what the use case returns (enriched with author profile)export interface CollectionForUrlDTO { id: string; uri?: string; name: string; description?: string; accessType: string; author: { id: string; name: string; handle: string; avatarUrl?: string; };}
export interface CollectionForUrlQueryOptions { page: number; limit: number; sortBy: CollectionSortField; sortOrder: SortOrder;}
export interface SearchCollectionsOptions { page: number; limit: number; sortBy: CollectionSortField; sortOrder: SortOrder; searchText?: string; authorId?: string; // Filter by author DID accessType?: string; // Filter by access type (OPEN or CLOSED)}
export interface GetOpenCollectionsWithContributorOptions { contributorId: string; // User DID who contributed cards page: number; limit: number; sortBy: CollectionSortField; sortOrder: SortOrder;}
export interface CollectionContributorDTO { userId: string; contributionCount: number; lastContributedAt: Date;}
export interface ICollectionQueryRepository { findByCreator( curatorId: string, options: CollectionQueryOptions, ): Promise<PaginatedQueryResult<CollectionQueryResultDTO>>;
getCollectionsContainingCardForUser( cardId: string, curatorId: string, ): Promise<CollectionContainingCardDTO[]>;
getCollectionsWithUrl( url: string, options: CollectionForUrlQueryOptions, ): Promise<PaginatedQueryResult<CollectionForUrlRawDTO>>;
searchCollections( options: SearchCollectionsOptions, ): Promise<PaginatedQueryResult<CollectionQueryResultDTO>>;
getOpenCollectionsWithContributor( options: GetOpenCollectionsWithContributorOptions, ): Promise<PaginatedQueryResult<CollectionQueryResultDTO>>;
getCollectionContributors( collectionId: string, authorId: string, options: { page: number; limit: number }, ): Promise<PaginatedQueryResult<CollectionContributorDTO>>;
/** * Get all distinct collections containing URL cards with any of the given * URLs, along with which of those URLs matched. * Used for recommendation scoring (no pagination) */ getCollectionsForUrls( urls: string[], ): Promise<CollectionWithMatchedUrlsDTO[]>;
/** * Get all distinct collections created by the given author that contain URL * cards with any of the given URLs, along with which of those URLs matched. * Used to recommend the author's own collections to save a URL to. * * `excludeUrl` drops collections that already contain a URL card with that * URL, so recommendations only include collections the URL can still be * added to. */ getCollectionsForUrlsByAuthor( urls: string[], authorId: string, excludeUrl?: string, ): Promise<CollectionWithMatchedUrlsDTO[]>;
/** * Get all distinct OPEN collections that contain URL cards with any of the * given URLs, along with which of those URLs matched. Optionally excludes * collections created by a given author (e.g. the calling user, whose own * collections are recommended separately). * * `excludeUrl` drops collections that already contain a URL card with that * URL, so recommendations only include collections the URL can still be * added to. */ getOpenCollectionsForUrls( urls: string[], excludeAuthorId?: string, excludeUrl?: string, ): Promise<CollectionWithMatchedUrlsDTO[]>;
/** * Get the count of collections created by a user * Used for efficient profile stats without fetching full data */ getProfileCollectionCount(authorId: string): Promise<number>;}