Type Alias Route
catalogue?: RouteCommon["catalogue"];
contentType?: string;
documentBytes?: number;
family?: Family;
freshness: Freshness;
mode?: Mode;
navigation?: "document";
offline: OfflineRule;
origin?: string;
pattern: string;
persist: boolean;
provision?: { futureViews?: number; maxBytes?: number; reuse?: number };
provisionable?: false;
query?: QuerySchema;
retention?: Retention;
scope: Scope;
strategy: Strategy;
sync: SyncRule;
template?: CompiledTemplate;
depends(ctx: RouteContext): readonly string[] | Promise<readonly string[]>;
load(ctx: RouteContext): unknown;
}
Index
Methods
depends
-
tags the artifact is built from; a change to one invalidates it
Parameters
- ctx: RouteContext
Returns readonly string[] | Promise<readonly string[]>
load
Properties
Optionalcatalogue
the route's catalogue function, when it declares one
Optionalcontent Type
content type of a data route's local answer
Optionaldocument Bytes
compressed bytes of the document the route renders
Optionalfamily
the held dataset row the route renders, when it declares a family
freshness
the staleness contract with every default applied
Optionalmode
serve or shadow; absent means the server decides
Optionalnavigation
document when the page leaves this family's links and forms to the browser
offline
whether a snapshot may be shown while offline, after the default
Optionalorigin
the API origin a cross-origin data family answers for
pattern
the path pattern the route matches
persist
whether the artifact survives a worker restart; true by default
Optionalprovision
provisioning priors that override the server's for this route
Type Declaration
-
OptionalfutureViews?: numberlater views one provisioned artifact is expected to serve; the server's prior when absent
-
OptionalmaxBytes?: numberrefuses an artifact whose stored JSON is over this many bytes; no budget when absent
-
Optionalreuse?: numberchance a provisioned artifact serves a later view; the server's prior when absent
Optionalprovisionable
false for a family route with no load, which has no artifact to provision
Optionalquery
query strings the worker answers from the stored collection
Optionalretention
at-rest key lifetime; set only on principal routes
scope
public or principal, after the default
strategy
how the route is answered locally
sync
when a soft route past its bound refreshes
Optionaltemplate
the compiled template of a template route
a validated route with every default applied