@dyrected/core 2.19.0 → 2.20.1

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.
@@ -51,6 +51,8 @@ interface AuthenticatedUser {
51
51
 
52
52
  interface AccessFunctionArgs<TDoc extends object = Record<string, unknown>, TUser extends AuthenticatedUser = AuthenticatedUser> {
53
53
  user: TUser | undefined;
54
+ /** ID of the document being accessed, when the operation targets one. */
55
+ id?: string;
54
56
  doc?: TDoc;
55
57
  data?: Partial<TDoc>;
56
58
  req: HookRequestContext;
@@ -551,11 +553,19 @@ type InferAggregateResult<T extends AggregateInput> = {
551
553
  * so adding a new operator without handling it will produce a TypeScript error
552
554
  * in every adapter translator.
553
555
  */
554
- type WhereOperatorName = 'equals' | 'not_equals' | 'in' | 'not_in' | 'gt' | 'greater_than' | 'gte' | 'greater_than_equal' | 'greater_than_or_equal' | 'lt' | 'less_than' | 'lte' | 'less_than_equal' | 'less_than_or_equal' | 'contains' | 'like' | 'starts_with' | 'exists';
556
+ type WhereOperatorName = 'equals' | 'not_equals' | 'not' | 'ne' | 'not_equal' | 'notEquals' | 'in' | 'not_in' | 'gt' | 'greater_than' | 'gte' | 'greater_than_equal' | 'greater_than_or_equal' | 'lt' | 'less_than' | 'lte' | 'less_than_equal' | 'less_than_or_equal' | 'contains' | 'like' | 'starts_with' | 'exists';
555
557
  type WhereOperator = {
556
558
  equals: any;
557
559
  } | {
558
560
  not_equals: any;
561
+ } | {
562
+ not: any;
563
+ } | {
564
+ ne: any;
565
+ } | {
566
+ not_equal: any;
567
+ } | {
568
+ notEquals: any;
559
569
  } | {
560
570
  in: any[];
561
571
  } | {
@@ -596,6 +606,8 @@ type WhereClause = {
596
606
  or?: WhereClause[] | readonly WhereClause[];
597
607
  AND?: WhereClause[] | readonly WhereClause[];
598
608
  and?: WhereClause[] | readonly WhereClause[];
609
+ NOT?: WhereClause[] | readonly WhereClause[] | WhereClause;
610
+ not?: WhereClause[] | readonly WhereClause[] | WhereClause;
599
611
  };
600
612
  interface SqlWhereResult {
601
613
  sql: string;
@@ -2014,6 +2026,91 @@ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailFi
2014
2026
  */
2015
2027
  type DetailSchema<TDoc = any> = DetailItem<TDoc>[];
2016
2028
 
2029
+ /**
2030
+ * Email template return value.
2031
+ *
2032
+ * Supports either direct HTML content or external provider template IDs with variables
2033
+ * (e.g. Seamailer, Postmark, SendGrid, Mailgun).
2034
+ */
2035
+ type EmailTemplateResult = {
2036
+ subject?: string;
2037
+ html: string;
2038
+ text?: string;
2039
+ } | {
2040
+ /**
2041
+ * External provider template identifier:
2042
+ * - Seamailer: numeric template ID (e.g. 821354)
2043
+ * - Postmark: template alias (e.g. 'welcome-user') or numeric ID
2044
+ * - SendGrid: template ID (e.g. 'd-1234567890abcdef')
2045
+ */
2046
+ template: string | number;
2047
+ variables: Record<string, unknown>;
2048
+ subject?: string;
2049
+ };
2050
+ /**
2051
+ * Contextual arguments passed into email template builders.
2052
+ */
2053
+ type EmailTemplateArgs<T = Record<string, unknown>> = T & {
2054
+ collection?: string;
2055
+ /** Readable singular name of the collection (falls back to plural, then a humanised slug). */
2056
+ collectionLabel?: string;
2057
+ /** The raw singular/plural labels configured on the collection. */
2058
+ collectionLabels?: {
2059
+ singular?: string;
2060
+ plural?: string;
2061
+ };
2062
+ siteName?: string;
2063
+ user?: Record<string, unknown>;
2064
+ };
2065
+ /**
2066
+ * The typed email payload passed to `config.email.send`.
2067
+ *
2068
+ * Supports both traditional HTML payloads and external provider template payloads.
2069
+ */
2070
+ type OutboundEmail = {
2071
+ to: string;
2072
+ from?: string;
2073
+ collection?: string;
2074
+ purpose?: "invite" | "resetPassword" | "welcome" | "passwordChanged" | string;
2075
+ user?: Record<string, unknown>;
2076
+ } & ({
2077
+ type?: "html";
2078
+ subject: string;
2079
+ html: string;
2080
+ text?: string;
2081
+ } | {
2082
+ type: "template";
2083
+ template: string | number;
2084
+ variables: Record<string, unknown>;
2085
+ subject?: string;
2086
+ });
2087
+ /**
2088
+ * Collection-level email configuration.
2089
+ */
2090
+ interface CollectionEmailConfig {
2091
+ /** Optional custom `from` address for emails sent by this collection. */
2092
+ from?: string;
2093
+ /** Collection-specific email templates. */
2094
+ templates?: {
2095
+ welcome?: (args: EmailTemplateArgs<{
2096
+ email: string;
2097
+ }>) => EmailTemplateResult;
2098
+ invite?: (args: EmailTemplateArgs<{
2099
+ token: string;
2100
+ url?: string;
2101
+ invitedByEmail?: string;
2102
+ data?: Record<string, unknown>;
2103
+ }>) => EmailTemplateResult;
2104
+ resetPassword?: (args: EmailTemplateArgs<{
2105
+ token: string;
2106
+ url?: string;
2107
+ }>) => EmailTemplateResult;
2108
+ passwordChanged?: (args: EmailTemplateArgs<{
2109
+ email: string;
2110
+ }>) => EmailTemplateResult;
2111
+ };
2112
+ }
2113
+
2017
2114
  /**
2018
2115
  * Trash and retention configuration for a collection.
2019
2116
  */
@@ -2060,6 +2157,39 @@ interface AuthConfig {
2060
2157
  * Defaults to `'admin'`.
2061
2158
  */
2062
2159
  adminRole?: string;
2160
+ /**
2161
+ * How long invitation tokens remain valid for this collection.
2162
+ *
2163
+ * Accepts the same values as `jose`'s `setExpirationTime` (e.g. `'24h'`,
2164
+ * `'48h'`, `'7d'`, `'14d'`).
2165
+ *
2166
+ * Defaults to `'7d'`.
2167
+ */
2168
+ inviteExpiration?: string;
2169
+ /**
2170
+ * How long password reset tokens remain valid for this collection.
2171
+ *
2172
+ * Accepts the same values as `jose`'s `setExpirationTime` (e.g. `'15m'`,
2173
+ * `'30m'`, `'1h'`, `'2h'`).
2174
+ *
2175
+ * Defaults to `'1h'`.
2176
+ */
2177
+ resetPasswordExpiration?: string;
2178
+ /**
2179
+ * Dedicated action URLs for this auth collection.
2180
+ *
2181
+ * When configured, invite and password reset emails for this collection
2182
+ * use these URLs instead of falling back to `admin.adminUrl` or `/admin`.
2183
+ */
2184
+ urls?: {
2185
+ invite?: string;
2186
+ resetPassword?: string;
2187
+ login?: string;
2188
+ };
2189
+ /**
2190
+ * Collection-specific email templates and sender overrides.
2191
+ */
2192
+ email?: CollectionEmailConfig;
2063
2193
  }
2064
2194
  /**
2065
2195
  * Physical database index specification for a collection.
@@ -4038,42 +4168,50 @@ interface DyrectedConfig<TUser extends AuthenticatedUser = AuthenticatedUser> {
4038
4168
  email?: {
4039
4169
  /** The `From` address for all outbound emails. */
4040
4170
  from: string;
4041
- /** The send function. Wire in any email provider (Resend, SendGrid, SES, etc.). */
4042
- send: (args: {
4043
- to: string;
4044
- subject: string;
4045
- html: string;
4046
- }) => Promise<void>;
4047
- /** Override the default email templates. */
4171
+ /**
4172
+ * Whether admins can edit email templates via the Admin UI.
4173
+ * Defaults to true.
4174
+ */
4175
+ adminEditable?: boolean;
4176
+ /** The send function. Wire in any email provider (Resend, SendGrid, SES, Seamailer, Postmark, etc.). */
4177
+ send: (args: OutboundEmail) => Promise<void>;
4178
+ /** Global default email templates. */
4048
4179
  templates?: {
4049
- welcome?: (args: {
4180
+ welcome?: (args: EmailTemplateArgs<{
4050
4181
  email: string;
4051
- }) => {
4052
- subject?: string;
4053
- html: string;
4054
- };
4055
- invite?: (args: {
4182
+ }>) => EmailTemplateResult;
4183
+ invite?: (args: EmailTemplateArgs<{
4056
4184
  token: string;
4057
4185
  invitedByEmail?: string;
4058
4186
  url?: string;
4059
- }) => {
4060
- subject?: string;
4061
- html: string;
4062
- };
4063
- resetPassword?: (args: {
4187
+ data?: Record<string, unknown>;
4188
+ }>) => EmailTemplateResult;
4189
+ resetPassword?: (args: EmailTemplateArgs<{
4064
4190
  token: string;
4065
4191
  url?: string;
4066
- }) => {
4067
- subject?: string;
4068
- html: string;
4069
- };
4070
- passwordChanged?: (args: {
4192
+ }>) => EmailTemplateResult;
4193
+ passwordChanged?: (args: EmailTemplateArgs<{
4071
4194
  email: string;
4072
- }) => {
4073
- subject?: string;
4074
- html: string;
4075
- };
4195
+ }>) => EmailTemplateResult;
4076
4196
  };
4197
+ /**
4198
+ * Additional transactional email purposes beyond the built-in auth lifecycle events.
4199
+ * Each entry appears as a selectable option in the Admin UI email template editor,
4200
+ * allowing admins to manage and test templates for business domain events
4201
+ * (e.g. order confirmations, booking reminders, webhook notifications).
4202
+ *
4203
+ * @example
4204
+ * email: {
4205
+ * purposes: [
4206
+ * { label: "Order Confirmation", value: "order_confirmation" },
4207
+ * { label: "Booking Reminder", value: "booking_reminder" },
4208
+ * ],
4209
+ * }
4210
+ */
4211
+ purposes?: Array<{
4212
+ label: string;
4213
+ value: string;
4214
+ }>;
4077
4215
  };
4078
4216
  /**
4079
4217
  * Redis connection URL. Required for distributed caching of dynamic option
@@ -4162,8 +4300,11 @@ interface CollectionTokenPayload extends JWTPayload {
4162
4300
  purpose?: 'invite' | 'reset';
4163
4301
  providerId?: string;
4164
4302
  authSource?: 'local' | 'external';
4303
+ siteId?: string;
4165
4304
  }
4166
4305
  declare const DEFAULT_SESSION_EXPIRY = "7d";
4306
+ declare const DEFAULT_INVITE_EXPIRY = "48h";
4307
+ declare const DEFAULT_RESET_PASSWORD_EXPIRY = "2h";
4167
4308
  /**
4168
4309
  * Resolve the session JWT lifetime for an auth collection.
4169
4310
  *
@@ -4172,6 +4313,18 @@ declare const DEFAULT_SESSION_EXPIRY = "7d";
4172
4313
  * value) so existing behavior is unchanged.
4173
4314
  */
4174
4315
  declare function resolveSessionTokenExpiry(collection: CollectionConfig): string;
4316
+ /**
4317
+ * Resolve the invite JWT lifetime for an auth collection.
4318
+ *
4319
+ * Reads `auth.inviteExpiration` when configured, and falls back to `'48h'`.
4320
+ */
4321
+ declare function resolveInviteTokenExpiry(collection: CollectionConfig): string;
4322
+ /**
4323
+ * Resolve the reset password JWT lifetime for an auth collection.
4324
+ *
4325
+ * Reads `auth.resetPasswordExpiration` when configured, and falls back to `'2h'`.
4326
+ */
4327
+ declare function resolveResetPasswordTokenExpiry(collection: CollectionConfig): string;
4175
4328
  /**
4176
4329
  * Issue a signed JWT for a user document in an auth collection.
4177
4330
  */
@@ -4321,4 +4474,4 @@ interface DyrectedContext {
4321
4474
  */
4322
4475
  declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
4323
4476
 
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 };
4477
+ 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 DynamicOptionsResolverArgs 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 CollectionRAGConfig as bA, type CollectionSchemaResult as bB, type CollectionSummaryResult as bC, type CollectionViewComponentSlots as bD, type CompiledNavGroup as bE, type CountOperation as bF, type CustomAdminAuthProvider as bG, DEFAULT_USER_NAV_PREFERENCES as bH, type DateFieldAdmin as bI, type DateFormat as bJ, type DefaultValueContext as bK, type DefineActionOptions as bL, type DefineCalendarViewOptions as bM, type DefineCardsViewOptions as bN, type DefineGanttViewOptions as bO, type DefineKanbanViewOptions as bP, type DefineTableViewOptions as bQ, type DefineViewBaseOptions as bR, type DefineViewOptions as bS, type DetailSpan as bT, type DisplayTone as bU, type DisplayVariant as bV, type DistinctCountOperation as bW, type DistinctValuesOperation as bX, type DynamicOptionItem as bY, type DynamicOptionsConfig as bZ, type DynamicOptionsResolver 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 CollectionEmailConfig as bx, type CollectionIndex as by, type CollectionListComponentSlots as bz, type WorkflowTransition as c, type PublicAdminAuthProvider as c$, type DyrectedAIContext as c0, type DyrectedLoggerConfig as c1, type DyrectedObservabilityConfig as c2, type EmailFieldAdmin as c3, type EmailTemplateArgs as c4, type EmailTemplateResult as c5, type FieldAdminHooks as c6, type FieldAdminOnChangeHook as c7, type FieldAdminOnChangeHookArgs as c8, type FieldAdminOptionsHook as c9, type ImageTransformOptions as cA, type InferAggregateResult as cB, type JoinFieldAdmin as cC, type JsonFieldAdmin as cD, type JsonFormat as cE, type KanbanViewConfig as cF, LIFECYCLE_EVENT_NAMES as cG, type LifecycleEventHandler as cH, type LinkFormat as cI, type MetricColor as cJ, type MoneyFieldAdmin as cK, type MoneyFieldConfig as cL, type MultiSelectFieldAdmin as cM, type NamedAccessPolicy as cN, type NavBadgeConfig as cO, type NavGroup as cP, type NumberFieldAdmin as cQ, type NumberFormat as cR, type NumberLimitFieldAdmin as cS, type NumberLimitFieldConfig as cT, type NumericOperation as cU, type NumericUpdateOperator as cV, type OIDCAdminAuthProvider as cW, type OptionFormat as cX, type OutboundEmail as cY, type PaginatedResult as cZ, type PinnedNavItemRef as c_, type FieldAdminOptionsHookArgs as ca, type FieldAdminOptionsHookResult as cb, type FieldAfterReadHook as cc, type FieldAfterReadHookArgs as cd, type FieldBase as ce, type FieldBeforeChangeHook as cf, type FieldBeforeChangeHookArgs as cg, type FieldHook as ch, type FieldHooks as ci, type FileData as cj, type GanttViewConfig as ck, type GetDocumentResult as cl, type GlobalAfterChangeHook as cm, type GlobalAfterReadHook as cn, type GlobalAfterReadHookEntry as co, type GlobalBeforeChangeHook as cp, type GlobalBeforeChangeHookEntry as cq, type GlobalBeforeReadHook as cr, type GlobalBeforeReadHookEntry as cs, type GlobalRAGConfig as ct, type GlobalSchemaResult as cu, type GlobalSummaryResult as cv, type HeadingLevel as cw, type HookFunction as cx, type IconFieldAdmin as cy, type ImageService as cz, type LifecycleEvent as d, buildRequestLogger as d$, type QueryCollectionResult as d0, type RAGSearchResult as d1, type RadioFieldAdmin as d2, type RateLimitConfig as d3, type ReadonlyDatabaseAdapter as d4, type RichTextFeature as d5, type RichTextFieldConfig as d6, type SelectFieldAdmin as d7, type SqlWhereResult as d8, type StorageAdapter as d9, type WorkflowOnTransitionContext as dA, type WorkflowOnTransitionHook as dB, type WorkflowRole as dC, type WorkflowState as dD, type WorkflowTransitionContext as dE, coerceBooleanWhere as dF, defineAction as dG, defineCalendarView as dH, defineCardsView as dI, defineGanttView as dJ, defineKanbanView as dK, defineTableView as dL, defineView as dM, defineWorkspace as dN, isAICollection as dO, parseMongoWhere as dP, parseSqlWhere as dQ, type CollectionTokenPayload as dR, DEFAULT_INVITE_EXPIRY as dS, DEFAULT_RESET_PASSWORD_EXPIRY as dT, DEFAULT_SESSION_EXPIRY as dU, type DyrectedObservabilityRuntime as dV, type RequestBodyCapture as dW, type RequestTraceContext as dX, type ResolvedObservabilityConfig as dY, attachRequestMetrics as dZ, bindObservabilityRuntime as d_, type TableViewConfig as da, type TaskContext as db, type TaskLogger as dc, type TaskRunStatus as dd, type TextFieldAdmin as de, type TextFormat as df, type TextareaFieldAdmin as dg, type TrashConfig as dh, type TrustProxyConfig as di, type TypedField as dj, type UploadConfig as dk, type UrlFieldAdmin as dl, type UrlLinkValue as dm, type ViewActionFeatures as dn, type ViewComponentSlots as dp, type ViewConfigBase as dq, type ViewLayout as dr, type ViewMetric as ds, type ViewSubMetric as dt, type WhereClause as du, type WhereOperator as dv, type WhereOperatorName as dw, type WordLimitFieldAdmin as dx, type WordLimitFieldConfig as dy, type WorkflowMetadata as dz, type DatabaseAdapter as e, captureRequestBody as e0, createDyrectedApp as e1, createObservabilityRuntime as e2, createRequestSpan as e3, decodeCollectionToken as e4, endRequestSpan as e5, getConfigLogger as e6, getObservabilityRuntime as e7, getRequestLogger as e8, redactBody as e9, redactHeaders as ea, renderPrometheusMetrics as eb, resolveInviteTokenExpiry as ec, resolveObservabilityConfig as ed, resolveResetPasswordTokenExpiry as ee, resolveSessionTokenExpiry as ef, shouldSampleRequest as eg, signCollectionToken as eh, verifyCollectionToken as ei, 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 };
@@ -51,6 +51,8 @@ interface AuthenticatedUser {
51
51
 
52
52
  interface AccessFunctionArgs<TDoc extends object = Record<string, unknown>, TUser extends AuthenticatedUser = AuthenticatedUser> {
53
53
  user: TUser | undefined;
54
+ /** ID of the document being accessed, when the operation targets one. */
55
+ id?: string;
54
56
  doc?: TDoc;
55
57
  data?: Partial<TDoc>;
56
58
  req: HookRequestContext;
@@ -551,11 +553,19 @@ type InferAggregateResult<T extends AggregateInput> = {
551
553
  * so adding a new operator without handling it will produce a TypeScript error
552
554
  * in every adapter translator.
553
555
  */
554
- type WhereOperatorName = 'equals' | 'not_equals' | 'in' | 'not_in' | 'gt' | 'greater_than' | 'gte' | 'greater_than_equal' | 'greater_than_or_equal' | 'lt' | 'less_than' | 'lte' | 'less_than_equal' | 'less_than_or_equal' | 'contains' | 'like' | 'starts_with' | 'exists';
556
+ type WhereOperatorName = 'equals' | 'not_equals' | 'not' | 'ne' | 'not_equal' | 'notEquals' | 'in' | 'not_in' | 'gt' | 'greater_than' | 'gte' | 'greater_than_equal' | 'greater_than_or_equal' | 'lt' | 'less_than' | 'lte' | 'less_than_equal' | 'less_than_or_equal' | 'contains' | 'like' | 'starts_with' | 'exists';
555
557
  type WhereOperator = {
556
558
  equals: any;
557
559
  } | {
558
560
  not_equals: any;
561
+ } | {
562
+ not: any;
563
+ } | {
564
+ ne: any;
565
+ } | {
566
+ not_equal: any;
567
+ } | {
568
+ notEquals: any;
559
569
  } | {
560
570
  in: any[];
561
571
  } | {
@@ -596,6 +606,8 @@ type WhereClause = {
596
606
  or?: WhereClause[] | readonly WhereClause[];
597
607
  AND?: WhereClause[] | readonly WhereClause[];
598
608
  and?: WhereClause[] | readonly WhereClause[];
609
+ NOT?: WhereClause[] | readonly WhereClause[] | WhereClause;
610
+ not?: WhereClause[] | readonly WhereClause[] | WhereClause;
599
611
  };
600
612
  interface SqlWhereResult {
601
613
  sql: string;
@@ -2014,6 +2026,91 @@ type DetailItem<TDoc = any> = DetailSection | DetailTabs | DetailGrid | DetailFi
2014
2026
  */
2015
2027
  type DetailSchema<TDoc = any> = DetailItem<TDoc>[];
2016
2028
 
2029
+ /**
2030
+ * Email template return value.
2031
+ *
2032
+ * Supports either direct HTML content or external provider template IDs with variables
2033
+ * (e.g. Seamailer, Postmark, SendGrid, Mailgun).
2034
+ */
2035
+ type EmailTemplateResult = {
2036
+ subject?: string;
2037
+ html: string;
2038
+ text?: string;
2039
+ } | {
2040
+ /**
2041
+ * External provider template identifier:
2042
+ * - Seamailer: numeric template ID (e.g. 821354)
2043
+ * - Postmark: template alias (e.g. 'welcome-user') or numeric ID
2044
+ * - SendGrid: template ID (e.g. 'd-1234567890abcdef')
2045
+ */
2046
+ template: string | number;
2047
+ variables: Record<string, unknown>;
2048
+ subject?: string;
2049
+ };
2050
+ /**
2051
+ * Contextual arguments passed into email template builders.
2052
+ */
2053
+ type EmailTemplateArgs<T = Record<string, unknown>> = T & {
2054
+ collection?: string;
2055
+ /** Readable singular name of the collection (falls back to plural, then a humanised slug). */
2056
+ collectionLabel?: string;
2057
+ /** The raw singular/plural labels configured on the collection. */
2058
+ collectionLabels?: {
2059
+ singular?: string;
2060
+ plural?: string;
2061
+ };
2062
+ siteName?: string;
2063
+ user?: Record<string, unknown>;
2064
+ };
2065
+ /**
2066
+ * The typed email payload passed to `config.email.send`.
2067
+ *
2068
+ * Supports both traditional HTML payloads and external provider template payloads.
2069
+ */
2070
+ type OutboundEmail = {
2071
+ to: string;
2072
+ from?: string;
2073
+ collection?: string;
2074
+ purpose?: "invite" | "resetPassword" | "welcome" | "passwordChanged" | string;
2075
+ user?: Record<string, unknown>;
2076
+ } & ({
2077
+ type?: "html";
2078
+ subject: string;
2079
+ html: string;
2080
+ text?: string;
2081
+ } | {
2082
+ type: "template";
2083
+ template: string | number;
2084
+ variables: Record<string, unknown>;
2085
+ subject?: string;
2086
+ });
2087
+ /**
2088
+ * Collection-level email configuration.
2089
+ */
2090
+ interface CollectionEmailConfig {
2091
+ /** Optional custom `from` address for emails sent by this collection. */
2092
+ from?: string;
2093
+ /** Collection-specific email templates. */
2094
+ templates?: {
2095
+ welcome?: (args: EmailTemplateArgs<{
2096
+ email: string;
2097
+ }>) => EmailTemplateResult;
2098
+ invite?: (args: EmailTemplateArgs<{
2099
+ token: string;
2100
+ url?: string;
2101
+ invitedByEmail?: string;
2102
+ data?: Record<string, unknown>;
2103
+ }>) => EmailTemplateResult;
2104
+ resetPassword?: (args: EmailTemplateArgs<{
2105
+ token: string;
2106
+ url?: string;
2107
+ }>) => EmailTemplateResult;
2108
+ passwordChanged?: (args: EmailTemplateArgs<{
2109
+ email: string;
2110
+ }>) => EmailTemplateResult;
2111
+ };
2112
+ }
2113
+
2017
2114
  /**
2018
2115
  * Trash and retention configuration for a collection.
2019
2116
  */
@@ -2060,6 +2157,39 @@ interface AuthConfig {
2060
2157
  * Defaults to `'admin'`.
2061
2158
  */
2062
2159
  adminRole?: string;
2160
+ /**
2161
+ * How long invitation tokens remain valid for this collection.
2162
+ *
2163
+ * Accepts the same values as `jose`'s `setExpirationTime` (e.g. `'24h'`,
2164
+ * `'48h'`, `'7d'`, `'14d'`).
2165
+ *
2166
+ * Defaults to `'7d'`.
2167
+ */
2168
+ inviteExpiration?: string;
2169
+ /**
2170
+ * How long password reset tokens remain valid for this collection.
2171
+ *
2172
+ * Accepts the same values as `jose`'s `setExpirationTime` (e.g. `'15m'`,
2173
+ * `'30m'`, `'1h'`, `'2h'`).
2174
+ *
2175
+ * Defaults to `'1h'`.
2176
+ */
2177
+ resetPasswordExpiration?: string;
2178
+ /**
2179
+ * Dedicated action URLs for this auth collection.
2180
+ *
2181
+ * When configured, invite and password reset emails for this collection
2182
+ * use these URLs instead of falling back to `admin.adminUrl` or `/admin`.
2183
+ */
2184
+ urls?: {
2185
+ invite?: string;
2186
+ resetPassword?: string;
2187
+ login?: string;
2188
+ };
2189
+ /**
2190
+ * Collection-specific email templates and sender overrides.
2191
+ */
2192
+ email?: CollectionEmailConfig;
2063
2193
  }
2064
2194
  /**
2065
2195
  * Physical database index specification for a collection.
@@ -4038,42 +4168,50 @@ interface DyrectedConfig<TUser extends AuthenticatedUser = AuthenticatedUser> {
4038
4168
  email?: {
4039
4169
  /** The `From` address for all outbound emails. */
4040
4170
  from: string;
4041
- /** The send function. Wire in any email provider (Resend, SendGrid, SES, etc.). */
4042
- send: (args: {
4043
- to: string;
4044
- subject: string;
4045
- html: string;
4046
- }) => Promise<void>;
4047
- /** Override the default email templates. */
4171
+ /**
4172
+ * Whether admins can edit email templates via the Admin UI.
4173
+ * Defaults to true.
4174
+ */
4175
+ adminEditable?: boolean;
4176
+ /** The send function. Wire in any email provider (Resend, SendGrid, SES, Seamailer, Postmark, etc.). */
4177
+ send: (args: OutboundEmail) => Promise<void>;
4178
+ /** Global default email templates. */
4048
4179
  templates?: {
4049
- welcome?: (args: {
4180
+ welcome?: (args: EmailTemplateArgs<{
4050
4181
  email: string;
4051
- }) => {
4052
- subject?: string;
4053
- html: string;
4054
- };
4055
- invite?: (args: {
4182
+ }>) => EmailTemplateResult;
4183
+ invite?: (args: EmailTemplateArgs<{
4056
4184
  token: string;
4057
4185
  invitedByEmail?: string;
4058
4186
  url?: string;
4059
- }) => {
4060
- subject?: string;
4061
- html: string;
4062
- };
4063
- resetPassword?: (args: {
4187
+ data?: Record<string, unknown>;
4188
+ }>) => EmailTemplateResult;
4189
+ resetPassword?: (args: EmailTemplateArgs<{
4064
4190
  token: string;
4065
4191
  url?: string;
4066
- }) => {
4067
- subject?: string;
4068
- html: string;
4069
- };
4070
- passwordChanged?: (args: {
4192
+ }>) => EmailTemplateResult;
4193
+ passwordChanged?: (args: EmailTemplateArgs<{
4071
4194
  email: string;
4072
- }) => {
4073
- subject?: string;
4074
- html: string;
4075
- };
4195
+ }>) => EmailTemplateResult;
4076
4196
  };
4197
+ /**
4198
+ * Additional transactional email purposes beyond the built-in auth lifecycle events.
4199
+ * Each entry appears as a selectable option in the Admin UI email template editor,
4200
+ * allowing admins to manage and test templates for business domain events
4201
+ * (e.g. order confirmations, booking reminders, webhook notifications).
4202
+ *
4203
+ * @example
4204
+ * email: {
4205
+ * purposes: [
4206
+ * { label: "Order Confirmation", value: "order_confirmation" },
4207
+ * { label: "Booking Reminder", value: "booking_reminder" },
4208
+ * ],
4209
+ * }
4210
+ */
4211
+ purposes?: Array<{
4212
+ label: string;
4213
+ value: string;
4214
+ }>;
4077
4215
  };
4078
4216
  /**
4079
4217
  * Redis connection URL. Required for distributed caching of dynamic option
@@ -4162,8 +4300,11 @@ interface CollectionTokenPayload extends JWTPayload {
4162
4300
  purpose?: 'invite' | 'reset';
4163
4301
  providerId?: string;
4164
4302
  authSource?: 'local' | 'external';
4303
+ siteId?: string;
4165
4304
  }
4166
4305
  declare const DEFAULT_SESSION_EXPIRY = "7d";
4306
+ declare const DEFAULT_INVITE_EXPIRY = "48h";
4307
+ declare const DEFAULT_RESET_PASSWORD_EXPIRY = "2h";
4167
4308
  /**
4168
4309
  * Resolve the session JWT lifetime for an auth collection.
4169
4310
  *
@@ -4172,6 +4313,18 @@ declare const DEFAULT_SESSION_EXPIRY = "7d";
4172
4313
  * value) so existing behavior is unchanged.
4173
4314
  */
4174
4315
  declare function resolveSessionTokenExpiry(collection: CollectionConfig): string;
4316
+ /**
4317
+ * Resolve the invite JWT lifetime for an auth collection.
4318
+ *
4319
+ * Reads `auth.inviteExpiration` when configured, and falls back to `'48h'`.
4320
+ */
4321
+ declare function resolveInviteTokenExpiry(collection: CollectionConfig): string;
4322
+ /**
4323
+ * Resolve the reset password JWT lifetime for an auth collection.
4324
+ *
4325
+ * Reads `auth.resetPasswordExpiration` when configured, and falls back to `'2h'`.
4326
+ */
4327
+ declare function resolveResetPasswordTokenExpiry(collection: CollectionConfig): string;
4175
4328
  /**
4176
4329
  * Issue a signed JWT for a user document in an auth collection.
4177
4330
  */
@@ -4321,4 +4474,4 @@ interface DyrectedContext {
4321
4474
  */
4322
4475
  declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
4323
4476
 
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 };
4477
+ 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 DynamicOptionsResolverArgs 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 CollectionRAGConfig as bA, type CollectionSchemaResult as bB, type CollectionSummaryResult as bC, type CollectionViewComponentSlots as bD, type CompiledNavGroup as bE, type CountOperation as bF, type CustomAdminAuthProvider as bG, DEFAULT_USER_NAV_PREFERENCES as bH, type DateFieldAdmin as bI, type DateFormat as bJ, type DefaultValueContext as bK, type DefineActionOptions as bL, type DefineCalendarViewOptions as bM, type DefineCardsViewOptions as bN, type DefineGanttViewOptions as bO, type DefineKanbanViewOptions as bP, type DefineTableViewOptions as bQ, type DefineViewBaseOptions as bR, type DefineViewOptions as bS, type DetailSpan as bT, type DisplayTone as bU, type DisplayVariant as bV, type DistinctCountOperation as bW, type DistinctValuesOperation as bX, type DynamicOptionItem as bY, type DynamicOptionsConfig as bZ, type DynamicOptionsResolver 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 CollectionEmailConfig as bx, type CollectionIndex as by, type CollectionListComponentSlots as bz, type WorkflowTransition as c, type PublicAdminAuthProvider as c$, type DyrectedAIContext as c0, type DyrectedLoggerConfig as c1, type DyrectedObservabilityConfig as c2, type EmailFieldAdmin as c3, type EmailTemplateArgs as c4, type EmailTemplateResult as c5, type FieldAdminHooks as c6, type FieldAdminOnChangeHook as c7, type FieldAdminOnChangeHookArgs as c8, type FieldAdminOptionsHook as c9, type ImageTransformOptions as cA, type InferAggregateResult as cB, type JoinFieldAdmin as cC, type JsonFieldAdmin as cD, type JsonFormat as cE, type KanbanViewConfig as cF, LIFECYCLE_EVENT_NAMES as cG, type LifecycleEventHandler as cH, type LinkFormat as cI, type MetricColor as cJ, type MoneyFieldAdmin as cK, type MoneyFieldConfig as cL, type MultiSelectFieldAdmin as cM, type NamedAccessPolicy as cN, type NavBadgeConfig as cO, type NavGroup as cP, type NumberFieldAdmin as cQ, type NumberFormat as cR, type NumberLimitFieldAdmin as cS, type NumberLimitFieldConfig as cT, type NumericOperation as cU, type NumericUpdateOperator as cV, type OIDCAdminAuthProvider as cW, type OptionFormat as cX, type OutboundEmail as cY, type PaginatedResult as cZ, type PinnedNavItemRef as c_, type FieldAdminOptionsHookArgs as ca, type FieldAdminOptionsHookResult as cb, type FieldAfterReadHook as cc, type FieldAfterReadHookArgs as cd, type FieldBase as ce, type FieldBeforeChangeHook as cf, type FieldBeforeChangeHookArgs as cg, type FieldHook as ch, type FieldHooks as ci, type FileData as cj, type GanttViewConfig as ck, type GetDocumentResult as cl, type GlobalAfterChangeHook as cm, type GlobalAfterReadHook as cn, type GlobalAfterReadHookEntry as co, type GlobalBeforeChangeHook as cp, type GlobalBeforeChangeHookEntry as cq, type GlobalBeforeReadHook as cr, type GlobalBeforeReadHookEntry as cs, type GlobalRAGConfig as ct, type GlobalSchemaResult as cu, type GlobalSummaryResult as cv, type HeadingLevel as cw, type HookFunction as cx, type IconFieldAdmin as cy, type ImageService as cz, type LifecycleEvent as d, buildRequestLogger as d$, type QueryCollectionResult as d0, type RAGSearchResult as d1, type RadioFieldAdmin as d2, type RateLimitConfig as d3, type ReadonlyDatabaseAdapter as d4, type RichTextFeature as d5, type RichTextFieldConfig as d6, type SelectFieldAdmin as d7, type SqlWhereResult as d8, type StorageAdapter as d9, type WorkflowOnTransitionContext as dA, type WorkflowOnTransitionHook as dB, type WorkflowRole as dC, type WorkflowState as dD, type WorkflowTransitionContext as dE, coerceBooleanWhere as dF, defineAction as dG, defineCalendarView as dH, defineCardsView as dI, defineGanttView as dJ, defineKanbanView as dK, defineTableView as dL, defineView as dM, defineWorkspace as dN, isAICollection as dO, parseMongoWhere as dP, parseSqlWhere as dQ, type CollectionTokenPayload as dR, DEFAULT_INVITE_EXPIRY as dS, DEFAULT_RESET_PASSWORD_EXPIRY as dT, DEFAULT_SESSION_EXPIRY as dU, type DyrectedObservabilityRuntime as dV, type RequestBodyCapture as dW, type RequestTraceContext as dX, type ResolvedObservabilityConfig as dY, attachRequestMetrics as dZ, bindObservabilityRuntime as d_, type TableViewConfig as da, type TaskContext as db, type TaskLogger as dc, type TaskRunStatus as dd, type TextFieldAdmin as de, type TextFormat as df, type TextareaFieldAdmin as dg, type TrashConfig as dh, type TrustProxyConfig as di, type TypedField as dj, type UploadConfig as dk, type UrlFieldAdmin as dl, type UrlLinkValue as dm, type ViewActionFeatures as dn, type ViewComponentSlots as dp, type ViewConfigBase as dq, type ViewLayout as dr, type ViewMetric as ds, type ViewSubMetric as dt, type WhereClause as du, type WhereOperator as dv, type WhereOperatorName as dw, type WordLimitFieldAdmin as dx, type WordLimitFieldConfig as dy, type WorkflowMetadata as dz, type DatabaseAdapter as e, captureRequestBody as e0, createDyrectedApp as e1, createObservabilityRuntime as e2, createRequestSpan as e3, decodeCollectionToken as e4, endRequestSpan as e5, getConfigLogger as e6, getObservabilityRuntime as e7, getRequestLogger as e8, redactBody as e9, redactHeaders as ea, renderPrometheusMetrics as eb, resolveInviteTokenExpiry as ec, resolveObservabilityConfig as ed, resolveResetPasswordTokenExpiry as ee, resolveSessionTokenExpiry as ef, shouldSampleRequest as eg, signCollectionToken as eh, verifyCollectionToken as ei, 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 };