@stndrds/schema 0.1.0-alpha.63 → 0.1.0-alpha.64

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.
@@ -1,4 +1,4 @@
1
- import { ae as Timestamps, A as Attribute, H as AttributeType, a3 as Location, a4 as LocationGranularity, q as StatusAttribute, r as SelectAttribute, s as MultiselectAttribute, a1 as Phone, a2 as Currency, z as FormulaAttribute, E as RollupAttribute, ah as CompletionStatus, af as SharingMode, ai as ObjectRecord, I as ObjectDefinition, V as FeatureFlagsRepository, b8 as ValidationResult, a6 as RelationAttribute, h as PropertySchema, B as FormulaReturnType } from './validators-BIAmz0CD.mjs';
1
+ import { a3 as Timestamps, A as Attribute, p as AttributeType, K as Location, Q as LocationGranularity, S as StatusAttribute, e as SelectAttribute, M as MultiselectAttribute, I as Phone, J as Currency, l as FormulaAttribute, n as RollupAttribute, a6 as CompletionStatus, a4 as SharingMode, a7 as ObjectRecord, q as ObjectDefinition, u as FeatureFlagsRepository, a$ as ValidationResult, ac as PropertySchema, h as RelationAttribute, m as FormulaReturnType } from './validators-BROsLGn4.mjs';
2
2
  import { IconName, MimeType, ColorId, CountryIso3 } from '@stndrds/constants';
3
3
  import { Uuid, TenantId, UserId } from './utils.mjs';
4
4
  import { JWTPayload } from 'jose';
@@ -3076,7 +3076,7 @@ interface Group {
3076
3076
  collapsed?: boolean;
3077
3077
  order?: number;
3078
3078
  }
3079
- type TabType = "form" | "table" | "custom" | "activity" | "notes" | "flows" | "documents";
3079
+ type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "flows" | "documents";
3080
3080
  /**
3081
3081
  * Base properties shared by all tab types
3082
3082
  */
@@ -3103,12 +3103,58 @@ interface FormTab extends BaseTab {
3103
3103
  density?: FormDensity;
3104
3104
  }
3105
3105
  /**
3106
- * Shared properties for table tabs
3106
+ * Direct relation on the current object
3107
+ *
3108
+ * @example Contact.companies → shows Companies linked via the "companies" relation
3109
+ */
3110
+ interface RelationSource {
3111
+ type: "relation";
3112
+ /** Relation attribute name on the current object */
3113
+ attribute: string;
3114
+ }
3115
+ /**
3116
+ * Inverse lookup — records from another object that point to us
3117
+ *
3118
+ * @example On Company, show Contacts where Contact.company = this Company
3119
+ */
3120
+ interface InverseSource {
3121
+ type: "inverse";
3122
+ /** Object name that has the relation to us */
3123
+ object: string;
3124
+ /** Relation attribute name on the source object that points to us */
3125
+ attribute: string;
3126
+ }
3127
+ /**
3128
+ * Where table data comes from — either a direct relation or an inverse lookup
3107
3129
  */
3108
- interface TableTabBase extends BaseTab {
3130
+ type TableSource = RelationSource | InverseSource;
3131
+ /**
3132
+ * Table tab - displays related records in a table
3133
+ *
3134
+ * The `source` field determines where data comes from.
3135
+ *
3136
+ * @example Direct: source = { type: "relation", attribute: "members" }
3137
+ * @example Inverse: source = { type: "inverse", object: "contacts", attribute: "company" }
3138
+ */
3139
+ interface TableTab extends BaseTab {
3109
3140
  type: "table";
3110
- /** Columns to display (attribute names from target object) */
3141
+ /** Where the data comes from */
3142
+ source: TableSource;
3143
+ /** Columns to display (attribute names from the resolved target object) */
3111
3144
  columns: string[];
3145
+ /**
3146
+ * Traverse a 2nd-level relation to display nested data.
3147
+ * When active, `columns` stores the 2nd-level object's attribute names.
3148
+ *
3149
+ * @example source.attribute = "members", through.attribute = "companies"
3150
+ * → displays companies of each member
3151
+ */
3152
+ through?: {
3153
+ /** Relation attribute on the first-level target object */
3154
+ attribute: string;
3155
+ /** Show _source and _target columns */
3156
+ showSourceTarget?: boolean;
3157
+ };
3112
3158
  /** Allow creating new records */
3113
3159
  allowCreate?: boolean;
3114
3160
  /** Creation behavior when allowCreate is true. Default: "redirect" */
@@ -3122,32 +3168,6 @@ interface TableTabBase extends BaseTab {
3122
3168
  /** Default sort rules */
3123
3169
  sorts?: SortRule[];
3124
3170
  }
3125
- /**
3126
- * Direct table tab - displays records from a relation attribute on the current object
3127
- *
3128
- * @example Project.members → shows Users linked via the "members" relation
3129
- */
3130
- interface DirectTableTab extends TableTabBase {
3131
- relationMode: "direct";
3132
- /** Relation attribute name on the current object */
3133
- relationAttribute: string;
3134
- }
3135
- /**
3136
- * Inverse table tab - displays records from another object that have a relation to us
3137
- *
3138
- * @example Contact.company → on Company, shows Contacts that point to this Company
3139
- */
3140
- interface InverseTableTab extends TableTabBase {
3141
- relationMode: "inverse";
3142
- /** Object name that has the relation to us */
3143
- sourceObject: string;
3144
- /** Relation attribute name on the source object that points to us */
3145
- relationAttribute: string;
3146
- }
3147
- /**
3148
- * Table tab - displays related records in a table
3149
- */
3150
- type TableTab = DirectTableTab | InverseTableTab;
3151
3171
  /**
3152
3172
  * Custom tab - renders a developer-defined component
3153
3173
  */
@@ -3166,12 +3186,14 @@ interface ActivityTab extends BaseTab {
3166
3186
  limit?: number;
3167
3187
  }
3168
3188
  /**
3169
- * Notes tab - displays notes linked to the current record
3189
+ * Richtext tab - displays a block editor for a richtext attribute
3170
3190
  */
3171
- interface NotesTab extends BaseTab {
3172
- type: "notes";
3173
- allowCreate?: boolean;
3174
- privateOnly?: boolean;
3191
+ interface RichtextTab extends BaseTab {
3192
+ type: "richtext";
3193
+ /** Richtext attribute to display in the BlockEditor */
3194
+ attribute: string;
3195
+ /** Optional text attribute for an editable title input above the editor */
3196
+ titleAttribute?: string;
3175
3197
  }
3176
3198
  /**
3177
3199
  * Flows tab - displays workflow instances linked to the current record
@@ -3197,7 +3219,7 @@ interface DocumentsTab extends BaseTab {
3197
3219
  /**
3198
3220
  * Union of all tab types (for detail views)
3199
3221
  */
3200
- type Tab = FormTab | TableTab | CustomTab | ActivityTab | NotesTab | FlowsTab | DocumentsTab;
3222
+ type Tab = FormTab | TableTab | CustomTab | ActivityTab | RichtextTab | FlowsTab | DocumentsTab;
3201
3223
  /**
3202
3224
  * Detail view layout mode
3203
3225
  * - `page`: Full view with multiple tabs
@@ -3210,8 +3232,6 @@ type DetailViewLayout = "page" | "modal";
3210
3232
  * - `kanban`: Kanban board layout (grouped by attribute)
3211
3233
  */
3212
3234
  type ListViewLayout = "table" | "kanban";
3213
- /** @deprecated Use DetailViewLayout instead */
3214
- type ViewLayout = DetailViewLayout;
3215
3235
  /**
3216
3236
  * Tab within a list view — each tab carries its own full display configuration.
3217
3237
  *
@@ -3254,8 +3274,16 @@ interface ListViewTab {
3254
3274
  /** Date attribute to display on kanban cards (bottom-right) */
3255
3275
  cardDateAttribute?: string;
3256
3276
  }
3257
- /** @deprecated Use ListViewTab instead */
3258
- type ViewTab = ListViewTab;
3277
+ /**
3278
+ * Configuration for the side panel displayed alongside tab content.
3279
+ * When present, a right-side panel shows the configured attributes as flat fields.
3280
+ */
3281
+ interface SidePanelConfig {
3282
+ /** Attribute names to display as flat fields in the panel */
3283
+ attributes: string[];
3284
+ /** Width in pixels. @default 320 */
3285
+ width?: number;
3286
+ }
3259
3287
  /**
3260
3288
  * Configuration for detail views (RecordEditView)
3261
3289
  */
@@ -3264,6 +3292,8 @@ interface DetailViewConfig {
3264
3292
  layout: DetailViewLayout;
3265
3293
  /** Tabs in this view */
3266
3294
  tabs: Tab[];
3295
+ /** Optional side panel with flat attribute fields (not available for modal layout) */
3296
+ sidePanel?: SidePanelConfig;
3267
3297
  }
3268
3298
  /**
3269
3299
  * Configuration for list views (RecordsView)
@@ -3433,13 +3463,17 @@ declare function isFormTab(tab: Tab): tab is FormTab;
3433
3463
  */
3434
3464
  declare function isTableTab(tab: Tab): tab is TableTab;
3435
3465
  /**
3436
- * Check if a table tab is a direct relation tab
3466
+ * Check if a table tab uses a direct relation source
3437
3467
  */
3438
- declare function isDirectTableTab(tab: Tab): tab is DirectTableTab;
3468
+ declare function isRelationSourceTab(tab: Tab): tab is TableTab & {
3469
+ source: RelationSource;
3470
+ };
3439
3471
  /**
3440
- * Check if a table tab is an inverse relation tab
3472
+ * Check if a table tab uses an inverse source
3441
3473
  */
3442
- declare function isInverseTableTab(tab: Tab): tab is InverseTableTab;
3474
+ declare function isInverseSourceTab(tab: Tab): tab is TableTab & {
3475
+ source: InverseSource;
3476
+ };
3443
3477
  /**
3444
3478
  * Check if a tab is a custom tab
3445
3479
  */
@@ -3449,9 +3483,9 @@ declare function isCustomTab(tab: Tab): tab is CustomTab;
3449
3483
  */
3450
3484
  declare function isActivityTab(tab: Tab): tab is ActivityTab;
3451
3485
  /**
3452
- * Check if a tab is a notes tab
3486
+ * Check if a tab is a richtext tab
3453
3487
  */
3454
- declare function isNotesTab(tab: Tab): tab is NotesTab;
3488
+ declare function isRichtextTab(tab: Tab): tab is RichtextTab;
3455
3489
  /**
3456
3490
  * Check if a tab is a flows tab
3457
3491
  */
@@ -5819,6 +5853,24 @@ interface RelationAttributesRepository {
5819
5853
  * @returns All relation attributes targeting this record
5820
5854
  */
5821
5855
  findByTarget(toId: Uuid): Promise<RelationAttributeRow[]>;
5856
+ /**
5857
+ * Batch find relation attributes for multiple source records.
5858
+ * Single query for all fromIds — used by list/search enrichment.
5859
+ *
5860
+ * @param fromObject - Source object name
5861
+ * @param fromIds - Array of source record IDs
5862
+ * @param fromAttribute - Source attribute name
5863
+ * @returns All matching relation attributes
5864
+ */
5865
+ findBySourceBatch(fromObject: string, fromIds: Uuid[], fromAttribute: string): Promise<RelationAttributeRow[]>;
5866
+ /**
5867
+ * Batch find relation attributes targeting multiple records.
5868
+ * Single query for all toIds — used for bilateral relation enrichment.
5869
+ *
5870
+ * @param toIds - Array of target record IDs
5871
+ * @returns All matching relation attributes
5872
+ */
5873
+ findByTargetBatch(toIds: Uuid[]): Promise<RelationAttributeRow[]>;
5822
5874
  /**
5823
5875
  * Delete all relation attributes for a specific source.
5824
5876
  * Automatically filtered by current tenant context.
@@ -5828,6 +5880,18 @@ interface RelationAttributesRepository {
5828
5880
  * @param fromAttribute - Source attribute name
5829
5881
  */
5830
5882
  deleteBySource(fromObject: string, fromId: Uuid, fromAttribute: string): Promise<void>;
5883
+ /**
5884
+ * Delete relation attributes for a specific source→target pair.
5885
+ * Used for safe inverse-side deletion (only deletes the specific link,
5886
+ * not all of the source's relations).
5887
+ * Automatically filtered by current tenant context.
5888
+ *
5889
+ * @param fromObject - Source object name
5890
+ * @param fromId - Source record ID
5891
+ * @param fromAttribute - Source attribute name
5892
+ * @param toId - Target record ID
5893
+ */
5894
+ deleteBySourceAndTarget(fromObject: string, fromId: Uuid, fromAttribute: string, toId: Uuid): Promise<void>;
5831
5895
  /**
5832
5896
  * Delete all relation attributes targeting a specific record.
5833
5897
  * Automatically filtered by current tenant context.
@@ -7219,6 +7283,7 @@ interface ObjectSchemaServiceOptions {
7219
7283
  declare class ObjectSchemaService extends BaseService {
7220
7284
  private nativeRegistry;
7221
7285
  private auditService?;
7286
+ private bilateralValidationService;
7222
7287
  constructor(adapter: DatabaseAdapter, nativeRegistry: typeof registry, options?: ObjectSchemaServiceOptions);
7223
7288
  /**
7224
7289
  * Create a new custom object.
@@ -7366,6 +7431,15 @@ declare class ObjectSchemaService extends BaseService {
7366
7431
  * @internal
7367
7432
  */
7368
7433
  private buildObjectDefinition;
7434
+ /**
7435
+ * Enrich bilateral relation attributes that don't own property definitions.
7436
+ * Copies `properties` from the canonical side (the one with `.qualifyWith()`)
7437
+ * and sets `storageOwner: false` so the storage layer knows direction.
7438
+ *
7439
+ * Uses direct DB lookups to avoid circular recursion through `getObjectSchema`.
7440
+ * @internal
7441
+ */
7442
+ private enrichBilateralProperties;
7369
7443
  /**
7370
7444
  * Append system attributes to an ObjectDefinition
7371
7445
  * System attributes are always available on all records (createdAt, updatedAt, createdBy, lastUpdatedBy)
@@ -7487,6 +7561,7 @@ declare class RecordQueryService extends BaseService {
7487
7561
  private schemaService;
7488
7562
  private options?;
7489
7563
  private policyRegistry;
7564
+ private relationPropertiesService;
7490
7565
  constructor(adapter: DatabaseAdapter, schemaService: ObjectSchemaService, options?: RecordQueryServiceOptions | undefined);
7491
7566
  /**
7492
7567
  * List records for an object with pagination, permissions, and policy filtering.
@@ -7541,22 +7616,6 @@ declare class RecordQueryService extends BaseService {
7541
7616
  * Internal search query execution
7542
7617
  */
7543
7618
  private executeSearchQuery;
7544
- /**
7545
- * Include relation properties in records.
7546
- *
7547
- * For each requested relation attribute:
7548
- * - If attribute has properties → Fetch from relation_attributes and return hybrid format
7549
- * - If attribute has NO properties → Return legacy format (string[] or string)
7550
- *
7551
- * Uses batch loading to avoid N+1 queries.
7552
- *
7553
- * @param records - Records to enrich with relation properties
7554
- * @param schema - Object schema
7555
- * @param includes - Array of relation attribute names to include
7556
- * @returns Records enriched with relation properties in hybrid format
7557
- * @private
7558
- */
7559
- private includeRelationsWithProperties;
7560
7619
  }
7561
7620
 
7562
7621
  /**
@@ -7611,6 +7670,7 @@ declare class RecordService extends BaseService {
7611
7670
  private policyRegistry;
7612
7671
  private labelResolver;
7613
7672
  private rollupContext;
7673
+ private bilateralSyncService;
7614
7674
  constructor(adapter: DatabaseAdapter, options?: RecordServiceOptions);
7615
7675
  /**
7616
7676
  * Create a new record with validation
@@ -7693,6 +7753,17 @@ declare class RecordService extends BaseService {
7693
7753
  skipHooks?: boolean;
7694
7754
  hookMetadata?: Record<string, unknown>;
7695
7755
  }): Promise<ObjectRecord>;
7756
+ /**
7757
+ * Enrich relation attributes with their properties (for qualified relations).
7758
+ *
7759
+ * Transforms simple ID arrays into hybrid format { id, props } when properties exist.
7760
+ *
7761
+ * @param record - Record to enrich
7762
+ * @param schema - Object schema
7763
+ * @returns Enriched record with relation properties loaded
7764
+ * @private
7765
+ */
7766
+ private enrichRelationProperties;
7696
7767
  /**
7697
7768
  * Invalidate all caches related to a record (record cache + lists + global search)
7698
7769
  * @private
@@ -8104,6 +8175,172 @@ declare class RecordResolverService extends BaseService {
8104
8175
  createRollupContext(rollupService: RollupService, schemaService: ObjectSchemaService): RollupCascadeContext;
8105
8176
  }
8106
8177
 
8178
+ /**
8179
+ * Normalized relation value format (internal representation)
8180
+ */
8181
+ interface NormalizedRelationItem {
8182
+ id: Uuid;
8183
+ props?: Record<string, unknown>;
8184
+ }
8185
+ /**
8186
+ * Hybrid relation value format (API input)
8187
+ *
8188
+ * Supports both:
8189
+ * - Legacy: string[] (backward compatible, no properties)
8190
+ * - New: Array<{ id, props }> (with properties)
8191
+ */
8192
+ type MultiRelationValue = string[] | NormalizedRelationItem[];
8193
+ /**
8194
+ * Hybrid single relation value format (API input)
8195
+ *
8196
+ * Supports both:
8197
+ * - Legacy: string | null (backward compatible, no properties)
8198
+ * - New: { id, props } | null (with properties)
8199
+ */
8200
+ type SingleRelationValue = string | NormalizedRelationItem | null;
8201
+ /**
8202
+ * Union type for all hybrid relation value formats
8203
+ */
8204
+ type HybridRelationValue = MultiRelationValue | SingleRelationValue;
8205
+ /**
8206
+ * Service for managing properties of qualified relations.
8207
+ *
8208
+ * Handles sync (upsert/delete) and validation of relation properties
8209
+ * stored in the relation_attributes table.
8210
+ *
8211
+ * Supports hybrid format for backward compatibility:
8212
+ * - Legacy: string[] or string (no properties)
8213
+ * - New: Array<{ id, props }> or { id, props } (with properties)
8214
+ *
8215
+ * @example
8216
+ * ```typescript
8217
+ * // Create record with qualified relation (new format)
8218
+ * await recordService.createRecord(objectId, {
8219
+ * companies: [
8220
+ * { id: "company-1", props: { role: "CEO", shares: 1000 } },
8221
+ * { id: "company-2", props: { role: "CTO", shares: 500 } }
8222
+ * ]
8223
+ * });
8224
+ *
8225
+ * // Update with legacy format (still supported)
8226
+ * await recordService.updateRecord(recordId, {
8227
+ * companies: ["company-1", "company-3"]
8228
+ * });
8229
+ * ```
8230
+ */
8231
+ declare class RelationPropertiesService extends BaseService {
8232
+ constructor(adapter: DatabaseAdapter);
8233
+ /**
8234
+ * Get relation properties for a given attribute.
8235
+ *
8236
+ * Supports bidirectional relations: searches for properties in both directions
8237
+ * (forward: from_object/from_id → to_id, and inverse: to_id → from_id).
8238
+ *
8239
+ * This ensures that qualified properties are SHARED between both directions
8240
+ * of a bilateral relation, as they are stored in a single row in relation_attributes.
8241
+ *
8242
+ * @param objectName - Source object name
8243
+ * @param recordId - Source record ID
8244
+ * @param attributeName - Relation attribute name
8245
+ * @param targetIds - Array of target record IDs
8246
+ * @returns Map of target ID → properties
8247
+ *
8248
+ * @example
8249
+ * ```typescript
8250
+ * // Properties stored as: contacts/A/companies → X with { role: "CEO" }
8251
+ *
8252
+ * // Read from Contact A → Company X
8253
+ * const propsFromContact = await service.getRelationProperties(
8254
+ * "contacts", "A", "companies", ["X"]
8255
+ * );
8256
+ * // → Map { "X" => { role: "CEO" } }
8257
+ *
8258
+ * // Read from Company X → Contact A (inverse)
8259
+ * const propsFromCompany = await service.getRelationProperties(
8260
+ * "companies", "X", "contacts", ["A"]
8261
+ * );
8262
+ * // → Map { "A" => { role: "CEO" } } (same properties!)
8263
+ * ```
8264
+ */
8265
+ getRelationProperties(objectName: string, recordId: Uuid, attributeName: string, targetIds: Uuid[]): Promise<Map<Uuid, Record<string, unknown>>>;
8266
+ /**
8267
+ * Batch enrich records with qualified relation properties.
8268
+ *
8269
+ * Detects qualified attributes in the schema and fetches their properties
8270
+ * using batch queries (1 query per qualified attribute, not per record).
8271
+ * Returns records with values in hybrid format `{ id, props }`.
8272
+ *
8273
+ * For bilateral relations, also checks the inverse direction.
8274
+ *
8275
+ * @param records - Records to enrich
8276
+ * @param schema - Object schema
8277
+ * @returns Records with relation values enriched with properties
8278
+ */
8279
+ enrichRecordsBatch(records: ObjectRecord[], schema: ObjectDefinition): Promise<ObjectRecord[]>;
8280
+ /**
8281
+ * Normalize relation values for storage in object_records table.
8282
+ *
8283
+ * Extracts IDs from hybrid format ({ id, props }) and returns legacy format (string[] or string).
8284
+ * This ensures object_records.values only contains IDs, while properties are in relation_attributes.
8285
+ *
8286
+ * @param schema - Object schema
8287
+ * @param data - Record data with hybrid relation values
8288
+ * @returns Data with relation values normalized to ID-only format
8289
+ */
8290
+ normalizeRelationValuesForStorage(schema: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
8291
+ /**
8292
+ * Synchronize relation properties for a given attribute.
8293
+ *
8294
+ * Handles:
8295
+ * - Format normalization (legacy → new)
8296
+ * - Validation of properties
8297
+ * - Upsert for present IDs
8298
+ * - Delete for absent IDs
8299
+ *
8300
+ * @param schema - Object schema
8301
+ * @param recordId - Source record ID
8302
+ * @param attributeName - Relation attribute name
8303
+ * @param relationValue - Relation value (hybrid format)
8304
+ * @param adapter - Database adapter
8305
+ */
8306
+ syncRelationProperties(schema: ObjectDefinition, recordId: Uuid, attributeName: string, relationValue: HybridRelationValue, adapter: DatabaseAdapter): Promise<void>;
8307
+ /**
8308
+ * Validate relation properties against PropertySchema.
8309
+ *
8310
+ * Uses Zod for runtime validation based on PropertyAttribute types.
8311
+ *
8312
+ * @param propertySchema - Schema defining allowed properties
8313
+ * @param properties - Properties to validate
8314
+ * @throws {z.ZodError} if validation fails
8315
+ */
8316
+ validateProperties(propertySchema: PropertySchema, properties: Record<string, unknown>): void;
8317
+ /**
8318
+ * Get PropertySchema for a relation attribute.
8319
+ *
8320
+ * For bilateral relations without .qualifyWith(), returns undefined.
8321
+ * Properties will be stored/retrieved but not validated on the inverse side.
8322
+ */
8323
+ private getPropertySchema;
8324
+ /**
8325
+ * Normalize relation value to unified internal format.
8326
+ *
8327
+ * Converts:
8328
+ * - string[] → Array<{ id, props?: undefined }>
8329
+ * - string → [{ id, props?: undefined }]
8330
+ * - null → []
8331
+ * - Array<{ id, props }> → Array<{ id, props }> (passthrough)
8332
+ * - { id, props } → [{ id, props }] (single to array)
8333
+ */
8334
+ private normalizeRelationValue;
8335
+ /**
8336
+ * Build Zod schema from PropertySchema definition.
8337
+ *
8338
+ * Reuses createFormAttributeValidator() to avoid code duplication with validators.ts.
8339
+ * This validator handles null/undefined values correctly for optional fields.
8340
+ */
8341
+ private buildZodSchema;
8342
+ }
8343
+
8107
8344
  /**
8108
8345
  * Result of relation validation
8109
8346
  */
@@ -8182,6 +8419,11 @@ interface RelationServiceOptions {
8182
8419
  * Required for cached access to records.
8183
8420
  */
8184
8421
  recordResolver: RecordResolverService;
8422
+ /**
8423
+ * Relation properties service for qualified properties.
8424
+ * Optional - if not provided, qualified properties won't be enriched in labels.
8425
+ */
8426
+ relationPropertiesService?: RelationPropertiesService;
8185
8427
  }
8186
8428
  /**
8187
8429
  * Request item for batch relation resolution
@@ -8211,6 +8453,7 @@ declare class RelationService extends BaseService {
8211
8453
  private schemaService;
8212
8454
  private queryService?;
8213
8455
  private recordResolver;
8456
+ private relationPropertiesService?;
8214
8457
  constructor(adapter: DatabaseAdapter, nativeRegistry: typeof registry, options: RelationServiceOptions);
8215
8458
  /**
8216
8459
  * Set the query service after construction.
@@ -8334,6 +8577,10 @@ declare class RelationService extends BaseService {
8334
8577
  /**
8335
8578
  * Resolve the display label for a record.
8336
8579
  * Uses custom template if provided, otherwise falls back to pre-computed label.
8580
+ *
8581
+ * Preserves `{{ props.X }}` tokens for client-side substitution using a sentinel approach:
8582
+ * tokens are replaced with null-byte sentinels before template rendering, then restored after.
8583
+ * This lets `computeLabelWithRelations` resolve target fields while keeping prop placeholders intact.
8337
8584
  */
8338
8585
  private resolveLabel;
8339
8586
  /**
@@ -8348,133 +8595,6 @@ declare class RelationService extends BaseService {
8348
8595
  private fetchAttributeById;
8349
8596
  }
8350
8597
 
8351
- /**
8352
- * Normalized relation value format (internal representation)
8353
- */
8354
- interface NormalizedRelationItem {
8355
- id: Uuid;
8356
- props?: Record<string, unknown>;
8357
- }
8358
- /**
8359
- * Hybrid relation value format (API input)
8360
- *
8361
- * Supports both:
8362
- * - Legacy: string[] (backward compatible, no properties)
8363
- * - New: Array<{ id, props }> (with properties)
8364
- */
8365
- type MultiRelationValue = string[] | NormalizedRelationItem[];
8366
- /**
8367
- * Hybrid single relation value format (API input)
8368
- *
8369
- * Supports both:
8370
- * - Legacy: string | null (backward compatible, no properties)
8371
- * - New: { id, props } | null (with properties)
8372
- */
8373
- type SingleRelationValue = string | NormalizedRelationItem | null;
8374
- /**
8375
- * Union type for all hybrid relation value formats
8376
- */
8377
- type HybridRelationValue = MultiRelationValue | SingleRelationValue;
8378
- /**
8379
- * Service for managing properties of qualified relations.
8380
- *
8381
- * Handles sync (upsert/delete) and validation of relation properties
8382
- * stored in the relation_attributes table.
8383
- *
8384
- * Supports hybrid format for backward compatibility:
8385
- * - Legacy: string[] or string (no properties)
8386
- * - New: Array<{ id, props }> or { id, props } (with properties)
8387
- *
8388
- * @example
8389
- * ```typescript
8390
- * // Create record with qualified relation (new format)
8391
- * await recordService.createRecord(objectId, {
8392
- * companies: [
8393
- * { id: "company-1", props: { role: "CEO", shares: 1000 } },
8394
- * { id: "company-2", props: { role: "CTO", shares: 500 } }
8395
- * ]
8396
- * });
8397
- *
8398
- * // Update with legacy format (still supported)
8399
- * await recordService.updateRecord(recordId, {
8400
- * companies: ["company-1", "company-3"]
8401
- * });
8402
- * ```
8403
- */
8404
- declare class RelationPropertiesService extends BaseService {
8405
- constructor(adapter: DatabaseAdapter);
8406
- /**
8407
- * Normalize relation values for storage in object_records table.
8408
- *
8409
- * Extracts IDs from hybrid format ({ id, props }) and returns legacy format (string[] or string).
8410
- * This ensures object_records.values only contains IDs, while properties are in relation_attributes.
8411
- *
8412
- * @param schema - Object schema
8413
- * @param data - Record data with hybrid relation values
8414
- * @returns Data with relation values normalized to ID-only format
8415
- */
8416
- normalizeRelationValuesForStorage(schema: ObjectDefinition, data: Record<string, unknown>): Record<string, unknown>;
8417
- /**
8418
- * Synchronize relation properties for a given attribute.
8419
- *
8420
- * Handles:
8421
- * - Format normalization (legacy → new)
8422
- * - Validation of properties
8423
- * - Upsert for present IDs
8424
- * - Delete for absent IDs
8425
- *
8426
- * @param schema - Object schema
8427
- * @param recordId - Source record ID
8428
- * @param attributeName - Relation attribute name
8429
- * @param relationValue - Relation value (hybrid format)
8430
- * @param adapter - Database adapter
8431
- */
8432
- syncRelationProperties(schema: ObjectDefinition, recordId: Uuid, attributeName: string, relationValue: HybridRelationValue, adapter: DatabaseAdapter): Promise<void>;
8433
- /**
8434
- * Validate relation properties against PropertySchema.
8435
- *
8436
- * Uses Zod for runtime validation based on PropertyDefinition types.
8437
- *
8438
- * @param propertySchema - Schema defining allowed properties
8439
- * @param properties - Properties to validate
8440
- * @throws {z.ZodError} if validation fails
8441
- */
8442
- validateProperties(propertySchema: PropertySchema, properties: Record<string, unknown>): void;
8443
- /**
8444
- * Normalize relation value to unified internal format.
8445
- *
8446
- * Converts:
8447
- * - string[] → Array<{ id, props?: undefined }>
8448
- * - string → [{ id, props?: undefined }]
8449
- * - null → []
8450
- * - Array<{ id, props }> → Array<{ id, props }> (passthrough)
8451
- * - { id, props } → [{ id, props }] (single to array)
8452
- *
8453
- * @param value - Relation value in hybrid format
8454
- * @returns Normalized array of relation items
8455
- * @private
8456
- */
8457
- private normalizeRelationValue;
8458
- /**
8459
- * Build Zod schema from PropertySchema definition.
8460
- *
8461
- * Dynamically generates validation schema based on PropertyDefinition types.
8462
- *
8463
- * @param propertySchema - PropertySchema with definitions
8464
- * @returns Zod schema for validation
8465
- * @private
8466
- */
8467
- private buildZodSchema;
8468
- /**
8469
- * Build Zod schema for a single property field.
8470
- *
8471
- * @param def - PropertyDefinition
8472
- * @returns Zod schema for the field
8473
- * @private
8474
- */
8475
- private buildFieldSchema;
8476
- }
8477
-
8478
8598
  /**
8479
8599
  * Resolved relation values for a record
8480
8600
  * Maps relation attribute name to the resolved record's values
@@ -10196,25 +10316,6 @@ declare function createMockAdapter(): DatabaseAdapter & {
10196
10316
  reset(): void;
10197
10317
  };
10198
10318
 
10199
- /**
10200
- * Policy for the native "notes" object.
10201
- *
10202
- * Enforces visibility rules:
10203
- * - **list/search**: Injects filter to show only accessible notes
10204
- * - **get**: Blocks access to private notes from other users
10205
- * - **update**: Only author can modify private notes; shared notes can be modified by anyone
10206
- * - **delete**: Only author can delete any note
10207
- *
10208
- * This policy uses `record.createdBy` (system field) instead of `values.author`
10209
- * for better performance (SQL column vs JSONB).
10210
- *
10211
- * NOTE: The list filter is a best-effort optimization. The security is enforced
10212
- * by canAccessRecord which is called on each record returned by the query.
10213
- * This ensures no private notes from other users are ever exposed, even if
10214
- * the database adapter doesn't support complex OR filters.
10215
- */
10216
- declare const notesPolicy: RecordPolicy;
10217
-
10218
10319
  /**
10219
10320
  * Document Generation Service
10220
10321
  *
@@ -12610,4 +12711,4 @@ interface FullSyncOptions extends SyncOptions, ViewSyncOptions {
12610
12711
  */
12611
12712
  declare function syncAll(adapter: DatabaseAdapter, objectRegistry: typeof registry, nativeViewRegistry: typeof viewRegistry, options?: FullSyncOptions): Promise<FullSyncResult>;
12612
12713
 
12613
- export { type AIToolCallStatus as $, type AttributeGroupField as A, type BoundingBox as B, type CreateMode as C, type DetailViewLayout as D, type CreateSignatureInput as E, type Field as F, type Group as G, type SignerRequest as H, type InferAttributeValue as I, type SignaturePosition as J, type SignatureRequestResult as K, type ListViewDefinition as L, type SignatureStatusResult as M, type SignerStatus as N, type ObjectAction as O, type SignatureStatus as P, type IdentityVerificationAdapter as Q, type VerifyInput as R, type SystemResource as S, type TableTab as T, type VerificationResult as U, type ViewType as V, type WorkflowTheme as W, type DocumentData as X, type VerificationCheck as Y, type AIMessageRole as Z, type AIThinkingLevel as _, type SystemAction as a, type FileVisibility as a$, type AIToolCall as a0, type AIChatMessagePartType as a1, type TextPartData as a2, type ToolPartData as a3, type ThinkingPartData as a4, type ReasoningPartData as a5, type AIChatMessagePart as a6, type AIChatMessage as a7, type AIQuestionType as a8, type AIQuestionOption as a9, type TemplateSource as aA, type DocumentGenerationTemplate as aB, type CreateDocumentGenerationTemplate as aC, type UpdateDocumentGenerationTemplate as aD, type PendingDocumentRequest as aE, type DocumentSlotDefinition as aF, type DocumentAutoProcessing as aG, type ExtractionMapping as aH, type ExtractionField as aI, type Document as aJ, type DocumentStatus as aK, type DocumentSlot as aL, type SlotStatus as aM, type ProcessingJob as aN, type ProcessingJobType as aO, type ProcessingJobStatus as aP, type CreateDocument as aQ, type UpdateDocument as aR, type CreateDocumentTemplate as aS, type UpdateDocumentTemplate as aT, type CreateDocumentSlot as aU, type UpdateDocumentSlot as aV, type CreateProcessingJob as aW, type UpdateProcessingJob as aX, type DocumentListOptions as aY, type DocumentTemplateListOptions as aZ, type StorageProvider as a_, type AIQuestion as aa, type AIQuestionAnswer as ab, type AIBatchQuestionOption as ac, type AIBatchQuestion as ad, type AIBatchQuestionAnswer as ae, type AITodoStatus as af, type AITodoItem as ag, type AITodoList as ah, type AIMessageAttachment as ai, type AIConversation as aj, type AIMessage as ak, type AIToolCallRecord as al, type AIUserMemory as am, type AIUsageMetrics as an, type AIProviderMetrics as ao, type CreateAIMessageInput as ap, type AuditResourceType as aq, type AuditAction as ar, type AuditActorType as as, type AuditChange as at, type AuditLogEntry as au, type CreateAuditLogInput as av, type AuditListOptions as aw, type AuditServiceOptions as ax, type VariableMapping as ay, type PdfTemplateField as az, type InverseTableTab as b, type ExtractObjectRecordWithCustom as b$, type File as b0, type CreateFile as b1, type UpdateFile as b2, type TextFilterOperator as b3, type NumberFilterOperator as b4, type CheckboxFilterOperator as b5, type DateFilterOperator as b6, type SelectFilterOperator as b7, type MultiselectFilterOperator as b8, type RelationFilterOperator as b9, type GeocodingAutocompleteParams as bA, type ReverseGeocodingParams as bB, type GeocodingParams as bC, type GeocodingAdapter as bD, NoopGeocodingAdapter as bE, type AttributeSchema as bF, type InferRecordFromSchema as bG, type InferRecordWithRequirements as bH, type TypedAttribute as bI, type AttributeMap as bJ, type AddAttribute as bK, type InferRecord as bL, type InferRecordInput as bM, type InferRecordUpdate as bN, type CustomAttributeValue as bO, type WithCustomAttributes as bP, type RecordMetadata as bQ, type SystemFields as bR, type ExtractRecord as bS, type ExtractRecordStrict as bT, type ExtractRecordInput as bU, type ExtractRecordInputStrict as bV, type ExtractRecordUpdate as bW, type ExtractRecordUpdateStrict as bX, type ExtractAttributes as bY, type TypedObjectRecord as bZ, type ExtractObjectRecord as b_, type FilterOperator as ba, type RelativeDateValue as bb, type CurrencyFilterValue as bc, type PhoneFilterValue as bd, type FilterValue as be, type FilterRule as bf, type ExtendedFilterRule as bg, type FilterCombinator as bh, type FilterGroup as bi, type AdvancedFilterState as bj, type SortDirection as bk, type QueryState as bl, OPERATORS_BY_TYPE as bm, type NoValueOperator as bn, NO_VALUE_OPERATORS as bo, isNoValueOperator as bp, type FlowSlot as bq, type FlowRowField as br, type FlowPage as bs, type FlowRelation as bt, type FlowStatus as bu, type FlowDefinition as bv, isFlowDefinition as bw, isFlowPublished as bx, isSystemFlow as by, type GeocodingSuggestion as bz, type DetailViewDefinition as c, isAdvancedFormNode as c$, type PermissionScope as c0, type Role as c1, type Permission as c2, type UserRoleAssignment as c3, type EffectivePermissions as c4, type ObjectPermissions as c5, type SystemPermissions as c6, type CreateRoleInput as c7, type UpdateRoleInput as c8, type CreatePermissionInput as c9, type CalendarViewDefinition as cA, type TimelineViewDefinition as cB, type GalleryViewDefinition as cC, type ConfigOverrides as cD, type ViewOverlay as cE, isDetailView as cF, isListView as cG, isCalendarView as cH, isTimelineView as cI, isGalleryView as cJ, isFormTab as cK, isTableTab as cL, isDirectTableTab as cM, isInverseTableTab as cN, isCustomTab as cO, isActivityTab as cP, isNotesTab as cQ, isFlowsTab as cR, isDocumentsTab as cS, type ConditionNode as cT, type DocumentNode as cU, type EndNode as cV, type FormFieldRef as cW, type FormNode as cX, type StartNode as cY, type WorkflowNodeType as cZ, getNodeOutputs as c_, type AssignRoleInput as ca, type PolicyContext as cb, type RecordPolicy as cc, PolicyViolationError as cd, type UserRole as ce, type UserStatus as cf, type UserProfile as cg, type CreateUserProfile as ch, type UpdateUserProfile as ci, type InviteUserInput as cj, type TabType as ck, type FormDensity as cl, type FormTab as cm, type CustomTab as cn, type ActivityTab as co, type NotesTab as cp, type FlowsTab as cq, type DocumentsTab as cr, type ListViewLayout as cs, type ViewLayout as ct, type ViewTab as cu, type DetailViewConfig as cv, type CalendarViewConfig as cw, type TimelineViewConfig as cx, type GalleryViewConfig as cy, type ViewConfig as cz, type InstanceStatus as d, viewRegistry as d$, isConditionNode as d0, isDocumentNode as d1, isEndNode as d2, isFormNode as d3, isSimpleFormNode as d4, isStartNode as d5, type ConditionOperator as d6, and as d7, eq as d8, inValues as d9, isInvitationExpired as dA, isInvitationValid as dB, type CreateGrantInput as dC, type WorkflowAccessGrant as dD, canAccessNode as dE, isGrantExpired as dF, isGrantRevoked as dG, isGrantValid as dH, isTokenRevoked as dI, type GeneratedDocument as dJ, type WorkflowExecutionContext as dK, createEmptyContext as dL, getContextValue as dM, setContextValue as dN, type FormContextResponse as dO, type FormFieldContext as dP, type FormFieldRow as dQ, type FormNodeInfo as dR, type ReadOnlyReason as dS, type WorkflowAccessMode as dT, type ThemeColors as dU, type ThemeLogo as dV, type ThemeTypography as dW, DEFAULT_THEME as dX, generateCssVariables as dY, mergeWithDefaults as dZ, registry as d_, isConditionGroup as da, isConditionRule as db, neq as dc, or as dd, type CanvasViewport as de, type NodePosition as df, type WorkflowLayout as dg, type WorkflowSlot as dh, type WorkflowStatus as di, isSystemWorkflow as dj, isWorkflowDefinition as dk, isWorkflowPublished as dl, type PendingAction as dm, type WorkflowError as dn, type WorkflowInstance as dp, type WorkflowTransition as dq, canResumeInstance as dr, createStartTransition as ds, isInstanceTerminal as dt, isInstanceWaiting as du, type CreateInvitationInput as dv, type CreateInvitationResult as dw, type InvitationStatus as dx, type WorkflowInvitation as dy, isInvitationAccepted as dz, type Tab as e, runWithContext as e$, type ViewOverlaysRepository as e0, type RelationAttributeInput as e1, type RelationAttributeRow as e2, type RelationAttributesRepository as e3, type DatabaseAdapter as e4, WorkflowJwtService as e5, type JwtVerificationResult as e6, type MagicLinkPayload as e7, type WorkflowAccessPayload as e8, type WorkflowJwtConfig as e9, type EvaluationResult as eA, type EvaluationTrace as eB, evaluateCondition as eC, evaluate as eD, evaluateWithTrace as eE, TenantContextError as eF, FeatureFlagsContextError as eG, getFeatureFlags as eH, getFeatureValue as eI, hasFeatureFlagsContext as eJ, isFeatureEnabled as eK, runWithFeatureFlags as eL, tryGetFeatureValue as eM, withFeatureFlags as eN, type FeatureFlagsContext as eO, addSchemaToContext as eP, getSchemaByNameFromContext as eQ, getSchemaContext as eR, getSchemaFromContext as eS, hasSchemaContext as eT, runWithMergedSchemaContext as eU, runWithSchemaContext as eV, type SchemaContext as eW, getContext as eX, getTenantId as eY, getUserId as eZ, hasContext as e_, type WorkflowJwtPayload as ea, type CacheKeyType as eb, hashOptions as ec, type CacheAdapter as ed, type CacheOptions as ee, cacheKeys as ef, cacheTtl as eg, defaultTtl as eh, NoopCacheAdapter as ei, type FetchResult as ej, type FormattedRecord as ek, type GroupedFetchResult as el, type InsertOptions as em, type QueryBuilderState as en, type RegistryMap as eo, type RegistryObjectNames as ep, type ShortcutOperator as eq, createDefaultState as er, formatRecord as es, formatRecords as et, QueryMultipleResultsError as eu, QueryNoResultError as ev, SHORTCUT_TO_FILTER_OPERATOR as ew, createQueryBuilder as ex, QueryBuilder as ey, type QueryBuilderOptions as ez, type FilterState as f, type AIConversationsRepository as f$, withTenantContext as f0, type TenantContext as f1, createDefaultExecutorRegistry as f2, getDefaultExecutorRegistry as f3, type ExecutorCompleteResult as f4, type ExecutorContext as f5, type ExecutorErrorResult as f6, type ExecutorResult as f7, type ExecutorSuccessResult as f8, type ExecutorWaitResult as f9, getTargetAttributeName as fA, InvalidPathError as fB, MaxDepthExceededError as fC, parsePath as fD, pathHasManyCardinality as fE, validatePath as fF, type PathCardinality as fG, type PathSegment as fH, type PathSegmentType as fI, type SchemaResolver as fJ, resolveMultiplePaths as fK, resolveSingleValue as fL, traversePath as fM, type TraversalOptions as fN, type TraversalResult as fO, type AttributeChange as fP, type HookContext as fQ, type HookDefinition as fR, type HookHandler as fS, type HookType as fT, NoopHookRegistry as fU, type HookRegistry as fV, createMockAdapter as fW, type MockStores as fX, defaultPolicyRegistry as fY, PolicyRegistry as fZ, notesPolicy as f_, type NodeExecutor as fa, complete as fb, error as fc, ExecutorRegistry as fd, success as fe, wait as ff, ConditionExecutor as fg, DocumentExecutor as fh, EndExecutor as fi, FormExecutor as fj, StartExecutor as fk, evaluateFormula as fl, evaluateFormulaAttribute as fm, evaluateFormulaAttributeWithRelations as fn, evaluateFormulaWithRelations as fo, evaluateFormulaWithResult as fp, extractFormulaVariables as fq, extractRelationNames as fr, extractRelationReferences as fs, flattenRelationsForEval as ft, formatFormulaResult as fu, hasRelationReferences as fv, validateFormulaExpression as fw, type FormulaResult as fx, getPathDepth as fy, getRelationPath as fz, type SortRule as g, checkRecordModifyOrThrow as g$, type AIUsageMetricsRepository as g0, type AIUserMemoryRepository as g1, type AttributesRepository as g2, type AuditRepository as g3, type DocumentGenerationTemplateListOptions as g4, type DocumentGenerationTemplatesRepository as g5, type DocumentJobsRepository as g6, type DocumentSlotsRepository as g7, type DocumentsRepository as g8, type DocumentTemplatesRepository as g9, type RelationValidationResult as gA, type RelationValidationError as gB, type RelationOption as gC, type RelationOptionsResponse as gD, type GetRelationOptionsParams as gE, type RelationServiceOptions as gF, type ResolveIdsBatchRequest as gG, type ResolveIdsBatchResponse as gH, RelationService as gI, type MultiRelationValue as gJ, type SingleRelationValue as gK, type HybridRelationValue as gL, RelationPropertiesService as gM, RecordResolverService as gN, type ResolvedRelations as gO, type FormulaResolverServiceOptions as gP, FormulaResolverService as gQ, type RollupResult as gR, type RollupServiceOptions as gS, RollupService as gT, type RollupSchedulerOptions as gU, RollupScheduler as gV, applyDefaultValues as gW, checkPermission as gX, getPolicy as gY, buildPolicyContext as gZ, checkRecordAccess as g_, type FilesRepository as ga, type ObjectRecordsRepository as gb, type ObjectsRepository as gc, type PermissionsRepository as gd, type UserProfilesRepository as ge, type ViewsRepository as gf, type WorkflowAccessGrantsRepository as gg, type WorkflowInstancesRepository as gh, type WorkflowInvitationsRepository as gi, type WorkflowsRepository as gj, BaseService as gk, BaseRepository as gl, type SchemaContextAware as gm, SchemaContextAwareRepository as gn, type CreateCustomObjectInput as go, type AddAttributeInput as gp, type UpdateObjectInput as gq, type ObjectSchemaServiceOptions as gr, ObjectSchemaService as gs, type RecordServiceOptions as gt, RecordService as gu, type RecordQueryServiceOptions as gv, type QueryOptions as gw, type SearchQueryOptions as gx, type QueryResult as gy, RecordQueryService as gz, type DirectTableTab as h, GlobalSearchService as h$, checkRecordDeleteOrThrow as h0, checkSharedObjectWriteAccess as h1, computeLabel as h2, type LabelResolver as h3, enrichWithFormulas as h4, enrichRecordsWithFormulas as h5, createContextForCreate as h6, createContextForUpdate as h7, createContextForDelete as h8, createContextForRestore as h9, type UserValidationResult as hA, type UserValidationError as hB, UserService as hC, type UserProfileServiceOptions as hD, UserProfileService as hE, AuditService as hF, buildAuditChanges as hG, DocumentGenerationTemplateNotFoundError as hH, DocumentGenerationNotConfiguredError as hI, DocumentGenerationService as hJ, type DocumentProcessingConfig as hK, DocumentProcessingService as hL, type RenderDocumentInput as hM, type DocumentRendererOptions as hN, type RenderDocumentResult as hO, DocumentRenderError as hP, StorageDownloadNotSupportedError as hQ, DocumentRendererService as hR, DocumentTemplateService as hS, type RecordDocumentsResult as hT, type CreateRecordDocumentInput as hU, type CreateRecordDocumentResult as hV, type DocumentServiceOptions as hW, DocumentService as hX, type FileServiceOptions as hY, FileService as hZ, GeocodingService as h_, recalculateParentRollups as ha, type RollupCascadeContext as hb, type DocumentProcessingHookOptions as hc, DocumentProcessingHook as hd, GrantNotFoundError as he, GrantExpiredError as hf, GrantRevokedError as hg, TokenRevokedError as hh, type GrantServiceConfig as hi, type CreateGrantResult as hj, WorkflowAccessGrantService as hk, type StartWorkflowInput as hl, type ResumeWorkflowInput as hm, type WorkflowInstanceServiceOptions as hn, WorkflowInstanceService as ho, type InvitationServiceConfig as hp, InvitationNotFoundError as hq, InvitationExpiredError as hr, InvitationAlreadyAcceptedError as hs, InvitationRevokedError as ht, WorkflowInvitationService as hu, WorkflowRelationService as hv, type CreateWorkflowInput as hw, type UpdateWorkflowInput as hx, type WorkflowServiceOptions as hy, WorkflowService as hz, type WorkflowConfig as i, type UpdateDBWorkflowInvitation as i$, type PermissionServiceOptions as i0, PermissionService as i1, type CreateViewInput as i2, type UpdateViewInput as i3, type GetViewsOptions as i4, type GetViewOptions as i5, ViewService as i6, type FileContent as i7, type StorageUploadInput as i8, type StorageUploadResult as i9, type DBAttribute as iA, type CreateDBAttribute as iB, type UpdateDBAttribute as iC, type UpsertDBAttribute as iD, type CreateObjectRecord as iE, type ListOptions as iF, type SearchOptions as iG, type GlobalSearchOptions as iH, type GlobalSearchGroupedOptions as iI, type GlobalSearchResultItem as iJ, type GlobalSearchGroupedResult as iK, type FileListOptions as iL, type DBView as iM, type CreateDBView as iN, type UpdateDBView as iO, type UpsertDBView as iP, type DBViewOverlay as iQ, type CreateDBViewOverlay as iR, type UpdateDBViewOverlay as iS, type DBWorkflow as iT, type CreateDBWorkflow as iU, type UpdateDBWorkflow as iV, type DBWorkflowInstance as iW, type CreateDBWorkflowInstance as iX, type UpdateDBWorkflowInstance as iY, type DBWorkflowInvitation as iZ, type CreateDBWorkflowInvitation as i_, type SignedUrlOptions as ia, type StorageAdapter as ib, type UploadFileInput as ic, type SyncResult as id, type SyncOptions as ie, syncNativeObjects as ig, verifyNativeObjectsSync as ih, getSyncPreview as ii, type FullSyncResult as ij, type FullSyncOptions as ik, syncAll as il, DEFAULT_LABEL_FALLBACK as im, renderLabelExpression as io, isLabelExpression as ip, extractAttributeNames as iq, enrichValuesForDisplay as ir, enrichValuesWithSelectLabels as is, extractRelationIds as it, type RelationLabelResolver as iu, computeLabelWithRelations as iv, type DBObject as iw, type CreateDBObject as ix, type UpdateDBObject as iy, type UpsertDBObject as iz, type SlotMode as j, type DBWorkflowAccessGrant as j0, type CreateDBWorkflowAccessGrant as j1, type UpdateDBWorkflowAccessGrant as j2, type OperationResult as j3, type ViewSyncResult as j4, type ViewSyncLogger as j5, type ViewSyncOptions as j6, seedRegistryViews as j7, syncNativeViews as j8, verifyRegistryViewsSeeded as j9, verifyNativeViewsSync as ja, getViewSeedPreview as jb, getViewSyncPreview as jc, type ConditionGroup as k, type ConditionRule as l, type WorkflowNode as m, type WorkflowDefinition as n, type FlowRow as o, type ListViewConfig as p, type ListViewTab as q, type ViewDefinition as r, type DocumentTemplate as s, type OcrAdapter as t, type OcrInput as u, type OcrOptions as v, type OcrResult as w, type OcrPage as x, type OcrTextBlock as y, type SignatureAdapter as z };
12714
+ export { type AIToolCall as $, type AttributeGroupField as A, type BoundingBox as B, type CreateMode as C, type DetailViewLayout as D, type SignerRequest as E, type Field as F, type Group as G, type SignaturePosition as H, type InferAttributeValue as I, type SignatureRequestResult as J, type SignatureStatusResult as K, type ListViewDefinition as L, type SignerStatus as M, type SignatureStatus as N, type ObjectAction as O, type IdentityVerificationAdapter as P, type VerifyInput as Q, type VerificationResult as R, type SystemResource as S, type Tab as T, type DocumentData as U, type ViewType as V, type WorkflowTheme as W, type VerificationCheck as X, type AIMessageRole as Y, type AIThinkingLevel as Z, type AIToolCallStatus as _, type SystemAction as a, type File as a$, type AIChatMessagePartType as a0, type TextPartData as a1, type ToolPartData as a2, type ThinkingPartData as a3, type ReasoningPartData as a4, type AIChatMessagePart as a5, type AIChatMessage as a6, type AIQuestionType as a7, type AIQuestionOption as a8, type AIQuestion as a9, type DocumentGenerationTemplate as aA, type CreateDocumentGenerationTemplate as aB, type UpdateDocumentGenerationTemplate as aC, type PendingDocumentRequest as aD, type DocumentSlotDefinition as aE, type DocumentAutoProcessing as aF, type ExtractionMapping as aG, type ExtractionField as aH, type Document as aI, type DocumentStatus as aJ, type DocumentSlot as aK, type SlotStatus as aL, type ProcessingJob as aM, type ProcessingJobType as aN, type ProcessingJobStatus as aO, type CreateDocument as aP, type UpdateDocument as aQ, type CreateDocumentTemplate as aR, type UpdateDocumentTemplate as aS, type CreateDocumentSlot as aT, type UpdateDocumentSlot as aU, type CreateProcessingJob as aV, type UpdateProcessingJob as aW, type DocumentListOptions as aX, type DocumentTemplateListOptions as aY, type StorageProvider as aZ, type FileVisibility as a_, type AIQuestionAnswer as aa, type AIBatchQuestionOption as ab, type AIBatchQuestion as ac, type AIBatchQuestionAnswer as ad, type AITodoStatus as ae, type AITodoItem as af, type AITodoList as ag, type AIMessageAttachment as ah, type AIConversation as ai, type AIMessage as aj, type AIToolCallRecord as ak, type AIUserMemory as al, type AIUsageMetrics as am, type AIProviderMetrics as an, type CreateAIMessageInput as ao, type AuditResourceType as ap, type AuditAction as aq, type AuditActorType as ar, type AuditChange as as, type AuditLogEntry as at, type CreateAuditLogInput as au, type AuditListOptions as av, type AuditServiceOptions as aw, type VariableMapping as ax, type PdfTemplateField as ay, type TemplateSource as az, type SidePanelConfig as b, type PermissionScope as b$, type CreateFile as b0, type UpdateFile as b1, type TextFilterOperator as b2, type NumberFilterOperator as b3, type CheckboxFilterOperator as b4, type DateFilterOperator as b5, type SelectFilterOperator as b6, type MultiselectFilterOperator as b7, type RelationFilterOperator as b8, type FilterOperator as b9, type ReverseGeocodingParams as bA, type GeocodingParams as bB, type GeocodingAdapter as bC, NoopGeocodingAdapter as bD, type AttributeSchema as bE, type InferRecordFromSchema as bF, type InferRecordWithRequirements as bG, type TypedAttribute as bH, type AttributeMap as bI, type AddAttribute as bJ, type InferRecord as bK, type InferRecordInput as bL, type InferRecordUpdate as bM, type CustomAttributeValue as bN, type WithCustomAttributes as bO, type RecordMetadata as bP, type SystemFields as bQ, type ExtractRecord as bR, type ExtractRecordStrict as bS, type ExtractRecordInput as bT, type ExtractRecordInputStrict as bU, type ExtractRecordUpdate as bV, type ExtractRecordUpdateStrict as bW, type ExtractAttributes as bX, type TypedObjectRecord as bY, type ExtractObjectRecord as bZ, type ExtractObjectRecordWithCustom as b_, type RelativeDateValue as ba, type CurrencyFilterValue as bb, type PhoneFilterValue as bc, type FilterValue as bd, type FilterRule as be, type ExtendedFilterRule as bf, type FilterCombinator as bg, type FilterGroup as bh, type AdvancedFilterState as bi, type SortDirection as bj, type QueryState as bk, OPERATORS_BY_TYPE as bl, type NoValueOperator as bm, NO_VALUE_OPERATORS as bn, isNoValueOperator as bo, type FlowSlot as bp, type FlowRowField as bq, type FlowPage as br, type FlowRelation as bs, type FlowStatus as bt, type FlowDefinition as bu, isFlowDefinition as bv, isFlowPublished as bw, isSystemFlow as bx, type GeocodingSuggestion as by, type GeocodingAutocompleteParams as bz, type DetailViewDefinition as c, isAdvancedFormNode as c$, type Role as c0, type Permission as c1, type UserRoleAssignment as c2, type EffectivePermissions as c3, type ObjectPermissions as c4, type SystemPermissions as c5, type CreateRoleInput as c6, type UpdateRoleInput as c7, type CreatePermissionInput as c8, type AssignRoleInput as c9, type CalendarViewDefinition as cA, type TimelineViewDefinition as cB, type GalleryViewDefinition as cC, type ConfigOverrides as cD, type ViewOverlay as cE, isDetailView as cF, isListView as cG, isCalendarView as cH, isTimelineView as cI, isGalleryView as cJ, isFormTab as cK, isTableTab as cL, isRelationSourceTab as cM, isInverseSourceTab as cN, isCustomTab as cO, isActivityTab as cP, isRichtextTab as cQ, isFlowsTab as cR, isDocumentsTab as cS, type ConditionNode as cT, type DocumentNode as cU, type EndNode as cV, type FormFieldRef as cW, type FormNode as cX, type StartNode as cY, type WorkflowNodeType as cZ, getNodeOutputs as c_, type PolicyContext as ca, type RecordPolicy as cb, PolicyViolationError as cc, type UserRole as cd, type UserStatus as ce, type UserProfile as cf, type CreateUserProfile as cg, type UpdateUserProfile as ch, type InviteUserInput as ci, type TabType as cj, type FormDensity as ck, type FormTab as cl, type RelationSource as cm, type InverseSource as cn, type TableSource as co, type CustomTab as cp, type ActivityTab as cq, type RichtextTab as cr, type FlowsTab as cs, type DocumentsTab as ct, type ListViewLayout as cu, type DetailViewConfig as cv, type CalendarViewConfig as cw, type TimelineViewConfig as cx, type GalleryViewConfig as cy, type ViewConfig as cz, type InstanceStatus as d, viewRegistry as d$, isConditionNode as d0, isDocumentNode as d1, isEndNode as d2, isFormNode as d3, isSimpleFormNode as d4, isStartNode as d5, type ConditionOperator as d6, and as d7, eq as d8, inValues as d9, isInvitationExpired as dA, isInvitationValid as dB, type CreateGrantInput as dC, type WorkflowAccessGrant as dD, canAccessNode as dE, isGrantExpired as dF, isGrantRevoked as dG, isGrantValid as dH, isTokenRevoked as dI, type GeneratedDocument as dJ, type WorkflowExecutionContext as dK, createEmptyContext as dL, getContextValue as dM, setContextValue as dN, type FormContextResponse as dO, type FormFieldContext as dP, type FormFieldRow as dQ, type FormNodeInfo as dR, type ReadOnlyReason as dS, type WorkflowAccessMode as dT, type ThemeColors as dU, type ThemeLogo as dV, type ThemeTypography as dW, DEFAULT_THEME as dX, generateCssVariables as dY, mergeWithDefaults as dZ, registry as d_, isConditionGroup as da, isConditionRule as db, neq as dc, or as dd, type CanvasViewport as de, type NodePosition as df, type WorkflowLayout as dg, type WorkflowSlot as dh, type WorkflowStatus as di, isSystemWorkflow as dj, isWorkflowDefinition as dk, isWorkflowPublished as dl, type PendingAction as dm, type WorkflowError as dn, type WorkflowInstance as dp, type WorkflowTransition as dq, canResumeInstance as dr, createStartTransition as ds, isInstanceTerminal as dt, isInstanceWaiting as du, type CreateInvitationInput as dv, type CreateInvitationResult as dw, type InvitationStatus as dx, type WorkflowInvitation as dy, isInvitationAccepted as dz, type TableTab as e, runWithContext as e$, type ViewOverlaysRepository as e0, type RelationAttributeInput as e1, type RelationAttributeRow as e2, type RelationAttributesRepository as e3, type DatabaseAdapter as e4, WorkflowJwtService as e5, type JwtVerificationResult as e6, type MagicLinkPayload as e7, type WorkflowAccessPayload as e8, type WorkflowJwtConfig as e9, type EvaluationResult as eA, type EvaluationTrace as eB, evaluateCondition as eC, evaluate as eD, evaluateWithTrace as eE, TenantContextError as eF, FeatureFlagsContextError as eG, getFeatureFlags as eH, getFeatureValue as eI, hasFeatureFlagsContext as eJ, isFeatureEnabled as eK, runWithFeatureFlags as eL, tryGetFeatureValue as eM, withFeatureFlags as eN, type FeatureFlagsContext as eO, addSchemaToContext as eP, getSchemaByNameFromContext as eQ, getSchemaContext as eR, getSchemaFromContext as eS, hasSchemaContext as eT, runWithMergedSchemaContext as eU, runWithSchemaContext as eV, type SchemaContext as eW, getContext as eX, getTenantId as eY, getUserId as eZ, hasContext as e_, type WorkflowJwtPayload as ea, type CacheKeyType as eb, hashOptions as ec, type CacheAdapter as ed, type CacheOptions as ee, cacheKeys as ef, cacheTtl as eg, defaultTtl as eh, NoopCacheAdapter as ei, type FetchResult as ej, type FormattedRecord as ek, type GroupedFetchResult as el, type InsertOptions as em, type QueryBuilderState as en, type RegistryMap as eo, type RegistryObjectNames as ep, type ShortcutOperator as eq, createDefaultState as er, formatRecord as es, formatRecords as et, QueryMultipleResultsError as eu, QueryNoResultError as ev, SHORTCUT_TO_FILTER_OPERATOR as ew, createQueryBuilder as ex, QueryBuilder as ey, type QueryBuilderOptions as ez, type FilterState as f, type AIUsageMetricsRepository as f$, withTenantContext as f0, type TenantContext as f1, createDefaultExecutorRegistry as f2, getDefaultExecutorRegistry as f3, type ExecutorCompleteResult as f4, type ExecutorContext as f5, type ExecutorErrorResult as f6, type ExecutorResult as f7, type ExecutorSuccessResult as f8, type ExecutorWaitResult as f9, getTargetAttributeName as fA, InvalidPathError as fB, MaxDepthExceededError as fC, parsePath as fD, pathHasManyCardinality as fE, validatePath as fF, type PathCardinality as fG, type PathSegment as fH, type PathSegmentType as fI, type SchemaResolver as fJ, resolveMultiplePaths as fK, resolveSingleValue as fL, traversePath as fM, type TraversalOptions as fN, type TraversalResult as fO, type AttributeChange as fP, type HookContext as fQ, type HookDefinition as fR, type HookHandler as fS, type HookType as fT, NoopHookRegistry as fU, type HookRegistry as fV, createMockAdapter as fW, type MockStores as fX, defaultPolicyRegistry as fY, PolicyRegistry as fZ, type AIConversationsRepository as f_, type NodeExecutor as fa, complete as fb, error as fc, ExecutorRegistry as fd, success as fe, wait as ff, ConditionExecutor as fg, DocumentExecutor as fh, EndExecutor as fi, FormExecutor as fj, StartExecutor as fk, evaluateFormula as fl, evaluateFormulaAttribute as fm, evaluateFormulaAttributeWithRelations as fn, evaluateFormulaWithRelations as fo, evaluateFormulaWithResult as fp, extractFormulaVariables as fq, extractRelationNames as fr, extractRelationReferences as fs, flattenRelationsForEval as ft, formatFormulaResult as fu, hasRelationReferences as fv, validateFormulaExpression as fw, type FormulaResult as fx, getPathDepth as fy, getRelationPath as fz, type SortRule as g, checkRecordDeleteOrThrow as g$, type AIUserMemoryRepository as g0, type AttributesRepository as g1, type AuditRepository as g2, type DocumentGenerationTemplateListOptions as g3, type DocumentGenerationTemplatesRepository as g4, type DocumentJobsRepository as g5, type DocumentSlotsRepository as g6, type DocumentsRepository as g7, type DocumentTemplatesRepository as g8, type FilesRepository as g9, type RelationValidationError as gA, type RelationOption as gB, type RelationOptionsResponse as gC, type GetRelationOptionsParams as gD, type RelationServiceOptions as gE, type ResolveIdsBatchRequest as gF, type ResolveIdsBatchResponse as gG, RelationService as gH, type MultiRelationValue as gI, type SingleRelationValue as gJ, type HybridRelationValue as gK, RelationPropertiesService as gL, RecordResolverService as gM, type ResolvedRelations as gN, type FormulaResolverServiceOptions as gO, FormulaResolverService as gP, type RollupResult as gQ, type RollupServiceOptions as gR, RollupService as gS, type RollupSchedulerOptions as gT, RollupScheduler as gU, applyDefaultValues as gV, checkPermission as gW, getPolicy as gX, buildPolicyContext as gY, checkRecordAccess as gZ, checkRecordModifyOrThrow as g_, type ObjectRecordsRepository as ga, type ObjectsRepository as gb, type PermissionsRepository as gc, type UserProfilesRepository as gd, type ViewsRepository as ge, type WorkflowAccessGrantsRepository as gf, type WorkflowInstancesRepository as gg, type WorkflowInvitationsRepository as gh, type WorkflowsRepository as gi, BaseService as gj, BaseRepository as gk, type SchemaContextAware as gl, SchemaContextAwareRepository as gm, type CreateCustomObjectInput as gn, type AddAttributeInput as go, type UpdateObjectInput as gp, type ObjectSchemaServiceOptions as gq, ObjectSchemaService as gr, type RecordServiceOptions as gs, RecordService as gt, type RecordQueryServiceOptions as gu, type QueryOptions as gv, type SearchQueryOptions as gw, type QueryResult as gx, RecordQueryService as gy, type RelationValidationResult as gz, type WorkflowConfig as h, type PermissionServiceOptions as h$, checkSharedObjectWriteAccess as h0, computeLabel as h1, type LabelResolver as h2, enrichWithFormulas as h3, enrichRecordsWithFormulas as h4, createContextForCreate as h5, createContextForUpdate as h6, createContextForDelete as h7, createContextForRestore as h8, recalculateParentRollups as h9, type UserValidationError as hA, UserService as hB, type UserProfileServiceOptions as hC, UserProfileService as hD, AuditService as hE, buildAuditChanges as hF, DocumentGenerationTemplateNotFoundError as hG, DocumentGenerationNotConfiguredError as hH, DocumentGenerationService as hI, type DocumentProcessingConfig as hJ, DocumentProcessingService as hK, type RenderDocumentInput as hL, type DocumentRendererOptions as hM, type RenderDocumentResult as hN, DocumentRenderError as hO, StorageDownloadNotSupportedError as hP, DocumentRendererService as hQ, DocumentTemplateService as hR, type RecordDocumentsResult as hS, type CreateRecordDocumentInput as hT, type CreateRecordDocumentResult as hU, type DocumentServiceOptions as hV, DocumentService as hW, type FileServiceOptions as hX, FileService as hY, GeocodingService as hZ, GlobalSearchService as h_, type RollupCascadeContext as ha, type DocumentProcessingHookOptions as hb, DocumentProcessingHook as hc, GrantNotFoundError as hd, GrantExpiredError as he, GrantRevokedError as hf, TokenRevokedError as hg, type GrantServiceConfig as hh, type CreateGrantResult as hi, WorkflowAccessGrantService as hj, type StartWorkflowInput as hk, type ResumeWorkflowInput as hl, type WorkflowInstanceServiceOptions as hm, WorkflowInstanceService as hn, type InvitationServiceConfig as ho, InvitationNotFoundError as hp, InvitationExpiredError as hq, InvitationAlreadyAcceptedError as hr, InvitationRevokedError as hs, WorkflowInvitationService as ht, WorkflowRelationService as hu, type CreateWorkflowInput as hv, type UpdateWorkflowInput as hw, type WorkflowServiceOptions as hx, WorkflowService as hy, type UserValidationResult as hz, type SlotMode as i, type DBWorkflowAccessGrant as i$, PermissionService as i0, type CreateViewInput as i1, type UpdateViewInput as i2, type GetViewsOptions as i3, type GetViewOptions as i4, ViewService as i5, type FileContent as i6, type StorageUploadInput as i7, type StorageUploadResult as i8, type SignedUrlOptions as i9, type CreateDBAttribute as iA, type UpdateDBAttribute as iB, type UpsertDBAttribute as iC, type CreateObjectRecord as iD, type ListOptions as iE, type SearchOptions as iF, type GlobalSearchOptions as iG, type GlobalSearchGroupedOptions as iH, type GlobalSearchResultItem as iI, type GlobalSearchGroupedResult as iJ, type FileListOptions as iK, type DBView as iL, type CreateDBView as iM, type UpdateDBView as iN, type UpsertDBView as iO, type DBViewOverlay as iP, type CreateDBViewOverlay as iQ, type UpdateDBViewOverlay as iR, type DBWorkflow as iS, type CreateDBWorkflow as iT, type UpdateDBWorkflow as iU, type DBWorkflowInstance as iV, type CreateDBWorkflowInstance as iW, type UpdateDBWorkflowInstance as iX, type DBWorkflowInvitation as iY, type CreateDBWorkflowInvitation as iZ, type UpdateDBWorkflowInvitation as i_, type StorageAdapter as ia, type UploadFileInput as ib, type SyncResult as ic, type SyncOptions as id, syncNativeObjects as ie, verifyNativeObjectsSync as ig, getSyncPreview as ih, type FullSyncResult as ii, type FullSyncOptions as ij, syncAll as ik, DEFAULT_LABEL_FALLBACK as il, renderLabelExpression as im, isLabelExpression as io, extractAttributeNames as ip, enrichValuesForDisplay as iq, enrichValuesWithSelectLabels as ir, extractRelationIds as is, type RelationLabelResolver as it, computeLabelWithRelations as iu, type DBObject as iv, type CreateDBObject as iw, type UpdateDBObject as ix, type UpsertDBObject as iy, type DBAttribute as iz, type ConditionGroup as j, type CreateDBWorkflowAccessGrant as j0, type UpdateDBWorkflowAccessGrant as j1, type OperationResult as j2, type ViewSyncResult as j3, type ViewSyncLogger as j4, type ViewSyncOptions as j5, seedRegistryViews as j6, syncNativeViews as j7, verifyRegistryViewsSeeded as j8, verifyNativeViewsSync as j9, getViewSeedPreview as ja, getViewSyncPreview as jb, type ConditionRule as k, type WorkflowNode as l, type WorkflowDefinition as m, type FlowRow as n, type ListViewConfig as o, type ListViewTab as p, type ViewDefinition as q, type DocumentTemplate as r, type OcrAdapter as s, type OcrInput as t, type OcrOptions as u, type OcrResult as v, type OcrPage as w, type OcrTextBlock as x, type SignatureAdapter as y, type CreateSignatureInput as z };