Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ephraimduncan/minimal.so/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

client.bookmark.list(input)
Defined in: server/procedures/bookmarks.ts:28

Authentication

This endpoint requires authentication. See Authentication for details.

Request

groupId
string
Filter bookmarks by a specific group ID. If omitted, returns all bookmarks for the user.

Input Schema

{
  groupId?: string;
}
Defined in lib/schema.ts:118.

Response

Returns an array of bookmark objects ordered by updatedAt (most recent first).
id
string
required
Unique identifier for the bookmark
title
string
required
Display title of the bookmark
url
string | null
The bookmark URL (null for color/text type bookmarks)
favicon
string | null
URL to the site’s favicon (automatically fetched for link bookmarks)
type
'link' | 'color' | 'text'
required
Type of bookmark
color
string | null
Hex color code for color-type bookmarks
normalizedUrl
string | null
Canonicalized version of the URL for duplicate detection
isPublic
boolean | null
Whether the bookmark is publicly visible
groupId
string
required
ID of the group this bookmark belongs to
userId
string
required
ID of the user who owns this bookmark
createdAt
Date
required
Timestamp when the bookmark was created
updatedAt
Date
required
Timestamp when the bookmark was last updated

Examples

Using React Query (Client Component)

import { orpc } from '@/lib/orpc';

function BookmarkList({ groupId }: { groupId?: string }) {
  const { data: bookmarks, isLoading } = orpc.bookmark.list.useQuery({
    groupId,
  });

  if (isLoading) return <div>Loading...</div>;

  return (
    <div>
      {bookmarks?.map(bookmark => (
        <div key={bookmark.id}>
          {bookmark.favicon && <img src={bookmark.favicon} alt="" />}
          <a href={bookmark.url || '#'}>{bookmark.title}</a>
        </div>
      ))}
    </div>
  );
}

Using Server Client (Server Component)

import { serverClient } from '@/lib/orpc.server';

async function BookmarksPage() {
  // Get all bookmarks
  const allBookmarks = await serverClient.bookmark.list({});

  // Get bookmarks for a specific group
  const groupBookmarks = await serverClient.bookmark.list({
    groupId: 'clx123456',
  });

  return (
    <div>
      <h2>All Bookmarks ({allBookmarks.length})</h2>
      {/* Render bookmarks */}
    </div>
  );
}

Direct Client Call

import { client } from '@/lib/orpc';

const bookmarks = await client.bookmark.list({
  groupId: 'clx123456',
});

console.log(`Found ${bookmarks.length} bookmarks`);

Implementation Details

The procedure implementation (from server/procedures/bookmarks.ts:28):
export const listBookmarks = authed
  .input(listBookmarksInputSchema)
  .handler(async ({ context, input }) => {
    const bookmarks = await db.bookmark.findMany({
      where: {
        userId: context.user.id,
        ...(input.groupId && { groupId: input.groupId }),
      },
      orderBy: { updatedAt: "desc" },
    });
    return bookmarks;
  });

Notes

  • Results are automatically filtered by the authenticated user’s ID
  • Bookmarks are ordered by most recently updated first
  • The groupId filter is optional and can be omitted to get all bookmarks
  • Returns an empty array if no bookmarks are found

Build docs developers (and LLMs) love