@magemetrics/core 0.12.2 → 0.14.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.
Files changed (4) hide show
  1. package/README.md +220 -0
  2. package/dist/index.d.ts +1670 -137
  3. package/dist/index.js +1796 -430
  4. package/package.json +9 -9
package/dist/index.d.ts CHANGED
@@ -9,8 +9,17 @@ import type { NodeBase } from '@xyflow/system';
9
9
  import type { Simplify } from 'type-fest';
10
10
  import type { Tool } from 'ai';
11
11
  import type { UIMessage } from 'ai';
12
+ import type { UIMessagePart } from 'ai';
12
13
  import { z } from 'zod';
13
14
 
15
+ export declare const ASK_USER_QUESTION: "askUserQuestion";
16
+
17
+ export declare type AskUserQuestionInput = z.infer<typeof inputSchema_9>;
18
+
19
+ export declare type AskUserQuestionPart = Extract<MMChatUIMessagePart, {
20
+ type: `tool-${typeof ASK_USER_QUESTION}`;
21
+ }>;
22
+
14
23
  /**
15
24
  * Universal storage adapter interface for cross-platform compatibility.
16
25
  * All operations are async to accommodate different storage mechanisms.
@@ -111,6 +120,11 @@ export declare interface AuthProvider {
111
120
  * @param listener the listener to remove
112
121
  */
113
122
  removeEventListener<T extends MageMetricsEvent>(type: T["type"], listener: MageMetricsEventListener<T>): void;
123
+ /**
124
+ * Clean up resources held by the auth provider.
125
+ * Called when the provider is no longer needed (e.g., client is being replaced).
126
+ */
127
+ destroy(): void;
114
128
  }
115
129
 
116
130
  /**
@@ -128,6 +142,39 @@ export declare class BrowserStorageAdapter implements AsyncStorage {
128
142
  removeItem(key: string): Promise<void>;
129
143
  }
130
144
 
145
+ export declare type CanonicalDataType = z.infer<typeof CanonicalDataTypeSchema>;
146
+
147
+ declare const CanonicalDataTypeSchema: z.ZodEnum<{
148
+ boolean: "boolean";
149
+ array: "array";
150
+ text: "text";
151
+ json: "json";
152
+ other: "other";
153
+ datetime: "datetime";
154
+ numeric: "numeric";
155
+ }>;
156
+
157
+ /** Allowed media types for chat file attachments. */
158
+ export declare const CHAT_ALLOWED_FILE_MEDIA_TYPES: Set<string>;
159
+
160
+ /**
161
+ * Value for the HTML `<input accept>` attribute, derived from
162
+ * {@link CHAT_ALLOWED_FILE_MEDIA_TYPES} so it stays in sync automatically.
163
+ */
164
+ export declare const CHAT_FILE_ACCEPT: string;
165
+
166
+ /**
167
+ * Maximum combined size of all chat file attachments in a single message.
168
+ * Intentional semantic alias of the conversation-level budget.
169
+ */
170
+ export declare const CHAT_MAX_COMBINED_FILE_SIZE: number;
171
+
172
+ /** Maximum number of file attachments per message. */
173
+ export declare const CHAT_MAX_FILE_COUNT = 10;
174
+
175
+ /** Maximum size of a single chat file attachment in bytes (10 MB). */
176
+ export declare const CHAT_MAX_FILE_SIZE: number;
177
+
131
178
  export declare const CHECK_KEY = "mm-ai-check-key";
132
179
 
133
180
  export declare interface ColumnSort {
@@ -145,6 +192,10 @@ declare interface components {
145
192
  unit?: string;
146
193
  /** @enum {string} */
147
194
  canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other";
195
+ formatHint?: {
196
+ isNumeric?: boolean;
197
+ isLikelyYear?: boolean;
198
+ };
148
199
  }[];
149
200
  /** Format: uuid */
150
201
  CanvasId: string;
@@ -336,8 +387,6 @@ declare interface components {
336
387
  id: string;
337
388
  /** Format: uuid */
338
389
  agent_id: string | null;
339
- /** Format: uuid */
340
- flow_id: string | null;
341
390
  /** @enum {string} */
342
391
  status: "pending" | "running" | "post_processing" | "completed" | "failed" | "cancelled";
343
392
  created_at: string;
@@ -377,7 +426,15 @@ declare interface components {
377
426
  [key: string]: unknown;
378
427
  };
379
428
  } | null;
429
+ /** Format: uuid */
430
+ agent_version_id?: string | null;
380
431
  cached?: boolean;
432
+ /** Format: uuid */
433
+ cached_from?: string | null;
434
+ /** @default 0 */
435
+ report_count: number;
436
+ /** @default 0 */
437
+ visualization_count: number;
381
438
  };
382
439
  StartAgentRunRequest: {
383
440
  /** Format: uuid */
@@ -415,6 +472,7 @@ declare interface components {
415
472
  Agent: {
416
473
  /** Format: uuid */
417
474
  id: string;
475
+ created_at: string;
418
476
  name: string;
419
477
  objective: string | null;
420
478
  generated_objective_fragment: string | null;
@@ -449,7 +507,75 @@ declare interface components {
449
507
  })[] | null;
450
508
  output_schema: {
451
509
  [key: string]: unknown;
510
+ };
511
+ task_plan: {
512
+ id: string;
513
+ title: string;
514
+ /** @description Detailed steps or description of what the task will do */
515
+ description?: string;
516
+ }[] | null;
517
+ model_config: {
518
+ /** @enum {string} */
519
+ model: "gemini-3.1-pro-preview";
520
+ /** @enum {string} */
521
+ thinking?: "low" | "high";
522
+ } | {
523
+ /** @enum {string} */
524
+ model: "gemini-2.5-pro";
525
+ /** @enum {string} */
526
+ thinking?: "low" | "high";
527
+ } | {
528
+ /** @enum {string} */
529
+ model: "claude-sonnet-4-6" | "claude-opus-4-6";
530
+ /** @enum {string} */
531
+ effort?: "low" | "medium" | "high";
532
+ } | {
533
+ /** @enum {string} */
534
+ model: "claude-haiku-4-5" | "claude-opus-4-5";
452
535
  } | null;
536
+ /** @enum {string} */
537
+ execution_platform: "native" | "sandbox" | "sandbox_public";
538
+ updated_at: string;
539
+ };
540
+ AgentVersion: {
541
+ /** Format: uuid */
542
+ id: string;
543
+ version: number;
544
+ name: string;
545
+ objective: string | null;
546
+ generated_objective_fragment: string | null;
547
+ active_tools: string[] | null;
548
+ input_schema: ({
549
+ id: string;
550
+ name: string;
551
+ description?: string;
552
+ /** @enum {string} */
553
+ type: "enum";
554
+ options: {
555
+ value: string;
556
+ fragment?: string;
557
+ }[];
558
+ /** @default false */
559
+ useFragmentMapping: boolean;
560
+ /** @default false */
561
+ required: boolean;
562
+ } | {
563
+ id: string;
564
+ name: string;
565
+ description?: string;
566
+ /** @enum {string} */
567
+ type: "text";
568
+ /**
569
+ * @default false
570
+ * @enum {boolean}
571
+ */
572
+ useFragmentMapping: false;
573
+ /** @default false */
574
+ required: boolean;
575
+ })[] | null;
576
+ output_schema: {
577
+ [key: string]: unknown;
578
+ };
453
579
  task_plan: {
454
580
  id: string;
455
581
  title: string;
@@ -477,15 +603,13 @@ declare interface components {
477
603
  } | null;
478
604
  /** @enum {string} */
479
605
  execution_platform: "native" | "sandbox" | "sandbox_public";
480
- master_prompt_name: string | null;
481
- master_prompt_version: number | null;
606
+ restored_from_version?: number | null;
482
607
  created_at: string;
483
- updated_at: string;
484
608
  };
485
609
  CreateGlobalKnowledgeItem: {
486
610
  content: string;
487
- /** @description Optional identifier from your system, used for lookup and batch operations */
488
- external_id?: string;
611
+ /** @description Stable, client-defined identifier from your system.Use it to look up, update, or upsert the item without tracking Magemetrics internal IDs. */
612
+ client_reference_id?: string;
489
613
  /** @default true */
490
614
  is_active: boolean;
491
615
  tags?: string[];
@@ -496,8 +620,8 @@ declare interface components {
496
620
  };
497
621
  CreateSchemaKnowledgeItem: {
498
622
  content: string;
499
- /** @description Optional identifier from your system, used for lookup and batch operations */
500
- external_id?: string;
623
+ /** @description Stable, client-defined identifier from your system.Use it to look up, update, or upsert the item without tracking Magemetrics internal IDs. */
624
+ client_reference_id?: string;
501
625
  /** @default true */
502
626
  is_active: boolean;
503
627
  tags?: string[];
@@ -515,6 +639,31 @@ declare interface components {
515
639
  /** @description Column name (optional). Omit for table-level items, include for column-level items. */
516
640
  column_name?: string;
517
641
  };
642
+ UpsertGlobalKnowledgeItem: {
643
+ content: string;
644
+ /** @description Stable, client-defined identifier from your system.Use it to look up, update, or upsert the item without tracking Magemetrics internal IDs. */
645
+ client_reference_id: string;
646
+ /** @default true */
647
+ is_active: boolean;
648
+ tags?: string[];
649
+ /** @description IDs of applications this item is scoped to. Empty or omitted means all applications. */
650
+ application_ids?: number[];
651
+ /** @enum {string} */
652
+ type: "global";
653
+ };
654
+ UpsertSchemaKnowledgeItem: {
655
+ content: string;
656
+ /** @description Stable, client-defined identifier from your system.Use it to look up, update, or upsert the item without tracking Magemetrics internal IDs. */
657
+ client_reference_id: string;
658
+ /** @default true */
659
+ is_active: boolean;
660
+ tags?: string[];
661
+ /** @description IDs of applications this item is scoped to. Empty or omitted means all applications. */
662
+ application_ids?: number[];
663
+ /** @enum {string} */
664
+ type: "schema";
665
+ path: components["schemas"]["SchemaPath"];
666
+ };
518
667
  StatisticsResponse: {
519
668
  /** @description The time period in days for these statistics */
520
669
  period_days: number;
@@ -533,7 +682,7 @@ declare interface components {
533
682
  /** @description Statistics for agent-generated content (custom agent runs only) */
534
683
  AgentGeneratedStatistics: {
535
684
  /** @description Number of custom agent runs */
536
- agent_runs: number;
685
+ agent_runs: number | null;
537
686
  };
538
687
  };
539
688
  responses: never;
@@ -572,11 +721,15 @@ declare type CustomDataParts = {
572
721
  };
573
722
  "report-status": {
574
723
  status: string | null;
724
+ report_id?: string;
725
+ tool_call_id?: string;
575
726
  };
576
727
  "report-narration": {
577
728
  step_name: string;
578
729
  step_order: number;
579
730
  narration: string;
731
+ report_id?: string;
732
+ tool_call_id?: string;
580
733
  };
581
734
  };
582
735
 
@@ -613,6 +766,7 @@ export declare class DirectAuthProvider implements AuthProvider {
613
766
  signal?: AbortSignal;
614
767
  }): void;
615
768
  removeEventListener<T extends MageMetricsEvent>(type: T["type"], listener: MageMetricsEventListener<T>): void;
769
+ destroy(): void;
616
770
  private setState;
617
771
  }
618
772
 
@@ -636,6 +790,7 @@ export declare class ExternalAuthProvider implements AuthProvider {
636
790
  private processedJwt;
637
791
  private userId;
638
792
  private events;
793
+ private authSubscription;
639
794
  constructor(config: ExternalAuthProviderConfig);
640
795
  initialize(): Promise<void>;
641
796
  getHeaders(): Promise<Record<string, string>>;
@@ -649,6 +804,7 @@ export declare class ExternalAuthProvider implements AuthProvider {
649
804
  removeEventListener<T extends MageMetricsEvent>(type: T["type"], listener: MageMetricsEventListener<T>): void;
650
805
  startAutoRefresh(): Promise<void> | undefined;
651
806
  stopAutoRefresh(): Promise<void> | undefined;
807
+ destroy(): void;
652
808
  private getApiInformation;
653
809
  private initializeSupabaseClient;
654
810
  private handleAuthentication;
@@ -671,7 +827,18 @@ export declare interface ExternalAuthProviderConfig {
671
827
  authOptions?: Pick<GoTrueClientOptions, "fetch">;
672
828
  }
673
829
 
674
- declare type FrontendRecentFlows = z.infer<typeof FrontendRecentFlowsSchema>;
830
+ export declare type FrontendFlow = z.infer<typeof FrontendFlowSchema>;
831
+
832
+ declare const FrontendFlowSchema: z.ZodObject<{
833
+ title: z.ZodNullable<z.ZodString>;
834
+ id: z.ZodString;
835
+ request: z.ZodString;
836
+ created_at: z.ZodString;
837
+ application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
838
+ user_id: z.ZodNullable<z.ZodString>;
839
+ }, z.core.$strip>;
840
+
841
+ export declare type FrontendRecentFlows = z.infer<typeof FrontendRecentFlowsSchema>;
675
842
 
676
843
  declare const FrontendRecentFlowsSchema: z.ZodObject<{
677
844
  title: z.ZodNullable<z.ZodString>;
@@ -680,13 +847,310 @@ declare const FrontendRecentFlowsSchema: z.ZodObject<{
680
847
  created_at: z.ZodString;
681
848
  application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
682
849
  user_id: z.ZodNullable<z.ZodString>;
683
- context_tokens: z.ZodOptional<z.ZodNumber>;
684
- acc_input_tokens: z.ZodOptional<z.ZodNumber>;
685
- acc_output_tokens: z.ZodOptional<z.ZodNumber>;
686
850
  }, z.core.$strip>;
687
851
 
852
+ export declare type FrontendRecommendations = z.infer<typeof FrontendRecommendationsSchema>;
853
+
854
+ declare const FrontendRecommendationsSchema: z.ZodObject<{
855
+ starter: z.ZodString;
856
+ explanation: z.ZodString;
857
+ type: z.ZodString;
858
+ }, z.core.$strip>;
859
+
860
+ export declare type FrontendReport = z.infer<typeof FrontendReportSchema>;
861
+
862
+ export declare type FrontendReportColumns = z.infer<typeof FrontendReportColumnsSchema>;
863
+
864
+ declare const FrontendReportColumnsSchema: z.ZodArray<z.ZodObject<{
865
+ dataType: z.ZodString;
866
+ renderType: z.ZodOptional<z.ZodString>;
867
+ unit: z.ZodOptional<z.ZodString>;
868
+ canonicalDataType: z.ZodOptional<z.ZodEnum<{
869
+ boolean: "boolean";
870
+ array: "array";
871
+ text: "text";
872
+ json: "json";
873
+ other: "other";
874
+ datetime: "datetime";
875
+ numeric: "numeric";
876
+ }>>;
877
+ formatHint: z.ZodOptional<z.ZodObject<{
878
+ isNumeric: z.ZodOptional<z.ZodBoolean>;
879
+ isLikelyYear: z.ZodOptional<z.ZodBoolean>;
880
+ }, z.core.$strip>>;
881
+ name: z.ZodString;
882
+ data_type: z.ZodString;
883
+ }, z.core.$strip>>;
884
+
885
+ export declare type FrontendReportExplainability = z.infer<typeof FrontendReportExplainabilitySchema>;
886
+
887
+ declare const FrontendReportExplainabilitySchema: z.ZodObject<{
888
+ columns_lineage: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
889
+ nodes: z.ZodArray<z.ZodObject<{
890
+ id: z.ZodString;
891
+ type: z.ZodEnum<{
892
+ result: "result";
893
+ filter: "filter";
894
+ entity: "entity";
895
+ attribute: "attribute";
896
+ process: "process";
897
+ combine: "combine";
898
+ }>;
899
+ explanation: z.ZodString;
900
+ }, z.core.$strip>>;
901
+ edges: z.ZodArray<z.ZodObject<{
902
+ source: z.ZodString;
903
+ target: z.ZodString;
904
+ }, z.core.$strip>>;
905
+ }, z.core.$strip>>>>;
906
+ report_id: z.ZodUUID;
907
+ sql_explanation: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
908
+ chunk_title: z.ZodString;
909
+ chunk_explanation: z.ZodString;
910
+ lines: z.ZodArray<z.ZodObject<{
911
+ sql: z.ZodString;
912
+ explanation: z.ZodString;
913
+ }, z.core.$strip>>;
914
+ }, z.core.$strip>>>>;
915
+ business_explanation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
916
+ summary: z.ZodString;
917
+ implementation: z.ZodArray<z.ZodString>;
918
+ assumptions: z.ZodArray<z.ZodObject<{
919
+ type: z.ZodEnum<{
920
+ grain: "grain";
921
+ completeness: "completeness";
922
+ transformation: "transformation";
923
+ relationship: "relationship";
924
+ other: "other";
925
+ }>;
926
+ details: z.ZodString;
927
+ explanation: z.ZodString;
928
+ }, z.core.$strip>>;
929
+ }, z.core.$strip>>>;
930
+ flow_data_id: z.ZodNumber;
931
+ confidence_score: z.ZodOptional<z.ZodNumber>;
932
+ confidence_score_reason: z.ZodOptional<z.ZodString>;
933
+ assumptions_score: z.ZodOptional<z.ZodNumber>;
934
+ assumptions_score_reason: z.ZodOptional<z.ZodString>;
935
+ friendliness_score: z.ZodOptional<z.ZodNumber>;
936
+ friendliness_score_reason: z.ZodOptional<z.ZodString>;
937
+ output_dataset: z.ZodOptional<z.ZodString>;
938
+ sql: z.ZodOptional<z.ZodString>;
939
+ }, z.core.$strip>;
940
+
941
+ declare const FrontendReportSchema: z.ZodObject<{
942
+ status: z.ZodNullable<z.ZodString>;
943
+ title: z.ZodString;
944
+ id: z.ZodNumber;
945
+ uuid: z.ZodString;
946
+ request: z.ZodNullable<z.ZodString>;
947
+ created_at: z.ZodString;
948
+ data_summary: z.ZodObject<{
949
+ columns: z.ZodRecord<z.ZodString, z.ZodObject<{
950
+ position: z.ZodOptional<z.ZodNumber>;
951
+ data_type: z.ZodString;
952
+ null_count: z.ZodNullable<z.ZodNumber>;
953
+ unique_count: z.ZodNullable<z.ZodNumber>;
954
+ unique_percentage: z.ZodNullable<z.ZodNumber>;
955
+ min_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
956
+ max_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
957
+ avg_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
958
+ median_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
959
+ std_value: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
960
+ min_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
961
+ max_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
+ min_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
963
+ max_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
964
+ avg_length: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
965
+ }, z.core.$loose>>;
966
+ }, z.core.$loose>;
967
+ is_removed: z.ZodBoolean;
968
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
969
+ last_materialized_at: z.ZodNullable<z.ZodString>;
970
+ materialized_error_message: z.ZodNullable<z.ZodString>;
971
+ materialized_status: z.ZodNullable<z.ZodEnum<{
972
+ completed: "completed";
973
+ failed: "failed";
974
+ running: "running";
975
+ }>>;
976
+ }, z.core.$strip>;
977
+
978
+ export declare type FrontendVisualization = z.output<typeof FrontendVisualizationSchema>;
979
+
980
+ declare const FrontendVisualizationSchema: z.ZodObject<{
981
+ id: z.ZodNumber;
982
+ uuid: z.ZodString;
983
+ configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
984
+ config_version: z.ZodLiteral<2>;
985
+ xAxisLabel: z.ZodString;
986
+ yAxisLabel: z.ZodString;
987
+ categoryColumn: z.ZodString;
988
+ secondaryCategoryColumn: z.ZodOptional<z.ZodString>;
989
+ valueColumn: z.ZodString;
990
+ title: z.ZodString;
991
+ type: z.ZodLiteral<"bar">;
992
+ }, z.core.$strip>, z.ZodObject<{
993
+ xAxisColumn: z.ZodString;
994
+ valueColumns: z.ZodArray<z.ZodString>;
995
+ yAxisLabels: z.ZodArray<z.ZodString>;
996
+ title: z.ZodString;
997
+ type: z.ZodLiteral<"line/area">;
998
+ config_version: z.ZodLiteral<2>;
999
+ }, z.core.$strip>, z.ZodObject<{
1000
+ config_version: z.ZodLiteral<2>;
1001
+ valueColumn: z.ZodString;
1002
+ xAxisColumn: z.ZodString;
1003
+ xAxisLabel: z.ZodString;
1004
+ yAxisLabel: z.ZodString;
1005
+ categoryColumn: z.ZodString;
1006
+ title: z.ZodString;
1007
+ type: z.ZodLiteral<"line/area-categorical">;
1008
+ }, z.core.$strip>, z.ZodObject<{
1009
+ config_version: z.ZodLiteral<2>;
1010
+ xAxisLabel: z.ZodString;
1011
+ yAxisLabel: z.ZodString;
1012
+ xAxisValueColumn: z.ZodString;
1013
+ yAxisValueColumn: z.ZodString;
1014
+ title: z.ZodString;
1015
+ type: z.ZodLiteral<"scatter">;
1016
+ }, z.core.$strip>, z.ZodObject<{
1017
+ config_version: z.ZodLiteral<2>;
1018
+ categoryColumn: z.ZodString;
1019
+ valueColumn: z.ZodString;
1020
+ title: z.ZodString;
1021
+ type: z.ZodLiteral<"pie">;
1022
+ }, z.core.$strip>], "type">;
1023
+ created_at: z.ZodString;
1024
+ flow_data_id: z.ZodNumber;
1025
+ report_uuid: z.ZodString;
1026
+ flow_data: z.ZodOptional<z.ZodObject<{
1027
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
1028
+ last_materialized_at: z.ZodNullable<z.ZodString>;
1029
+ materialized_error_message: z.ZodNullable<z.ZodString>;
1030
+ materialized_status: z.ZodNullable<z.ZodEnum<{
1031
+ completed: "completed";
1032
+ failed: "failed";
1033
+ running: "running";
1034
+ }>>;
1035
+ }, z.core.$strip>>;
1036
+ materialization: z.ZodOptional<z.ZodObject<{
1037
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
1038
+ last_materialized_at: z.ZodNullable<z.ZodString>;
1039
+ materialized_error_message: z.ZodNullable<z.ZodString>;
1040
+ materialized_status: z.ZodNullable<z.ZodEnum<{
1041
+ completed: "completed";
1042
+ failed: "failed";
1043
+ running: "running";
1044
+ }>>;
1045
+ }, z.core.$strip>>;
1046
+ }, z.core.$strip>;
1047
+
1048
+ export declare type FrontendVisualizationWithData = z.output<typeof FrontendVisualizationWithDataSchema>;
1049
+
1050
+ declare const FrontendVisualizationWithDataSchema: z.ZodObject<{
1051
+ id: z.ZodNumber;
1052
+ uuid: z.ZodString;
1053
+ configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
1054
+ config_version: z.ZodLiteral<2>;
1055
+ xAxisLabel: z.ZodString;
1056
+ yAxisLabel: z.ZodString;
1057
+ categoryColumn: z.ZodString;
1058
+ secondaryCategoryColumn: z.ZodOptional<z.ZodString>;
1059
+ valueColumn: z.ZodString;
1060
+ title: z.ZodString;
1061
+ type: z.ZodLiteral<"bar">;
1062
+ }, z.core.$strip>, z.ZodObject<{
1063
+ xAxisColumn: z.ZodString;
1064
+ valueColumns: z.ZodArray<z.ZodString>;
1065
+ yAxisLabels: z.ZodArray<z.ZodString>;
1066
+ title: z.ZodString;
1067
+ type: z.ZodLiteral<"line/area">;
1068
+ config_version: z.ZodLiteral<2>;
1069
+ }, z.core.$strip>, z.ZodObject<{
1070
+ config_version: z.ZodLiteral<2>;
1071
+ valueColumn: z.ZodString;
1072
+ xAxisColumn: z.ZodString;
1073
+ xAxisLabel: z.ZodString;
1074
+ yAxisLabel: z.ZodString;
1075
+ categoryColumn: z.ZodString;
1076
+ title: z.ZodString;
1077
+ type: z.ZodLiteral<"line/area-categorical">;
1078
+ }, z.core.$strip>, z.ZodObject<{
1079
+ config_version: z.ZodLiteral<2>;
1080
+ xAxisLabel: z.ZodString;
1081
+ yAxisLabel: z.ZodString;
1082
+ xAxisValueColumn: z.ZodString;
1083
+ yAxisValueColumn: z.ZodString;
1084
+ title: z.ZodString;
1085
+ type: z.ZodLiteral<"scatter">;
1086
+ }, z.core.$strip>, z.ZodObject<{
1087
+ config_version: z.ZodLiteral<2>;
1088
+ categoryColumn: z.ZodString;
1089
+ valueColumn: z.ZodString;
1090
+ title: z.ZodString;
1091
+ type: z.ZodLiteral<"pie">;
1092
+ }, z.core.$strip>], "type">;
1093
+ created_at: z.ZodString;
1094
+ flow_data_id: z.ZodNumber;
1095
+ report_uuid: z.ZodString;
1096
+ flow_data: z.ZodOptional<z.ZodObject<{
1097
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
1098
+ last_materialized_at: z.ZodNullable<z.ZodString>;
1099
+ materialized_error_message: z.ZodNullable<z.ZodString>;
1100
+ materialized_status: z.ZodNullable<z.ZodEnum<{
1101
+ completed: "completed";
1102
+ failed: "failed";
1103
+ running: "running";
1104
+ }>>;
1105
+ }, z.core.$strip>>;
1106
+ materialization: z.ZodOptional<z.ZodObject<{
1107
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
1108
+ last_materialized_at: z.ZodNullable<z.ZodString>;
1109
+ materialized_error_message: z.ZodNullable<z.ZodString>;
1110
+ materialized_status: z.ZodNullable<z.ZodEnum<{
1111
+ completed: "completed";
1112
+ failed: "failed";
1113
+ running: "running";
1114
+ }>>;
1115
+ }, z.core.$strip>>;
1116
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDate, z.ZodCoercedNumber<unknown>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<"empty" | (string & {}) | null, unknown>>]>>>;
1117
+ _metadata: z.ZodOptional<z.ZodObject<{
1118
+ wasSampled: z.ZodBoolean;
1119
+ originalCount: z.ZodNumber;
1120
+ sampledCount: z.ZodNumber;
1121
+ }, z.core.$strip>>;
1122
+ }, z.core.$strip>;
1123
+
1124
+ export declare const GENERATE_DATA_REPORT: "generateDataReport";
1125
+
1126
+ export declare const GENERATE_VISUALIZATION: "generateVisualization";
1127
+
1128
+ export declare const GET_AVAILABLE_COLUMNS_FOR_TABLE: "getAvailableColumnsForTable";
1129
+
1130
+ export declare const GET_AVAILABLE_TABLES: "getAvailableTables";
1131
+
1132
+ export declare const getMessageTextContent: (message: MMChatUIMessage) => string | undefined;
1133
+
688
1134
  export declare const getPublicApiClient: (apiUrl: string, apiKey: string) => Client<PublicPaths>;
689
1135
 
1136
+ /**
1137
+ * Extracts an uploaded file id from a `uploaded-file:{id}` reference.
1138
+ * @param url the url of the file
1139
+ * @returns file id
1140
+ */
1141
+ export declare const getUploadedFileIdFromUrl: (url: string) => string | null;
1142
+
1143
+ /**
1144
+ * Returns true when a flow contains only the initial user message created via
1145
+ * `createFlow(...)` and no assistant response yet.
1146
+ *
1147
+ * In headless AI SDK integrations, this is the state where the frontend should
1148
+ * trigger a one-time `regenerate()` to start the first assistant turn.
1149
+ * @param messages - Chat messages for the flow.
1150
+ * @returns Whether the flow still has only its initial user message.
1151
+ */
1152
+ export declare const hasOnlyInitialUserMessage: (messages: MMChatUIMessage[]) => boolean;
1153
+
690
1154
  declare const HEADER_SP_TOKEN: "sp-access-token";
691
1155
 
692
1156
  declare const inputSchema: z.ZodObject<{
@@ -705,7 +1169,7 @@ declare const inputSchema_10: z.ZodObject<{
705
1169
  }, z.core.$strip>;
706
1170
 
707
1171
  declare const inputSchema_2: z.ZodObject<{
708
- reportId: z.ZodNumber;
1172
+ reportId: z.ZodUnion<[z.ZodNumber, z.ZodUUID]>;
709
1173
  chartType: z.ZodEnum<{
710
1174
  bar: "bar";
711
1175
  "line/area": "line/area";
@@ -755,11 +1219,21 @@ declare const inputSchema_9: z.ZodObject<{
755
1219
  }, z.core.$strip>>;
756
1220
  }, z.core.$strip>;
757
1221
 
1222
+ export declare const isAskUserQuestionPart: (part: MMChatUIMessagePart) => part is AskUserQuestionPart;
1223
+
1224
+ export declare const isFrontendV1Visualization: (visualization: FrontendVisualization | V1FrontendVisualization) => visualization is V1FrontendVisualization;
1225
+
1226
+ export declare const isFrontendV1VisualizationWithData: (visualization: FrontendVisualizationWithData | V1FrontendVisualizationWithData) => visualization is V1FrontendVisualizationWithData;
1227
+
1228
+ export declare const isFrontendV2Visualization: (visualization: FrontendVisualization | V1FrontendVisualization) => visualization is FrontendVisualization;
1229
+
1230
+ export declare const isFrontendV2VisualizationWithData: (visualization: FrontendVisualizationWithData | V1FrontendVisualizationWithData) => visualization is FrontendVisualizationWithData;
1231
+
758
1232
  export declare class MageMetricsChatTransport extends DefaultChatTransport<MMChatUIMessage> {
759
1233
  constructor(apiUrl: string, flowId: string, options: MageMetricsChatTransportOptions);
760
1234
  }
761
1235
 
762
- declare type MageMetricsChatTransportOptions = Omit<HttpChatTransportInitOptions<MMChatUIMessage>, "api" | "prepareSendMessagesRequest">;
1236
+ export declare type MageMetricsChatTransportOptions = Omit<HttpChatTransportInitOptions<MMChatUIMessage>, "api" | "prepareSendMessagesRequest">;
763
1237
 
764
1238
  /**
765
1239
  * Core MageMetrics client that handles authentication lifecycle and provides
@@ -802,6 +1276,14 @@ export declare class MageMetricsClient {
802
1276
  get state(): AuthState;
803
1277
  getHeaders(): Promise<Record<string, string>>;
804
1278
  logout(): Promise<void>;
1279
+ /**
1280
+ * Clean up all resources held by this client.
1281
+ * Unsubscribes auth state listeners, stops auto-refresh timers,
1282
+ * and removes global event listeners (e.g. visibilitychange).
1283
+ *
1284
+ * Call this before discarding a client instance to prevent leaks.
1285
+ */
1286
+ destroy(): void;
805
1287
  auth: {
806
1288
  startAutoRefresh: () => Promise<void> | undefined;
807
1289
  stopAuthRefresh: () => Promise<void> | undefined;
@@ -871,7 +1353,6 @@ export declare class MageMetricsClient {
871
1353
  }[]>;
872
1354
  getFlowDataReports: (flowId: string) => Promise<{
873
1355
  created_at: string;
874
- flow_id: string;
875
1356
  id: number;
876
1357
  uuid: string;
877
1358
  title: string;
@@ -906,97 +1387,190 @@ export declare class MageMetricsClient {
906
1387
  materialized_error_message: string | null;
907
1388
  materialized_status: "completed" | "running" | "failed" | null;
908
1389
  }[]>;
909
- getFlow: (flowId: string) => Promise<{
1390
+ getAgentRunReports: (agentRunId: string) => Promise<{
910
1391
  created_at: string;
911
- id: string;
912
- request: string;
913
- title: string | null;
914
- user_id: string | null;
915
- application_id?: number | null | undefined;
916
- context_tokens?: number | undefined;
917
- acc_input_tokens?: number | undefined;
918
- acc_output_tokens?: number | undefined;
919
- }>;
920
- getRecentFlows: (params?: {
921
- limit?: number;
922
- }) => Promise<FrontendRecentFlows[]>;
923
- createFlow: (request: CreateFlowParam) => Promise<{
924
- flowId: string;
925
- }>;
926
- uploadFile: (file: File, flowId?: string) => Promise<{
927
- uploadedFileId: string;
928
- filename: string;
929
- mediaType: string;
930
- sizeBytes: number;
931
- }>;
932
- deleteUploadedFile: (uploadedFileId: string) => Promise<void>;
933
- canvas: {
934
- list: (query?: string) => Promise<{
935
- id: string;
936
- title: string | null;
937
- is_public: boolean;
938
- nodes: unknown[];
939
- edges: unknown[];
940
- flows: {
941
- created_at: string;
942
- id: string;
943
- request: string;
944
- title: string | null;
945
- user_id: string | null;
946
- application_id?: number | null | undefined;
947
- context_tokens?: number | undefined;
948
- acc_input_tokens?: number | undefined;
949
- acc_output_tokens?: number | undefined;
950
- }[];
951
- }[]>;
952
- get: (canvasId: string) => Promise<{
953
- id: string;
954
- title: string | null;
955
- is_public: boolean;
956
- nodes: unknown[];
957
- edges: unknown[];
958
- }>;
959
- create: (body: CreateCanvas) => Promise<{
960
- id: string;
961
- }>;
962
- update: (body: z.infer<typeof UpdateCanvasSchema>) => Promise<{
963
- success: true;
964
- }>;
965
- delete: (canvasId: string) => Promise<void>;
966
- getForFlow: (flowId: string) => Promise<{
967
- title: string | null;
968
- id: string;
969
- nodes: any[];
970
- edges: any[];
971
- is_public: boolean;
972
- }>;
973
- };
974
- exportReportData: (reportId: number, format?: "text" | "blob") => Promise<{
975
- filename: string;
976
- data: Blob | string;
977
- }>;
978
- getChatTransport: (flowId: string, options?: MageMetricsChatTransportOptions) => MageMetricsChatTransport;
979
- getChatMessages: (flowId: string) => Promise<MMChatUIMessage[]>;
980
- fetchReportData: (reportId: number, { columns, limit, sorting, filters, cursor }: ReportDataFilters, signal?: AbortSignal) => Promise<{
981
- [x: string]: unknown;
982
- }[]>;
983
- createSpeechToken: () => Promise<{
984
- token: string;
985
- expiresAt: string;
986
- }>;
987
- getReport: (reportId: number) => Promise<{
988
- columns: {
989
- name: string;
990
- data_type: string;
1392
+ id: number;
1393
+ uuid: string;
1394
+ title: string;
1395
+ request: string | null;
1396
+ data_summary: {
1397
+ [x: string]: unknown;
1398
+ columns: {
1399
+ [x: string]: {
1400
+ [x: string]: unknown;
1401
+ position?: number | undefined;
1402
+ data_type: string;
1403
+ null_count: number | null;
1404
+ unique_count: number | null;
1405
+ unique_percentage: number | null;
1406
+ min_value?: number | null | undefined;
1407
+ max_value?: number | null | undefined;
1408
+ avg_value?: number | null | undefined;
1409
+ median_value?: number | null | undefined;
1410
+ std_value?: number | null | undefined;
1411
+ min_date?: string | null | undefined;
1412
+ max_date?: string | null | undefined;
1413
+ min_length?: number | null | undefined;
1414
+ max_length?: number | null | undefined;
1415
+ avg_length?: number | null | undefined;
1416
+ };
1417
+ };
1418
+ };
1419
+ status: string | null;
1420
+ is_removed: boolean;
1421
+ is_materialized: boolean | null;
1422
+ last_materialized_at: string | null;
1423
+ materialized_error_message: string | null;
1424
+ materialized_status: "completed" | "running" | "failed" | null;
1425
+ }[]>;
1426
+ getAgentRunVisualizations: (agentRunId: string) => Promise<{
1427
+ id: number;
1428
+ uuid: string;
1429
+ report_uuid: string;
1430
+ flow_data_id: number;
1431
+ created_at: string;
1432
+ flow_data?: {
1433
+ is_materialized: boolean | null;
1434
+ last_materialized_at: string | null;
1435
+ materialized_error_message: string | null;
1436
+ materialized_status: "completed" | "running" | "failed" | null;
1437
+ } | undefined;
1438
+ materialization?: {
1439
+ is_materialized: boolean | null;
1440
+ last_materialized_at: string | null;
1441
+ materialized_error_message: string | null;
1442
+ materialized_status: "completed" | "running" | "failed" | null;
1443
+ } | undefined;
1444
+ configuration: {
1445
+ type: "bar";
1446
+ title: string;
1447
+ config_version: 2;
1448
+ xAxisLabel: string;
1449
+ yAxisLabel: string;
1450
+ categoryColumn: string;
1451
+ secondaryCategoryColumn?: string | undefined;
1452
+ valueColumn: string;
1453
+ } | {
1454
+ type: "line/area";
1455
+ config_version: 2;
1456
+ title: string;
1457
+ xAxisColumn: string;
1458
+ valueColumns: string[];
1459
+ yAxisLabels: string[];
1460
+ } | {
1461
+ type: "line/area-categorical";
1462
+ title: string;
1463
+ config_version: 2;
1464
+ valueColumn: string;
1465
+ xAxisColumn: string;
1466
+ xAxisLabel: string;
1467
+ yAxisLabel: string;
1468
+ categoryColumn: string;
1469
+ } | {
1470
+ type: "scatter";
1471
+ title: string;
1472
+ config_version: 2;
1473
+ xAxisLabel: string;
1474
+ yAxisLabel: string;
1475
+ xAxisValueColumn: string;
1476
+ yAxisValueColumn: string;
1477
+ } | {
1478
+ type: "pie";
1479
+ title: string;
1480
+ config_version: 2;
1481
+ categoryColumn: string;
1482
+ valueColumn: string;
1483
+ };
1484
+ }[]>;
1485
+ getFlow: (flowId: string) => Promise<{
1486
+ created_at: string;
1487
+ id: string;
1488
+ request: string;
1489
+ title: string | null;
1490
+ user_id: string | null;
1491
+ application_id?: number | null | undefined;
1492
+ }>;
1493
+ getRecentFlows: (params?: {
1494
+ limit?: number;
1495
+ }) => Promise<FrontendRecentFlows[]>;
1496
+ createFlow: (request: CreateFlowParam) => Promise<{
1497
+ flowId: string;
1498
+ }>;
1499
+ uploadFile: (file: File, flowId?: string) => Promise<{
1500
+ uploadedFileId: string;
1501
+ filename: string;
1502
+ mediaType: string;
1503
+ sizeBytes: number;
1504
+ }>;
1505
+ deleteUploadedFile: (uploadedFileId: string) => Promise<void>;
1506
+ canvas: {
1507
+ list: (query?: string) => Promise<{
1508
+ id: string;
1509
+ title: string | null;
1510
+ is_public: boolean;
1511
+ nodes: unknown[];
1512
+ edges: unknown[];
1513
+ flows: {
1514
+ created_at: string;
1515
+ id: string;
1516
+ request: string;
1517
+ title: string | null;
1518
+ user_id: string | null;
1519
+ application_id?: number | null | undefined;
1520
+ }[];
1521
+ }[]>;
1522
+ get: (canvasId: string) => Promise<{
1523
+ id: string;
1524
+ title: string | null;
1525
+ is_public: boolean;
1526
+ nodes: unknown[];
1527
+ edges: unknown[];
1528
+ }>;
1529
+ create: (body: CreateCanvas) => Promise<{
1530
+ id: string;
1531
+ }>;
1532
+ update: (body: z.infer<typeof UpdateCanvasSchema>) => Promise<{
1533
+ success: true;
1534
+ }>;
1535
+ delete: (canvasId: string) => Promise<void>;
1536
+ getForFlow: (flowId: string) => Promise<{
1537
+ title: string | null;
1538
+ id: string;
1539
+ nodes: any[];
1540
+ edges: any[];
1541
+ is_public: boolean;
1542
+ }>;
1543
+ };
1544
+ exportReportData: (reportId: string, format?: "text" | "blob") => Promise<{
1545
+ filename: string;
1546
+ data: Blob | string;
1547
+ }>;
1548
+ getChatTransport: (flowId: string, options?: MageMetricsChatTransportOptions) => MageMetricsChatTransport;
1549
+ getChatMessages: (flowId: string) => Promise<MMChatUIMessage[]>;
1550
+ fetchReportData: (reportId: string, { columns, limit, sorting, filters, cursor }: ReportDataFilters, signal?: AbortSignal) => Promise<{
1551
+ [x: string]: unknown;
1552
+ }[]>;
1553
+ createSpeechToken: () => Promise<{
1554
+ token: string;
1555
+ expiresAt: string;
1556
+ }>;
1557
+ getReport: (reportId: string) => Promise<{
1558
+ columns: {
1559
+ name: string;
1560
+ data_type: string;
991
1561
  dataType: string;
992
1562
  renderType?: string | undefined;
993
1563
  unit?: string | undefined;
994
1564
  canonicalDataType?: "numeric" | "boolean" | "datetime" | "text" | "array" | "json" | "other" | undefined;
1565
+ formatHint?: {
1566
+ isNumeric?: boolean | undefined;
1567
+ isLikelyYear?: boolean | undefined;
1568
+ } | undefined;
995
1569
  }[];
996
1570
  rowCount: {
997
1571
  count: number;
998
1572
  };
999
- data: (reportId: number, { columns, limit, sorting, filters, cursor }: ReportDataFilters, signal?: AbortSignal) => Promise<{
1573
+ data: (reportId: string, { columns, limit, sorting, filters, cursor }: ReportDataFilters, signal?: AbortSignal) => Promise<{
1000
1574
  [x: string]: unknown;
1001
1575
  }[]>;
1002
1576
  }>;
@@ -1005,6 +1579,7 @@ export declare class MageMetricsClient {
1005
1579
  explanation: string;
1006
1580
  type: string;
1007
1581
  }[]>;
1582
+ getPromptStarters: (input?: string) => Promise<PromptStarter[]>;
1008
1583
  };
1009
1584
  client(): PublicApiClient;
1010
1585
  private createSupabaseHeaderMiddleware;
@@ -1065,7 +1640,9 @@ export declare class MemoryStorageAdapter implements AsyncStorage {
1065
1640
 
1066
1641
  export declare type MMChatUIMessage = UIMessage<unknown, CustomDataParts, MMUiTools>;
1067
1642
 
1068
- declare type MMUiTools = {
1643
+ export declare type MMChatUIMessagePart = UIMessagePart<CustomDataParts, MMUiTools>;
1644
+
1645
+ export declare type MMUiTools = {
1069
1646
  generateDataReport: UiTool;
1070
1647
  generateVisualization: UiTool_2;
1071
1648
  think: UiTool_3;
@@ -1251,6 +1828,17 @@ declare interface operations {
1251
1828
  "application/json": components["schemas"]["ReportData"];
1252
1829
  };
1253
1830
  };
1831
+ /** @description Invalid canvas, report or flow */
1832
+ 400: {
1833
+ headers: {
1834
+ [name: string]: unknown;
1835
+ };
1836
+ content: {
1837
+ "application/json": {
1838
+ error: string;
1839
+ };
1840
+ };
1841
+ };
1254
1842
  /** @description Unable to retrieve report with this id */
1255
1843
  404: {
1256
1844
  headers: {
@@ -1270,6 +1858,8 @@ declare interface operations {
1270
1858
  content: {
1271
1859
  "application/json": {
1272
1860
  error: string;
1861
+ /** @enum {string} */
1862
+ code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
1273
1863
  };
1274
1864
  };
1275
1865
  };
@@ -1300,6 +1890,17 @@ declare interface operations {
1300
1890
  };
1301
1891
  };
1302
1892
  };
1893
+ /** @description Invalid canvas, report or flow */
1894
+ 400: {
1895
+ headers: {
1896
+ [name: string]: unknown;
1897
+ };
1898
+ content: {
1899
+ "application/json": {
1900
+ error: string;
1901
+ };
1902
+ };
1903
+ };
1303
1904
  /** @description Unable to retrieve report with this id */
1304
1905
  404: {
1305
1906
  headers: {
@@ -1319,6 +1920,8 @@ declare interface operations {
1319
1920
  content: {
1320
1921
  "application/json": {
1321
1922
  error: string;
1923
+ /** @enum {string} */
1924
+ code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
1322
1925
  };
1323
1926
  };
1324
1927
  };
@@ -1380,6 +1983,7 @@ declare interface operations {
1380
1983
  query?: never;
1381
1984
  header?: never;
1382
1985
  path: {
1986
+ /** @description Numeric legacy ID or UUID */
1383
1987
  visualization_id: string;
1384
1988
  canvas_id: components["schemas"]["CanvasId"];
1385
1989
  };
@@ -1457,9 +2061,6 @@ declare interface operations {
1457
2061
  title: string | null;
1458
2062
  user_id: string | null;
1459
2063
  application_id?: number | null;
1460
- context_tokens?: number;
1461
- acc_input_tokens?: number;
1462
- acc_output_tokens?: number;
1463
2064
  };
1464
2065
  };
1465
2066
  };
@@ -1513,9 +2114,6 @@ declare interface operations {
1513
2114
  title: string | null;
1514
2115
  user_id: string | null;
1515
2116
  application_id?: number | null;
1516
- context_tokens?: number;
1517
- acc_input_tokens?: number;
1518
- acc_output_tokens?: number;
1519
2117
  }[];
1520
2118
  };
1521
2119
  };
@@ -1553,7 +2151,6 @@ declare interface operations {
1553
2151
  content: {
1554
2152
  "application/json": {
1555
2153
  created_at: string;
1556
- flow_id: string;
1557
2154
  /**
1558
2155
  * @deprecated
1559
2156
  * @description Deprecated: use uuid.
@@ -1771,6 +2368,7 @@ declare interface operations {
1771
2368
  query?: never;
1772
2369
  header?: {
1773
2370
  "sp-access-token"?: string;
2371
+ "X-Application-Name"?: string;
1774
2372
  };
1775
2373
  path?: never;
1776
2374
  cookie?: never;
@@ -2036,6 +2634,8 @@ declare interface operations {
2036
2634
  content: {
2037
2635
  "application/json": {
2038
2636
  error: string;
2637
+ /** @enum {string} */
2638
+ code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
2039
2639
  };
2040
2640
  };
2041
2641
  };
@@ -2086,6 +2686,8 @@ declare interface operations {
2086
2686
  content: {
2087
2687
  "application/json": {
2088
2688
  error: string;
2689
+ /** @enum {string} */
2690
+ code: "QUERY_LIMIT_EXCEEDED" | "QUERY_TIMEOUT" | "QUERY_EXECUTION_FAILED";
2089
2691
  };
2090
2692
  };
2091
2693
  };
@@ -2113,7 +2715,6 @@ declare interface operations {
2113
2715
  content: {
2114
2716
  "application/json": {
2115
2717
  created_at: string;
2116
- flow_id: string;
2117
2718
  /**
2118
2719
  * @deprecated
2119
2720
  * @description Deprecated: use uuid.
@@ -2416,6 +3017,7 @@ declare interface operations {
2416
3017
  "sp-access-token"?: string;
2417
3018
  };
2418
3019
  path: {
3020
+ /** @description Numeric legacy ID or UUID */
2419
3021
  visualization_id: string;
2420
3022
  };
2421
3023
  cookie?: never;
@@ -2921,9 +3523,6 @@ declare interface operations {
2921
3523
  title: string | null;
2922
3524
  user_id: string | null;
2923
3525
  application_id?: number | null;
2924
- context_tokens?: number;
2925
- acc_input_tokens?: number;
2926
- acc_output_tokens?: number;
2927
3526
  }[];
2928
3527
  }[];
2929
3528
  };
@@ -3036,6 +3635,7 @@ declare interface operations {
3036
3635
  query?: never;
3037
3636
  header?: {
3038
3637
  "sp-access-token"?: string;
3638
+ "X-Application-Name"?: string;
3039
3639
  };
3040
3640
  path?: never;
3041
3641
  cookie?: never;
@@ -3136,24 +3736,79 @@ declare interface operations {
3136
3736
  };
3137
3737
  };
3138
3738
  };
3139
- listAgents: {
3739
+ getAgentRunReports: {
3140
3740
  parameters: {
3141
3741
  query?: never;
3142
3742
  header?: {
3143
3743
  "sp-access-token"?: string;
3144
3744
  };
3145
- path?: never;
3745
+ path: {
3746
+ id: string;
3747
+ };
3146
3748
  cookie?: never;
3147
3749
  };
3148
3750
  requestBody?: never;
3149
3751
  responses: {
3150
- /** @description List of agents for the company */
3752
+ /** @description Reports generated by this agent run */
3151
3753
  200: {
3152
3754
  headers: {
3153
3755
  [name: string]: unknown;
3154
3756
  };
3155
3757
  content: {
3156
- "application/json": components["schemas"]["Agent"][];
3758
+ "application/json": {
3759
+ created_at: string;
3760
+ /**
3761
+ * @deprecated
3762
+ * @description Deprecated: use uuid.
3763
+ */
3764
+ id: number;
3765
+ uuid: string;
3766
+ title: string;
3767
+ request: string | null;
3768
+ data_summary: {
3769
+ columns: {
3770
+ [key: string]: {
3771
+ position?: number;
3772
+ data_type: string;
3773
+ null_count: number | null;
3774
+ unique_count: number | null;
3775
+ unique_percentage: number | null;
3776
+ min_value?: number | null;
3777
+ max_value?: number | null;
3778
+ avg_value?: number | null;
3779
+ median_value?: number | null;
3780
+ std_value?: number | null;
3781
+ min_date?: string | null;
3782
+ max_date?: string | null;
3783
+ min_length?: number | null;
3784
+ max_length?: number | null;
3785
+ avg_length?: number | null;
3786
+ } & {
3787
+ [key: string]: unknown;
3788
+ };
3789
+ };
3790
+ } & {
3791
+ [key: string]: unknown;
3792
+ };
3793
+ status: string | null;
3794
+ is_removed: boolean;
3795
+ is_materialized: boolean | null;
3796
+ last_materialized_at: string | null;
3797
+ materialized_error_message: string | null;
3798
+ /** @enum {string|null} */
3799
+ materialized_status: "completed" | "running" | "failed" | null;
3800
+ }[];
3801
+ };
3802
+ };
3803
+ /** @description Agent run not found */
3804
+ 404: {
3805
+ headers: {
3806
+ [name: string]: unknown;
3807
+ };
3808
+ content: {
3809
+ "application/json": {
3810
+ error: string;
3811
+ };
3157
3812
  };
3158
3813
  };
3159
3814
  /** @description Internal server error */
@@ -3169,14 +3824,175 @@ declare interface operations {
3169
3824
  };
3170
3825
  };
3171
3826
  };
3172
- createAgent: {
3827
+ getAgentRunVisualizations: {
3173
3828
  parameters: {
3174
3829
  query?: never;
3175
3830
  header?: {
3176
3831
  "sp-access-token"?: string;
3177
3832
  };
3178
- path?: never;
3179
- cookie?: never;
3833
+ path: {
3834
+ id: string;
3835
+ };
3836
+ cookie?: never;
3837
+ };
3838
+ requestBody?: never;
3839
+ responses: {
3840
+ /** @description Visualizations generated by this agent run */
3841
+ 200: {
3842
+ headers: {
3843
+ [name: string]: unknown;
3844
+ };
3845
+ content: {
3846
+ "application/json": {
3847
+ /**
3848
+ * @deprecated
3849
+ * @description Deprecated: use uuid.
3850
+ */
3851
+ id: number;
3852
+ uuid: string;
3853
+ report_uuid: string;
3854
+ /**
3855
+ * @deprecated
3856
+ * @description Deprecated: use report_uuid.
3857
+ */
3858
+ flow_data_id: number;
3859
+ created_at: string;
3860
+ /**
3861
+ * @deprecated
3862
+ * @description Deprecated: use materialization.
3863
+ */
3864
+ flow_data?: {
3865
+ is_materialized: boolean | null;
3866
+ last_materialized_at: string | null;
3867
+ materialized_error_message: string | null;
3868
+ /** @enum {string|null} */
3869
+ materialized_status: "completed" | "running" | "failed" | null;
3870
+ };
3871
+ materialization?: {
3872
+ is_materialized: boolean | null;
3873
+ last_materialized_at: string | null;
3874
+ materialized_error_message: string | null;
3875
+ /** @enum {string|null} */
3876
+ materialized_status: "completed" | "running" | "failed" | null;
3877
+ };
3878
+ configuration: {
3879
+ /** @enum {string} */
3880
+ type: "bar";
3881
+ title: string;
3882
+ /** @enum {number} */
3883
+ config_version: 2;
3884
+ xAxisLabel: string;
3885
+ yAxisLabel: string;
3886
+ categoryColumn: string;
3887
+ secondaryCategoryColumn?: string;
3888
+ valueColumn: string;
3889
+ } | {
3890
+ /** @enum {string} */
3891
+ type: "line/area";
3892
+ /** @enum {number} */
3893
+ config_version: 2;
3894
+ title: string;
3895
+ xAxisColumn: string;
3896
+ valueColumns: string[];
3897
+ yAxisLabels: string[];
3898
+ } | {
3899
+ /** @enum {string} */
3900
+ type: "line/area-categorical";
3901
+ title: string;
3902
+ /** @enum {number} */
3903
+ config_version: 2;
3904
+ valueColumn: string;
3905
+ xAxisColumn: string;
3906
+ xAxisLabel: string;
3907
+ yAxisLabel: string;
3908
+ categoryColumn: string;
3909
+ } | {
3910
+ /** @enum {string} */
3911
+ type: "scatter";
3912
+ title: string;
3913
+ /** @enum {number} */
3914
+ config_version: 2;
3915
+ xAxisLabel: string;
3916
+ yAxisLabel: string;
3917
+ xAxisValueColumn: string;
3918
+ yAxisValueColumn: string;
3919
+ } | {
3920
+ /** @enum {string} */
3921
+ type: "pie";
3922
+ title: string;
3923
+ /** @enum {number} */
3924
+ config_version: 2;
3925
+ categoryColumn: string;
3926
+ valueColumn: string;
3927
+ };
3928
+ }[];
3929
+ };
3930
+ };
3931
+ /** @description Agent run not found */
3932
+ 404: {
3933
+ headers: {
3934
+ [name: string]: unknown;
3935
+ };
3936
+ content: {
3937
+ "application/json": {
3938
+ error: string;
3939
+ };
3940
+ };
3941
+ };
3942
+ /** @description Internal server error */
3943
+ 500: {
3944
+ headers: {
3945
+ [name: string]: unknown;
3946
+ };
3947
+ content: {
3948
+ "application/json": {
3949
+ error: string;
3950
+ };
3951
+ };
3952
+ };
3953
+ };
3954
+ };
3955
+ listAgents: {
3956
+ parameters: {
3957
+ query?: never;
3958
+ header?: {
3959
+ "sp-access-token"?: string;
3960
+ };
3961
+ path?: never;
3962
+ cookie?: never;
3963
+ };
3964
+ requestBody?: never;
3965
+ responses: {
3966
+ /** @description List of agents for the company */
3967
+ 200: {
3968
+ headers: {
3969
+ [name: string]: unknown;
3970
+ };
3971
+ content: {
3972
+ "application/json": components["schemas"]["Agent"][];
3973
+ };
3974
+ };
3975
+ /** @description Internal server error */
3976
+ 500: {
3977
+ headers: {
3978
+ [name: string]: unknown;
3979
+ };
3980
+ content: {
3981
+ "application/json": {
3982
+ error: string;
3983
+ };
3984
+ };
3985
+ };
3986
+ };
3987
+ };
3988
+ createAgent: {
3989
+ parameters: {
3990
+ query?: never;
3991
+ header?: {
3992
+ "sp-access-token"?: string;
3993
+ };
3994
+ path?: never;
3995
+ cookie?: never;
3180
3996
  };
3181
3997
  requestBody: {
3182
3998
  content: {
@@ -3247,8 +4063,6 @@ declare interface operations {
3247
4063
  * @enum {string}
3248
4064
  */
3249
4065
  execution_platform?: "native" | "sandbox" | "sandbox_public";
3250
- master_prompt_name?: string;
3251
- master_prompt_version?: number;
3252
4066
  };
3253
4067
  };
3254
4068
  };
@@ -3380,7 +4194,7 @@ declare interface operations {
3380
4194
  })[] | null;
3381
4195
  output_schema?: {
3382
4196
  [key: string]: unknown;
3383
- } | null;
4197
+ };
3384
4198
  task_plan?: {
3385
4199
  id: string;
3386
4200
  title: string;
@@ -3408,8 +4222,6 @@ declare interface operations {
3408
4222
  } | null;
3409
4223
  /** @enum {string} */
3410
4224
  execution_platform?: "native" | "sandbox" | "sandbox_public";
3411
- master_prompt_name?: string | null;
3412
- master_prompt_version?: number | null;
3413
4225
  };
3414
4226
  };
3415
4227
  };
@@ -3507,6 +4319,99 @@ declare interface operations {
3507
4319
  };
3508
4320
  };
3509
4321
  };
4322
+ listAgentVersions: {
4323
+ parameters: {
4324
+ query?: never;
4325
+ header?: {
4326
+ "sp-access-token"?: string;
4327
+ };
4328
+ path: {
4329
+ id: string;
4330
+ };
4331
+ cookie?: never;
4332
+ };
4333
+ requestBody?: never;
4334
+ responses: {
4335
+ /** @description List of versions for the agent (newest first) */
4336
+ 200: {
4337
+ headers: {
4338
+ [name: string]: unknown;
4339
+ };
4340
+ content: {
4341
+ "application/json": components["schemas"]["AgentVersion"][];
4342
+ };
4343
+ };
4344
+ /** @description Agent not found */
4345
+ 404: {
4346
+ headers: {
4347
+ [name: string]: unknown;
4348
+ };
4349
+ content: {
4350
+ "application/json": {
4351
+ error: string;
4352
+ };
4353
+ };
4354
+ };
4355
+ /** @description Internal server error */
4356
+ 500: {
4357
+ headers: {
4358
+ [name: string]: unknown;
4359
+ };
4360
+ content: {
4361
+ "application/json": {
4362
+ error: string;
4363
+ };
4364
+ };
4365
+ };
4366
+ };
4367
+ };
4368
+ restoreAgentVersion: {
4369
+ parameters: {
4370
+ query?: never;
4371
+ header?: {
4372
+ "sp-access-token"?: string;
4373
+ };
4374
+ path: {
4375
+ id: string;
4376
+ version: number;
4377
+ };
4378
+ cookie?: never;
4379
+ };
4380
+ requestBody?: never;
4381
+ responses: {
4382
+ /** @description The agent after restoring the version (new version created) */
4383
+ 200: {
4384
+ headers: {
4385
+ [name: string]: unknown;
4386
+ };
4387
+ content: {
4388
+ "application/json": components["schemas"]["Agent"];
4389
+ };
4390
+ };
4391
+ /** @description Agent or version not found */
4392
+ 404: {
4393
+ headers: {
4394
+ [name: string]: unknown;
4395
+ };
4396
+ content: {
4397
+ "application/json": {
4398
+ error: string;
4399
+ };
4400
+ };
4401
+ };
4402
+ /** @description Internal server error */
4403
+ 500: {
4404
+ headers: {
4405
+ [name: string]: unknown;
4406
+ };
4407
+ content: {
4408
+ "application/json": {
4409
+ error: string;
4410
+ };
4411
+ };
4412
+ };
4413
+ };
4414
+ };
3510
4415
  listApplications: {
3511
4416
  parameters: {
3512
4417
  query?: never;
@@ -3807,8 +4712,12 @@ declare interface operations {
3807
4712
  /** @description Schema or dataset name in the source database */
3808
4713
  dataset: string;
3809
4714
  table_name: string;
4715
+ /** @description Catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric). NULL otherwise. */
4716
+ database: string | null;
3810
4717
  description: string | null;
3811
4718
  is_visible: boolean;
4719
+ /** @description IDs of applications this table is linked to. Empty means no links. */
4720
+ application_ids: number[];
3812
4721
  created_at: string;
3813
4722
  updated_at: string;
3814
4723
  }[];
@@ -3842,11 +4751,13 @@ declare interface operations {
3842
4751
  /** @description Schema or dataset name in the source database */
3843
4752
  dataset: string;
3844
4753
  table_name: string;
4754
+ /** @description Optional catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric: [lakehouse].[schema].[table]). Leave unset for backends where the connection default catalog suffices. */
4755
+ database?: string | null;
3845
4756
  /** @default true */
3846
4757
  is_visible?: boolean;
3847
4758
  /** @description Optional RLS policy to create alongside the table */
3848
4759
  rls_policy?: {
3849
- /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
4760
+ /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:dataset.name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
3850
4761
  condition: string;
3851
4762
  /** @default true */
3852
4763
  is_active?: boolean;
@@ -3865,6 +4776,8 @@ declare interface operations {
3865
4776
  /** @default true */
3866
4777
  is_active?: boolean;
3867
4778
  }[];
4779
+ /** @description IDs of applications to link this table to. Omitting or passing [] creates no links. */
4780
+ application_ids?: number[];
3868
4781
  };
3869
4782
  };
3870
4783
  };
@@ -3880,8 +4793,12 @@ declare interface operations {
3880
4793
  /** @description Schema or dataset name in the source database */
3881
4794
  dataset: string;
3882
4795
  table_name: string;
4796
+ /** @description Catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric). NULL otherwise. */
4797
+ database: string | null;
3883
4798
  description: string | null;
3884
4799
  is_visible: boolean;
4800
+ /** @description IDs of applications this table is linked to. Empty means no links. */
4801
+ application_ids: number[];
3885
4802
  created_at: string;
3886
4803
  updated_at: string;
3887
4804
  columns: {
@@ -3955,12 +4872,157 @@ declare interface operations {
3955
4872
  };
3956
4873
  content: {
3957
4874
  "application/json": {
3958
- error: string;
4875
+ error: string;
4876
+ };
4877
+ };
4878
+ };
4879
+ /** @description Table with this dataset and table_name already exists */
4880
+ 409: {
4881
+ headers: {
4882
+ [name: string]: unknown;
4883
+ };
4884
+ content: {
4885
+ "application/json": {
4886
+ error: string;
4887
+ };
4888
+ };
4889
+ };
4890
+ /** @description Internal server error */
4891
+ 500: {
4892
+ headers: {
4893
+ [name: string]: unknown;
4894
+ };
4895
+ content: {
4896
+ "application/json": {
4897
+ error: string;
4898
+ };
4899
+ };
4900
+ };
4901
+ };
4902
+ };
4903
+ createTablesBatch: {
4904
+ parameters: {
4905
+ query?: never;
4906
+ header?: {
4907
+ "sp-access-token"?: string;
4908
+ };
4909
+ path?: never;
4910
+ cookie?: never;
4911
+ };
4912
+ requestBody: {
4913
+ content: {
4914
+ "application/json": {
4915
+ /** @description Schema or dataset name in the source database */
4916
+ dataset: string;
4917
+ table_name: string;
4918
+ /** @description Optional catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric: [lakehouse].[schema].[table]). Leave unset for backends where the connection default catalog suffices. */
4919
+ database?: string | null;
4920
+ /** @default true */
4921
+ is_visible?: boolean;
4922
+ /** @description Optional RLS policy to create alongside the table */
4923
+ rls_policy?: {
4924
+ /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:dataset.name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
4925
+ condition: string;
4926
+ /** @default true */
4927
+ is_active?: boolean;
4928
+ };
4929
+ /** @description Optional access rules to create alongside the table */
4930
+ access?: {
4931
+ /** @description Top-level field name in the user metadata (e.g., company_id, department_name) */
4932
+ context_variable: string;
4933
+ /**
4934
+ * @description Comparison operator. Must be "=" or "!=".
4935
+ * @enum {string}
4936
+ */
4937
+ operator: "=" | "!=";
4938
+ /** @description Static value to compare against, e.g. `user_123`. */
4939
+ value: string;
4940
+ /** @default true */
4941
+ is_active?: boolean;
4942
+ }[];
4943
+ /** @description IDs of applications to link this table to. Omitting or passing [] creates no links. */
4944
+ application_ids?: number[];
4945
+ }[];
4946
+ };
4947
+ };
4948
+ responses: {
4949
+ /** @description Batch creation results. Each item indicates whether the table was created or failed, with per-table error details. */
4950
+ 200: {
4951
+ headers: {
4952
+ [name: string]: unknown;
4953
+ };
4954
+ content: {
4955
+ "application/json": {
4956
+ results: ({
4957
+ /** @enum {string} */
4958
+ status: "created";
4959
+ dataset: string;
4960
+ table_name: string;
4961
+ table: {
4962
+ id: number;
4963
+ /** @description Schema or dataset name in the source database */
4964
+ dataset: string;
4965
+ table_name: string;
4966
+ /** @description Catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric). NULL otherwise. */
4967
+ database: string | null;
4968
+ description: string | null;
4969
+ is_visible: boolean;
4970
+ /** @description IDs of applications this table is linked to. Empty means no links. */
4971
+ application_ids: number[];
4972
+ created_at: string;
4973
+ updated_at: string;
4974
+ columns: {
4975
+ id: number;
4976
+ table_id: number;
4977
+ name: string;
4978
+ data_type: string | null;
4979
+ description: string | null;
4980
+ /** @description Whether this column is visible to end users */
4981
+ is_visible: boolean;
4982
+ /** @description Whether this column is indexed for search and filtering */
4983
+ is_indexed: boolean;
4984
+ created_at: string;
4985
+ updated_at: string;
4986
+ }[];
4987
+ rls_policy: {
4988
+ id: number;
4989
+ table_id: number;
4990
+ /** @description SQL condition appended to queries on this table to restrict row access */
4991
+ condition: string;
4992
+ /** @description Variables referenced in the condition, resolved from user context at query time */
4993
+ context_variables: string[];
4994
+ /** @description Other tables referenced by this policy's condition (for query planning) */
4995
+ depends_on_tables: string[];
4996
+ is_active: boolean;
4997
+ created_at: string;
4998
+ updated_at: string;
4999
+ } | null;
5000
+ access: {
5001
+ id: number;
5002
+ table_id: number;
5003
+ /** @description Top-level field name in the user metadata (e.g., company_id, department_name) */
5004
+ context_variable: string;
5005
+ /** @description Comparison operator. Must be "=" or "!=". */
5006
+ operator: string;
5007
+ /** @description Static value to compare against, e.g. `user_123`. */
5008
+ value: string;
5009
+ is_active: boolean;
5010
+ created_at: string;
5011
+ updated_at: string;
5012
+ }[];
5013
+ };
5014
+ } | {
5015
+ /** @enum {string} */
5016
+ status: "failed";
5017
+ dataset: string;
5018
+ table_name: string;
5019
+ error: string;
5020
+ })[];
3959
5021
  };
3960
5022
  };
3961
5023
  };
3962
- /** @description Table with this dataset and table_name already exists */
3963
- 409: {
5024
+ /** @description Invalid request (e.g. empty array or exceeds 50 items) */
5025
+ 400: {
3964
5026
  headers: {
3965
5027
  [name: string]: unknown;
3966
5028
  };
@@ -4007,8 +5069,12 @@ declare interface operations {
4007
5069
  /** @description Schema or dataset name in the source database */
4008
5070
  dataset: string;
4009
5071
  table_name: string;
5072
+ /** @description Catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric). NULL otherwise. */
5073
+ database: string | null;
4010
5074
  description: string | null;
4011
5075
  is_visible: boolean;
5076
+ /** @description IDs of applications this table is linked to. Empty means no links. */
5077
+ application_ids: number[];
4012
5078
  created_at: string;
4013
5079
  updated_at: string;
4014
5080
  columns: {
@@ -4144,7 +5210,7 @@ declare interface operations {
4144
5210
  is_visible?: boolean;
4145
5211
  /** @description Upsert the RLS policy: updates existing if found, creates if not (condition required for create) */
4146
5212
  rls_policy?: {
4147
- /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
5213
+ /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:dataset.name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
4148
5214
  condition?: string;
4149
5215
  /** @default true */
4150
5216
  is_active?: boolean;
@@ -4163,6 +5229,8 @@ declare interface operations {
4163
5229
  /** @default true */
4164
5230
  is_active?: boolean;
4165
5231
  }[];
5232
+ /** @description Replace table-to-application links. Empty array clears all links. */
5233
+ application_ids?: number[];
4166
5234
  };
4167
5235
  };
4168
5236
  };
@@ -4178,8 +5246,12 @@ declare interface operations {
4178
5246
  /** @description Schema or dataset name in the source database */
4179
5247
  dataset: string;
4180
5248
  table_name: string;
5249
+ /** @description Catalog/lakehouse name for backends with a 3-level namespace (e.g. Microsoft Fabric). NULL otherwise. */
5250
+ database: string | null;
4181
5251
  description: string | null;
4182
5252
  is_visible: boolean;
5253
+ /** @description IDs of applications this table is linked to. Empty means no links. */
5254
+ application_ids: number[];
4183
5255
  created_at: string;
4184
5256
  updated_at: string;
4185
5257
  columns: {
@@ -4331,7 +5403,7 @@ declare interface operations {
4331
5403
  requestBody: {
4332
5404
  content: {
4333
5405
  "application/json": {
4334
- /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
5406
+ /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:dataset.name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
4335
5407
  condition: string;
4336
5408
  /** @default true */
4337
5409
  is_active?: boolean;
@@ -4518,7 +5590,7 @@ declare interface operations {
4518
5590
  requestBody: {
4519
5591
  content: {
4520
5592
  "application/json": {
4521
- /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
5593
+ /** @description SQL condition appended to queries on this table to restrict row access. Use [var:name] for context variables and [table:dataset.name] for table references — these are auto-detected and stored as context_variables and depends_on_tables. */
4522
5594
  condition?: string;
4523
5595
  is_active?: boolean;
4524
5596
  };
@@ -5118,6 +6190,7 @@ declare interface operations {
5118
6190
  query?: never;
5119
6191
  header?: {
5120
6192
  "sp-access-token"?: string;
6193
+ "X-Application-Name"?: string;
5121
6194
  };
5122
6195
  path?: never;
5123
6196
  cookie?: never;
@@ -5265,6 +6338,8 @@ declare interface operations {
5265
6338
  };
5266
6339
  }
5267
6340
 
6341
+ export declare const PAGINATE_DATA_REPORT: "paginateDataReport";
6342
+
5268
6343
  declare type PatchParam<T, Config extends RemoveParamsConfig, P extends keyof Config> = Simplify<T extends {
5269
6344
  [key in P]: infer H;
5270
6345
  } ? H extends Partial<Record<string, unknown>> ? Config[P] extends string ? Omit<H, Config[P]> : H : never : never>;
@@ -5803,6 +6878,38 @@ declare interface paths {
5803
6878
  patch?: never;
5804
6879
  trace?: never;
5805
6880
  };
6881
+ "/api/v1/agent-runs/{id}/reports": {
6882
+ parameters: {
6883
+ query?: never;
6884
+ header?: never;
6885
+ path?: never;
6886
+ cookie?: never;
6887
+ };
6888
+ get: operations["getAgentRunReports"];
6889
+ put?: never;
6890
+ post?: never;
6891
+ delete?: never;
6892
+ options?: never;
6893
+ head?: never;
6894
+ patch?: never;
6895
+ trace?: never;
6896
+ };
6897
+ "/api/v1/agent-runs/{id}/visualizations": {
6898
+ parameters: {
6899
+ query?: never;
6900
+ header?: never;
6901
+ path?: never;
6902
+ cookie?: never;
6903
+ };
6904
+ get: operations["getAgentRunVisualizations"];
6905
+ put?: never;
6906
+ post?: never;
6907
+ delete?: never;
6908
+ options?: never;
6909
+ head?: never;
6910
+ patch?: never;
6911
+ trace?: never;
6912
+ };
5806
6913
  "/api/v1/agents": {
5807
6914
  parameters: {
5808
6915
  query?: never;
@@ -5835,6 +6942,38 @@ declare interface paths {
5835
6942
  patch?: never;
5836
6943
  trace?: never;
5837
6944
  };
6945
+ "/api/v1/agents/{id}/versions": {
6946
+ parameters: {
6947
+ query?: never;
6948
+ header?: never;
6949
+ path?: never;
6950
+ cookie?: never;
6951
+ };
6952
+ get: operations["listAgentVersions"];
6953
+ put?: never;
6954
+ post?: never;
6955
+ delete?: never;
6956
+ options?: never;
6957
+ head?: never;
6958
+ patch?: never;
6959
+ trace?: never;
6960
+ };
6961
+ "/api/v1/agents/{id}/versions/{version}/restore": {
6962
+ parameters: {
6963
+ query?: never;
6964
+ header?: never;
6965
+ path?: never;
6966
+ cookie?: never;
6967
+ };
6968
+ get?: never;
6969
+ put?: never;
6970
+ post: operations["restoreAgentVersion"];
6971
+ delete?: never;
6972
+ options?: never;
6973
+ head?: never;
6974
+ patch?: never;
6975
+ trace?: never;
6976
+ };
5838
6977
  "/api/v1/applications": {
5839
6978
  parameters: {
5840
6979
  query?: never;
@@ -5883,6 +7022,22 @@ declare interface paths {
5883
7022
  patch?: never;
5884
7023
  trace?: never;
5885
7024
  };
7025
+ "/api/v1/tables/batch": {
7026
+ parameters: {
7027
+ query?: never;
7028
+ header?: never;
7029
+ path?: never;
7030
+ cookie?: never;
7031
+ };
7032
+ get?: never;
7033
+ put?: never;
7034
+ post: operations["createTablesBatch"];
7035
+ delete?: never;
7036
+ options?: never;
7037
+ head?: never;
7038
+ patch?: never;
7039
+ trace?: never;
7040
+ };
5886
7041
  "/api/v1/tables/{id}": {
5887
7042
  parameters: {
5888
7043
  query?: never;
@@ -6029,13 +7184,36 @@ declare interface paths {
6029
7184
  };
6030
7185
  }
6031
7186
 
6032
- declare type PublicApiClient = Simplify<Client<PublicPaths, `${string}/${string}`>>;
7187
+ export declare type PromptStarter = z.infer<typeof PromptStarterSchema>;
7188
+
7189
+ declare const PromptStarterSchema: z.ZodObject<{
7190
+ id: z.ZodNumber;
7191
+ title: z.ZodString;
7192
+ template: z.ZodString;
7193
+ is_default: z.ZodBoolean;
7194
+ }, z.core.$strip>;
7195
+
7196
+ export declare type PublicApiClient = Simplify<Client<PublicPaths, `${string}/${string}`>>;
6033
7197
 
6034
7198
  declare type PublicPaths = Simplify<{
6035
7199
  [Path in keyof paths]: RemoveAuthHeader<paths[Path]>;
6036
7200
  }>;
6037
7201
 
6038
- declare type QuickActions = z.infer<typeof QuickActionsSchema>;
7202
+ export declare type QuestionInput = z.infer<typeof questionSchema>;
7203
+
7204
+ declare const questionSchema: z.ZodObject<{
7205
+ question: z.ZodString;
7206
+ header: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7207
+ multiSelect: z.ZodBoolean;
7208
+ options: z.ZodArray<z.ZodObject<{
7209
+ label: z.ZodString;
7210
+ description: z.ZodString;
7211
+ }, z.core.$strip>>;
7212
+ }, z.core.$strip>;
7213
+
7214
+ export declare type QuickAction = QuickActions[number];
7215
+
7216
+ export declare type QuickActions = z.infer<typeof QuickActionsSchema>;
6039
7217
 
6040
7218
  declare const QuickActionsSchema: z.ZodArray<z.ZodObject<{
6041
7219
  label: z.ZodString;
@@ -6053,12 +7231,98 @@ declare const RedactedAskUserQuestionResponse: z.ZodObject<{
6053
7231
  }, z.core.$strip>], "status">;
6054
7232
  }, z.core.$strip>;
6055
7233
 
7234
+ export declare type RedactedAskUserQuestionResponseType = z.output<typeof RedactedAskUserQuestionResponse>;
7235
+
7236
+ declare const RedactedGenerateDataReportResponse: z.ZodObject<{
7237
+ tool: z.ZodDefault<z.ZodLiteral<"generateDataReport">>;
7238
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7239
+ status: z.ZodLiteral<"success">;
7240
+ public: z.ZodObject<{
7241
+ flowDataId: z.ZodNumber;
7242
+ reportId: z.ZodString;
7243
+ answer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7244
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7245
+ }, z.core.$strip>;
7246
+ }, z.core.$strip>, z.ZodObject<{
7247
+ status: z.ZodLiteral<"error">;
7248
+ category: z.ZodOptional<z.ZodEnum<{
7249
+ unknown: "unknown";
7250
+ timeout: "timeout";
7251
+ connection_error: "connection_error";
7252
+ auth_error: "auth_error";
7253
+ resource_exhausted: "resource_exhausted";
7254
+ table_not_found: "table_not_found";
7255
+ column_not_found: "column_not_found";
7256
+ schema_not_found: "schema_not_found";
7257
+ view_not_found: "view_not_found";
7258
+ function_not_found: "function_not_found";
7259
+ syntax_error: "syntax_error";
7260
+ ambiguous_column: "ambiguous_column";
7261
+ type_mismatch: "type_mismatch";
7262
+ invalid_cast: "invalid_cast";
7263
+ invalid_argument: "invalid_argument";
7264
+ division_by_zero: "division_by_zero";
7265
+ constraint_violation: "constraint_violation";
7266
+ permission_denied: "permission_denied";
7267
+ }>>;
7268
+ }, z.core.$strip>], "status">>;
7269
+ }, z.core.$strip>;
7270
+
7271
+ export declare type RedactedGenerateDataReportResponseType = z.infer<typeof RedactedGenerateDataReportResponse>;
7272
+
7273
+ declare const RedactedGenerateVisualizationResponse: z.ZodObject<{
7274
+ tool: z.ZodDefault<z.ZodLiteral<"generateVisualization">>;
7275
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7276
+ status: z.ZodLiteral<"success">;
7277
+ public: z.ZodObject<{
7278
+ flowDataId: z.ZodNumber;
7279
+ reportId: z.ZodString;
7280
+ flowDataVisualizationId: z.ZodNumber;
7281
+ visualizationId: z.ZodString;
7282
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7283
+ type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7284
+ }, z.core.$strip>;
7285
+ }, z.core.$strip>, z.ZodObject<{
7286
+ status: z.ZodLiteral<"error">;
7287
+ message: z.ZodString;
7288
+ }, z.core.$strip>], "status">>;
7289
+ }, z.core.$strip>;
7290
+
7291
+ export declare type RedactedGenerateVisualizationResponseType = z.infer<typeof RedactedGenerateVisualizationResponse>;
7292
+
7293
+ declare const RedactedGetAvailableColumnsForTableResponse: z.ZodObject<{
7294
+ tool: z.ZodDefault<z.ZodLiteral<"getAvailableColumnsForTable">>;
7295
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7296
+ status: z.ZodLiteral<"success">;
7297
+ public: z.ZodObject<{}, z.core.$loose>;
7298
+ }, z.core.$strip>, z.ZodObject<{
7299
+ status: z.ZodLiteral<"error">;
7300
+ message: z.ZodString;
7301
+ }, z.core.$strip>], "status">>;
7302
+ }, z.core.$strip>;
7303
+
7304
+ export declare type RedactedGetAvailableColumnsForTableResponseType = z.infer<typeof RedactedGetAvailableColumnsForTableResponse>;
7305
+
7306
+ declare const RedactedGetAvailableTablesResponse: z.ZodObject<{
7307
+ tool: z.ZodDefault<z.ZodLiteral<"getAvailableTables">>;
7308
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7309
+ status: z.ZodLiteral<"success">;
7310
+ public: z.ZodObject<{}, z.core.$loose>;
7311
+ }, z.core.$strip>, z.ZodObject<{
7312
+ status: z.ZodLiteral<"error">;
7313
+ message: z.ZodString;
7314
+ }, z.core.$strip>], "status">>;
7315
+ }, z.core.$strip>;
7316
+
7317
+ export declare type RedactedGetAvailableTablesResponseType = z.output<typeof RedactedGetAvailableTablesResponse>;
7318
+
6056
7319
  declare const redactedOutputSchema: z.ZodObject<{
6057
7320
  tool: z.ZodLiteral<"generateDataReport">;
6058
7321
  result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6059
7322
  status: z.ZodLiteral<"success">;
6060
7323
  public: z.ZodObject<{
6061
7324
  flowDataId: z.ZodNumber;
7325
+ reportId: z.ZodString;
6062
7326
  answer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6063
7327
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6064
7328
  }, z.core.$strip>;
@@ -6093,7 +7357,9 @@ declare const redactedOutputSchema_2: z.ZodObject<{
6093
7357
  status: z.ZodLiteral<"success">;
6094
7358
  public: z.ZodObject<{
6095
7359
  flowDataId: z.ZodNumber;
7360
+ reportId: z.ZodString;
6096
7361
  flowDataVisualizationId: z.ZodNumber;
7362
+ visualizationId: z.ZodString;
6097
7363
  title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6098
7364
  type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6099
7365
  }, z.core.$strip>;
@@ -6181,6 +7447,24 @@ declare const redactedOutputSchema_8: z.ZodObject<{
6181
7447
  }, z.core.$strip>], "status">>;
6182
7448
  }, z.core.$strip>;
6183
7449
 
7450
+ declare const RedactedPaginateDataReportResponse: z.ZodObject<{
7451
+ tool: z.ZodDefault<z.ZodLiteral<"paginateDataReport">>;
7452
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7453
+ status: z.ZodLiteral<"success">;
7454
+ public: z.ZodObject<{
7455
+ totalRows: z.ZodNumber;
7456
+ fetchedRows: z.ZodNumber;
7457
+ offset: z.ZodNumber;
7458
+ hasMore: z.ZodBoolean;
7459
+ }, z.core.$strip>;
7460
+ }, z.core.$strip>, z.ZodObject<{
7461
+ status: z.ZodLiteral<"error">;
7462
+ message: z.ZodString;
7463
+ }, z.core.$strip>], "status">>;
7464
+ }, z.core.$strip>;
7465
+
7466
+ export declare type RedactedPaginateDataReportResponseType = z.output<typeof RedactedPaginateDataReportResponse>;
7467
+
6184
7468
  declare const RedactedThinkResponse: z.ZodObject<{
6185
7469
  tool: z.ZodDefault<z.ZodLiteral<"think">>;
6186
7470
  result: z.ZodOptional<z.ZodObject<{
@@ -6189,6 +7473,41 @@ declare const RedactedThinkResponse: z.ZodObject<{
6189
7473
  }, z.core.$strip>>;
6190
7474
  }, z.core.$strip>;
6191
7475
 
7476
+ export declare type RedactedThinkResponseType = z.output<typeof RedactedThinkResponse>;
7477
+
7478
+ declare const RedactedValueBasedColumnSearchResponse: z.ZodObject<{
7479
+ tool: z.ZodDefault<z.ZodLiteral<"valueBasedColumnSearch">>;
7480
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7481
+ status: z.ZodLiteral<"success">;
7482
+ public: z.ZodObject<{}, z.core.$loose>;
7483
+ }, z.core.$strip>, z.ZodObject<{
7484
+ status: z.ZodLiteral<"error">;
7485
+ message: z.ZodString;
7486
+ }, z.core.$strip>], "status">>;
7487
+ }, z.core.$strip>;
7488
+
7489
+ export declare type RedactedValueBasedColumnSearchResponseType = z.infer<typeof RedactedValueBasedColumnSearchResponse>;
7490
+
7491
+ declare const RedactedWebSearchToolResponse: z.ZodObject<{
7492
+ tool: z.ZodDefault<z.ZodLiteral<"search">>;
7493
+ result: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7494
+ status: z.ZodLiteral<"success">;
7495
+ public: z.ZodObject<{
7496
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
7497
+ sourceType: z.ZodLiteral<"url">;
7498
+ id: z.ZodString;
7499
+ url: z.ZodString;
7500
+ title: z.ZodString;
7501
+ }, z.core.$strip>>>;
7502
+ }, z.core.$strip>;
7503
+ }, z.core.$strip>, z.ZodObject<{
7504
+ status: z.ZodLiteral<"error">;
7505
+ message: z.ZodString;
7506
+ }, z.core.$strip>], "status">>;
7507
+ }, z.core.$strip>;
7508
+
7509
+ export declare type RedactedWebSearchToolResponseType = z.infer<typeof RedactedWebSearchToolResponse>;
7510
+
6192
7511
  declare type RemoveAuthHeader<PathSchema> = Simplify<{
6193
7512
  [Method in keyof PathSchema]: RemoveParams<PathSchema[Method], ToRemove>;
6194
7513
  }>;
@@ -6211,6 +7530,8 @@ declare type RemoveParamsConfig = Simplify<{
6211
7530
  cookie?: string;
6212
7531
  }>;
6213
7532
 
7533
+ export declare type ReportData = z.infer<typeof ReportDataSchema>;
7534
+
6214
7535
  declare type ReportDataFilters = {
6215
7536
  columns?: string[];
6216
7537
  limit: number;
@@ -6219,7 +7540,18 @@ declare type ReportDataFilters = {
6219
7540
  cursor?: number;
6220
7541
  };
6221
7542
 
6222
- declare type SignalWithReportId = z.infer<typeof SignalWithReportIdSchema>;
7543
+ declare const ReportDataSchema: z.ZodArray<z.ZodObject<{}, z.core.$loose>>;
7544
+
7545
+ export declare type Signal = z.infer<typeof SignalSchema>;
7546
+
7547
+ declare const SignalSchema: z.ZodObject<{
7548
+ rule: z.ZodString;
7549
+ metric: z.ZodString;
7550
+ trigger: z.ZodString;
7551
+ implementation: z.ZodString;
7552
+ }, z.core.$strip>;
7553
+
7554
+ export declare type SignalWithReportId = z.infer<typeof SignalWithReportIdSchema>;
6223
7555
 
6224
7556
  declare const SignalWithReportIdSchema: z.ZodObject<{
6225
7557
  rule: z.ZodString;
@@ -6229,11 +7561,34 @@ declare const SignalWithReportIdSchema: z.ZodObject<{
6229
7561
  reportId: z.ZodNumber;
6230
7562
  }, z.core.$strip>;
6231
7563
 
6232
- declare type SortingState = ColumnSort[];
7564
+ export declare type SortingState = ColumnSort[];
7565
+
7566
+ export declare const SqlErrorCategory: z.ZodEnum<{
7567
+ unknown: "unknown";
7568
+ timeout: "timeout";
7569
+ connection_error: "connection_error";
7570
+ auth_error: "auth_error";
7571
+ resource_exhausted: "resource_exhausted";
7572
+ table_not_found: "table_not_found";
7573
+ column_not_found: "column_not_found";
7574
+ schema_not_found: "schema_not_found";
7575
+ view_not_found: "view_not_found";
7576
+ function_not_found: "function_not_found";
7577
+ syntax_error: "syntax_error";
7578
+ ambiguous_column: "ambiguous_column";
7579
+ type_mismatch: "type_mismatch";
7580
+ invalid_cast: "invalid_cast";
7581
+ invalid_argument: "invalid_argument";
7582
+ division_by_zero: "division_by_zero";
7583
+ constraint_violation: "constraint_violation";
7584
+ permission_denied: "permission_denied";
7585
+ }>;
7586
+
7587
+ export declare type SqlErrorCategory = z.infer<typeof SqlErrorCategory>;
6233
7588
 
6234
- declare type TableFilters = Record<string, TableFilterValue>;
7589
+ export declare type TableFilters = Record<string, TableFilterValue>;
6235
7590
 
6236
- declare type TableFilterValue = z.infer<typeof TableFilterValueSchema>;
7591
+ export declare type TableFilterValue = z.infer<typeof TableFilterValueSchema>;
6237
7592
 
6238
7593
  declare const TableFilterValueSchema: z.ZodObject<{
6239
7594
  operator: z.ZodEnum<{
@@ -6252,6 +7607,8 @@ declare const TableFilterValueSchema: z.ZodObject<{
6252
7607
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
6253
7608
  }, z.core.$strip>;
6254
7609
 
7610
+ export declare const THINK: "think";
7611
+
6255
7612
  /**
6256
7613
  * Token storage keys
6257
7614
  */
@@ -6261,6 +7618,25 @@ declare type ToRemove = {
6261
7618
  header: typeof HEADER_SP_TOKEN;
6262
7619
  };
6263
7620
 
7621
+ export declare const toSearchParams: ({ cursor, filters, sorting, limit, }: {
7622
+ cursor?: number;
7623
+ filters?: TableFilters;
7624
+ sorting?: SortingState;
7625
+ limit?: number;
7626
+ }) => {
7627
+ limit?: number;
7628
+ cursor?: number;
7629
+ order?: string;
7630
+ filter?: string;
7631
+ };
7632
+
7633
+ /**
7634
+ * Builds a `uploaded-file:{id}` reference string.
7635
+ * @param uploadedFileId the id of the file
7636
+ * @returns a prefixed handler
7637
+ */
7638
+ export declare const toUploadedFileRefUrl: (uploadedFileId: string) => string;
7639
+
6264
7640
  declare type UiTool = InferUITool<Tool<z.infer<typeof inputSchema>, z.infer<typeof redactedOutputSchema>>>;
6265
7641
 
6266
7642
  declare type UiTool_10 = InferUITool<Tool<z.infer<typeof inputSchema_10>, z.infer<typeof redactedOutputSchema_8>>>;
@@ -6289,9 +7665,166 @@ declare const UpdateCanvasSchema: z.ZodObject<{
6289
7665
  is_public: z.ZodOptional<z.ZodBoolean>;
6290
7666
  }, z.core.$strip>;
6291
7667
 
7668
+ /** Prefix used by new clients to reference a file uploaded separately from chat JSON. */
7669
+ export declare const UPLOADED_FILE_REF_PREFIX = "uploaded-file:";
7670
+
7671
+ /** Response payload returned when a file is uploaded successfully. */
7672
+ export declare type UploadedFile = {
7673
+ uploadedFileId: string;
7674
+ filename: string;
7675
+ mediaType: string;
7676
+ sizeBytes: number;
7677
+ };
7678
+
6292
7679
  /** A previously uploaded file identifier to attach to the first message of a flow. */
6293
- declare type UploadedFileId = default_2.infer<typeof UploadedFileIdSchema>;
7680
+ export declare type UploadedFileId = default_2.infer<typeof UploadedFileIdSchema>;
6294
7681
 
6295
7682
  declare const UploadedFileIdSchema: z.ZodUUID;
6296
7683
 
7684
+ export declare type V1FrontendVisualization = z.output<typeof V1FrontendVisualizationSchema>;
7685
+
7686
+ declare const V1FrontendVisualizationSchema: z.ZodObject<{
7687
+ id: z.ZodNumber;
7688
+ uuid: z.ZodString;
7689
+ configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
7690
+ xAxisLabel: z.ZodString;
7691
+ yAxisLabel: z.ZodString;
7692
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
7693
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
7694
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
7695
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
7696
+ title: z.ZodString;
7697
+ type: z.ZodLiteral<"bar">;
7698
+ }, z.core.$strip>, z.ZodObject<{
7699
+ xAxisLabel: z.ZodString;
7700
+ yAxisLabel: z.ZodString;
7701
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
7702
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
7703
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
7704
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
7705
+ title: z.ZodString;
7706
+ type: z.ZodLiteral<"line/area">;
7707
+ }, z.core.$strip>, z.ZodObject<{
7708
+ xAxisLabel: z.ZodString;
7709
+ yAxisLabel: z.ZodString;
7710
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
7711
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
7712
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
7713
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
7714
+ title: z.ZodString;
7715
+ type: z.ZodLiteral<"scatter">;
7716
+ }, z.core.$strip>, z.ZodObject<{
7717
+ nameKey: z.ZodString;
7718
+ dataKey: z.ZodString;
7719
+ title: z.ZodString;
7720
+ type: z.ZodLiteral<"pie">;
7721
+ }, z.core.$strip>], "type">;
7722
+ created_at: z.ZodString;
7723
+ flow_data_id: z.ZodNumber;
7724
+ report_uuid: z.ZodString;
7725
+ flow_data: z.ZodOptional<z.ZodObject<{
7726
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
7727
+ last_materialized_at: z.ZodNullable<z.ZodString>;
7728
+ materialized_error_message: z.ZodNullable<z.ZodString>;
7729
+ materialized_status: z.ZodNullable<z.ZodEnum<{
7730
+ completed: "completed";
7731
+ failed: "failed";
7732
+ running: "running";
7733
+ }>>;
7734
+ }, z.core.$strip>>;
7735
+ materialization: z.ZodOptional<z.ZodObject<{
7736
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
7737
+ last_materialized_at: z.ZodNullable<z.ZodString>;
7738
+ materialized_error_message: z.ZodNullable<z.ZodString>;
7739
+ materialized_status: z.ZodNullable<z.ZodEnum<{
7740
+ completed: "completed";
7741
+ failed: "failed";
7742
+ running: "running";
7743
+ }>>;
7744
+ }, z.core.$strip>>;
7745
+ }, z.core.$strip>;
7746
+
7747
+ export declare type V1FrontendVisualizationWithData = z.output<typeof V1FrontendVisualizationWithDataSchema>;
7748
+
7749
+ declare const V1FrontendVisualizationWithDataSchema: z.ZodObject<{
7750
+ id: z.ZodNumber;
7751
+ uuid: z.ZodString;
7752
+ configuration: z.ZodDiscriminatedUnion<[z.ZodObject<{
7753
+ xAxisLabel: z.ZodString;
7754
+ yAxisLabel: z.ZodString;
7755
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
7756
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
7757
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
7758
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
7759
+ title: z.ZodString;
7760
+ type: z.ZodLiteral<"bar">;
7761
+ }, z.core.$strip>, z.ZodObject<{
7762
+ xAxisLabel: z.ZodString;
7763
+ yAxisLabel: z.ZodString;
7764
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
7765
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
7766
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
7767
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
7768
+ title: z.ZodString;
7769
+ type: z.ZodLiteral<"line/area">;
7770
+ }, z.core.$strip>, z.ZodObject<{
7771
+ xAxisLabel: z.ZodString;
7772
+ yAxisLabel: z.ZodString;
7773
+ xAxisDataKey: z.ZodOptional<z.ZodString>;
7774
+ yAxisDataKey: z.ZodOptional<z.ZodString>;
7775
+ dimensionDataKey: z.ZodOptional<z.ZodString>;
7776
+ valueColumns: z.ZodOptional<z.ZodArray<z.ZodString>>;
7777
+ title: z.ZodString;
7778
+ type: z.ZodLiteral<"scatter">;
7779
+ }, z.core.$strip>, z.ZodObject<{
7780
+ nameKey: z.ZodString;
7781
+ dataKey: z.ZodString;
7782
+ title: z.ZodString;
7783
+ type: z.ZodLiteral<"pie">;
7784
+ }, z.core.$strip>], "type">;
7785
+ created_at: z.ZodString;
7786
+ flow_data_id: z.ZodNumber;
7787
+ report_uuid: z.ZodString;
7788
+ flow_data: z.ZodOptional<z.ZodObject<{
7789
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
7790
+ last_materialized_at: z.ZodNullable<z.ZodString>;
7791
+ materialized_error_message: z.ZodNullable<z.ZodString>;
7792
+ materialized_status: z.ZodNullable<z.ZodEnum<{
7793
+ completed: "completed";
7794
+ failed: "failed";
7795
+ running: "running";
7796
+ }>>;
7797
+ }, z.core.$strip>>;
7798
+ materialization: z.ZodOptional<z.ZodObject<{
7799
+ is_materialized: z.ZodNullable<z.ZodBoolean>;
7800
+ last_materialized_at: z.ZodNullable<z.ZodString>;
7801
+ materialized_error_message: z.ZodNullable<z.ZodString>;
7802
+ materialized_status: z.ZodNullable<z.ZodEnum<{
7803
+ completed: "completed";
7804
+ failed: "failed";
7805
+ running: "running";
7806
+ }>>;
7807
+ }, z.core.$strip>>;
7808
+ data: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDate, z.ZodCoercedNumber<unknown>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<"empty" | (string & {}) | null, unknown>>]>>>;
7809
+ _metadata: z.ZodOptional<z.ZodObject<{
7810
+ wasSampled: z.ZodBoolean;
7811
+ originalCount: z.ZodNumber;
7812
+ sampledCount: z.ZodNumber;
7813
+ }, z.core.$strip>>;
7814
+ }, z.core.$strip>;
7815
+
7816
+ /**
7817
+ * Validates that an array of uploaded files does not exceed the count or
7818
+ * combined-size limits. The function accepts any object with `size_bytes` so
7819
+ * callers don't need to import Supabase-specific row types.
7820
+ * @param uploadedFiles - The files to validate.
7821
+ */
7822
+ export declare const validateUploadedFiles: (uploadedFiles: ReadonlyArray<{
7823
+ size_bytes: number;
7824
+ }>) => void;
7825
+
7826
+ export declare const VALUE_BASED_COLUMN_SEARCH: "valueBasedColumnSearch";
7827
+
7828
+ export declare const WEB_SEARCH: "webSearch";
7829
+
6297
7830
  export { }