collections module organizes the logged-in user’s saved content. Every user has a single root collection, under which they can nest sub-collections and into which they can save entities.
fetchRootCollection
Fetches the logged-in user’s root collection.Promise<Collection>
fetchSubCollections
Fetches the immediate sub-collections of a collection.Promise<Collection[]>
createNewCollection
Creates a sub-collection under a parent collection.Promise<Collection>
fetchCollectionEntities
Fetches the entities within a collection, paginated.Comma-separated related resources to include in the response:
"user", "space", "topComment", "files", "grants".Promise<PaginatedResponse<Entity>>
addEntityToCollection
Adds an entity to a collection.Promise<{ success: boolean; collection: { id: string; entityCount: number } }>
removeEntityFromCollection
Removes an entity from a collection.Promise<{ success: boolean; collection: { id: string; entityCount: number } }>
updateCollection
Renames a collection.Promise<Collection>
deleteCollection
Deletes a collection.Promise<void>
