📚 Pagination
The Wishlist Plugin supports cursor-style pagination for the following endpoints:
- GET /store/wishlists
- GET /store/wishlists/:id/items
🔍 Pagination Parameters
Both endpoints support the following query parameters:
- 
skip— How many records to skip (default: 0)
- 
take— How many records to return (default: 10)
This does not affect wishlist-level fields — only the embedded items.
- Using SDK
- Using REST (Medusa SDK or fetch)
const retrievedWishlists = await sdk.alphabite.wishlist.list({
  skip: 10,
  take: 5,
});
const retrievedWishlists = await sdk.alphabite.wishlist.listItems({
  id: "wl_...",
  skip: 5,
  take: 5,
});
import {
  RetrieveWishlistInput,
  RetrieveWishlistOutput,
  RetrieveWishlistItemsInput,
  RetrieveWishlistItemsOutput,
} from "@alphabite/medusa-sdk";
const retrievedWishlistItems = await sdk.client.fetch<RetrieveWishlistOutput>(`/store/wishlists`, {
  method: "GET",
  query: {
    skip: 10,
    take: 5,
  } as Omit<RetrieveWishlistInput, "id">,
});
const retrievedWishlistItems = await sdk.client.fetch<RetrieveWishlistItemsOutput>(`/store/wishlists`, {
  method: "GET",
  query: {
    id: "wl_...",
    skip: 5,
    take: 5,
  } as Omit<RetrieveWishlistItemsInput, "id">,
});
📦 Pagination Response Format
All paginated endpoints return a standardized structure:
{
  "data": [],
  "count": 0,
  "skip": 0,
  "take": 0,
  "totalPages": 1,
  "currentPage": 1,
  "nextPage": 1,
  "prevPage": 1
}
Field Descriptions:
- data: List of wishlists or wishlist items
- count: Total number of records available
- skip: Number of records skipped
- take: Number of records returned
- totalPages: Total pages based on count and take
- currentPage: Current page number
- nextPage: Next page number (if any)
- prevPage: Previous page number (if any)