@dyrected/core 2.18.0 → 2.19.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.
@@ -392,7 +392,7 @@ interface AggregateCollectionResult {
392
392
  collection: string;
393
393
  result: Record<string, unknown>;
394
394
  }
395
- type AIActionType = 'createDocument' | 'updateDocument' | 'deleteDocument' | 'updateGlobal';
395
+ type AIActionType = 'createDocument' | 'updateDocument' | 'deleteDocument' | 'updateGlobal' | 'restoreDocument';
396
396
  type AIActionStatus = 'pending' | 'approved' | 'rejected' | 'executed' | 'failed';
397
397
  interface AIAction {
398
398
  id: string;
@@ -1059,6 +1059,8 @@ interface DefineWorkspaceOptions {
1059
1059
  global?: string;
1060
1060
  /** Designates this item as the dashboard link. */
1061
1061
  dashboard?: boolean;
1062
+ /** Designates this item as the trash link. */
1063
+ trash?: boolean;
1062
1064
  /** Stable URL slug for standalone operational workspaces (`/:slug`). */
1063
1065
  slug?: string;
1064
1066
  /** Display label in the sidebar (defaults to collection/global label when applicable). */
@@ -1106,7 +1108,7 @@ declare function defineWorkspace(options: DefineWorkspaceOptions): DefineWorkspa
1106
1108
  */
1107
1109
  interface CompiledNavItem {
1108
1110
  id: string;
1109
- type: "workspace" | "collection" | "global" | "dashboard" | "link";
1111
+ type: "workspace" | "collection" | "global" | "dashboard" | "trash" | "link";
1110
1112
  slug: string;
1111
1113
  label: string;
1112
1114
  icon?: string;
@@ -1139,7 +1141,7 @@ interface CompiledNavTree {
1139
1141
  ungrouped: CompiledNavItem[];
1140
1142
  }
1141
1143
  interface PinnedNavItemRef {
1142
- type: "workspace" | "collection" | "global" | "link" | "dashboard";
1144
+ type: "workspace" | "collection" | "global" | "trash" | "link" | "dashboard";
1143
1145
  slug: string;
1144
1146
  view?: string;
1145
1147
  label?: string;
@@ -1341,7 +1343,7 @@ type CollectionBeforeCommitHook<TDoc extends object = Record<string, unknown>> =
1341
1343
  tx: DatabaseAdapter;
1342
1344
  }) => void | Promise<void>;
1343
1345
  /**
1344
- * Runs **before** a document is deleted from the database.
1346
+ * Runs **before** a document is deleted from the database or moved to trash.
1345
1347
  */
1346
1348
  type CollectionBeforeDeleteHook<TDoc extends object = Record<string, unknown>> = (args: {
1347
1349
  id: string;
@@ -1349,9 +1351,10 @@ type CollectionBeforeDeleteHook<TDoc extends object = Record<string, unknown>> =
1349
1351
  req: HookRequestContext;
1350
1352
  user?: AuthenticatedUser;
1351
1353
  db: ReadonlyDatabaseAdapter;
1354
+ mode?: "trash" | "permanent";
1352
1355
  }) => void | Promise<void>;
1353
1356
  /**
1354
- * Runs **after** a document has been deleted from the database.
1357
+ * Runs **after** a document has been permanently deleted from the database.
1355
1358
  */
1356
1359
  type CollectionAfterDeleteHook<TDoc extends object = Record<string, unknown>> = (args: {
1357
1360
  id: string;
@@ -1359,6 +1362,47 @@ type CollectionAfterDeleteHook<TDoc extends object = Record<string, unknown>> =
1359
1362
  req: HookRequestContext;
1360
1363
  user?: AuthenticatedUser;
1361
1364
  db: DatabaseAdapter;
1365
+ mode?: "permanent";
1366
+ }) => void | Promise<void>;
1367
+ /**
1368
+ * Runs **before** a document is moved to trash.
1369
+ */
1370
+ type CollectionBeforeTrashHook<TDoc extends object = Record<string, unknown>> = (args: {
1371
+ id: string;
1372
+ doc: TDoc;
1373
+ req: HookRequestContext;
1374
+ user?: AuthenticatedUser;
1375
+ db: ReadonlyDatabaseAdapter;
1376
+ }) => void | Promise<void>;
1377
+ /**
1378
+ * Runs **after** a document has been moved to trash.
1379
+ */
1380
+ type CollectionAfterTrashHook<TDoc extends object = Record<string, unknown>> = (args: {
1381
+ id: string;
1382
+ doc: TDoc;
1383
+ req: HookRequestContext;
1384
+ user?: AuthenticatedUser;
1385
+ db: DatabaseAdapter;
1386
+ }) => void | Promise<void>;
1387
+ /**
1388
+ * Runs **before** a trashed document is restored.
1389
+ */
1390
+ type CollectionBeforeRestoreHook<TDoc extends object = Record<string, unknown>> = (args: {
1391
+ id: string;
1392
+ doc: TDoc;
1393
+ req: HookRequestContext;
1394
+ user?: AuthenticatedUser;
1395
+ db: ReadonlyDatabaseAdapter;
1396
+ }) => void | Promise<void>;
1397
+ /**
1398
+ * Runs **after** a trashed document has been restored.
1399
+ */
1400
+ type CollectionAfterRestoreHook<TDoc extends object = Record<string, unknown>> = (args: {
1401
+ id: string;
1402
+ doc: TDoc;
1403
+ req: HookRequestContext;
1404
+ user?: AuthenticatedUser;
1405
+ db: DatabaseAdapter;
1362
1406
  }) => void | Promise<void>;
1363
1407
  /** @see {@link CollectionBeforeReadHook} */
1364
1408
  type GlobalBeforeReadHook = CollectionBeforeReadHook;
@@ -1970,6 +2014,15 @@ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailFi
1970
2014
  */
1971
2015
  type DetailSchema<TDoc = any> = DetailItem<TDoc>[];
1972
2016
 
2017
+ /**
2018
+ * Trash and retention configuration for a collection.
2019
+ */
2020
+ interface TrashConfig {
2021
+ /** Days before automatic permanent deletion. `null` or omitted: never auto-purge. */
2022
+ retentionDays?: number | null;
2023
+ /** Show and allow "Delete forever" in API/UI. Default true. */
2024
+ allowPermanentDelete?: boolean;
2025
+ }
1973
2026
  /**
1974
2027
  * Configures account lockout behavior for an auth-enabled collection.
1975
2028
  *
@@ -2221,6 +2274,12 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2221
2274
  * live content, and any authorized editor can publish or unpublish entries.
2222
2275
  */
2223
2276
  drafts?: boolean;
2277
+ /**
2278
+ * Trash & retention settings for this collection.
2279
+ * If `true` or an object, deleting a document moves it to trash rather than destroying it.
2280
+ * If `false`, hard deletes immediately.
2281
+ */
2282
+ trash?: boolean | TrashConfig;
2224
2283
  /**
2225
2284
  * Collection-level access control.
2226
2285
  *
@@ -2244,6 +2303,11 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2244
2303
  create?: AccessRule<TDoc>;
2245
2304
  update?: AccessRule<TDoc>;
2246
2305
  delete?: AccessRule<TDoc>;
2306
+ /**
2307
+ * Controls who can restore a trashed document in this collection.
2308
+ * Falls back to `delete` access if omitted.
2309
+ */
2310
+ restore?: AccessRule<TDoc>;
2247
2311
  /**
2248
2312
  * Controls who can read this collection's audit log (`GET /:slug/__audit`),
2249
2313
  * for collections with `audit` enabled. Falls back to the `read` rule when
@@ -2306,6 +2370,14 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2306
2370
  * already committed and will not be undone.
2307
2371
  */
2308
2372
  afterDelete?: CollectionAfterDeleteHook<TDoc>[];
2373
+ /** Runs before a document is moved to trash. Throw to cancel trashing. */
2374
+ beforeTrash?: CollectionBeforeTrashHook<TDoc>[];
2375
+ /** Runs after a document has been moved to trash. Side effects only. */
2376
+ afterTrash?: CollectionAfterTrashHook<TDoc>[];
2377
+ /** Runs before a trashed document is restored. Throw to cancel restoration. */
2378
+ beforeRestore?: CollectionBeforeRestoreHook<TDoc>[];
2379
+ /** Runs after a document has been restored from trash. Side effects only. */
2380
+ afterRestore?: CollectionAfterRestoreHook<TDoc>[];
2309
2381
  };
2310
2382
  /**
2311
2383
  * Admin UI configuration for this collection.
@@ -4061,6 +4133,25 @@ interface DyrectedConfig<TUser extends AuthenticatedUser = AuthenticatedUser> {
4061
4133
  * AI Assistant and LLM tools configuration.
4062
4134
  */
4063
4135
  ai?: AIConfig;
4136
+ /**
4137
+ * App-wide trash & retention configuration.
4138
+ */
4139
+ trash?: AppTrashConfig;
4140
+ }
4141
+ interface AppTrashConfig {
4142
+ /** Every non-system collection defaults to trash when true. */
4143
+ enabled?: boolean;
4144
+ /** Default retention period in days. `null` or omitted: keep until manually purged. */
4145
+ retentionDays?: number | null;
4146
+ /** When false, blocks immediate hard-delete across collections unless overridden. */
4147
+ allowPermanentDelete?: boolean;
4148
+ /** Background purge configuration. */
4149
+ purge?: {
4150
+ /** Cron schedule for automatic purge. Defaults to `"0 3 * * *"`. */
4151
+ cron?: string;
4152
+ /** Maximum number of records to purge per run. Defaults to 200. */
4153
+ batchSize?: number;
4154
+ };
4064
4155
  }
4065
4156
 
4066
4157
  interface CollectionTokenPayload extends JWTPayload {
@@ -4230,4 +4321,4 @@ interface DyrectedContext {
4230
4321
  */
4231
4322
  declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
4232
4323
 
4233
- export { type BooleanField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ArrayField as Z, type FieldType as _, type DeclarativeHookExpression as a, type AggregateCastType as a$, type AuthConfig as a0, type AccessPolicyResolver as a1, type DateField as a2, type DateTimeField as a3, type EmailField as a4, type IconField as a5, type ImageField as a6, type JoinField as a7, type JsonField as a8, type MoneyField as a9, AI_AUDIT_COLLECTION as aA, AI_CHUNKS_COLLECTION as aB, AI_MESSAGES_COLLECTION as aC, AI_THREADS_COLLECTION as aD, type AccessConfig as aE, type AccessFunction as aF, type AccessFunctionArgs as aG, type AccessResult as aH, type AccessRule as aI, type ActionConfig as aJ, type ActionConfigBase as aK, type ActionConfigWithHandler as aL, type ActionConfigWithMutation as aM, type ActionContext as aN, type ActionType as aO, type AdminAuthAccessResolution as aP, type AdminAuthClaimMapping as aQ, type AdminAuthMember as aR, type AdminAuthProvider as aS, type AdminAuthProviderMembersConfig as aT, type AdminAuthProvisioningMode as aU, type AdminAuthResolveAccessArgs as aV, type AdminAuthResolvedIdentity as aW, type AdminConfig as aX, type AdminDashboardComponentSlots as aY, type AdminIconName as aZ, type AggregateArgs as a_, type MultiSelectField as aa, type NumberField as ab, type ObjectField as ac, type RadioField as ad, type RelationshipField as ae, type RichTextField as af, type RowField as ag, type SelectField as ah, type TextField as ai, type TextareaField as aj, type TimeField as ak, type UrlField as al, type AIAction as am, type AIActionStatus as an, type AIActionType as ao, type AIAuditActionType as ap, type AIAuditRecord as aq, type AIChunk as ar, type AIMessage as as, type AIPIIPattern as at, type AIRateLimitResult as au, type AIRateLimitStore as av, type AIThread as aw, type AIToolContext as ax, type AIToolDefinition as ay, AI_ACTIONS_COLLECTION as az, type AuthenticatedUser as b, type FieldAdminOnChangeHookArgs as b$, type AggregateCollectionResult as b0, type AggregateInput as b1, type AggregateOperation as b2, type AggregateResult as b3, type BaseAdminAuthProvider as b4, type BaseFieldAdmin as b5, type BlockVariant as b6, type BlocksField as b7, type BooleanFieldAdmin as b8, type BooleanFormat as b9, DEFAULT_USER_NAV_PREFERENCES as bA, type DateFieldAdmin as bB, type DateFormat as bC, type DefaultValueContext as bD, type DefineActionOptions as bE, type DefineCalendarViewOptions as bF, type DefineCardsViewOptions as bG, type DefineGanttViewOptions as bH, type DefineKanbanViewOptions as bI, type DefineTableViewOptions as bJ, type DefineViewBaseOptions as bK, type DefineViewOptions as bL, type DetailSpan as bM, type DisplayTone as bN, type DisplayVariant as bO, type DistinctCountOperation as bP, type DistinctValuesOperation as bQ, type DynamicOptionItem as bR, type DynamicOptionsConfig as bS, type DynamicOptionsResolver as bT, type DynamicOptionsResolverArgs as bU, type DyrectedAIContext as bV, type DyrectedLoggerConfig as bW, type DyrectedObservabilityConfig as bX, type EmailFieldAdmin as bY, type FieldAdminHooks as bZ, type FieldAdminOnChangeHook as b_, CURRENT_NAV_PREFERENCES_VERSION as ba, type CalendarViewConfig as bb, type CardsViewConfig as bc, type CharacterLimitFieldAdmin as bd, type CharacterLimitFieldConfig as be, type CollectionAfterChangeHook as bf, type CollectionAfterDeleteHook as bg, type CollectionAfterReadHook as bh, type CollectionAfterReadHookEntry as bi, type CollectionAfterTransitionHook as bj, type CollectionBeforeChangeHook as bk, type CollectionBeforeChangeHookEntry as bl, type CollectionBeforeCommitHook as bm, type CollectionBeforeDeleteHook as bn, type CollectionBeforeReadHook as bo, type CollectionBeforeReadHookEntry as bp, type CollectionBeforeTransitionHook as bq, type CollectionIndex as br, type CollectionListComponentSlots as bs, type CollectionRAGConfig as bt, type CollectionSchemaResult as bu, type CollectionSummaryResult as bv, type CollectionViewComponentSlots as bw, type CompiledNavGroup as bx, type CountOperation as by, type CustomAdminAuthProvider as bz, type WorkflowTransition as c, type StorageAdapter as c$, type FieldAdminOptionsHook as c0, type FieldAdminOptionsHookArgs as c1, type FieldAdminOptionsHookResult as c2, type FieldAfterReadHook as c3, type FieldAfterReadHookArgs as c4, type FieldBase as c5, type FieldBeforeChangeHook as c6, type FieldBeforeChangeHookArgs as c7, type FieldHook as c8, type FieldHooks as c9, type MetricColor as cA, type MoneyFieldAdmin as cB, type MoneyFieldConfig as cC, type MultiSelectFieldAdmin as cD, type NamedAccessPolicy as cE, type NavBadgeConfig as cF, type NavGroup as cG, type NumberFieldAdmin as cH, type NumberFormat as cI, type NumberLimitFieldAdmin as cJ, type NumberLimitFieldConfig as cK, type NumericOperation as cL, type NumericUpdateOperator as cM, type OIDCAdminAuthProvider as cN, type OptionFormat as cO, type PaginatedResult as cP, type PinnedNavItemRef as cQ, type PublicAdminAuthProvider as cR, type QueryCollectionResult as cS, type RAGSearchResult as cT, type RadioFieldAdmin as cU, type RateLimitConfig as cV, type ReadonlyDatabaseAdapter as cW, type RichTextFeature as cX, type RichTextFieldConfig as cY, type SelectFieldAdmin as cZ, type SqlWhereResult as c_, type FileData as ca, type GanttViewConfig as cb, type GetDocumentResult as cc, type GlobalAfterChangeHook as cd, type GlobalAfterReadHook as ce, type GlobalAfterReadHookEntry as cf, type GlobalBeforeChangeHook as cg, type GlobalBeforeChangeHookEntry as ch, type GlobalBeforeReadHook as ci, type GlobalBeforeReadHookEntry as cj, type GlobalRAGConfig as ck, type GlobalSchemaResult as cl, type GlobalSummaryResult as cm, type HeadingLevel as cn, type HookFunction as co, type IconFieldAdmin as cp, type ImageService as cq, type ImageTransformOptions as cr, type InferAggregateResult as cs, type JoinFieldAdmin as ct, type JsonFieldAdmin as cu, type JsonFormat as cv, type KanbanViewConfig as cw, LIFECYCLE_EVENT_NAMES as cx, type LifecycleEventHandler as cy, type LinkFormat as cz, type LifecycleEvent as d, renderPrometheusMetrics as d$, type TableViewConfig as d0, type TaskContext as d1, type TaskLogger as d2, type TaskRunStatus as d3, type TextFieldAdmin as d4, type TextFormat as d5, type TextareaFieldAdmin as d6, type TrustProxyConfig as d7, type TypedField as d8, type UploadConfig as d9, defineKanbanView as dA, defineTableView as dB, defineView as dC, defineWorkspace as dD, isAICollection as dE, parseMongoWhere as dF, parseSqlWhere as dG, type CollectionTokenPayload as dH, DEFAULT_SESSION_EXPIRY as dI, type DyrectedObservabilityRuntime as dJ, type RequestBodyCapture as dK, type RequestTraceContext as dL, type ResolvedObservabilityConfig as dM, attachRequestMetrics as dN, bindObservabilityRuntime as dO, buildRequestLogger as dP, captureRequestBody as dQ, createDyrectedApp as dR, createObservabilityRuntime as dS, createRequestSpan as dT, decodeCollectionToken as dU, endRequestSpan as dV, getConfigLogger as dW, getObservabilityRuntime as dX, getRequestLogger as dY, redactBody as dZ, redactHeaders as d_, type UrlFieldAdmin as da, type UrlLinkValue as db, type ViewActionFeatures as dc, type ViewComponentSlots as dd, type ViewConfig as de, type ViewConfigBase as df, type ViewLayout as dg, type ViewMetric as dh, type ViewSubMetric as di, type WhereClause as dj, type WhereOperator as dk, type WhereOperatorName as dl, type WordLimitFieldAdmin as dm, type WordLimitFieldConfig as dn, type WorkflowMetadata as dp, type WorkflowOnTransitionContext as dq, type WorkflowOnTransitionHook as dr, type WorkflowRole as ds, type WorkflowState as dt, type WorkflowTransitionContext as du, coerceBooleanWhere as dv, defineAction as dw, defineCalendarView as dx, defineCardsView as dy, defineGanttView as dz, type DatabaseAdapter as e, resolveObservabilityConfig as e0, resolveSessionTokenExpiry as e1, shouldSampleRequest as e2, signCollectionToken as e3, verifyCollectionToken as e4, type BaseDocument as f, type TaskConfig as g, type DetailActionOptions as h, type DetailAction as i, type DetailComputedOptions as j, type ComputedHandler as k, type DetailComputed as l, type DetailCustomOptions as m, type DetailCustom as n, type DetailDividerOptions as o, type DetailDivider as p, type DisplayFieldOptions as q, type DetailField as r, type DetailItem as s, type DetailGridOptions as t, type DetailGrid as u, type DetailRepeatOptions as v, type DetailRepeat as w, type DetailSectionOptions as x, type DetailSection as y, type DetailTabOptions as z };
4324
+ export { type RelationshipField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ViewConfig as Z, type DateTimeField as _, type DeclarativeHookExpression as a, type AggregateArgs as a$, type SelectField as a0, type ArrayField as a1, type FieldType as a2, type BooleanField as a3, type AuthConfig as a4, type AccessPolicyResolver as a5, type DateField as a6, type TextField as a7, type EmailField as a8, type IconField as a9, AI_ACTIONS_COLLECTION as aA, AI_AUDIT_COLLECTION as aB, AI_CHUNKS_COLLECTION as aC, AI_MESSAGES_COLLECTION as aD, AI_THREADS_COLLECTION as aE, type AccessConfig as aF, type AccessFunction as aG, type AccessFunctionArgs as aH, type AccessResult as aI, type AccessRule as aJ, type ActionConfig as aK, type ActionConfigBase as aL, type ActionConfigWithHandler as aM, type ActionConfigWithMutation as aN, type ActionContext as aO, type ActionType as aP, type AdminAuthAccessResolution as aQ, type AdminAuthClaimMapping as aR, type AdminAuthMember as aS, type AdminAuthProvider as aT, type AdminAuthProviderMembersConfig as aU, type AdminAuthProvisioningMode as aV, type AdminAuthResolveAccessArgs as aW, type AdminAuthResolvedIdentity as aX, type AdminConfig as aY, type AdminDashboardComponentSlots as aZ, type AdminIconName as a_, type ImageField as aa, type JoinField as ab, type JsonField as ac, type MoneyField as ad, type MultiSelectField as ae, type NumberField as af, type ObjectField as ag, type RadioField as ah, type RichTextField as ai, type RowField as aj, type TextareaField as ak, type TimeField as al, type UrlField as am, type AIAction as an, type AIActionStatus as ao, type AIActionType as ap, type AIAuditActionType as aq, type AIAuditRecord as ar, type AIChunk as as, type AIMessage as at, type AIPIIPattern as au, type AIRateLimitResult as av, type AIRateLimitStore as aw, type AIThread as ax, type AIToolContext as ay, type AIToolDefinition as az, type AuthenticatedUser as b, type DyrectedAIContext as b$, type AggregateCastType as b0, type AggregateCollectionResult as b1, type AggregateInput as b2, type AggregateOperation as b3, type AggregateResult as b4, type AppTrashConfig as b5, type BaseAdminAuthProvider as b6, type BaseFieldAdmin as b7, type BlockVariant as b8, type BlocksField as b9, type CollectionSchemaResult as bA, type CollectionSummaryResult as bB, type CollectionViewComponentSlots as bC, type CompiledNavGroup as bD, type CountOperation as bE, type CustomAdminAuthProvider as bF, DEFAULT_USER_NAV_PREFERENCES as bG, type DateFieldAdmin as bH, type DateFormat as bI, type DefaultValueContext as bJ, type DefineActionOptions as bK, type DefineCalendarViewOptions as bL, type DefineCardsViewOptions as bM, type DefineGanttViewOptions as bN, type DefineKanbanViewOptions as bO, type DefineTableViewOptions as bP, type DefineViewBaseOptions as bQ, type DefineViewOptions as bR, type DetailSpan as bS, type DisplayTone as bT, type DisplayVariant as bU, type DistinctCountOperation as bV, type DistinctValuesOperation as bW, type DynamicOptionItem as bX, type DynamicOptionsConfig as bY, type DynamicOptionsResolver as bZ, type DynamicOptionsResolverArgs as b_, type BooleanFieldAdmin as ba, type BooleanFormat as bb, CURRENT_NAV_PREFERENCES_VERSION as bc, type CalendarViewConfig as bd, type CardsViewConfig as be, type CharacterLimitFieldAdmin as bf, type CharacterLimitFieldConfig as bg, type CollectionAfterChangeHook as bh, type CollectionAfterDeleteHook as bi, type CollectionAfterReadHook as bj, type CollectionAfterReadHookEntry as bk, type CollectionAfterRestoreHook as bl, type CollectionAfterTransitionHook as bm, type CollectionAfterTrashHook as bn, type CollectionBeforeChangeHook as bo, type CollectionBeforeChangeHookEntry as bp, type CollectionBeforeCommitHook as bq, type CollectionBeforeDeleteHook as br, type CollectionBeforeReadHook as bs, type CollectionBeforeReadHookEntry as bt, type CollectionBeforeRestoreHook as bu, type CollectionBeforeTransitionHook as bv, type CollectionBeforeTrashHook as bw, type CollectionIndex as bx, type CollectionListComponentSlots as by, type CollectionRAGConfig as bz, type WorkflowTransition as c, type RateLimitConfig as c$, type DyrectedLoggerConfig as c0, type DyrectedObservabilityConfig as c1, type EmailFieldAdmin as c2, type FieldAdminHooks as c3, type FieldAdminOnChangeHook as c4, type FieldAdminOnChangeHookArgs as c5, type FieldAdminOptionsHook as c6, type FieldAdminOptionsHookArgs as c7, type FieldAdminOptionsHookResult as c8, type FieldAfterReadHook as c9, type JsonFieldAdmin as cA, type JsonFormat as cB, type KanbanViewConfig as cC, LIFECYCLE_EVENT_NAMES as cD, type LifecycleEventHandler as cE, type LinkFormat as cF, type MetricColor as cG, type MoneyFieldAdmin as cH, type MoneyFieldConfig as cI, type MultiSelectFieldAdmin as cJ, type NamedAccessPolicy as cK, type NavBadgeConfig as cL, type NavGroup as cM, type NumberFieldAdmin as cN, type NumberFormat as cO, type NumberLimitFieldAdmin as cP, type NumberLimitFieldConfig as cQ, type NumericOperation as cR, type NumericUpdateOperator as cS, type OIDCAdminAuthProvider as cT, type OptionFormat as cU, type PaginatedResult as cV, type PinnedNavItemRef as cW, type PublicAdminAuthProvider as cX, type QueryCollectionResult as cY, type RAGSearchResult as cZ, type RadioFieldAdmin as c_, type FieldAfterReadHookArgs as ca, type FieldBase as cb, type FieldBeforeChangeHook as cc, type FieldBeforeChangeHookArgs as cd, type FieldHook as ce, type FieldHooks as cf, type FileData as cg, type GanttViewConfig as ch, type GetDocumentResult as ci, type GlobalAfterChangeHook as cj, type GlobalAfterReadHook as ck, type GlobalAfterReadHookEntry as cl, type GlobalBeforeChangeHook as cm, type GlobalBeforeChangeHookEntry as cn, type GlobalBeforeReadHook as co, type GlobalBeforeReadHookEntry as cp, type GlobalRAGConfig as cq, type GlobalSchemaResult as cr, type GlobalSummaryResult as cs, type HeadingLevel as ct, type HookFunction as cu, type IconFieldAdmin as cv, type ImageService as cw, type ImageTransformOptions as cx, type InferAggregateResult as cy, type JoinFieldAdmin as cz, type LifecycleEvent as d, endRequestSpan as d$, type ReadonlyDatabaseAdapter as d0, type RichTextFeature as d1, type RichTextFieldConfig as d2, type SelectFieldAdmin as d3, type SqlWhereResult as d4, type StorageAdapter as d5, type TableViewConfig as d6, type TaskContext as d7, type TaskLogger as d8, type TaskRunStatus as d9, type WorkflowTransitionContext as dA, coerceBooleanWhere as dB, defineAction as dC, defineCalendarView as dD, defineCardsView as dE, defineGanttView as dF, defineKanbanView as dG, defineTableView as dH, defineView as dI, defineWorkspace as dJ, isAICollection as dK, parseMongoWhere as dL, parseSqlWhere as dM, type CollectionTokenPayload as dN, DEFAULT_SESSION_EXPIRY as dO, type DyrectedObservabilityRuntime as dP, type RequestBodyCapture as dQ, type RequestTraceContext as dR, type ResolvedObservabilityConfig as dS, attachRequestMetrics as dT, bindObservabilityRuntime as dU, buildRequestLogger as dV, captureRequestBody as dW, createDyrectedApp as dX, createObservabilityRuntime as dY, createRequestSpan as dZ, decodeCollectionToken as d_, type TextFieldAdmin as da, type TextFormat as db, type TextareaFieldAdmin as dc, type TrashConfig as dd, type TrustProxyConfig as de, type TypedField as df, type UploadConfig as dg, type UrlFieldAdmin as dh, type UrlLinkValue as di, type ViewActionFeatures as dj, type ViewComponentSlots as dk, type ViewConfigBase as dl, type ViewLayout as dm, type ViewMetric as dn, type ViewSubMetric as dp, type WhereClause as dq, type WhereOperator as dr, type WhereOperatorName as ds, type WordLimitFieldAdmin as dt, type WordLimitFieldConfig as du, type WorkflowMetadata as dv, type WorkflowOnTransitionContext as dw, type WorkflowOnTransitionHook as dx, type WorkflowRole as dy, type WorkflowState as dz, type DatabaseAdapter as e, getConfigLogger as e0, getObservabilityRuntime as e1, getRequestLogger as e2, redactBody as e3, redactHeaders as e4, renderPrometheusMetrics as e5, resolveObservabilityConfig as e6, resolveSessionTokenExpiry as e7, shouldSampleRequest as e8, signCollectionToken as e9, verifyCollectionToken as ea, type BaseDocument as f, type TaskConfig as g, type DetailActionOptions as h, type DetailAction as i, type DetailComputedOptions as j, type ComputedHandler as k, type DetailComputed as l, type DetailCustomOptions as m, type DetailCustom as n, type DetailDividerOptions as o, type DetailDivider as p, type DisplayFieldOptions as q, type DetailField as r, type DetailItem as s, type DetailGridOptions as t, type DetailGrid as u, type DetailRepeatOptions as v, type DetailRepeat as w, type DetailSectionOptions as x, type DetailSection as y, type DetailTabOptions as z };
@@ -392,7 +392,7 @@ interface AggregateCollectionResult {
392
392
  collection: string;
393
393
  result: Record<string, unknown>;
394
394
  }
395
- type AIActionType = 'createDocument' | 'updateDocument' | 'deleteDocument' | 'updateGlobal';
395
+ type AIActionType = 'createDocument' | 'updateDocument' | 'deleteDocument' | 'updateGlobal' | 'restoreDocument';
396
396
  type AIActionStatus = 'pending' | 'approved' | 'rejected' | 'executed' | 'failed';
397
397
  interface AIAction {
398
398
  id: string;
@@ -1059,6 +1059,8 @@ interface DefineWorkspaceOptions {
1059
1059
  global?: string;
1060
1060
  /** Designates this item as the dashboard link. */
1061
1061
  dashboard?: boolean;
1062
+ /** Designates this item as the trash link. */
1063
+ trash?: boolean;
1062
1064
  /** Stable URL slug for standalone operational workspaces (`/:slug`). */
1063
1065
  slug?: string;
1064
1066
  /** Display label in the sidebar (defaults to collection/global label when applicable). */
@@ -1106,7 +1108,7 @@ declare function defineWorkspace(options: DefineWorkspaceOptions): DefineWorkspa
1106
1108
  */
1107
1109
  interface CompiledNavItem {
1108
1110
  id: string;
1109
- type: "workspace" | "collection" | "global" | "dashboard" | "link";
1111
+ type: "workspace" | "collection" | "global" | "dashboard" | "trash" | "link";
1110
1112
  slug: string;
1111
1113
  label: string;
1112
1114
  icon?: string;
@@ -1139,7 +1141,7 @@ interface CompiledNavTree {
1139
1141
  ungrouped: CompiledNavItem[];
1140
1142
  }
1141
1143
  interface PinnedNavItemRef {
1142
- type: "workspace" | "collection" | "global" | "link" | "dashboard";
1144
+ type: "workspace" | "collection" | "global" | "trash" | "link" | "dashboard";
1143
1145
  slug: string;
1144
1146
  view?: string;
1145
1147
  label?: string;
@@ -1341,7 +1343,7 @@ type CollectionBeforeCommitHook<TDoc extends object = Record<string, unknown>> =
1341
1343
  tx: DatabaseAdapter;
1342
1344
  }) => void | Promise<void>;
1343
1345
  /**
1344
- * Runs **before** a document is deleted from the database.
1346
+ * Runs **before** a document is deleted from the database or moved to trash.
1345
1347
  */
1346
1348
  type CollectionBeforeDeleteHook<TDoc extends object = Record<string, unknown>> = (args: {
1347
1349
  id: string;
@@ -1349,9 +1351,10 @@ type CollectionBeforeDeleteHook<TDoc extends object = Record<string, unknown>> =
1349
1351
  req: HookRequestContext;
1350
1352
  user?: AuthenticatedUser;
1351
1353
  db: ReadonlyDatabaseAdapter;
1354
+ mode?: "trash" | "permanent";
1352
1355
  }) => void | Promise<void>;
1353
1356
  /**
1354
- * Runs **after** a document has been deleted from the database.
1357
+ * Runs **after** a document has been permanently deleted from the database.
1355
1358
  */
1356
1359
  type CollectionAfterDeleteHook<TDoc extends object = Record<string, unknown>> = (args: {
1357
1360
  id: string;
@@ -1359,6 +1362,47 @@ type CollectionAfterDeleteHook<TDoc extends object = Record<string, unknown>> =
1359
1362
  req: HookRequestContext;
1360
1363
  user?: AuthenticatedUser;
1361
1364
  db: DatabaseAdapter;
1365
+ mode?: "permanent";
1366
+ }) => void | Promise<void>;
1367
+ /**
1368
+ * Runs **before** a document is moved to trash.
1369
+ */
1370
+ type CollectionBeforeTrashHook<TDoc extends object = Record<string, unknown>> = (args: {
1371
+ id: string;
1372
+ doc: TDoc;
1373
+ req: HookRequestContext;
1374
+ user?: AuthenticatedUser;
1375
+ db: ReadonlyDatabaseAdapter;
1376
+ }) => void | Promise<void>;
1377
+ /**
1378
+ * Runs **after** a document has been moved to trash.
1379
+ */
1380
+ type CollectionAfterTrashHook<TDoc extends object = Record<string, unknown>> = (args: {
1381
+ id: string;
1382
+ doc: TDoc;
1383
+ req: HookRequestContext;
1384
+ user?: AuthenticatedUser;
1385
+ db: DatabaseAdapter;
1386
+ }) => void | Promise<void>;
1387
+ /**
1388
+ * Runs **before** a trashed document is restored.
1389
+ */
1390
+ type CollectionBeforeRestoreHook<TDoc extends object = Record<string, unknown>> = (args: {
1391
+ id: string;
1392
+ doc: TDoc;
1393
+ req: HookRequestContext;
1394
+ user?: AuthenticatedUser;
1395
+ db: ReadonlyDatabaseAdapter;
1396
+ }) => void | Promise<void>;
1397
+ /**
1398
+ * Runs **after** a trashed document has been restored.
1399
+ */
1400
+ type CollectionAfterRestoreHook<TDoc extends object = Record<string, unknown>> = (args: {
1401
+ id: string;
1402
+ doc: TDoc;
1403
+ req: HookRequestContext;
1404
+ user?: AuthenticatedUser;
1405
+ db: DatabaseAdapter;
1362
1406
  }) => void | Promise<void>;
1363
1407
  /** @see {@link CollectionBeforeReadHook} */
1364
1408
  type GlobalBeforeReadHook = CollectionBeforeReadHook;
@@ -1970,6 +2014,15 @@ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailFi
1970
2014
  */
1971
2015
  type DetailSchema<TDoc = any> = DetailItem<TDoc>[];
1972
2016
 
2017
+ /**
2018
+ * Trash and retention configuration for a collection.
2019
+ */
2020
+ interface TrashConfig {
2021
+ /** Days before automatic permanent deletion. `null` or omitted: never auto-purge. */
2022
+ retentionDays?: number | null;
2023
+ /** Show and allow "Delete forever" in API/UI. Default true. */
2024
+ allowPermanentDelete?: boolean;
2025
+ }
1973
2026
  /**
1974
2027
  * Configures account lockout behavior for an auth-enabled collection.
1975
2028
  *
@@ -2221,6 +2274,12 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2221
2274
  * live content, and any authorized editor can publish or unpublish entries.
2222
2275
  */
2223
2276
  drafts?: boolean;
2277
+ /**
2278
+ * Trash & retention settings for this collection.
2279
+ * If `true` or an object, deleting a document moves it to trash rather than destroying it.
2280
+ * If `false`, hard deletes immediately.
2281
+ */
2282
+ trash?: boolean | TrashConfig;
2224
2283
  /**
2225
2284
  * Collection-level access control.
2226
2285
  *
@@ -2244,6 +2303,11 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2244
2303
  create?: AccessRule<TDoc>;
2245
2304
  update?: AccessRule<TDoc>;
2246
2305
  delete?: AccessRule<TDoc>;
2306
+ /**
2307
+ * Controls who can restore a trashed document in this collection.
2308
+ * Falls back to `delete` access if omitted.
2309
+ */
2310
+ restore?: AccessRule<TDoc>;
2247
2311
  /**
2248
2312
  * Controls who can read this collection's audit log (`GET /:slug/__audit`),
2249
2313
  * for collections with `audit` enabled. Falls back to the `read` rule when
@@ -2306,6 +2370,14 @@ interface CollectionConfig<TDoc extends object = Record<string, unknown>> {
2306
2370
  * already committed and will not be undone.
2307
2371
  */
2308
2372
  afterDelete?: CollectionAfterDeleteHook<TDoc>[];
2373
+ /** Runs before a document is moved to trash. Throw to cancel trashing. */
2374
+ beforeTrash?: CollectionBeforeTrashHook<TDoc>[];
2375
+ /** Runs after a document has been moved to trash. Side effects only. */
2376
+ afterTrash?: CollectionAfterTrashHook<TDoc>[];
2377
+ /** Runs before a trashed document is restored. Throw to cancel restoration. */
2378
+ beforeRestore?: CollectionBeforeRestoreHook<TDoc>[];
2379
+ /** Runs after a document has been restored from trash. Side effects only. */
2380
+ afterRestore?: CollectionAfterRestoreHook<TDoc>[];
2309
2381
  };
2310
2382
  /**
2311
2383
  * Admin UI configuration for this collection.
@@ -4061,6 +4133,25 @@ interface DyrectedConfig<TUser extends AuthenticatedUser = AuthenticatedUser> {
4061
4133
  * AI Assistant and LLM tools configuration.
4062
4134
  */
4063
4135
  ai?: AIConfig;
4136
+ /**
4137
+ * App-wide trash & retention configuration.
4138
+ */
4139
+ trash?: AppTrashConfig;
4140
+ }
4141
+ interface AppTrashConfig {
4142
+ /** Every non-system collection defaults to trash when true. */
4143
+ enabled?: boolean;
4144
+ /** Default retention period in days. `null` or omitted: keep until manually purged. */
4145
+ retentionDays?: number | null;
4146
+ /** When false, blocks immediate hard-delete across collections unless overridden. */
4147
+ allowPermanentDelete?: boolean;
4148
+ /** Background purge configuration. */
4149
+ purge?: {
4150
+ /** Cron schedule for automatic purge. Defaults to `"0 3 * * *"`. */
4151
+ cron?: string;
4152
+ /** Maximum number of records to purge per run. Defaults to 200. */
4153
+ batchSize?: number;
4154
+ };
4064
4155
  }
4065
4156
 
4066
4157
  interface CollectionTokenPayload extends JWTPayload {
@@ -4230,4 +4321,4 @@ interface DyrectedContext {
4230
4321
  */
4231
4322
  declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
4232
4323
 
4233
- export { type BooleanField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ArrayField as Z, type FieldType as _, type DeclarativeHookExpression as a, type AggregateCastType as a$, type AuthConfig as a0, type AccessPolicyResolver as a1, type DateField as a2, type DateTimeField as a3, type EmailField as a4, type IconField as a5, type ImageField as a6, type JoinField as a7, type JsonField as a8, type MoneyField as a9, AI_AUDIT_COLLECTION as aA, AI_CHUNKS_COLLECTION as aB, AI_MESSAGES_COLLECTION as aC, AI_THREADS_COLLECTION as aD, type AccessConfig as aE, type AccessFunction as aF, type AccessFunctionArgs as aG, type AccessResult as aH, type AccessRule as aI, type ActionConfig as aJ, type ActionConfigBase as aK, type ActionConfigWithHandler as aL, type ActionConfigWithMutation as aM, type ActionContext as aN, type ActionType as aO, type AdminAuthAccessResolution as aP, type AdminAuthClaimMapping as aQ, type AdminAuthMember as aR, type AdminAuthProvider as aS, type AdminAuthProviderMembersConfig as aT, type AdminAuthProvisioningMode as aU, type AdminAuthResolveAccessArgs as aV, type AdminAuthResolvedIdentity as aW, type AdminConfig as aX, type AdminDashboardComponentSlots as aY, type AdminIconName as aZ, type AggregateArgs as a_, type MultiSelectField as aa, type NumberField as ab, type ObjectField as ac, type RadioField as ad, type RelationshipField as ae, type RichTextField as af, type RowField as ag, type SelectField as ah, type TextField as ai, type TextareaField as aj, type TimeField as ak, type UrlField as al, type AIAction as am, type AIActionStatus as an, type AIActionType as ao, type AIAuditActionType as ap, type AIAuditRecord as aq, type AIChunk as ar, type AIMessage as as, type AIPIIPattern as at, type AIRateLimitResult as au, type AIRateLimitStore as av, type AIThread as aw, type AIToolContext as ax, type AIToolDefinition as ay, AI_ACTIONS_COLLECTION as az, type AuthenticatedUser as b, type FieldAdminOnChangeHookArgs as b$, type AggregateCollectionResult as b0, type AggregateInput as b1, type AggregateOperation as b2, type AggregateResult as b3, type BaseAdminAuthProvider as b4, type BaseFieldAdmin as b5, type BlockVariant as b6, type BlocksField as b7, type BooleanFieldAdmin as b8, type BooleanFormat as b9, DEFAULT_USER_NAV_PREFERENCES as bA, type DateFieldAdmin as bB, type DateFormat as bC, type DefaultValueContext as bD, type DefineActionOptions as bE, type DefineCalendarViewOptions as bF, type DefineCardsViewOptions as bG, type DefineGanttViewOptions as bH, type DefineKanbanViewOptions as bI, type DefineTableViewOptions as bJ, type DefineViewBaseOptions as bK, type DefineViewOptions as bL, type DetailSpan as bM, type DisplayTone as bN, type DisplayVariant as bO, type DistinctCountOperation as bP, type DistinctValuesOperation as bQ, type DynamicOptionItem as bR, type DynamicOptionsConfig as bS, type DynamicOptionsResolver as bT, type DynamicOptionsResolverArgs as bU, type DyrectedAIContext as bV, type DyrectedLoggerConfig as bW, type DyrectedObservabilityConfig as bX, type EmailFieldAdmin as bY, type FieldAdminHooks as bZ, type FieldAdminOnChangeHook as b_, CURRENT_NAV_PREFERENCES_VERSION as ba, type CalendarViewConfig as bb, type CardsViewConfig as bc, type CharacterLimitFieldAdmin as bd, type CharacterLimitFieldConfig as be, type CollectionAfterChangeHook as bf, type CollectionAfterDeleteHook as bg, type CollectionAfterReadHook as bh, type CollectionAfterReadHookEntry as bi, type CollectionAfterTransitionHook as bj, type CollectionBeforeChangeHook as bk, type CollectionBeforeChangeHookEntry as bl, type CollectionBeforeCommitHook as bm, type CollectionBeforeDeleteHook as bn, type CollectionBeforeReadHook as bo, type CollectionBeforeReadHookEntry as bp, type CollectionBeforeTransitionHook as bq, type CollectionIndex as br, type CollectionListComponentSlots as bs, type CollectionRAGConfig as bt, type CollectionSchemaResult as bu, type CollectionSummaryResult as bv, type CollectionViewComponentSlots as bw, type CompiledNavGroup as bx, type CountOperation as by, type CustomAdminAuthProvider as bz, type WorkflowTransition as c, type StorageAdapter as c$, type FieldAdminOptionsHook as c0, type FieldAdminOptionsHookArgs as c1, type FieldAdminOptionsHookResult as c2, type FieldAfterReadHook as c3, type FieldAfterReadHookArgs as c4, type FieldBase as c5, type FieldBeforeChangeHook as c6, type FieldBeforeChangeHookArgs as c7, type FieldHook as c8, type FieldHooks as c9, type MetricColor as cA, type MoneyFieldAdmin as cB, type MoneyFieldConfig as cC, type MultiSelectFieldAdmin as cD, type NamedAccessPolicy as cE, type NavBadgeConfig as cF, type NavGroup as cG, type NumberFieldAdmin as cH, type NumberFormat as cI, type NumberLimitFieldAdmin as cJ, type NumberLimitFieldConfig as cK, type NumericOperation as cL, type NumericUpdateOperator as cM, type OIDCAdminAuthProvider as cN, type OptionFormat as cO, type PaginatedResult as cP, type PinnedNavItemRef as cQ, type PublicAdminAuthProvider as cR, type QueryCollectionResult as cS, type RAGSearchResult as cT, type RadioFieldAdmin as cU, type RateLimitConfig as cV, type ReadonlyDatabaseAdapter as cW, type RichTextFeature as cX, type RichTextFieldConfig as cY, type SelectFieldAdmin as cZ, type SqlWhereResult as c_, type FileData as ca, type GanttViewConfig as cb, type GetDocumentResult as cc, type GlobalAfterChangeHook as cd, type GlobalAfterReadHook as ce, type GlobalAfterReadHookEntry as cf, type GlobalBeforeChangeHook as cg, type GlobalBeforeChangeHookEntry as ch, type GlobalBeforeReadHook as ci, type GlobalBeforeReadHookEntry as cj, type GlobalRAGConfig as ck, type GlobalSchemaResult as cl, type GlobalSummaryResult as cm, type HeadingLevel as cn, type HookFunction as co, type IconFieldAdmin as cp, type ImageService as cq, type ImageTransformOptions as cr, type InferAggregateResult as cs, type JoinFieldAdmin as ct, type JsonFieldAdmin as cu, type JsonFormat as cv, type KanbanViewConfig as cw, LIFECYCLE_EVENT_NAMES as cx, type LifecycleEventHandler as cy, type LinkFormat as cz, type LifecycleEvent as d, renderPrometheusMetrics as d$, type TableViewConfig as d0, type TaskContext as d1, type TaskLogger as d2, type TaskRunStatus as d3, type TextFieldAdmin as d4, type TextFormat as d5, type TextareaFieldAdmin as d6, type TrustProxyConfig as d7, type TypedField as d8, type UploadConfig as d9, defineKanbanView as dA, defineTableView as dB, defineView as dC, defineWorkspace as dD, isAICollection as dE, parseMongoWhere as dF, parseSqlWhere as dG, type CollectionTokenPayload as dH, DEFAULT_SESSION_EXPIRY as dI, type DyrectedObservabilityRuntime as dJ, type RequestBodyCapture as dK, type RequestTraceContext as dL, type ResolvedObservabilityConfig as dM, attachRequestMetrics as dN, bindObservabilityRuntime as dO, buildRequestLogger as dP, captureRequestBody as dQ, createDyrectedApp as dR, createObservabilityRuntime as dS, createRequestSpan as dT, decodeCollectionToken as dU, endRequestSpan as dV, getConfigLogger as dW, getObservabilityRuntime as dX, getRequestLogger as dY, redactBody as dZ, redactHeaders as d_, type UrlFieldAdmin as da, type UrlLinkValue as db, type ViewActionFeatures as dc, type ViewComponentSlots as dd, type ViewConfig as de, type ViewConfigBase as df, type ViewLayout as dg, type ViewMetric as dh, type ViewSubMetric as di, type WhereClause as dj, type WhereOperator as dk, type WhereOperatorName as dl, type WordLimitFieldAdmin as dm, type WordLimitFieldConfig as dn, type WorkflowMetadata as dp, type WorkflowOnTransitionContext as dq, type WorkflowOnTransitionHook as dr, type WorkflowRole as ds, type WorkflowState as dt, type WorkflowTransitionContext as du, coerceBooleanWhere as dv, defineAction as dw, defineCalendarView as dx, defineCardsView as dy, defineGanttView as dz, type DatabaseAdapter as e, resolveObservabilityConfig as e0, resolveSessionTokenExpiry as e1, shouldSampleRequest as e2, signCollectionToken as e3, verifyCollectionToken as e4, type BaseDocument as f, type TaskConfig as g, type DetailActionOptions as h, type DetailAction as i, type DetailComputedOptions as j, type ComputedHandler as k, type DetailComputed as l, type DetailCustomOptions as m, type DetailCustom as n, type DetailDividerOptions as o, type DetailDivider as p, type DisplayFieldOptions as q, type DetailField as r, type DetailItem as s, type DetailGridOptions as t, type DetailGrid as u, type DetailRepeatOptions as v, type DetailRepeat as w, type DetailSectionOptions as x, type DetailSection as y, type DetailTabOptions as z };
4324
+ export { type RelationshipField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ViewConfig as Z, type DateTimeField as _, type DeclarativeHookExpression as a, type AggregateArgs as a$, type SelectField as a0, type ArrayField as a1, type FieldType as a2, type BooleanField as a3, type AuthConfig as a4, type AccessPolicyResolver as a5, type DateField as a6, type TextField as a7, type EmailField as a8, type IconField as a9, AI_ACTIONS_COLLECTION as aA, AI_AUDIT_COLLECTION as aB, AI_CHUNKS_COLLECTION as aC, AI_MESSAGES_COLLECTION as aD, AI_THREADS_COLLECTION as aE, type AccessConfig as aF, type AccessFunction as aG, type AccessFunctionArgs as aH, type AccessResult as aI, type AccessRule as aJ, type ActionConfig as aK, type ActionConfigBase as aL, type ActionConfigWithHandler as aM, type ActionConfigWithMutation as aN, type ActionContext as aO, type ActionType as aP, type AdminAuthAccessResolution as aQ, type AdminAuthClaimMapping as aR, type AdminAuthMember as aS, type AdminAuthProvider as aT, type AdminAuthProviderMembersConfig as aU, type AdminAuthProvisioningMode as aV, type AdminAuthResolveAccessArgs as aW, type AdminAuthResolvedIdentity as aX, type AdminConfig as aY, type AdminDashboardComponentSlots as aZ, type AdminIconName as a_, type ImageField as aa, type JoinField as ab, type JsonField as ac, type MoneyField as ad, type MultiSelectField as ae, type NumberField as af, type ObjectField as ag, type RadioField as ah, type RichTextField as ai, type RowField as aj, type TextareaField as ak, type TimeField as al, type UrlField as am, type AIAction as an, type AIActionStatus as ao, type AIActionType as ap, type AIAuditActionType as aq, type AIAuditRecord as ar, type AIChunk as as, type AIMessage as at, type AIPIIPattern as au, type AIRateLimitResult as av, type AIRateLimitStore as aw, type AIThread as ax, type AIToolContext as ay, type AIToolDefinition as az, type AuthenticatedUser as b, type DyrectedAIContext as b$, type AggregateCastType as b0, type AggregateCollectionResult as b1, type AggregateInput as b2, type AggregateOperation as b3, type AggregateResult as b4, type AppTrashConfig as b5, type BaseAdminAuthProvider as b6, type BaseFieldAdmin as b7, type BlockVariant as b8, type BlocksField as b9, type CollectionSchemaResult as bA, type CollectionSummaryResult as bB, type CollectionViewComponentSlots as bC, type CompiledNavGroup as bD, type CountOperation as bE, type CustomAdminAuthProvider as bF, DEFAULT_USER_NAV_PREFERENCES as bG, type DateFieldAdmin as bH, type DateFormat as bI, type DefaultValueContext as bJ, type DefineActionOptions as bK, type DefineCalendarViewOptions as bL, type DefineCardsViewOptions as bM, type DefineGanttViewOptions as bN, type DefineKanbanViewOptions as bO, type DefineTableViewOptions as bP, type DefineViewBaseOptions as bQ, type DefineViewOptions as bR, type DetailSpan as bS, type DisplayTone as bT, type DisplayVariant as bU, type DistinctCountOperation as bV, type DistinctValuesOperation as bW, type DynamicOptionItem as bX, type DynamicOptionsConfig as bY, type DynamicOptionsResolver as bZ, type DynamicOptionsResolverArgs as b_, type BooleanFieldAdmin as ba, type BooleanFormat as bb, CURRENT_NAV_PREFERENCES_VERSION as bc, type CalendarViewConfig as bd, type CardsViewConfig as be, type CharacterLimitFieldAdmin as bf, type CharacterLimitFieldConfig as bg, type CollectionAfterChangeHook as bh, type CollectionAfterDeleteHook as bi, type CollectionAfterReadHook as bj, type CollectionAfterReadHookEntry as bk, type CollectionAfterRestoreHook as bl, type CollectionAfterTransitionHook as bm, type CollectionAfterTrashHook as bn, type CollectionBeforeChangeHook as bo, type CollectionBeforeChangeHookEntry as bp, type CollectionBeforeCommitHook as bq, type CollectionBeforeDeleteHook as br, type CollectionBeforeReadHook as bs, type CollectionBeforeReadHookEntry as bt, type CollectionBeforeRestoreHook as bu, type CollectionBeforeTransitionHook as bv, type CollectionBeforeTrashHook as bw, type CollectionIndex as bx, type CollectionListComponentSlots as by, type CollectionRAGConfig as bz, type WorkflowTransition as c, type RateLimitConfig as c$, type DyrectedLoggerConfig as c0, type DyrectedObservabilityConfig as c1, type EmailFieldAdmin as c2, type FieldAdminHooks as c3, type FieldAdminOnChangeHook as c4, type FieldAdminOnChangeHookArgs as c5, type FieldAdminOptionsHook as c6, type FieldAdminOptionsHookArgs as c7, type FieldAdminOptionsHookResult as c8, type FieldAfterReadHook as c9, type JsonFieldAdmin as cA, type JsonFormat as cB, type KanbanViewConfig as cC, LIFECYCLE_EVENT_NAMES as cD, type LifecycleEventHandler as cE, type LinkFormat as cF, type MetricColor as cG, type MoneyFieldAdmin as cH, type MoneyFieldConfig as cI, type MultiSelectFieldAdmin as cJ, type NamedAccessPolicy as cK, type NavBadgeConfig as cL, type NavGroup as cM, type NumberFieldAdmin as cN, type NumberFormat as cO, type NumberLimitFieldAdmin as cP, type NumberLimitFieldConfig as cQ, type NumericOperation as cR, type NumericUpdateOperator as cS, type OIDCAdminAuthProvider as cT, type OptionFormat as cU, type PaginatedResult as cV, type PinnedNavItemRef as cW, type PublicAdminAuthProvider as cX, type QueryCollectionResult as cY, type RAGSearchResult as cZ, type RadioFieldAdmin as c_, type FieldAfterReadHookArgs as ca, type FieldBase as cb, type FieldBeforeChangeHook as cc, type FieldBeforeChangeHookArgs as cd, type FieldHook as ce, type FieldHooks as cf, type FileData as cg, type GanttViewConfig as ch, type GetDocumentResult as ci, type GlobalAfterChangeHook as cj, type GlobalAfterReadHook as ck, type GlobalAfterReadHookEntry as cl, type GlobalBeforeChangeHook as cm, type GlobalBeforeChangeHookEntry as cn, type GlobalBeforeReadHook as co, type GlobalBeforeReadHookEntry as cp, type GlobalRAGConfig as cq, type GlobalSchemaResult as cr, type GlobalSummaryResult as cs, type HeadingLevel as ct, type HookFunction as cu, type IconFieldAdmin as cv, type ImageService as cw, type ImageTransformOptions as cx, type InferAggregateResult as cy, type JoinFieldAdmin as cz, type LifecycleEvent as d, endRequestSpan as d$, type ReadonlyDatabaseAdapter as d0, type RichTextFeature as d1, type RichTextFieldConfig as d2, type SelectFieldAdmin as d3, type SqlWhereResult as d4, type StorageAdapter as d5, type TableViewConfig as d6, type TaskContext as d7, type TaskLogger as d8, type TaskRunStatus as d9, type WorkflowTransitionContext as dA, coerceBooleanWhere as dB, defineAction as dC, defineCalendarView as dD, defineCardsView as dE, defineGanttView as dF, defineKanbanView as dG, defineTableView as dH, defineView as dI, defineWorkspace as dJ, isAICollection as dK, parseMongoWhere as dL, parseSqlWhere as dM, type CollectionTokenPayload as dN, DEFAULT_SESSION_EXPIRY as dO, type DyrectedObservabilityRuntime as dP, type RequestBodyCapture as dQ, type RequestTraceContext as dR, type ResolvedObservabilityConfig as dS, attachRequestMetrics as dT, bindObservabilityRuntime as dU, buildRequestLogger as dV, captureRequestBody as dW, createDyrectedApp as dX, createObservabilityRuntime as dY, createRequestSpan as dZ, decodeCollectionToken as d_, type TextFieldAdmin as da, type TextFormat as db, type TextareaFieldAdmin as dc, type TrashConfig as dd, type TrustProxyConfig as de, type TypedField as df, type UploadConfig as dg, type UrlFieldAdmin as dh, type UrlLinkValue as di, type ViewActionFeatures as dj, type ViewComponentSlots as dk, type ViewConfigBase as dl, type ViewLayout as dm, type ViewMetric as dn, type ViewSubMetric as dp, type WhereClause as dq, type WhereOperator as dr, type WhereOperatorName as ds, type WordLimitFieldAdmin as dt, type WordLimitFieldConfig as du, type WorkflowMetadata as dv, type WorkflowOnTransitionContext as dw, type WorkflowOnTransitionHook as dx, type WorkflowRole as dy, type WorkflowState as dz, type DatabaseAdapter as e, getConfigLogger as e0, getObservabilityRuntime as e1, getRequestLogger as e2, redactBody as e3, redactHeaders as e4, renderPrometheusMetrics as e5, resolveObservabilityConfig as e6, resolveSessionTokenExpiry as e7, shouldSampleRequest as e8, signCollectionToken as e9, verifyCollectionToken as ea, type BaseDocument as f, type TaskConfig as g, type DetailActionOptions as h, type DetailAction as i, type DetailComputedOptions as j, type ComputedHandler as k, type DetailComputed as l, type DetailCustomOptions as m, type DetailCustom as n, type DetailDividerOptions as o, type DetailDivider as p, type DisplayFieldOptions as q, type DetailField as r, type DetailItem as s, type DetailGridOptions as t, type DetailGrid as u, type DetailRepeatOptions as v, type DetailRepeat as w, type DetailSectionOptions as x, type DetailSection as y, type DetailTabOptions as z };