Skip to content

SiteSchema

SiteSchema = object

One site’s generated schema, and the type argument a client takes: createClient<EdgeKitDecisions['site_example']>(…) in the browser, createServerClient<…> on a server. journeys is a union of the site’s journey feature names. They are not in features, because a journey is opened with a navigation to its forward URL, not decided in a batch.

Pass one site, not the whole organization. id ties the client’s siteId to the schema, so calling a feature the site does not run is a compile error. With createClient<EdgeKitDecisions>({ siteId: 'site_example' }), TypeScript cannot infer the site from the literal, and the client accepts only the feature names every site shares.

features: Record<string, FeatureSchema>


id: string


journeys: string