Files
replayweb.page/src/types.ts
T
Ilya Kreymer 6ef8bf4973 Support for dynamic page loading for Multi-WACZs (#399)
Support querying pages dynamically via pages endpoint:
- If loaded pages < total pages, load additional pages via /pages
endpoint if canQueryPages is set to true on item
- If query provided, do `/pages?search=...` to search for pages. Use
pagination of 25 pages for now.

WACZ hash:
- if provided, store waczhash per page, and use for thumbnail, favicon
and top-level replay loading.

Embed: better support for force reloading, call delete with reload
directly in embed

Depends on webrecorder/wabac.js#220
2025-02-24 14:35:03 -08:00

64 lines
1.2 KiB
TypeScript

export type URLResource = {
id: number;
title: string;
url: string;
mime: string;
status: string;
date: Date;
ts: string;
desc?: string;
timestamp?: string;
size: number;
favIconUrl: string;
text?: string;
waczhash?: string;
};
export type Page = URLResource & {
isSeed?: boolean;
};
export type ItemType = {
filename?: string;
sourceUrl: string;
replayPrefix: string;
apiPrefix: string;
/**
* Archived Item ID
*/
coll?: string;
// TODO(emma) is `id` the same as `coll`? should they be merged?
id?: string;
name?: string;
title?: string;
loadUrl?: string;
desc?: string;
description?: string;
resources?: { path: string; name: string }[];
verify?: {
numValid?: number;
numInvalid?: number;
domain?: string;
certFingerprint?: string;
datapackageHash?: string;
publicKey?: string;
software?: string;
};
onDemand?: boolean;
pages: Page[];
curatedPages: (URLResource & { list: string })[];
lists: URLResource[];
ctime?: string;
totalSize?: unknown;
size?: number | string;
canQueryPages?: boolean;
};
export type FavIconEventDetail = {
icons: {
rel: string;
href: string;
}[];
};