// Marks a merged searchset that stopped at the page bound. Namespaced so it cannot collide with a real relation, and // distinct from the history relation: a stopped search and a stopped history say different things about a list. export const SEARCH_TRUNCATED_RELATION = 'x-akashic-search-truncated'; // Marks a list served as of a withdrawal cutoff that could not be served in full (an entry's history was cut short, // or the reconstruction cap tripped). What it leaves out is unknown, so the list is not an authoritative empty one. export const AS_OF_INCOMPLETE_RELATION = 'x-akashic-as-of-truncated'; // Marks a list served frozen at a withdrawal instant, which its url names. Under a current authorization it is an answer // the server gave before the new authorization reached it, so it is read again rather than taken for the record. export const AS_OF_SERVED_RELATION = 'x-akashic-as-of'; export const isServedAtCutoff = (bundle: { link?: { relation?: string }[] } | null | undefined): boolean => (bundle?.link ?? []).some((link) => link.relation === AS_OF_SERVED_RELATION); export const isAsOfIncomplete = (bundle: { link?: { relation?: string }[] } | null | undefined): boolean => (bundle?.link ?? []).some((link) => link.relation === AS_OF_INCOMPLETE_RELATION);