@dyrected/core 2.14.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1153,10 +1153,44 @@ interface DetailCustom<TDoc = any> {
1153
1153
  /** Custom component options. */
1154
1154
  options?: DetailCustomOptions<TDoc>;
1155
1155
  }
1156
+ /**
1157
+ * Configuration options for rendering an action button in a Detail View.
1158
+ */
1159
+ interface DetailActionOptions {
1160
+ /** Grid column span across the 12-column grid. */
1161
+ span?: DetailSpan;
1162
+ /** Button visual style. Defaults to `'outline'`. */
1163
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive";
1164
+ /** Button size. Defaults to `'sm'`. */
1165
+ size?: "sm" | "default";
1166
+ /** Overrides the action's own `label` for this placement. */
1167
+ label?: string;
1168
+ /**
1169
+ * Visibility condition for this action item.
1170
+ * Can be a boolean or a JEXL expression evaluated against `{ doc, user }`.
1171
+ */
1172
+ visible?: string | boolean;
1173
+ }
1174
+ /**
1175
+ * Renders a button for a named action from `collection.actions` at this
1176
+ * position in a Detail View. The same action (and its confirm dialog, modal
1177
+ * fields, and execution) can also render automatically in the Detail View's
1178
+ * header toolbar when the action's `type` is `'header'` — placing it here
1179
+ * too does not duplicate that config, it just adds another entry point to
1180
+ * the same action.
1181
+ */
1182
+ interface DetailAction {
1183
+ /** Identifies this item as an action button. */
1184
+ type: "action";
1185
+ /** Name of the action, matching an entry in `collection.actions`. */
1186
+ name: string;
1187
+ /** Display and visibility options for this placement. */
1188
+ options?: DetailActionOptions;
1189
+ }
1156
1190
  /**
1157
1191
  * Union of all valid item types in a Detail View schema.
1158
1192
  */
1159
- type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailField | DetailRepeat | DetailComputed<TDoc> | DetailDivider | DetailText | DetailCustom<TDoc> | string;
1193
+ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailField | DetailRepeat | DetailComputed<TDoc> | DetailDivider | DetailText | DetailCustom<TDoc> | DetailAction | string;
1160
1194
  /**
1161
1195
  * Detail View layout schema definition for a collection or global.
1162
1196
  */
@@ -1550,9 +1584,9 @@ type ActionConfig<TDoc extends Record<string, unknown> = Record<string, unknown>
1550
1584
  * Context passed to an action's server handler function.
1551
1585
  */
1552
1586
  interface ActionContext<TDoc extends Record<string, unknown> = Record<string, unknown>> {
1553
- /** The target document (for row actions). */
1554
- doc: TDoc;
1555
- /** All targeted documents (for bulk actions). */
1587
+ /** The target document (for row actions), or null for header actions. */
1588
+ doc: TDoc | null;
1589
+ /** All targeted documents (for bulk actions). Empty array for header actions. */
1556
1590
  docs: TDoc[];
1557
1591
  /** The authenticated acting user, if available. */
1558
1592
  user: Record<string, unknown> | null;
@@ -1801,6 +1835,30 @@ interface AuthConfig {
1801
1835
  */
1802
1836
  adminRole?: string;
1803
1837
  }
1838
+ /**
1839
+ * Physical database index specification for a collection.
1840
+ */
1841
+ interface CollectionIndex {
1842
+ /** Optional custom index name. If omitted, adapter auto-generates one. */
1843
+ name?: string;
1844
+ /** Field names participating in the index. */
1845
+ fields: string[];
1846
+ /** Whether the index enforces database-level uniqueness. Defaults to false. */
1847
+ unique?: boolean;
1848
+ /** Whether to only index non-null rows where supported. */
1849
+ sparse?: boolean;
1850
+ }
1851
+ /**
1852
+ * Atomic numeric update operators for database mutation payloads.
1853
+ */
1854
+ interface NumericUpdateOperator {
1855
+ increment?: number;
1856
+ decrement?: number;
1857
+ }
1858
+ /**
1859
+ * Strategy for generating document IDs.
1860
+ */
1861
+ type IdStrategy = "prefixed-nanoid" | "nanoid" | "ulid" | "uuid";
1804
1862
  /**
1805
1863
  * Use this contract when you want the exact shape of a collection config.
1806
1864
  *
@@ -1926,6 +1984,31 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
1926
1984
  * @see {@link https://dyrected.com/docs/model-content/fields/blocks Blocks and page sections}
1927
1985
  */
1928
1986
  fields: Field[];
1987
+ /**
1988
+ * Database indexes to create on this collection.
1989
+ *
1990
+ * Fields participating in indexes are automatically promoted to physical columns.
1991
+ */
1992
+ indexes?: CollectionIndex[];
1993
+ /**
1994
+ * Optional custom prefix for auto-generated document IDs (e.g. `'usr'`, `'cob'`, `'sub'`).
1995
+ * When using the default prefixed ID generator, IDs will follow the format `${idPrefix}_${random}`.
1996
+ */
1997
+ idPrefix?: string;
1998
+ /**
1999
+ * Strategy for generating document IDs when not explicitly provided.
2000
+ * - `'prefixed-nanoid'`: Stripe-style prefixed NanoID (default), e.g. `cob_8xK2p9LmQwRt9a`
2001
+ * - `'nanoid'`: Compact URL-friendly random ID, e.g. `V1StGXR8_Z5jdHi6B-myT`
2002
+ * - `'ulid'`: 26-character Crockford Base32 time-sortable ID, e.g. `01J8K3R4Q7V9N2M1P6W0XYZA3C`
2003
+ * - `'uuid'`: 36-character RFC 4122 UUIDv4, e.g. `f47ac10b-58cc-4372-a567-0e02b2c3d479`
2004
+ *
2005
+ * Defaults to `'prefixed-nanoid'`.
2006
+ */
2007
+ idType?: IdStrategy;
2008
+ /**
2009
+ * Custom function to generate document IDs. Overrides `idType` and `idPrefix`.
2010
+ */
2011
+ idGenerator?: (slug: string) => string;
1929
2012
  /**
1930
2013
  * If `true`, Dyrected automatically adds the built-in system fields
1931
2014
  * `createdAt`, `updatedAt`, `createdBy`, and `updatedBy` to every document.
@@ -2088,6 +2171,31 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2088
2171
  hidden?: boolean;
2089
2172
  /** If `false`, disables the filter UI entirely for this collection. Defaults to `true`. */
2090
2173
  filterable?: boolean;
2174
+ /**
2175
+ * Base query filter applied to this collection's default list view,
2176
+ * before user toolbar filters (e.g. `{ status: { equals: "published" } }`
2177
+ * or a JEXL string). Equivalent to `filter` on `defineView`, without
2178
+ * having to define a separate view and set it as the default.
2179
+ */
2180
+ filter?: Record<string, any> | string;
2181
+ /**
2182
+ * Default sort applied to this collection's default list view when first
2183
+ * opened. Equivalent to `sort` on `defineView`.
2184
+ */
2185
+ sort?: {
2186
+ field: string;
2187
+ direction: "asc" | "desc";
2188
+ };
2189
+ /**
2190
+ * KPI summary cards rendered above this collection's default list view.
2191
+ * Equivalent to `metrics` on `defineView`.
2192
+ */
2193
+ metrics?: ViewMetric[];
2194
+ /**
2195
+ * Field name used to organize this collection's default list view into
2196
+ * collapsible grouped sections. Equivalent to `groupBy` on `defineView`.
2197
+ */
2198
+ groupBy?: string;
2091
2199
  /**
2092
2200
  * Enables draft autosave in the Admin editor for workflow-enabled
2093
2201
  * collections. Defaults to `true` when the collection uses `workflow` or
@@ -2219,6 +2327,29 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2219
2327
  * @see {@link https://dyrected.com/docs/model-content/operational-views/overview Operational views overview}
2220
2328
  */
2221
2329
  views?: ViewConfig[];
2330
+ /**
2331
+ * Custom workflow actions for this collection, independent of any single view.
2332
+ * These run against one document at a time (no `viewSlug` required), so they
2333
+ * work anywhere a document is in scope — most notably the read-only Detail
2334
+ * View, where they can render in the header toolbar (`type: 'header'`) and/or
2335
+ * inline via `displayAction(name)` in the `detail` schema. The same action
2336
+ * definitions can also be referenced from a `defineView`'s own `actions` for
2337
+ * list-page use — they are not mutually exclusive.
2338
+ *
2339
+ * @example
2340
+ * ```ts
2341
+ * actions: [
2342
+ * defineAction({
2343
+ * name: "markShipped",
2344
+ * label: "Mark as shipped",
2345
+ * type: "header",
2346
+ * confirm: "Mark this order as shipped?",
2347
+ * mutation: { status: "shipped" },
2348
+ * }),
2349
+ * ]
2350
+ * ```
2351
+ */
2352
+ actions?: ActionConfig[];
2222
2353
  }
2223
2354
  /**
2224
2355
  * Defines a Dyrected global — a singleton document without pagination or IDs.
@@ -2342,21 +2473,26 @@ interface DatabaseAdapter {
2342
2473
  * ignore it; SQL adapters use it to sort numeric fields by magnitude.
2343
2474
  */
2344
2475
  fields?: Field[];
2476
+ /** Row-level locking strategy (e.g. SELECT ... FOR UPDATE in transactions). */
2477
+ lock?: "for-update";
2345
2478
  }): Promise<PaginatedResult>;
2346
2479
  /** Find a single document by its ID. Returns `null` if not found. */
2347
2480
  findOne(args: {
2348
2481
  collection: string;
2349
2482
  id: string;
2483
+ /** Row-level locking strategy (e.g. SELECT ... FOR UPDATE in transactions). */
2484
+ lock?: "for-update";
2350
2485
  }): Promise<BaseDocument | null>;
2351
2486
  /** Insert a new document and return it with its generated `id`. */
2352
2487
  create(args: {
2353
2488
  collection: string;
2354
2489
  data: Record<string, unknown>;
2355
2490
  }): Promise<BaseDocument>;
2356
- /** Update a document by ID and return the updated document. */
2491
+ /** Update a document by ID or conditional filter and return the updated document. */
2357
2492
  update(args: {
2358
2493
  collection: string;
2359
- id: string;
2494
+ id?: string;
2495
+ where?: Record<string, unknown>;
2360
2496
  data: Record<string, unknown>;
2361
2497
  }): Promise<BaseDocument>;
2362
2498
  /** Delete a document by ID. Return value is intentionally untyped — callers do not use it. */
@@ -3818,4 +3954,4 @@ interface DyrectedContext {
3818
3954
  */
3819
3955
  declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
3820
3956
 
3821
- export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type CollectionTokenPayload as d8, DEFAULT_SESSION_EXPIRY as d9, type DyrectedObservabilityRuntime as da, type RequestBodyCapture as db, type RequestTraceContext as dc, type ResolvedObservabilityConfig as dd, attachRequestMetrics as de, bindObservabilityRuntime as df, buildRequestLogger as dg, captureRequestBody as dh, createDyrectedApp as di, createObservabilityRuntime as dj, createRequestSpan as dk, decodeCollectionToken as dl, endRequestSpan as dm, getConfigLogger as dn, getObservabilityRuntime as dp, getRequestLogger as dq, redactBody as dr, redactHeaders as ds, renderPrometheusMetrics as dt, resolveObservabilityConfig as du, resolveSessionTokenExpiry as dv, shouldSampleRequest as dw, signCollectionToken as dx, verifyCollectionToken as dy, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };
3957
+ export { type ImageField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTabs as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTextOptions as I, type DetailText as J, type DetailSchema as K, type LifecycleEventName as L, type DyrectedContext as M, type AIConfig as N, type AIPIIConfig as O, type PublicAdminAuthConfig as P, type IdStrategy as Q, type ArrayField as R, type FieldType as S, type BooleanField as T, type AuthConfig as U, type AccessPolicyResolver as V, type WorkflowConfig as W, type DateField as X, type DateTimeField as Y, type EmailField as Z, type IconField as _, type DeclarativeHookExpression as a, type BlocksField as a$, type JoinField as a0, type JsonField as a1, type MultiSelectField as a2, type NumberField as a3, type ObjectField as a4, type RadioField as a5, type RelationshipField as a6, type RichTextField as a7, type RowField as a8, type SelectField as a9, type AccessRule as aA, type ActionConfig as aB, type ActionConfigBase as aC, type ActionConfigWithHandler as aD, type ActionConfigWithMutation as aE, type ActionContext as aF, type ActionType as aG, type AdminAuthAccessResolution as aH, type AdminAuthClaimMapping as aI, type AdminAuthMember as aJ, type AdminAuthProvider as aK, type AdminAuthProviderMembersConfig as aL, type AdminAuthProvisioningMode as aM, type AdminAuthResolveAccessArgs as aN, type AdminAuthResolvedIdentity as aO, type AdminConfig as aP, type AdminDashboardComponentSlots as aQ, type AdminIconName as aR, type AggregateArgs as aS, type AggregateCastType as aT, type AggregateCollectionResult as aU, type AggregateInput as aV, type AggregateOperation as aW, type AggregateResult as aX, type BaseAdminAuthProvider as aY, type BaseFieldAdmin as aZ, type BlockVariant as a_, type TextField as aa, type TextareaField as ab, type TimeField as ac, type UrlField as ad, type AIAction as ae, type AIActionStatus as af, type AIActionType as ag, type AIAuditActionType as ah, type AIAuditRecord as ai, type AIChunk as aj, type AIMessage as ak, type AIPIIPattern as al, type AIRateLimitResult as am, type AIRateLimitStore as an, type AIThread as ao, type AIToolContext as ap, type AIToolDefinition as aq, AI_ACTIONS_COLLECTION as ar, AI_AUDIT_COLLECTION as as, AI_CHUNKS_COLLECTION as at, AI_MESSAGES_COLLECTION as au, AI_THREADS_COLLECTION as av, type AccessConfig as aw, type AccessFunction as ax, type AccessFunctionArgs as ay, type AccessResult as az, type AuthenticatedUser as b, type GlobalAfterChangeHook as b$, type BooleanFieldAdmin as b0, type BooleanFormat as b1, type CharacterLimitFieldAdmin as b2, type CharacterLimitFieldConfig as b3, type CollectionAfterChangeHook as b4, type CollectionAfterDeleteHook as b5, type CollectionAfterReadHook as b6, type CollectionAfterReadHookEntry as b7, type CollectionAfterTransitionHook as b8, type CollectionBeforeChangeHook as b9, type DisplayTone as bA, type DisplayVariant as bB, type DistinctCountOperation as bC, type DistinctValuesOperation as bD, type DynamicOptionItem as bE, type DynamicOptionsConfig as bF, type DynamicOptionsResolver as bG, type DynamicOptionsResolverArgs as bH, type DyrectedAIContext as bI, type DyrectedLoggerConfig as bJ, type DyrectedObservabilityConfig as bK, type EmailFieldAdmin as bL, type FieldAdminHooks as bM, type FieldAdminOnChangeHook as bN, type FieldAdminOnChangeHookArgs as bO, type FieldAdminOptionsHook as bP, type FieldAdminOptionsHookArgs as bQ, type FieldAdminOptionsHookResult as bR, type FieldAfterReadHook as bS, type FieldAfterReadHookArgs as bT, type FieldBase as bU, type FieldBeforeChangeHook as bV, type FieldBeforeChangeHookArgs as bW, type FieldHook as bX, type FieldHooks as bY, type FileData as bZ, type GetDocumentResult as b_, type CollectionBeforeChangeHookEntry as ba, type CollectionBeforeDeleteHook as bb, type CollectionBeforeReadHook as bc, type CollectionBeforeReadHookEntry as bd, type CollectionBeforeTransitionHook as be, type CollectionIndex as bf, type CollectionListComponentSlots as bg, type CollectionRAGConfig as bh, type CollectionSchemaResult as bi, type CollectionSummaryResult as bj, type CollectionViewComponentSlots as bk, type CountOperation as bl, type CustomAdminAuthProvider as bm, type DatabaseAdapter as bn, type DateFieldAdmin as bo, type DateFormat as bp, type DefaultValueContext as bq, type DefineActionOptions as br, type DefineCalendarViewOptions as bs, type DefineCardsViewOptions as bt, type DefineGanttViewOptions as bu, type DefineKanbanViewOptions as bv, type DefineTableViewOptions as bw, type DefineViewBaseOptions as bx, type DefineViewOptions as by, type DetailSpan as bz, type WorkflowTransition as c, type WorkflowMetadata as c$, type GlobalAfterReadHook as c0, type GlobalAfterReadHookEntry as c1, type GlobalBeforeChangeHook as c2, type GlobalBeforeChangeHookEntry as c3, type GlobalBeforeReadHook as c4, type GlobalBeforeReadHookEntry as c5, type GlobalRAGConfig as c6, type GlobalSchemaResult as c7, type GlobalSummaryResult as c8, type HeadingLevel as c9, type RadioFieldAdmin as cA, type RateLimitConfig as cB, type ReadonlyDatabaseAdapter as cC, type RichTextFeature as cD, type RichTextFieldConfig as cE, type SelectFieldAdmin as cF, type SqlWhereResult as cG, type StorageAdapter as cH, type TextFieldAdmin as cI, type TextFormat as cJ, type TextareaFieldAdmin as cK, type TrustProxyConfig as cL, type TypedField as cM, type UploadConfig as cN, type UrlFieldAdmin as cO, type UrlLinkValue as cP, type ViewActionFeatures as cQ, type ViewComponentSlots as cR, type ViewConfig as cS, type ViewLayout as cT, type ViewMetric as cU, type ViewSubMetric as cV, type WhereClause as cW, type WhereOperator as cX, type WhereOperatorName as cY, type WordLimitFieldAdmin as cZ, type WordLimitFieldConfig as c_, type HookFunction as ca, type IconFieldAdmin as cb, type ImageService as cc, type ImageTransformOptions as cd, type InferAggregateResult as ce, type JoinFieldAdmin as cf, type JsonFieldAdmin as cg, type JsonFormat as ch, LIFECYCLE_EVENT_NAMES as ci, type LifecycleEventHandler as cj, type LinkFormat as ck, type MetricColor as cl, type MultiSelectFieldAdmin as cm, type NamedAccessPolicy as cn, type NumberFieldAdmin as co, type NumberFormat as cp, type NumberLimitFieldAdmin as cq, type NumberLimitFieldConfig as cr, type NumericOperation as cs, type NumericUpdateOperator as ct, type OIDCAdminAuthProvider as cu, type OptionFormat as cv, type PaginatedResult as cw, type PublicAdminAuthProvider as cx, type QueryCollectionResult as cy, type RAGSearchResult as cz, type LifecycleEvent as d, type WorkflowRole as d0, type WorkflowState as d1, type WorkflowTransitionContext as d2, defineAction as d3, defineCalendarView as d4, defineCardsView as d5, defineGanttView as d6, defineKanbanView as d7, defineTableView as d8, defineView as d9, resolveSessionTokenExpiry as dA, shouldSampleRequest as dB, signCollectionToken as dC, verifyCollectionToken as dD, isAICollection as da, parseMongoWhere as db, parseSqlWhere as dc, type CollectionTokenPayload as dd, DEFAULT_SESSION_EXPIRY as de, type DyrectedObservabilityRuntime as df, type RequestBodyCapture as dg, type RequestTraceContext as dh, type ResolvedObservabilityConfig as di, attachRequestMetrics as dj, bindObservabilityRuntime as dk, buildRequestLogger as dl, captureRequestBody as dm, createDyrectedApp as dn, createObservabilityRuntime as dp, createRequestSpan as dq, decodeCollectionToken as dr, endRequestSpan as ds, getConfigLogger as dt, getObservabilityRuntime as du, getRequestLogger as dv, redactBody as dw, redactHeaders as dx, renderPrometheusMetrics as dy, resolveObservabilityConfig as dz, type BaseDocument as e, type DetailActionOptions as f, type DetailAction as g, type DetailComputedOptions as h, type ComputedHandler as i, type DetailComputed as j, type DetailCustomOptions as k, type DetailCustom as l, type DetailDividerOptions as m, type DetailDivider as n, type DisplayFieldOptions as o, type DetailField as p, type DetailItem as q, type DetailGridOptions as r, type DetailGrid as s, type DetailRepeatOptions as t, type DetailRepeat as u, type DetailSectionOptions as v, type DetailSection as w, type DetailTabOptions as x, type DetailTab as y, type DetailTabsOptions as z };
@@ -1153,10 +1153,44 @@ interface DetailCustom<TDoc = any> {
1153
1153
  /** Custom component options. */
1154
1154
  options?: DetailCustomOptions<TDoc>;
1155
1155
  }
1156
+ /**
1157
+ * Configuration options for rendering an action button in a Detail View.
1158
+ */
1159
+ interface DetailActionOptions {
1160
+ /** Grid column span across the 12-column grid. */
1161
+ span?: DetailSpan;
1162
+ /** Button visual style. Defaults to `'outline'`. */
1163
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive";
1164
+ /** Button size. Defaults to `'sm'`. */
1165
+ size?: "sm" | "default";
1166
+ /** Overrides the action's own `label` for this placement. */
1167
+ label?: string;
1168
+ /**
1169
+ * Visibility condition for this action item.
1170
+ * Can be a boolean or a JEXL expression evaluated against `{ doc, user }`.
1171
+ */
1172
+ visible?: string | boolean;
1173
+ }
1174
+ /**
1175
+ * Renders a button for a named action from `collection.actions` at this
1176
+ * position in a Detail View. The same action (and its confirm dialog, modal
1177
+ * fields, and execution) can also render automatically in the Detail View's
1178
+ * header toolbar when the action's `type` is `'header'` — placing it here
1179
+ * too does not duplicate that config, it just adds another entry point to
1180
+ * the same action.
1181
+ */
1182
+ interface DetailAction {
1183
+ /** Identifies this item as an action button. */
1184
+ type: "action";
1185
+ /** Name of the action, matching an entry in `collection.actions`. */
1186
+ name: string;
1187
+ /** Display and visibility options for this placement. */
1188
+ options?: DetailActionOptions;
1189
+ }
1156
1190
  /**
1157
1191
  * Union of all valid item types in a Detail View schema.
1158
1192
  */
1159
- type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailField | DetailRepeat | DetailComputed<TDoc> | DetailDivider | DetailText | DetailCustom<TDoc> | string;
1193
+ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailField | DetailRepeat | DetailComputed<TDoc> | DetailDivider | DetailText | DetailCustom<TDoc> | DetailAction | string;
1160
1194
  /**
1161
1195
  * Detail View layout schema definition for a collection or global.
1162
1196
  */
@@ -1550,9 +1584,9 @@ type ActionConfig<TDoc extends Record<string, unknown> = Record<string, unknown>
1550
1584
  * Context passed to an action's server handler function.
1551
1585
  */
1552
1586
  interface ActionContext<TDoc extends Record<string, unknown> = Record<string, unknown>> {
1553
- /** The target document (for row actions). */
1554
- doc: TDoc;
1555
- /** All targeted documents (for bulk actions). */
1587
+ /** The target document (for row actions), or null for header actions. */
1588
+ doc: TDoc | null;
1589
+ /** All targeted documents (for bulk actions). Empty array for header actions. */
1556
1590
  docs: TDoc[];
1557
1591
  /** The authenticated acting user, if available. */
1558
1592
  user: Record<string, unknown> | null;
@@ -1801,6 +1835,30 @@ interface AuthConfig {
1801
1835
  */
1802
1836
  adminRole?: string;
1803
1837
  }
1838
+ /**
1839
+ * Physical database index specification for a collection.
1840
+ */
1841
+ interface CollectionIndex {
1842
+ /** Optional custom index name. If omitted, adapter auto-generates one. */
1843
+ name?: string;
1844
+ /** Field names participating in the index. */
1845
+ fields: string[];
1846
+ /** Whether the index enforces database-level uniqueness. Defaults to false. */
1847
+ unique?: boolean;
1848
+ /** Whether to only index non-null rows where supported. */
1849
+ sparse?: boolean;
1850
+ }
1851
+ /**
1852
+ * Atomic numeric update operators for database mutation payloads.
1853
+ */
1854
+ interface NumericUpdateOperator {
1855
+ increment?: number;
1856
+ decrement?: number;
1857
+ }
1858
+ /**
1859
+ * Strategy for generating document IDs.
1860
+ */
1861
+ type IdStrategy = "prefixed-nanoid" | "nanoid" | "ulid" | "uuid";
1804
1862
  /**
1805
1863
  * Use this contract when you want the exact shape of a collection config.
1806
1864
  *
@@ -1926,6 +1984,31 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
1926
1984
  * @see {@link https://dyrected.com/docs/model-content/fields/blocks Blocks and page sections}
1927
1985
  */
1928
1986
  fields: Field[];
1987
+ /**
1988
+ * Database indexes to create on this collection.
1989
+ *
1990
+ * Fields participating in indexes are automatically promoted to physical columns.
1991
+ */
1992
+ indexes?: CollectionIndex[];
1993
+ /**
1994
+ * Optional custom prefix for auto-generated document IDs (e.g. `'usr'`, `'cob'`, `'sub'`).
1995
+ * When using the default prefixed ID generator, IDs will follow the format `${idPrefix}_${random}`.
1996
+ */
1997
+ idPrefix?: string;
1998
+ /**
1999
+ * Strategy for generating document IDs when not explicitly provided.
2000
+ * - `'prefixed-nanoid'`: Stripe-style prefixed NanoID (default), e.g. `cob_8xK2p9LmQwRt9a`
2001
+ * - `'nanoid'`: Compact URL-friendly random ID, e.g. `V1StGXR8_Z5jdHi6B-myT`
2002
+ * - `'ulid'`: 26-character Crockford Base32 time-sortable ID, e.g. `01J8K3R4Q7V9N2M1P6W0XYZA3C`
2003
+ * - `'uuid'`: 36-character RFC 4122 UUIDv4, e.g. `f47ac10b-58cc-4372-a567-0e02b2c3d479`
2004
+ *
2005
+ * Defaults to `'prefixed-nanoid'`.
2006
+ */
2007
+ idType?: IdStrategy;
2008
+ /**
2009
+ * Custom function to generate document IDs. Overrides `idType` and `idPrefix`.
2010
+ */
2011
+ idGenerator?: (slug: string) => string;
1929
2012
  /**
1930
2013
  * If `true`, Dyrected automatically adds the built-in system fields
1931
2014
  * `createdAt`, `updatedAt`, `createdBy`, and `updatedBy` to every document.
@@ -2088,6 +2171,31 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2088
2171
  hidden?: boolean;
2089
2172
  /** If `false`, disables the filter UI entirely for this collection. Defaults to `true`. */
2090
2173
  filterable?: boolean;
2174
+ /**
2175
+ * Base query filter applied to this collection's default list view,
2176
+ * before user toolbar filters (e.g. `{ status: { equals: "published" } }`
2177
+ * or a JEXL string). Equivalent to `filter` on `defineView`, without
2178
+ * having to define a separate view and set it as the default.
2179
+ */
2180
+ filter?: Record<string, any> | string;
2181
+ /**
2182
+ * Default sort applied to this collection's default list view when first
2183
+ * opened. Equivalent to `sort` on `defineView`.
2184
+ */
2185
+ sort?: {
2186
+ field: string;
2187
+ direction: "asc" | "desc";
2188
+ };
2189
+ /**
2190
+ * KPI summary cards rendered above this collection's default list view.
2191
+ * Equivalent to `metrics` on `defineView`.
2192
+ */
2193
+ metrics?: ViewMetric[];
2194
+ /**
2195
+ * Field name used to organize this collection's default list view into
2196
+ * collapsible grouped sections. Equivalent to `groupBy` on `defineView`.
2197
+ */
2198
+ groupBy?: string;
2091
2199
  /**
2092
2200
  * Enables draft autosave in the Admin editor for workflow-enabled
2093
2201
  * collections. Defaults to `true` when the collection uses `workflow` or
@@ -2219,6 +2327,29 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2219
2327
  * @see {@link https://dyrected.com/docs/model-content/operational-views/overview Operational views overview}
2220
2328
  */
2221
2329
  views?: ViewConfig[];
2330
+ /**
2331
+ * Custom workflow actions for this collection, independent of any single view.
2332
+ * These run against one document at a time (no `viewSlug` required), so they
2333
+ * work anywhere a document is in scope — most notably the read-only Detail
2334
+ * View, where they can render in the header toolbar (`type: 'header'`) and/or
2335
+ * inline via `displayAction(name)` in the `detail` schema. The same action
2336
+ * definitions can also be referenced from a `defineView`'s own `actions` for
2337
+ * list-page use — they are not mutually exclusive.
2338
+ *
2339
+ * @example
2340
+ * ```ts
2341
+ * actions: [
2342
+ * defineAction({
2343
+ * name: "markShipped",
2344
+ * label: "Mark as shipped",
2345
+ * type: "header",
2346
+ * confirm: "Mark this order as shipped?",
2347
+ * mutation: { status: "shipped" },
2348
+ * }),
2349
+ * ]
2350
+ * ```
2351
+ */
2352
+ actions?: ActionConfig[];
2222
2353
  }
2223
2354
  /**
2224
2355
  * Defines a Dyrected global — a singleton document without pagination or IDs.
@@ -2342,21 +2473,26 @@ interface DatabaseAdapter {
2342
2473
  * ignore it; SQL adapters use it to sort numeric fields by magnitude.
2343
2474
  */
2344
2475
  fields?: Field[];
2476
+ /** Row-level locking strategy (e.g. SELECT ... FOR UPDATE in transactions). */
2477
+ lock?: "for-update";
2345
2478
  }): Promise<PaginatedResult>;
2346
2479
  /** Find a single document by its ID. Returns `null` if not found. */
2347
2480
  findOne(args: {
2348
2481
  collection: string;
2349
2482
  id: string;
2483
+ /** Row-level locking strategy (e.g. SELECT ... FOR UPDATE in transactions). */
2484
+ lock?: "for-update";
2350
2485
  }): Promise<BaseDocument | null>;
2351
2486
  /** Insert a new document and return it with its generated `id`. */
2352
2487
  create(args: {
2353
2488
  collection: string;
2354
2489
  data: Record<string, unknown>;
2355
2490
  }): Promise<BaseDocument>;
2356
- /** Update a document by ID and return the updated document. */
2491
+ /** Update a document by ID or conditional filter and return the updated document. */
2357
2492
  update(args: {
2358
2493
  collection: string;
2359
- id: string;
2494
+ id?: string;
2495
+ where?: Record<string, unknown>;
2360
2496
  data: Record<string, unknown>;
2361
2497
  }): Promise<BaseDocument>;
2362
2498
  /** Delete a document by ID. Return value is intentionally untyped — callers do not use it. */
@@ -3818,4 +3954,4 @@ interface DyrectedContext {
3818
3954
  */
3819
3955
  declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
3820
3956
 
3821
- export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type CollectionTokenPayload as d8, DEFAULT_SESSION_EXPIRY as d9, type DyrectedObservabilityRuntime as da, type RequestBodyCapture as db, type RequestTraceContext as dc, type ResolvedObservabilityConfig as dd, attachRequestMetrics as de, bindObservabilityRuntime as df, buildRequestLogger as dg, captureRequestBody as dh, createDyrectedApp as di, createObservabilityRuntime as dj, createRequestSpan as dk, decodeCollectionToken as dl, endRequestSpan as dm, getConfigLogger as dn, getObservabilityRuntime as dp, getRequestLogger as dq, redactBody as dr, redactHeaders as ds, renderPrometheusMetrics as dt, resolveObservabilityConfig as du, resolveSessionTokenExpiry as dv, shouldSampleRequest as dw, signCollectionToken as dx, verifyCollectionToken as dy, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };
3957
+ export { type ImageField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTabs as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTextOptions as I, type DetailText as J, type DetailSchema as K, type LifecycleEventName as L, type DyrectedContext as M, type AIConfig as N, type AIPIIConfig as O, type PublicAdminAuthConfig as P, type IdStrategy as Q, type ArrayField as R, type FieldType as S, type BooleanField as T, type AuthConfig as U, type AccessPolicyResolver as V, type WorkflowConfig as W, type DateField as X, type DateTimeField as Y, type EmailField as Z, type IconField as _, type DeclarativeHookExpression as a, type BlocksField as a$, type JoinField as a0, type JsonField as a1, type MultiSelectField as a2, type NumberField as a3, type ObjectField as a4, type RadioField as a5, type RelationshipField as a6, type RichTextField as a7, type RowField as a8, type SelectField as a9, type AccessRule as aA, type ActionConfig as aB, type ActionConfigBase as aC, type ActionConfigWithHandler as aD, type ActionConfigWithMutation as aE, type ActionContext as aF, type ActionType as aG, type AdminAuthAccessResolution as aH, type AdminAuthClaimMapping as aI, type AdminAuthMember as aJ, type AdminAuthProvider as aK, type AdminAuthProviderMembersConfig as aL, type AdminAuthProvisioningMode as aM, type AdminAuthResolveAccessArgs as aN, type AdminAuthResolvedIdentity as aO, type AdminConfig as aP, type AdminDashboardComponentSlots as aQ, type AdminIconName as aR, type AggregateArgs as aS, type AggregateCastType as aT, type AggregateCollectionResult as aU, type AggregateInput as aV, type AggregateOperation as aW, type AggregateResult as aX, type BaseAdminAuthProvider as aY, type BaseFieldAdmin as aZ, type BlockVariant as a_, type TextField as aa, type TextareaField as ab, type TimeField as ac, type UrlField as ad, type AIAction as ae, type AIActionStatus as af, type AIActionType as ag, type AIAuditActionType as ah, type AIAuditRecord as ai, type AIChunk as aj, type AIMessage as ak, type AIPIIPattern as al, type AIRateLimitResult as am, type AIRateLimitStore as an, type AIThread as ao, type AIToolContext as ap, type AIToolDefinition as aq, AI_ACTIONS_COLLECTION as ar, AI_AUDIT_COLLECTION as as, AI_CHUNKS_COLLECTION as at, AI_MESSAGES_COLLECTION as au, AI_THREADS_COLLECTION as av, type AccessConfig as aw, type AccessFunction as ax, type AccessFunctionArgs as ay, type AccessResult as az, type AuthenticatedUser as b, type GlobalAfterChangeHook as b$, type BooleanFieldAdmin as b0, type BooleanFormat as b1, type CharacterLimitFieldAdmin as b2, type CharacterLimitFieldConfig as b3, type CollectionAfterChangeHook as b4, type CollectionAfterDeleteHook as b5, type CollectionAfterReadHook as b6, type CollectionAfterReadHookEntry as b7, type CollectionAfterTransitionHook as b8, type CollectionBeforeChangeHook as b9, type DisplayTone as bA, type DisplayVariant as bB, type DistinctCountOperation as bC, type DistinctValuesOperation as bD, type DynamicOptionItem as bE, type DynamicOptionsConfig as bF, type DynamicOptionsResolver as bG, type DynamicOptionsResolverArgs as bH, type DyrectedAIContext as bI, type DyrectedLoggerConfig as bJ, type DyrectedObservabilityConfig as bK, type EmailFieldAdmin as bL, type FieldAdminHooks as bM, type FieldAdminOnChangeHook as bN, type FieldAdminOnChangeHookArgs as bO, type FieldAdminOptionsHook as bP, type FieldAdminOptionsHookArgs as bQ, type FieldAdminOptionsHookResult as bR, type FieldAfterReadHook as bS, type FieldAfterReadHookArgs as bT, type FieldBase as bU, type FieldBeforeChangeHook as bV, type FieldBeforeChangeHookArgs as bW, type FieldHook as bX, type FieldHooks as bY, type FileData as bZ, type GetDocumentResult as b_, type CollectionBeforeChangeHookEntry as ba, type CollectionBeforeDeleteHook as bb, type CollectionBeforeReadHook as bc, type CollectionBeforeReadHookEntry as bd, type CollectionBeforeTransitionHook as be, type CollectionIndex as bf, type CollectionListComponentSlots as bg, type CollectionRAGConfig as bh, type CollectionSchemaResult as bi, type CollectionSummaryResult as bj, type CollectionViewComponentSlots as bk, type CountOperation as bl, type CustomAdminAuthProvider as bm, type DatabaseAdapter as bn, type DateFieldAdmin as bo, type DateFormat as bp, type DefaultValueContext as bq, type DefineActionOptions as br, type DefineCalendarViewOptions as bs, type DefineCardsViewOptions as bt, type DefineGanttViewOptions as bu, type DefineKanbanViewOptions as bv, type DefineTableViewOptions as bw, type DefineViewBaseOptions as bx, type DefineViewOptions as by, type DetailSpan as bz, type WorkflowTransition as c, type WorkflowMetadata as c$, type GlobalAfterReadHook as c0, type GlobalAfterReadHookEntry as c1, type GlobalBeforeChangeHook as c2, type GlobalBeforeChangeHookEntry as c3, type GlobalBeforeReadHook as c4, type GlobalBeforeReadHookEntry as c5, type GlobalRAGConfig as c6, type GlobalSchemaResult as c7, type GlobalSummaryResult as c8, type HeadingLevel as c9, type RadioFieldAdmin as cA, type RateLimitConfig as cB, type ReadonlyDatabaseAdapter as cC, type RichTextFeature as cD, type RichTextFieldConfig as cE, type SelectFieldAdmin as cF, type SqlWhereResult as cG, type StorageAdapter as cH, type TextFieldAdmin as cI, type TextFormat as cJ, type TextareaFieldAdmin as cK, type TrustProxyConfig as cL, type TypedField as cM, type UploadConfig as cN, type UrlFieldAdmin as cO, type UrlLinkValue as cP, type ViewActionFeatures as cQ, type ViewComponentSlots as cR, type ViewConfig as cS, type ViewLayout as cT, type ViewMetric as cU, type ViewSubMetric as cV, type WhereClause as cW, type WhereOperator as cX, type WhereOperatorName as cY, type WordLimitFieldAdmin as cZ, type WordLimitFieldConfig as c_, type HookFunction as ca, type IconFieldAdmin as cb, type ImageService as cc, type ImageTransformOptions as cd, type InferAggregateResult as ce, type JoinFieldAdmin as cf, type JsonFieldAdmin as cg, type JsonFormat as ch, LIFECYCLE_EVENT_NAMES as ci, type LifecycleEventHandler as cj, type LinkFormat as ck, type MetricColor as cl, type MultiSelectFieldAdmin as cm, type NamedAccessPolicy as cn, type NumberFieldAdmin as co, type NumberFormat as cp, type NumberLimitFieldAdmin as cq, type NumberLimitFieldConfig as cr, type NumericOperation as cs, type NumericUpdateOperator as ct, type OIDCAdminAuthProvider as cu, type OptionFormat as cv, type PaginatedResult as cw, type PublicAdminAuthProvider as cx, type QueryCollectionResult as cy, type RAGSearchResult as cz, type LifecycleEvent as d, type WorkflowRole as d0, type WorkflowState as d1, type WorkflowTransitionContext as d2, defineAction as d3, defineCalendarView as d4, defineCardsView as d5, defineGanttView as d6, defineKanbanView as d7, defineTableView as d8, defineView as d9, resolveSessionTokenExpiry as dA, shouldSampleRequest as dB, signCollectionToken as dC, verifyCollectionToken as dD, isAICollection as da, parseMongoWhere as db, parseSqlWhere as dc, type CollectionTokenPayload as dd, DEFAULT_SESSION_EXPIRY as de, type DyrectedObservabilityRuntime as df, type RequestBodyCapture as dg, type RequestTraceContext as dh, type ResolvedObservabilityConfig as di, attachRequestMetrics as dj, bindObservabilityRuntime as dk, buildRequestLogger as dl, captureRequestBody as dm, createDyrectedApp as dn, createObservabilityRuntime as dp, createRequestSpan as dq, decodeCollectionToken as dr, endRequestSpan as ds, getConfigLogger as dt, getObservabilityRuntime as du, getRequestLogger as dv, redactBody as dw, redactHeaders as dx, renderPrometheusMetrics as dy, resolveObservabilityConfig as dz, type BaseDocument as e, type DetailActionOptions as f, type DetailAction as g, type DetailComputedOptions as h, type ComputedHandler as i, type DetailComputed as j, type DetailCustomOptions as k, type DetailCustom as l, type DetailDividerOptions as m, type DetailDivider as n, type DisplayFieldOptions as o, type DetailField as p, type DetailItem as q, type DetailGridOptions as r, type DetailGrid as s, type DetailRepeatOptions as t, type DetailRepeat as u, type DetailSectionOptions as v, type DetailSection as w, type DetailTabOptions as x, type DetailTab as y, type DetailTabsOptions as z };