import type { PageApiResponse } from "../../lib/odyseePageApi"; import type { PageApiRead, PageApiReader } from "../../ytdlp/odyseePageReader"; export type SyntheticChannel = { claim_id: string; name: string; value_type: "channel"; timestamp: number; value: { title: string }; }; export type SyntheticClaim = { claim_id: string; name: string; value_type: "stream"; timestamp: number; canonical_url: string; permanent_url: string; signing_channel: { claim_id: string; name: string; value: { title: string } }; value: Record & { title: string; source: { sd_hash: string; media_type: string; name: string; size: string } }; }; export function syntheticChannel(opts: { name: string; title?: string; claimId?: string }): SyntheticChannel; export function syntheticClaim(opts: { name: string; title: string; channel: SyntheticChannel; claimId?: string; releaseTime?: number; timestamp?: number; duration?: number; size?: number; sdHash?: string; streamType?: "video" | "audio" | "binary"; mediaType?: string; height?: number; width?: number; description?: string; tags?: string[]; }): SyntheticClaim; export function pageUrlOf(claim: SyntheticClaim): string; export function channelUrlOf(channel: SyntheticChannel): string; export function cdnUrlOf(claim: SyntheticClaim): string; export function resolveAnswer(claims: ReadonlyArray): PageApiResponse; export function claimSearchAnswer(claims: ReadonlyArray, page?: number): PageApiResponse; export function getAnswer(claim: SyntheticClaim, streamingUrl: string): PageApiResponse; export function refusedAnswer(method: string): PageApiResponse; export function videoPageRead(opts: { claim: SyntheticClaim; related?: SyntheticClaim[]; streamingUrl?: string | null; mediaUrls?: string[]; get?: boolean; }): PageApiRead; export function channelPageRead(opts: { channel: SyntheticChannel; pages: SyntheticClaim[][] }): PageApiRead; export function fakePageReader( reads: Record PageApiRead)>, ): PageApiReader & { calls: { pageUrl: string; play: boolean; scrolls: number }[] };