@objectstack/service-ai 7.0.0 → 7.1.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.cts 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;
@@ -2344,7 +2390,7 @@ declare const AiConversationObject: Omit<{
2344
2390
  field?: string | undefined;
2345
2391
  objectOverride?: string | undefined;
2346
2392
  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;
2393
+ 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
2394
  options?: {
2349
2395
  label: string;
2350
2396
  value: string;
@@ -3677,7 +3723,7 @@ declare const AiMessageObject: Omit<{
3677
3723
  abstract: boolean;
3678
3724
  datasource: string;
3679
3725
  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";
3726
+ 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
3727
  required: boolean;
3682
3728
  searchable: boolean;
3683
3729
  multiple: boolean;
@@ -4299,7 +4345,7 @@ declare const AiMessageObject: Omit<{
4299
4345
  field?: string | undefined;
4300
4346
  objectOverride?: string | undefined;
4301
4347
  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;
4348
+ 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
4349
  options?: {
4304
4350
  label: string;
4305
4351
  value: string;
@@ -5417,7 +5463,7 @@ declare const AiMessageObject: Omit<{
5417
5463
  readonly index?: boolean | undefined;
5418
5464
  readonly type: "text";
5419
5465
  };
5420
- readonly created_at: {
5466
+ readonly model: {
5421
5467
  readonly readonly?: boolean | undefined;
5422
5468
  readonly format?: string | undefined;
5423
5469
  readonly options?: {
@@ -5590,13 +5636,890 @@ declare const AiMessageObject: Omit<{
5590
5636
  readonly caseSensitive?: boolean | undefined;
5591
5637
  readonly autonumberFormat?: string | undefined;
5592
5638
  readonly index?: boolean | undefined;
5593
- readonly type: "datetime";
5639
+ readonly type: "text";
5594
5640
  };
5595
- };
5596
- readonly indexes: [{
5597
- readonly fields: ["conversation_id"];
5598
- }, {
5599
- readonly fields: ["conversation_id", "created_at"];
5641
+ readonly prompt_tokens: {
5642
+ readonly readonly?: boolean | undefined;
5643
+ readonly format?: string | undefined;
5644
+ readonly options?: {
5645
+ label: string;
5646
+ value: string;
5647
+ color?: string | undefined;
5648
+ default?: boolean | undefined;
5649
+ }[] | undefined;
5650
+ readonly description?: string | undefined;
5651
+ readonly label?: string | undefined;
5652
+ readonly name?: string | undefined;
5653
+ readonly precision?: number | undefined;
5654
+ readonly required?: boolean | undefined;
5655
+ readonly multiple?: boolean | undefined;
5656
+ readonly dependencies?: string[] | undefined;
5657
+ readonly theme?: string | undefined;
5658
+ readonly externalId?: boolean | undefined;
5659
+ readonly system?: boolean | undefined;
5660
+ readonly min?: number | undefined;
5661
+ readonly max?: number | undefined;
5662
+ readonly group?: string | undefined;
5663
+ readonly encryptionConfig?: {
5664
+ enabled: boolean;
5665
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5666
+ keyManagement: {
5667
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5668
+ keyId?: string | undefined;
5669
+ rotationPolicy?: {
5670
+ enabled: boolean;
5671
+ frequencyDays: number;
5672
+ retainOldVersions: number;
5673
+ autoRotate: boolean;
5674
+ } | undefined;
5675
+ };
5676
+ scope: "record" | "field" | "table" | "database";
5677
+ deterministicEncryption: boolean;
5678
+ searchableEncryption: boolean;
5679
+ } | undefined;
5680
+ readonly columnName?: string | undefined;
5681
+ readonly searchable?: boolean | undefined;
5682
+ readonly unique?: boolean | undefined;
5683
+ readonly defaultValue?: unknown;
5684
+ readonly maxLength?: number | undefined;
5685
+ readonly minLength?: number | undefined;
5686
+ readonly scale?: number | undefined;
5687
+ readonly reference?: string | undefined;
5688
+ readonly referenceFilters?: string[] | undefined;
5689
+ readonly writeRequiresMasterRead?: boolean | undefined;
5690
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5691
+ readonly expression?: {
5692
+ dialect: "cel" | "js" | "cron" | "template";
5693
+ source?: string | undefined;
5694
+ ast?: unknown;
5695
+ meta?: {
5696
+ rationale?: string | undefined;
5697
+ generatedBy?: string | undefined;
5698
+ } | undefined;
5699
+ } | undefined;
5700
+ readonly summaryOperations?: {
5701
+ object: string;
5702
+ field: string;
5703
+ function: "min" | "max" | "count" | "sum" | "avg";
5704
+ } | undefined;
5705
+ readonly language?: string | undefined;
5706
+ readonly lineNumbers?: boolean | undefined;
5707
+ readonly maxRating?: number | undefined;
5708
+ readonly allowHalf?: boolean | undefined;
5709
+ readonly displayMap?: boolean | undefined;
5710
+ readonly allowGeocoding?: boolean | undefined;
5711
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5712
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5713
+ readonly allowAlpha?: boolean | undefined;
5714
+ readonly presetColors?: string[] | undefined;
5715
+ readonly step?: number | undefined;
5716
+ readonly showValue?: boolean | undefined;
5717
+ readonly marks?: Record<string, string> | undefined;
5718
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5719
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5720
+ readonly displayValue?: boolean | undefined;
5721
+ readonly allowScanning?: boolean | undefined;
5722
+ readonly currencyConfig?: {
5723
+ precision: number;
5724
+ currencyMode: "fixed" | "dynamic";
5725
+ defaultCurrency: string;
5726
+ } | undefined;
5727
+ readonly vectorConfig?: {
5728
+ dimensions: number;
5729
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5730
+ normalized: boolean;
5731
+ indexed: boolean;
5732
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
5733
+ } | undefined;
5734
+ readonly fileAttachmentConfig?: {
5735
+ virusScan: boolean;
5736
+ virusScanOnUpload: boolean;
5737
+ quarantineOnThreat: boolean;
5738
+ allowMultiple: boolean;
5739
+ allowReplace: boolean;
5740
+ allowDelete: boolean;
5741
+ requireUpload: boolean;
5742
+ extractMetadata: boolean;
5743
+ extractText: boolean;
5744
+ versioningEnabled: boolean;
5745
+ publicRead: boolean;
5746
+ presignedUrlExpiry: number;
5747
+ minSize?: number | undefined;
5748
+ maxSize?: number | undefined;
5749
+ allowedTypes?: string[] | undefined;
5750
+ blockedTypes?: string[] | undefined;
5751
+ allowedMimeTypes?: string[] | undefined;
5752
+ blockedMimeTypes?: string[] | undefined;
5753
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5754
+ storageProvider?: string | undefined;
5755
+ storageBucket?: string | undefined;
5756
+ storagePrefix?: string | undefined;
5757
+ imageValidation?: {
5758
+ generateThumbnails: boolean;
5759
+ preserveMetadata: boolean;
5760
+ autoRotate: boolean;
5761
+ minWidth?: number | undefined;
5762
+ maxWidth?: number | undefined;
5763
+ minHeight?: number | undefined;
5764
+ maxHeight?: number | undefined;
5765
+ aspectRatio?: string | undefined;
5766
+ thumbnailSizes?: {
5767
+ name: string;
5768
+ width: number;
5769
+ height: number;
5770
+ crop: boolean;
5771
+ }[] | undefined;
5772
+ } | undefined;
5773
+ maxVersions?: number | undefined;
5774
+ } | undefined;
5775
+ readonly maskingRule?: {
5776
+ field: string;
5777
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
5778
+ preserveFormat: boolean;
5779
+ preserveLength: boolean;
5780
+ pattern?: string | undefined;
5781
+ roles?: string[] | undefined;
5782
+ exemptRoles?: string[] | undefined;
5783
+ } | undefined;
5784
+ readonly auditTrail?: boolean | undefined;
5785
+ readonly cached?: {
5786
+ enabled: boolean;
5787
+ ttl: number;
5788
+ invalidateOn: string[];
5789
+ } | undefined;
5790
+ readonly dataQuality?: {
5791
+ uniqueness: boolean;
5792
+ completeness: number;
5793
+ accuracy?: {
5794
+ source: string;
5795
+ threshold: number;
5796
+ } | undefined;
5797
+ } | undefined;
5798
+ readonly conditionalRequired?: {
5799
+ dialect: "cel" | "js" | "cron" | "template";
5800
+ source?: string | undefined;
5801
+ ast?: unknown;
5802
+ meta?: {
5803
+ rationale?: string | undefined;
5804
+ generatedBy?: string | undefined;
5805
+ } | undefined;
5806
+ } | undefined;
5807
+ readonly hidden?: boolean | undefined;
5808
+ readonly sortable?: boolean | undefined;
5809
+ readonly inlineHelpText?: string | undefined;
5810
+ readonly trackFeedHistory?: boolean | undefined;
5811
+ readonly caseSensitive?: boolean | undefined;
5812
+ readonly autonumberFormat?: string | undefined;
5813
+ readonly index?: boolean | undefined;
5814
+ readonly type: "number";
5815
+ };
5816
+ readonly completion_tokens: {
5817
+ readonly readonly?: boolean | undefined;
5818
+ readonly format?: string | undefined;
5819
+ readonly options?: {
5820
+ label: string;
5821
+ value: string;
5822
+ color?: string | undefined;
5823
+ default?: boolean | undefined;
5824
+ }[] | undefined;
5825
+ readonly description?: string | undefined;
5826
+ readonly label?: string | undefined;
5827
+ readonly name?: string | undefined;
5828
+ readonly precision?: number | undefined;
5829
+ readonly required?: boolean | undefined;
5830
+ readonly multiple?: boolean | undefined;
5831
+ readonly dependencies?: string[] | undefined;
5832
+ readonly theme?: string | undefined;
5833
+ readonly externalId?: boolean | undefined;
5834
+ readonly system?: boolean | undefined;
5835
+ readonly min?: number | undefined;
5836
+ readonly max?: number | undefined;
5837
+ readonly group?: string | undefined;
5838
+ readonly encryptionConfig?: {
5839
+ enabled: boolean;
5840
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
5841
+ keyManagement: {
5842
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
5843
+ keyId?: string | undefined;
5844
+ rotationPolicy?: {
5845
+ enabled: boolean;
5846
+ frequencyDays: number;
5847
+ retainOldVersions: number;
5848
+ autoRotate: boolean;
5849
+ } | undefined;
5850
+ };
5851
+ scope: "record" | "field" | "table" | "database";
5852
+ deterministicEncryption: boolean;
5853
+ searchableEncryption: boolean;
5854
+ } | undefined;
5855
+ readonly columnName?: string | undefined;
5856
+ readonly searchable?: boolean | undefined;
5857
+ readonly unique?: boolean | undefined;
5858
+ readonly defaultValue?: unknown;
5859
+ readonly maxLength?: number | undefined;
5860
+ readonly minLength?: number | undefined;
5861
+ readonly scale?: number | undefined;
5862
+ readonly reference?: string | undefined;
5863
+ readonly referenceFilters?: string[] | undefined;
5864
+ readonly writeRequiresMasterRead?: boolean | undefined;
5865
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
5866
+ readonly expression?: {
5867
+ dialect: "cel" | "js" | "cron" | "template";
5868
+ source?: string | undefined;
5869
+ ast?: unknown;
5870
+ meta?: {
5871
+ rationale?: string | undefined;
5872
+ generatedBy?: string | undefined;
5873
+ } | undefined;
5874
+ } | undefined;
5875
+ readonly summaryOperations?: {
5876
+ object: string;
5877
+ field: string;
5878
+ function: "min" | "max" | "count" | "sum" | "avg";
5879
+ } | undefined;
5880
+ readonly language?: string | undefined;
5881
+ readonly lineNumbers?: boolean | undefined;
5882
+ readonly maxRating?: number | undefined;
5883
+ readonly allowHalf?: boolean | undefined;
5884
+ readonly displayMap?: boolean | undefined;
5885
+ readonly allowGeocoding?: boolean | undefined;
5886
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
5887
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
5888
+ readonly allowAlpha?: boolean | undefined;
5889
+ readonly presetColors?: string[] | undefined;
5890
+ readonly step?: number | undefined;
5891
+ readonly showValue?: boolean | undefined;
5892
+ readonly marks?: Record<string, string> | undefined;
5893
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
5894
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
5895
+ readonly displayValue?: boolean | undefined;
5896
+ readonly allowScanning?: boolean | undefined;
5897
+ readonly currencyConfig?: {
5898
+ precision: number;
5899
+ currencyMode: "fixed" | "dynamic";
5900
+ defaultCurrency: string;
5901
+ } | undefined;
5902
+ readonly vectorConfig?: {
5903
+ dimensions: number;
5904
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
5905
+ normalized: boolean;
5906
+ indexed: boolean;
5907
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
5908
+ } | undefined;
5909
+ readonly fileAttachmentConfig?: {
5910
+ virusScan: boolean;
5911
+ virusScanOnUpload: boolean;
5912
+ quarantineOnThreat: boolean;
5913
+ allowMultiple: boolean;
5914
+ allowReplace: boolean;
5915
+ allowDelete: boolean;
5916
+ requireUpload: boolean;
5917
+ extractMetadata: boolean;
5918
+ extractText: boolean;
5919
+ versioningEnabled: boolean;
5920
+ publicRead: boolean;
5921
+ presignedUrlExpiry: number;
5922
+ minSize?: number | undefined;
5923
+ maxSize?: number | undefined;
5924
+ allowedTypes?: string[] | undefined;
5925
+ blockedTypes?: string[] | undefined;
5926
+ allowedMimeTypes?: string[] | undefined;
5927
+ blockedMimeTypes?: string[] | undefined;
5928
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
5929
+ storageProvider?: string | undefined;
5930
+ storageBucket?: string | undefined;
5931
+ storagePrefix?: string | undefined;
5932
+ imageValidation?: {
5933
+ generateThumbnails: boolean;
5934
+ preserveMetadata: boolean;
5935
+ autoRotate: boolean;
5936
+ minWidth?: number | undefined;
5937
+ maxWidth?: number | undefined;
5938
+ minHeight?: number | undefined;
5939
+ maxHeight?: number | undefined;
5940
+ aspectRatio?: string | undefined;
5941
+ thumbnailSizes?: {
5942
+ name: string;
5943
+ width: number;
5944
+ height: number;
5945
+ crop: boolean;
5946
+ }[] | undefined;
5947
+ } | undefined;
5948
+ maxVersions?: number | undefined;
5949
+ } | undefined;
5950
+ readonly maskingRule?: {
5951
+ field: string;
5952
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
5953
+ preserveFormat: boolean;
5954
+ preserveLength: boolean;
5955
+ pattern?: string | undefined;
5956
+ roles?: string[] | undefined;
5957
+ exemptRoles?: string[] | undefined;
5958
+ } | undefined;
5959
+ readonly auditTrail?: boolean | undefined;
5960
+ readonly cached?: {
5961
+ enabled: boolean;
5962
+ ttl: number;
5963
+ invalidateOn: string[];
5964
+ } | undefined;
5965
+ readonly dataQuality?: {
5966
+ uniqueness: boolean;
5967
+ completeness: number;
5968
+ accuracy?: {
5969
+ source: string;
5970
+ threshold: number;
5971
+ } | undefined;
5972
+ } | undefined;
5973
+ readonly conditionalRequired?: {
5974
+ dialect: "cel" | "js" | "cron" | "template";
5975
+ source?: string | undefined;
5976
+ ast?: unknown;
5977
+ meta?: {
5978
+ rationale?: string | undefined;
5979
+ generatedBy?: string | undefined;
5980
+ } | undefined;
5981
+ } | undefined;
5982
+ readonly hidden?: boolean | undefined;
5983
+ readonly sortable?: boolean | undefined;
5984
+ readonly inlineHelpText?: string | undefined;
5985
+ readonly trackFeedHistory?: boolean | undefined;
5986
+ readonly caseSensitive?: boolean | undefined;
5987
+ readonly autonumberFormat?: string | undefined;
5988
+ readonly index?: boolean | undefined;
5989
+ readonly type: "number";
5990
+ };
5991
+ readonly total_tokens: {
5992
+ readonly readonly?: boolean | undefined;
5993
+ readonly format?: string | undefined;
5994
+ readonly options?: {
5995
+ label: string;
5996
+ value: string;
5997
+ color?: string | undefined;
5998
+ default?: boolean | undefined;
5999
+ }[] | undefined;
6000
+ readonly description?: string | undefined;
6001
+ readonly label?: string | undefined;
6002
+ readonly name?: string | undefined;
6003
+ readonly precision?: number | undefined;
6004
+ readonly required?: boolean | undefined;
6005
+ readonly multiple?: boolean | undefined;
6006
+ readonly dependencies?: string[] | undefined;
6007
+ readonly theme?: string | undefined;
6008
+ readonly externalId?: boolean | undefined;
6009
+ readonly system?: boolean | undefined;
6010
+ readonly min?: number | undefined;
6011
+ readonly max?: number | undefined;
6012
+ readonly group?: string | undefined;
6013
+ readonly encryptionConfig?: {
6014
+ enabled: boolean;
6015
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6016
+ keyManagement: {
6017
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6018
+ keyId?: string | undefined;
6019
+ rotationPolicy?: {
6020
+ enabled: boolean;
6021
+ frequencyDays: number;
6022
+ retainOldVersions: number;
6023
+ autoRotate: boolean;
6024
+ } | undefined;
6025
+ };
6026
+ scope: "record" | "field" | "table" | "database";
6027
+ deterministicEncryption: boolean;
6028
+ searchableEncryption: boolean;
6029
+ } | undefined;
6030
+ readonly columnName?: string | undefined;
6031
+ readonly searchable?: boolean | undefined;
6032
+ readonly unique?: boolean | undefined;
6033
+ readonly defaultValue?: unknown;
6034
+ readonly maxLength?: number | undefined;
6035
+ readonly minLength?: number | undefined;
6036
+ readonly scale?: number | undefined;
6037
+ readonly reference?: string | undefined;
6038
+ readonly referenceFilters?: string[] | undefined;
6039
+ readonly writeRequiresMasterRead?: boolean | undefined;
6040
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6041
+ readonly expression?: {
6042
+ dialect: "cel" | "js" | "cron" | "template";
6043
+ source?: string | undefined;
6044
+ ast?: unknown;
6045
+ meta?: {
6046
+ rationale?: string | undefined;
6047
+ generatedBy?: string | undefined;
6048
+ } | undefined;
6049
+ } | undefined;
6050
+ readonly summaryOperations?: {
6051
+ object: string;
6052
+ field: string;
6053
+ function: "min" | "max" | "count" | "sum" | "avg";
6054
+ } | undefined;
6055
+ readonly language?: string | undefined;
6056
+ readonly lineNumbers?: boolean | undefined;
6057
+ readonly maxRating?: number | undefined;
6058
+ readonly allowHalf?: boolean | undefined;
6059
+ readonly displayMap?: boolean | undefined;
6060
+ readonly allowGeocoding?: boolean | undefined;
6061
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6062
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6063
+ readonly allowAlpha?: boolean | undefined;
6064
+ readonly presetColors?: string[] | undefined;
6065
+ readonly step?: number | undefined;
6066
+ readonly showValue?: boolean | undefined;
6067
+ readonly marks?: Record<string, string> | undefined;
6068
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6069
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6070
+ readonly displayValue?: boolean | undefined;
6071
+ readonly allowScanning?: boolean | undefined;
6072
+ readonly currencyConfig?: {
6073
+ precision: number;
6074
+ currencyMode: "fixed" | "dynamic";
6075
+ defaultCurrency: string;
6076
+ } | undefined;
6077
+ readonly vectorConfig?: {
6078
+ dimensions: number;
6079
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6080
+ normalized: boolean;
6081
+ indexed: boolean;
6082
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
6083
+ } | undefined;
6084
+ readonly fileAttachmentConfig?: {
6085
+ virusScan: boolean;
6086
+ virusScanOnUpload: boolean;
6087
+ quarantineOnThreat: boolean;
6088
+ allowMultiple: boolean;
6089
+ allowReplace: boolean;
6090
+ allowDelete: boolean;
6091
+ requireUpload: boolean;
6092
+ extractMetadata: boolean;
6093
+ extractText: boolean;
6094
+ versioningEnabled: boolean;
6095
+ publicRead: boolean;
6096
+ presignedUrlExpiry: number;
6097
+ minSize?: number | undefined;
6098
+ maxSize?: number | undefined;
6099
+ allowedTypes?: string[] | undefined;
6100
+ blockedTypes?: string[] | undefined;
6101
+ allowedMimeTypes?: string[] | undefined;
6102
+ blockedMimeTypes?: string[] | undefined;
6103
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6104
+ storageProvider?: string | undefined;
6105
+ storageBucket?: string | undefined;
6106
+ storagePrefix?: string | undefined;
6107
+ imageValidation?: {
6108
+ generateThumbnails: boolean;
6109
+ preserveMetadata: boolean;
6110
+ autoRotate: boolean;
6111
+ minWidth?: number | undefined;
6112
+ maxWidth?: number | undefined;
6113
+ minHeight?: number | undefined;
6114
+ maxHeight?: number | undefined;
6115
+ aspectRatio?: string | undefined;
6116
+ thumbnailSizes?: {
6117
+ name: string;
6118
+ width: number;
6119
+ height: number;
6120
+ crop: boolean;
6121
+ }[] | undefined;
6122
+ } | undefined;
6123
+ maxVersions?: number | undefined;
6124
+ } | undefined;
6125
+ readonly maskingRule?: {
6126
+ field: string;
6127
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
6128
+ preserveFormat: boolean;
6129
+ preserveLength: boolean;
6130
+ pattern?: string | undefined;
6131
+ roles?: string[] | undefined;
6132
+ exemptRoles?: string[] | undefined;
6133
+ } | undefined;
6134
+ readonly auditTrail?: boolean | undefined;
6135
+ readonly cached?: {
6136
+ enabled: boolean;
6137
+ ttl: number;
6138
+ invalidateOn: string[];
6139
+ } | undefined;
6140
+ readonly dataQuality?: {
6141
+ uniqueness: boolean;
6142
+ completeness: number;
6143
+ accuracy?: {
6144
+ source: string;
6145
+ threshold: number;
6146
+ } | undefined;
6147
+ } | undefined;
6148
+ readonly conditionalRequired?: {
6149
+ dialect: "cel" | "js" | "cron" | "template";
6150
+ source?: string | undefined;
6151
+ ast?: unknown;
6152
+ meta?: {
6153
+ rationale?: string | undefined;
6154
+ generatedBy?: string | undefined;
6155
+ } | undefined;
6156
+ } | undefined;
6157
+ readonly hidden?: boolean | undefined;
6158
+ readonly sortable?: boolean | undefined;
6159
+ readonly inlineHelpText?: string | undefined;
6160
+ readonly trackFeedHistory?: boolean | undefined;
6161
+ readonly caseSensitive?: boolean | undefined;
6162
+ readonly autonumberFormat?: string | undefined;
6163
+ readonly index?: boolean | undefined;
6164
+ readonly type: "number";
6165
+ };
6166
+ readonly latency_ms: {
6167
+ readonly readonly?: boolean | undefined;
6168
+ readonly format?: string | undefined;
6169
+ readonly options?: {
6170
+ label: string;
6171
+ value: string;
6172
+ color?: string | undefined;
6173
+ default?: boolean | undefined;
6174
+ }[] | undefined;
6175
+ readonly description?: string | undefined;
6176
+ readonly label?: string | undefined;
6177
+ readonly name?: string | undefined;
6178
+ readonly precision?: number | undefined;
6179
+ readonly required?: boolean | undefined;
6180
+ readonly multiple?: boolean | undefined;
6181
+ readonly dependencies?: string[] | undefined;
6182
+ readonly theme?: string | undefined;
6183
+ readonly externalId?: boolean | undefined;
6184
+ readonly system?: boolean | undefined;
6185
+ readonly min?: number | undefined;
6186
+ readonly max?: number | undefined;
6187
+ readonly group?: string | undefined;
6188
+ readonly encryptionConfig?: {
6189
+ enabled: boolean;
6190
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6191
+ keyManagement: {
6192
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6193
+ keyId?: string | undefined;
6194
+ rotationPolicy?: {
6195
+ enabled: boolean;
6196
+ frequencyDays: number;
6197
+ retainOldVersions: number;
6198
+ autoRotate: boolean;
6199
+ } | undefined;
6200
+ };
6201
+ scope: "record" | "field" | "table" | "database";
6202
+ deterministicEncryption: boolean;
6203
+ searchableEncryption: boolean;
6204
+ } | undefined;
6205
+ readonly columnName?: string | undefined;
6206
+ readonly searchable?: boolean | undefined;
6207
+ readonly unique?: boolean | undefined;
6208
+ readonly defaultValue?: unknown;
6209
+ readonly maxLength?: number | undefined;
6210
+ readonly minLength?: number | undefined;
6211
+ readonly scale?: number | undefined;
6212
+ readonly reference?: string | undefined;
6213
+ readonly referenceFilters?: string[] | undefined;
6214
+ readonly writeRequiresMasterRead?: boolean | undefined;
6215
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6216
+ readonly expression?: {
6217
+ dialect: "cel" | "js" | "cron" | "template";
6218
+ source?: string | undefined;
6219
+ ast?: unknown;
6220
+ meta?: {
6221
+ rationale?: string | undefined;
6222
+ generatedBy?: string | undefined;
6223
+ } | undefined;
6224
+ } | undefined;
6225
+ readonly summaryOperations?: {
6226
+ object: string;
6227
+ field: string;
6228
+ function: "min" | "max" | "count" | "sum" | "avg";
6229
+ } | undefined;
6230
+ readonly language?: string | undefined;
6231
+ readonly lineNumbers?: boolean | undefined;
6232
+ readonly maxRating?: number | undefined;
6233
+ readonly allowHalf?: boolean | undefined;
6234
+ readonly displayMap?: boolean | undefined;
6235
+ readonly allowGeocoding?: boolean | undefined;
6236
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6237
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6238
+ readonly allowAlpha?: boolean | undefined;
6239
+ readonly presetColors?: string[] | undefined;
6240
+ readonly step?: number | undefined;
6241
+ readonly showValue?: boolean | undefined;
6242
+ readonly marks?: Record<string, string> | undefined;
6243
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6244
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6245
+ readonly displayValue?: boolean | undefined;
6246
+ readonly allowScanning?: boolean | undefined;
6247
+ readonly currencyConfig?: {
6248
+ precision: number;
6249
+ currencyMode: "fixed" | "dynamic";
6250
+ defaultCurrency: string;
6251
+ } | undefined;
6252
+ readonly vectorConfig?: {
6253
+ dimensions: number;
6254
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6255
+ normalized: boolean;
6256
+ indexed: boolean;
6257
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
6258
+ } | undefined;
6259
+ readonly fileAttachmentConfig?: {
6260
+ virusScan: boolean;
6261
+ virusScanOnUpload: boolean;
6262
+ quarantineOnThreat: boolean;
6263
+ allowMultiple: boolean;
6264
+ allowReplace: boolean;
6265
+ allowDelete: boolean;
6266
+ requireUpload: boolean;
6267
+ extractMetadata: boolean;
6268
+ extractText: boolean;
6269
+ versioningEnabled: boolean;
6270
+ publicRead: boolean;
6271
+ presignedUrlExpiry: number;
6272
+ minSize?: number | undefined;
6273
+ maxSize?: number | undefined;
6274
+ allowedTypes?: string[] | undefined;
6275
+ blockedTypes?: string[] | undefined;
6276
+ allowedMimeTypes?: string[] | undefined;
6277
+ blockedMimeTypes?: string[] | undefined;
6278
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6279
+ storageProvider?: string | undefined;
6280
+ storageBucket?: string | undefined;
6281
+ storagePrefix?: string | undefined;
6282
+ imageValidation?: {
6283
+ generateThumbnails: boolean;
6284
+ preserveMetadata: boolean;
6285
+ autoRotate: boolean;
6286
+ minWidth?: number | undefined;
6287
+ maxWidth?: number | undefined;
6288
+ minHeight?: number | undefined;
6289
+ maxHeight?: number | undefined;
6290
+ aspectRatio?: string | undefined;
6291
+ thumbnailSizes?: {
6292
+ name: string;
6293
+ width: number;
6294
+ height: number;
6295
+ crop: boolean;
6296
+ }[] | undefined;
6297
+ } | undefined;
6298
+ maxVersions?: number | undefined;
6299
+ } | undefined;
6300
+ readonly maskingRule?: {
6301
+ field: string;
6302
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
6303
+ preserveFormat: boolean;
6304
+ preserveLength: boolean;
6305
+ pattern?: string | undefined;
6306
+ roles?: string[] | undefined;
6307
+ exemptRoles?: string[] | undefined;
6308
+ } | undefined;
6309
+ readonly auditTrail?: boolean | undefined;
6310
+ readonly cached?: {
6311
+ enabled: boolean;
6312
+ ttl: number;
6313
+ invalidateOn: string[];
6314
+ } | undefined;
6315
+ readonly dataQuality?: {
6316
+ uniqueness: boolean;
6317
+ completeness: number;
6318
+ accuracy?: {
6319
+ source: string;
6320
+ threshold: number;
6321
+ } | undefined;
6322
+ } | undefined;
6323
+ readonly conditionalRequired?: {
6324
+ dialect: "cel" | "js" | "cron" | "template";
6325
+ source?: string | undefined;
6326
+ ast?: unknown;
6327
+ meta?: {
6328
+ rationale?: string | undefined;
6329
+ generatedBy?: string | undefined;
6330
+ } | undefined;
6331
+ } | undefined;
6332
+ readonly hidden?: boolean | undefined;
6333
+ readonly sortable?: boolean | undefined;
6334
+ readonly inlineHelpText?: string | undefined;
6335
+ readonly trackFeedHistory?: boolean | undefined;
6336
+ readonly caseSensitive?: boolean | undefined;
6337
+ readonly autonumberFormat?: string | undefined;
6338
+ readonly index?: boolean | undefined;
6339
+ readonly type: "number";
6340
+ };
6341
+ readonly created_at: {
6342
+ readonly readonly?: boolean | undefined;
6343
+ readonly format?: string | undefined;
6344
+ readonly options?: {
6345
+ label: string;
6346
+ value: string;
6347
+ color?: string | undefined;
6348
+ default?: boolean | undefined;
6349
+ }[] | undefined;
6350
+ readonly description?: string | undefined;
6351
+ readonly label?: string | undefined;
6352
+ readonly name?: string | undefined;
6353
+ readonly precision?: number | undefined;
6354
+ readonly required?: boolean | undefined;
6355
+ readonly multiple?: boolean | undefined;
6356
+ readonly dependencies?: string[] | undefined;
6357
+ readonly theme?: string | undefined;
6358
+ readonly externalId?: boolean | undefined;
6359
+ readonly system?: boolean | undefined;
6360
+ readonly min?: number | undefined;
6361
+ readonly max?: number | undefined;
6362
+ readonly group?: string | undefined;
6363
+ readonly encryptionConfig?: {
6364
+ enabled: boolean;
6365
+ algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
6366
+ keyManagement: {
6367
+ provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
6368
+ keyId?: string | undefined;
6369
+ rotationPolicy?: {
6370
+ enabled: boolean;
6371
+ frequencyDays: number;
6372
+ retainOldVersions: number;
6373
+ autoRotate: boolean;
6374
+ } | undefined;
6375
+ };
6376
+ scope: "record" | "field" | "table" | "database";
6377
+ deterministicEncryption: boolean;
6378
+ searchableEncryption: boolean;
6379
+ } | undefined;
6380
+ readonly columnName?: string | undefined;
6381
+ readonly searchable?: boolean | undefined;
6382
+ readonly unique?: boolean | undefined;
6383
+ readonly defaultValue?: unknown;
6384
+ readonly maxLength?: number | undefined;
6385
+ readonly minLength?: number | undefined;
6386
+ readonly scale?: number | undefined;
6387
+ readonly reference?: string | undefined;
6388
+ readonly referenceFilters?: string[] | undefined;
6389
+ readonly writeRequiresMasterRead?: boolean | undefined;
6390
+ readonly deleteBehavior?: "set_null" | "cascade" | "restrict" | undefined;
6391
+ readonly expression?: {
6392
+ dialect: "cel" | "js" | "cron" | "template";
6393
+ source?: string | undefined;
6394
+ ast?: unknown;
6395
+ meta?: {
6396
+ rationale?: string | undefined;
6397
+ generatedBy?: string | undefined;
6398
+ } | undefined;
6399
+ } | undefined;
6400
+ readonly summaryOperations?: {
6401
+ object: string;
6402
+ field: string;
6403
+ function: "min" | "max" | "count" | "sum" | "avg";
6404
+ } | undefined;
6405
+ readonly language?: string | undefined;
6406
+ readonly lineNumbers?: boolean | undefined;
6407
+ readonly maxRating?: number | undefined;
6408
+ readonly allowHalf?: boolean | undefined;
6409
+ readonly displayMap?: boolean | undefined;
6410
+ readonly allowGeocoding?: boolean | undefined;
6411
+ readonly addressFormat?: "us" | "uk" | "international" | undefined;
6412
+ readonly colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
6413
+ readonly allowAlpha?: boolean | undefined;
6414
+ readonly presetColors?: string[] | undefined;
6415
+ readonly step?: number | undefined;
6416
+ readonly showValue?: boolean | undefined;
6417
+ readonly marks?: Record<string, string> | undefined;
6418
+ readonly barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
6419
+ readonly qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
6420
+ readonly displayValue?: boolean | undefined;
6421
+ readonly allowScanning?: boolean | undefined;
6422
+ readonly currencyConfig?: {
6423
+ precision: number;
6424
+ currencyMode: "fixed" | "dynamic";
6425
+ defaultCurrency: string;
6426
+ } | undefined;
6427
+ readonly vectorConfig?: {
6428
+ dimensions: number;
6429
+ distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
6430
+ normalized: boolean;
6431
+ indexed: boolean;
6432
+ indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
6433
+ } | undefined;
6434
+ readonly fileAttachmentConfig?: {
6435
+ virusScan: boolean;
6436
+ virusScanOnUpload: boolean;
6437
+ quarantineOnThreat: boolean;
6438
+ allowMultiple: boolean;
6439
+ allowReplace: boolean;
6440
+ allowDelete: boolean;
6441
+ requireUpload: boolean;
6442
+ extractMetadata: boolean;
6443
+ extractText: boolean;
6444
+ versioningEnabled: boolean;
6445
+ publicRead: boolean;
6446
+ presignedUrlExpiry: number;
6447
+ minSize?: number | undefined;
6448
+ maxSize?: number | undefined;
6449
+ allowedTypes?: string[] | undefined;
6450
+ blockedTypes?: string[] | undefined;
6451
+ allowedMimeTypes?: string[] | undefined;
6452
+ blockedMimeTypes?: string[] | undefined;
6453
+ virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
6454
+ storageProvider?: string | undefined;
6455
+ storageBucket?: string | undefined;
6456
+ storagePrefix?: string | undefined;
6457
+ imageValidation?: {
6458
+ generateThumbnails: boolean;
6459
+ preserveMetadata: boolean;
6460
+ autoRotate: boolean;
6461
+ minWidth?: number | undefined;
6462
+ maxWidth?: number | undefined;
6463
+ minHeight?: number | undefined;
6464
+ maxHeight?: number | undefined;
6465
+ aspectRatio?: string | undefined;
6466
+ thumbnailSizes?: {
6467
+ name: string;
6468
+ width: number;
6469
+ height: number;
6470
+ crop: boolean;
6471
+ }[] | undefined;
6472
+ } | undefined;
6473
+ maxVersions?: number | undefined;
6474
+ } | undefined;
6475
+ readonly maskingRule?: {
6476
+ field: string;
6477
+ strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
6478
+ preserveFormat: boolean;
6479
+ preserveLength: boolean;
6480
+ pattern?: string | undefined;
6481
+ roles?: string[] | undefined;
6482
+ exemptRoles?: string[] | undefined;
6483
+ } | undefined;
6484
+ readonly auditTrail?: boolean | undefined;
6485
+ readonly cached?: {
6486
+ enabled: boolean;
6487
+ ttl: number;
6488
+ invalidateOn: string[];
6489
+ } | undefined;
6490
+ readonly dataQuality?: {
6491
+ uniqueness: boolean;
6492
+ completeness: number;
6493
+ accuracy?: {
6494
+ source: string;
6495
+ threshold: number;
6496
+ } | undefined;
6497
+ } | undefined;
6498
+ readonly conditionalRequired?: {
6499
+ dialect: "cel" | "js" | "cron" | "template";
6500
+ source?: string | undefined;
6501
+ ast?: unknown;
6502
+ meta?: {
6503
+ rationale?: string | undefined;
6504
+ generatedBy?: string | undefined;
6505
+ } | undefined;
6506
+ } | undefined;
6507
+ readonly hidden?: boolean | undefined;
6508
+ readonly sortable?: boolean | undefined;
6509
+ readonly inlineHelpText?: string | undefined;
6510
+ readonly trackFeedHistory?: boolean | undefined;
6511
+ readonly caseSensitive?: boolean | undefined;
6512
+ readonly autonumberFormat?: string | undefined;
6513
+ readonly index?: boolean | undefined;
6514
+ readonly type: "datetime";
6515
+ };
6516
+ };
6517
+ readonly indexes: [{
6518
+ readonly fields: ["conversation_id"];
6519
+ }, {
6520
+ readonly fields: ["conversation_id", "created_at"];
6521
+ }, {
6522
+ readonly fields: ["model"];
5600
6523
  }];
5601
6524
  readonly enable: {
5602
6525
  readonly trackHistory: false;
@@ -5627,7 +6550,7 @@ declare const AiTraceObject: Omit<{
5627
6550
  abstract: boolean;
5628
6551
  datasource: string;
5629
6552
  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";
6553
+ 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
6554
  required: boolean;
5632
6555
  searchable: boolean;
5633
6556
  multiple: boolean;
@@ -6249,7 +7172,7 @@ declare const AiTraceObject: Omit<{
6249
7172
  field?: string | undefined;
6250
7173
  objectOverride?: string | undefined;
6251
7174
  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;
7175
+ 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
7176
  options?: {
6254
7177
  label: string;
6255
7178
  value: string;