@dyrected/core 2.13.6 → 2.14.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.
- package/dist/{app-phLVsEOM.d.cts → app-Cp8RudRI.d.cts} +32 -1
- package/dist/{app-phLVsEOM.d.ts → app-Cp8RudRI.d.ts} +32 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/server.cjs +69 -8
- package/dist/server.d.cts +93 -3
- package/dist/server.d.ts +93 -3
- package/dist/server.js +45 -7
- package/package.json +1 -1
|
@@ -1784,6 +1784,16 @@ interface AuthConfig {
|
|
|
1784
1784
|
* Defaults to `10 * 60 * 1000` (10 minutes).
|
|
1785
1785
|
*/
|
|
1786
1786
|
lockTime?: number;
|
|
1787
|
+
/**
|
|
1788
|
+
* How long issued session JWTs remain valid.
|
|
1789
|
+
*
|
|
1790
|
+
* Accepts the same values as `jose`'s `setExpirationTime` (e.g. `'15m'`,
|
|
1791
|
+
* `'12h'`, `'30d'`).
|
|
1792
|
+
*
|
|
1793
|
+
* Defaults to `'7d'`. Applies to login, registration, invite-accept, and
|
|
1794
|
+
* refresh-token issuance for this collection.
|
|
1795
|
+
*/
|
|
1796
|
+
tokenExpiration?: string;
|
|
1787
1797
|
/**
|
|
1788
1798
|
* The role name designated as the superuser/admin role for this collection.
|
|
1789
1799
|
*
|
|
@@ -3650,6 +3660,27 @@ interface CollectionTokenPayload extends JWTPayload {
|
|
|
3650
3660
|
providerId?: string;
|
|
3651
3661
|
authSource?: 'local' | 'external';
|
|
3652
3662
|
}
|
|
3663
|
+
declare const DEFAULT_SESSION_EXPIRY = "7d";
|
|
3664
|
+
/**
|
|
3665
|
+
* Resolve the session JWT lifetime for an auth collection.
|
|
3666
|
+
*
|
|
3667
|
+
* Reads `auth.tokenExpiration` when the collection configures auth as an
|
|
3668
|
+
* object, and falls back to `'7d'` for `auth: true` (or any missing/empty
|
|
3669
|
+
* value) so existing behavior is unchanged.
|
|
3670
|
+
*/
|
|
3671
|
+
declare function resolveSessionTokenExpiry(collection: CollectionConfig): string;
|
|
3672
|
+
/**
|
|
3673
|
+
* Issue a signed JWT for a user document in an auth collection.
|
|
3674
|
+
*/
|
|
3675
|
+
declare function signCollectionToken(payload: Omit<CollectionTokenPayload, 'iat' | 'exp'>, expiresIn?: string): Promise<string>;
|
|
3676
|
+
/**
|
|
3677
|
+
* Verify and decode a collection JWT. Throws if invalid or expired.
|
|
3678
|
+
*/
|
|
3679
|
+
declare function verifyCollectionToken(token: string): Promise<CollectionTokenPayload>;
|
|
3680
|
+
/**
|
|
3681
|
+
* Decode a token without verification (read-only, for middleware that wants to be non-blocking).
|
|
3682
|
+
*/
|
|
3683
|
+
declare function decodeCollectionToken(token: string): CollectionTokenPayload | null;
|
|
3653
3684
|
|
|
3654
3685
|
type RequestVars = DyrectedContext["Variables"];
|
|
3655
3686
|
interface ResolvedObservabilityConfig {
|
|
@@ -3787,4 +3818,4 @@ interface DyrectedContext {
|
|
|
3787
3818
|
*/
|
|
3788
3819
|
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
3789
3820
|
|
|
3790
|
-
export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type
|
|
3821
|
+
export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type CollectionTokenPayload as d8, DEFAULT_SESSION_EXPIRY as d9, type DyrectedObservabilityRuntime as da, type RequestBodyCapture as db, type RequestTraceContext as dc, type ResolvedObservabilityConfig as dd, attachRequestMetrics as de, bindObservabilityRuntime as df, buildRequestLogger as dg, captureRequestBody as dh, createDyrectedApp as di, createObservabilityRuntime as dj, createRequestSpan as dk, decodeCollectionToken as dl, endRequestSpan as dm, getConfigLogger as dn, getObservabilityRuntime as dp, getRequestLogger as dq, redactBody as dr, redactHeaders as ds, renderPrometheusMetrics as dt, resolveObservabilityConfig as du, resolveSessionTokenExpiry as dv, shouldSampleRequest as dw, signCollectionToken as dx, verifyCollectionToken as dy, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };
|
|
@@ -1784,6 +1784,16 @@ interface AuthConfig {
|
|
|
1784
1784
|
* Defaults to `10 * 60 * 1000` (10 minutes).
|
|
1785
1785
|
*/
|
|
1786
1786
|
lockTime?: number;
|
|
1787
|
+
/**
|
|
1788
|
+
* How long issued session JWTs remain valid.
|
|
1789
|
+
*
|
|
1790
|
+
* Accepts the same values as `jose`'s `setExpirationTime` (e.g. `'15m'`,
|
|
1791
|
+
* `'12h'`, `'30d'`).
|
|
1792
|
+
*
|
|
1793
|
+
* Defaults to `'7d'`. Applies to login, registration, invite-accept, and
|
|
1794
|
+
* refresh-token issuance for this collection.
|
|
1795
|
+
*/
|
|
1796
|
+
tokenExpiration?: string;
|
|
1787
1797
|
/**
|
|
1788
1798
|
* The role name designated as the superuser/admin role for this collection.
|
|
1789
1799
|
*
|
|
@@ -3650,6 +3660,27 @@ interface CollectionTokenPayload extends JWTPayload {
|
|
|
3650
3660
|
providerId?: string;
|
|
3651
3661
|
authSource?: 'local' | 'external';
|
|
3652
3662
|
}
|
|
3663
|
+
declare const DEFAULT_SESSION_EXPIRY = "7d";
|
|
3664
|
+
/**
|
|
3665
|
+
* Resolve the session JWT lifetime for an auth collection.
|
|
3666
|
+
*
|
|
3667
|
+
* Reads `auth.tokenExpiration` when the collection configures auth as an
|
|
3668
|
+
* object, and falls back to `'7d'` for `auth: true` (or any missing/empty
|
|
3669
|
+
* value) so existing behavior is unchanged.
|
|
3670
|
+
*/
|
|
3671
|
+
declare function resolveSessionTokenExpiry(collection: CollectionConfig): string;
|
|
3672
|
+
/**
|
|
3673
|
+
* Issue a signed JWT for a user document in an auth collection.
|
|
3674
|
+
*/
|
|
3675
|
+
declare function signCollectionToken(payload: Omit<CollectionTokenPayload, 'iat' | 'exp'>, expiresIn?: string): Promise<string>;
|
|
3676
|
+
/**
|
|
3677
|
+
* Verify and decode a collection JWT. Throws if invalid or expired.
|
|
3678
|
+
*/
|
|
3679
|
+
declare function verifyCollectionToken(token: string): Promise<CollectionTokenPayload>;
|
|
3680
|
+
/**
|
|
3681
|
+
* Decode a token without verification (read-only, for middleware that wants to be non-blocking).
|
|
3682
|
+
*/
|
|
3683
|
+
declare function decodeCollectionToken(token: string): CollectionTokenPayload | null;
|
|
3653
3684
|
|
|
3654
3685
|
type RequestVars = DyrectedContext["Variables"];
|
|
3655
3686
|
interface ResolvedObservabilityConfig {
|
|
@@ -3787,4 +3818,4 @@ interface DyrectedContext {
|
|
|
3787
3818
|
*/
|
|
3788
3819
|
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
3789
3820
|
|
|
3790
|
-
export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type
|
|
3821
|
+
export { type MultiSelectField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailText as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailSchema as I, type DyrectedContext as J, type AIConfig as K, type LifecycleEventName as L, type AIPIIConfig as M, type ArrayField as N, type FieldType as O, type PublicAdminAuthConfig as P, type BooleanField as Q, type AuthConfig as R, type AccessPolicyResolver as S, type DateField as T, type DateTimeField as U, type EmailField as V, type WorkflowConfig as W, type IconField as X, type ImageField as Y, type JoinField as Z, type JsonField as _, type DeclarativeHookExpression as a, type CharacterLimitFieldAdmin as a$, type NumberField as a0, type ObjectField as a1, type RadioField as a2, type RelationshipField as a3, type RichTextField as a4, type RowField as a5, type SelectField as a6, type TextField as a7, type TextareaField as a8, type TimeField as a9, type ActionConfigWithHandler as aA, type ActionConfigWithMutation as aB, type ActionContext as aC, type ActionType as aD, type AdminAuthAccessResolution as aE, type AdminAuthClaimMapping as aF, type AdminAuthMember as aG, type AdminAuthProvider as aH, type AdminAuthProviderMembersConfig as aI, type AdminAuthProvisioningMode as aJ, type AdminAuthResolveAccessArgs as aK, type AdminAuthResolvedIdentity as aL, type AdminConfig as aM, type AdminDashboardComponentSlots as aN, type AdminIconName as aO, type AggregateArgs as aP, type AggregateCastType as aQ, type AggregateCollectionResult as aR, type AggregateInput as aS, type AggregateOperation as aT, type AggregateResult as aU, type BaseAdminAuthProvider as aV, type BaseFieldAdmin as aW, type BlockVariant as aX, type BlocksField as aY, type BooleanFieldAdmin as aZ, type BooleanFormat as a_, type UrlField as aa, type AIAction as ab, type AIActionStatus as ac, type AIActionType as ad, type AIAuditActionType as ae, type AIAuditRecord as af, type AIChunk as ag, type AIMessage as ah, type AIPIIPattern as ai, type AIRateLimitResult as aj, type AIRateLimitStore as ak, type AIThread as al, type AIToolContext as am, type AIToolDefinition as an, AI_ACTIONS_COLLECTION as ao, AI_AUDIT_COLLECTION as ap, AI_CHUNKS_COLLECTION as aq, AI_MESSAGES_COLLECTION as ar, AI_THREADS_COLLECTION as as, type AccessConfig as at, type AccessFunction as au, type AccessFunctionArgs as av, type AccessResult as aw, type AccessRule as ax, type ActionConfig as ay, type ActionConfigBase as az, type AuthenticatedUser as b, type GlobalBeforeChangeHookEntry as b$, type CharacterLimitFieldConfig as b0, type CollectionAfterChangeHook as b1, type CollectionAfterDeleteHook as b2, type CollectionAfterReadHook as b3, type CollectionAfterReadHookEntry as b4, type CollectionAfterTransitionHook as b5, type CollectionBeforeChangeHook as b6, type CollectionBeforeChangeHookEntry as b7, type CollectionBeforeDeleteHook as b8, type CollectionBeforeReadHook as b9, type DynamicOptionItem as bA, type DynamicOptionsConfig as bB, type DynamicOptionsResolver as bC, type DynamicOptionsResolverArgs as bD, type DyrectedAIContext as bE, type DyrectedLoggerConfig as bF, type DyrectedObservabilityConfig as bG, type EmailFieldAdmin as bH, type FieldAdminHooks as bI, type FieldAdminOnChangeHook as bJ, type FieldAdminOnChangeHookArgs as bK, type FieldAdminOptionsHook as bL, type FieldAdminOptionsHookArgs as bM, type FieldAdminOptionsHookResult as bN, type FieldAfterReadHook as bO, type FieldAfterReadHookArgs as bP, type FieldBase as bQ, type FieldBeforeChangeHook as bR, type FieldBeforeChangeHookArgs as bS, type FieldHook as bT, type FieldHooks as bU, type FileData as bV, type GetDocumentResult as bW, type GlobalAfterChangeHook as bX, type GlobalAfterReadHook as bY, type GlobalAfterReadHookEntry as bZ, type GlobalBeforeChangeHook as b_, type CollectionBeforeReadHookEntry as ba, type CollectionBeforeTransitionHook as bb, type CollectionListComponentSlots as bc, type CollectionRAGConfig as bd, type CollectionSchemaResult as be, type CollectionSummaryResult as bf, type CollectionViewComponentSlots as bg, type CountOperation as bh, type CustomAdminAuthProvider as bi, type DatabaseAdapter as bj, type DateFieldAdmin as bk, type DateFormat as bl, type DefaultValueContext as bm, type DefineActionOptions as bn, type DefineCalendarViewOptions as bo, type DefineCardsViewOptions as bp, type DefineGanttViewOptions as bq, type DefineKanbanViewOptions as br, type DefineTableViewOptions as bs, type DefineViewBaseOptions as bt, type DefineViewOptions as bu, type DetailSpan as bv, type DisplayTone as bw, type DisplayVariant as bx, type DistinctCountOperation as by, type DistinctValuesOperation as bz, type WorkflowTransition as c, defineCalendarView as c$, type GlobalBeforeReadHook as c0, type GlobalBeforeReadHookEntry as c1, type GlobalRAGConfig as c2, type GlobalSchemaResult as c3, type GlobalSummaryResult as c4, type HeadingLevel as c5, type HookFunction as c6, type IconFieldAdmin as c7, type ImageService as c8, type ImageTransformOptions as c9, type SelectFieldAdmin as cA, type SqlWhereResult as cB, type StorageAdapter as cC, type TextFieldAdmin as cD, type TextFormat as cE, type TextareaFieldAdmin as cF, type TrustProxyConfig as cG, type TypedField as cH, type UploadConfig as cI, type UrlFieldAdmin as cJ, type UrlLinkValue as cK, type ViewActionFeatures as cL, type ViewComponentSlots as cM, type ViewConfig as cN, type ViewLayout as cO, type ViewMetric as cP, type ViewSubMetric as cQ, type WhereClause as cR, type WhereOperator as cS, type WhereOperatorName as cT, type WordLimitFieldAdmin as cU, type WordLimitFieldConfig as cV, type WorkflowMetadata as cW, type WorkflowRole as cX, type WorkflowState as cY, type WorkflowTransitionContext as cZ, defineAction as c_, type InferAggregateResult as ca, type JoinFieldAdmin as cb, type JsonFieldAdmin as cc, type JsonFormat as cd, LIFECYCLE_EVENT_NAMES as ce, type LifecycleEventHandler as cf, type LinkFormat as cg, type MetricColor as ch, type MultiSelectFieldAdmin as ci, type NamedAccessPolicy as cj, type NumberFieldAdmin as ck, type NumberFormat as cl, type NumberLimitFieldAdmin as cm, type NumberLimitFieldConfig as cn, type NumericOperation as co, type OIDCAdminAuthProvider as cp, type OptionFormat as cq, type PaginatedResult as cr, type PublicAdminAuthProvider as cs, type QueryCollectionResult as ct, type RAGSearchResult as cu, type RadioFieldAdmin as cv, type RateLimitConfig as cw, type ReadonlyDatabaseAdapter as cx, type RichTextFeature as cy, type RichTextFieldConfig as cz, type LifecycleEvent as d, defineCardsView as d0, defineGanttView as d1, defineKanbanView as d2, defineTableView as d3, defineView as d4, isAICollection as d5, parseMongoWhere as d6, parseSqlWhere as d7, type CollectionTokenPayload as d8, DEFAULT_SESSION_EXPIRY as d9, type DyrectedObservabilityRuntime as da, type RequestBodyCapture as db, type RequestTraceContext as dc, type ResolvedObservabilityConfig as dd, attachRequestMetrics as de, bindObservabilityRuntime as df, buildRequestLogger as dg, captureRequestBody as dh, createDyrectedApp as di, createObservabilityRuntime as dj, createRequestSpan as dk, decodeCollectionToken as dl, endRequestSpan as dm, getConfigLogger as dn, getObservabilityRuntime as dp, getRequestLogger as dq, redactBody as dr, redactHeaders as ds, renderPrometheusMetrics as dt, resolveObservabilityConfig as du, resolveSessionTokenExpiry as dv, shouldSampleRequest as dw, signCollectionToken as dx, verifyCollectionToken as dy, type BaseDocument as e, type DetailComputedOptions as f, type ComputedHandler as g, type DetailComputed as h, type DetailCustomOptions as i, type DetailCustom as j, type DetailDividerOptions as k, type DetailDivider as l, type DisplayFieldOptions as m, type DetailField as n, type DetailItem as o, type DetailGridOptions as p, type DetailGrid as q, type DetailRepeatOptions as r, type DetailRepeat as s, type DetailSectionOptions as t, type DetailSection as u, type DetailTabOptions as v, type DetailTab as w, type DetailTabsOptions as x, type DetailTabs as y, type DetailTextOptions as z };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as BaseDocument, H as HookRequestContext, f as DetailComputedOptions, g as ComputedHandler, h as DetailComputed, i as DetailCustomOptions, j as DetailCustom, k as DetailDividerOptions, l as DetailDivider, m as DisplayFieldOptions, n as DetailField, o as DetailItem, p as DetailGridOptions, q as DetailGrid, r as DetailRepeatOptions, s as DetailRepeat, t as DetailSectionOptions, u as DetailSection, v as DetailTabOptions, w as DetailTab, x as DetailTabsOptions, y as DetailTabs, z as DetailTextOptions, E as DetailText, I as DetailSchema, J as DyrectedContext, K as AIConfig, M as AIPIIConfig, N as ArrayField, O as FieldType, Q as BooleanField, R as AuthConfig, S as AccessPolicyResolver, T as DateField, U as DateTimeField, V as EmailField, X as IconField, Y as ImageField, Z as JoinField, _ as JsonField, $ as MultiSelectField, a0 as NumberField, a1 as ObjectField, a2 as RadioField, a3 as RelationshipField, a4 as RichTextField, a5 as RowField, a6 as SelectField, a7 as TextField, a8 as TextareaField, a9 as TimeField, aa as UrlField } from './app-
|
|
2
|
-
export { ab as AIAction, ac as AIActionStatus, ad as AIActionType, ae as AIAuditActionType, af as AIAuditRecord, ag as AIChunk, ah as AIMessage, ai as AIPIIPattern, aj as AIRateLimitResult, ak as AIRateLimitStore, al as AIThread, am as AIToolContext, an as AIToolDefinition, ao as AI_ACTIONS_COLLECTION, ap as AI_AUDIT_COLLECTION, aq as AI_CHUNKS_COLLECTION, ar as AI_MESSAGES_COLLECTION, as as AI_THREADS_COLLECTION, at as AccessConfig, au as AccessFunction, av as AccessFunctionArgs, aw as AccessResult, ax as AccessRule, ay as ActionConfig, az as ActionConfigBase, aA as ActionConfigWithHandler, aB as ActionConfigWithMutation, aC as ActionContext, aD as ActionType, aE as AdminAuthAccessResolution, aF as AdminAuthClaimMapping, aG as AdminAuthMember, aH as AdminAuthProvider, aI as AdminAuthProviderMembersConfig, aJ as AdminAuthProvisioningMode, aK as AdminAuthResolveAccessArgs, aL as AdminAuthResolvedIdentity, aM as AdminConfig, aN as AdminDashboardComponentSlots, aO as AdminIconName, aP as AggregateArgs, aQ as AggregateCastType, aR as AggregateCollectionResult, aS as AggregateInput, aT as AggregateOperation, aU as AggregateResult, aV as BaseAdminAuthProvider, aW as BaseFieldAdmin, aX as BlockVariant, aY as BlocksField, aZ as BooleanFieldAdmin, a_ as BooleanFormat, a$ as CharacterLimitFieldAdmin, b0 as CharacterLimitFieldConfig, b1 as CollectionAfterChangeHook, b2 as CollectionAfterDeleteHook, b3 as CollectionAfterReadHook, b4 as CollectionAfterReadHookEntry, b5 as CollectionAfterTransitionHook, b6 as CollectionBeforeChangeHook, b7 as CollectionBeforeChangeHookEntry, b8 as CollectionBeforeDeleteHook, b9 as CollectionBeforeReadHook, ba as CollectionBeforeReadHookEntry, bb as CollectionBeforeTransitionHook, bc as CollectionListComponentSlots, bd as CollectionRAGConfig, be as CollectionSchemaResult, bf as CollectionSummaryResult, bg as CollectionViewComponentSlots, bh as CountOperation, bi as CustomAdminAuthProvider, bj as DatabaseAdapter, bk as DateFieldAdmin, bl as DateFormat, bm as DefaultValueContext, bn as DefineActionOptions, bo as DefineCalendarViewOptions, bp as DefineCardsViewOptions, bq as DefineGanttViewOptions, br as DefineKanbanViewOptions, bs as DefineTableViewOptions, bt as DefineViewBaseOptions, bu as DefineViewOptions, bv as DetailSpan, bw as DisplayTone, bx as DisplayVariant, by as DistinctCountOperation, bz as DistinctValuesOperation, bA as DynamicOptionItem, bB as DynamicOptionsConfig, bC as DynamicOptionsResolver, bD as DynamicOptionsResolverArgs, bE as DyrectedAIContext, bF as DyrectedLoggerConfig, bG as DyrectedObservabilityConfig, bH as EmailFieldAdmin, bI as FieldAdminHooks, bJ as FieldAdminOnChangeHook, bK as FieldAdminOnChangeHookArgs, bL as FieldAdminOptionsHook, bM as FieldAdminOptionsHookArgs, bN as FieldAdminOptionsHookResult, bO as FieldAfterReadHook, bP as FieldAfterReadHookArgs, bQ as FieldBase, bR as FieldBeforeChangeHook, bS as FieldBeforeChangeHookArgs, bT as FieldHook, bU as FieldHooks, bV as FileData, bW as GetDocumentResult, bX as GlobalAfterChangeHook, bY as GlobalAfterReadHook, bZ as GlobalAfterReadHookEntry, b_ as GlobalBeforeChangeHook, b$ as GlobalBeforeChangeHookEntry, c0 as GlobalBeforeReadHook, c1 as GlobalBeforeReadHookEntry, c2 as GlobalRAGConfig, c3 as GlobalSchemaResult, c4 as GlobalSummaryResult, c5 as HeadingLevel, c6 as HookFunction, c7 as IconFieldAdmin, c8 as ImageService, c9 as ImageTransformOptions, ca as InferAggregateResult, cb as JoinFieldAdmin, cc as JsonFieldAdmin, cd as JsonFormat, ce as LIFECYCLE_EVENT_NAMES, cf as LifecycleEventHandler, cg as LinkFormat, ch as MetricColor, ci as MultiSelectFieldAdmin, cj as NamedAccessPolicy, ck as NumberFieldAdmin, cl as NumberFormat, cm as NumberLimitFieldAdmin, cn as NumberLimitFieldConfig, co as NumericOperation, cp as OIDCAdminAuthProvider, cq as OptionFormat, cr as PaginatedResult, cs as PublicAdminAuthProvider, ct as QueryCollectionResult, cu as RAGSearchResult, cv as RadioFieldAdmin, cw as RateLimitConfig, cx as ReadonlyDatabaseAdapter, cy as RichTextFeature, cz as RichTextFieldConfig, cA as SelectFieldAdmin, cB as SqlWhereResult, cC as StorageAdapter, cD as TextFieldAdmin, cE as TextFormat, cF as TextareaFieldAdmin, cG as TrustProxyConfig, cH as TypedField, cI as UploadConfig, cJ as UrlFieldAdmin, cK as UrlLinkValue, cL as ViewActionFeatures, cM as ViewComponentSlots, cN as ViewConfig, cO as ViewLayout, cP as ViewMetric, cQ as ViewSubMetric, cR as WhereClause, cS as WhereOperator, cT as WhereOperatorName, cU as WordLimitFieldAdmin, cV as WordLimitFieldConfig, cW as WorkflowMetadata, cX as WorkflowRole, cY as WorkflowState, cZ as WorkflowTransitionContext, c_ as defineAction, c$ as defineCalendarView, d0 as defineCardsView, d1 as defineGanttView, d2 as defineKanbanView, d3 as defineTableView, d4 as defineView, d5 as isAICollection, d6 as parseMongoWhere, d7 as parseSqlWhere } from './app-
|
|
1
|
+
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as BaseDocument, H as HookRequestContext, f as DetailComputedOptions, g as ComputedHandler, h as DetailComputed, i as DetailCustomOptions, j as DetailCustom, k as DetailDividerOptions, l as DetailDivider, m as DisplayFieldOptions, n as DetailField, o as DetailItem, p as DetailGridOptions, q as DetailGrid, r as DetailRepeatOptions, s as DetailRepeat, t as DetailSectionOptions, u as DetailSection, v as DetailTabOptions, w as DetailTab, x as DetailTabsOptions, y as DetailTabs, z as DetailTextOptions, E as DetailText, I as DetailSchema, J as DyrectedContext, K as AIConfig, M as AIPIIConfig, N as ArrayField, O as FieldType, Q as BooleanField, R as AuthConfig, S as AccessPolicyResolver, T as DateField, U as DateTimeField, V as EmailField, X as IconField, Y as ImageField, Z as JoinField, _ as JsonField, $ as MultiSelectField, a0 as NumberField, a1 as ObjectField, a2 as RadioField, a3 as RelationshipField, a4 as RichTextField, a5 as RowField, a6 as SelectField, a7 as TextField, a8 as TextareaField, a9 as TimeField, aa as UrlField } from './app-Cp8RudRI.cjs';
|
|
2
|
+
export { ab as AIAction, ac as AIActionStatus, ad as AIActionType, ae as AIAuditActionType, af as AIAuditRecord, ag as AIChunk, ah as AIMessage, ai as AIPIIPattern, aj as AIRateLimitResult, ak as AIRateLimitStore, al as AIThread, am as AIToolContext, an as AIToolDefinition, ao as AI_ACTIONS_COLLECTION, ap as AI_AUDIT_COLLECTION, aq as AI_CHUNKS_COLLECTION, ar as AI_MESSAGES_COLLECTION, as as AI_THREADS_COLLECTION, at as AccessConfig, au as AccessFunction, av as AccessFunctionArgs, aw as AccessResult, ax as AccessRule, ay as ActionConfig, az as ActionConfigBase, aA as ActionConfigWithHandler, aB as ActionConfigWithMutation, aC as ActionContext, aD as ActionType, aE as AdminAuthAccessResolution, aF as AdminAuthClaimMapping, aG as AdminAuthMember, aH as AdminAuthProvider, aI as AdminAuthProviderMembersConfig, aJ as AdminAuthProvisioningMode, aK as AdminAuthResolveAccessArgs, aL as AdminAuthResolvedIdentity, aM as AdminConfig, aN as AdminDashboardComponentSlots, aO as AdminIconName, aP as AggregateArgs, aQ as AggregateCastType, aR as AggregateCollectionResult, aS as AggregateInput, aT as AggregateOperation, aU as AggregateResult, aV as BaseAdminAuthProvider, aW as BaseFieldAdmin, aX as BlockVariant, aY as BlocksField, aZ as BooleanFieldAdmin, a_ as BooleanFormat, a$ as CharacterLimitFieldAdmin, b0 as CharacterLimitFieldConfig, b1 as CollectionAfterChangeHook, b2 as CollectionAfterDeleteHook, b3 as CollectionAfterReadHook, b4 as CollectionAfterReadHookEntry, b5 as CollectionAfterTransitionHook, b6 as CollectionBeforeChangeHook, b7 as CollectionBeforeChangeHookEntry, b8 as CollectionBeforeDeleteHook, b9 as CollectionBeforeReadHook, ba as CollectionBeforeReadHookEntry, bb as CollectionBeforeTransitionHook, bc as CollectionListComponentSlots, bd as CollectionRAGConfig, be as CollectionSchemaResult, bf as CollectionSummaryResult, bg as CollectionViewComponentSlots, bh as CountOperation, bi as CustomAdminAuthProvider, bj as DatabaseAdapter, bk as DateFieldAdmin, bl as DateFormat, bm as DefaultValueContext, bn as DefineActionOptions, bo as DefineCalendarViewOptions, bp as DefineCardsViewOptions, bq as DefineGanttViewOptions, br as DefineKanbanViewOptions, bs as DefineTableViewOptions, bt as DefineViewBaseOptions, bu as DefineViewOptions, bv as DetailSpan, bw as DisplayTone, bx as DisplayVariant, by as DistinctCountOperation, bz as DistinctValuesOperation, bA as DynamicOptionItem, bB as DynamicOptionsConfig, bC as DynamicOptionsResolver, bD as DynamicOptionsResolverArgs, bE as DyrectedAIContext, bF as DyrectedLoggerConfig, bG as DyrectedObservabilityConfig, bH as EmailFieldAdmin, bI as FieldAdminHooks, bJ as FieldAdminOnChangeHook, bK as FieldAdminOnChangeHookArgs, bL as FieldAdminOptionsHook, bM as FieldAdminOptionsHookArgs, bN as FieldAdminOptionsHookResult, bO as FieldAfterReadHook, bP as FieldAfterReadHookArgs, bQ as FieldBase, bR as FieldBeforeChangeHook, bS as FieldBeforeChangeHookArgs, bT as FieldHook, bU as FieldHooks, bV as FileData, bW as GetDocumentResult, bX as GlobalAfterChangeHook, bY as GlobalAfterReadHook, bZ as GlobalAfterReadHookEntry, b_ as GlobalBeforeChangeHook, b$ as GlobalBeforeChangeHookEntry, c0 as GlobalBeforeReadHook, c1 as GlobalBeforeReadHookEntry, c2 as GlobalRAGConfig, c3 as GlobalSchemaResult, c4 as GlobalSummaryResult, c5 as HeadingLevel, c6 as HookFunction, c7 as IconFieldAdmin, c8 as ImageService, c9 as ImageTransformOptions, ca as InferAggregateResult, cb as JoinFieldAdmin, cc as JsonFieldAdmin, cd as JsonFormat, ce as LIFECYCLE_EVENT_NAMES, cf as LifecycleEventHandler, cg as LinkFormat, ch as MetricColor, ci as MultiSelectFieldAdmin, cj as NamedAccessPolicy, ck as NumberFieldAdmin, cl as NumberFormat, cm as NumberLimitFieldAdmin, cn as NumberLimitFieldConfig, co as NumericOperation, cp as OIDCAdminAuthProvider, cq as OptionFormat, cr as PaginatedResult, cs as PublicAdminAuthProvider, ct as QueryCollectionResult, cu as RAGSearchResult, cv as RadioFieldAdmin, cw as RateLimitConfig, cx as ReadonlyDatabaseAdapter, cy as RichTextFeature, cz as RichTextFieldConfig, cA as SelectFieldAdmin, cB as SqlWhereResult, cC as StorageAdapter, cD as TextFieldAdmin, cE as TextFormat, cF as TextareaFieldAdmin, cG as TrustProxyConfig, cH as TypedField, cI as UploadConfig, cJ as UrlFieldAdmin, cK as UrlLinkValue, cL as ViewActionFeatures, cM as ViewComponentSlots, cN as ViewConfig, cO as ViewLayout, cP as ViewMetric, cQ as ViewSubMetric, cR as WhereClause, cS as WhereOperator, cT as WhereOperatorName, cU as WordLimitFieldAdmin, cV as WordLimitFieldConfig, cW as WorkflowMetadata, cX as WorkflowRole, cY as WorkflowState, cZ as WorkflowTransitionContext, c_ as defineAction, c$ as defineCalendarView, d0 as defineCardsView, d1 as defineGanttView, d2 as defineKanbanView, d3 as defineTableView, d4 as defineView, d5 as isAICollection, d6 as parseMongoWhere, d7 as parseSqlWhere } from './app-Cp8RudRI.cjs';
|
|
3
3
|
import jexl from 'jexl';
|
|
4
4
|
import { Context } from 'hono';
|
|
5
5
|
export { z } from 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as BaseDocument, H as HookRequestContext, f as DetailComputedOptions, g as ComputedHandler, h as DetailComputed, i as DetailCustomOptions, j as DetailCustom, k as DetailDividerOptions, l as DetailDivider, m as DisplayFieldOptions, n as DetailField, o as DetailItem, p as DetailGridOptions, q as DetailGrid, r as DetailRepeatOptions, s as DetailRepeat, t as DetailSectionOptions, u as DetailSection, v as DetailTabOptions, w as DetailTab, x as DetailTabsOptions, y as DetailTabs, z as DetailTextOptions, E as DetailText, I as DetailSchema, J as DyrectedContext, K as AIConfig, M as AIPIIConfig, N as ArrayField, O as FieldType, Q as BooleanField, R as AuthConfig, S as AccessPolicyResolver, T as DateField, U as DateTimeField, V as EmailField, X as IconField, Y as ImageField, Z as JoinField, _ as JsonField, $ as MultiSelectField, a0 as NumberField, a1 as ObjectField, a2 as RadioField, a3 as RelationshipField, a4 as RichTextField, a5 as RowField, a6 as SelectField, a7 as TextField, a8 as TextareaField, a9 as TimeField, aa as UrlField } from './app-
|
|
2
|
-
export { ab as AIAction, ac as AIActionStatus, ad as AIActionType, ae as AIAuditActionType, af as AIAuditRecord, ag as AIChunk, ah as AIMessage, ai as AIPIIPattern, aj as AIRateLimitResult, ak as AIRateLimitStore, al as AIThread, am as AIToolContext, an as AIToolDefinition, ao as AI_ACTIONS_COLLECTION, ap as AI_AUDIT_COLLECTION, aq as AI_CHUNKS_COLLECTION, ar as AI_MESSAGES_COLLECTION, as as AI_THREADS_COLLECTION, at as AccessConfig, au as AccessFunction, av as AccessFunctionArgs, aw as AccessResult, ax as AccessRule, ay as ActionConfig, az as ActionConfigBase, aA as ActionConfigWithHandler, aB as ActionConfigWithMutation, aC as ActionContext, aD as ActionType, aE as AdminAuthAccessResolution, aF as AdminAuthClaimMapping, aG as AdminAuthMember, aH as AdminAuthProvider, aI as AdminAuthProviderMembersConfig, aJ as AdminAuthProvisioningMode, aK as AdminAuthResolveAccessArgs, aL as AdminAuthResolvedIdentity, aM as AdminConfig, aN as AdminDashboardComponentSlots, aO as AdminIconName, aP as AggregateArgs, aQ as AggregateCastType, aR as AggregateCollectionResult, aS as AggregateInput, aT as AggregateOperation, aU as AggregateResult, aV as BaseAdminAuthProvider, aW as BaseFieldAdmin, aX as BlockVariant, aY as BlocksField, aZ as BooleanFieldAdmin, a_ as BooleanFormat, a$ as CharacterLimitFieldAdmin, b0 as CharacterLimitFieldConfig, b1 as CollectionAfterChangeHook, b2 as CollectionAfterDeleteHook, b3 as CollectionAfterReadHook, b4 as CollectionAfterReadHookEntry, b5 as CollectionAfterTransitionHook, b6 as CollectionBeforeChangeHook, b7 as CollectionBeforeChangeHookEntry, b8 as CollectionBeforeDeleteHook, b9 as CollectionBeforeReadHook, ba as CollectionBeforeReadHookEntry, bb as CollectionBeforeTransitionHook, bc as CollectionListComponentSlots, bd as CollectionRAGConfig, be as CollectionSchemaResult, bf as CollectionSummaryResult, bg as CollectionViewComponentSlots, bh as CountOperation, bi as CustomAdminAuthProvider, bj as DatabaseAdapter, bk as DateFieldAdmin, bl as DateFormat, bm as DefaultValueContext, bn as DefineActionOptions, bo as DefineCalendarViewOptions, bp as DefineCardsViewOptions, bq as DefineGanttViewOptions, br as DefineKanbanViewOptions, bs as DefineTableViewOptions, bt as DefineViewBaseOptions, bu as DefineViewOptions, bv as DetailSpan, bw as DisplayTone, bx as DisplayVariant, by as DistinctCountOperation, bz as DistinctValuesOperation, bA as DynamicOptionItem, bB as DynamicOptionsConfig, bC as DynamicOptionsResolver, bD as DynamicOptionsResolverArgs, bE as DyrectedAIContext, bF as DyrectedLoggerConfig, bG as DyrectedObservabilityConfig, bH as EmailFieldAdmin, bI as FieldAdminHooks, bJ as FieldAdminOnChangeHook, bK as FieldAdminOnChangeHookArgs, bL as FieldAdminOptionsHook, bM as FieldAdminOptionsHookArgs, bN as FieldAdminOptionsHookResult, bO as FieldAfterReadHook, bP as FieldAfterReadHookArgs, bQ as FieldBase, bR as FieldBeforeChangeHook, bS as FieldBeforeChangeHookArgs, bT as FieldHook, bU as FieldHooks, bV as FileData, bW as GetDocumentResult, bX as GlobalAfterChangeHook, bY as GlobalAfterReadHook, bZ as GlobalAfterReadHookEntry, b_ as GlobalBeforeChangeHook, b$ as GlobalBeforeChangeHookEntry, c0 as GlobalBeforeReadHook, c1 as GlobalBeforeReadHookEntry, c2 as GlobalRAGConfig, c3 as GlobalSchemaResult, c4 as GlobalSummaryResult, c5 as HeadingLevel, c6 as HookFunction, c7 as IconFieldAdmin, c8 as ImageService, c9 as ImageTransformOptions, ca as InferAggregateResult, cb as JoinFieldAdmin, cc as JsonFieldAdmin, cd as JsonFormat, ce as LIFECYCLE_EVENT_NAMES, cf as LifecycleEventHandler, cg as LinkFormat, ch as MetricColor, ci as MultiSelectFieldAdmin, cj as NamedAccessPolicy, ck as NumberFieldAdmin, cl as NumberFormat, cm as NumberLimitFieldAdmin, cn as NumberLimitFieldConfig, co as NumericOperation, cp as OIDCAdminAuthProvider, cq as OptionFormat, cr as PaginatedResult, cs as PublicAdminAuthProvider, ct as QueryCollectionResult, cu as RAGSearchResult, cv as RadioFieldAdmin, cw as RateLimitConfig, cx as ReadonlyDatabaseAdapter, cy as RichTextFeature, cz as RichTextFieldConfig, cA as SelectFieldAdmin, cB as SqlWhereResult, cC as StorageAdapter, cD as TextFieldAdmin, cE as TextFormat, cF as TextareaFieldAdmin, cG as TrustProxyConfig, cH as TypedField, cI as UploadConfig, cJ as UrlFieldAdmin, cK as UrlLinkValue, cL as ViewActionFeatures, cM as ViewComponentSlots, cN as ViewConfig, cO as ViewLayout, cP as ViewMetric, cQ as ViewSubMetric, cR as WhereClause, cS as WhereOperator, cT as WhereOperatorName, cU as WordLimitFieldAdmin, cV as WordLimitFieldConfig, cW as WorkflowMetadata, cX as WorkflowRole, cY as WorkflowState, cZ as WorkflowTransitionContext, c_ as defineAction, c$ as defineCalendarView, d0 as defineCardsView, d1 as defineGanttView, d2 as defineKanbanView, d3 as defineTableView, d4 as defineView, d5 as isAICollection, d6 as parseMongoWhere, d7 as parseSqlWhere } from './app-
|
|
1
|
+
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as BaseDocument, H as HookRequestContext, f as DetailComputedOptions, g as ComputedHandler, h as DetailComputed, i as DetailCustomOptions, j as DetailCustom, k as DetailDividerOptions, l as DetailDivider, m as DisplayFieldOptions, n as DetailField, o as DetailItem, p as DetailGridOptions, q as DetailGrid, r as DetailRepeatOptions, s as DetailRepeat, t as DetailSectionOptions, u as DetailSection, v as DetailTabOptions, w as DetailTab, x as DetailTabsOptions, y as DetailTabs, z as DetailTextOptions, E as DetailText, I as DetailSchema, J as DyrectedContext, K as AIConfig, M as AIPIIConfig, N as ArrayField, O as FieldType, Q as BooleanField, R as AuthConfig, S as AccessPolicyResolver, T as DateField, U as DateTimeField, V as EmailField, X as IconField, Y as ImageField, Z as JoinField, _ as JsonField, $ as MultiSelectField, a0 as NumberField, a1 as ObjectField, a2 as RadioField, a3 as RelationshipField, a4 as RichTextField, a5 as RowField, a6 as SelectField, a7 as TextField, a8 as TextareaField, a9 as TimeField, aa as UrlField } from './app-Cp8RudRI.js';
|
|
2
|
+
export { ab as AIAction, ac as AIActionStatus, ad as AIActionType, ae as AIAuditActionType, af as AIAuditRecord, ag as AIChunk, ah as AIMessage, ai as AIPIIPattern, aj as AIRateLimitResult, ak as AIRateLimitStore, al as AIThread, am as AIToolContext, an as AIToolDefinition, ao as AI_ACTIONS_COLLECTION, ap as AI_AUDIT_COLLECTION, aq as AI_CHUNKS_COLLECTION, ar as AI_MESSAGES_COLLECTION, as as AI_THREADS_COLLECTION, at as AccessConfig, au as AccessFunction, av as AccessFunctionArgs, aw as AccessResult, ax as AccessRule, ay as ActionConfig, az as ActionConfigBase, aA as ActionConfigWithHandler, aB as ActionConfigWithMutation, aC as ActionContext, aD as ActionType, aE as AdminAuthAccessResolution, aF as AdminAuthClaimMapping, aG as AdminAuthMember, aH as AdminAuthProvider, aI as AdminAuthProviderMembersConfig, aJ as AdminAuthProvisioningMode, aK as AdminAuthResolveAccessArgs, aL as AdminAuthResolvedIdentity, aM as AdminConfig, aN as AdminDashboardComponentSlots, aO as AdminIconName, aP as AggregateArgs, aQ as AggregateCastType, aR as AggregateCollectionResult, aS as AggregateInput, aT as AggregateOperation, aU as AggregateResult, aV as BaseAdminAuthProvider, aW as BaseFieldAdmin, aX as BlockVariant, aY as BlocksField, aZ as BooleanFieldAdmin, a_ as BooleanFormat, a$ as CharacterLimitFieldAdmin, b0 as CharacterLimitFieldConfig, b1 as CollectionAfterChangeHook, b2 as CollectionAfterDeleteHook, b3 as CollectionAfterReadHook, b4 as CollectionAfterReadHookEntry, b5 as CollectionAfterTransitionHook, b6 as CollectionBeforeChangeHook, b7 as CollectionBeforeChangeHookEntry, b8 as CollectionBeforeDeleteHook, b9 as CollectionBeforeReadHook, ba as CollectionBeforeReadHookEntry, bb as CollectionBeforeTransitionHook, bc as CollectionListComponentSlots, bd as CollectionRAGConfig, be as CollectionSchemaResult, bf as CollectionSummaryResult, bg as CollectionViewComponentSlots, bh as CountOperation, bi as CustomAdminAuthProvider, bj as DatabaseAdapter, bk as DateFieldAdmin, bl as DateFormat, bm as DefaultValueContext, bn as DefineActionOptions, bo as DefineCalendarViewOptions, bp as DefineCardsViewOptions, bq as DefineGanttViewOptions, br as DefineKanbanViewOptions, bs as DefineTableViewOptions, bt as DefineViewBaseOptions, bu as DefineViewOptions, bv as DetailSpan, bw as DisplayTone, bx as DisplayVariant, by as DistinctCountOperation, bz as DistinctValuesOperation, bA as DynamicOptionItem, bB as DynamicOptionsConfig, bC as DynamicOptionsResolver, bD as DynamicOptionsResolverArgs, bE as DyrectedAIContext, bF as DyrectedLoggerConfig, bG as DyrectedObservabilityConfig, bH as EmailFieldAdmin, bI as FieldAdminHooks, bJ as FieldAdminOnChangeHook, bK as FieldAdminOnChangeHookArgs, bL as FieldAdminOptionsHook, bM as FieldAdminOptionsHookArgs, bN as FieldAdminOptionsHookResult, bO as FieldAfterReadHook, bP as FieldAfterReadHookArgs, bQ as FieldBase, bR as FieldBeforeChangeHook, bS as FieldBeforeChangeHookArgs, bT as FieldHook, bU as FieldHooks, bV as FileData, bW as GetDocumentResult, bX as GlobalAfterChangeHook, bY as GlobalAfterReadHook, bZ as GlobalAfterReadHookEntry, b_ as GlobalBeforeChangeHook, b$ as GlobalBeforeChangeHookEntry, c0 as GlobalBeforeReadHook, c1 as GlobalBeforeReadHookEntry, c2 as GlobalRAGConfig, c3 as GlobalSchemaResult, c4 as GlobalSummaryResult, c5 as HeadingLevel, c6 as HookFunction, c7 as IconFieldAdmin, c8 as ImageService, c9 as ImageTransformOptions, ca as InferAggregateResult, cb as JoinFieldAdmin, cc as JsonFieldAdmin, cd as JsonFormat, ce as LIFECYCLE_EVENT_NAMES, cf as LifecycleEventHandler, cg as LinkFormat, ch as MetricColor, ci as MultiSelectFieldAdmin, cj as NamedAccessPolicy, ck as NumberFieldAdmin, cl as NumberFormat, cm as NumberLimitFieldAdmin, cn as NumberLimitFieldConfig, co as NumericOperation, cp as OIDCAdminAuthProvider, cq as OptionFormat, cr as PaginatedResult, cs as PublicAdminAuthProvider, ct as QueryCollectionResult, cu as RAGSearchResult, cv as RadioFieldAdmin, cw as RateLimitConfig, cx as ReadonlyDatabaseAdapter, cy as RichTextFeature, cz as RichTextFieldConfig, cA as SelectFieldAdmin, cB as SqlWhereResult, cC as StorageAdapter, cD as TextFieldAdmin, cE as TextFormat, cF as TextareaFieldAdmin, cG as TrustProxyConfig, cH as TypedField, cI as UploadConfig, cJ as UrlFieldAdmin, cK as UrlLinkValue, cL as ViewActionFeatures, cM as ViewComponentSlots, cN as ViewConfig, cO as ViewLayout, cP as ViewMetric, cQ as ViewSubMetric, cR as WhereClause, cS as WhereOperator, cT as WhereOperatorName, cU as WordLimitFieldAdmin, cV as WordLimitFieldConfig, cW as WorkflowMetadata, cX as WorkflowRole, cY as WorkflowState, cZ as WorkflowTransitionContext, c_ as defineAction, c$ as defineCalendarView, d0 as defineCardsView, d1 as defineGanttView, d2 as defineKanbanView, d3 as defineTableView, d4 as defineView, d5 as isAICollection, d6 as parseMongoWhere, d7 as parseSqlWhere } from './app-Cp8RudRI.js';
|
|
3
3
|
import jexl from 'jexl';
|
|
4
4
|
import { Context } from 'hono';
|
|
5
5
|
export { z } from 'zod';
|
package/dist/server.cjs
CHANGED
|
@@ -3948,8 +3948,12 @@ var server_exports = {};
|
|
|
3948
3948
|
__export(server_exports, {
|
|
3949
3949
|
AIAgent: () => AIAgent,
|
|
3950
3950
|
AIController: () => AIController,
|
|
3951
|
+
AUTH_SESSIONS_COLLECTION: () => AUTH_SESSIONS_COLLECTION,
|
|
3951
3952
|
AuthController: () => AuthController,
|
|
3952
3953
|
CollectionController: () => CollectionController,
|
|
3954
|
+
DEFAULT_LOCK_TIME_MS: () => DEFAULT_LOCK_TIME_MS,
|
|
3955
|
+
DEFAULT_MAX_LOGIN_ATTEMPTS: () => DEFAULT_MAX_LOGIN_ATTEMPTS,
|
|
3956
|
+
DEFAULT_SESSION_EXPIRY: () => DEFAULT_SESSION_EXPIRY,
|
|
3953
3957
|
EmbeddingService: () => EmbeddingService,
|
|
3954
3958
|
GlobalController: () => GlobalController,
|
|
3955
3959
|
InMemoryRateLimitStore: () => InMemoryRateLimitStore,
|
|
@@ -3960,7 +3964,11 @@ __export(server_exports, {
|
|
|
3960
3964
|
attachRequestMetrics: () => attachRequestMetrics,
|
|
3961
3965
|
bindObservabilityRuntime: () => bindObservabilityRuntime,
|
|
3962
3966
|
buildDyrectedSystemPrompt: () => buildDyrectedSystemPrompt,
|
|
3967
|
+
buildInviteEmail: () => buildInviteEmail,
|
|
3968
|
+
buildPasswordChangedEmail: () => buildPasswordChangedEmail,
|
|
3963
3969
|
buildRequestLogger: () => buildRequestLogger,
|
|
3970
|
+
buildResetPasswordEmail: () => buildResetPasswordEmail,
|
|
3971
|
+
buildWelcomeEmail: () => buildWelcomeEmail,
|
|
3964
3972
|
captureRequestBody: () => captureRequestBody,
|
|
3965
3973
|
chunkText: () => chunkText,
|
|
3966
3974
|
cosineSimilarity: () => cosineSimilarity,
|
|
@@ -3968,26 +3976,41 @@ __export(server_exports, {
|
|
|
3968
3976
|
createDyrectedApp: () => createDyrectedApp,
|
|
3969
3977
|
createObservabilityRuntime: () => createObservabilityRuntime,
|
|
3970
3978
|
createRequestSpan: () => createRequestSpan,
|
|
3979
|
+
decodeCollectionToken: () => decodeCollectionToken,
|
|
3971
3980
|
endRequestSpan: () => endRequestSpan,
|
|
3972
3981
|
estimateTokens: () => estimateTokens,
|
|
3973
3982
|
extractTextFromDoc: () => extractTextFromDoc,
|
|
3974
3983
|
formatAIErrorMessage: () => formatAIErrorMessage,
|
|
3975
3984
|
getAIModel: () => getAIModel,
|
|
3985
|
+
getAuthSession: () => getAuthSession,
|
|
3976
3986
|
getConfigLogger: () => getConfigLogger,
|
|
3977
3987
|
getEmbeddingModel: () => getEmbeddingModel,
|
|
3988
|
+
getLockedUntilMs: () => getLockedUntilMs,
|
|
3978
3989
|
getObservabilityRuntime: () => getObservabilityRuntime,
|
|
3979
3990
|
getRequestLogger: () => getRequestLogger,
|
|
3980
3991
|
hashContent: () => hashContent,
|
|
3992
|
+
hashPassword: () => hashPassword,
|
|
3993
|
+
isAuthSessionActive: () => isAuthSessionActive,
|
|
3994
|
+
issueAuthSessionToken: () => issueAuthSessionToken,
|
|
3981
3995
|
normalizeFieldValue: () => normalizeFieldValue,
|
|
3982
3996
|
redactBody: () => redactBody,
|
|
3983
3997
|
redactHeaders: () => redactHeaders,
|
|
3984
3998
|
registerRoutes: () => registerRoutes,
|
|
3985
3999
|
renderPrometheusMetrics: () => renderPrometheusMetrics,
|
|
4000
|
+
resolveAuthLockoutConfig: () => resolveAuthLockoutConfig,
|
|
3986
4001
|
resolveObservabilityConfig: () => resolveObservabilityConfig,
|
|
4002
|
+
resolveSessionTokenExpiry: () => resolveSessionTokenExpiry,
|
|
4003
|
+
revokeAllAuthSessions: () => revokeAllAuthSessions,
|
|
4004
|
+
revokeAuthSession: () => revokeAuthSession,
|
|
4005
|
+
sendEmail: () => sendEmail,
|
|
3987
4006
|
serializeDetailForApi: () => serializeDetailForApi,
|
|
3988
4007
|
serializeViewForApi: () => serializeViewForApi,
|
|
3989
4008
|
shouldSampleRequest: () => shouldSampleRequest,
|
|
3990
|
-
|
|
4009
|
+
signCollectionToken: () => signCollectionToken,
|
|
4010
|
+
touchAuthSession: () => touchAuthSession,
|
|
4011
|
+
validatePayloadAgainstFields: () => validatePayloadAgainstFields,
|
|
4012
|
+
verifyCollectionToken: () => verifyCollectionToken,
|
|
4013
|
+
verifyPassword: () => verifyPassword
|
|
3991
4014
|
});
|
|
3992
4015
|
module.exports = __toCommonJS(server_exports);
|
|
3993
4016
|
|
|
@@ -4829,6 +4852,14 @@ function getSecret() {
|
|
|
4829
4852
|
return new TextEncoder().encode(secret);
|
|
4830
4853
|
}
|
|
4831
4854
|
var DEFAULT_EXPIRY = "7d";
|
|
4855
|
+
var DEFAULT_SESSION_EXPIRY = DEFAULT_EXPIRY;
|
|
4856
|
+
function resolveSessionTokenExpiry(collection) {
|
|
4857
|
+
const auth = collection.auth;
|
|
4858
|
+
if (auth && typeof auth === "object" && typeof auth.tokenExpiration === "string" && auth.tokenExpiration.length > 0) {
|
|
4859
|
+
return auth.tokenExpiration;
|
|
4860
|
+
}
|
|
4861
|
+
return DEFAULT_SESSION_EXPIRY;
|
|
4862
|
+
}
|
|
4832
4863
|
async function signCollectionToken(payload, expiresIn = DEFAULT_EXPIRY) {
|
|
4833
4864
|
return new import_jose.SignJWT({ ...payload }).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime(expiresIn).sign(getSecret());
|
|
4834
4865
|
}
|
|
@@ -9680,6 +9711,7 @@ var AuthController = class {
|
|
|
9680
9711
|
userId: user.id,
|
|
9681
9712
|
email: user.email,
|
|
9682
9713
|
collection: this.collection.slug,
|
|
9714
|
+
expiresIn: resolveSessionTokenExpiry(this.collection),
|
|
9683
9715
|
ip: c.get("clientIp"),
|
|
9684
9716
|
authSource: "local"
|
|
9685
9717
|
});
|
|
@@ -9771,6 +9803,7 @@ var AuthController = class {
|
|
|
9771
9803
|
userId: user.id,
|
|
9772
9804
|
email: user.email,
|
|
9773
9805
|
collection: this.collection.slug,
|
|
9806
|
+
expiresIn: resolveSessionTokenExpiry(this.collection),
|
|
9774
9807
|
ip: c.get("clientIp"),
|
|
9775
9808
|
authSource: "local"
|
|
9776
9809
|
});
|
|
@@ -9861,12 +9894,15 @@ var AuthController = class {
|
|
|
9861
9894
|
}
|
|
9862
9895
|
const tokenPayload = c.get("authTokenPayload");
|
|
9863
9896
|
if (tokenPayload?.sid) {
|
|
9864
|
-
const token2 = await signCollectionToken(
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9897
|
+
const token2 = await signCollectionToken(
|
|
9898
|
+
{
|
|
9899
|
+
sub: requestUser.sub,
|
|
9900
|
+
email: requestUser.email,
|
|
9901
|
+
collection: this.collection.slug,
|
|
9902
|
+
sid: tokenPayload.sid
|
|
9903
|
+
},
|
|
9904
|
+
resolveSessionTokenExpiry(this.collection)
|
|
9905
|
+
);
|
|
9870
9906
|
return c.json({ token: token2 });
|
|
9871
9907
|
}
|
|
9872
9908
|
const token = await issueAuthSessionToken({
|
|
@@ -10128,6 +10164,7 @@ var AuthController = class {
|
|
|
10128
10164
|
userId: user.id,
|
|
10129
10165
|
email: inviteeEmail,
|
|
10130
10166
|
collection: this.collection.slug,
|
|
10167
|
+
expiresIn: resolveSessionTokenExpiry(this.collection),
|
|
10131
10168
|
ip: c.get("clientIp"),
|
|
10132
10169
|
authSource: "local"
|
|
10133
10170
|
});
|
|
@@ -10380,6 +10417,7 @@ var AdminAuthController = class {
|
|
|
10380
10417
|
userId: user.id,
|
|
10381
10418
|
email: user.email,
|
|
10382
10419
|
collection: adminCollection.slug,
|
|
10420
|
+
expiresIn: resolveSessionTokenExpiry(adminCollection),
|
|
10383
10421
|
providerId: provider.id,
|
|
10384
10422
|
authSource: "external",
|
|
10385
10423
|
ip: c.get("clientIp")
|
|
@@ -15120,8 +15158,12 @@ init_embedding_service();
|
|
|
15120
15158
|
0 && (module.exports = {
|
|
15121
15159
|
AIAgent,
|
|
15122
15160
|
AIController,
|
|
15161
|
+
AUTH_SESSIONS_COLLECTION,
|
|
15123
15162
|
AuthController,
|
|
15124
15163
|
CollectionController,
|
|
15164
|
+
DEFAULT_LOCK_TIME_MS,
|
|
15165
|
+
DEFAULT_MAX_LOGIN_ATTEMPTS,
|
|
15166
|
+
DEFAULT_SESSION_EXPIRY,
|
|
15125
15167
|
EmbeddingService,
|
|
15126
15168
|
GlobalController,
|
|
15127
15169
|
InMemoryRateLimitStore,
|
|
@@ -15132,7 +15174,11 @@ init_embedding_service();
|
|
|
15132
15174
|
attachRequestMetrics,
|
|
15133
15175
|
bindObservabilityRuntime,
|
|
15134
15176
|
buildDyrectedSystemPrompt,
|
|
15177
|
+
buildInviteEmail,
|
|
15178
|
+
buildPasswordChangedEmail,
|
|
15135
15179
|
buildRequestLogger,
|
|
15180
|
+
buildResetPasswordEmail,
|
|
15181
|
+
buildWelcomeEmail,
|
|
15136
15182
|
captureRequestBody,
|
|
15137
15183
|
chunkText,
|
|
15138
15184
|
cosineSimilarity,
|
|
@@ -15140,24 +15186,39 @@ init_embedding_service();
|
|
|
15140
15186
|
createDyrectedApp,
|
|
15141
15187
|
createObservabilityRuntime,
|
|
15142
15188
|
createRequestSpan,
|
|
15189
|
+
decodeCollectionToken,
|
|
15143
15190
|
endRequestSpan,
|
|
15144
15191
|
estimateTokens,
|
|
15145
15192
|
extractTextFromDoc,
|
|
15146
15193
|
formatAIErrorMessage,
|
|
15147
15194
|
getAIModel,
|
|
15195
|
+
getAuthSession,
|
|
15148
15196
|
getConfigLogger,
|
|
15149
15197
|
getEmbeddingModel,
|
|
15198
|
+
getLockedUntilMs,
|
|
15150
15199
|
getObservabilityRuntime,
|
|
15151
15200
|
getRequestLogger,
|
|
15152
15201
|
hashContent,
|
|
15202
|
+
hashPassword,
|
|
15203
|
+
isAuthSessionActive,
|
|
15204
|
+
issueAuthSessionToken,
|
|
15153
15205
|
normalizeFieldValue,
|
|
15154
15206
|
redactBody,
|
|
15155
15207
|
redactHeaders,
|
|
15156
15208
|
registerRoutes,
|
|
15157
15209
|
renderPrometheusMetrics,
|
|
15210
|
+
resolveAuthLockoutConfig,
|
|
15158
15211
|
resolveObservabilityConfig,
|
|
15212
|
+
resolveSessionTokenExpiry,
|
|
15213
|
+
revokeAllAuthSessions,
|
|
15214
|
+
revokeAuthSession,
|
|
15215
|
+
sendEmail,
|
|
15159
15216
|
serializeDetailForApi,
|
|
15160
15217
|
serializeViewForApi,
|
|
15161
15218
|
shouldSampleRequest,
|
|
15162
|
-
|
|
15219
|
+
signCollectionToken,
|
|
15220
|
+
touchAuthSession,
|
|
15221
|
+
validatePayloadAgainstFields,
|
|
15222
|
+
verifyCollectionToken,
|
|
15223
|
+
verifyPassword
|
|
15163
15224
|
});
|
package/dist/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, bj as DatabaseAdapter, b as AuthenticatedUser, bE as DyrectedAIContext, al as AIThread, ah as AIMessage, cu as RAGSearchResult, ak as AIRateLimitStore, aj as AIRateLimitResult } from './app-
|
|
2
|
-
export { d8 as
|
|
1
|
+
import { J as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, bj as DatabaseAdapter, b as AuthenticatedUser, bE as DyrectedAIContext, al as AIThread, ah as AIMessage, cu as RAGSearchResult, ak as AIRateLimitStore, aj as AIRateLimitResult } from './app-Cp8RudRI.cjs';
|
|
2
|
+
export { d8 as CollectionTokenPayload, d9 as DEFAULT_SESSION_EXPIRY, da as DyrectedObservabilityRuntime, db as RequestBodyCapture, dc as RequestTraceContext, dd as ResolvedObservabilityConfig, de as attachRequestMetrics, df as bindObservabilityRuntime, dg as buildRequestLogger, dh as captureRequestBody, di as createDyrectedApp, dj as createObservabilityRuntime, dk as createRequestSpan, dl as decodeCollectionToken, dm as endRequestSpan, dn as getConfigLogger, dp as getObservabilityRuntime, dq as getRequestLogger, dr as redactBody, ds as redactHeaders, dt as renderPrometheusMetrics, du as resolveObservabilityConfig, dv as resolveSessionTokenExpiry, dw as shouldSampleRequest, dx as signCollectionToken, dy as verifyCollectionToken } from './app-Cp8RudRI.cjs';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Hono, Context, Next } from 'hono';
|
|
5
5
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
@@ -434,6 +434,96 @@ declare class AIController {
|
|
|
434
434
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
+
declare const AUTH_SESSIONS_COLLECTION = "__auth_sessions";
|
|
438
|
+
interface AuthSessionRecord {
|
|
439
|
+
id: string;
|
|
440
|
+
userId: string;
|
|
441
|
+
email: string;
|
|
442
|
+
collection: string;
|
|
443
|
+
authSource?: 'local' | 'external';
|
|
444
|
+
providerId?: string;
|
|
445
|
+
lastIp?: string;
|
|
446
|
+
createdAt?: string;
|
|
447
|
+
updatedAt?: string;
|
|
448
|
+
lastSeenAt?: string;
|
|
449
|
+
expiresAt?: string | null;
|
|
450
|
+
revokedAt?: string | null;
|
|
451
|
+
}
|
|
452
|
+
interface IssueAuthSessionArgs {
|
|
453
|
+
config: DyrectedConfig;
|
|
454
|
+
userId: string;
|
|
455
|
+
email: string;
|
|
456
|
+
collection: string;
|
|
457
|
+
expiresIn?: string;
|
|
458
|
+
authSource?: 'local' | 'external';
|
|
459
|
+
providerId?: string;
|
|
460
|
+
ip?: string;
|
|
461
|
+
}
|
|
462
|
+
declare function issueAuthSessionToken(args: IssueAuthSessionArgs): Promise<string>;
|
|
463
|
+
declare function getAuthSession(config: DyrectedConfig, sessionId: string): Promise<AuthSessionRecord | null>;
|
|
464
|
+
declare function isAuthSessionActive(session: AuthSessionRecord | null | undefined): session is AuthSessionRecord;
|
|
465
|
+
declare function touchAuthSession(config: DyrectedConfig, sessionId: string, args: {
|
|
466
|
+
ip?: string;
|
|
467
|
+
}): Promise<void>;
|
|
468
|
+
declare function revokeAuthSession(config: DyrectedConfig, sessionId: string): Promise<void>;
|
|
469
|
+
declare function revokeAllAuthSessions(config: DyrectedConfig, args: {
|
|
470
|
+
userId: string;
|
|
471
|
+
collection: string;
|
|
472
|
+
}): Promise<number>;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Hash a plain-text password using scrypt.
|
|
476
|
+
* Returns a `salt:hash` string safe to store in the database.
|
|
477
|
+
*/
|
|
478
|
+
declare function hashPassword(plain: string): Promise<string>;
|
|
479
|
+
/**
|
|
480
|
+
* Verify a plain-text password against a stored `salt:hash` string.
|
|
481
|
+
*/
|
|
482
|
+
declare function verifyPassword(plain: string, stored: string): Promise<boolean>;
|
|
483
|
+
|
|
484
|
+
declare const DEFAULT_MAX_LOGIN_ATTEMPTS = 5;
|
|
485
|
+
declare const DEFAULT_LOCK_TIME_MS: number;
|
|
486
|
+
type ResolvedAuthLockoutConfig = {
|
|
487
|
+
enabled: boolean;
|
|
488
|
+
maxLoginAttempts: number;
|
|
489
|
+
lockTime: number;
|
|
490
|
+
};
|
|
491
|
+
declare function resolveAuthLockoutConfig(collection: CollectionConfig): ResolvedAuthLockoutConfig;
|
|
492
|
+
declare function getLockedUntilMs(value: unknown): number | null;
|
|
493
|
+
|
|
494
|
+
declare function sendEmail(config: DyrectedConfig, payload: {
|
|
495
|
+
to: string;
|
|
496
|
+
subject: string;
|
|
497
|
+
html: string;
|
|
498
|
+
}): Promise<void>;
|
|
499
|
+
declare function buildWelcomeEmail(config: DyrectedConfig, args: {
|
|
500
|
+
email: string;
|
|
501
|
+
}): {
|
|
502
|
+
subject: string;
|
|
503
|
+
html: string;
|
|
504
|
+
};
|
|
505
|
+
declare function buildInviteEmail(config: DyrectedConfig, args: {
|
|
506
|
+
token: string;
|
|
507
|
+
invitedByEmail?: string;
|
|
508
|
+
url?: string;
|
|
509
|
+
}): {
|
|
510
|
+
subject: string;
|
|
511
|
+
html: string;
|
|
512
|
+
};
|
|
513
|
+
declare function buildResetPasswordEmail(config: DyrectedConfig, args: {
|
|
514
|
+
token: string;
|
|
515
|
+
url?: string;
|
|
516
|
+
}): {
|
|
517
|
+
subject: string;
|
|
518
|
+
html: string;
|
|
519
|
+
};
|
|
520
|
+
declare function buildPasswordChangedEmail(config: DyrectedConfig, args: {
|
|
521
|
+
email: string;
|
|
522
|
+
}): {
|
|
523
|
+
subject: string;
|
|
524
|
+
html: string;
|
|
525
|
+
};
|
|
526
|
+
|
|
437
527
|
declare function getAIModel(config?: DyrectedConfig): LanguageModel;
|
|
438
528
|
declare function formatAIErrorMessage(error: any): string;
|
|
439
529
|
declare function buildDyrectedSystemPrompt(context: DyrectedAIContext): string;
|
|
@@ -648,4 +738,4 @@ declare class InMemoryRateLimitStore implements AIRateLimitStore {
|
|
|
648
738
|
}
|
|
649
739
|
declare function aiRateLimit(config?: DyrectedConfig): (c: Context<DyrectedContext>, next: Next) => Promise<void>;
|
|
650
740
|
|
|
651
|
-
export { AIAgent, type AIAgentOptions, AIController, AuthController, type ChunkOptions, type ChunkResult, CollectionController, type DeleteDocumentChunksOptions, DyrectedContext, EmbeddingService, GlobalController, InMemoryRateLimitStore, type IndexDocumentOptions, MediaController, PreviewController, type RAGSearchOptions, RAGService, type ReindexAllOptions, type ReindexCollectionOptions, aiRateLimit, buildDyrectedSystemPrompt, chunkText, cosineSimilarity, createDyrectedAITools, estimateTokens, extractTextFromDoc, formatAIErrorMessage, getAIModel, getEmbeddingModel, hashContent, normalizeFieldValue, registerRoutes, serializeDetailForApi, serializeViewForApi, validatePayloadAgainstFields };
|
|
741
|
+
export { AIAgent, type AIAgentOptions, AIController, AUTH_SESSIONS_COLLECTION, AuthController, type AuthSessionRecord, type ChunkOptions, type ChunkResult, CollectionController, DEFAULT_LOCK_TIME_MS, DEFAULT_MAX_LOGIN_ATTEMPTS, type DeleteDocumentChunksOptions, DyrectedContext, EmbeddingService, GlobalController, InMemoryRateLimitStore, type IndexDocumentOptions, MediaController, PreviewController, type RAGSearchOptions, RAGService, type ReindexAllOptions, type ReindexCollectionOptions, type ResolvedAuthLockoutConfig, aiRateLimit, buildDyrectedSystemPrompt, buildInviteEmail, buildPasswordChangedEmail, buildResetPasswordEmail, buildWelcomeEmail, chunkText, cosineSimilarity, createDyrectedAITools, estimateTokens, extractTextFromDoc, formatAIErrorMessage, getAIModel, getAuthSession, getEmbeddingModel, getLockedUntilMs, hashContent, hashPassword, isAuthSessionActive, issueAuthSessionToken, normalizeFieldValue, registerRoutes, resolveAuthLockoutConfig, revokeAllAuthSessions, revokeAuthSession, sendEmail, serializeDetailForApi, serializeViewForApi, touchAuthSession, validatePayloadAgainstFields, verifyPassword };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, bj as DatabaseAdapter, b as AuthenticatedUser, bE as DyrectedAIContext, al as AIThread, ah as AIMessage, cu as RAGSearchResult, ak as AIRateLimitStore, aj as AIRateLimitResult } from './app-
|
|
2
|
-
export { d8 as
|
|
1
|
+
import { J as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, bj as DatabaseAdapter, b as AuthenticatedUser, bE as DyrectedAIContext, al as AIThread, ah as AIMessage, cu as RAGSearchResult, ak as AIRateLimitStore, aj as AIRateLimitResult } from './app-Cp8RudRI.js';
|
|
2
|
+
export { d8 as CollectionTokenPayload, d9 as DEFAULT_SESSION_EXPIRY, da as DyrectedObservabilityRuntime, db as RequestBodyCapture, dc as RequestTraceContext, dd as ResolvedObservabilityConfig, de as attachRequestMetrics, df as bindObservabilityRuntime, dg as buildRequestLogger, dh as captureRequestBody, di as createDyrectedApp, dj as createObservabilityRuntime, dk as createRequestSpan, dl as decodeCollectionToken, dm as endRequestSpan, dn as getConfigLogger, dp as getObservabilityRuntime, dq as getRequestLogger, dr as redactBody, ds as redactHeaders, dt as renderPrometheusMetrics, du as resolveObservabilityConfig, dv as resolveSessionTokenExpiry, dw as shouldSampleRequest, dx as signCollectionToken, dy as verifyCollectionToken } from './app-Cp8RudRI.js';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Hono, Context, Next } from 'hono';
|
|
5
5
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
@@ -434,6 +434,96 @@ declare class AIController {
|
|
|
434
434
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
+
declare const AUTH_SESSIONS_COLLECTION = "__auth_sessions";
|
|
438
|
+
interface AuthSessionRecord {
|
|
439
|
+
id: string;
|
|
440
|
+
userId: string;
|
|
441
|
+
email: string;
|
|
442
|
+
collection: string;
|
|
443
|
+
authSource?: 'local' | 'external';
|
|
444
|
+
providerId?: string;
|
|
445
|
+
lastIp?: string;
|
|
446
|
+
createdAt?: string;
|
|
447
|
+
updatedAt?: string;
|
|
448
|
+
lastSeenAt?: string;
|
|
449
|
+
expiresAt?: string | null;
|
|
450
|
+
revokedAt?: string | null;
|
|
451
|
+
}
|
|
452
|
+
interface IssueAuthSessionArgs {
|
|
453
|
+
config: DyrectedConfig;
|
|
454
|
+
userId: string;
|
|
455
|
+
email: string;
|
|
456
|
+
collection: string;
|
|
457
|
+
expiresIn?: string;
|
|
458
|
+
authSource?: 'local' | 'external';
|
|
459
|
+
providerId?: string;
|
|
460
|
+
ip?: string;
|
|
461
|
+
}
|
|
462
|
+
declare function issueAuthSessionToken(args: IssueAuthSessionArgs): Promise<string>;
|
|
463
|
+
declare function getAuthSession(config: DyrectedConfig, sessionId: string): Promise<AuthSessionRecord | null>;
|
|
464
|
+
declare function isAuthSessionActive(session: AuthSessionRecord | null | undefined): session is AuthSessionRecord;
|
|
465
|
+
declare function touchAuthSession(config: DyrectedConfig, sessionId: string, args: {
|
|
466
|
+
ip?: string;
|
|
467
|
+
}): Promise<void>;
|
|
468
|
+
declare function revokeAuthSession(config: DyrectedConfig, sessionId: string): Promise<void>;
|
|
469
|
+
declare function revokeAllAuthSessions(config: DyrectedConfig, args: {
|
|
470
|
+
userId: string;
|
|
471
|
+
collection: string;
|
|
472
|
+
}): Promise<number>;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Hash a plain-text password using scrypt.
|
|
476
|
+
* Returns a `salt:hash` string safe to store in the database.
|
|
477
|
+
*/
|
|
478
|
+
declare function hashPassword(plain: string): Promise<string>;
|
|
479
|
+
/**
|
|
480
|
+
* Verify a plain-text password against a stored `salt:hash` string.
|
|
481
|
+
*/
|
|
482
|
+
declare function verifyPassword(plain: string, stored: string): Promise<boolean>;
|
|
483
|
+
|
|
484
|
+
declare const DEFAULT_MAX_LOGIN_ATTEMPTS = 5;
|
|
485
|
+
declare const DEFAULT_LOCK_TIME_MS: number;
|
|
486
|
+
type ResolvedAuthLockoutConfig = {
|
|
487
|
+
enabled: boolean;
|
|
488
|
+
maxLoginAttempts: number;
|
|
489
|
+
lockTime: number;
|
|
490
|
+
};
|
|
491
|
+
declare function resolveAuthLockoutConfig(collection: CollectionConfig): ResolvedAuthLockoutConfig;
|
|
492
|
+
declare function getLockedUntilMs(value: unknown): number | null;
|
|
493
|
+
|
|
494
|
+
declare function sendEmail(config: DyrectedConfig, payload: {
|
|
495
|
+
to: string;
|
|
496
|
+
subject: string;
|
|
497
|
+
html: string;
|
|
498
|
+
}): Promise<void>;
|
|
499
|
+
declare function buildWelcomeEmail(config: DyrectedConfig, args: {
|
|
500
|
+
email: string;
|
|
501
|
+
}): {
|
|
502
|
+
subject: string;
|
|
503
|
+
html: string;
|
|
504
|
+
};
|
|
505
|
+
declare function buildInviteEmail(config: DyrectedConfig, args: {
|
|
506
|
+
token: string;
|
|
507
|
+
invitedByEmail?: string;
|
|
508
|
+
url?: string;
|
|
509
|
+
}): {
|
|
510
|
+
subject: string;
|
|
511
|
+
html: string;
|
|
512
|
+
};
|
|
513
|
+
declare function buildResetPasswordEmail(config: DyrectedConfig, args: {
|
|
514
|
+
token: string;
|
|
515
|
+
url?: string;
|
|
516
|
+
}): {
|
|
517
|
+
subject: string;
|
|
518
|
+
html: string;
|
|
519
|
+
};
|
|
520
|
+
declare function buildPasswordChangedEmail(config: DyrectedConfig, args: {
|
|
521
|
+
email: string;
|
|
522
|
+
}): {
|
|
523
|
+
subject: string;
|
|
524
|
+
html: string;
|
|
525
|
+
};
|
|
526
|
+
|
|
437
527
|
declare function getAIModel(config?: DyrectedConfig): LanguageModel;
|
|
438
528
|
declare function formatAIErrorMessage(error: any): string;
|
|
439
529
|
declare function buildDyrectedSystemPrompt(context: DyrectedAIContext): string;
|
|
@@ -648,4 +738,4 @@ declare class InMemoryRateLimitStore implements AIRateLimitStore {
|
|
|
648
738
|
}
|
|
649
739
|
declare function aiRateLimit(config?: DyrectedConfig): (c: Context<DyrectedContext>, next: Next) => Promise<void>;
|
|
650
740
|
|
|
651
|
-
export { AIAgent, type AIAgentOptions, AIController, AuthController, type ChunkOptions, type ChunkResult, CollectionController, type DeleteDocumentChunksOptions, DyrectedContext, EmbeddingService, GlobalController, InMemoryRateLimitStore, type IndexDocumentOptions, MediaController, PreviewController, type RAGSearchOptions, RAGService, type ReindexAllOptions, type ReindexCollectionOptions, aiRateLimit, buildDyrectedSystemPrompt, chunkText, cosineSimilarity, createDyrectedAITools, estimateTokens, extractTextFromDoc, formatAIErrorMessage, getAIModel, getEmbeddingModel, hashContent, normalizeFieldValue, registerRoutes, serializeDetailForApi, serializeViewForApi, validatePayloadAgainstFields };
|
|
741
|
+
export { AIAgent, type AIAgentOptions, AIController, AUTH_SESSIONS_COLLECTION, AuthController, type AuthSessionRecord, type ChunkOptions, type ChunkResult, CollectionController, DEFAULT_LOCK_TIME_MS, DEFAULT_MAX_LOGIN_ATTEMPTS, type DeleteDocumentChunksOptions, DyrectedContext, EmbeddingService, GlobalController, InMemoryRateLimitStore, type IndexDocumentOptions, MediaController, PreviewController, type RAGSearchOptions, RAGService, type ReindexAllOptions, type ReindexCollectionOptions, type ResolvedAuthLockoutConfig, aiRateLimit, buildDyrectedSystemPrompt, buildInviteEmail, buildPasswordChangedEmail, buildResetPasswordEmail, buildWelcomeEmail, chunkText, cosineSimilarity, createDyrectedAITools, estimateTokens, extractTextFromDoc, formatAIErrorMessage, getAIModel, getAuthSession, getEmbeddingModel, getLockedUntilMs, hashContent, hashPassword, isAuthSessionActive, issueAuthSessionToken, normalizeFieldValue, registerRoutes, resolveAuthLockoutConfig, revokeAllAuthSessions, revokeAuthSession, sendEmail, serializeDetailForApi, serializeViewForApi, touchAuthSession, validatePayloadAgainstFields, verifyPassword };
|
package/dist/server.js
CHANGED
|
@@ -4793,6 +4793,14 @@ function getSecret() {
|
|
|
4793
4793
|
return new TextEncoder().encode(secret);
|
|
4794
4794
|
}
|
|
4795
4795
|
var DEFAULT_EXPIRY = "7d";
|
|
4796
|
+
var DEFAULT_SESSION_EXPIRY = DEFAULT_EXPIRY;
|
|
4797
|
+
function resolveSessionTokenExpiry(collection) {
|
|
4798
|
+
const auth = collection.auth;
|
|
4799
|
+
if (auth && typeof auth === "object" && typeof auth.tokenExpiration === "string" && auth.tokenExpiration.length > 0) {
|
|
4800
|
+
return auth.tokenExpiration;
|
|
4801
|
+
}
|
|
4802
|
+
return DEFAULT_SESSION_EXPIRY;
|
|
4803
|
+
}
|
|
4796
4804
|
async function signCollectionToken(payload, expiresIn = DEFAULT_EXPIRY) {
|
|
4797
4805
|
return new SignJWT({ ...payload }).setProtectedHeader({ alg: "HS256" }).setIssuedAt().setExpirationTime(expiresIn).sign(getSecret());
|
|
4798
4806
|
}
|
|
@@ -9644,6 +9652,7 @@ var AuthController = class {
|
|
|
9644
9652
|
userId: user.id,
|
|
9645
9653
|
email: user.email,
|
|
9646
9654
|
collection: this.collection.slug,
|
|
9655
|
+
expiresIn: resolveSessionTokenExpiry(this.collection),
|
|
9647
9656
|
ip: c.get("clientIp"),
|
|
9648
9657
|
authSource: "local"
|
|
9649
9658
|
});
|
|
@@ -9735,6 +9744,7 @@ var AuthController = class {
|
|
|
9735
9744
|
userId: user.id,
|
|
9736
9745
|
email: user.email,
|
|
9737
9746
|
collection: this.collection.slug,
|
|
9747
|
+
expiresIn: resolveSessionTokenExpiry(this.collection),
|
|
9738
9748
|
ip: c.get("clientIp"),
|
|
9739
9749
|
authSource: "local"
|
|
9740
9750
|
});
|
|
@@ -9825,12 +9835,15 @@ var AuthController = class {
|
|
|
9825
9835
|
}
|
|
9826
9836
|
const tokenPayload = c.get("authTokenPayload");
|
|
9827
9837
|
if (tokenPayload?.sid) {
|
|
9828
|
-
const token2 = await signCollectionToken(
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9838
|
+
const token2 = await signCollectionToken(
|
|
9839
|
+
{
|
|
9840
|
+
sub: requestUser.sub,
|
|
9841
|
+
email: requestUser.email,
|
|
9842
|
+
collection: this.collection.slug,
|
|
9843
|
+
sid: tokenPayload.sid
|
|
9844
|
+
},
|
|
9845
|
+
resolveSessionTokenExpiry(this.collection)
|
|
9846
|
+
);
|
|
9834
9847
|
return c.json({ token: token2 });
|
|
9835
9848
|
}
|
|
9836
9849
|
const token = await issueAuthSessionToken({
|
|
@@ -10092,6 +10105,7 @@ var AuthController = class {
|
|
|
10092
10105
|
userId: user.id,
|
|
10093
10106
|
email: inviteeEmail,
|
|
10094
10107
|
collection: this.collection.slug,
|
|
10108
|
+
expiresIn: resolveSessionTokenExpiry(this.collection),
|
|
10095
10109
|
ip: c.get("clientIp"),
|
|
10096
10110
|
authSource: "local"
|
|
10097
10111
|
});
|
|
@@ -10349,6 +10363,7 @@ var AdminAuthController = class {
|
|
|
10349
10363
|
userId: user.id,
|
|
10350
10364
|
email: user.email,
|
|
10351
10365
|
collection: adminCollection.slug,
|
|
10366
|
+
expiresIn: resolveSessionTokenExpiry(adminCollection),
|
|
10352
10367
|
providerId: provider.id,
|
|
10353
10368
|
authSource: "external",
|
|
10354
10369
|
ip: c.get("clientIp")
|
|
@@ -15088,8 +15103,12 @@ init_embedding_service();
|
|
|
15088
15103
|
export {
|
|
15089
15104
|
AIAgent,
|
|
15090
15105
|
AIController,
|
|
15106
|
+
AUTH_SESSIONS_COLLECTION,
|
|
15091
15107
|
AuthController,
|
|
15092
15108
|
CollectionController,
|
|
15109
|
+
DEFAULT_LOCK_TIME_MS,
|
|
15110
|
+
DEFAULT_MAX_LOGIN_ATTEMPTS,
|
|
15111
|
+
DEFAULT_SESSION_EXPIRY,
|
|
15093
15112
|
EmbeddingService,
|
|
15094
15113
|
GlobalController,
|
|
15095
15114
|
InMemoryRateLimitStore,
|
|
@@ -15100,7 +15119,11 @@ export {
|
|
|
15100
15119
|
attachRequestMetrics,
|
|
15101
15120
|
bindObservabilityRuntime,
|
|
15102
15121
|
buildDyrectedSystemPrompt,
|
|
15122
|
+
buildInviteEmail,
|
|
15123
|
+
buildPasswordChangedEmail,
|
|
15103
15124
|
buildRequestLogger,
|
|
15125
|
+
buildResetPasswordEmail,
|
|
15126
|
+
buildWelcomeEmail,
|
|
15104
15127
|
captureRequestBody,
|
|
15105
15128
|
chunkText,
|
|
15106
15129
|
cosineSimilarity,
|
|
@@ -15108,24 +15131,39 @@ export {
|
|
|
15108
15131
|
createDyrectedApp,
|
|
15109
15132
|
createObservabilityRuntime,
|
|
15110
15133
|
createRequestSpan,
|
|
15134
|
+
decodeCollectionToken,
|
|
15111
15135
|
endRequestSpan,
|
|
15112
15136
|
estimateTokens,
|
|
15113
15137
|
extractTextFromDoc,
|
|
15114
15138
|
formatAIErrorMessage,
|
|
15115
15139
|
getAIModel,
|
|
15140
|
+
getAuthSession,
|
|
15116
15141
|
getConfigLogger,
|
|
15117
15142
|
getEmbeddingModel,
|
|
15143
|
+
getLockedUntilMs,
|
|
15118
15144
|
getObservabilityRuntime,
|
|
15119
15145
|
getRequestLogger,
|
|
15120
15146
|
hashContent,
|
|
15147
|
+
hashPassword,
|
|
15148
|
+
isAuthSessionActive,
|
|
15149
|
+
issueAuthSessionToken,
|
|
15121
15150
|
normalizeFieldValue,
|
|
15122
15151
|
redactBody,
|
|
15123
15152
|
redactHeaders,
|
|
15124
15153
|
registerRoutes,
|
|
15125
15154
|
renderPrometheusMetrics,
|
|
15155
|
+
resolveAuthLockoutConfig,
|
|
15126
15156
|
resolveObservabilityConfig,
|
|
15157
|
+
resolveSessionTokenExpiry,
|
|
15158
|
+
revokeAllAuthSessions,
|
|
15159
|
+
revokeAuthSession,
|
|
15160
|
+
sendEmail,
|
|
15127
15161
|
serializeDetailForApi,
|
|
15128
15162
|
serializeViewForApi,
|
|
15129
15163
|
shouldSampleRequest,
|
|
15130
|
-
|
|
15164
|
+
signCollectionToken,
|
|
15165
|
+
touchAuthSession,
|
|
15166
|
+
validatePayloadAgainstFields,
|
|
15167
|
+
verifyCollectionToken,
|
|
15168
|
+
verifyPassword
|
|
15131
15169
|
};
|