or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-3/

Page Record Map Loader

Build a utility that retrieves a complete record map for a workspace page, with optional hydration of missing blocks, linked collections, and signed file URLs.

Capabilities

Fetch base record map

  • Given a page identifier, return the record map containing the page and its root block data. @test

Hydrate missing blocks on demand

  • When the caller enables missing-block hydration, fetch and merge any child blocks that are not present in the initial record map. @test

Resolve linked collections when requested

  • When collection resolution is enabled, include collection data and view results linked from the page in the returned record map. @test

Refresh signed file URLs optionally

  • When file signing is requested, ensure file, image, audio, video, and cover URLs in the page content are refreshed with valid signed URLs. @test

Implementation

@generates

API

export interface PageLoadOptions {
  pageId: string;
  includeMissingBlocks?: boolean;
  includeCollections?: boolean;
  includeSignedFiles?: boolean;
  chunkLimit?: number;
  chunkNumber?: number;
}

export interface PageLoadResult {
  recordMap: {
    block: Record<string, unknown>;
    collection?: Record<string, unknown>;
    collection_view?: Record<string, unknown>;
    signed_urls?: Record<string, string>;
  };
  sources: {
    blocksResolved: boolean;
    collectionsResolved: boolean;
    filesSigned: boolean;
  };
}

export async function loadPageMap(options: PageLoadOptions): Promise<PageLoadResult>;

Dependencies { .dependencies }

notion-client { .dependency }

Fetches page record maps and supports optional hydration for blocks, collections, and signed file URLs.