@stndrds/schema 0.1.0-alpha.36 → 0.1.0-alpha.37

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.
@@ -3709,6 +3709,156 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
3709
3709
  */
3710
3710
  declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
3711
3711
 
3712
+ /**
3713
+ * Cache Adapter - Agnostic caching interface for @stndrds/schema
3714
+ *
3715
+ * Provides a pluggable cache layer that can be implemented with different
3716
+ * backends (in-memory, Redis, Upstash, etc.) while maintaining consistent
3717
+ * API and behavior across all services.
3718
+ *
3719
+ * For implementations, use @stndrds/cache-adapters:
3720
+ *
3721
+ * @example
3722
+ * ```typescript
3723
+ * import { LruCacheAdapter } from "@stndrds/cache-adapters/lru";
3724
+ * import { InMemoryCacheAdapter } from "@stndrds/cache-adapters/memory";
3725
+ * import { NoopCacheAdapter } from "@stndrds/cache-adapters/noop";
3726
+ *
3727
+ * // Using with DatabaseAdapter
3728
+ * const adapter: DatabaseAdapter = {
3729
+ * ...repositories,
3730
+ * cache: new LruCacheAdapter({ maxSize: 10000 }),
3731
+ * };
3732
+ * ```
3733
+ */
3734
+ /**
3735
+ * Generic cache adapter interface.
3736
+ * Any cache implementation (Redis, Memcached, In-Memory) can implement this.
3737
+ */
3738
+ interface CacheAdapter {
3739
+ /**
3740
+ * Get a value from cache
3741
+ * @returns The cached value or null if not found/expired
3742
+ */
3743
+ get<T>(key: string): Promise<T | null>;
3744
+ /**
3745
+ * Set a value in cache with optional TTL
3746
+ * @param key - Cache key
3747
+ * @param value - Value to cache
3748
+ * @param ttlMs - Time-to-live in milliseconds (uses default if not provided)
3749
+ */
3750
+ set<T>(key: string, value: T, ttlMs?: number): Promise<void>;
3751
+ /**
3752
+ * Delete a specific key from cache
3753
+ */
3754
+ delete(key: string): Promise<void>;
3755
+ /**
3756
+ * Delete all keys matching a pattern (glob-style)
3757
+ * @param pattern - Pattern with wildcards (e.g., "schema:tenant-123:*")
3758
+ */
3759
+ deletePattern(pattern: string): Promise<void>;
3760
+ /**
3761
+ * Check if a key exists and is not expired
3762
+ */
3763
+ has(key: string): Promise<boolean>;
3764
+ /**
3765
+ * Clear entire cache
3766
+ */
3767
+ clear(): Promise<void>;
3768
+ /**
3769
+ * Get a value from cache, or compute and cache it if not present.
3770
+ * Includes race condition protection (pending fetches deduplication).
3771
+ *
3772
+ * @param key - Cache key
3773
+ * @param fetcher - Function to compute the value if not cached
3774
+ * @param ttlMs - Time-to-live in milliseconds
3775
+ * @returns The cached or computed value
3776
+ */
3777
+ getOrSet<T>(key: string, fetcher: () => Promise<T>, ttlMs?: number): Promise<T>;
3778
+ }
3779
+ /**
3780
+ * Configuration options for cache adapters
3781
+ */
3782
+ interface CacheOptions {
3783
+ /**
3784
+ * Default TTL in milliseconds when not specified in set()
3785
+ * @default 60000 (1 minute)
3786
+ */
3787
+ defaultTtlMs?: number;
3788
+ /**
3789
+ * Maximum number of entries before LRU eviction
3790
+ * @default 10000
3791
+ */
3792
+ maxSize?: number;
3793
+ }
3794
+ /**
3795
+ * Standardized cache key generators for all cached resources.
3796
+ * All keys are prefixed with tenant ID for multi-tenant isolation.
3797
+ */
3798
+ declare const cacheKeys: {
3799
+ /** Object schema by ID */
3800
+ readonly objectSchema: (tenantId: string, objectId: string) => string;
3801
+ /** Object schema by name */
3802
+ readonly objectSchemaByName: (tenantId: string, name: string) => string;
3803
+ /** List of all object schemas */
3804
+ readonly objectSchemaList: (tenantId: string) => string;
3805
+ /** Attributes for an object */
3806
+ readonly objectAttributes: (tenantId: string, objectId: string) => string;
3807
+ /** Effective permissions for a user */
3808
+ readonly userPermissions: (tenantId: string, userId: string) => string;
3809
+ /** Relation options for an attribute */
3810
+ readonly relationOptions: (tenantId: string, attrId: string, hash: string) => string;
3811
+ /** Computed rollup value for a record */
3812
+ readonly rollupValue: (tenantId: string, recordId: string, attrName: string) => string;
3813
+ /** All schema cache for a tenant */
3814
+ readonly allSchemas: (tenantId: string) => string;
3815
+ /** All attribute cache for a tenant */
3816
+ readonly allAttributes: (tenantId: string) => string;
3817
+ /** All permission cache for a tenant */
3818
+ readonly allPermissions: (tenantId: string) => string;
3819
+ /** All relation cache for a tenant */
3820
+ readonly allRelations: (tenantId: string) => string;
3821
+ /** All rollup cache for a tenant */
3822
+ readonly allRollups: (tenantId: string) => string;
3823
+ /** All rollups for a specific record */
3824
+ readonly rollupsByRecord: (tenantId: string, recordId: string) => string;
3825
+ /** All cache for a tenant (nuclear option) */
3826
+ readonly allForTenant: (tenantId: string) => string;
3827
+ };
3828
+ /**
3829
+ * Recommended TTL values for different resource types.
3830
+ * Values in milliseconds.
3831
+ */
3832
+ declare const cacheTtl: {
3833
+ /** Object schemas - rarely change (1 hour) */
3834
+ readonly schema: number;
3835
+ /** Schema list - new objects more frequent (5 minutes) */
3836
+ readonly schemaList: number;
3837
+ /** Object attributes - rarely change (1 hour) */
3838
+ readonly attributes: number;
3839
+ /** User permissions - medium volatility (15 minutes) */
3840
+ readonly permissions: number;
3841
+ /** Relation options - medium volatility (5 minutes) */
3842
+ readonly relations: number;
3843
+ /** Rollup values - high volatility (2 minutes) */
3844
+ readonly rollup: number;
3845
+ };
3846
+ /**
3847
+ * No-operation cache adapter that does nothing.
3848
+ * Use this to disable caching entirely.
3849
+ *
3850
+ * For a full-featured implementation, use @stndrds/cache-adapters.
3851
+ */
3852
+ declare class NoopCacheAdapter implements CacheAdapter {
3853
+ get<T>(): Promise<T | null>;
3854
+ set(): Promise<void>;
3855
+ delete(): Promise<void>;
3856
+ deletePattern(): Promise<void>;
3857
+ has(): Promise<boolean>;
3858
+ clear(): Promise<void>;
3859
+ getOrSet<T>(_key: string, fetcher: () => Promise<T>): Promise<T>;
3860
+ }
3861
+
3712
3862
  /**
3713
3863
  * Repository for objects table (metadata).
3714
3864
  *
@@ -4531,6 +4681,7 @@ interface DatabaseAdapter {
4531
4681
  permissions?: PermissionsRepository;
4532
4682
  audit?: AuditRepository;
4533
4683
  storage?: StorageAdapter;
4684
+ cache?: CacheAdapter;
4534
4685
  transaction<T>(callback: (adapter: DatabaseAdapter) => Promise<T>): Promise<T>;
4535
4686
  }
4536
4687
 
@@ -5075,16 +5226,11 @@ declare class AuditService extends TenantAwareService {
5075
5226
  */
5076
5227
  interface PermissionServiceOptions {
5077
5228
  /**
5078
- * Cache TTL in milliseconds.
5079
- * @default 60000 (1 minute)
5080
- */
5081
- cacheTtlMs?: number;
5082
- /**
5083
- * Maximum number of entries in the cache.
5084
- * Oldest entries are evicted when limit is reached (LRU-like).
5085
- * @default 10000
5229
+ * Cache adapter for caching permission lookups.
5230
+ * Falls back to adapter.cache if not provided.
5231
+ * If no cache is available, uses NoopCacheAdapter.
5086
5232
  */
5087
- maxCacheSize?: number;
5233
+ cache?: CacheAdapter;
5088
5234
  /**
5089
5235
  * Audit service for logging role changes.
5090
5236
  * If provided, audit logging is enabled.
@@ -5096,7 +5242,7 @@ interface PermissionServiceOptions {
5096
5242
  * Automatically uses tenant context from AsyncLocalStorage.
5097
5243
  *
5098
5244
  * Features:
5099
- * - In-memory cache with TTL and size limit for effective permissions
5245
+ * - CacheAdapter integration for permission caching
5100
5246
  * - Admin bypass for full access
5101
5247
  * - Wildcard permission support (target: "*")
5102
5248
  * - Object-level permission checks
@@ -5114,11 +5260,7 @@ interface PermissionServiceOptions {
5114
5260
  */
5115
5261
  declare class PermissionService extends TenantAwareService {
5116
5262
  private readonly adapter;
5117
- private cache;
5118
- /** Track pending permission fetches to prevent duplicate concurrent requests */
5119
- private pendingFetches;
5120
- private readonly cacheTtlMs;
5121
- private readonly maxCacheSize;
5263
+ private readonly cache;
5122
5264
  private readonly permissionsRepo;
5123
5265
  private readonly auditService?;
5124
5266
  constructor(adapter: DatabaseAdapter, options?: PermissionServiceOptions);
@@ -5178,32 +5320,22 @@ declare class PermissionService extends TenantAwareService {
5178
5320
  getSystemPermissions(userProfileId: string, resource: SystemResource): Promise<SystemPermissions>;
5179
5321
  /**
5180
5322
  * Get effective permissions for a user.
5181
- * Results are cached with TTL and size limit.
5323
+ * Results are cached using CacheAdapter with TTL.
5182
5324
  *
5183
5325
  * @param userProfileId - User profile ID
5184
5326
  * @returns Merged permissions from all user's roles
5185
5327
  */
5186
5328
  getEffectivePermissions(userProfileId: string): Promise<EffectivePermissions>;
5187
- /**
5188
- * Fetch permissions from database and cache the result
5189
- * @internal
5190
- */
5191
- private fetchAndCachePermissions;
5192
5329
  /**
5193
5330
  * Invalidate cached permissions for a specific user.
5194
5331
  * Call this after role/permission changes.
5195
5332
  */
5196
- invalidateCache(userProfileId: string): void;
5333
+ invalidateCache(userProfileId: string): Promise<void>;
5197
5334
  /**
5198
- * Invalidate all cached permissions.
5335
+ * Invalidate all cached permissions for the current tenant.
5199
5336
  * Call this after bulk role/permission changes.
5200
5337
  */
5201
- invalidateAllCache(): void;
5202
- /**
5203
- * Get current cache size (for monitoring).
5204
- */
5205
- getCacheSize(): number;
5206
- private getCacheKey;
5338
+ invalidateAllCache(): Promise<void>;
5207
5339
  /**
5208
5340
  * Get all roles for the current tenant.
5209
5341
  * Automatically uses tenant context from AsyncLocalStorage.
@@ -7136,16 +7268,26 @@ interface ObjectSchemaServiceOptions {
7136
7268
  * If provided, audit logging is enabled.
7137
7269
  */
7138
7270
  auditService?: AuditService;
7271
+ /**
7272
+ * Cache adapter for caching schema lookups.
7273
+ * If provided, schemas will be cached according to cacheTtl settings.
7274
+ * Falls back to adapter.cache if not provided.
7275
+ */
7276
+ cache?: CacheAdapter;
7139
7277
  }
7140
7278
  /**
7141
7279
  * Service for managing object schemas.
7142
7280
  * Handles fusion of native objects (from registry) and custom objects (from database).
7143
7281
  * Automatically uses tenant context from AsyncLocalStorage.
7282
+ *
7283
+ * Supports optional caching via CacheAdapter for improved performance.
7284
+ * Cache is automatically invalidated when schemas are modified.
7144
7285
  */
7145
7286
  declare class ObjectSchemaService extends TenantAwareService {
7146
7287
  private adapter;
7147
7288
  private nativeRegistry;
7148
7289
  private auditService?;
7290
+ private cache?;
7149
7291
  constructor(adapter: DatabaseAdapter, nativeRegistry: typeof registry, options?: ObjectSchemaServiceOptions);
7150
7292
  /**
7151
7293
  * Create a new custom object.
@@ -7235,10 +7377,16 @@ declare class ObjectSchemaService extends TenantAwareService {
7235
7377
  * Get complete object schema (object attributes + system attributes)
7236
7378
  * Includes system attributes (createdAt, updatedAt, createdBy, lastUpdatedBy)
7237
7379
  *
7380
+ * Results are cached if a CacheAdapter is configured.
7381
+ *
7238
7382
  * @param objectId - Object UUID from database
7239
7383
  * @returns Complete ObjectDefinition with all attributes including system attributes
7240
7384
  */
7241
7385
  getObjectSchema(objectId: string): Promise<ObjectDefinition>;
7386
+ /**
7387
+ * Internal method to fetch object schema by ID (no caching)
7388
+ */
7389
+ private fetchObjectSchemaById;
7242
7390
  /**
7243
7391
  * Get object schema by name (for system/native objects)
7244
7392
  * @deprecated Use getObjectSchemaByNameForTenant for custom objects support
@@ -7247,13 +7395,30 @@ declare class ObjectSchemaService extends TenantAwareService {
7247
7395
  /**
7248
7396
  * Get object schema by name (supports both native and custom objects).
7249
7397
  * Automatically uses tenant context from AsyncLocalStorage.
7398
+ *
7399
+ * Results are cached if a CacheAdapter is configured.
7250
7400
  */
7251
7401
  getObjectSchemaByNameForTenant(name: string): Promise<ObjectDefinition>;
7402
+ /**
7403
+ * Internal method to fetch object schema by name (no caching)
7404
+ */
7405
+ private fetchObjectSchemaByName;
7252
7406
  /**
7253
7407
  * List all object schemas.
7254
7408
  * Automatically uses tenant context from AsyncLocalStorage.
7409
+ *
7410
+ * Results are cached if a CacheAdapter is configured.
7255
7411
  */
7256
7412
  listObjectSchemas(): Promise<ObjectDefinition[]>;
7413
+ /**
7414
+ * Internal method to fetch all object schemas (no caching)
7415
+ */
7416
+ private fetchObjectSchemaList;
7417
+ /**
7418
+ * Invalidate all schema-related cache for the current tenant.
7419
+ * Called automatically after schema mutations.
7420
+ */
7421
+ private invalidateSchemaCache;
7257
7422
  /**
7258
7423
  * Build complete ObjectDefinition from DB object
7259
7424
  * Handles both native (merged with registry) and custom objects
@@ -7377,15 +7542,29 @@ interface GetRelationOptionsParams {
7377
7542
  /** Filter by specific target object */
7378
7543
  targetObject?: string;
7379
7544
  }
7545
+ /**
7546
+ * Options for RelationService constructor
7547
+ */
7548
+ interface RelationServiceOptions {
7549
+ /**
7550
+ * Cache adapter for caching relation options.
7551
+ * Falls back to adapter.cache if not provided.
7552
+ */
7553
+ cache?: CacheAdapter;
7554
+ }
7380
7555
  /**
7381
7556
  * Service for validating relation attributes.
7382
7557
  * Ensures referenced records exist and belong to valid target objects.
7383
7558
  * Automatically uses tenant context from AsyncLocalStorage.
7559
+ *
7560
+ * Supports optional caching via CacheAdapter for improved performance
7561
+ * on relation options lookups.
7384
7562
  */
7385
7563
  declare class RelationService extends TenantAwareService {
7386
7564
  private adapter;
7387
7565
  private schemaService;
7388
- constructor(adapter: DatabaseAdapter, nativeRegistry: typeof registry);
7566
+ private cache?;
7567
+ constructor(adapter: DatabaseAdapter, nativeRegistry: typeof registry, options?: RelationServiceOptions);
7389
7568
  /**
7390
7569
  * Validate all relation attributes in the data
7391
7570
  *
@@ -7474,6 +7653,16 @@ interface RollupResult {
7474
7653
  /** Number of records that contributed to the calculation */
7475
7654
  recordCount: number;
7476
7655
  }
7656
+ /**
7657
+ * Options for RollupService constructor
7658
+ */
7659
+ interface RollupServiceOptions {
7660
+ /**
7661
+ * Cache adapter for caching rollup calculations.
7662
+ * Falls back to adapter.cache if not provided.
7663
+ */
7664
+ cache?: CacheAdapter;
7665
+ }
7477
7666
  /**
7478
7667
  * Service for calculating rollup attribute values
7479
7668
  *
@@ -7481,14 +7670,20 @@ interface RollupResult {
7481
7670
  * for a company). They are calculated when needed and can be materialized
7482
7671
  * (stored) for performance.
7483
7672
  *
7673
+ * Supports optional caching via CacheAdapter for improved performance.
7674
+ * Rollup values have a short TTL (2 minutes) due to high volatility.
7675
+ *
7484
7676
  * Phase 3: Supports single-level relation rollups
7485
7677
  */
7486
7678
  declare class RollupService {
7487
7679
  private adapter;
7488
- constructor(adapter: DatabaseAdapter);
7680
+ private cache?;
7681
+ constructor(adapter: DatabaseAdapter, options?: RollupServiceOptions);
7489
7682
  /**
7490
7683
  * Calculate a rollup value for a record
7491
7684
  *
7685
+ * Results are cached if a CacheAdapter is configured.
7686
+ *
7492
7687
  * @param recordId - ID of the parent record
7493
7688
  * @param rollupAttr - Rollup attribute definition
7494
7689
  * @param schema - Schema of the parent object
@@ -7512,6 +7707,10 @@ declare class RollupService {
7512
7707
  * ```
7513
7708
  */
7514
7709
  calculate(recordId: string, rollupAttr: RollupAttribute, schema: ObjectDefinition): Promise<RollupResult>;
7710
+ /**
7711
+ * Internal method to compute rollup value (no caching)
7712
+ */
7713
+ private computeRollup;
7515
7714
  /**
7516
7715
  * Forward pattern: this record has a relation attribute pointing to other records
7517
7716
  * Example: entreprise222 has relation "entreprises" → companies, rollup collects from companies
@@ -7573,6 +7772,18 @@ declare class RollupService {
7573
7772
  * @returns Array of parent record IDs that need recalculation
7574
7773
  */
7575
7774
  findAffectedParentRecords(changedRecord: ObjectRecord, changedSchema: ObjectDefinition): Promise<string[]>;
7775
+ /**
7776
+ * Invalidate cached rollups for affected parent records.
7777
+ * Call this after a child record is created, updated, or deleted.
7778
+ *
7779
+ * @param affectedParentIds - Array of parent record IDs whose rollups need invalidation
7780
+ */
7781
+ invalidateAffectedRollups(affectedParentIds: string[]): Promise<void>;
7782
+ /**
7783
+ * Invalidate all cached rollups for the current tenant.
7784
+ * Use sparingly - prefer targeted invalidation.
7785
+ */
7786
+ invalidateAllRollups(): Promise<void>;
7576
7787
  /**
7577
7788
  * Find records that have forward rollups pointing to the modified record.
7578
7789
  *
@@ -8278,4 +8489,4 @@ declare function extractAttributeNames(template: string): string[];
8278
8489
  */
8279
8490
  declare function enrichValuesWithSelectLabels(values: Record<string, unknown>, attributes: Attribute[]): Record<string, unknown>;
8280
8491
 
8281
- export { type Currency as $, type Attribute as A, type FilterState as B, type CheckboxAttribute as C, type DateAttribute as D, type SortRule as E, type FileAttribute as F, type Group as G, type DirectTableTab as H, type InferAttributeValue as I, type BlockNoteContent as J, type StatusGroup as K, type LocationAttribute as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectAction as O, type PhoneAttribute as P, type AttributeGroup as Q, type RichtextAttribute as R, type SystemResource as S, type TextAttribute as T, type UserAttribute as U, type ViewLayout as V, type BaseAttribute as W, type NumberUnit as X, type DateFormat as Y, type DateValue as Z, type Phone as _, type SystemAction as a, type FlowRelation as a$, type Location as a0, type LocationGranularity as a1, RELATION_TARGET_ANY as a2, type RelationAttribute as a3, isUniversalRelation as a4, type BlockNoteBlock as a5, type BlockNoteCustomInlineContent as a6, type BlockNoteDefaultProps as a7, type BlockNoteInlineContent as a8, type BlockNoteLink as a9, type NumberFilterOperator as aA, type CheckboxFilterOperator as aB, type DateFilterOperator as aC, type SelectFilterOperator as aD, type MultiselectFilterOperator as aE, type RelationFilterOperator as aF, type FilterOperator as aG, type RelativeDateValue as aH, type CurrencyFilterValue as aI, type PhoneFilterValue as aJ, type FilterValue as aK, type FilterRule as aL, type ExtendedFilterRule as aM, type FilterCombinator as aN, type FilterGroup as aO, type AdvancedFilterState as aP, isAdvancedFilterState as aQ, toAdvancedFilterState as aR, toSimpleFilterState as aS, type SortDirection as aT, type QueryState as aU, OPERATORS_BY_TYPE as aV, type NoValueOperator as aW, NO_VALUE_OPERATORS as aX, isNoValueOperator as aY, type FlowSlot as aZ, type FlowRowField as a_, type BlockNoteStyledText as aa, type BlockNoteStyles as ab, type BlockNoteTableCell as ac, type BlockNoteTableCellProps as ad, type BlockNoteTableContent as ae, type PartialBlockNoteBlock as af, type PartialBlockNoteContent as ag, type PartialBlockNoteInlineContent as ah, type PartialBlockNoteLink as ai, type PartialBlockNoteStyledText as aj, type PartialBlockNoteTableCell as ak, type PartialBlockNoteTableContent as al, type AuditResourceType as am, type AuditAction as an, type AuditActorType as ao, type AuditChange as ap, type AuditLogEntry as aq, type CreateAuditLogInput as ar, type AuditListOptions as as, type AuditServiceOptions as at, type StorageProvider as au, type FileVisibility as av, type File as aw, type CreateFile as ax, type UpdateFile as ay, type TextFilterOperator as az, type TextAreaAttribute as b, isFormTab as b$, type FlowStatus as b0, isFlowDefinition as b1, isFlowPublished as b2, isSystemFlow as b3, type GeocodingSuggestion as b4, type GeocodingAutocompleteParams as b5, type ReverseGeocodingParams as b6, type GeocodingParams as b7, type GeocodingAdapter as b8, NoopGeocodingAdapter as b9, type CompletionStatus as bA, type ObjectRecord as bB, type PermissionScope as bC, type Role as bD, type Permission as bE, type UserRoleAssignment as bF, type EffectivePermissions as bG, type ObjectPermissions as bH, type SystemPermissions as bI, type CreateRoleInput as bJ, type UpdateRoleInput as bK, type CreatePermissionInput as bL, type AssignRoleInput as bM, type PolicyContext as bN, type RecordPolicy as bO, PolicyViolationError as bP, type UserRole as bQ, type UserStatus as bR, type UserProfile as bS, type CreateUserProfile as bT, type UpdateUserProfile as bU, type InviteUserInput as bV, type TabType as bW, type FormTab as bX, type CustomTab as bY, type ActivityTab as bZ, type NotesTab as b_, type AttributeSchema as ba, type InferRecordFromSchema as bb, type InferRecordWithRequirements as bc, type TypedAttribute as bd, type AttributeMap as be, type AddAttribute as bf, type InferRecord as bg, type InferRecordInput as bh, type InferRecordUpdate as bi, type CustomAttributeValue as bj, type WithCustomAttributes as bk, type RecordMetadata as bl, type SystemFields as bm, type ExtractRecord as bn, type ExtractRecordStrict as bo, type ExtractRecordInput as bp, type ExtractRecordInputStrict as bq, type ExtractRecordUpdate as br, type ExtractRecordUpdateStrict as bs, type ExtractAttributes as bt, RESERVED_ATTRIBUTE_NAMES as bu, SYSTEM_FIELD_NAMES as bv, type ReservedAttributeName as bw, type SystemFieldName as bx, type Timestamps as by, type ObjectAttribute as bz, type RichtextFeature as c, type ValidationResult as c$, isTableTab as c0, isDirectTableTab as c1, isInverseTableTab as c2, isCustomTab as c3, isActivityTab as c4, isNotesTab as c5, type Uuid as c6, type TenantId as c7, type UserId as c8, asTenantId as c9, getAttributeConfigSchema as cA, validateAttributeConfig as cB, parseAttributeConfig as cC, safeParseAttributeConfig as cD, createTextValidator as cE, createNumberValidator as cF, createCheckboxValidator as cG, createDateValidator as cH, createPhoneValidator as cI, createCurrencyValidator as cJ, createStatusValidator as cK, createSelectValidator as cL, createMultiselectValidator as cM, createLocationValidator as cN, createFileValidator as cO, createUserValidator as cP, createSingleRelationValidator as cQ, createMultiRelationValidator as cR, createRelationValidator as cS, createRatingValidator as cT, createFormulaValidator as cU, createRollupValidator as cV, createTextAreaValidator as cW, createRichtextValidator as cX, createAttributeValidator as cY, createFormAttributeValidator as cZ, createObjectValidator as c_, asUserId as ca, generateId as cb, generatePrefixedId as cc, registry as cd, viewRegistry as ce, type ValidationMessages as cf, DEFAULT_VALIDATION_MESSAGES as cg, textConfigSchema as ch, textareaConfigSchema as ci, richtextConfigSchema as cj, numberConfigSchema as ck, checkboxConfigSchema as cl, dateConfigSchema as cm, phoneConfigSchema as cn, currencyConfigSchema as co, statusConfigSchema as cp, locationConfigSchema as cq, selectConfigSchema as cr, multiselectConfigSchema as cs, fileConfigSchema as ct, userConfigSchema as cu, relationConfigSchema as cv, ratingConfigSchema as cw, formulaConfigSchema as cx, rollupConfigSchema as cy, attributeConfigSchemas as cz, type CurrencyAttribute as d, traversePath as d$, validateAttribute as d0, validateObject as d1, validateObjectOrThrow as d2, createDraftValidator as d3, validateDraft as d4, validateDraftOrThrow as d5, getMissingRequiredAttributes as d6, isRecordComplete as d7, computeRecordStatus as d8, type DatabaseAdapter as d9, evaluateFormula as dA, evaluateFormulaAttribute as dB, evaluateFormulaAttributeWithRelations as dC, evaluateFormulaWithRelations as dD, evaluateFormulaWithResult as dE, extractFormulaVariables as dF, extractRelationNames as dG, extractRelationReferences as dH, flattenRelationsForEval as dI, formatFormulaResult as dJ, hasRelationReferences as dK, validateFormulaExpression as dL, type FormulaResult as dM, getPathDepth as dN, getRelationPath as dO, getTargetAttributeName as dP, InvalidPathError as dQ, MaxDepthExceededError as dR, parsePath as dS, pathHasManyCardinality as dT, validatePath as dU, type PathCardinality as dV, type PathSegment as dW, type PathSegmentType as dX, type SchemaResolver as dY, resolveMultiplePaths as dZ, resolveSingleValue as d_, type FetchResult as da, type FormattedRecord as db, type GroupedFetchResult as dc, type InsertOptions as dd, type QueryBuilderState as de, type RegistryMap as df, type RegistryObjectNames as dg, type ShortcutOperator as dh, createDefaultState as di, formatRecord as dj, formatRecords as dk, QueryMultipleResultsError as dl, QueryNoResultError as dm, SHORTCUT_TO_FILTER_OPERATOR as dn, createQueryBuilder as dp, QueryBuilder as dq, type QueryBuilderOptions as dr, TenantContextError as ds, getContext as dt, getTenantId as du, getUserId as dv, hasContext as dw, runWithContext as dx, withTenantContext as dy, type TenantContext as dz, type Option as e, type StorageUploadInput as e$, type TraversalOptions as e0, type TraversalResult as e1, type AttributeChange as e2, type HookContext as e3, type HookDefinition as e4, type HookHandler as e5, type HookType as e6, NoopHookRegistry as e7, type HookRegistry as e8, createMockAdapter as e9, type ObjectSchemaServiceOptions as eA, ObjectSchemaService as eB, type PermissionServiceOptions as eC, PermissionService as eD, type RecordServiceOptions as eE, RecordService as eF, type RelationValidationResult as eG, type RelationValidationError as eH, type RelationOption as eI, type RelationOptionsResponse as eJ, type GetRelationOptionsParams as eK, RelationService as eL, type ResolvedRelations as eM, RelationResolverService as eN, type RollupResult as eO, RollupService as eP, type RollupSchedulerOptions as eQ, RollupScheduler as eR, type UserProfileServiceOptions as eS, UserProfileService as eT, type UserValidationResult as eU, type UserValidationError as eV, UserService as eW, type CreateViewInput as eX, type UpdateViewInput as eY, ViewService as eZ, type FileContent as e_, defaultPolicyRegistry as ea, PolicyRegistry as eb, notesPolicy as ec, type ObjectsRepository as ed, type AttributesRepository as ee, type UserProfilesRepository as ef, type FilesRepository as eg, type ObjectRecordsRepository as eh, type ViewsRepository as ei, type FlowsRepository as ej, type AuditRepository as ek, type PermissionsRepository as el, buildAuditChanges as em, AuditService as en, TenantAwareService as eo, TenantAwareRepository as ep, type FileServiceOptions as eq, FileService as er, type CreateFlowInput as es, type UpdateFlowInput as et, FlowService as eu, GeocodingService as ev, GlobalSearchService as ew, type CreateCustomObjectInput as ex, type AddAttributeInput as ey, type UpdateObjectInput as ez, type StatusAttribute as f, type StorageUploadResult as f0, type SignedUrlOptions as f1, type StorageAdapter as f2, type UploadFileInput as f3, type SyncResult as f4, type SyncOptions as f5, syncNativeObjects as f6, verifyNativeObjectsSync as f7, getSyncPreview as f8, type FullSyncResult as f9, type CreateDBFlow as fA, type UpdateDBFlow as fB, type OperationResult as fC, type ViewSyncResult as fD, type ViewSyncOptions as fE, syncNativeViews as fF, verifyNativeViewsSync as fG, getViewSyncPreview as fH, type FullSyncOptions as fa, syncAll as fb, DEFAULT_LABEL_FALLBACK as fc, renderLabelExpression as fd, isLabelExpression as fe, extractAttributeNames as ff, enrichValuesWithSelectLabels as fg, type DBObject as fh, type CreateDBObject as fi, type UpdateDBObject as fj, type UpsertDBObject as fk, type DBAttribute as fl, type CreateDBAttribute as fm, type UpdateDBAttribute as fn, type UpsertDBAttribute as fo, type CreateObjectRecord as fp, type ListOptions as fq, type SearchOptions as fr, type GlobalSearchOptions as fs, type GlobalSearchResultItem as ft, type FileListOptions as fu, type DBView as fv, type CreateDBView as fw, type UpdateDBView as fx, type UpsertDBView as fy, type DBFlow as fz, type SelectAttribute as g, type SingleRelationAttribute as h, type MultiRelationAttribute as i, type RelationTarget as j, type RatingAttribute as k, type FormulaAttribute as l, type FormulaReturnType as m, type RollupAttribute as n, type RollupFunction as o, type AttributeType as p, type FlowDefinition as q, type FlowPage as r, type FlowRow as s, type ObjectDefinition as t, type Field as u, type AttributeGroupField as v, type TableTab as w, type InverseTableTab as x, type ViewDefinition as y, type Tab as z };
8492
+ export { type Currency as $, type Attribute as A, type FilterState as B, type CheckboxAttribute as C, type DateAttribute as D, type SortRule as E, type FileAttribute as F, type Group as G, type DirectTableTab as H, type InferAttributeValue as I, type BlockNoteContent as J, type StatusGroup as K, type LocationAttribute as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectAction as O, type PhoneAttribute as P, type AttributeGroup as Q, type RichtextAttribute as R, type SystemResource as S, type TextAttribute as T, type UserAttribute as U, type ViewLayout as V, type BaseAttribute as W, type NumberUnit as X, type DateFormat as Y, type DateValue as Z, type Phone as _, type SystemAction as a, type FlowRelation as a$, type Location as a0, type LocationGranularity as a1, RELATION_TARGET_ANY as a2, type RelationAttribute as a3, isUniversalRelation as a4, type BlockNoteBlock as a5, type BlockNoteCustomInlineContent as a6, type BlockNoteDefaultProps as a7, type BlockNoteInlineContent as a8, type BlockNoteLink as a9, type NumberFilterOperator as aA, type CheckboxFilterOperator as aB, type DateFilterOperator as aC, type SelectFilterOperator as aD, type MultiselectFilterOperator as aE, type RelationFilterOperator as aF, type FilterOperator as aG, type RelativeDateValue as aH, type CurrencyFilterValue as aI, type PhoneFilterValue as aJ, type FilterValue as aK, type FilterRule as aL, type ExtendedFilterRule as aM, type FilterCombinator as aN, type FilterGroup as aO, type AdvancedFilterState as aP, isAdvancedFilterState as aQ, toAdvancedFilterState as aR, toSimpleFilterState as aS, type SortDirection as aT, type QueryState as aU, OPERATORS_BY_TYPE as aV, type NoValueOperator as aW, NO_VALUE_OPERATORS as aX, isNoValueOperator as aY, type FlowSlot as aZ, type FlowRowField as a_, type BlockNoteStyledText as aa, type BlockNoteStyles as ab, type BlockNoteTableCell as ac, type BlockNoteTableCellProps as ad, type BlockNoteTableContent as ae, type PartialBlockNoteBlock as af, type PartialBlockNoteContent as ag, type PartialBlockNoteInlineContent as ah, type PartialBlockNoteLink as ai, type PartialBlockNoteStyledText as aj, type PartialBlockNoteTableCell as ak, type PartialBlockNoteTableContent as al, type AuditResourceType as am, type AuditAction as an, type AuditActorType as ao, type AuditChange as ap, type AuditLogEntry as aq, type CreateAuditLogInput as ar, type AuditListOptions as as, type AuditServiceOptions as at, type StorageProvider as au, type FileVisibility as av, type File as aw, type CreateFile as ax, type UpdateFile as ay, type TextFilterOperator as az, type TextAreaAttribute as b, isFormTab as b$, type FlowStatus as b0, isFlowDefinition as b1, isFlowPublished as b2, isSystemFlow as b3, type GeocodingSuggestion as b4, type GeocodingAutocompleteParams as b5, type ReverseGeocodingParams as b6, type GeocodingParams as b7, type GeocodingAdapter as b8, NoopGeocodingAdapter as b9, type CompletionStatus as bA, type ObjectRecord as bB, type PermissionScope as bC, type Role as bD, type Permission as bE, type UserRoleAssignment as bF, type EffectivePermissions as bG, type ObjectPermissions as bH, type SystemPermissions as bI, type CreateRoleInput as bJ, type UpdateRoleInput as bK, type CreatePermissionInput as bL, type AssignRoleInput as bM, type PolicyContext as bN, type RecordPolicy as bO, PolicyViolationError as bP, type UserRole as bQ, type UserStatus as bR, type UserProfile as bS, type CreateUserProfile as bT, type UpdateUserProfile as bU, type InviteUserInput as bV, type TabType as bW, type FormTab as bX, type CustomTab as bY, type ActivityTab as bZ, type NotesTab as b_, type AttributeSchema as ba, type InferRecordFromSchema as bb, type InferRecordWithRequirements as bc, type TypedAttribute as bd, type AttributeMap as be, type AddAttribute as bf, type InferRecord as bg, type InferRecordInput as bh, type InferRecordUpdate as bi, type CustomAttributeValue as bj, type WithCustomAttributes as bk, type RecordMetadata as bl, type SystemFields as bm, type ExtractRecord as bn, type ExtractRecordStrict as bo, type ExtractRecordInput as bp, type ExtractRecordInputStrict as bq, type ExtractRecordUpdate as br, type ExtractRecordUpdateStrict as bs, type ExtractAttributes as bt, RESERVED_ATTRIBUTE_NAMES as bu, SYSTEM_FIELD_NAMES as bv, type ReservedAttributeName as bw, type SystemFieldName as bx, type Timestamps as by, type ObjectAttribute as bz, type RichtextFeature as c, type ValidationResult as c$, isTableTab as c0, isDirectTableTab as c1, isInverseTableTab as c2, isCustomTab as c3, isActivityTab as c4, isNotesTab as c5, type Uuid as c6, type TenantId as c7, type UserId as c8, asTenantId as c9, getAttributeConfigSchema as cA, validateAttributeConfig as cB, parseAttributeConfig as cC, safeParseAttributeConfig as cD, createTextValidator as cE, createNumberValidator as cF, createCheckboxValidator as cG, createDateValidator as cH, createPhoneValidator as cI, createCurrencyValidator as cJ, createStatusValidator as cK, createSelectValidator as cL, createMultiselectValidator as cM, createLocationValidator as cN, createFileValidator as cO, createUserValidator as cP, createSingleRelationValidator as cQ, createMultiRelationValidator as cR, createRelationValidator as cS, createRatingValidator as cT, createFormulaValidator as cU, createRollupValidator as cV, createTextAreaValidator as cW, createRichtextValidator as cX, createAttributeValidator as cY, createFormAttributeValidator as cZ, createObjectValidator as c_, asUserId as ca, generateId as cb, generatePrefixedId as cc, registry as cd, viewRegistry as ce, type ValidationMessages as cf, DEFAULT_VALIDATION_MESSAGES as cg, textConfigSchema as ch, textareaConfigSchema as ci, richtextConfigSchema as cj, numberConfigSchema as ck, checkboxConfigSchema as cl, dateConfigSchema as cm, phoneConfigSchema as cn, currencyConfigSchema as co, statusConfigSchema as cp, locationConfigSchema as cq, selectConfigSchema as cr, multiselectConfigSchema as cs, fileConfigSchema as ct, userConfigSchema as cu, relationConfigSchema as cv, ratingConfigSchema as cw, formulaConfigSchema as cx, rollupConfigSchema as cy, attributeConfigSchemas as cz, type CurrencyAttribute as d, type PathSegment as d$, validateAttribute as d0, validateObject as d1, validateObjectOrThrow as d2, createDraftValidator as d3, validateDraft as d4, validateDraftOrThrow as d5, getMissingRequiredAttributes as d6, isRecordComplete as d7, computeRecordStatus as d8, type DatabaseAdapter as d9, getUserId as dA, hasContext as dB, runWithContext as dC, withTenantContext as dD, type TenantContext as dE, evaluateFormula as dF, evaluateFormulaAttribute as dG, evaluateFormulaAttributeWithRelations as dH, evaluateFormulaWithRelations as dI, evaluateFormulaWithResult as dJ, extractFormulaVariables as dK, extractRelationNames as dL, extractRelationReferences as dM, flattenRelationsForEval as dN, formatFormulaResult as dO, hasRelationReferences as dP, validateFormulaExpression as dQ, type FormulaResult as dR, getPathDepth as dS, getRelationPath as dT, getTargetAttributeName as dU, InvalidPathError as dV, MaxDepthExceededError as dW, parsePath as dX, pathHasManyCardinality as dY, validatePath as dZ, type PathCardinality as d_, type CacheAdapter as da, type CacheOptions as db, cacheKeys as dc, cacheTtl as dd, NoopCacheAdapter as de, type FetchResult as df, type FormattedRecord as dg, type GroupedFetchResult as dh, type InsertOptions as di, type QueryBuilderState as dj, type RegistryMap as dk, type RegistryObjectNames as dl, type ShortcutOperator as dm, createDefaultState as dn, formatRecord as dp, formatRecords as dq, QueryMultipleResultsError as dr, QueryNoResultError as ds, SHORTCUT_TO_FILTER_OPERATOR as dt, createQueryBuilder as du, QueryBuilder as dv, type QueryBuilderOptions as dw, TenantContextError as dx, getContext as dy, getTenantId as dz, type Option as e, type UserValidationResult as e$, type PathSegmentType as e0, type SchemaResolver as e1, resolveMultiplePaths as e2, resolveSingleValue as e3, traversePath as e4, type TraversalOptions as e5, type TraversalResult as e6, type AttributeChange as e7, type HookContext as e8, type HookDefinition as e9, GeocodingService as eA, GlobalSearchService as eB, type CreateCustomObjectInput as eC, type AddAttributeInput as eD, type UpdateObjectInput as eE, type ObjectSchemaServiceOptions as eF, ObjectSchemaService as eG, type PermissionServiceOptions as eH, PermissionService as eI, type RecordServiceOptions as eJ, RecordService as eK, type RelationValidationResult as eL, type RelationValidationError as eM, type RelationOption as eN, type RelationOptionsResponse as eO, type GetRelationOptionsParams as eP, type RelationServiceOptions as eQ, RelationService as eR, type ResolvedRelations as eS, RelationResolverService as eT, type RollupResult as eU, type RollupServiceOptions as eV, RollupService as eW, type RollupSchedulerOptions as eX, RollupScheduler as eY, type UserProfileServiceOptions as eZ, UserProfileService as e_, type HookHandler as ea, type HookType as eb, NoopHookRegistry as ec, type HookRegistry as ed, createMockAdapter as ee, defaultPolicyRegistry as ef, PolicyRegistry as eg, notesPolicy as eh, type ObjectsRepository as ei, type AttributesRepository as ej, type UserProfilesRepository as ek, type FilesRepository as el, type ObjectRecordsRepository as em, type ViewsRepository as en, type FlowsRepository as eo, type AuditRepository as ep, type PermissionsRepository as eq, buildAuditChanges as er, AuditService as es, TenantAwareService as et, TenantAwareRepository as eu, type FileServiceOptions as ev, FileService as ew, type CreateFlowInput as ex, type UpdateFlowInput as ey, FlowService as ez, type StatusAttribute as f, type UserValidationError as f0, UserService as f1, type CreateViewInput as f2, type UpdateViewInput as f3, ViewService as f4, type FileContent as f5, type StorageUploadInput as f6, type StorageUploadResult as f7, type SignedUrlOptions as f8, type StorageAdapter as f9, type GlobalSearchResultItem as fA, type FileListOptions as fB, type DBView as fC, type CreateDBView as fD, type UpdateDBView as fE, type UpsertDBView as fF, type DBFlow as fG, type CreateDBFlow as fH, type UpdateDBFlow as fI, type OperationResult as fJ, type ViewSyncResult as fK, type ViewSyncOptions as fL, syncNativeViews as fM, verifyNativeViewsSync as fN, getViewSyncPreview as fO, type UploadFileInput as fa, type SyncResult as fb, type SyncOptions as fc, syncNativeObjects as fd, verifyNativeObjectsSync as fe, getSyncPreview as ff, type FullSyncResult as fg, type FullSyncOptions as fh, syncAll as fi, DEFAULT_LABEL_FALLBACK as fj, renderLabelExpression as fk, isLabelExpression as fl, extractAttributeNames as fm, enrichValuesWithSelectLabels as fn, type DBObject as fo, type CreateDBObject as fp, type UpdateDBObject as fq, type UpsertDBObject as fr, type DBAttribute as fs, type CreateDBAttribute as ft, type UpdateDBAttribute as fu, type UpsertDBAttribute as fv, type CreateObjectRecord as fw, type ListOptions as fx, type SearchOptions as fy, type GlobalSearchOptions as fz, type SelectAttribute as g, type SingleRelationAttribute as h, type MultiRelationAttribute as i, type RelationTarget as j, type RatingAttribute as k, type FormulaAttribute as l, type FormulaReturnType as m, type RollupAttribute as n, type RollupFunction as o, type AttributeType as p, type FlowDefinition as q, type FlowPage as r, type FlowRow as s, type ObjectDefinition as t, type Field as u, type AttributeGroupField as v, type TableTab as w, type InverseTableTab as x, type ViewDefinition as y, type Tab as z };