Skip to content

VexViewConfig

VexViewConfig<TFieldSlug> = object

Defined in: packages/core/src/collections/types.ts:689

One saved view: an identity (viewId, name, optional description) plus its VexViewState. The shape of admin.views entries (config source) and of savedListViews/localSavedListViewsStore.ts’s local entries (Step 12); VexStoredView extends it for the shared (vex_views) source. ResolvedDefaultView (admin.view) is structurally this same shape too (fixed viewId: "default"), so a merged view list can treat every source uniformly.

This is the full shape — state.where intact. It is what CollectionConfig.admin.views entries resolve to (above), and it ships to the browser whole, as part of VexClientConfig (Decision 25: hidden from the UI, not secret). find/search take no view argument and never see this type — the client reads state.where directly in exactly two places: composeSavedListViewWhere (collections/savedListViews/composeSavedListViewWhere.ts, this step, CLIENT-SIDE, to build the plain where it sends) and toClientSavedListViewConfig (collections/savedListViews/toClientSavedListViewConfig.ts, this step, CLIENT-SIDE, called by useSavedListViews, Step 12, to strip where for display). Server-side, matchDeclaredSavedListViewFilter (Step 6) separately reads a collection’s admin.view/admin.views where to recognize a trusted declared filter inside the request where it receives — it never reads THIS type, only the collection’s own admin.view/admin.views off VexConfig. Everything else in @vexcms/react reads a config-source view through VexClientViewConfig instead.

TFieldSlug extends string = string

Union of this collection’s field slugs.

optional description?: string

Defined in: packages/core/src/collections/types.ts:692


name: string

Defined in: packages/core/src/collections/types.ts:691


state: VexViewState<TFieldSlug>

Defined in: packages/core/src/collections/types.ts:693


viewId: string

Defined in: packages/core/src/collections/types.ts:690