Packbase

FeedPage

Understand the regular and pinned howls returned in a feed page.

FeedPage

pb.feeds(id).fetch() does not return a Howl[] directly. It returns a FeedPage object. This object keeps standard feed items, pinned items, and pagination data in separate fields.

interface FeedPage {
  data: Howl[]
  pins: Howl[]
  has_more: boolean
  total_count?: number
}

Field reference

FieldTypeDescription
dataHowl[]The paginated feed items for the requested page.
pinsHowl[]Pinned howls that should stay visible at the top of the feed. Search responses do not include this.
has_morebooleanWhether another page of non-pinned feed items exists.
total_countnumber?Optional total count of non-pinned feed items.

The ? after total_count means the property is optional. Check that it exists before treating it as a number.

Import

import type { FeedPage } from '@packbase/sdk-ts'

On this page