@objectstack/service-ai 7.0.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AIToolDefinition, ToolExecutionContext, ToolCallPart, ToolResultPart, IDataEngine, Logger, IAIService, IAIConversationService, LLMAdapter, ModelMessage, AIRequestOptions, AIResult, GenerateObjectOptions, AIObjectResult, TextStreamPart, ToolSet, ChatWithToolsOptions, ProposePendingActionInput, PendingActionStatus, PendingActionRow, AIConversation, IMetadataService, IKnowledgeService, IAutomationService } from '@objectstack/spec/contracts';
1
+ import { AIToolDefinition, ToolExecutionContext, ToolCallPart, ToolResultPart, IDataEngine, Logger, IAIService, IAIConversationService, LLMAdapter, ModelMessage, AIRequestOptions, AIResult, GenerateObjectOptions, AIObjectResult, TextStreamPart, ToolSet, ChatWithToolsOptions, ProposePendingActionInput, PendingActionStatus, PendingActionRow, AIConversation, MessageObservability, IMetadataService, IKnowledgeService, IAutomationService } from '@objectstack/spec/contracts';
2
2
  export { LLMAdapter } from '@objectstack/spec/contracts';
3
3
  import { z } from 'zod';
4
4
  import * as AI from '@objectstack/spec/ai';
@@ -376,6 +376,13 @@ declare class AIService implements IAIService {
376
376
  * precedent set by `ObjectQLTraceRecorder.record`.
377
377
  */
378
378
  private persistMessage;
379
+ /**
380
+ * Build a {@link MessageObservability} payload from an LLM-call result
381
+ * and the wall-clock time it took. Returns `undefined` when there's
382
+ * nothing useful to persist (no usage and no latency) so callers don't
383
+ * need to special-case empty results.
384
+ */
385
+ private static buildObservability;
379
386
  /**
380
387
  * Run an adapter call and emit a trace event.
381
388
  *
@@ -549,6 +556,21 @@ declare class AIServicePlugin implements Plugin {
549
556
  private service?;
550
557
  private readonly options;
551
558
  constructor(options?: AIServicePluginOptions);
559
+ /**
560
+ * OpenAI-compatible preset providers — these all expose `/v1/chat/completions`
561
+ * in OpenAI shape, so we re-use the `@ai-sdk/openai` SDK with a preset
562
+ * base URL. Centralising the mapping here keeps the settings UI ergonomic
563
+ * (operators pick "DeepSeek", not "openai" + a base URL they have to look up)
564
+ * without bloating buildAdapterFromValues with a switch per provider.
565
+ */
566
+ private static readonly OPENAI_COMPATIBLE_PRESETS;
567
+ /**
568
+ * Normalise OpenAI-compatible preset providers (DeepSeek / DashScope /
569
+ * Cloudflare / SiliconFlow / OpenRouter) into the `provider=openai` shape
570
+ * with the appropriate base URL pre-filled. Returns the rewritten values
571
+ * map; non-preset providers pass through unchanged.
572
+ */
573
+ private normalisePresetProvider;
552
574
  /**
553
575
  * Build an LLM adapter from a provider/key/model triple. Used both
554
576
  * by the boot-time auto-detect path and by the live `settings:changed`
@@ -715,7 +737,7 @@ declare class InMemoryConversationService implements IAIConversationService {
715
737
  limit?: number;
716
738
  cursor?: string;
717
739
  }): Promise<AIConversation[]>;
718
- addMessage(conversationId: string, message: ModelMessage): Promise<AIConversation>;
740
+ addMessage(conversationId: string, message: ModelMessage, _extras?: MessageObservability): Promise<AIConversation>;
719
741
  update(conversationId: string, patch: {
720
742
  title?: string;
721
743
  metadata?: Record<string, unknown>;
@@ -753,7 +775,7 @@ declare class ObjectQLConversationService implements IAIConversationService {
753
775
  limit?: number;
754
776
  cursor?: string;
755
777
  }): Promise<AIConversation[]>;
756
- addMessage(conversationId: string, message: ModelMessage): Promise<AIConversation>;
778
+ addMessage(conversationId: string, message: ModelMessage, extras?: MessageObservability): Promise<AIConversation>;
757
779
  update(conversationId: string, patch: {
758
780
  title?: string;
759
781
  metadata?: Record<string, unknown>;
@@ -778,10 +800,34 @@ declare class ObjectQLConversationService implements IAIConversationService {
778
800
  *
779
801
  * These are provided by the kernel at `ai:ready` time and closed over
780
802
  * by the handler functions so they stay framework-agnostic.
803
+ *
804
+ * `metadataService` and `protocol` are optional — when present they
805
+ * enable runtime field-existence validation on `where` / `fields` /
806
+ * `orderBy` / `groupBy` / `aggregations`, so the agent gets a structured
807
+ * error pointing to `describe_object` instead of silently returning an
808
+ * empty result set when it hallucinates a field name. When neither is
809
+ * wired (legacy callers, edge runtimes without metadata), validation is
810
+ * skipped and the tools behave as before.
781
811
  */
782
812
  interface DataToolContext {
783
813
  /** ObjectQL data engine for record-level operations. */
784
814
  dataEngine: IDataEngine;
815
+ /** Optional metadata service for object schema lookup. */
816
+ metadataService?: IMetadataService;
817
+ /**
818
+ * Optional protocol service for cross-source metadata enumeration —
819
+ * needed to validate fields on system objects that live in
820
+ * ObjectQL's SchemaRegistry rather than the MetadataManager
821
+ * (e.g. `sys_user` from plugin-auth). Mirrors the fallback used by
822
+ * `describe_object` / `list_objects` in metadata-tools.
823
+ */
824
+ protocol?: {
825
+ getMetaItems(request: {
826
+ type: string;
827
+ packageId?: string;
828
+ organizationId?: string;
829
+ }): Promise<unknown[]>;
830
+ };
785
831
  }
786
832
  /** All built-in data tools definitions. */
787
833
  declare const DATA_TOOL_DEFINITIONS: AIToolDefinition[];
@@ -1722,7 +1768,7 @@ declare const AiConversationObject: Omit<{
1722
1768
  abstract: boolean;
1723
1769
  datasource: string;
1724
1770
  fields: Record<string, {
1725
- type: "number" | "boolean" | "file" | "text" | "json" | "tags" | "currency" | "code" | "date" | "avatar" | "vector" | "datetime" | "signature" | "progress" | "url" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "color" | "rating" | "slider" | "qrcode";
1771
+ type: "number" | "boolean" | "file" | "text" | "json" | "tags" | "currency" | "code" | "date" | "record" | "avatar" | "vector" | "datetime" | "signature" | "progress" | "url" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "color" | "rating" | "slider" | "qrcode";
1726
1772
  required: boolean;
1727
1773
  searchable: boolean;
1728
1774
  multiple: boolean;
@@ -1912,6 +1958,12 @@ declare const AiConversationObject: Omit<{
1912
1958
  caseSensitive?: boolean | undefined;
1913
1959
  autonumberFormat?: string | undefined;
1914
1960
  }>;
1961
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
1962
+ _lockReason?: string | undefined;
1963
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
1964
+ _provenance?: "package" | "env-forced" | "org" | undefined;
1965
+ _packageId?: string | undefined;
1966
+ _packageVersion?: string | undefined;
1915
1967
  label?: string | undefined;
1916
1968
  pluralLabel?: string | undefined;
1917
1969
  description?: string | undefined;
@@ -2301,7 +2353,7 @@ declare const AiConversationObject: Omit<{
2301
2353
  apiMethods?: ("restore" | "export" | "import" | "delete" | "purge" | "upsert" | "search" | "create" | "list" | "get" | "update" | "history" | "bulk" | "aggregate")[] | undefined;
2302
2354
  } | undefined;
2303
2355
  recordTypes?: string[] | undefined;
2304
- sharingModel?: "private" | "read" | "full" | "read_write" | undefined;
2356
+ sharingModel?: "private" | "full" | "read" | "read_write" | undefined;
2305
2357
  publicSharing?: {
2306
2358
  enabled: boolean;
2307
2359
  allowedAudiences?: ("email" | "public" | "link_only" | "signed_in")[] | undefined;
@@ -2344,7 +2396,7 @@ declare const AiConversationObject: Omit<{
2344
2396
  field?: string | undefined;
2345
2397
  objectOverride?: string | undefined;
2346
2398
  label?: string | undefined;
2347
- type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
2399
+ type?: "number" | "boolean" | "date" | "record" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
2348
2400
  options?: {
2349
2401
  label: string;
2350
2402
  value: string;
@@ -3677,7 +3729,7 @@ declare const AiMessageObject: Omit<{
3677
3729
  abstract: boolean;
3678
3730
  datasource: string;
3679
3731
  fields: Record<string, {
3680
- type: "number" | "boolean" | "file" | "text" | "json" | "tags" | "currency" | "code" | "date" | "avatar" | "vector" | "datetime" | "signature" | "progress" | "url" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "color" | "rating" | "slider" | "qrcode";
3732
+ type: "number" | "boolean" | "file" | "text" | "json" | "tags" | "currency" | "code" | "date" | "record" | "avatar" | "vector" | "datetime" | "signature" | "progress" | "url" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "color" | "rating" | "slider" | "qrcode";
3681
3733
  required: boolean;
3682
3734
  searchable: boolean;
3683
3735
  multiple: boolean;
@@ -3867,6 +3919,12 @@ declare const AiMessageObject: Omit<{
3867
3919
  caseSensitive?: boolean | undefined;
3868
3920
  autonumberFormat?: string | undefined;
3869
3921
  }>;
3922
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
3923
+ _lockReason?: string | undefined;
3924
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
3925
+ _provenance?: "package" | "env-forced" | "org" | undefined;
3926
+ _packageId?: string | undefined;
3927
+ _packageVersion?: string | undefined;
3870
3928
  label?: string | undefined;
3871
3929
  pluralLabel?: string | undefined;
3872
3930
  description?: string | undefined;
@@ -4256,7 +4314,7 @@ declare const AiMessageObject: Omit<{
4256
4314
  apiMethods?: ("restore" | "export" | "import" | "delete" | "purge" | "upsert" | "search" | "create" | "list" | "get" | "update" | "history" | "bulk" | "aggregate")[] | undefined;
4257
4315
  } | undefined;
4258
4316
  recordTypes?: string[] | undefined;
4259
- sharingModel?: "private" | "read" | "full" | "read_write" | undefined;
4317
+ sharingModel?: "private" | "full" | "read" | "read_write" | undefined;
4260
4318
  publicSharing?: {
4261
4319
  enabled: boolean;
4262
4320
  allowedAudiences?: ("email" | "public" | "link_only" | "signed_in")[] | undefined;
@@ -4299,7 +4357,7 @@ declare const AiMessageObject: Omit<{
4299
4357
  field?: string | undefined;
4300
4358
  objectOverride?: string | undefined;
4301
4359
  label?: string | undefined;
4302
- type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
4360
+ type?: "number" | "boolean" | "date" | "record" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
4303
4361
  options?: {
4304
4362
  label: string;
4305
4363
  value: string;
@@ -5417,7 +5475,7 @@ declare const AiMessageObject: Omit<{
5417
5475
  readonly index?: boolean | undefined;
5418
5476
  readonly type: "text";
5419
5477
  };
5420
- readonly created_at: {
5478
+ readonly model: {
5421
5479
  readonly readonly?: boolean | undefined;
5422
5480
  readonly format?: string | undefined;
5423
5481
  readonly options?: {
@@ -5590,13 +5648,890 @@ declare const AiMessageObject: Omit<{
5590
5648
  readonly caseSensitive?: boolean | undefined;
5591
5649
  readonly autonumberFormat?: string | undefined;
5592
5650
  readonly index?: boolean | undefined;
5593
- readonly type: "datetime";
5651
+ readonly type: "text";
5594
5652
  };
5595
- };
5596
- readonly indexes: [{
5597
- readonly fields: ["conversation_id"];
5598
- }, {
5599
- readonly fields: ["conversation_id", "created_at"];
5653
+ readonly prompt_tokens: {
5654
+ readonly readonly?: boolean | undefined;
5655
+ readonly format?: string | undefined;
5656
+ readonly options?: {
5657
+ label: string;
5658
+ value: string;
5659
+ color?: string | undefined;
5660
+ default?: boolean | undefined;
5661
+ }[] | undefined;
5662
+ readonly description?: string | undefined;
5663
+ readonly label?: string | undefined;
5664
+ readonly name?: string | undefined;
5665
+ readonly precision?: number | undefined;
5666
+ readonly required?: boolean | undefined;
5667
+ readonly multiple?: boolean | undefined;
5668
+ readonly dependencies?: string[] | undefined;
5669
+ readonly theme?: string | undefined;
5670
+ readonly externalId?: boolean | undefined;
5671
+ readonly system?: boolean | undefined;
5672
+ readonly min?: number | undefined;
5673
+ readonly max?: number | undefined;
5674
+ readonly group?: string | undefined;
5675
+ readonly encryptionConfig?: {
5676
+ enabled: boolean;
5677
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5678
+ keyManagement: {
5679
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5680
+ keyId?: string | undefined;
5681
+ rotationPolicy?: {
5682
+ enabled: boolean;
5683
+ frequencyDays: number;
5684
+ retainOldVersions: number;
5685
+ autoRotate: boolean;
5686
+ } | undefined;
5687
+ };
5688
+ scope: "record" | "field" | "table" | "database";
5689
+ deterministicEncryption: boolean;
5690
+ searchableEncryption: boolean;
5691
+ } | undefined;
5692
+ readonly columnName?: string | undefined;
5693
+ readonly searchable?: boolean | undefined;
5694
+ readonly unique?: boolean | undefined;
5695
+ readonly defaultValue?: unknown;
5696
+ readonly maxLength?: number | undefined;
5697
+ readonly minLength?: number | undefined;
5698
+ readonly scale?: number | undefined;
5699
+ readonly reference?: string | undefined;
5700
+ readonly referenceFilters?: string[] | undefined;
5701
+ readonly writeRequiresMasterRead?: boolean | undefined;
5702
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5703
+ readonly expression?: {
5704
+ dialect: "cel" | "js" | "cron" | "template";
5705
+ source?: string | undefined;
5706
+ ast?: unknown;
5707
+ meta?: {
5708
+ rationale?: string | undefined;
5709
+ generatedBy?: string | undefined;
5710
+ } | undefined;
5711
+ } | undefined;
5712
+ readonly summaryOperations?: {
5713
+ object: string;
5714
+ field: string;
5715
+ function: "min" | "max" | "count" | "sum" | "avg";
5716
+ } | undefined;
5717
+ readonly language?: string | undefined;
5718
+ readonly lineNumbers?: boolean | undefined;
5719
+ readonly maxRating?: number | undefined;
5720
+ readonly allowHalf?: boolean | undefined;
5721
+ readonly displayMap?: boolean | undefined;
5722
+ readonly allowGeocoding?: boolean | undefined;
5723
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5724
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5725
+ readonly allowAlpha?: boolean | undefined;
5726
+ readonly presetColors?: string[] | undefined;
5727
+ readonly step?: number | undefined;
5728
+ readonly showValue?: boolean | undefined;
5729
+ readonly marks?: Record<string, string> | undefined;
5730
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5731
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5732
+ readonly displayValue?: boolean | undefined;
5733
+ readonly allowScanning?: boolean | undefined;
5734
+ readonly currencyConfig?: {
5735
+ precision: number;
5736
+ currencyMode: "fixed" | "dynamic";
5737
+ defaultCurrency: string;
5738
+ } | undefined;
5739
+ readonly vectorConfig?: {
5740
+ dimensions: number;
5741
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5742
+ normalized: boolean;
5743
+ indexed: boolean;
5744
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
5745
+ } | undefined;
5746
+ readonly fileAttachmentConfig?: {
5747
+ virusScan: boolean;
5748
+ virusScanOnUpload: boolean;
5749
+ quarantineOnThreat: boolean;
5750
+ allowMultiple: boolean;
5751
+ allowReplace: boolean;
5752
+ allowDelete: boolean;
5753
+ requireUpload: boolean;
5754
+ extractMetadata: boolean;
5755
+ extractText: boolean;
5756
+ versioningEnabled: boolean;
5757
+ publicRead: boolean;
5758
+ presignedUrlExpiry: number;
5759
+ minSize?: number | undefined;
5760
+ maxSize?: number | undefined;
5761
+ allowedTypes?: string[] | undefined;
5762
+ blockedTypes?: string[] | undefined;
5763
+ allowedMimeTypes?: string[] | undefined;
5764
+ blockedMimeTypes?: string[] | undefined;
5765
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5766
+ storageProvider?: string | undefined;
5767
+ storageBucket?: string | undefined;
5768
+ storagePrefix?: string | undefined;
5769
+ imageValidation?: {
5770
+ generateThumbnails: boolean;
5771
+ preserveMetadata: boolean;
5772
+ autoRotate: boolean;
5773
+ minWidth?: number | undefined;
5774
+ maxWidth?: number | undefined;
5775
+ minHeight?: number | undefined;
5776
+ maxHeight?: number | undefined;
5777
+ aspectRatio?: string | undefined;
5778
+ thumbnailSizes?: {
5779
+ name: string;
5780
+ width: number;
5781
+ height: number;
5782
+ crop: boolean;
5783
+ }[] | undefined;
5784
+ } | undefined;
5785
+ maxVersions?: number | undefined;
5786
+ } | undefined;
5787
+ readonly maskingRule?: {
5788
+ field: string;
5789
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
5790
+ preserveFormat: boolean;
5791
+ preserveLength: boolean;
5792
+ pattern?: string | undefined;
5793
+ roles?: string[] | undefined;
5794
+ exemptRoles?: string[] | undefined;
5795
+ } | undefined;
5796
+ readonly auditTrail?: boolean | undefined;
5797
+ readonly cached?: {
5798
+ enabled: boolean;
5799
+ ttl: number;
5800
+ invalidateOn: string[];
5801
+ } | undefined;
5802
+ readonly dataQuality?: {
5803
+ uniqueness: boolean;
5804
+ completeness: number;
5805
+ accuracy?: {
5806
+ source: string;
5807
+ threshold: number;
5808
+ } | undefined;
5809
+ } | undefined;
5810
+ readonly conditionalRequired?: {
5811
+ dialect: "cel" | "js" | "cron" | "template";
5812
+ source?: string | undefined;
5813
+ ast?: unknown;
5814
+ meta?: {
5815
+ rationale?: string | undefined;
5816
+ generatedBy?: string | undefined;
5817
+ } | undefined;
5818
+ } | undefined;
5819
+ readonly hidden?: boolean | undefined;
5820
+ readonly sortable?: boolean | undefined;
5821
+ readonly inlineHelpText?: string | undefined;
5822
+ readonly trackFeedHistory?: boolean | undefined;
5823
+ readonly caseSensitive?: boolean | undefined;
5824
+ readonly autonumberFormat?: string | undefined;
5825
+ readonly index?: boolean | undefined;
5826
+ readonly type: "number";
5827
+ };
5828
+ readonly completion_tokens: {
5829
+ readonly readonly?: boolean | undefined;
5830
+ readonly format?: string | undefined;
5831
+ readonly options?: {
5832
+ label: string;
5833
+ value: string;
5834
+ color?: string | undefined;
5835
+ default?: boolean | undefined;
5836
+ }[] | undefined;
5837
+ readonly description?: string | undefined;
5838
+ readonly label?: string | undefined;
5839
+ readonly name?: string | undefined;
5840
+ readonly precision?: number | undefined;
5841
+ readonly required?: boolean | undefined;
5842
+ readonly multiple?: boolean | undefined;
5843
+ readonly dependencies?: string[] | undefined;
5844
+ readonly theme?: string | undefined;
5845
+ readonly externalId?: boolean | undefined;
5846
+ readonly system?: boolean | undefined;
5847
+ readonly min?: number | undefined;
5848
+ readonly max?: number | undefined;
5849
+ readonly group?: string | undefined;
5850
+ readonly encryptionConfig?: {
5851
+ enabled: boolean;
5852
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5853
+ keyManagement: {
5854
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5855
+ keyId?: string | undefined;
5856
+ rotationPolicy?: {
5857
+ enabled: boolean;
5858
+ frequencyDays: number;
5859
+ retainOldVersions: number;
5860
+ autoRotate: boolean;
5861
+ } | undefined;
5862
+ };
5863
+ scope: "record" | "field" | "table" | "database";
5864
+ deterministicEncryption: boolean;
5865
+ searchableEncryption: boolean;
5866
+ } | undefined;
5867
+ readonly columnName?: string | undefined;
5868
+ readonly searchable?: boolean | undefined;
5869
+ readonly unique?: boolean | undefined;
5870
+ readonly defaultValue?: unknown;
5871
+ readonly maxLength?: number | undefined;
5872
+ readonly minLength?: number | undefined;
5873
+ readonly scale?: number | undefined;
5874
+ readonly reference?: string | undefined;
5875
+ readonly referenceFilters?: string[] | undefined;
5876
+ readonly writeRequiresMasterRead?: boolean | undefined;
5877
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5878
+ readonly expression?: {
5879
+ dialect: "cel" | "js" | "cron" | "template";
5880
+ source?: string | undefined;
5881
+ ast?: unknown;
5882
+ meta?: {
5883
+ rationale?: string | undefined;
5884
+ generatedBy?: string | undefined;
5885
+ } | undefined;
5886
+ } | undefined;
5887
+ readonly summaryOperations?: {
5888
+ object: string;
5889
+ field: string;
5890
+ function: "min" | "max" | "count" | "sum" | "avg";
5891
+ } | undefined;
5892
+ readonly language?: string | undefined;
5893
+ readonly lineNumbers?: boolean | undefined;
5894
+ readonly maxRating?: number | undefined;
5895
+ readonly allowHalf?: boolean | undefined;
5896
+ readonly displayMap?: boolean | undefined;
5897
+ readonly allowGeocoding?: boolean | undefined;
5898
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5899
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5900
+ readonly allowAlpha?: boolean | undefined;
5901
+ readonly presetColors?: string[] | undefined;
5902
+ readonly step?: number | undefined;
5903
+ readonly showValue?: boolean | undefined;
5904
+ readonly marks?: Record<string, string> | undefined;
5905
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5906
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5907
+ readonly displayValue?: boolean | undefined;
5908
+ readonly allowScanning?: boolean | undefined;
5909
+ readonly currencyConfig?: {
5910
+ precision: number;
5911
+ currencyMode: "fixed" | "dynamic";
5912
+ defaultCurrency: string;
5913
+ } | undefined;
5914
+ readonly vectorConfig?: {
5915
+ dimensions: number;
5916
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5917
+ normalized: boolean;
5918
+ indexed: boolean;
5919
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
5920
+ } | undefined;
5921
+ readonly fileAttachmentConfig?: {
5922
+ virusScan: boolean;
5923
+ virusScanOnUpload: boolean;
5924
+ quarantineOnThreat: boolean;
5925
+ allowMultiple: boolean;
5926
+ allowReplace: boolean;
5927
+ allowDelete: boolean;
5928
+ requireUpload: boolean;
5929
+ extractMetadata: boolean;
5930
+ extractText: boolean;
5931
+ versioningEnabled: boolean;
5932
+ publicRead: boolean;
5933
+ presignedUrlExpiry: number;
5934
+ minSize?: number | undefined;
5935
+ maxSize?: number | undefined;
5936
+ allowedTypes?: string[] | undefined;
5937
+ blockedTypes?: string[] | undefined;
5938
+ allowedMimeTypes?: string[] | undefined;
5939
+ blockedMimeTypes?: string[] | undefined;
5940
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5941
+ storageProvider?: string | undefined;
5942
+ storageBucket?: string | undefined;
5943
+ storagePrefix?: string | undefined;
5944
+ imageValidation?: {
5945
+ generateThumbnails: boolean;
5946
+ preserveMetadata: boolean;
5947
+ autoRotate: boolean;
5948
+ minWidth?: number | undefined;
5949
+ maxWidth?: number | undefined;
5950
+ minHeight?: number | undefined;
5951
+ maxHeight?: number | undefined;
5952
+ aspectRatio?: string | undefined;
5953
+ thumbnailSizes?: {
5954
+ name: string;
5955
+ width: number;
5956
+ height: number;
5957
+ crop: boolean;
5958
+ }[] | undefined;
5959
+ } | undefined;
5960
+ maxVersions?: number | undefined;
5961
+ } | undefined;
5962
+ readonly maskingRule?: {
5963
+ field: string;
5964
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
5965
+ preserveFormat: boolean;
5966
+ preserveLength: boolean;
5967
+ pattern?: string | undefined;
5968
+ roles?: string[] | undefined;
5969
+ exemptRoles?: string[] | undefined;
5970
+ } | undefined;
5971
+ readonly auditTrail?: boolean | undefined;
5972
+ readonly cached?: {
5973
+ enabled: boolean;
5974
+ ttl: number;
5975
+ invalidateOn: string[];
5976
+ } | undefined;
5977
+ readonly dataQuality?: {
5978
+ uniqueness: boolean;
5979
+ completeness: number;
5980
+ accuracy?: {
5981
+ source: string;
5982
+ threshold: number;
5983
+ } | undefined;
5984
+ } | undefined;
5985
+ readonly conditionalRequired?: {
5986
+ dialect: "cel" | "js" | "cron" | "template";
5987
+ source?: string | undefined;
5988
+ ast?: unknown;
5989
+ meta?: {
5990
+ rationale?: string | undefined;
5991
+ generatedBy?: string | undefined;
5992
+ } | undefined;
5993
+ } | undefined;
5994
+ readonly hidden?: boolean | undefined;
5995
+ readonly sortable?: boolean | undefined;
5996
+ readonly inlineHelpText?: string | undefined;
5997
+ readonly trackFeedHistory?: boolean | undefined;
5998
+ readonly caseSensitive?: boolean | undefined;
5999
+ readonly autonumberFormat?: string | undefined;
6000
+ readonly index?: boolean | undefined;
6001
+ readonly type: "number";
6002
+ };
6003
+ readonly total_tokens: {
6004
+ readonly readonly?: boolean | undefined;
6005
+ readonly format?: string | undefined;
6006
+ readonly options?: {
6007
+ label: string;
6008
+ value: string;
6009
+ color?: string | undefined;
6010
+ default?: boolean | undefined;
6011
+ }[] | undefined;
6012
+ readonly description?: string | undefined;
6013
+ readonly label?: string | undefined;
6014
+ readonly name?: string | undefined;
6015
+ readonly precision?: number | undefined;
6016
+ readonly required?: boolean | undefined;
6017
+ readonly multiple?: boolean | undefined;
6018
+ readonly dependencies?: string[] | undefined;
6019
+ readonly theme?: string | undefined;
6020
+ readonly externalId?: boolean | undefined;
6021
+ readonly system?: boolean | undefined;
6022
+ readonly min?: number | undefined;
6023
+ readonly max?: number | undefined;
6024
+ readonly group?: string | undefined;
6025
+ readonly encryptionConfig?: {
6026
+ enabled: boolean;
6027
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6028
+ keyManagement: {
6029
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6030
+ keyId?: string | undefined;
6031
+ rotationPolicy?: {
6032
+ enabled: boolean;
6033
+ frequencyDays: number;
6034
+ retainOldVersions: number;
6035
+ autoRotate: boolean;
6036
+ } | undefined;
6037
+ };
6038
+ scope: "record" | "field" | "table" | "database";
6039
+ deterministicEncryption: boolean;
6040
+ searchableEncryption: boolean;
6041
+ } | undefined;
6042
+ readonly columnName?: string | undefined;
6043
+ readonly searchable?: boolean | undefined;
6044
+ readonly unique?: boolean | undefined;
6045
+ readonly defaultValue?: unknown;
6046
+ readonly maxLength?: number | undefined;
6047
+ readonly minLength?: number | undefined;
6048
+ readonly scale?: number | undefined;
6049
+ readonly reference?: string | undefined;
6050
+ readonly referenceFilters?: string[] | undefined;
6051
+ readonly writeRequiresMasterRead?: boolean | undefined;
6052
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6053
+ readonly expression?: {
6054
+ dialect: "cel" | "js" | "cron" | "template";
6055
+ source?: string | undefined;
6056
+ ast?: unknown;
6057
+ meta?: {
6058
+ rationale?: string | undefined;
6059
+ generatedBy?: string | undefined;
6060
+ } | undefined;
6061
+ } | undefined;
6062
+ readonly summaryOperations?: {
6063
+ object: string;
6064
+ field: string;
6065
+ function: "min" | "max" | "count" | "sum" | "avg";
6066
+ } | undefined;
6067
+ readonly language?: string | undefined;
6068
+ readonly lineNumbers?: boolean | undefined;
6069
+ readonly maxRating?: number | undefined;
6070
+ readonly allowHalf?: boolean | undefined;
6071
+ readonly displayMap?: boolean | undefined;
6072
+ readonly allowGeocoding?: boolean | undefined;
6073
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6074
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6075
+ readonly allowAlpha?: boolean | undefined;
6076
+ readonly presetColors?: string[] | undefined;
6077
+ readonly step?: number | undefined;
6078
+ readonly showValue?: boolean | undefined;
6079
+ readonly marks?: Record<string, string> | undefined;
6080
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6081
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6082
+ readonly displayValue?: boolean | undefined;
6083
+ readonly allowScanning?: boolean | undefined;
6084
+ readonly currencyConfig?: {
6085
+ precision: number;
6086
+ currencyMode: "fixed" | "dynamic";
6087
+ defaultCurrency: string;
6088
+ } | undefined;
6089
+ readonly vectorConfig?: {
6090
+ dimensions: number;
6091
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6092
+ normalized: boolean;
6093
+ indexed: boolean;
6094
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
6095
+ } | undefined;
6096
+ readonly fileAttachmentConfig?: {
6097
+ virusScan: boolean;
6098
+ virusScanOnUpload: boolean;
6099
+ quarantineOnThreat: boolean;
6100
+ allowMultiple: boolean;
6101
+ allowReplace: boolean;
6102
+ allowDelete: boolean;
6103
+ requireUpload: boolean;
6104
+ extractMetadata: boolean;
6105
+ extractText: boolean;
6106
+ versioningEnabled: boolean;
6107
+ publicRead: boolean;
6108
+ presignedUrlExpiry: number;
6109
+ minSize?: number | undefined;
6110
+ maxSize?: number | undefined;
6111
+ allowedTypes?: string[] | undefined;
6112
+ blockedTypes?: string[] | undefined;
6113
+ allowedMimeTypes?: string[] | undefined;
6114
+ blockedMimeTypes?: string[] | undefined;
6115
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6116
+ storageProvider?: string | undefined;
6117
+ storageBucket?: string | undefined;
6118
+ storagePrefix?: string | undefined;
6119
+ imageValidation?: {
6120
+ generateThumbnails: boolean;
6121
+ preserveMetadata: boolean;
6122
+ autoRotate: boolean;
6123
+ minWidth?: number | undefined;
6124
+ maxWidth?: number | undefined;
6125
+ minHeight?: number | undefined;
6126
+ maxHeight?: number | undefined;
6127
+ aspectRatio?: string | undefined;
6128
+ thumbnailSizes?: {
6129
+ name: string;
6130
+ width: number;
6131
+ height: number;
6132
+ crop: boolean;
6133
+ }[] | undefined;
6134
+ } | undefined;
6135
+ maxVersions?: number | undefined;
6136
+ } | undefined;
6137
+ readonly maskingRule?: {
6138
+ field: string;
6139
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
6140
+ preserveFormat: boolean;
6141
+ preserveLength: boolean;
6142
+ pattern?: string | undefined;
6143
+ roles?: string[] | undefined;
6144
+ exemptRoles?: string[] | undefined;
6145
+ } | undefined;
6146
+ readonly auditTrail?: boolean | undefined;
6147
+ readonly cached?: {
6148
+ enabled: boolean;
6149
+ ttl: number;
6150
+ invalidateOn: string[];
6151
+ } | undefined;
6152
+ readonly dataQuality?: {
6153
+ uniqueness: boolean;
6154
+ completeness: number;
6155
+ accuracy?: {
6156
+ source: string;
6157
+ threshold: number;
6158
+ } | undefined;
6159
+ } | undefined;
6160
+ readonly conditionalRequired?: {
6161
+ dialect: "cel" | "js" | "cron" | "template";
6162
+ source?: string | undefined;
6163
+ ast?: unknown;
6164
+ meta?: {
6165
+ rationale?: string | undefined;
6166
+ generatedBy?: string | undefined;
6167
+ } | undefined;
6168
+ } | undefined;
6169
+ readonly hidden?: boolean | undefined;
6170
+ readonly sortable?: boolean | undefined;
6171
+ readonly inlineHelpText?: string | undefined;
6172
+ readonly trackFeedHistory?: boolean | undefined;
6173
+ readonly caseSensitive?: boolean | undefined;
6174
+ readonly autonumberFormat?: string | undefined;
6175
+ readonly index?: boolean | undefined;
6176
+ readonly type: "number";
6177
+ };
6178
+ readonly latency_ms: {
6179
+ readonly readonly?: boolean | undefined;
6180
+ readonly format?: string | undefined;
6181
+ readonly options?: {
6182
+ label: string;
6183
+ value: string;
6184
+ color?: string | undefined;
6185
+ default?: boolean | undefined;
6186
+ }[] | undefined;
6187
+ readonly description?: string | undefined;
6188
+ readonly label?: string | undefined;
6189
+ readonly name?: string | undefined;
6190
+ readonly precision?: number | undefined;
6191
+ readonly required?: boolean | undefined;
6192
+ readonly multiple?: boolean | undefined;
6193
+ readonly dependencies?: string[] | undefined;
6194
+ readonly theme?: string | undefined;
6195
+ readonly externalId?: boolean | undefined;
6196
+ readonly system?: boolean | undefined;
6197
+ readonly min?: number | undefined;
6198
+ readonly max?: number | undefined;
6199
+ readonly group?: 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: "record" | "field" | "table" | "database";
6214
+ deterministicEncryption: boolean;
6215
+ searchableEncryption: boolean;
6216
+ } | undefined;
6217
+ readonly columnName?: string | undefined;
6218
+ readonly searchable?: boolean | undefined;
6219
+ readonly unique?: boolean | undefined;
6220
+ readonly defaultValue?: unknown;
6221
+ readonly maxLength?: number | undefined;
6222
+ readonly minLength?: number | undefined;
6223
+ readonly scale?: number | undefined;
6224
+ readonly reference?: string | undefined;
6225
+ readonly referenceFilters?: string[] | undefined;
6226
+ readonly writeRequiresMasterRead?: boolean | undefined;
6227
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6228
+ readonly expression?: {
6229
+ dialect: "cel" | "js" | "cron" | "template";
6230
+ source?: string | undefined;
6231
+ ast?: unknown;
6232
+ meta?: {
6233
+ rationale?: string | undefined;
6234
+ generatedBy?: string | undefined;
6235
+ } | undefined;
6236
+ } | undefined;
6237
+ readonly summaryOperations?: {
6238
+ object: string;
6239
+ field: string;
6240
+ function: "min" | "max" | "count" | "sum" | "avg";
6241
+ } | undefined;
6242
+ readonly language?: string | undefined;
6243
+ readonly lineNumbers?: boolean | undefined;
6244
+ readonly maxRating?: number | undefined;
6245
+ readonly allowHalf?: boolean | undefined;
6246
+ readonly displayMap?: boolean | undefined;
6247
+ readonly allowGeocoding?: boolean | undefined;
6248
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6249
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6250
+ readonly allowAlpha?: boolean | undefined;
6251
+ readonly presetColors?: string[] | undefined;
6252
+ readonly step?: number | undefined;
6253
+ readonly showValue?: boolean | undefined;
6254
+ readonly marks?: Record<string, string> | undefined;
6255
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6256
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6257
+ readonly displayValue?: boolean | undefined;
6258
+ readonly allowScanning?: boolean | undefined;
6259
+ readonly currencyConfig?: {
6260
+ precision: number;
6261
+ currencyMode: "fixed" | "dynamic";
6262
+ defaultCurrency: string;
6263
+ } | undefined;
6264
+ readonly vectorConfig?: {
6265
+ dimensions: number;
6266
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6267
+ normalized: boolean;
6268
+ indexed: boolean;
6269
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
6270
+ } | undefined;
6271
+ readonly fileAttachmentConfig?: {
6272
+ virusScan: boolean;
6273
+ virusScanOnUpload: boolean;
6274
+ quarantineOnThreat: boolean;
6275
+ allowMultiple: boolean;
6276
+ allowReplace: boolean;
6277
+ allowDelete: boolean;
6278
+ requireUpload: boolean;
6279
+ extractMetadata: boolean;
6280
+ extractText: boolean;
6281
+ versioningEnabled: boolean;
6282
+ publicRead: boolean;
6283
+ presignedUrlExpiry: number;
6284
+ minSize?: number | undefined;
6285
+ maxSize?: number | undefined;
6286
+ allowedTypes?: string[] | undefined;
6287
+ blockedTypes?: string[] | undefined;
6288
+ allowedMimeTypes?: string[] | undefined;
6289
+ blockedMimeTypes?: string[] | undefined;
6290
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6291
+ storageProvider?: string | undefined;
6292
+ storageBucket?: string | undefined;
6293
+ storagePrefix?: string | undefined;
6294
+ imageValidation?: {
6295
+ generateThumbnails: boolean;
6296
+ preserveMetadata: boolean;
6297
+ autoRotate: boolean;
6298
+ minWidth?: number | undefined;
6299
+ maxWidth?: number | undefined;
6300
+ minHeight?: number | undefined;
6301
+ maxHeight?: number | undefined;
6302
+ aspectRatio?: string | undefined;
6303
+ thumbnailSizes?: {
6304
+ name: string;
6305
+ width: number;
6306
+ height: number;
6307
+ crop: boolean;
6308
+ }[] | undefined;
6309
+ } | undefined;
6310
+ maxVersions?: number | undefined;
6311
+ } | undefined;
6312
+ readonly maskingRule?: {
6313
+ field: string;
6314
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
6315
+ preserveFormat: boolean;
6316
+ preserveLength: boolean;
6317
+ pattern?: string | undefined;
6318
+ roles?: string[] | undefined;
6319
+ exemptRoles?: string[] | undefined;
6320
+ } | undefined;
6321
+ readonly auditTrail?: boolean | undefined;
6322
+ readonly cached?: {
6323
+ enabled: boolean;
6324
+ ttl: number;
6325
+ invalidateOn: string[];
6326
+ } | undefined;
6327
+ readonly dataQuality?: {
6328
+ uniqueness: boolean;
6329
+ completeness: number;
6330
+ accuracy?: {
6331
+ source: string;
6332
+ threshold: number;
6333
+ } | undefined;
6334
+ } | undefined;
6335
+ readonly conditionalRequired?: {
6336
+ dialect: "cel" | "js" | "cron" | "template";
6337
+ source?: string | undefined;
6338
+ ast?: unknown;
6339
+ meta?: {
6340
+ rationale?: string | undefined;
6341
+ generatedBy?: string | undefined;
6342
+ } | undefined;
6343
+ } | undefined;
6344
+ readonly hidden?: boolean | undefined;
6345
+ readonly sortable?: boolean | undefined;
6346
+ readonly inlineHelpText?: string | undefined;
6347
+ readonly trackFeedHistory?: boolean | undefined;
6348
+ readonly caseSensitive?: boolean | undefined;
6349
+ readonly autonumberFormat?: string | undefined;
6350
+ readonly index?: boolean | undefined;
6351
+ readonly type: "number";
6352
+ };
6353
+ readonly created_at: {
6354
+ readonly readonly?: boolean | undefined;
6355
+ readonly format?: string | undefined;
6356
+ readonly options?: {
6357
+ label: string;
6358
+ value: string;
6359
+ color?: string | undefined;
6360
+ default?: boolean | undefined;
6361
+ }[] | undefined;
6362
+ readonly description?: string | undefined;
6363
+ readonly label?: string | undefined;
6364
+ readonly name?: string | undefined;
6365
+ readonly precision?: number | undefined;
6366
+ readonly required?: boolean | undefined;
6367
+ readonly multiple?: boolean | undefined;
6368
+ readonly dependencies?: string[] | undefined;
6369
+ readonly theme?: string | undefined;
6370
+ readonly externalId?: boolean | undefined;
6371
+ readonly system?: boolean | undefined;
6372
+ readonly min?: number | undefined;
6373
+ readonly max?: number | undefined;
6374
+ readonly group?: string | undefined;
6375
+ readonly encryptionConfig?: {
6376
+ enabled: boolean;
6377
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6378
+ keyManagement: {
6379
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6380
+ keyId?: string | undefined;
6381
+ rotationPolicy?: {
6382
+ enabled: boolean;
6383
+ frequencyDays: number;
6384
+ retainOldVersions: number;
6385
+ autoRotate: boolean;
6386
+ } | undefined;
6387
+ };
6388
+ scope: "record" | "field" | "table" | "database";
6389
+ deterministicEncryption: boolean;
6390
+ searchableEncryption: boolean;
6391
+ } | undefined;
6392
+ readonly columnName?: string | undefined;
6393
+ readonly searchable?: boolean | undefined;
6394
+ readonly unique?: boolean | undefined;
6395
+ readonly defaultValue?: unknown;
6396
+ readonly maxLength?: number | undefined;
6397
+ readonly minLength?: number | undefined;
6398
+ readonly scale?: number | undefined;
6399
+ readonly reference?: string | undefined;
6400
+ readonly referenceFilters?: string[] | undefined;
6401
+ readonly writeRequiresMasterRead?: boolean | undefined;
6402
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6403
+ readonly expression?: {
6404
+ dialect: "cel" | "js" | "cron" | "template";
6405
+ source?: string | undefined;
6406
+ ast?: unknown;
6407
+ meta?: {
6408
+ rationale?: string | undefined;
6409
+ generatedBy?: string | undefined;
6410
+ } | undefined;
6411
+ } | undefined;
6412
+ readonly summaryOperations?: {
6413
+ object: string;
6414
+ field: string;
6415
+ function: "min" | "max" | "count" | "sum" | "avg";
6416
+ } | undefined;
6417
+ readonly language?: string | undefined;
6418
+ readonly lineNumbers?: boolean | undefined;
6419
+ readonly maxRating?: number | undefined;
6420
+ readonly allowHalf?: boolean | undefined;
6421
+ readonly displayMap?: boolean | undefined;
6422
+ readonly allowGeocoding?: boolean | undefined;
6423
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6424
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6425
+ readonly allowAlpha?: boolean | undefined;
6426
+ readonly presetColors?: string[] | undefined;
6427
+ readonly step?: number | undefined;
6428
+ readonly showValue?: boolean | undefined;
6429
+ readonly marks?: Record<string, string> | undefined;
6430
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6431
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6432
+ readonly displayValue?: boolean | undefined;
6433
+ readonly allowScanning?: boolean | undefined;
6434
+ readonly currencyConfig?: {
6435
+ precision: number;
6436
+ currencyMode: "fixed" | "dynamic";
6437
+ defaultCurrency: string;
6438
+ } | undefined;
6439
+ readonly vectorConfig?: {
6440
+ dimensions: number;
6441
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6442
+ normalized: boolean;
6443
+ indexed: boolean;
6444
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
6445
+ } | undefined;
6446
+ readonly fileAttachmentConfig?: {
6447
+ virusScan: boolean;
6448
+ virusScanOnUpload: boolean;
6449
+ quarantineOnThreat: boolean;
6450
+ allowMultiple: boolean;
6451
+ allowReplace: boolean;
6452
+ allowDelete: boolean;
6453
+ requireUpload: boolean;
6454
+ extractMetadata: boolean;
6455
+ extractText: boolean;
6456
+ versioningEnabled: boolean;
6457
+ publicRead: boolean;
6458
+ presignedUrlExpiry: number;
6459
+ minSize?: number | undefined;
6460
+ maxSize?: number | undefined;
6461
+ allowedTypes?: string[] | undefined;
6462
+ blockedTypes?: string[] | undefined;
6463
+ allowedMimeTypes?: string[] | undefined;
6464
+ blockedMimeTypes?: string[] | undefined;
6465
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6466
+ storageProvider?: string | undefined;
6467
+ storageBucket?: string | undefined;
6468
+ storagePrefix?: string | undefined;
6469
+ imageValidation?: {
6470
+ generateThumbnails: boolean;
6471
+ preserveMetadata: boolean;
6472
+ autoRotate: boolean;
6473
+ minWidth?: number | undefined;
6474
+ maxWidth?: number | undefined;
6475
+ minHeight?: number | undefined;
6476
+ maxHeight?: number | undefined;
6477
+ aspectRatio?: string | undefined;
6478
+ thumbnailSizes?: {
6479
+ name: string;
6480
+ width: number;
6481
+ height: number;
6482
+ crop: boolean;
6483
+ }[] | undefined;
6484
+ } | undefined;
6485
+ maxVersions?: number | undefined;
6486
+ } | undefined;
6487
+ readonly maskingRule?: {
6488
+ field: string;
6489
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
6490
+ preserveFormat: boolean;
6491
+ preserveLength: boolean;
6492
+ pattern?: string | undefined;
6493
+ roles?: string[] | undefined;
6494
+ exemptRoles?: string[] | undefined;
6495
+ } | undefined;
6496
+ readonly auditTrail?: boolean | undefined;
6497
+ readonly cached?: {
6498
+ enabled: boolean;
6499
+ ttl: number;
6500
+ invalidateOn: string[];
6501
+ } | undefined;
6502
+ readonly dataQuality?: {
6503
+ uniqueness: boolean;
6504
+ completeness: number;
6505
+ accuracy?: {
6506
+ source: string;
6507
+ threshold: number;
6508
+ } | undefined;
6509
+ } | undefined;
6510
+ readonly conditionalRequired?: {
6511
+ dialect: "cel" | "js" | "cron" | "template";
6512
+ source?: string | undefined;
6513
+ ast?: unknown;
6514
+ meta?: {
6515
+ rationale?: string | undefined;
6516
+ generatedBy?: string | undefined;
6517
+ } | undefined;
6518
+ } | undefined;
6519
+ readonly hidden?: boolean | undefined;
6520
+ readonly sortable?: boolean | undefined;
6521
+ readonly inlineHelpText?: string | undefined;
6522
+ readonly trackFeedHistory?: boolean | undefined;
6523
+ readonly caseSensitive?: boolean | undefined;
6524
+ readonly autonumberFormat?: string | undefined;
6525
+ readonly index?: boolean | undefined;
6526
+ readonly type: "datetime";
6527
+ };
6528
+ };
6529
+ readonly indexes: [{
6530
+ readonly fields: ["conversation_id"];
6531
+ }, {
6532
+ readonly fields: ["conversation_id", "created_at"];
6533
+ }, {
6534
+ readonly fields: ["model"];
5600
6535
  }];
5601
6536
  readonly enable: {
5602
6537
  readonly trackHistory: false;
@@ -5627,7 +6562,7 @@ declare const AiTraceObject: Omit<{
5627
6562
  abstract: boolean;
5628
6563
  datasource: string;
5629
6564
  fields: Record<string, {
5630
- type: "number" | "boolean" | "file" | "text" | "json" | "tags" | "currency" | "code" | "date" | "avatar" | "vector" | "datetime" | "signature" | "progress" | "url" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "color" | "rating" | "slider" | "qrcode";
6565
+ type: "number" | "boolean" | "file" | "text" | "json" | "tags" | "currency" | "code" | "date" | "record" | "avatar" | "vector" | "datetime" | "signature" | "progress" | "url" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "color" | "rating" | "slider" | "qrcode";
5631
6566
  required: boolean;
5632
6567
  searchable: boolean;
5633
6568
  multiple: boolean;
@@ -5817,6 +6752,12 @@ declare const AiTraceObject: Omit<{
5817
6752
  caseSensitive?: boolean | undefined;
5818
6753
  autonumberFormat?: string | undefined;
5819
6754
  }>;
6755
+ _lock?: "none" | "full" | "no-overlay" | "no-delete" | undefined;
6756
+ _lockReason?: string | undefined;
6757
+ _lockSource?: "artifact" | "package" | "env-forced" | undefined;
6758
+ _provenance?: "package" | "env-forced" | "org" | undefined;
6759
+ _packageId?: string | undefined;
6760
+ _packageVersion?: string | undefined;
5820
6761
  label?: string | undefined;
5821
6762
  pluralLabel?: string | undefined;
5822
6763
  description?: string | undefined;
@@ -6206,7 +7147,7 @@ declare const AiTraceObject: Omit<{
6206
7147
  apiMethods?: ("restore" | "export" | "import" | "delete" | "purge" | "upsert" | "search" | "create" | "list" | "get" | "update" | "history" | "bulk" | "aggregate")[] | undefined;
6207
7148
  } | undefined;
6208
7149
  recordTypes?: string[] | undefined;
6209
- sharingModel?: "private" | "read" | "full" | "read_write" | undefined;
7150
+ sharingModel?: "private" | "full" | "read" | "read_write" | undefined;
6210
7151
  publicSharing?: {
6211
7152
  enabled: boolean;
6212
7153
  allowedAudiences?: ("email" | "public" | "link_only" | "signed_in")[] | undefined;
@@ -6249,7 +7190,7 @@ declare const AiTraceObject: Omit<{
6249
7190
  field?: string | undefined;
6250
7191
  objectOverride?: string | undefined;
6251
7192
  label?: string | undefined;
6252
- type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
7193
+ type?: "number" | "boolean" | "date" | "record" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
6253
7194
  options?: {
6254
7195
  label: string;
6255
7196
  value: string;