getCard
Retrieves a single card by ID with all associated metadata and file URLs.Arguments
The unique identifier of the card to retrieve.
Returns
Returns the card object with all fields and generated file URLs, or
null if:- Card doesn’t exist
- User is not authenticated
- User doesn’t own the card (authorization check)
getCards
Retrieves a filtered list of cards with optional type and favorites filtering.Arguments
Filter cards by type. If omitted, returns all types.Values:
text | link | image | video | audio | document | palette | quoteIf
true, returns only cards marked as favorites.Maximum number of cards to return. Cards are returned in descending creation order (newest first).
Returns
Array of card objects matching the filter criteria. Returns empty array if:
- User is not authenticated
- No cards match the filters
getCard response, including auto-generated file URLs.Behavior
Index Optimization
Index Optimization
Uses compound indexes to avoid post-query filtering:
- Type filter: Uses
by_user_type_deletedindex - Favorites filter: Uses
by_user_favorites_deletedindex - No filters: Uses
by_user_deletedindex
isDeleted: undefined).File URL Generation
File URL Generation
Generates temporary signed URLs for:
fileUrl- Main file (iffileIdexists)thumbnailUrl- Thumbnail image (ifthumbnailIdexists)screenshotUrl- Link preview screenshot (if stored)linkPreviewImageUrl- Link preview image (if stored)
ctx.storage.getUrl() and expire after a period.Quote Formatting
Quote Formatting
Applies display formatting to quote cards via
applyQuoteFormattingToList():- Restores quotation marks for display
- Preserves original normalized content in database
getDeletedCards
Retrieves soft-deleted cards (trash/recycle bin).Arguments
Maximum number of deleted cards to return. Ordered by deletion date (newest first).
Returns
Array of soft-deleted cards. Returns empty array if user is not authenticated or no deleted cards exist.
Source References
getCard:packages/convex/card/getCard.ts:20getCards:packages/convex/card/getCards.ts:45getDeletedCards:packages/convex/card/getCard.ts:60