@objectstack/metadata 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { MetadataFormat, MetadataLoaderContract, MetadataLoadOptions, MetadataLoadResult, MetadataStats, MetadataSaveOptions, MetadataSaveResult, MetadataWatchEvent, MetadataManagerConfig, PackagePublishResult } from '@objectstack/spec/system';
2
- export { MetadataCollectionInfo, MetadataExportOptions, MetadataFormat, MetadataImportOptions, MetadataLoadOptions, MetadataLoadResult, MetadataLoaderContract, MetadataManagerConfig, MetadataSaveOptions, MetadataSaveResult, MetadataStats, MetadataWatchEvent } from '@objectstack/spec/system';
1
+ import { MetadataFormat, MetadataLoaderContract, MetadataLoadOptions, MetadataLoadResult, MetadataStats, MetadataSaveOptions, MetadataSaveResult, MetadataWatchEvent, MetadataManagerConfig, PackagePublishResult, MetadataHistoryQueryOptions, MetadataHistoryQueryResult, MetadataDiffResult, MetadataHistoryRecord, MetadataHistoryRetentionPolicy } from '@objectstack/spec/system';
2
+ export { MetadataCollectionInfo, MetadataDiffResult, MetadataExportOptions, MetadataFormat, MetadataHistoryQueryOptions, MetadataHistoryQueryResult, MetadataHistoryRecord, MetadataHistoryRetentionPolicy, MetadataImportOptions, MetadataLoadOptions, MetadataLoadResult, MetadataLoaderContract, MetadataManagerConfig, MetadataSaveOptions, MetadataSaveResult, MetadataStats, MetadataWatchEvent } from '@objectstack/spec/system';
3
3
  import { IMetadataService, IDataDriver, MetadataWatchCallback, MetadataWatchHandle, MetadataExportOptions, MetadataImportOptions, MetadataImportResult, MetadataTypeInfo, ISchemaDriver } from '@objectstack/spec/contracts';
4
4
  export { IMetadataService, MetadataImportResult, MetadataTypeInfo, MetadataWatchCallback, MetadataWatchHandle } from '@objectstack/spec/contracts';
5
5
  import { MetadataTypeRegistryEntry, MetadataQuery, MetadataQueryResult, MetadataBulkResult, MetadataOverlay, MetadataValidationResult, MetadataDependency, MetadataPluginConfig } from '@objectstack/spec/kernel';
@@ -174,6 +174,7 @@ declare class MetadataManager implements IMetadataService {
174
174
  registerLoader(loader: MetadataLoader): void;
175
175
  /**
176
176
  * Register/save a metadata item by type
177
+ * Stores in-memory registry and persists to writable loaders (if configured)
177
178
  */
178
179
  register(type: string, name: string, data: unknown): Promise<void>;
179
180
  /**
@@ -359,6 +360,29 @@ declare class MetadataManager implements IMetadataService {
359
360
  */
360
361
  stopWatching(): Promise<void>;
361
362
  protected notifyWatchers(type: string, event: MetadataWatchEvent): void;
363
+ /**
364
+ * Get the database loader for history operations.
365
+ * Returns undefined if no database loader is configured.
366
+ */
367
+ private getDatabaseLoader;
368
+ /**
369
+ * Get version history for a metadata item.
370
+ * Returns a timeline of all changes made to the item.
371
+ */
372
+ getHistory(type: string, name: string, options?: MetadataHistoryQueryOptions): Promise<MetadataHistoryQueryResult>;
373
+ /**
374
+ * Rollback a metadata item to a specific version.
375
+ * Restores the metadata definition from the history snapshot.
376
+ */
377
+ rollback(type: string, name: string, version: number, options?: {
378
+ changeNote?: string;
379
+ recordedBy?: string;
380
+ }): Promise<unknown>;
381
+ /**
382
+ * Compare two versions of a metadata item.
383
+ * Returns a diff showing what changed between versions.
384
+ */
385
+ diff(type: string, name: string, version1: number, version2: number): Promise<MetadataDiffResult>;
362
386
  }
363
387
 
364
388
  interface MetadataPluginOptions {
@@ -393,6 +417,10 @@ declare class MemoryLoader implements MetadataLoader {
393
417
  stat(type: string, name: string): Promise<MetadataStats | null>;
394
418
  list(type: string): Promise<string[]>;
395
419
  save(type: string, name: string, data: any, _options?: MetadataSaveOptions): Promise<MetadataSaveResult>;
420
+ /**
421
+ * Delete a metadata item from memory storage
422
+ */
423
+ delete(type: string, name: string): Promise<void>;
396
424
  }
397
425
 
398
426
  /**
@@ -433,8 +461,12 @@ interface DatabaseLoaderOptions {
433
461
  driver: IDataDriver;
434
462
  /** The table name to store metadata records (default: 'sys_metadata') */
435
463
  tableName?: string;
464
+ /** The table name to store history records (default: 'sys_metadata_history') */
465
+ historyTableName?: string;
436
466
  /** Tenant ID for multi-tenant isolation */
437
467
  tenantId?: string;
468
+ /** Enable history tracking (default: true) */
469
+ trackHistory?: boolean;
438
470
  }
439
471
  /**
440
472
  * DatabaseLoader — Datasource-backed metadata persistence.
@@ -447,8 +479,11 @@ declare class DatabaseLoader implements MetadataLoader {
447
479
  readonly contract: MetadataLoaderContract;
448
480
  private driver;
449
481
  private tableName;
482
+ private historyTableName;
450
483
  private tenantId?;
484
+ private trackHistory;
451
485
  private schemaReady;
486
+ private historySchemaReady;
452
487
  constructor(options: DatabaseLoaderOptions);
453
488
  /**
454
489
  * Ensure the metadata table exists.
@@ -456,11 +491,30 @@ declare class DatabaseLoader implements MetadataLoader {
456
491
  * to idempotently create/update the table.
457
492
  */
458
493
  private ensureSchema;
494
+ /**
495
+ * Ensure the history table exists.
496
+ * Uses IDataDriver.syncSchema with the SysMetadataHistoryObject definition.
497
+ */
498
+ private ensureHistorySchema;
459
499
  /**
460
500
  * Build base filter conditions for queries.
461
501
  * Always includes tenantId when configured.
462
502
  */
463
503
  private baseFilter;
504
+ /**
505
+ * Create a history record for a metadata change.
506
+ *
507
+ * @param metadataId - The metadata record ID
508
+ * @param type - Metadata type
509
+ * @param name - Metadata name
510
+ * @param version - Version number
511
+ * @param metadata - The metadata payload
512
+ * @param operationType - Type of operation
513
+ * @param previousChecksum - Checksum of previous version (if any)
514
+ * @param changeNote - Optional change description
515
+ * @param recordedBy - Optional user who made the change
516
+ */
517
+ private createHistoryRecord;
464
518
  /**
465
519
  * Convert a database row to a metadata payload.
466
520
  * Parses the JSON `metadata` column back into an object.
@@ -475,7 +529,24 @@ declare class DatabaseLoader implements MetadataLoader {
475
529
  exists(type: string, name: string): Promise<boolean>;
476
530
  stat(type: string, name: string): Promise<MetadataStats | null>;
477
531
  list(type: string): Promise<string[]>;
532
+ /**
533
+ * Fetch a single history snapshot by (type, name, version).
534
+ * Returns null when the record does not exist.
535
+ */
536
+ getHistoryRecord(type: string, name: string, version: number): Promise<MetadataHistoryRecord | null>;
537
+ /**
538
+ * Perform a rollback: persist `restoredData` as the new current state and record a
539
+ * single 'revert' history entry (instead of the usual 'update' entry that `save()`
540
+ * would produce). This avoids the duplicate-version problem that arises when
541
+ * `register()` → `save()` writes an 'update' entry followed by an additional
542
+ * 'revert' entry for the same version number.
543
+ */
544
+ registerRollback(type: string, name: string, restoredData: unknown, targetVersion: number, changeNote?: string, recordedBy?: string): Promise<void>;
478
545
  save(type: string, name: string, data: any, _options?: MetadataSaveOptions): Promise<MetadataSaveResult>;
546
+ /**
547
+ * Delete a metadata item from the database
548
+ */
549
+ delete(type: string, name: string): Promise<void>;
479
550
  }
480
551
 
481
552
  /**
@@ -804,11 +875,7 @@ declare const SysMetadataObject: Omit<{
804
875
  keyPrefix?: string | undefined;
805
876
  actions?: {
806
877
  name: string;
807
- label: string | {
808
- key: string;
809
- defaultValue?: string | undefined;
810
- params?: Record<string, string | number | boolean> | undefined;
811
- };
878
+ label: string;
812
879
  type: "url" | "script" | "modal" | "flow" | "api";
813
880
  refreshAfter: boolean;
814
881
  objectName?: string | undefined;
@@ -819,44 +886,24 @@ declare const SysMetadataObject: Omit<{
819
886
  execute?: string | undefined;
820
887
  params?: {
821
888
  name: string;
822
- label: string | {
823
- key: string;
824
- defaultValue?: string | undefined;
825
- params?: Record<string, string | number | boolean> | undefined;
826
- };
889
+ label: string;
827
890
  type: "number" | "boolean" | "date" | "lookup" | "file" | "url" | "json" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "datetime" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode" | "progress" | "tags" | "vector";
828
891
  required: boolean;
829
892
  options?: {
830
- label: string | {
831
- key: string;
832
- defaultValue?: string | undefined;
833
- params?: Record<string, string | number | boolean> | undefined;
834
- };
893
+ label: string;
835
894
  value: string;
836
895
  }[] | undefined;
837
896
  }[] | undefined;
838
897
  variant?: "link" | "primary" | "secondary" | "danger" | "ghost" | undefined;
839
- confirmText?: string | {
840
- key: string;
841
- defaultValue?: string | undefined;
842
- params?: Record<string, string | number | boolean> | undefined;
843
- } | undefined;
844
- successMessage?: string | {
845
- key: string;
846
- defaultValue?: string | undefined;
847
- params?: Record<string, string | number | boolean> | undefined;
848
- } | undefined;
898
+ confirmText?: string | undefined;
899
+ successMessage?: string | undefined;
849
900
  visible?: string | undefined;
850
901
  disabled?: string | boolean | undefined;
851
902
  shortcut?: string | undefined;
852
903
  bulkEnabled?: boolean | undefined;
853
904
  timeout?: number | undefined;
854
905
  aria?: {
855
- ariaLabel?: string | {
856
- key: string;
857
- defaultValue?: string | undefined;
858
- params?: Record<string, string | number | boolean> | undefined;
859
- } | undefined;
906
+ ariaLabel?: string | undefined;
860
907
  ariaDescribedBy?: string | undefined;
861
908
  role?: string | undefined;
862
909
  } | undefined;
@@ -4228,6 +4275,2530 @@ declare const SysMetadataObject: Omit<{
4228
4275
  };
4229
4276
  }, "fields">;
4230
4277
 
4278
+ /**
4279
+ * sys_metadata_history — Metadata Version History Object
4280
+ *
4281
+ * Stores historical snapshots of metadata changes for version tracking,
4282
+ * audit trail, and rollback capabilities.
4283
+ *
4284
+ * This is a system object (isSystem: true) — protected from deletion and
4285
+ * automatically provisioned when metadata history is enabled.
4286
+ *
4287
+ * Each record represents a single version snapshot of a metadata item,
4288
+ * created whenever the metadata is modified, published, or reverted.
4289
+ *
4290
+ * @see MetadataHistoryRecordSchema in metadata-persistence.zod.ts
4291
+ */
4292
+ declare const SysMetadataHistoryObject: Omit<{
4293
+ name: string;
4294
+ active: boolean;
4295
+ isSystem: boolean;
4296
+ abstract: boolean;
4297
+ datasource: string;
4298
+ fields: Record<string, {
4299
+ type: "number" | "boolean" | "json" | "tags" | "date" | "lookup" | "file" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "datetime" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode" | "progress" | "vector";
4300
+ required: boolean;
4301
+ searchable: boolean;
4302
+ multiple: boolean;
4303
+ unique: boolean;
4304
+ deleteBehavior: "set_null" | "cascade" | "restrict";
4305
+ auditTrail: boolean;
4306
+ hidden: boolean;
4307
+ readonly: boolean;
4308
+ sortable: boolean;
4309
+ index: boolean;
4310
+ externalId: boolean;
4311
+ name?: string | undefined;
4312
+ label?: string | undefined;
4313
+ description?: string | undefined;
4314
+ format?: string | undefined;
4315
+ columnName?: string | undefined;
4316
+ defaultValue?: unknown;
4317
+ maxLength?: number | undefined;
4318
+ minLength?: number | undefined;
4319
+ precision?: number | undefined;
4320
+ scale?: number | undefined;
4321
+ min?: number | undefined;
4322
+ max?: number | undefined;
4323
+ options?: {
4324
+ label: string;
4325
+ value: string;
4326
+ color?: string | undefined;
4327
+ default?: boolean | undefined;
4328
+ }[] | undefined;
4329
+ reference?: string | undefined;
4330
+ referenceFilters?: string[] | undefined;
4331
+ writeRequiresMasterRead?: boolean | undefined;
4332
+ expression?: string | undefined;
4333
+ summaryOperations?: {
4334
+ object: string;
4335
+ field: string;
4336
+ function: "min" | "max" | "count" | "sum" | "avg";
4337
+ } | undefined;
4338
+ language?: string | undefined;
4339
+ theme?: string | undefined;
4340
+ lineNumbers?: boolean | undefined;
4341
+ maxRating?: number | undefined;
4342
+ allowHalf?: boolean | undefined;
4343
+ displayMap?: boolean | undefined;
4344
+ allowGeocoding?: boolean | undefined;
4345
+ addressFormat?: "us" | "uk" | "international" | undefined;
4346
+ colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
4347
+ allowAlpha?: boolean | undefined;
4348
+ presetColors?: string[] | undefined;
4349
+ step?: number | undefined;
4350
+ showValue?: boolean | undefined;
4351
+ marks?: Record<string, string> | undefined;
4352
+ barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
4353
+ qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
4354
+ displayValue?: boolean | undefined;
4355
+ allowScanning?: boolean | undefined;
4356
+ currencyConfig?: {
4357
+ precision: number;
4358
+ currencyMode: "dynamic" | "fixed";
4359
+ defaultCurrency: string;
4360
+ } | undefined;
4361
+ vectorConfig?: {
4362
+ dimensions: number;
4363
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
4364
+ normalized: boolean;
4365
+ indexed: boolean;
4366
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
4367
+ } | undefined;
4368
+ fileAttachmentConfig?: {
4369
+ virusScan: boolean;
4370
+ virusScanOnUpload: boolean;
4371
+ quarantineOnThreat: boolean;
4372
+ allowMultiple: boolean;
4373
+ allowReplace: boolean;
4374
+ allowDelete: boolean;
4375
+ requireUpload: boolean;
4376
+ extractMetadata: boolean;
4377
+ extractText: boolean;
4378
+ versioningEnabled: boolean;
4379
+ publicRead: boolean;
4380
+ presignedUrlExpiry: number;
4381
+ minSize?: number | undefined;
4382
+ maxSize?: number | undefined;
4383
+ allowedTypes?: string[] | undefined;
4384
+ blockedTypes?: string[] | undefined;
4385
+ allowedMimeTypes?: string[] | undefined;
4386
+ blockedMimeTypes?: string[] | undefined;
4387
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
4388
+ storageProvider?: string | undefined;
4389
+ storageBucket?: string | undefined;
4390
+ storagePrefix?: string | undefined;
4391
+ imageValidation?: {
4392
+ generateThumbnails: boolean;
4393
+ preserveMetadata: boolean;
4394
+ autoRotate: boolean;
4395
+ minWidth?: number | undefined;
4396
+ maxWidth?: number | undefined;
4397
+ minHeight?: number | undefined;
4398
+ maxHeight?: number | undefined;
4399
+ aspectRatio?: string | undefined;
4400
+ thumbnailSizes?: {
4401
+ name: string;
4402
+ width: number;
4403
+ height: number;
4404
+ crop: boolean;
4405
+ }[] | undefined;
4406
+ } | undefined;
4407
+ maxVersions?: number | undefined;
4408
+ } | undefined;
4409
+ encryptionConfig?: {
4410
+ enabled: boolean;
4411
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
4412
+ keyManagement: {
4413
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
4414
+ keyId?: string | undefined;
4415
+ rotationPolicy?: {
4416
+ enabled: boolean;
4417
+ frequencyDays: number;
4418
+ retainOldVersions: number;
4419
+ autoRotate: boolean;
4420
+ } | undefined;
4421
+ };
4422
+ scope: "field" | "table" | "record" | "database";
4423
+ deterministicEncryption: boolean;
4424
+ searchableEncryption: boolean;
4425
+ } | undefined;
4426
+ maskingRule?: {
4427
+ field: string;
4428
+ strategy: "hash" | "redact" | "partial" | "tokenize" | "randomize" | "nullify" | "substitute";
4429
+ preserveFormat: boolean;
4430
+ preserveLength: boolean;
4431
+ pattern?: string | undefined;
4432
+ roles?: string[] | undefined;
4433
+ exemptRoles?: string[] | undefined;
4434
+ } | undefined;
4435
+ dependencies?: string[] | undefined;
4436
+ cached?: {
4437
+ enabled: boolean;
4438
+ ttl: number;
4439
+ invalidateOn: string[];
4440
+ } | undefined;
4441
+ dataQuality?: {
4442
+ uniqueness: boolean;
4443
+ completeness: number;
4444
+ accuracy?: {
4445
+ source: string;
4446
+ threshold: number;
4447
+ } | undefined;
4448
+ } | undefined;
4449
+ group?: string | undefined;
4450
+ conditionalRequired?: string | undefined;
4451
+ inlineHelpText?: string | undefined;
4452
+ trackFeedHistory?: boolean | undefined;
4453
+ caseSensitive?: boolean | undefined;
4454
+ autonumberFormat?: string | undefined;
4455
+ }>;
4456
+ label?: string | undefined;
4457
+ pluralLabel?: string | undefined;
4458
+ description?: string | undefined;
4459
+ icon?: string | undefined;
4460
+ namespace?: string | undefined;
4461
+ tags?: string[] | undefined;
4462
+ tableName?: string | undefined;
4463
+ indexes?: {
4464
+ fields: string[];
4465
+ type: "hash" | "btree" | "gin" | "gist" | "fulltext";
4466
+ unique: boolean;
4467
+ name?: string | undefined;
4468
+ partial?: string | undefined;
4469
+ }[] | undefined;
4470
+ tenancy?: {
4471
+ enabled: boolean;
4472
+ strategy: "shared" | "isolated" | "hybrid";
4473
+ tenantField: string;
4474
+ crossTenantAccess: boolean;
4475
+ } | undefined;
4476
+ softDelete?: {
4477
+ enabled: boolean;
4478
+ field: string;
4479
+ cascadeDelete: boolean;
4480
+ } | undefined;
4481
+ versioning?: {
4482
+ enabled: boolean;
4483
+ strategy: "snapshot" | "delta" | "event-sourcing";
4484
+ versionField: string;
4485
+ retentionDays?: number | undefined;
4486
+ } | undefined;
4487
+ partitioning?: {
4488
+ enabled: boolean;
4489
+ strategy: "hash" | "range" | "list";
4490
+ key: string;
4491
+ interval?: string | undefined;
4492
+ } | undefined;
4493
+ cdc?: {
4494
+ enabled: boolean;
4495
+ events: ("update" | "delete" | "insert")[];
4496
+ destination: string;
4497
+ } | undefined;
4498
+ validations?: _objectstack_spec_data.BaseValidationRuleShape[] | undefined;
4499
+ stateMachines?: Record<string, {
4500
+ id: string;
4501
+ initial: string;
4502
+ states: Record<string, StateNodeConfig>;
4503
+ description?: string | undefined;
4504
+ contextSchema?: Record<string, unknown> | undefined;
4505
+ on?: Record<string, string | {
4506
+ target?: string | undefined;
4507
+ cond?: string | {
4508
+ type: string;
4509
+ params?: Record<string, unknown> | undefined;
4510
+ } | undefined;
4511
+ actions?: (string | {
4512
+ type: string;
4513
+ params?: Record<string, unknown> | undefined;
4514
+ })[] | undefined;
4515
+ description?: string | undefined;
4516
+ } | {
4517
+ target?: string | undefined;
4518
+ cond?: string | {
4519
+ type: string;
4520
+ params?: Record<string, unknown> | undefined;
4521
+ } | undefined;
4522
+ actions?: (string | {
4523
+ type: string;
4524
+ params?: Record<string, unknown> | undefined;
4525
+ })[] | undefined;
4526
+ description?: string | undefined;
4527
+ }[]> | undefined;
4528
+ }> | undefined;
4529
+ displayNameField?: string | undefined;
4530
+ recordName?: {
4531
+ type: "text" | "autonumber";
4532
+ displayFormat?: string | undefined;
4533
+ startNumber?: number | undefined;
4534
+ } | undefined;
4535
+ titleFormat?: string | undefined;
4536
+ compactLayout?: string[] | undefined;
4537
+ search?: {
4538
+ fields: string[];
4539
+ displayFields?: string[] | undefined;
4540
+ filters?: string[] | undefined;
4541
+ } | undefined;
4542
+ enable?: {
4543
+ trackHistory: boolean;
4544
+ searchable: boolean;
4545
+ apiEnabled: boolean;
4546
+ files: boolean;
4547
+ feeds: boolean;
4548
+ activities: boolean;
4549
+ trash: boolean;
4550
+ mru: boolean;
4551
+ clone: boolean;
4552
+ apiMethods?: ("create" | "search" | "list" | "update" | "delete" | "upsert" | "history" | "get" | "bulk" | "aggregate" | "restore" | "purge" | "import" | "export")[] | undefined;
4553
+ } | undefined;
4554
+ recordTypes?: string[] | undefined;
4555
+ sharingModel?: "full" | "private" | "read" | "read_write" | undefined;
4556
+ keyPrefix?: string | undefined;
4557
+ actions?: {
4558
+ name: string;
4559
+ label: string;
4560
+ type: "url" | "script" | "modal" | "flow" | "api";
4561
+ refreshAfter: boolean;
4562
+ objectName?: string | undefined;
4563
+ icon?: string | undefined;
4564
+ locations?: ("list_toolbar" | "list_item" | "record_header" | "record_more" | "record_related" | "global_nav")[] | undefined;
4565
+ component?: "action:button" | "action:icon" | "action:menu" | "action:group" | undefined;
4566
+ target?: string | undefined;
4567
+ execute?: string | undefined;
4568
+ params?: {
4569
+ name: string;
4570
+ label: string;
4571
+ type: "number" | "boolean" | "date" | "lookup" | "file" | "url" | "json" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "datetime" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode" | "progress" | "tags" | "vector";
4572
+ required: boolean;
4573
+ options?: {
4574
+ label: string;
4575
+ value: string;
4576
+ }[] | undefined;
4577
+ }[] | undefined;
4578
+ variant?: "link" | "primary" | "secondary" | "danger" | "ghost" | undefined;
4579
+ confirmText?: string | undefined;
4580
+ successMessage?: string | undefined;
4581
+ visible?: string | undefined;
4582
+ disabled?: string | boolean | undefined;
4583
+ shortcut?: string | undefined;
4584
+ bulkEnabled?: boolean | undefined;
4585
+ timeout?: number | undefined;
4586
+ aria?: {
4587
+ ariaLabel?: string | undefined;
4588
+ ariaDescribedBy?: string | undefined;
4589
+ role?: string | undefined;
4590
+ } | undefined;
4591
+ }[] | undefined;
4592
+ }, "fields"> & Pick<{
4593
+ readonly namespace: "sys";
4594
+ readonly name: "metadata_history";
4595
+ readonly label: "Metadata History";
4596
+ readonly pluralLabel: "Metadata History";
4597
+ readonly icon: "history";
4598
+ readonly isSystem: true;
4599
+ readonly description: "Version history and audit trail for metadata changes";
4600
+ readonly fields: {
4601
+ /** Primary Key (UUID) */
4602
+ readonly id: {
4603
+ readonly format?: string | undefined;
4604
+ readonly expression?: string | undefined;
4605
+ readonly readonly?: boolean | undefined;
4606
+ readonly defaultValue?: unknown;
4607
+ readonly min?: number | undefined;
4608
+ readonly max?: number | undefined;
4609
+ readonly name?: string | undefined;
4610
+ readonly encryptionConfig?: {
4611
+ enabled: boolean;
4612
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
4613
+ keyManagement: {
4614
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
4615
+ keyId?: string | undefined;
4616
+ rotationPolicy?: {
4617
+ enabled: boolean;
4618
+ frequencyDays: number;
4619
+ retainOldVersions: number;
4620
+ autoRotate: boolean;
4621
+ } | undefined;
4622
+ };
4623
+ scope: "table" | "record" | "field" | "database";
4624
+ deterministicEncryption: boolean;
4625
+ searchableEncryption: boolean;
4626
+ } | undefined;
4627
+ readonly label?: string | undefined;
4628
+ readonly precision?: number | undefined;
4629
+ readonly description?: string | undefined;
4630
+ readonly columnName?: string | undefined;
4631
+ readonly required?: boolean | undefined;
4632
+ readonly searchable?: boolean | undefined;
4633
+ readonly multiple?: boolean | undefined;
4634
+ readonly unique?: boolean | undefined;
4635
+ readonly maxLength?: number | undefined;
4636
+ readonly minLength?: number | undefined;
4637
+ readonly scale?: number | undefined;
4638
+ readonly options?: {
4639
+ label: string;
4640
+ value: string;
4641
+ color?: string | undefined;
4642
+ default?: boolean | undefined;
4643
+ }[] | undefined;
4644
+ readonly reference?: string | undefined;
4645
+ readonly referenceFilters?: string[] | undefined;
4646
+ readonly writeRequiresMasterRead?: boolean | undefined;
4647
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
4648
+ readonly summaryOperations?: {
4649
+ object: string;
4650
+ field: string;
4651
+ function: "count" | "sum" | "avg" | "min" | "max";
4652
+ } | undefined;
4653
+ readonly language?: string | undefined;
4654
+ readonly theme?: string | undefined;
4655
+ readonly lineNumbers?: boolean | undefined;
4656
+ readonly maxRating?: number | undefined;
4657
+ readonly allowHalf?: boolean | undefined;
4658
+ readonly displayMap?: boolean | undefined;
4659
+ readonly allowGeocoding?: boolean | undefined;
4660
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
4661
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
4662
+ readonly allowAlpha?: boolean | undefined;
4663
+ readonly presetColors?: string[] | undefined;
4664
+ readonly step?: number | undefined;
4665
+ readonly showValue?: boolean | undefined;
4666
+ readonly marks?: Record<string, string> | undefined;
4667
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
4668
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
4669
+ readonly displayValue?: boolean | undefined;
4670
+ readonly allowScanning?: boolean | undefined;
4671
+ readonly currencyConfig?: {
4672
+ precision: number;
4673
+ currencyMode: "dynamic" | "fixed";
4674
+ defaultCurrency: string;
4675
+ } | undefined;
4676
+ readonly vectorConfig?: {
4677
+ dimensions: number;
4678
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
4679
+ normalized: boolean;
4680
+ indexed: boolean;
4681
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
4682
+ } | undefined;
4683
+ readonly fileAttachmentConfig?: {
4684
+ virusScan: boolean;
4685
+ virusScanOnUpload: boolean;
4686
+ quarantineOnThreat: boolean;
4687
+ allowMultiple: boolean;
4688
+ allowReplace: boolean;
4689
+ allowDelete: boolean;
4690
+ requireUpload: boolean;
4691
+ extractMetadata: boolean;
4692
+ extractText: boolean;
4693
+ versioningEnabled: boolean;
4694
+ publicRead: boolean;
4695
+ presignedUrlExpiry: number;
4696
+ minSize?: number | undefined;
4697
+ maxSize?: number | undefined;
4698
+ allowedTypes?: string[] | undefined;
4699
+ blockedTypes?: string[] | undefined;
4700
+ allowedMimeTypes?: string[] | undefined;
4701
+ blockedMimeTypes?: string[] | undefined;
4702
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
4703
+ storageProvider?: string | undefined;
4704
+ storageBucket?: string | undefined;
4705
+ storagePrefix?: string | undefined;
4706
+ imageValidation?: {
4707
+ generateThumbnails: boolean;
4708
+ preserveMetadata: boolean;
4709
+ autoRotate: boolean;
4710
+ minWidth?: number | undefined;
4711
+ maxWidth?: number | undefined;
4712
+ minHeight?: number | undefined;
4713
+ maxHeight?: number | undefined;
4714
+ aspectRatio?: string | undefined;
4715
+ thumbnailSizes?: {
4716
+ name: string;
4717
+ width: number;
4718
+ height: number;
4719
+ crop: boolean;
4720
+ }[] | undefined;
4721
+ } | undefined;
4722
+ maxVersions?: number | undefined;
4723
+ } | undefined;
4724
+ readonly maskingRule?: {
4725
+ field: string;
4726
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
4727
+ preserveFormat: boolean;
4728
+ preserveLength: boolean;
4729
+ pattern?: string | undefined;
4730
+ roles?: string[] | undefined;
4731
+ exemptRoles?: string[] | undefined;
4732
+ } | undefined;
4733
+ readonly auditTrail?: boolean | undefined;
4734
+ readonly dependencies?: string[] | undefined;
4735
+ readonly cached?: {
4736
+ enabled: boolean;
4737
+ ttl: number;
4738
+ invalidateOn: string[];
4739
+ } | undefined;
4740
+ readonly dataQuality?: {
4741
+ uniqueness: boolean;
4742
+ completeness: number;
4743
+ accuracy?: {
4744
+ source: string;
4745
+ threshold: number;
4746
+ } | undefined;
4747
+ } | undefined;
4748
+ readonly group?: string | undefined;
4749
+ readonly conditionalRequired?: string | undefined;
4750
+ readonly hidden?: boolean | undefined;
4751
+ readonly sortable?: boolean | undefined;
4752
+ readonly inlineHelpText?: string | undefined;
4753
+ readonly trackFeedHistory?: boolean | undefined;
4754
+ readonly caseSensitive?: boolean | undefined;
4755
+ readonly autonumberFormat?: string | undefined;
4756
+ readonly index?: boolean | undefined;
4757
+ readonly externalId?: boolean | undefined;
4758
+ readonly type: "text";
4759
+ };
4760
+ /** Foreign key to sys_metadata.id */
4761
+ readonly metadata_id: {
4762
+ readonly format?: string | undefined;
4763
+ readonly expression?: string | undefined;
4764
+ readonly readonly?: boolean | undefined;
4765
+ readonly defaultValue?: unknown;
4766
+ readonly min?: number | undefined;
4767
+ readonly max?: number | undefined;
4768
+ readonly name?: string | undefined;
4769
+ readonly encryptionConfig?: {
4770
+ enabled: boolean;
4771
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
4772
+ keyManagement: {
4773
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
4774
+ keyId?: string | undefined;
4775
+ rotationPolicy?: {
4776
+ enabled: boolean;
4777
+ frequencyDays: number;
4778
+ retainOldVersions: number;
4779
+ autoRotate: boolean;
4780
+ } | undefined;
4781
+ };
4782
+ scope: "table" | "record" | "field" | "database";
4783
+ deterministicEncryption: boolean;
4784
+ searchableEncryption: boolean;
4785
+ } | undefined;
4786
+ readonly label?: string | undefined;
4787
+ readonly precision?: number | undefined;
4788
+ readonly description?: string | undefined;
4789
+ readonly columnName?: string | undefined;
4790
+ readonly required?: boolean | undefined;
4791
+ readonly searchable?: boolean | undefined;
4792
+ readonly multiple?: boolean | undefined;
4793
+ readonly unique?: boolean | undefined;
4794
+ readonly maxLength?: number | undefined;
4795
+ readonly minLength?: number | undefined;
4796
+ readonly scale?: number | undefined;
4797
+ readonly options?: {
4798
+ label: string;
4799
+ value: string;
4800
+ color?: string | undefined;
4801
+ default?: boolean | undefined;
4802
+ }[] | undefined;
4803
+ readonly reference?: string | undefined;
4804
+ readonly referenceFilters?: string[] | undefined;
4805
+ readonly writeRequiresMasterRead?: boolean | undefined;
4806
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
4807
+ readonly summaryOperations?: {
4808
+ object: string;
4809
+ field: string;
4810
+ function: "count" | "sum" | "avg" | "min" | "max";
4811
+ } | undefined;
4812
+ readonly language?: string | undefined;
4813
+ readonly theme?: string | undefined;
4814
+ readonly lineNumbers?: boolean | undefined;
4815
+ readonly maxRating?: number | undefined;
4816
+ readonly allowHalf?: boolean | undefined;
4817
+ readonly displayMap?: boolean | undefined;
4818
+ readonly allowGeocoding?: boolean | undefined;
4819
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
4820
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
4821
+ readonly allowAlpha?: boolean | undefined;
4822
+ readonly presetColors?: string[] | undefined;
4823
+ readonly step?: number | undefined;
4824
+ readonly showValue?: boolean | undefined;
4825
+ readonly marks?: Record<string, string> | undefined;
4826
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
4827
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
4828
+ readonly displayValue?: boolean | undefined;
4829
+ readonly allowScanning?: boolean | undefined;
4830
+ readonly currencyConfig?: {
4831
+ precision: number;
4832
+ currencyMode: "dynamic" | "fixed";
4833
+ defaultCurrency: string;
4834
+ } | undefined;
4835
+ readonly vectorConfig?: {
4836
+ dimensions: number;
4837
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
4838
+ normalized: boolean;
4839
+ indexed: boolean;
4840
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
4841
+ } | undefined;
4842
+ readonly fileAttachmentConfig?: {
4843
+ virusScan: boolean;
4844
+ virusScanOnUpload: boolean;
4845
+ quarantineOnThreat: boolean;
4846
+ allowMultiple: boolean;
4847
+ allowReplace: boolean;
4848
+ allowDelete: boolean;
4849
+ requireUpload: boolean;
4850
+ extractMetadata: boolean;
4851
+ extractText: boolean;
4852
+ versioningEnabled: boolean;
4853
+ publicRead: boolean;
4854
+ presignedUrlExpiry: number;
4855
+ minSize?: number | undefined;
4856
+ maxSize?: number | undefined;
4857
+ allowedTypes?: string[] | undefined;
4858
+ blockedTypes?: string[] | undefined;
4859
+ allowedMimeTypes?: string[] | undefined;
4860
+ blockedMimeTypes?: string[] | undefined;
4861
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
4862
+ storageProvider?: string | undefined;
4863
+ storageBucket?: string | undefined;
4864
+ storagePrefix?: string | undefined;
4865
+ imageValidation?: {
4866
+ generateThumbnails: boolean;
4867
+ preserveMetadata: boolean;
4868
+ autoRotate: boolean;
4869
+ minWidth?: number | undefined;
4870
+ maxWidth?: number | undefined;
4871
+ minHeight?: number | undefined;
4872
+ maxHeight?: number | undefined;
4873
+ aspectRatio?: string | undefined;
4874
+ thumbnailSizes?: {
4875
+ name: string;
4876
+ width: number;
4877
+ height: number;
4878
+ crop: boolean;
4879
+ }[] | undefined;
4880
+ } | undefined;
4881
+ maxVersions?: number | undefined;
4882
+ } | undefined;
4883
+ readonly maskingRule?: {
4884
+ field: string;
4885
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
4886
+ preserveFormat: boolean;
4887
+ preserveLength: boolean;
4888
+ pattern?: string | undefined;
4889
+ roles?: string[] | undefined;
4890
+ exemptRoles?: string[] | undefined;
4891
+ } | undefined;
4892
+ readonly auditTrail?: boolean | undefined;
4893
+ readonly dependencies?: string[] | undefined;
4894
+ readonly cached?: {
4895
+ enabled: boolean;
4896
+ ttl: number;
4897
+ invalidateOn: string[];
4898
+ } | undefined;
4899
+ readonly dataQuality?: {
4900
+ uniqueness: boolean;
4901
+ completeness: number;
4902
+ accuracy?: {
4903
+ source: string;
4904
+ threshold: number;
4905
+ } | undefined;
4906
+ } | undefined;
4907
+ readonly group?: string | undefined;
4908
+ readonly conditionalRequired?: string | undefined;
4909
+ readonly hidden?: boolean | undefined;
4910
+ readonly sortable?: boolean | undefined;
4911
+ readonly inlineHelpText?: string | undefined;
4912
+ readonly trackFeedHistory?: boolean | undefined;
4913
+ readonly caseSensitive?: boolean | undefined;
4914
+ readonly autonumberFormat?: string | undefined;
4915
+ readonly index?: boolean | undefined;
4916
+ readonly externalId?: boolean | undefined;
4917
+ readonly type: "text";
4918
+ };
4919
+ /** Machine name (denormalized for easier querying) */
4920
+ readonly name: {
4921
+ readonly format?: string | undefined;
4922
+ readonly expression?: string | undefined;
4923
+ readonly readonly?: boolean | undefined;
4924
+ readonly defaultValue?: unknown;
4925
+ readonly min?: number | undefined;
4926
+ readonly max?: number | undefined;
4927
+ readonly name?: string | undefined;
4928
+ readonly encryptionConfig?: {
4929
+ enabled: boolean;
4930
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
4931
+ keyManagement: {
4932
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
4933
+ keyId?: string | undefined;
4934
+ rotationPolicy?: {
4935
+ enabled: boolean;
4936
+ frequencyDays: number;
4937
+ retainOldVersions: number;
4938
+ autoRotate: boolean;
4939
+ } | undefined;
4940
+ };
4941
+ scope: "table" | "record" | "field" | "database";
4942
+ deterministicEncryption: boolean;
4943
+ searchableEncryption: boolean;
4944
+ } | undefined;
4945
+ readonly label?: string | undefined;
4946
+ readonly precision?: number | undefined;
4947
+ readonly description?: string | undefined;
4948
+ readonly columnName?: string | undefined;
4949
+ readonly required?: boolean | undefined;
4950
+ readonly searchable?: boolean | undefined;
4951
+ readonly multiple?: boolean | undefined;
4952
+ readonly unique?: boolean | undefined;
4953
+ readonly maxLength?: number | undefined;
4954
+ readonly minLength?: number | undefined;
4955
+ readonly scale?: number | undefined;
4956
+ readonly options?: {
4957
+ label: string;
4958
+ value: string;
4959
+ color?: string | undefined;
4960
+ default?: boolean | undefined;
4961
+ }[] | undefined;
4962
+ readonly reference?: string | undefined;
4963
+ readonly referenceFilters?: string[] | undefined;
4964
+ readonly writeRequiresMasterRead?: boolean | undefined;
4965
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
4966
+ readonly summaryOperations?: {
4967
+ object: string;
4968
+ field: string;
4969
+ function: "count" | "sum" | "avg" | "min" | "max";
4970
+ } | undefined;
4971
+ readonly language?: string | undefined;
4972
+ readonly theme?: string | undefined;
4973
+ readonly lineNumbers?: boolean | undefined;
4974
+ readonly maxRating?: number | undefined;
4975
+ readonly allowHalf?: boolean | undefined;
4976
+ readonly displayMap?: boolean | undefined;
4977
+ readonly allowGeocoding?: boolean | undefined;
4978
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
4979
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
4980
+ readonly allowAlpha?: boolean | undefined;
4981
+ readonly presetColors?: string[] | undefined;
4982
+ readonly step?: number | undefined;
4983
+ readonly showValue?: boolean | undefined;
4984
+ readonly marks?: Record<string, string> | undefined;
4985
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
4986
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
4987
+ readonly displayValue?: boolean | undefined;
4988
+ readonly allowScanning?: boolean | undefined;
4989
+ readonly currencyConfig?: {
4990
+ precision: number;
4991
+ currencyMode: "dynamic" | "fixed";
4992
+ defaultCurrency: string;
4993
+ } | undefined;
4994
+ readonly vectorConfig?: {
4995
+ dimensions: number;
4996
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
4997
+ normalized: boolean;
4998
+ indexed: boolean;
4999
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5000
+ } | undefined;
5001
+ readonly fileAttachmentConfig?: {
5002
+ virusScan: boolean;
5003
+ virusScanOnUpload: boolean;
5004
+ quarantineOnThreat: boolean;
5005
+ allowMultiple: boolean;
5006
+ allowReplace: boolean;
5007
+ allowDelete: boolean;
5008
+ requireUpload: boolean;
5009
+ extractMetadata: boolean;
5010
+ extractText: boolean;
5011
+ versioningEnabled: boolean;
5012
+ publicRead: boolean;
5013
+ presignedUrlExpiry: number;
5014
+ minSize?: number | undefined;
5015
+ maxSize?: number | undefined;
5016
+ allowedTypes?: string[] | undefined;
5017
+ blockedTypes?: string[] | undefined;
5018
+ allowedMimeTypes?: string[] | undefined;
5019
+ blockedMimeTypes?: string[] | undefined;
5020
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5021
+ storageProvider?: string | undefined;
5022
+ storageBucket?: string | undefined;
5023
+ storagePrefix?: string | undefined;
5024
+ imageValidation?: {
5025
+ generateThumbnails: boolean;
5026
+ preserveMetadata: boolean;
5027
+ autoRotate: boolean;
5028
+ minWidth?: number | undefined;
5029
+ maxWidth?: number | undefined;
5030
+ minHeight?: number | undefined;
5031
+ maxHeight?: number | undefined;
5032
+ aspectRatio?: string | undefined;
5033
+ thumbnailSizes?: {
5034
+ name: string;
5035
+ width: number;
5036
+ height: number;
5037
+ crop: boolean;
5038
+ }[] | undefined;
5039
+ } | undefined;
5040
+ maxVersions?: number | undefined;
5041
+ } | undefined;
5042
+ readonly maskingRule?: {
5043
+ field: string;
5044
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5045
+ preserveFormat: boolean;
5046
+ preserveLength: boolean;
5047
+ pattern?: string | undefined;
5048
+ roles?: string[] | undefined;
5049
+ exemptRoles?: string[] | undefined;
5050
+ } | undefined;
5051
+ readonly auditTrail?: boolean | undefined;
5052
+ readonly dependencies?: string[] | undefined;
5053
+ readonly cached?: {
5054
+ enabled: boolean;
5055
+ ttl: number;
5056
+ invalidateOn: string[];
5057
+ } | undefined;
5058
+ readonly dataQuality?: {
5059
+ uniqueness: boolean;
5060
+ completeness: number;
5061
+ accuracy?: {
5062
+ source: string;
5063
+ threshold: number;
5064
+ } | undefined;
5065
+ } | undefined;
5066
+ readonly group?: string | undefined;
5067
+ readonly conditionalRequired?: string | undefined;
5068
+ readonly hidden?: boolean | undefined;
5069
+ readonly sortable?: boolean | undefined;
5070
+ readonly inlineHelpText?: string | undefined;
5071
+ readonly trackFeedHistory?: boolean | undefined;
5072
+ readonly caseSensitive?: boolean | undefined;
5073
+ readonly autonumberFormat?: string | undefined;
5074
+ readonly index?: boolean | undefined;
5075
+ readonly externalId?: boolean | undefined;
5076
+ readonly type: "text";
5077
+ };
5078
+ /** Metadata type (denormalized for easier querying) */
5079
+ readonly type: {
5080
+ readonly format?: string | undefined;
5081
+ readonly expression?: string | undefined;
5082
+ readonly readonly?: boolean | undefined;
5083
+ readonly defaultValue?: unknown;
5084
+ readonly min?: number | undefined;
5085
+ readonly max?: number | undefined;
5086
+ readonly name?: string | undefined;
5087
+ readonly encryptionConfig?: {
5088
+ enabled: boolean;
5089
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5090
+ keyManagement: {
5091
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5092
+ keyId?: string | undefined;
5093
+ rotationPolicy?: {
5094
+ enabled: boolean;
5095
+ frequencyDays: number;
5096
+ retainOldVersions: number;
5097
+ autoRotate: boolean;
5098
+ } | undefined;
5099
+ };
5100
+ scope: "table" | "record" | "field" | "database";
5101
+ deterministicEncryption: boolean;
5102
+ searchableEncryption: boolean;
5103
+ } | undefined;
5104
+ readonly label?: string | undefined;
5105
+ readonly precision?: number | undefined;
5106
+ readonly description?: string | undefined;
5107
+ readonly columnName?: string | undefined;
5108
+ readonly required?: boolean | undefined;
5109
+ readonly searchable?: boolean | undefined;
5110
+ readonly multiple?: boolean | undefined;
5111
+ readonly unique?: boolean | undefined;
5112
+ readonly maxLength?: number | undefined;
5113
+ readonly minLength?: number | undefined;
5114
+ readonly scale?: number | undefined;
5115
+ readonly options?: {
5116
+ label: string;
5117
+ value: string;
5118
+ color?: string | undefined;
5119
+ default?: boolean | undefined;
5120
+ }[] | undefined;
5121
+ readonly reference?: string | undefined;
5122
+ readonly referenceFilters?: string[] | undefined;
5123
+ readonly writeRequiresMasterRead?: boolean | undefined;
5124
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5125
+ readonly summaryOperations?: {
5126
+ object: string;
5127
+ field: string;
5128
+ function: "count" | "sum" | "avg" | "min" | "max";
5129
+ } | undefined;
5130
+ readonly language?: string | undefined;
5131
+ readonly theme?: string | undefined;
5132
+ readonly lineNumbers?: boolean | undefined;
5133
+ readonly maxRating?: number | undefined;
5134
+ readonly allowHalf?: boolean | undefined;
5135
+ readonly displayMap?: boolean | undefined;
5136
+ readonly allowGeocoding?: boolean | undefined;
5137
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5138
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5139
+ readonly allowAlpha?: boolean | undefined;
5140
+ readonly presetColors?: string[] | undefined;
5141
+ readonly step?: number | undefined;
5142
+ readonly showValue?: boolean | undefined;
5143
+ readonly marks?: Record<string, string> | undefined;
5144
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5145
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5146
+ readonly displayValue?: boolean | undefined;
5147
+ readonly allowScanning?: boolean | undefined;
5148
+ readonly currencyConfig?: {
5149
+ precision: number;
5150
+ currencyMode: "dynamic" | "fixed";
5151
+ defaultCurrency: string;
5152
+ } | undefined;
5153
+ readonly vectorConfig?: {
5154
+ dimensions: number;
5155
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5156
+ normalized: boolean;
5157
+ indexed: boolean;
5158
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5159
+ } | undefined;
5160
+ readonly fileAttachmentConfig?: {
5161
+ virusScan: boolean;
5162
+ virusScanOnUpload: boolean;
5163
+ quarantineOnThreat: boolean;
5164
+ allowMultiple: boolean;
5165
+ allowReplace: boolean;
5166
+ allowDelete: boolean;
5167
+ requireUpload: boolean;
5168
+ extractMetadata: boolean;
5169
+ extractText: boolean;
5170
+ versioningEnabled: boolean;
5171
+ publicRead: boolean;
5172
+ presignedUrlExpiry: number;
5173
+ minSize?: number | undefined;
5174
+ maxSize?: number | undefined;
5175
+ allowedTypes?: string[] | undefined;
5176
+ blockedTypes?: string[] | undefined;
5177
+ allowedMimeTypes?: string[] | undefined;
5178
+ blockedMimeTypes?: string[] | undefined;
5179
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5180
+ storageProvider?: string | undefined;
5181
+ storageBucket?: string | undefined;
5182
+ storagePrefix?: string | undefined;
5183
+ imageValidation?: {
5184
+ generateThumbnails: boolean;
5185
+ preserveMetadata: boolean;
5186
+ autoRotate: boolean;
5187
+ minWidth?: number | undefined;
5188
+ maxWidth?: number | undefined;
5189
+ minHeight?: number | undefined;
5190
+ maxHeight?: number | undefined;
5191
+ aspectRatio?: string | undefined;
5192
+ thumbnailSizes?: {
5193
+ name: string;
5194
+ width: number;
5195
+ height: number;
5196
+ crop: boolean;
5197
+ }[] | undefined;
5198
+ } | undefined;
5199
+ maxVersions?: number | undefined;
5200
+ } | undefined;
5201
+ readonly maskingRule?: {
5202
+ field: string;
5203
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5204
+ preserveFormat: boolean;
5205
+ preserveLength: boolean;
5206
+ pattern?: string | undefined;
5207
+ roles?: string[] | undefined;
5208
+ exemptRoles?: string[] | undefined;
5209
+ } | undefined;
5210
+ readonly auditTrail?: boolean | undefined;
5211
+ readonly dependencies?: string[] | undefined;
5212
+ readonly cached?: {
5213
+ enabled: boolean;
5214
+ ttl: number;
5215
+ invalidateOn: string[];
5216
+ } | undefined;
5217
+ readonly dataQuality?: {
5218
+ uniqueness: boolean;
5219
+ completeness: number;
5220
+ accuracy?: {
5221
+ source: string;
5222
+ threshold: number;
5223
+ } | undefined;
5224
+ } | undefined;
5225
+ readonly group?: string | undefined;
5226
+ readonly conditionalRequired?: string | undefined;
5227
+ readonly hidden?: boolean | undefined;
5228
+ readonly sortable?: boolean | undefined;
5229
+ readonly inlineHelpText?: string | undefined;
5230
+ readonly trackFeedHistory?: boolean | undefined;
5231
+ readonly caseSensitive?: boolean | undefined;
5232
+ readonly autonumberFormat?: string | undefined;
5233
+ readonly index?: boolean | undefined;
5234
+ readonly externalId?: boolean | undefined;
5235
+ readonly type: "text";
5236
+ };
5237
+ /** Version number at this snapshot */
5238
+ readonly version: {
5239
+ readonly format?: string | undefined;
5240
+ readonly expression?: string | undefined;
5241
+ readonly readonly?: boolean | undefined;
5242
+ readonly defaultValue?: unknown;
5243
+ readonly min?: number | undefined;
5244
+ readonly max?: number | undefined;
5245
+ readonly name?: string | undefined;
5246
+ readonly encryptionConfig?: {
5247
+ enabled: boolean;
5248
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5249
+ keyManagement: {
5250
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5251
+ keyId?: string | undefined;
5252
+ rotationPolicy?: {
5253
+ enabled: boolean;
5254
+ frequencyDays: number;
5255
+ retainOldVersions: number;
5256
+ autoRotate: boolean;
5257
+ } | undefined;
5258
+ };
5259
+ scope: "table" | "record" | "field" | "database";
5260
+ deterministicEncryption: boolean;
5261
+ searchableEncryption: boolean;
5262
+ } | undefined;
5263
+ readonly label?: string | undefined;
5264
+ readonly precision?: number | undefined;
5265
+ readonly description?: string | undefined;
5266
+ readonly columnName?: string | undefined;
5267
+ readonly required?: boolean | undefined;
5268
+ readonly searchable?: boolean | undefined;
5269
+ readonly multiple?: boolean | undefined;
5270
+ readonly unique?: boolean | undefined;
5271
+ readonly maxLength?: number | undefined;
5272
+ readonly minLength?: number | undefined;
5273
+ readonly scale?: number | undefined;
5274
+ readonly options?: {
5275
+ label: string;
5276
+ value: string;
5277
+ color?: string | undefined;
5278
+ default?: boolean | undefined;
5279
+ }[] | undefined;
5280
+ readonly reference?: string | undefined;
5281
+ readonly referenceFilters?: string[] | undefined;
5282
+ readonly writeRequiresMasterRead?: boolean | undefined;
5283
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5284
+ readonly summaryOperations?: {
5285
+ object: string;
5286
+ field: string;
5287
+ function: "count" | "sum" | "avg" | "min" | "max";
5288
+ } | undefined;
5289
+ readonly language?: string | undefined;
5290
+ readonly theme?: string | undefined;
5291
+ readonly lineNumbers?: boolean | undefined;
5292
+ readonly maxRating?: number | undefined;
5293
+ readonly allowHalf?: boolean | undefined;
5294
+ readonly displayMap?: boolean | undefined;
5295
+ readonly allowGeocoding?: boolean | undefined;
5296
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5297
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5298
+ readonly allowAlpha?: boolean | undefined;
5299
+ readonly presetColors?: string[] | undefined;
5300
+ readonly step?: number | undefined;
5301
+ readonly showValue?: boolean | undefined;
5302
+ readonly marks?: Record<string, string> | undefined;
5303
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5304
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5305
+ readonly displayValue?: boolean | undefined;
5306
+ readonly allowScanning?: boolean | undefined;
5307
+ readonly currencyConfig?: {
5308
+ precision: number;
5309
+ currencyMode: "dynamic" | "fixed";
5310
+ defaultCurrency: string;
5311
+ } | undefined;
5312
+ readonly vectorConfig?: {
5313
+ dimensions: number;
5314
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5315
+ normalized: boolean;
5316
+ indexed: boolean;
5317
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5318
+ } | undefined;
5319
+ readonly fileAttachmentConfig?: {
5320
+ virusScan: boolean;
5321
+ virusScanOnUpload: boolean;
5322
+ quarantineOnThreat: boolean;
5323
+ allowMultiple: boolean;
5324
+ allowReplace: boolean;
5325
+ allowDelete: boolean;
5326
+ requireUpload: boolean;
5327
+ extractMetadata: boolean;
5328
+ extractText: boolean;
5329
+ versioningEnabled: boolean;
5330
+ publicRead: boolean;
5331
+ presignedUrlExpiry: number;
5332
+ minSize?: number | undefined;
5333
+ maxSize?: number | undefined;
5334
+ allowedTypes?: string[] | undefined;
5335
+ blockedTypes?: string[] | undefined;
5336
+ allowedMimeTypes?: string[] | undefined;
5337
+ blockedMimeTypes?: string[] | undefined;
5338
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5339
+ storageProvider?: string | undefined;
5340
+ storageBucket?: string | undefined;
5341
+ storagePrefix?: string | undefined;
5342
+ imageValidation?: {
5343
+ generateThumbnails: boolean;
5344
+ preserveMetadata: boolean;
5345
+ autoRotate: boolean;
5346
+ minWidth?: number | undefined;
5347
+ maxWidth?: number | undefined;
5348
+ minHeight?: number | undefined;
5349
+ maxHeight?: number | undefined;
5350
+ aspectRatio?: string | undefined;
5351
+ thumbnailSizes?: {
5352
+ name: string;
5353
+ width: number;
5354
+ height: number;
5355
+ crop: boolean;
5356
+ }[] | undefined;
5357
+ } | undefined;
5358
+ maxVersions?: number | undefined;
5359
+ } | undefined;
5360
+ readonly maskingRule?: {
5361
+ field: string;
5362
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5363
+ preserveFormat: boolean;
5364
+ preserveLength: boolean;
5365
+ pattern?: string | undefined;
5366
+ roles?: string[] | undefined;
5367
+ exemptRoles?: string[] | undefined;
5368
+ } | undefined;
5369
+ readonly auditTrail?: boolean | undefined;
5370
+ readonly dependencies?: string[] | undefined;
5371
+ readonly cached?: {
5372
+ enabled: boolean;
5373
+ ttl: number;
5374
+ invalidateOn: string[];
5375
+ } | undefined;
5376
+ readonly dataQuality?: {
5377
+ uniqueness: boolean;
5378
+ completeness: number;
5379
+ accuracy?: {
5380
+ source: string;
5381
+ threshold: number;
5382
+ } | undefined;
5383
+ } | undefined;
5384
+ readonly group?: string | undefined;
5385
+ readonly conditionalRequired?: string | undefined;
5386
+ readonly hidden?: boolean | undefined;
5387
+ readonly sortable?: boolean | undefined;
5388
+ readonly inlineHelpText?: string | undefined;
5389
+ readonly trackFeedHistory?: boolean | undefined;
5390
+ readonly caseSensitive?: boolean | undefined;
5391
+ readonly autonumberFormat?: string | undefined;
5392
+ readonly index?: boolean | undefined;
5393
+ readonly externalId?: boolean | undefined;
5394
+ readonly type: "number";
5395
+ };
5396
+ /** Type of operation that created this history entry */
5397
+ readonly operation_type: {
5398
+ readonly format?: string | undefined;
5399
+ readonly expression?: string | undefined;
5400
+ readonly readonly?: boolean | undefined;
5401
+ readonly defaultValue?: unknown;
5402
+ readonly min?: number | undefined;
5403
+ readonly max?: number | undefined;
5404
+ readonly name?: string | undefined;
5405
+ readonly encryptionConfig?: {
5406
+ enabled: boolean;
5407
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5408
+ keyManagement: {
5409
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5410
+ keyId?: string | undefined;
5411
+ rotationPolicy?: {
5412
+ enabled: boolean;
5413
+ frequencyDays: number;
5414
+ retainOldVersions: number;
5415
+ autoRotate: boolean;
5416
+ } | undefined;
5417
+ };
5418
+ scope: "table" | "record" | "field" | "database";
5419
+ deterministicEncryption: boolean;
5420
+ searchableEncryption: boolean;
5421
+ } | undefined;
5422
+ readonly label?: string | undefined;
5423
+ readonly precision?: number | undefined;
5424
+ readonly description?: string | undefined;
5425
+ readonly columnName?: string | undefined;
5426
+ readonly required?: boolean | undefined;
5427
+ readonly searchable?: boolean | undefined;
5428
+ readonly multiple?: boolean | undefined;
5429
+ readonly unique?: boolean | undefined;
5430
+ readonly maxLength?: number | undefined;
5431
+ readonly minLength?: number | undefined;
5432
+ readonly scale?: number | undefined;
5433
+ options: {
5434
+ label: string;
5435
+ value: string;
5436
+ color?: string | undefined;
5437
+ default?: boolean | undefined;
5438
+ }[];
5439
+ readonly reference?: string | undefined;
5440
+ readonly referenceFilters?: string[] | undefined;
5441
+ readonly writeRequiresMasterRead?: boolean | undefined;
5442
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5443
+ readonly summaryOperations?: {
5444
+ object: string;
5445
+ field: string;
5446
+ function: "count" | "sum" | "avg" | "min" | "max";
5447
+ } | undefined;
5448
+ readonly language?: string | undefined;
5449
+ readonly theme?: string | undefined;
5450
+ readonly lineNumbers?: boolean | undefined;
5451
+ readonly maxRating?: number | undefined;
5452
+ readonly allowHalf?: boolean | undefined;
5453
+ readonly displayMap?: boolean | undefined;
5454
+ readonly allowGeocoding?: boolean | undefined;
5455
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5456
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5457
+ readonly allowAlpha?: boolean | undefined;
5458
+ readonly presetColors?: string[] | undefined;
5459
+ readonly step?: number | undefined;
5460
+ readonly showValue?: boolean | undefined;
5461
+ readonly marks?: Record<string, string> | undefined;
5462
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5463
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5464
+ readonly displayValue?: boolean | undefined;
5465
+ readonly allowScanning?: boolean | undefined;
5466
+ readonly currencyConfig?: {
5467
+ precision: number;
5468
+ currencyMode: "dynamic" | "fixed";
5469
+ defaultCurrency: string;
5470
+ } | undefined;
5471
+ readonly vectorConfig?: {
5472
+ dimensions: number;
5473
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5474
+ normalized: boolean;
5475
+ indexed: boolean;
5476
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5477
+ } | undefined;
5478
+ readonly fileAttachmentConfig?: {
5479
+ virusScan: boolean;
5480
+ virusScanOnUpload: boolean;
5481
+ quarantineOnThreat: boolean;
5482
+ allowMultiple: boolean;
5483
+ allowReplace: boolean;
5484
+ allowDelete: boolean;
5485
+ requireUpload: boolean;
5486
+ extractMetadata: boolean;
5487
+ extractText: boolean;
5488
+ versioningEnabled: boolean;
5489
+ publicRead: boolean;
5490
+ presignedUrlExpiry: number;
5491
+ minSize?: number | undefined;
5492
+ maxSize?: number | undefined;
5493
+ allowedTypes?: string[] | undefined;
5494
+ blockedTypes?: string[] | undefined;
5495
+ allowedMimeTypes?: string[] | undefined;
5496
+ blockedMimeTypes?: string[] | undefined;
5497
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5498
+ storageProvider?: string | undefined;
5499
+ storageBucket?: string | undefined;
5500
+ storagePrefix?: string | undefined;
5501
+ imageValidation?: {
5502
+ generateThumbnails: boolean;
5503
+ preserveMetadata: boolean;
5504
+ autoRotate: boolean;
5505
+ minWidth?: number | undefined;
5506
+ maxWidth?: number | undefined;
5507
+ minHeight?: number | undefined;
5508
+ maxHeight?: number | undefined;
5509
+ aspectRatio?: string | undefined;
5510
+ thumbnailSizes?: {
5511
+ name: string;
5512
+ width: number;
5513
+ height: number;
5514
+ crop: boolean;
5515
+ }[] | undefined;
5516
+ } | undefined;
5517
+ maxVersions?: number | undefined;
5518
+ } | undefined;
5519
+ readonly maskingRule?: {
5520
+ field: string;
5521
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5522
+ preserveFormat: boolean;
5523
+ preserveLength: boolean;
5524
+ pattern?: string | undefined;
5525
+ roles?: string[] | undefined;
5526
+ exemptRoles?: string[] | undefined;
5527
+ } | undefined;
5528
+ readonly auditTrail?: boolean | undefined;
5529
+ readonly dependencies?: string[] | undefined;
5530
+ readonly cached?: {
5531
+ enabled: boolean;
5532
+ ttl: number;
5533
+ invalidateOn: string[];
5534
+ } | undefined;
5535
+ readonly dataQuality?: {
5536
+ uniqueness: boolean;
5537
+ completeness: number;
5538
+ accuracy?: {
5539
+ source: string;
5540
+ threshold: number;
5541
+ } | undefined;
5542
+ } | undefined;
5543
+ readonly group?: string | undefined;
5544
+ readonly conditionalRequired?: string | undefined;
5545
+ readonly hidden?: boolean | undefined;
5546
+ readonly sortable?: boolean | undefined;
5547
+ readonly inlineHelpText?: string | undefined;
5548
+ readonly trackFeedHistory?: boolean | undefined;
5549
+ readonly caseSensitive?: boolean | undefined;
5550
+ readonly autonumberFormat?: string | undefined;
5551
+ readonly index?: boolean | undefined;
5552
+ readonly externalId?: boolean | undefined;
5553
+ readonly type: "select";
5554
+ };
5555
+ /** Historical metadata snapshot (JSON payload) */
5556
+ readonly metadata: {
5557
+ readonly format?: string | undefined;
5558
+ readonly expression?: string | undefined;
5559
+ readonly readonly?: boolean | undefined;
5560
+ readonly defaultValue?: unknown;
5561
+ readonly min?: number | undefined;
5562
+ readonly max?: number | undefined;
5563
+ readonly name?: string | undefined;
5564
+ readonly encryptionConfig?: {
5565
+ enabled: boolean;
5566
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5567
+ keyManagement: {
5568
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5569
+ keyId?: string | undefined;
5570
+ rotationPolicy?: {
5571
+ enabled: boolean;
5572
+ frequencyDays: number;
5573
+ retainOldVersions: number;
5574
+ autoRotate: boolean;
5575
+ } | undefined;
5576
+ };
5577
+ scope: "table" | "record" | "field" | "database";
5578
+ deterministicEncryption: boolean;
5579
+ searchableEncryption: boolean;
5580
+ } | undefined;
5581
+ readonly label?: string | undefined;
5582
+ readonly precision?: number | undefined;
5583
+ readonly description?: string | undefined;
5584
+ readonly columnName?: string | undefined;
5585
+ readonly required?: boolean | undefined;
5586
+ readonly searchable?: boolean | undefined;
5587
+ readonly multiple?: boolean | undefined;
5588
+ readonly unique?: boolean | undefined;
5589
+ readonly maxLength?: number | undefined;
5590
+ readonly minLength?: number | undefined;
5591
+ readonly scale?: number | undefined;
5592
+ readonly options?: {
5593
+ label: string;
5594
+ value: string;
5595
+ color?: string | undefined;
5596
+ default?: boolean | undefined;
5597
+ }[] | undefined;
5598
+ readonly reference?: string | undefined;
5599
+ readonly referenceFilters?: string[] | undefined;
5600
+ readonly writeRequiresMasterRead?: boolean | undefined;
5601
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5602
+ readonly summaryOperations?: {
5603
+ object: string;
5604
+ field: string;
5605
+ function: "count" | "sum" | "avg" | "min" | "max";
5606
+ } | undefined;
5607
+ readonly language?: string | undefined;
5608
+ readonly theme?: string | undefined;
5609
+ readonly lineNumbers?: boolean | undefined;
5610
+ readonly maxRating?: number | undefined;
5611
+ readonly allowHalf?: boolean | undefined;
5612
+ readonly displayMap?: boolean | undefined;
5613
+ readonly allowGeocoding?: boolean | undefined;
5614
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5615
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5616
+ readonly allowAlpha?: boolean | undefined;
5617
+ readonly presetColors?: string[] | undefined;
5618
+ readonly step?: number | undefined;
5619
+ readonly showValue?: boolean | undefined;
5620
+ readonly marks?: Record<string, string> | undefined;
5621
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5622
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5623
+ readonly displayValue?: boolean | undefined;
5624
+ readonly allowScanning?: boolean | undefined;
5625
+ readonly currencyConfig?: {
5626
+ precision: number;
5627
+ currencyMode: "dynamic" | "fixed";
5628
+ defaultCurrency: string;
5629
+ } | undefined;
5630
+ readonly vectorConfig?: {
5631
+ dimensions: number;
5632
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5633
+ normalized: boolean;
5634
+ indexed: boolean;
5635
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5636
+ } | undefined;
5637
+ readonly fileAttachmentConfig?: {
5638
+ virusScan: boolean;
5639
+ virusScanOnUpload: boolean;
5640
+ quarantineOnThreat: boolean;
5641
+ allowMultiple: boolean;
5642
+ allowReplace: boolean;
5643
+ allowDelete: boolean;
5644
+ requireUpload: boolean;
5645
+ extractMetadata: boolean;
5646
+ extractText: boolean;
5647
+ versioningEnabled: boolean;
5648
+ publicRead: boolean;
5649
+ presignedUrlExpiry: number;
5650
+ minSize?: number | undefined;
5651
+ maxSize?: number | undefined;
5652
+ allowedTypes?: string[] | undefined;
5653
+ blockedTypes?: string[] | undefined;
5654
+ allowedMimeTypes?: string[] | undefined;
5655
+ blockedMimeTypes?: string[] | undefined;
5656
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5657
+ storageProvider?: string | undefined;
5658
+ storageBucket?: string | undefined;
5659
+ storagePrefix?: string | undefined;
5660
+ imageValidation?: {
5661
+ generateThumbnails: boolean;
5662
+ preserveMetadata: boolean;
5663
+ autoRotate: boolean;
5664
+ minWidth?: number | undefined;
5665
+ maxWidth?: number | undefined;
5666
+ minHeight?: number | undefined;
5667
+ maxHeight?: number | undefined;
5668
+ aspectRatio?: string | undefined;
5669
+ thumbnailSizes?: {
5670
+ name: string;
5671
+ width: number;
5672
+ height: number;
5673
+ crop: boolean;
5674
+ }[] | undefined;
5675
+ } | undefined;
5676
+ maxVersions?: number | undefined;
5677
+ } | undefined;
5678
+ readonly maskingRule?: {
5679
+ field: string;
5680
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5681
+ preserveFormat: boolean;
5682
+ preserveLength: boolean;
5683
+ pattern?: string | undefined;
5684
+ roles?: string[] | undefined;
5685
+ exemptRoles?: string[] | undefined;
5686
+ } | undefined;
5687
+ readonly auditTrail?: boolean | undefined;
5688
+ readonly dependencies?: string[] | undefined;
5689
+ readonly cached?: {
5690
+ enabled: boolean;
5691
+ ttl: number;
5692
+ invalidateOn: string[];
5693
+ } | undefined;
5694
+ readonly dataQuality?: {
5695
+ uniqueness: boolean;
5696
+ completeness: number;
5697
+ accuracy?: {
5698
+ source: string;
5699
+ threshold: number;
5700
+ } | undefined;
5701
+ } | undefined;
5702
+ readonly group?: string | undefined;
5703
+ readonly conditionalRequired?: string | undefined;
5704
+ readonly hidden?: boolean | undefined;
5705
+ readonly sortable?: boolean | undefined;
5706
+ readonly inlineHelpText?: string | undefined;
5707
+ readonly trackFeedHistory?: boolean | undefined;
5708
+ readonly caseSensitive?: boolean | undefined;
5709
+ readonly autonumberFormat?: string | undefined;
5710
+ readonly index?: boolean | undefined;
5711
+ readonly externalId?: boolean | undefined;
5712
+ readonly type: "textarea";
5713
+ };
5714
+ /** SHA-256 checksum of metadata content */
5715
+ readonly checksum: {
5716
+ readonly format?: string | undefined;
5717
+ readonly expression?: string | undefined;
5718
+ readonly readonly?: boolean | undefined;
5719
+ readonly defaultValue?: unknown;
5720
+ readonly min?: number | undefined;
5721
+ readonly max?: number | undefined;
5722
+ readonly name?: string | undefined;
5723
+ readonly encryptionConfig?: {
5724
+ enabled: boolean;
5725
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5726
+ keyManagement: {
5727
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5728
+ keyId?: string | undefined;
5729
+ rotationPolicy?: {
5730
+ enabled: boolean;
5731
+ frequencyDays: number;
5732
+ retainOldVersions: number;
5733
+ autoRotate: boolean;
5734
+ } | undefined;
5735
+ };
5736
+ scope: "table" | "record" | "field" | "database";
5737
+ deterministicEncryption: boolean;
5738
+ searchableEncryption: boolean;
5739
+ } | undefined;
5740
+ readonly label?: string | undefined;
5741
+ readonly precision?: number | undefined;
5742
+ readonly description?: string | undefined;
5743
+ readonly columnName?: string | undefined;
5744
+ readonly required?: boolean | undefined;
5745
+ readonly searchable?: boolean | undefined;
5746
+ readonly multiple?: boolean | undefined;
5747
+ readonly unique?: boolean | undefined;
5748
+ readonly maxLength?: number | undefined;
5749
+ readonly minLength?: number | undefined;
5750
+ readonly scale?: number | undefined;
5751
+ readonly options?: {
5752
+ label: string;
5753
+ value: string;
5754
+ color?: string | undefined;
5755
+ default?: boolean | undefined;
5756
+ }[] | undefined;
5757
+ readonly reference?: string | undefined;
5758
+ readonly referenceFilters?: string[] | undefined;
5759
+ readonly writeRequiresMasterRead?: boolean | undefined;
5760
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5761
+ readonly summaryOperations?: {
5762
+ object: string;
5763
+ field: string;
5764
+ function: "count" | "sum" | "avg" | "min" | "max";
5765
+ } | undefined;
5766
+ readonly language?: string | undefined;
5767
+ readonly theme?: string | undefined;
5768
+ readonly lineNumbers?: boolean | undefined;
5769
+ readonly maxRating?: number | undefined;
5770
+ readonly allowHalf?: boolean | undefined;
5771
+ readonly displayMap?: boolean | undefined;
5772
+ readonly allowGeocoding?: boolean | undefined;
5773
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5774
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5775
+ readonly allowAlpha?: boolean | undefined;
5776
+ readonly presetColors?: string[] | undefined;
5777
+ readonly step?: number | undefined;
5778
+ readonly showValue?: boolean | undefined;
5779
+ readonly marks?: Record<string, string> | undefined;
5780
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5781
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5782
+ readonly displayValue?: boolean | undefined;
5783
+ readonly allowScanning?: boolean | undefined;
5784
+ readonly currencyConfig?: {
5785
+ precision: number;
5786
+ currencyMode: "dynamic" | "fixed";
5787
+ defaultCurrency: string;
5788
+ } | undefined;
5789
+ readonly vectorConfig?: {
5790
+ dimensions: number;
5791
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5792
+ normalized: boolean;
5793
+ indexed: boolean;
5794
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5795
+ } | undefined;
5796
+ readonly fileAttachmentConfig?: {
5797
+ virusScan: boolean;
5798
+ virusScanOnUpload: boolean;
5799
+ quarantineOnThreat: boolean;
5800
+ allowMultiple: boolean;
5801
+ allowReplace: boolean;
5802
+ allowDelete: boolean;
5803
+ requireUpload: boolean;
5804
+ extractMetadata: boolean;
5805
+ extractText: boolean;
5806
+ versioningEnabled: boolean;
5807
+ publicRead: boolean;
5808
+ presignedUrlExpiry: number;
5809
+ minSize?: number | undefined;
5810
+ maxSize?: number | undefined;
5811
+ allowedTypes?: string[] | undefined;
5812
+ blockedTypes?: string[] | undefined;
5813
+ allowedMimeTypes?: string[] | undefined;
5814
+ blockedMimeTypes?: string[] | undefined;
5815
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5816
+ storageProvider?: string | undefined;
5817
+ storageBucket?: string | undefined;
5818
+ storagePrefix?: string | undefined;
5819
+ imageValidation?: {
5820
+ generateThumbnails: boolean;
5821
+ preserveMetadata: boolean;
5822
+ autoRotate: boolean;
5823
+ minWidth?: number | undefined;
5824
+ maxWidth?: number | undefined;
5825
+ minHeight?: number | undefined;
5826
+ maxHeight?: number | undefined;
5827
+ aspectRatio?: string | undefined;
5828
+ thumbnailSizes?: {
5829
+ name: string;
5830
+ width: number;
5831
+ height: number;
5832
+ crop: boolean;
5833
+ }[] | undefined;
5834
+ } | undefined;
5835
+ maxVersions?: number | undefined;
5836
+ } | undefined;
5837
+ readonly maskingRule?: {
5838
+ field: string;
5839
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5840
+ preserveFormat: boolean;
5841
+ preserveLength: boolean;
5842
+ pattern?: string | undefined;
5843
+ roles?: string[] | undefined;
5844
+ exemptRoles?: string[] | undefined;
5845
+ } | undefined;
5846
+ readonly auditTrail?: boolean | undefined;
5847
+ readonly dependencies?: string[] | undefined;
5848
+ readonly cached?: {
5849
+ enabled: boolean;
5850
+ ttl: number;
5851
+ invalidateOn: string[];
5852
+ } | undefined;
5853
+ readonly dataQuality?: {
5854
+ uniqueness: boolean;
5855
+ completeness: number;
5856
+ accuracy?: {
5857
+ source: string;
5858
+ threshold: number;
5859
+ } | undefined;
5860
+ } | undefined;
5861
+ readonly group?: string | undefined;
5862
+ readonly conditionalRequired?: string | undefined;
5863
+ readonly hidden?: boolean | undefined;
5864
+ readonly sortable?: boolean | undefined;
5865
+ readonly inlineHelpText?: string | undefined;
5866
+ readonly trackFeedHistory?: boolean | undefined;
5867
+ readonly caseSensitive?: boolean | undefined;
5868
+ readonly autonumberFormat?: string | undefined;
5869
+ readonly index?: boolean | undefined;
5870
+ readonly externalId?: boolean | undefined;
5871
+ readonly type: "text";
5872
+ };
5873
+ /** Checksum of the previous version */
5874
+ readonly previous_checksum: {
5875
+ readonly format?: string | undefined;
5876
+ readonly expression?: string | undefined;
5877
+ readonly readonly?: boolean | undefined;
5878
+ readonly defaultValue?: unknown;
5879
+ readonly min?: number | undefined;
5880
+ readonly max?: number | undefined;
5881
+ readonly name?: string | undefined;
5882
+ readonly encryptionConfig?: {
5883
+ enabled: boolean;
5884
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5885
+ keyManagement: {
5886
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5887
+ keyId?: string | undefined;
5888
+ rotationPolicy?: {
5889
+ enabled: boolean;
5890
+ frequencyDays: number;
5891
+ retainOldVersions: number;
5892
+ autoRotate: boolean;
5893
+ } | undefined;
5894
+ };
5895
+ scope: "table" | "record" | "field" | "database";
5896
+ deterministicEncryption: boolean;
5897
+ searchableEncryption: boolean;
5898
+ } | undefined;
5899
+ readonly label?: string | undefined;
5900
+ readonly precision?: number | undefined;
5901
+ readonly description?: string | undefined;
5902
+ readonly columnName?: string | undefined;
5903
+ readonly required?: boolean | undefined;
5904
+ readonly searchable?: boolean | undefined;
5905
+ readonly multiple?: boolean | undefined;
5906
+ readonly unique?: boolean | undefined;
5907
+ readonly maxLength?: number | undefined;
5908
+ readonly minLength?: number | undefined;
5909
+ readonly scale?: number | undefined;
5910
+ readonly options?: {
5911
+ label: string;
5912
+ value: string;
5913
+ color?: string | undefined;
5914
+ default?: boolean | undefined;
5915
+ }[] | undefined;
5916
+ readonly reference?: string | undefined;
5917
+ readonly referenceFilters?: string[] | undefined;
5918
+ readonly writeRequiresMasterRead?: boolean | undefined;
5919
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5920
+ readonly summaryOperations?: {
5921
+ object: string;
5922
+ field: string;
5923
+ function: "count" | "sum" | "avg" | "min" | "max";
5924
+ } | undefined;
5925
+ readonly language?: string | undefined;
5926
+ readonly theme?: string | undefined;
5927
+ readonly lineNumbers?: boolean | undefined;
5928
+ readonly maxRating?: number | undefined;
5929
+ readonly allowHalf?: boolean | undefined;
5930
+ readonly displayMap?: boolean | undefined;
5931
+ readonly allowGeocoding?: boolean | undefined;
5932
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5933
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5934
+ readonly allowAlpha?: boolean | undefined;
5935
+ readonly presetColors?: string[] | undefined;
5936
+ readonly step?: number | undefined;
5937
+ readonly showValue?: boolean | undefined;
5938
+ readonly marks?: Record<string, string> | undefined;
5939
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5940
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5941
+ readonly displayValue?: boolean | undefined;
5942
+ readonly allowScanning?: boolean | undefined;
5943
+ readonly currencyConfig?: {
5944
+ precision: number;
5945
+ currencyMode: "dynamic" | "fixed";
5946
+ defaultCurrency: string;
5947
+ } | undefined;
5948
+ readonly vectorConfig?: {
5949
+ dimensions: number;
5950
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5951
+ normalized: boolean;
5952
+ indexed: boolean;
5953
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
5954
+ } | undefined;
5955
+ readonly fileAttachmentConfig?: {
5956
+ virusScan: boolean;
5957
+ virusScanOnUpload: boolean;
5958
+ quarantineOnThreat: boolean;
5959
+ allowMultiple: boolean;
5960
+ allowReplace: boolean;
5961
+ allowDelete: boolean;
5962
+ requireUpload: boolean;
5963
+ extractMetadata: boolean;
5964
+ extractText: boolean;
5965
+ versioningEnabled: boolean;
5966
+ publicRead: boolean;
5967
+ presignedUrlExpiry: number;
5968
+ minSize?: number | undefined;
5969
+ maxSize?: number | undefined;
5970
+ allowedTypes?: string[] | undefined;
5971
+ blockedTypes?: string[] | undefined;
5972
+ allowedMimeTypes?: string[] | undefined;
5973
+ blockedMimeTypes?: string[] | undefined;
5974
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5975
+ storageProvider?: string | undefined;
5976
+ storageBucket?: string | undefined;
5977
+ storagePrefix?: string | undefined;
5978
+ imageValidation?: {
5979
+ generateThumbnails: boolean;
5980
+ preserveMetadata: boolean;
5981
+ autoRotate: boolean;
5982
+ minWidth?: number | undefined;
5983
+ maxWidth?: number | undefined;
5984
+ minHeight?: number | undefined;
5985
+ maxHeight?: number | undefined;
5986
+ aspectRatio?: string | undefined;
5987
+ thumbnailSizes?: {
5988
+ name: string;
5989
+ width: number;
5990
+ height: number;
5991
+ crop: boolean;
5992
+ }[] | undefined;
5993
+ } | undefined;
5994
+ maxVersions?: number | undefined;
5995
+ } | undefined;
5996
+ readonly maskingRule?: {
5997
+ field: string;
5998
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
5999
+ preserveFormat: boolean;
6000
+ preserveLength: boolean;
6001
+ pattern?: string | undefined;
6002
+ roles?: string[] | undefined;
6003
+ exemptRoles?: string[] | undefined;
6004
+ } | undefined;
6005
+ readonly auditTrail?: boolean | undefined;
6006
+ readonly dependencies?: string[] | undefined;
6007
+ readonly cached?: {
6008
+ enabled: boolean;
6009
+ ttl: number;
6010
+ invalidateOn: string[];
6011
+ } | undefined;
6012
+ readonly dataQuality?: {
6013
+ uniqueness: boolean;
6014
+ completeness: number;
6015
+ accuracy?: {
6016
+ source: string;
6017
+ threshold: number;
6018
+ } | undefined;
6019
+ } | undefined;
6020
+ readonly group?: string | undefined;
6021
+ readonly conditionalRequired?: string | undefined;
6022
+ readonly hidden?: boolean | undefined;
6023
+ readonly sortable?: boolean | undefined;
6024
+ readonly inlineHelpText?: string | undefined;
6025
+ readonly trackFeedHistory?: boolean | undefined;
6026
+ readonly caseSensitive?: boolean | undefined;
6027
+ readonly autonumberFormat?: string | undefined;
6028
+ readonly index?: boolean | undefined;
6029
+ readonly externalId?: boolean | undefined;
6030
+ readonly type: "text";
6031
+ };
6032
+ /** Human-readable description of changes */
6033
+ readonly change_note: {
6034
+ readonly format?: string | undefined;
6035
+ readonly expression?: string | undefined;
6036
+ readonly readonly?: boolean | undefined;
6037
+ readonly defaultValue?: unknown;
6038
+ readonly min?: number | undefined;
6039
+ readonly max?: number | undefined;
6040
+ readonly name?: string | undefined;
6041
+ readonly encryptionConfig?: {
6042
+ enabled: boolean;
6043
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6044
+ keyManagement: {
6045
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6046
+ keyId?: string | undefined;
6047
+ rotationPolicy?: {
6048
+ enabled: boolean;
6049
+ frequencyDays: number;
6050
+ retainOldVersions: number;
6051
+ autoRotate: boolean;
6052
+ } | undefined;
6053
+ };
6054
+ scope: "table" | "record" | "field" | "database";
6055
+ deterministicEncryption: boolean;
6056
+ searchableEncryption: boolean;
6057
+ } | undefined;
6058
+ readonly label?: string | undefined;
6059
+ readonly precision?: number | undefined;
6060
+ readonly description?: string | undefined;
6061
+ readonly columnName?: string | undefined;
6062
+ readonly required?: boolean | undefined;
6063
+ readonly searchable?: boolean | undefined;
6064
+ readonly multiple?: boolean | undefined;
6065
+ readonly unique?: boolean | undefined;
6066
+ readonly maxLength?: number | undefined;
6067
+ readonly minLength?: number | undefined;
6068
+ readonly scale?: number | undefined;
6069
+ readonly options?: {
6070
+ label: string;
6071
+ value: string;
6072
+ color?: string | undefined;
6073
+ default?: boolean | undefined;
6074
+ }[] | undefined;
6075
+ readonly reference?: string | undefined;
6076
+ readonly referenceFilters?: string[] | undefined;
6077
+ readonly writeRequiresMasterRead?: boolean | undefined;
6078
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6079
+ readonly summaryOperations?: {
6080
+ object: string;
6081
+ field: string;
6082
+ function: "count" | "sum" | "avg" | "min" | "max";
6083
+ } | undefined;
6084
+ readonly language?: string | undefined;
6085
+ readonly theme?: string | undefined;
6086
+ readonly lineNumbers?: boolean | undefined;
6087
+ readonly maxRating?: number | undefined;
6088
+ readonly allowHalf?: boolean | undefined;
6089
+ readonly displayMap?: boolean | undefined;
6090
+ readonly allowGeocoding?: boolean | undefined;
6091
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6092
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6093
+ readonly allowAlpha?: boolean | undefined;
6094
+ readonly presetColors?: string[] | undefined;
6095
+ readonly step?: number | undefined;
6096
+ readonly showValue?: boolean | undefined;
6097
+ readonly marks?: Record<string, string> | undefined;
6098
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6099
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6100
+ readonly displayValue?: boolean | undefined;
6101
+ readonly allowScanning?: boolean | undefined;
6102
+ readonly currencyConfig?: {
6103
+ precision: number;
6104
+ currencyMode: "dynamic" | "fixed";
6105
+ defaultCurrency: string;
6106
+ } | undefined;
6107
+ readonly vectorConfig?: {
6108
+ dimensions: number;
6109
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6110
+ normalized: boolean;
6111
+ indexed: boolean;
6112
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
6113
+ } | undefined;
6114
+ readonly fileAttachmentConfig?: {
6115
+ virusScan: boolean;
6116
+ virusScanOnUpload: boolean;
6117
+ quarantineOnThreat: boolean;
6118
+ allowMultiple: boolean;
6119
+ allowReplace: boolean;
6120
+ allowDelete: boolean;
6121
+ requireUpload: boolean;
6122
+ extractMetadata: boolean;
6123
+ extractText: boolean;
6124
+ versioningEnabled: boolean;
6125
+ publicRead: boolean;
6126
+ presignedUrlExpiry: number;
6127
+ minSize?: number | undefined;
6128
+ maxSize?: number | undefined;
6129
+ allowedTypes?: string[] | undefined;
6130
+ blockedTypes?: string[] | undefined;
6131
+ allowedMimeTypes?: string[] | undefined;
6132
+ blockedMimeTypes?: string[] | undefined;
6133
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6134
+ storageProvider?: string | undefined;
6135
+ storageBucket?: string | undefined;
6136
+ storagePrefix?: string | undefined;
6137
+ imageValidation?: {
6138
+ generateThumbnails: boolean;
6139
+ preserveMetadata: boolean;
6140
+ autoRotate: boolean;
6141
+ minWidth?: number | undefined;
6142
+ maxWidth?: number | undefined;
6143
+ minHeight?: number | undefined;
6144
+ maxHeight?: number | undefined;
6145
+ aspectRatio?: string | undefined;
6146
+ thumbnailSizes?: {
6147
+ name: string;
6148
+ width: number;
6149
+ height: number;
6150
+ crop: boolean;
6151
+ }[] | undefined;
6152
+ } | undefined;
6153
+ maxVersions?: number | undefined;
6154
+ } | undefined;
6155
+ readonly maskingRule?: {
6156
+ field: string;
6157
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
6158
+ preserveFormat: boolean;
6159
+ preserveLength: boolean;
6160
+ pattern?: string | undefined;
6161
+ roles?: string[] | undefined;
6162
+ exemptRoles?: string[] | undefined;
6163
+ } | undefined;
6164
+ readonly auditTrail?: boolean | undefined;
6165
+ readonly dependencies?: string[] | undefined;
6166
+ readonly cached?: {
6167
+ enabled: boolean;
6168
+ ttl: number;
6169
+ invalidateOn: string[];
6170
+ } | undefined;
6171
+ readonly dataQuality?: {
6172
+ uniqueness: boolean;
6173
+ completeness: number;
6174
+ accuracy?: {
6175
+ source: string;
6176
+ threshold: number;
6177
+ } | undefined;
6178
+ } | undefined;
6179
+ readonly group?: string | undefined;
6180
+ readonly conditionalRequired?: string | undefined;
6181
+ readonly hidden?: boolean | undefined;
6182
+ readonly sortable?: boolean | undefined;
6183
+ readonly inlineHelpText?: string | undefined;
6184
+ readonly trackFeedHistory?: boolean | undefined;
6185
+ readonly caseSensitive?: boolean | undefined;
6186
+ readonly autonumberFormat?: string | undefined;
6187
+ readonly index?: boolean | undefined;
6188
+ readonly externalId?: boolean | undefined;
6189
+ readonly type: "textarea";
6190
+ };
6191
+ /** Tenant ID for multi-tenant isolation */
6192
+ readonly tenant_id: {
6193
+ readonly format?: string | undefined;
6194
+ readonly expression?: string | undefined;
6195
+ readonly readonly?: boolean | undefined;
6196
+ readonly defaultValue?: unknown;
6197
+ readonly min?: number | undefined;
6198
+ readonly max?: number | undefined;
6199
+ readonly name?: string | undefined;
6200
+ readonly encryptionConfig?: {
6201
+ enabled: boolean;
6202
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6203
+ keyManagement: {
6204
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6205
+ keyId?: string | undefined;
6206
+ rotationPolicy?: {
6207
+ enabled: boolean;
6208
+ frequencyDays: number;
6209
+ retainOldVersions: number;
6210
+ autoRotate: boolean;
6211
+ } | undefined;
6212
+ };
6213
+ scope: "table" | "record" | "field" | "database";
6214
+ deterministicEncryption: boolean;
6215
+ searchableEncryption: boolean;
6216
+ } | undefined;
6217
+ readonly label?: string | undefined;
6218
+ readonly precision?: number | undefined;
6219
+ readonly description?: string | undefined;
6220
+ readonly columnName?: string | undefined;
6221
+ readonly required?: boolean | undefined;
6222
+ readonly searchable?: boolean | undefined;
6223
+ readonly multiple?: boolean | undefined;
6224
+ readonly unique?: boolean | undefined;
6225
+ readonly maxLength?: number | undefined;
6226
+ readonly minLength?: number | undefined;
6227
+ readonly scale?: number | undefined;
6228
+ readonly options?: {
6229
+ label: string;
6230
+ value: string;
6231
+ color?: string | undefined;
6232
+ default?: boolean | undefined;
6233
+ }[] | undefined;
6234
+ readonly reference?: string | undefined;
6235
+ readonly referenceFilters?: string[] | undefined;
6236
+ readonly writeRequiresMasterRead?: boolean | undefined;
6237
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6238
+ readonly summaryOperations?: {
6239
+ object: string;
6240
+ field: string;
6241
+ function: "count" | "sum" | "avg" | "min" | "max";
6242
+ } | undefined;
6243
+ readonly language?: string | undefined;
6244
+ readonly theme?: string | undefined;
6245
+ readonly lineNumbers?: boolean | undefined;
6246
+ readonly maxRating?: number | undefined;
6247
+ readonly allowHalf?: boolean | undefined;
6248
+ readonly displayMap?: boolean | undefined;
6249
+ readonly allowGeocoding?: boolean | undefined;
6250
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6251
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6252
+ readonly allowAlpha?: boolean | undefined;
6253
+ readonly presetColors?: string[] | undefined;
6254
+ readonly step?: number | undefined;
6255
+ readonly showValue?: boolean | undefined;
6256
+ readonly marks?: Record<string, string> | undefined;
6257
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6258
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6259
+ readonly displayValue?: boolean | undefined;
6260
+ readonly allowScanning?: boolean | undefined;
6261
+ readonly currencyConfig?: {
6262
+ precision: number;
6263
+ currencyMode: "dynamic" | "fixed";
6264
+ defaultCurrency: string;
6265
+ } | undefined;
6266
+ readonly vectorConfig?: {
6267
+ dimensions: number;
6268
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6269
+ normalized: boolean;
6270
+ indexed: boolean;
6271
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
6272
+ } | undefined;
6273
+ readonly fileAttachmentConfig?: {
6274
+ virusScan: boolean;
6275
+ virusScanOnUpload: boolean;
6276
+ quarantineOnThreat: boolean;
6277
+ allowMultiple: boolean;
6278
+ allowReplace: boolean;
6279
+ allowDelete: boolean;
6280
+ requireUpload: boolean;
6281
+ extractMetadata: boolean;
6282
+ extractText: boolean;
6283
+ versioningEnabled: boolean;
6284
+ publicRead: boolean;
6285
+ presignedUrlExpiry: number;
6286
+ minSize?: number | undefined;
6287
+ maxSize?: number | undefined;
6288
+ allowedTypes?: string[] | undefined;
6289
+ blockedTypes?: string[] | undefined;
6290
+ allowedMimeTypes?: string[] | undefined;
6291
+ blockedMimeTypes?: string[] | undefined;
6292
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6293
+ storageProvider?: string | undefined;
6294
+ storageBucket?: string | undefined;
6295
+ storagePrefix?: string | undefined;
6296
+ imageValidation?: {
6297
+ generateThumbnails: boolean;
6298
+ preserveMetadata: boolean;
6299
+ autoRotate: boolean;
6300
+ minWidth?: number | undefined;
6301
+ maxWidth?: number | undefined;
6302
+ minHeight?: number | undefined;
6303
+ maxHeight?: number | undefined;
6304
+ aspectRatio?: string | undefined;
6305
+ thumbnailSizes?: {
6306
+ name: string;
6307
+ width: number;
6308
+ height: number;
6309
+ crop: boolean;
6310
+ }[] | undefined;
6311
+ } | undefined;
6312
+ maxVersions?: number | undefined;
6313
+ } | undefined;
6314
+ readonly maskingRule?: {
6315
+ field: string;
6316
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
6317
+ preserveFormat: boolean;
6318
+ preserveLength: boolean;
6319
+ pattern?: string | undefined;
6320
+ roles?: string[] | undefined;
6321
+ exemptRoles?: string[] | undefined;
6322
+ } | undefined;
6323
+ readonly auditTrail?: boolean | undefined;
6324
+ readonly dependencies?: string[] | undefined;
6325
+ readonly cached?: {
6326
+ enabled: boolean;
6327
+ ttl: number;
6328
+ invalidateOn: string[];
6329
+ } | undefined;
6330
+ readonly dataQuality?: {
6331
+ uniqueness: boolean;
6332
+ completeness: number;
6333
+ accuracy?: {
6334
+ source: string;
6335
+ threshold: number;
6336
+ } | undefined;
6337
+ } | undefined;
6338
+ readonly group?: string | undefined;
6339
+ readonly conditionalRequired?: string | undefined;
6340
+ readonly hidden?: boolean | undefined;
6341
+ readonly sortable?: boolean | undefined;
6342
+ readonly inlineHelpText?: string | undefined;
6343
+ readonly trackFeedHistory?: boolean | undefined;
6344
+ readonly caseSensitive?: boolean | undefined;
6345
+ readonly autonumberFormat?: string | undefined;
6346
+ readonly index?: boolean | undefined;
6347
+ readonly externalId?: boolean | undefined;
6348
+ readonly type: "text";
6349
+ };
6350
+ /** User who made this change */
6351
+ readonly recorded_by: {
6352
+ readonly format?: string | undefined;
6353
+ readonly expression?: string | undefined;
6354
+ readonly readonly?: boolean | undefined;
6355
+ readonly defaultValue?: unknown;
6356
+ readonly min?: number | undefined;
6357
+ readonly max?: number | undefined;
6358
+ readonly name?: string | undefined;
6359
+ readonly encryptionConfig?: {
6360
+ enabled: boolean;
6361
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6362
+ keyManagement: {
6363
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6364
+ keyId?: string | undefined;
6365
+ rotationPolicy?: {
6366
+ enabled: boolean;
6367
+ frequencyDays: number;
6368
+ retainOldVersions: number;
6369
+ autoRotate: boolean;
6370
+ } | undefined;
6371
+ };
6372
+ scope: "table" | "record" | "field" | "database";
6373
+ deterministicEncryption: boolean;
6374
+ searchableEncryption: boolean;
6375
+ } | undefined;
6376
+ readonly label?: string | undefined;
6377
+ readonly precision?: number | undefined;
6378
+ readonly description?: string | undefined;
6379
+ readonly columnName?: string | undefined;
6380
+ readonly required?: boolean | undefined;
6381
+ readonly searchable?: boolean | undefined;
6382
+ readonly multiple?: boolean | undefined;
6383
+ readonly unique?: boolean | undefined;
6384
+ readonly maxLength?: number | undefined;
6385
+ readonly minLength?: number | undefined;
6386
+ readonly scale?: number | undefined;
6387
+ readonly options?: {
6388
+ label: string;
6389
+ value: string;
6390
+ color?: string | undefined;
6391
+ default?: boolean | undefined;
6392
+ }[] | undefined;
6393
+ readonly reference?: string | undefined;
6394
+ readonly referenceFilters?: string[] | undefined;
6395
+ readonly writeRequiresMasterRead?: boolean | undefined;
6396
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6397
+ readonly summaryOperations?: {
6398
+ object: string;
6399
+ field: string;
6400
+ function: "count" | "sum" | "avg" | "min" | "max";
6401
+ } | undefined;
6402
+ readonly language?: string | undefined;
6403
+ readonly theme?: string | undefined;
6404
+ readonly lineNumbers?: boolean | undefined;
6405
+ readonly maxRating?: number | undefined;
6406
+ readonly allowHalf?: boolean | undefined;
6407
+ readonly displayMap?: boolean | undefined;
6408
+ readonly allowGeocoding?: boolean | undefined;
6409
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6410
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6411
+ readonly allowAlpha?: boolean | undefined;
6412
+ readonly presetColors?: string[] | undefined;
6413
+ readonly step?: number | undefined;
6414
+ readonly showValue?: boolean | undefined;
6415
+ readonly marks?: Record<string, string> | undefined;
6416
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6417
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6418
+ readonly displayValue?: boolean | undefined;
6419
+ readonly allowScanning?: boolean | undefined;
6420
+ readonly currencyConfig?: {
6421
+ precision: number;
6422
+ currencyMode: "dynamic" | "fixed";
6423
+ defaultCurrency: string;
6424
+ } | undefined;
6425
+ readonly vectorConfig?: {
6426
+ dimensions: number;
6427
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6428
+ normalized: boolean;
6429
+ indexed: boolean;
6430
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
6431
+ } | undefined;
6432
+ readonly fileAttachmentConfig?: {
6433
+ virusScan: boolean;
6434
+ virusScanOnUpload: boolean;
6435
+ quarantineOnThreat: boolean;
6436
+ allowMultiple: boolean;
6437
+ allowReplace: boolean;
6438
+ allowDelete: boolean;
6439
+ requireUpload: boolean;
6440
+ extractMetadata: boolean;
6441
+ extractText: boolean;
6442
+ versioningEnabled: boolean;
6443
+ publicRead: boolean;
6444
+ presignedUrlExpiry: number;
6445
+ minSize?: number | undefined;
6446
+ maxSize?: number | undefined;
6447
+ allowedTypes?: string[] | undefined;
6448
+ blockedTypes?: string[] | undefined;
6449
+ allowedMimeTypes?: string[] | undefined;
6450
+ blockedMimeTypes?: string[] | undefined;
6451
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6452
+ storageProvider?: string | undefined;
6453
+ storageBucket?: string | undefined;
6454
+ storagePrefix?: string | undefined;
6455
+ imageValidation?: {
6456
+ generateThumbnails: boolean;
6457
+ preserveMetadata: boolean;
6458
+ autoRotate: boolean;
6459
+ minWidth?: number | undefined;
6460
+ maxWidth?: number | undefined;
6461
+ minHeight?: number | undefined;
6462
+ maxHeight?: number | undefined;
6463
+ aspectRatio?: string | undefined;
6464
+ thumbnailSizes?: {
6465
+ name: string;
6466
+ width: number;
6467
+ height: number;
6468
+ crop: boolean;
6469
+ }[] | undefined;
6470
+ } | undefined;
6471
+ maxVersions?: number | undefined;
6472
+ } | undefined;
6473
+ readonly maskingRule?: {
6474
+ field: string;
6475
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
6476
+ preserveFormat: boolean;
6477
+ preserveLength: boolean;
6478
+ pattern?: string | undefined;
6479
+ roles?: string[] | undefined;
6480
+ exemptRoles?: string[] | undefined;
6481
+ } | undefined;
6482
+ readonly auditTrail?: boolean | undefined;
6483
+ readonly dependencies?: string[] | undefined;
6484
+ readonly cached?: {
6485
+ enabled: boolean;
6486
+ ttl: number;
6487
+ invalidateOn: string[];
6488
+ } | undefined;
6489
+ readonly dataQuality?: {
6490
+ uniqueness: boolean;
6491
+ completeness: number;
6492
+ accuracy?: {
6493
+ source: string;
6494
+ threshold: number;
6495
+ } | undefined;
6496
+ } | undefined;
6497
+ readonly group?: string | undefined;
6498
+ readonly conditionalRequired?: string | undefined;
6499
+ readonly hidden?: boolean | undefined;
6500
+ readonly sortable?: boolean | undefined;
6501
+ readonly inlineHelpText?: string | undefined;
6502
+ readonly trackFeedHistory?: boolean | undefined;
6503
+ readonly caseSensitive?: boolean | undefined;
6504
+ readonly autonumberFormat?: string | undefined;
6505
+ readonly index?: boolean | undefined;
6506
+ readonly externalId?: boolean | undefined;
6507
+ readonly type: "text";
6508
+ };
6509
+ /** When was this version recorded */
6510
+ readonly recorded_at: {
6511
+ readonly format?: string | undefined;
6512
+ readonly expression?: string | undefined;
6513
+ readonly readonly?: boolean | undefined;
6514
+ readonly defaultValue?: unknown;
6515
+ readonly min?: number | undefined;
6516
+ readonly max?: number | undefined;
6517
+ readonly name?: string | undefined;
6518
+ readonly encryptionConfig?: {
6519
+ enabled: boolean;
6520
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6521
+ keyManagement: {
6522
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6523
+ keyId?: string | undefined;
6524
+ rotationPolicy?: {
6525
+ enabled: boolean;
6526
+ frequencyDays: number;
6527
+ retainOldVersions: number;
6528
+ autoRotate: boolean;
6529
+ } | undefined;
6530
+ };
6531
+ scope: "table" | "record" | "field" | "database";
6532
+ deterministicEncryption: boolean;
6533
+ searchableEncryption: boolean;
6534
+ } | undefined;
6535
+ readonly label?: string | undefined;
6536
+ readonly precision?: number | undefined;
6537
+ readonly description?: string | undefined;
6538
+ readonly columnName?: string | undefined;
6539
+ readonly required?: boolean | undefined;
6540
+ readonly searchable?: boolean | undefined;
6541
+ readonly multiple?: boolean | undefined;
6542
+ readonly unique?: boolean | undefined;
6543
+ readonly maxLength?: number | undefined;
6544
+ readonly minLength?: number | undefined;
6545
+ readonly scale?: number | undefined;
6546
+ readonly options?: {
6547
+ label: string;
6548
+ value: string;
6549
+ color?: string | undefined;
6550
+ default?: boolean | undefined;
6551
+ }[] | undefined;
6552
+ readonly reference?: string | undefined;
6553
+ readonly referenceFilters?: string[] | undefined;
6554
+ readonly writeRequiresMasterRead?: boolean | undefined;
6555
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6556
+ readonly summaryOperations?: {
6557
+ object: string;
6558
+ field: string;
6559
+ function: "count" | "sum" | "avg" | "min" | "max";
6560
+ } | undefined;
6561
+ readonly language?: string | undefined;
6562
+ readonly theme?: string | undefined;
6563
+ readonly lineNumbers?: boolean | undefined;
6564
+ readonly maxRating?: number | undefined;
6565
+ readonly allowHalf?: boolean | undefined;
6566
+ readonly displayMap?: boolean | undefined;
6567
+ readonly allowGeocoding?: boolean | undefined;
6568
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6569
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6570
+ readonly allowAlpha?: boolean | undefined;
6571
+ readonly presetColors?: string[] | undefined;
6572
+ readonly step?: number | undefined;
6573
+ readonly showValue?: boolean | undefined;
6574
+ readonly marks?: Record<string, string> | undefined;
6575
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6576
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6577
+ readonly displayValue?: boolean | undefined;
6578
+ readonly allowScanning?: boolean | undefined;
6579
+ readonly currencyConfig?: {
6580
+ precision: number;
6581
+ currencyMode: "dynamic" | "fixed";
6582
+ defaultCurrency: string;
6583
+ } | undefined;
6584
+ readonly vectorConfig?: {
6585
+ dimensions: number;
6586
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6587
+ normalized: boolean;
6588
+ indexed: boolean;
6589
+ indexType?: "hnsw" | "ivfflat" | "flat" | undefined;
6590
+ } | undefined;
6591
+ readonly fileAttachmentConfig?: {
6592
+ virusScan: boolean;
6593
+ virusScanOnUpload: boolean;
6594
+ quarantineOnThreat: boolean;
6595
+ allowMultiple: boolean;
6596
+ allowReplace: boolean;
6597
+ allowDelete: boolean;
6598
+ requireUpload: boolean;
6599
+ extractMetadata: boolean;
6600
+ extractText: boolean;
6601
+ versioningEnabled: boolean;
6602
+ publicRead: boolean;
6603
+ presignedUrlExpiry: number;
6604
+ minSize?: number | undefined;
6605
+ maxSize?: number | undefined;
6606
+ allowedTypes?: string[] | undefined;
6607
+ blockedTypes?: string[] | undefined;
6608
+ allowedMimeTypes?: string[] | undefined;
6609
+ blockedMimeTypes?: string[] | undefined;
6610
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6611
+ storageProvider?: string | undefined;
6612
+ storageBucket?: string | undefined;
6613
+ storagePrefix?: string | undefined;
6614
+ imageValidation?: {
6615
+ generateThumbnails: boolean;
6616
+ preserveMetadata: boolean;
6617
+ autoRotate: boolean;
6618
+ minWidth?: number | undefined;
6619
+ maxWidth?: number | undefined;
6620
+ minHeight?: number | undefined;
6621
+ maxHeight?: number | undefined;
6622
+ aspectRatio?: string | undefined;
6623
+ thumbnailSizes?: {
6624
+ name: string;
6625
+ width: number;
6626
+ height: number;
6627
+ crop: boolean;
6628
+ }[] | undefined;
6629
+ } | undefined;
6630
+ maxVersions?: number | undefined;
6631
+ } | undefined;
6632
+ readonly maskingRule?: {
6633
+ field: string;
6634
+ strategy: "redact" | "partial" | "hash" | "tokenize" | "randomize" | "nullify" | "substitute";
6635
+ preserveFormat: boolean;
6636
+ preserveLength: boolean;
6637
+ pattern?: string | undefined;
6638
+ roles?: string[] | undefined;
6639
+ exemptRoles?: string[] | undefined;
6640
+ } | undefined;
6641
+ readonly auditTrail?: boolean | undefined;
6642
+ readonly dependencies?: string[] | undefined;
6643
+ readonly cached?: {
6644
+ enabled: boolean;
6645
+ ttl: number;
6646
+ invalidateOn: string[];
6647
+ } | undefined;
6648
+ readonly dataQuality?: {
6649
+ uniqueness: boolean;
6650
+ completeness: number;
6651
+ accuracy?: {
6652
+ source: string;
6653
+ threshold: number;
6654
+ } | undefined;
6655
+ } | undefined;
6656
+ readonly group?: string | undefined;
6657
+ readonly conditionalRequired?: string | undefined;
6658
+ readonly hidden?: boolean | undefined;
6659
+ readonly sortable?: boolean | undefined;
6660
+ readonly inlineHelpText?: string | undefined;
6661
+ readonly trackFeedHistory?: boolean | undefined;
6662
+ readonly caseSensitive?: boolean | undefined;
6663
+ readonly autonumberFormat?: string | undefined;
6664
+ readonly index?: boolean | undefined;
6665
+ readonly externalId?: boolean | undefined;
6666
+ readonly type: "datetime";
6667
+ };
6668
+ };
6669
+ readonly indexes: [{
6670
+ readonly fields: ["metadata_id", "version"];
6671
+ readonly unique: true;
6672
+ }, {
6673
+ readonly fields: ["metadata_id", "recorded_at"];
6674
+ }, {
6675
+ readonly fields: ["type", "name"];
6676
+ }, {
6677
+ readonly fields: ["recorded_at"];
6678
+ }, {
6679
+ readonly fields: ["operation_type"];
6680
+ }, {
6681
+ readonly fields: ["tenant_id"];
6682
+ }];
6683
+ readonly enable: {
6684
+ readonly trackHistory: false;
6685
+ readonly searchable: false;
6686
+ readonly apiEnabled: true;
6687
+ readonly apiMethods: ["get", "list"];
6688
+ readonly trash: false;
6689
+ };
6690
+ }, "fields">;
6691
+
6692
+ /**
6693
+ * Metadata History API Routes
6694
+ *
6695
+ * REST API endpoints for metadata version history, rollback, and diff operations.
6696
+ * These routes extend the standard metadata API with history-specific functionality.
6697
+ *
6698
+ * Routes:
6699
+ * - GET /api/v1/metadata/:type/:name/history - Get version history
6700
+ * - POST /api/v1/metadata/:type/:name/rollback - Rollback to a specific version
6701
+ * - GET /api/v1/metadata/:type/:name/diff - Compare two versions
6702
+ */
6703
+
6704
+ /**
6705
+ * Register metadata history routes on a Hono app or any HTTP server.
6706
+ *
6707
+ * @param app - The HTTP server/router instance (Hono-compatible)
6708
+ * @param metadataService - The metadata service instance
6709
+ */
6710
+ declare function registerMetadataHistoryRoutes(app: any, // Hono app or compatible
6711
+ metadataService: IMetadataService): void;
6712
+
6713
+ /**
6714
+ * Metadata History Utilities
6715
+ *
6716
+ * Utility functions for metadata versioning and history tracking,
6717
+ * including checksum calculation, JSON normalization, and diff generation.
6718
+ */
6719
+ /**
6720
+ * Calculate SHA-256 checksum of normalized JSON metadata.
6721
+ * Normalizes the JSON by sorting keys and removing whitespace
6722
+ * to ensure consistent checksums across identical content.
6723
+ *
6724
+ * @param metadata - The metadata object to checksum
6725
+ * @returns SHA-256 hex string
6726
+ */
6727
+ declare function calculateChecksum(metadata: unknown): Promise<string>;
6728
+ /**
6729
+ * Generate a simple JSON patch between two objects.
6730
+ * Returns an array of operations showing what changed.
6731
+ *
6732
+ * @param oldObj - Original object
6733
+ * @param newObj - New object
6734
+ * @param path - Current path (for recursion)
6735
+ * @returns Array of change operations
6736
+ */
6737
+ declare function generateSimpleDiff(oldObj: unknown, newObj: unknown, path?: string): Array<{
6738
+ op: string;
6739
+ path: string;
6740
+ value?: unknown;
6741
+ oldValue?: unknown;
6742
+ }>;
6743
+ /**
6744
+ * Generate a human-readable summary of changes.
6745
+ *
6746
+ * @param diff - The diff operations
6747
+ * @returns Human-readable summary
6748
+ */
6749
+ declare function generateDiffSummary(diff: Array<{
6750
+ op: string;
6751
+ path: string;
6752
+ value?: unknown;
6753
+ oldValue?: unknown;
6754
+ }>): string;
6755
+
6756
+ /**
6757
+ * History Cleanup Manager
6758
+ *
6759
+ * Handles automatic cleanup of metadata history records based on
6760
+ * configured retention policies.
6761
+ */
6762
+ declare class HistoryCleanupManager {
6763
+ private policy;
6764
+ private dbLoader;
6765
+ private cleanupTimer?;
6766
+ constructor(policy: MetadataHistoryRetentionPolicy, dbLoader: DatabaseLoader);
6767
+ /**
6768
+ * Start automatic cleanup if enabled in the policy.
6769
+ */
6770
+ start(): void;
6771
+ /**
6772
+ * Stop automatic cleanup.
6773
+ */
6774
+ stop(): void;
6775
+ /**
6776
+ * Run cleanup based on the retention policy.
6777
+ * Removes history records that exceed the configured limits.
6778
+ */
6779
+ runCleanup(): Promise<{
6780
+ deleted: number;
6781
+ errors: number;
6782
+ }>;
6783
+ /**
6784
+ * Delete records matching a filter using the most efficient method available on the driver.
6785
+ */
6786
+ private bulkDeleteByFilter;
6787
+ /**
6788
+ * Delete records by IDs using bulkDelete when available, otherwise one-by-one.
6789
+ */
6790
+ private bulkDeleteByIds;
6791
+ /**
6792
+ * Get cleanup statistics without actually deleting anything.
6793
+ * Useful for previewing what would be cleaned up.
6794
+ */
6795
+ getCleanupStats(): Promise<{
6796
+ recordsByAge: number;
6797
+ recordsByCount: number;
6798
+ total: number;
6799
+ }>;
6800
+ }
6801
+
4231
6802
  /**
4232
6803
  * JSON Metadata Serializer
4233
6804
  *
@@ -4283,4 +6854,4 @@ declare class TypeScriptSerializer implements MetadataSerializer {
4283
6854
  getFormat(): MetadataFormat;
4284
6855
  }
4285
6856
 
4286
- export { DatabaseLoader, type DatabaseLoaderOptions, JSONSerializer, MemoryLoader, type MetadataLoader, MetadataManager, type MetadataManagerOptions, MetadataPlugin, type MetadataSerializer, index as Migration, RemoteLoader, type SerializeOptions, SysMetadataObject, TypeScriptSerializer, type WatchCallback, YAMLSerializer };
6857
+ export { DatabaseLoader, type DatabaseLoaderOptions, HistoryCleanupManager, JSONSerializer, MemoryLoader, type MetadataLoader, MetadataManager, type MetadataManagerOptions, MetadataPlugin, type MetadataSerializer, index as Migration, RemoteLoader, type SerializeOptions, SysMetadataHistoryObject, SysMetadataObject, TypeScriptSerializer, type WatchCallback, YAMLSerializer, calculateChecksum, generateDiffSummary, generateSimpleDiff, registerMetadataHistoryRoutes };