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 {
explanations?: Record<string, FeedExplanation>
data: Howl[]
pins: Howl[]
has_more: boolean
total_count?: number
}Field reference
| Field | Type | Description |
|---|---|---|
data | Howl[] | The paginated feed items for the requested page. |
pins | Howl[] | Pinned howls that should stay visible at the top of the feed. Search responses do not include this. |
has_more | boolean | Whether another page of non-pinned feed items exists. |
total_count | number? | 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.
explanations is optional response-specific provenance keyed by concrete howl
ID. FeedExplanation contains the server's query context and may include a
FeedSearchQuery with JSON-valued where conditions. Keep null, arrays, and
empty objects when presenting or serializing these conditions. Search results
can carry feed_explanation alongside a howl; it is not an instruction to bypass
the viewer's filters or visibility rules.
Import
import type { FeedPage, FeedExplanation, FeedSearchQuery, FeedQueryValue } from '@packbase/sdk-ts'