or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-8/

Signed Media Retrieval

Fetch signed URLs for secure file, media, and cover assets from a workspace page using the client’s signing support. Processes all signable blocks by default or a specified subset when requested.

Capabilities

Signed URLs for media blocks

  • Given a page containing supported file, image, video, audio, or pdf attachments stored on secure workspace hosts (e.g., secure static, prod secure, or attachment URLs), it returns signed URLs keyed by block id for each signable block and skips external HTTP(S) sources. @test

Optional cover signing

  • When includeCovers is false, page cover images are excluded from results; when true, the cover URL is signed and returned under the page block id. @test

Targeted signing

  • When blockIds is provided, only those blocks are signed and returned, ignoring other signable blocks. @test

Implementation

@generates

API

export interface SignedMediaOptions {
  /** Whether to include page cover images in signing; defaults to false */
  includeCovers?: boolean;
  /** Only sign these block IDs when provided; other signable blocks are ignored */
  blockIds?: string[];
  /** Optional request overrides forwarded to the underlying client */
  requestOptions?: Record<string, any>;
}

export interface SignedMediaResult {
  /** Signed URLs for signable blocks keyed by block id */
  signedUrls: Record<string, string>;
  /** Block IDs from the processed set that required signing but did not return a signed URL */
  missing: string[];
}

export async function fetchSignedMedia(
  pageId: string,
  options?: SignedMediaOptions
): Promise<SignedMediaResult>;

Dependencies { .dependencies }

notion-client { .dependency }

Retrieves page content and produces signed URLs for secure file, media, and cover sources.