@magemetrics/core 0.10.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -157,7 +157,6 @@ declare interface components {
157
157
  id: number;
158
158
  flow_data_id: number;
159
159
  created_at: string;
160
- bookmarked: boolean;
161
160
  flow_data?: {
162
161
  is_materialized: boolean | null;
163
162
  last_materialized_at: string | null;
@@ -225,7 +224,6 @@ declare interface components {
225
224
  id: number;
226
225
  flow_data_id: number;
227
226
  created_at: string;
228
- bookmarked: boolean;
229
227
  flow_data?: {
230
228
  is_materialized: boolean | null;
231
229
  last_materialized_at: string | null;
@@ -308,6 +306,27 @@ declare interface components {
308
306
  output_data: {
309
307
  [key: string]: unknown;
310
308
  } | null;
309
+ tasks?: {
310
+ id: string;
311
+ title: string;
312
+ /** @enum {string} */
313
+ status: "pending" | "in_progress" | "completed" | "failed";
314
+ parent_id?: string;
315
+ started_at?: string;
316
+ completed_at?: string;
317
+ summary?: {
318
+ /** @description SHORT summary (max 10 words) e.g. 'Found 847 records' or 'Generated trend chart' */
319
+ outcome: string;
320
+ /** @description List of tools used during this task, e.g. ['generateDataReport x3', 'generateVisualization x1'] */
321
+ tool_calls: string[];
322
+ };
323
+ artifacts?: {
324
+ /** @enum {string} */
325
+ type: "report" | "visualization";
326
+ /** @description The ID returned by generateDataReport or generateVisualization */
327
+ id: string;
328
+ }[];
329
+ }[] | null;
311
330
  error_message: string | null;
312
331
  };
313
332
  StartAgentRunRequest: {
@@ -324,8 +343,6 @@ declare interface components {
324
343
  company_id: number;
325
344
  name: string;
326
345
  objective: string | null;
327
- generated_inputs_fragment: string | null;
328
- generated_outputs_fragment: string | null;
329
346
  generated_objective_fragment: string | null;
330
347
  active_tools: string[] | null;
331
348
  input_schema: ({
@@ -359,6 +376,12 @@ declare interface components {
359
376
  output_schema: {
360
377
  [key: string]: unknown;
361
378
  } | null;
379
+ task_plan: {
380
+ id: string;
381
+ title: string;
382
+ /** @description Detailed steps or description of what the task will do */
383
+ description?: string;
384
+ }[] | null;
362
385
  master_prompt_name: string | null;
363
386
  master_prompt_version: number | null;
364
387
  created_at: string;
@@ -398,6 +421,9 @@ declare type CustomDataParts = {
398
421
  "node-added": {
399
422
  node: NodeBase;
400
423
  };
424
+ "report-status": {
425
+ status: string | null;
426
+ };
401
427
  };
402
428
 
403
429
  /**
@@ -494,15 +520,15 @@ export declare interface ExternalAuthProviderConfig {
494
520
  declare type FrontendRecentFlows = z.infer<typeof FrontendRecentFlowsSchema>;
495
521
 
496
522
  declare const FrontendRecentFlowsSchema: z.ZodObject<{
497
- id: z.ZodString;
498
523
  title: z.ZodNullable<z.ZodString>;
524
+ id: z.ZodString;
499
525
  request: z.ZodString;
500
526
  created_at: z.ZodString;
501
527
  user_id: z.ZodNullable<z.ZodString>;
502
528
  application_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
503
529
  }, z.core.$strip>;
504
530
 
505
- export declare const getPublicApiClient: (apiUrl: string, apiKey: string) => Client<NoAuthPaths>;
531
+ export declare const getPublicApiClient: (apiUrl: string, apiKey: string) => Client<PublicPaths>;
506
532
 
507
533
  declare const HEADER_SP_TOKEN: "sp-access-token";
508
534
 
@@ -523,6 +549,7 @@ declare const inputSchema: z.ZodObject<{
523
549
  }, z.core.$strip>;
524
550
 
525
551
  declare const inputSchema_2: z.ZodObject<{
552
+ reportId: z.ZodNumber;
526
553
  chartType: z.ZodEnum<{
527
554
  bar: "bar";
528
555
  "line/area": "line/area";
@@ -555,6 +582,8 @@ declare const inputSchema_7: z.ZodObject<{
555
582
 
556
583
  declare const inputSchema_8: z.ZodObject<{
557
584
  query: z.ZodString;
585
+ fromDate: z.ZodOptional<z.ZodISODate>;
586
+ toDate: z.ZodOptional<z.ZodISODate>;
558
587
  }, z.core.$strip>;
559
588
 
560
589
  declare const inputSchema_9: z.ZodObject<{
@@ -569,8 +598,6 @@ declare const inputSchema_9: z.ZodObject<{
569
598
  }, z.core.$strip>>;
570
599
  }, z.core.$strip>;
571
600
 
572
- declare type InternalApiClient = Simplify<Client<NoAuthPaths, `${string}/${string}`>>;
573
-
574
601
  export declare class MageMetricsChatTransport extends DefaultChatTransport<MMChatUIMessage> {
575
602
  constructor(apiUrl: string, flowId: string, options: MageMetricsChatTransportOptions);
576
603
  }
@@ -630,7 +657,6 @@ export declare class MageMetricsClient {
630
657
  id: number;
631
658
  flow_data_id: number;
632
659
  created_at: string;
633
- bookmarked: boolean;
634
660
  flow_data?: {
635
661
  is_materialized: boolean | null;
636
662
  last_materialized_at: string | null;
@@ -709,7 +735,6 @@ export declare class MageMetricsClient {
709
735
  } & {
710
736
  [key: string]: unknown;
711
737
  };
712
- bookmarked: boolean;
713
738
  status: string | null;
714
739
  is_removed: boolean;
715
740
  is_materialized: boolean | null;
@@ -762,8 +787,8 @@ export declare class MageMetricsClient {
762
787
  }>;
763
788
  delete: (canvasId: string) => Promise<void>;
764
789
  getForFlow: (flowId: string) => Promise<{
765
- id: string;
766
790
  title: string | null;
791
+ id: string;
767
792
  nodes: any[];
768
793
  edges: any[];
769
794
  is_public: boolean;
@@ -799,7 +824,7 @@ export declare class MageMetricsClient {
799
824
  }[]>;
800
825
  }>;
801
826
  };
802
- client(): InternalApiClient;
827
+ client(): PublicApiClient;
803
828
  private createSupabaseHeaderMiddleware;
804
829
  }
805
830
 
@@ -870,10 +895,6 @@ declare type MMUiTools = {
870
895
  askUserQuestion: UiTool_9;
871
896
  };
872
897
 
873
- declare type NoAuthPaths = Simplify<{
874
- [Path in keyof paths]: RemoveAuthHeader<paths[Path]>;
875
- }>;
876
-
877
898
  declare interface operations {
878
899
  exchangeExternalToken: {
879
900
  parameters: {
@@ -929,9 +950,7 @@ declare interface operations {
929
950
  };
930
951
  getApiInformation: {
931
952
  parameters: {
932
- query: {
933
- apiKey: string;
934
- };
953
+ query?: never;
935
954
  header?: never;
936
955
  path?: never;
937
956
  cookie?: never;
@@ -1229,8 +1248,8 @@ declare interface operations {
1229
1248
  retrieveFlow: {
1230
1249
  parameters: {
1231
1250
  query?: never;
1232
- header: {
1233
- "sp-access-token": string;
1251
+ header?: {
1252
+ "sp-access-token"?: string;
1234
1253
  };
1235
1254
  path: {
1236
1255
  flowId: string;
@@ -1284,8 +1303,8 @@ declare interface operations {
1284
1303
  query?: {
1285
1304
  limit?: number;
1286
1305
  };
1287
- header: {
1288
- "sp-access-token": string;
1306
+ header?: {
1307
+ "sp-access-token"?: string;
1289
1308
  };
1290
1309
  path?: never;
1291
1310
  cookie?: never;
@@ -1324,8 +1343,8 @@ declare interface operations {
1324
1343
  retrieveFlowDataReports: {
1325
1344
  parameters: {
1326
1345
  query?: never;
1327
- header: {
1328
- "sp-access-token": string;
1346
+ header?: {
1347
+ "sp-access-token"?: string;
1329
1348
  };
1330
1349
  path: {
1331
1350
  flowId: string;
@@ -1371,7 +1390,6 @@ declare interface operations {
1371
1390
  } & {
1372
1391
  [key: string]: unknown;
1373
1392
  };
1374
- bookmarked: boolean;
1375
1393
  status: string | null;
1376
1394
  is_removed: boolean;
1377
1395
  is_materialized: boolean | null;
@@ -1409,8 +1427,8 @@ declare interface operations {
1409
1427
  getDataReportFeedback: {
1410
1428
  parameters: {
1411
1429
  query?: never;
1412
- header: {
1413
- "sp-access-token": string;
1430
+ header?: {
1431
+ "sp-access-token"?: string;
1414
1432
  };
1415
1433
  path: {
1416
1434
  report_id: string;
@@ -1461,8 +1479,8 @@ declare interface operations {
1461
1479
  upsertReportFeedback: {
1462
1480
  parameters: {
1463
1481
  query?: never;
1464
- header: {
1465
- "sp-access-token": string;
1482
+ header?: {
1483
+ "sp-access-token"?: string;
1466
1484
  };
1467
1485
  path: {
1468
1486
  report_id: string;
@@ -1502,8 +1520,8 @@ declare interface operations {
1502
1520
  deleteReportFeedback: {
1503
1521
  parameters: {
1504
1522
  query?: never;
1505
- header: {
1506
- "sp-access-token": string;
1523
+ header?: {
1524
+ "sp-access-token"?: string;
1507
1525
  };
1508
1526
  path: {
1509
1527
  report_id: string;
@@ -1543,59 +1561,11 @@ declare interface operations {
1543
1561
  };
1544
1562
  };
1545
1563
  };
1546
- retrieveLatestDataReportStatus: {
1547
- parameters: {
1548
- query?: never;
1549
- header: {
1550
- "sp-access-token": string;
1551
- };
1552
- path: {
1553
- flowId: string;
1554
- };
1555
- cookie?: never;
1556
- };
1557
- requestBody?: never;
1558
- responses: {
1559
- /** @description The status of the latest flow data for a given flow */
1560
- 200: {
1561
- headers: {
1562
- [name: string]: unknown;
1563
- };
1564
- content: {
1565
- "application/json": {
1566
- status: string | null;
1567
- };
1568
- };
1569
- };
1570
- /** @description Unable to retrieve status for latest flow data of flow with this id */
1571
- 404: {
1572
- headers: {
1573
- [name: string]: unknown;
1574
- };
1575
- content: {
1576
- "application/json": {
1577
- error: string;
1578
- };
1579
- };
1580
- };
1581
- /** @description Something wrong happened */
1582
- 500: {
1583
- headers: {
1584
- [name: string]: unknown;
1585
- };
1586
- content: {
1587
- "application/json": {
1588
- error: string;
1589
- };
1590
- };
1591
- };
1592
- };
1593
- };
1594
1564
  getDataReportExplainability: {
1595
1565
  parameters: {
1596
1566
  query?: never;
1597
- header: {
1598
- "sp-access-token": string;
1567
+ header?: {
1568
+ "sp-access-token"?: string;
1599
1569
  };
1600
1570
  path: {
1601
1571
  report_id: string;
@@ -1682,8 +1652,8 @@ declare interface operations {
1682
1652
  getColumnLineage: {
1683
1653
  parameters: {
1684
1654
  query?: never;
1685
- header: {
1686
- "sp-access-token": string;
1655
+ header?: {
1656
+ "sp-access-token"?: string;
1687
1657
  };
1688
1658
  path?: never;
1689
1659
  cookie?: never;
@@ -1758,73 +1728,11 @@ declare interface operations {
1758
1728
  };
1759
1729
  };
1760
1730
  };
1761
- toggleBookmark: {
1762
- parameters: {
1763
- query?: never;
1764
- header: {
1765
- "sp-access-token": string;
1766
- };
1767
- path?: never;
1768
- cookie?: never;
1769
- };
1770
- /** @description Toggle bookmark for timeline item */
1771
- requestBody: {
1772
- content: {
1773
- "application/json": {
1774
- /** @enum {string} */
1775
- type: "dataReport";
1776
- flowDataId: number;
1777
- bookmarked: boolean;
1778
- } | {
1779
- /** @enum {string} */
1780
- type: "visualization";
1781
- flowDataVisualizationId: number;
1782
- bookmarked: boolean;
1783
- };
1784
- };
1785
- };
1786
- responses: {
1787
- /** @description Successfully toggled bookmark */
1788
- 200: {
1789
- headers: {
1790
- [name: string]: unknown;
1791
- };
1792
- content: {
1793
- "application/json": {
1794
- success: boolean;
1795
- bookmarked: boolean;
1796
- };
1797
- };
1798
- };
1799
- /** @description Timeline item not found */
1800
- 404: {
1801
- headers: {
1802
- [name: string]: unknown;
1803
- };
1804
- content: {
1805
- "application/json": {
1806
- error: string;
1807
- };
1808
- };
1809
- };
1810
- /** @description Something wrong happened */
1811
- 500: {
1812
- headers: {
1813
- [name: string]: unknown;
1814
- };
1815
- content: {
1816
- "application/json": {
1817
- error: string;
1818
- };
1819
- };
1820
- };
1821
- };
1822
- };
1823
1731
  retrieveLatestDataRefresh: {
1824
1732
  parameters: {
1825
1733
  query?: never;
1826
- header: {
1827
- "sp-access-token": string;
1734
+ header?: {
1735
+ "sp-access-token"?: string;
1828
1736
  };
1829
1737
  path?: never;
1830
1738
  cookie?: never;
@@ -1869,8 +1777,8 @@ declare interface operations {
1869
1777
  exportReportData: {
1870
1778
  parameters: {
1871
1779
  query?: never;
1872
- header: {
1873
- "sp-access-token": string;
1780
+ header?: {
1781
+ "sp-access-token"?: string;
1874
1782
  };
1875
1783
  path: {
1876
1784
  report_id: string;
@@ -1915,8 +1823,8 @@ declare interface operations {
1915
1823
  getDataReportColumns: {
1916
1824
  parameters: {
1917
1825
  query?: never;
1918
- header: {
1919
- "sp-access-token": string;
1826
+ header?: {
1827
+ "sp-access-token"?: string;
1920
1828
  };
1921
1829
  path: {
1922
1830
  report_id: string;
@@ -1970,8 +1878,8 @@ declare interface operations {
1970
1878
  /** @example status:eq:active,name:contains:John%20Doe */
1971
1879
  filter?: string;
1972
1880
  };
1973
- header: {
1974
- "sp-access-token": string;
1881
+ header?: {
1882
+ "sp-access-token"?: string;
1975
1883
  };
1976
1884
  path: {
1977
1885
  report_id: string;
@@ -2016,8 +1924,8 @@ declare interface operations {
2016
1924
  getDataReportRowCount: {
2017
1925
  parameters: {
2018
1926
  query?: never;
2019
- header: {
2020
- "sp-access-token": string;
1927
+ header?: {
1928
+ "sp-access-token"?: string;
2021
1929
  };
2022
1930
  path: {
2023
1931
  report_id: string;
@@ -2065,8 +1973,8 @@ declare interface operations {
2065
1973
  getDataReport: {
2066
1974
  parameters: {
2067
1975
  query?: never;
2068
- header: {
2069
- "sp-access-token": string;
1976
+ header?: {
1977
+ "sp-access-token"?: string;
2070
1978
  };
2071
1979
  path: {
2072
1980
  report_id: string;
@@ -2112,7 +2020,6 @@ declare interface operations {
2112
2020
  } & {
2113
2021
  [key: string]: unknown;
2114
2022
  };
2115
- bookmarked: boolean;
2116
2023
  status: string | null;
2117
2024
  is_removed: boolean;
2118
2025
  is_materialized: boolean | null;
@@ -2150,8 +2057,8 @@ declare interface operations {
2150
2057
  createFlow: {
2151
2058
  parameters: {
2152
2059
  query?: never;
2153
- header: {
2154
- "sp-access-token": string;
2060
+ header?: {
2061
+ "sp-access-token"?: string;
2155
2062
  };
2156
2063
  path?: never;
2157
2064
  cookie?: never;
@@ -2205,8 +2112,8 @@ declare interface operations {
2205
2112
  refreshMaterializedViews: {
2206
2113
  parameters: {
2207
2114
  query?: never;
2208
- header: {
2209
- "sp-access-token": string;
2115
+ header?: {
2116
+ "sp-access-token"?: string;
2210
2117
  };
2211
2118
  path?: never;
2212
2119
  cookie?: never;
@@ -2263,8 +2170,8 @@ declare interface operations {
2263
2170
  /** @description Comma-separated list of flow_data IDs */
2264
2171
  ids: string;
2265
2172
  };
2266
- header: {
2267
- "sp-access-token": string;
2173
+ header?: {
2174
+ "sp-access-token"?: string;
2268
2175
  };
2269
2176
  path?: never;
2270
2177
  cookie?: never;
@@ -2303,8 +2210,8 @@ declare interface operations {
2303
2210
  query?: {
2304
2211
  input?: string;
2305
2212
  };
2306
- header: {
2307
- "sp-access-token": string;
2213
+ header?: {
2214
+ "sp-access-token"?: string;
2308
2215
  };
2309
2216
  path?: never;
2310
2217
  cookie?: never;
@@ -2338,8 +2245,8 @@ declare interface operations {
2338
2245
  retrieveChatMessages: {
2339
2246
  parameters: {
2340
2247
  query?: never;
2341
- header: {
2342
- "sp-access-token": string;
2248
+ header?: {
2249
+ "sp-access-token"?: string;
2343
2250
  };
2344
2251
  path: {
2345
2252
  flowId: string;
@@ -2388,8 +2295,8 @@ declare interface operations {
2388
2295
  createSpeechToken: {
2389
2296
  parameters: {
2390
2297
  query?: never;
2391
- header: {
2392
- "sp-access-token": string;
2298
+ header?: {
2299
+ "sp-access-token"?: string;
2393
2300
  };
2394
2301
  path?: never;
2395
2302
  cookie?: never;
@@ -2431,8 +2338,8 @@ declare interface operations {
2431
2338
  query?: {
2432
2339
  count?: number;
2433
2340
  };
2434
- header: {
2435
- "sp-access-token": string;
2341
+ header?: {
2342
+ "sp-access-token"?: string;
2436
2343
  };
2437
2344
  path?: never;
2438
2345
  cookie?: never;
@@ -2466,8 +2373,8 @@ declare interface operations {
2466
2373
  fetchVisualization: {
2467
2374
  parameters: {
2468
2375
  query?: never;
2469
- header: {
2470
- "sp-access-token": string;
2376
+ header?: {
2377
+ "sp-access-token"?: string;
2471
2378
  };
2472
2379
  path: {
2473
2380
  visualization_id: string;
@@ -2525,8 +2432,8 @@ declare interface operations {
2525
2432
  query?: {
2526
2433
  flowDataId?: string;
2527
2434
  };
2528
- header: {
2529
- "sp-access-token": string;
2435
+ header?: {
2436
+ "sp-access-token"?: string;
2530
2437
  };
2531
2438
  path: {
2532
2439
  flowId: string;
@@ -2545,7 +2452,6 @@ declare interface operations {
2545
2452
  id: number;
2546
2453
  flow_data_id: number;
2547
2454
  created_at: string;
2548
- bookmarked: boolean;
2549
2455
  flow_data?: {
2550
2456
  is_materialized: boolean | null;
2551
2457
  last_materialized_at: string | null;
@@ -2644,8 +2550,8 @@ declare interface operations {
2644
2550
  triggerFlow: {
2645
2551
  parameters: {
2646
2552
  query?: never;
2647
- header: {
2648
- "sp-access-token": string;
2553
+ header?: {
2554
+ "sp-access-token"?: string;
2649
2555
  };
2650
2556
  path?: never;
2651
2557
  cookie?: never;
@@ -2714,8 +2620,8 @@ declare interface operations {
2714
2620
  retrieveCanvas: {
2715
2621
  parameters: {
2716
2622
  query?: never;
2717
- header: {
2718
- "sp-access-token": string;
2623
+ header?: {
2624
+ "sp-access-token"?: string;
2719
2625
  };
2720
2626
  path: {
2721
2627
  canvas_id: components["schemas"]["CanvasId"];
@@ -2767,8 +2673,8 @@ declare interface operations {
2767
2673
  updateCanvas: {
2768
2674
  parameters: {
2769
2675
  query?: never;
2770
- header: {
2771
- "sp-access-token": string;
2676
+ header?: {
2677
+ "sp-access-token"?: string;
2772
2678
  };
2773
2679
  path: {
2774
2680
  canvas_id: components["schemas"]["CanvasId"];
@@ -2825,8 +2731,8 @@ declare interface operations {
2825
2731
  deleteCanvas: {
2826
2732
  parameters: {
2827
2733
  query?: never;
2828
- header: {
2829
- "sp-access-token": string;
2734
+ header?: {
2735
+ "sp-access-token"?: string;
2830
2736
  };
2831
2737
  path: {
2832
2738
  canvas_id: components["schemas"]["CanvasId"];
@@ -2869,8 +2775,8 @@ declare interface operations {
2869
2775
  createCanvas: {
2870
2776
  parameters: {
2871
2777
  query?: never;
2872
- header: {
2873
- "sp-access-token": string;
2778
+ header?: {
2779
+ "sp-access-token"?: string;
2874
2780
  };
2875
2781
  path?: never;
2876
2782
  cookie?: never;
@@ -2927,8 +2833,8 @@ declare interface operations {
2927
2833
  query?: {
2928
2834
  search?: string;
2929
2835
  };
2930
- header: {
2931
- "sp-access-token": string;
2836
+ header?: {
2837
+ "sp-access-token"?: string;
2932
2838
  };
2933
2839
  path?: never;
2934
2840
  cookie?: never;
@@ -2975,8 +2881,8 @@ declare interface operations {
2975
2881
  getCanvasForFlow: {
2976
2882
  parameters: {
2977
2883
  query?: never;
2978
- header: {
2979
- "sp-access-token": string;
2884
+ header?: {
2885
+ "sp-access-token"?: string;
2980
2886
  };
2981
2887
  path: {
2982
2888
  flow_id: string;
@@ -3032,8 +2938,8 @@ declare interface operations {
3032
2938
  agent_id?: string;
3033
2939
  limit?: number;
3034
2940
  };
3035
- header: {
3036
- "sp-access-token": string;
2941
+ header?: {
2942
+ "sp-access-token"?: string;
3037
2943
  };
3038
2944
  path?: never;
3039
2945
  cookie?: never;
@@ -3065,8 +2971,8 @@ declare interface operations {
3065
2971
  startAgentRun: {
3066
2972
  parameters: {
3067
2973
  query?: never;
3068
- header: {
3069
- "sp-access-token": string;
2974
+ header?: {
2975
+ "sp-access-token"?: string;
3070
2976
  };
3071
2977
  path?: never;
3072
2978
  cookie?: never;
@@ -3124,8 +3030,8 @@ declare interface operations {
3124
3030
  getAgentRun: {
3125
3031
  parameters: {
3126
3032
  query?: never;
3127
- header: {
3128
- "sp-access-token": string;
3033
+ header?: {
3034
+ "sp-access-token"?: string;
3129
3035
  };
3130
3036
  path: {
3131
3037
  id: string;
@@ -3167,34 +3073,27 @@ declare interface operations {
3167
3073
  };
3168
3074
  };
3169
3075
  };
3170
- createQueryExample: {
3076
+ listAgents: {
3171
3077
  parameters: {
3172
3078
  query?: never;
3173
- header?: never;
3079
+ header?: {
3080
+ "sp-access-token"?: string;
3081
+ };
3174
3082
  path?: never;
3175
3083
  cookie?: never;
3176
3084
  };
3177
- requestBody?: {
3178
- content: {
3179
- "application/json": {
3180
- request: string;
3181
- sql: string;
3182
- };
3183
- };
3184
- };
3085
+ requestBody?: never;
3185
3086
  responses: {
3186
- /** @description Query example created successfully */
3087
+ /** @description List of agents for the company */
3187
3088
  200: {
3188
3089
  headers: {
3189
3090
  [name: string]: unknown;
3190
3091
  };
3191
3092
  content: {
3192
- "application/json": {
3193
- id: number;
3194
- };
3093
+ "application/json": components["schemas"]["Agent"][];
3195
3094
  };
3196
3095
  };
3197
- /** @description Something wrong happened */
3096
+ /** @description Internal server error */
3198
3097
  500: {
3199
3098
  headers: {
3200
3099
  [name: string]: unknown;
@@ -3207,93 +3106,76 @@ declare interface operations {
3207
3106
  };
3208
3107
  };
3209
3108
  };
3210
- updateQueryExample: {
3109
+ createAgent: {
3211
3110
  parameters: {
3212
3111
  query?: never;
3213
- header?: never;
3214
- path: {
3215
- id: string;
3216
- };
3217
- cookie?: never;
3218
- };
3219
- requestBody?: {
3220
- content: {
3221
- "application/json": {
3222
- request?: string;
3223
- sql?: string;
3224
- is_active?: boolean;
3225
- is_removed?: boolean;
3226
- };
3227
- };
3228
- };
3229
- responses: {
3230
- /** @description Query example updated successfully */
3231
- 200: {
3232
- headers: {
3233
- [name: string]: unknown;
3234
- };
3235
- content: {
3236
- "application/json": {
3237
- id: number;
3238
- };
3239
- };
3240
- };
3241
- /** @description Something wrong happened */
3242
- 500: {
3243
- headers: {
3244
- [name: string]: unknown;
3245
- };
3246
- content: {
3247
- "application/json": {
3248
- error: string;
3249
- };
3250
- };
3112
+ header?: {
3113
+ "sp-access-token"?: string;
3251
3114
  };
3252
- };
3253
- };
3254
- sqlPreview: {
3255
- parameters: {
3256
- query?: never;
3257
- header?: never;
3258
3115
  path?: never;
3259
3116
  cookie?: never;
3260
3117
  };
3261
- requestBody?: {
3118
+ requestBody: {
3262
3119
  content: {
3263
3120
  "application/json": {
3264
- sql: string;
3121
+ name: string;
3122
+ objective?: string;
3123
+ generated_objective_fragment?: string;
3124
+ /** @default [] */
3125
+ active_tools?: string[];
3126
+ input_schema?: ({
3127
+ id: string;
3128
+ name: string;
3129
+ description?: string;
3130
+ /** @enum {string} */
3131
+ type: "enum";
3132
+ options: {
3133
+ value: string;
3134
+ fragment?: string;
3135
+ }[];
3136
+ /** @default false */
3137
+ useFragmentMapping?: boolean;
3138
+ /** @default false */
3139
+ required?: boolean;
3140
+ } | {
3141
+ id: string;
3142
+ name: string;
3143
+ description?: string;
3144
+ /** @enum {string} */
3145
+ type: "text";
3146
+ /**
3147
+ * @default false
3148
+ * @enum {boolean}
3149
+ */
3150
+ useFragmentMapping?: false;
3151
+ /** @default false */
3152
+ required?: boolean;
3153
+ })[];
3154
+ output_schema: {
3155
+ [key: string]: unknown;
3156
+ };
3157
+ task_plan?: {
3158
+ id: string;
3159
+ title: string;
3160
+ /** @description Detailed steps or description of what the task will do */
3161
+ description?: string;
3162
+ }[];
3163
+ master_prompt_name?: string;
3164
+ master_prompt_version?: number;
3265
3165
  };
3266
3166
  };
3267
3167
  };
3268
3168
  responses: {
3269
- /** @description SQL query executed successfully */
3169
+ /** @description The created agent */
3270
3170
  200: {
3271
3171
  headers: {
3272
3172
  [name: string]: unknown;
3273
3173
  };
3274
3174
  content: {
3275
- "application/json": {
3276
- columns: {
3277
- id: string;
3278
- accessorKey: string;
3279
- header: string;
3280
- cell?: unknown;
3281
- meta?: {
3282
- [key: string]: unknown;
3283
- };
3284
- }[];
3285
- data: {
3286
- [key: string]: unknown;
3287
- }[];
3288
- metadata?: {
3289
- wasSampled: boolean;
3290
- originalCount: number;
3291
- sampledCount: number;
3292
- };
3293
- };
3175
+ "application/json": components["schemas"]["Agent"];
3294
3176
  };
3295
3177
  };
3296
- /** @description Invalid SQL query or request */
3178
+ /** @description Invalid request */
3297
3179
  400: {
3298
3180
  headers: {
3299
3181
  [name: string]: unknown;
@@ -3317,56 +3199,29 @@ declare interface operations {
3317
3199
  };
3318
3200
  };
3319
3201
  };
3320
- tablePreview: {
3202
+ getAgent: {
3321
3203
  parameters: {
3322
3204
  query?: never;
3323
- header?: never;
3205
+ header?: {
3206
+ "sp-access-token"?: string;
3207
+ };
3324
3208
  path: {
3325
- tableId: string;
3209
+ id: string;
3326
3210
  };
3327
3211
  cookie?: never;
3328
3212
  };
3329
3213
  requestBody?: never;
3330
3214
  responses: {
3331
- /** @description Table preview executed successfully */
3215
+ /** @description The agent */
3332
3216
  200: {
3333
3217
  headers: {
3334
3218
  [name: string]: unknown;
3335
3219
  };
3336
3220
  content: {
3337
- "application/json": {
3338
- columns: {
3339
- id: string;
3340
- accessorKey: string;
3341
- header: string;
3342
- cell?: unknown;
3343
- meta?: {
3344
- [key: string]: unknown;
3345
- };
3346
- }[];
3347
- data: {
3348
- [key: string]: unknown;
3349
- }[];
3350
- metadata?: {
3351
- wasSampled: boolean;
3352
- originalCount: number;
3353
- sampledCount: number;
3354
- };
3355
- };
3356
- };
3357
- };
3358
- /** @description Invalid request */
3359
- 400: {
3360
- headers: {
3361
- [name: string]: unknown;
3362
- };
3363
- content: {
3364
- "application/json": {
3365
- error: string;
3366
- };
3221
+ "application/json": components["schemas"]["Agent"];
3367
3222
  };
3368
3223
  };
3369
- /** @description Table not found */
3224
+ /** @description Agent not found */
3370
3225
  404: {
3371
3226
  headers: {
3372
3227
  [name: string]: unknown;
@@ -3390,16 +3245,828 @@ declare interface operations {
3390
3245
  };
3391
3246
  };
3392
3247
  };
3393
- listSankeyUserFilters: {
3248
+ updateAgent: {
3394
3249
  parameters: {
3395
3250
  query?: never;
3396
- header?: never;
3397
- path?: never;
3251
+ header?: {
3252
+ "sp-access-token"?: string;
3253
+ };
3254
+ path: {
3255
+ id: string;
3256
+ };
3257
+ cookie?: never;
3258
+ };
3259
+ requestBody: {
3260
+ content: {
3261
+ "application/json": {
3262
+ name?: string;
3263
+ objective?: string | null;
3264
+ generated_objective_fragment?: string | null;
3265
+ active_tools?: string[];
3266
+ input_schema?: ({
3267
+ id: string;
3268
+ name: string;
3269
+ description?: string;
3270
+ /** @enum {string} */
3271
+ type: "enum";
3272
+ options: {
3273
+ value: string;
3274
+ fragment?: string;
3275
+ }[];
3276
+ /** @default false */
3277
+ useFragmentMapping?: boolean;
3278
+ /** @default false */
3279
+ required?: boolean;
3280
+ } | {
3281
+ id: string;
3282
+ name: string;
3283
+ description?: string;
3284
+ /** @enum {string} */
3285
+ type: "text";
3286
+ /**
3287
+ * @default false
3288
+ * @enum {boolean}
3289
+ */
3290
+ useFragmentMapping?: false;
3291
+ /** @default false */
3292
+ required?: boolean;
3293
+ })[] | null;
3294
+ output_schema?: {
3295
+ [key: string]: unknown;
3296
+ } | null;
3297
+ task_plan?: {
3298
+ id: string;
3299
+ title: string;
3300
+ /** @description Detailed steps or description of what the task will do */
3301
+ description?: string;
3302
+ }[] | null;
3303
+ master_prompt_name?: string | null;
3304
+ master_prompt_version?: number | null;
3305
+ };
3306
+ };
3307
+ };
3308
+ responses: {
3309
+ /** @description The updated agent */
3310
+ 200: {
3311
+ headers: {
3312
+ [name: string]: unknown;
3313
+ };
3314
+ content: {
3315
+ "application/json": components["schemas"]["Agent"];
3316
+ };
3317
+ };
3318
+ /** @description Invalid request (e.g., invalid tools) */
3319
+ 400: {
3320
+ headers: {
3321
+ [name: string]: unknown;
3322
+ };
3323
+ content: {
3324
+ "application/json": {
3325
+ error: string;
3326
+ };
3327
+ };
3328
+ };
3329
+ /** @description Agent not found */
3330
+ 404: {
3331
+ headers: {
3332
+ [name: string]: unknown;
3333
+ };
3334
+ content: {
3335
+ "application/json": {
3336
+ error: string;
3337
+ };
3338
+ };
3339
+ };
3340
+ /** @description Internal server error */
3341
+ 500: {
3342
+ headers: {
3343
+ [name: string]: unknown;
3344
+ };
3345
+ content: {
3346
+ "application/json": {
3347
+ error: string;
3348
+ };
3349
+ };
3350
+ };
3351
+ };
3352
+ };
3353
+ deleteAgent: {
3354
+ parameters: {
3355
+ query?: never;
3356
+ header?: {
3357
+ "sp-access-token"?: string;
3358
+ };
3359
+ path: {
3360
+ id: string;
3361
+ };
3362
+ cookie?: never;
3363
+ };
3364
+ requestBody?: never;
3365
+ responses: {
3366
+ /** @description Agent deleted successfully */
3367
+ 200: {
3368
+ headers: {
3369
+ [name: string]: unknown;
3370
+ };
3371
+ content: {
3372
+ "application/json": {
3373
+ /** @enum {boolean} */
3374
+ success: true;
3375
+ };
3376
+ };
3377
+ };
3378
+ /** @description Agent not found */
3379
+ 404: {
3380
+ headers: {
3381
+ [name: string]: unknown;
3382
+ };
3383
+ content: {
3384
+ "application/json": {
3385
+ error: string;
3386
+ };
3387
+ };
3388
+ };
3389
+ /** @description Internal server error */
3390
+ 500: {
3391
+ headers: {
3392
+ [name: string]: unknown;
3393
+ };
3394
+ content: {
3395
+ "application/json": {
3396
+ error: string;
3397
+ };
3398
+ };
3399
+ };
3400
+ };
3401
+ };
3402
+ listApplications: {
3403
+ parameters: {
3404
+ query?: never;
3405
+ header?: {
3406
+ "sp-access-token"?: string;
3407
+ };
3408
+ path?: never;
3409
+ cookie?: never;
3410
+ };
3411
+ requestBody?: never;
3412
+ responses: {
3413
+ /** @description All applications for the company */
3414
+ 200: {
3415
+ headers: {
3416
+ [name: string]: unknown;
3417
+ };
3418
+ content: {
3419
+ "application/json": {
3420
+ id: number;
3421
+ company_id: number;
3422
+ name: string;
3423
+ is_removed: boolean;
3424
+ created_at: string;
3425
+ }[];
3426
+ };
3427
+ };
3428
+ /** @description Internal server error */
3429
+ 500: {
3430
+ headers: {
3431
+ [name: string]: unknown;
3432
+ };
3433
+ content: {
3434
+ "application/json": {
3435
+ error: string;
3436
+ };
3437
+ };
3438
+ };
3439
+ };
3440
+ };
3441
+ createApplication: {
3442
+ parameters: {
3443
+ query?: never;
3444
+ header?: {
3445
+ "sp-access-token"?: string;
3446
+ };
3447
+ path?: never;
3448
+ cookie?: never;
3449
+ };
3450
+ requestBody: {
3451
+ content: {
3452
+ "application/json": {
3453
+ name: string;
3454
+ };
3455
+ };
3456
+ };
3457
+ responses: {
3458
+ /** @description The created application */
3459
+ 201: {
3460
+ headers: {
3461
+ [name: string]: unknown;
3462
+ };
3463
+ content: {
3464
+ "application/json": {
3465
+ id: number;
3466
+ company_id: number;
3467
+ name: string;
3468
+ is_removed: boolean;
3469
+ created_at: string;
3470
+ };
3471
+ };
3472
+ };
3473
+ /** @description Invalid request */
3474
+ 400: {
3475
+ headers: {
3476
+ [name: string]: unknown;
3477
+ };
3478
+ content: {
3479
+ "application/json": {
3480
+ error: string;
3481
+ };
3482
+ };
3483
+ };
3484
+ /** @description Application with this name already exists */
3485
+ 409: {
3486
+ headers: {
3487
+ [name: string]: unknown;
3488
+ };
3489
+ content: {
3490
+ "application/json": {
3491
+ error: string;
3492
+ };
3493
+ };
3494
+ };
3495
+ /** @description Internal server error */
3496
+ 500: {
3497
+ headers: {
3498
+ [name: string]: unknown;
3499
+ };
3500
+ content: {
3501
+ "application/json": {
3502
+ error: string;
3503
+ };
3504
+ };
3505
+ };
3506
+ };
3507
+ };
3508
+ getApplication: {
3509
+ parameters: {
3510
+ query?: never;
3511
+ header?: {
3512
+ "sp-access-token"?: string;
3513
+ };
3514
+ path: {
3515
+ id: number;
3516
+ };
3517
+ cookie?: never;
3518
+ };
3519
+ requestBody?: never;
3520
+ responses: {
3521
+ /** @description The application */
3522
+ 200: {
3523
+ headers: {
3524
+ [name: string]: unknown;
3525
+ };
3526
+ content: {
3527
+ "application/json": {
3528
+ id: number;
3529
+ company_id: number;
3530
+ name: string;
3531
+ is_removed: boolean;
3532
+ created_at: string;
3533
+ };
3534
+ };
3535
+ };
3536
+ /** @description Application not found */
3537
+ 404: {
3538
+ headers: {
3539
+ [name: string]: unknown;
3540
+ };
3541
+ content: {
3542
+ "application/json": {
3543
+ error: string;
3544
+ };
3545
+ };
3546
+ };
3547
+ /** @description Internal server error */
3548
+ 500: {
3549
+ headers: {
3550
+ [name: string]: unknown;
3551
+ };
3552
+ content: {
3553
+ "application/json": {
3554
+ error: string;
3555
+ };
3556
+ };
3557
+ };
3558
+ };
3559
+ };
3560
+ deleteApplication: {
3561
+ parameters: {
3562
+ query?: never;
3563
+ header?: {
3564
+ "sp-access-token"?: string;
3565
+ };
3566
+ path: {
3567
+ id: number;
3568
+ };
3569
+ cookie?: never;
3570
+ };
3571
+ requestBody?: never;
3572
+ responses: {
3573
+ /** @description Deletion result */
3574
+ 200: {
3575
+ headers: {
3576
+ [name: string]: unknown;
3577
+ };
3578
+ content: {
3579
+ "application/json": {
3580
+ deleted: boolean;
3581
+ };
3582
+ };
3583
+ };
3584
+ /** @description Application not found */
3585
+ 404: {
3586
+ headers: {
3587
+ [name: string]: unknown;
3588
+ };
3589
+ content: {
3590
+ "application/json": {
3591
+ error: string;
3592
+ };
3593
+ };
3594
+ };
3595
+ /** @description Internal server error */
3596
+ 500: {
3597
+ headers: {
3598
+ [name: string]: unknown;
3599
+ };
3600
+ content: {
3601
+ "application/json": {
3602
+ error: string;
3603
+ };
3604
+ };
3605
+ };
3606
+ };
3607
+ };
3608
+ updateApplication: {
3609
+ parameters: {
3610
+ query?: never;
3611
+ header?: {
3612
+ "sp-access-token"?: string;
3613
+ };
3614
+ path: {
3615
+ id: number;
3616
+ };
3617
+ cookie?: never;
3618
+ };
3619
+ requestBody: {
3620
+ content: {
3621
+ "application/json": {
3622
+ name?: string;
3623
+ };
3624
+ };
3625
+ };
3626
+ responses: {
3627
+ /** @description Updated application */
3628
+ 200: {
3629
+ headers: {
3630
+ [name: string]: unknown;
3631
+ };
3632
+ content: {
3633
+ "application/json": {
3634
+ id: number;
3635
+ company_id: number;
3636
+ name: string;
3637
+ is_removed: boolean;
3638
+ created_at: string;
3639
+ };
3640
+ };
3641
+ };
3642
+ /** @description Invalid request */
3643
+ 400: {
3644
+ headers: {
3645
+ [name: string]: unknown;
3646
+ };
3647
+ content: {
3648
+ "application/json": {
3649
+ error: string;
3650
+ };
3651
+ };
3652
+ };
3653
+ /** @description Application not found */
3654
+ 404: {
3655
+ headers: {
3656
+ [name: string]: unknown;
3657
+ };
3658
+ content: {
3659
+ "application/json": {
3660
+ error: string;
3661
+ };
3662
+ };
3663
+ };
3664
+ /** @description Application with this name already exists */
3665
+ 409: {
3666
+ headers: {
3667
+ [name: string]: unknown;
3668
+ };
3669
+ content: {
3670
+ "application/json": {
3671
+ error: string;
3672
+ };
3673
+ };
3674
+ };
3675
+ /** @description Internal server error */
3676
+ 500: {
3677
+ headers: {
3678
+ [name: string]: unknown;
3679
+ };
3680
+ content: {
3681
+ "application/json": {
3682
+ error: string;
3683
+ };
3684
+ };
3685
+ };
3686
+ };
3687
+ };
3688
+ listDataTables: {
3689
+ parameters: {
3690
+ query?: never;
3691
+ header?: {
3692
+ "sp-access-token"?: string;
3693
+ };
3694
+ path?: never;
3695
+ cookie?: never;
3696
+ };
3697
+ requestBody?: never;
3698
+ responses: {
3699
+ /** @description All data tables for the company */
3700
+ 200: {
3701
+ headers: {
3702
+ [name: string]: unknown;
3703
+ };
3704
+ content: {
3705
+ "application/json": {
3706
+ id: number;
3707
+ source_id: number;
3708
+ dataset: string;
3709
+ table_name: string;
3710
+ description: string | null;
3711
+ is_visible: boolean;
3712
+ tags: string[];
3713
+ row_count: number | null;
3714
+ created_at: string;
3715
+ updated_at: string;
3716
+ }[];
3717
+ };
3718
+ };
3719
+ /** @description Internal server error */
3720
+ 500: {
3721
+ headers: {
3722
+ [name: string]: unknown;
3723
+ };
3724
+ content: {
3725
+ "application/json": {
3726
+ error: string;
3727
+ };
3728
+ };
3729
+ };
3730
+ };
3731
+ };
3732
+ createDataTable: {
3733
+ parameters: {
3734
+ query?: never;
3735
+ header?: {
3736
+ "sp-access-token"?: string;
3737
+ };
3738
+ path?: never;
3739
+ cookie?: never;
3740
+ };
3741
+ requestBody: {
3742
+ content: {
3743
+ "application/json": {
3744
+ dataset: string;
3745
+ table_name: string;
3746
+ };
3747
+ };
3748
+ };
3749
+ responses: {
3750
+ /** @description The registered data table */
3751
+ 201: {
3752
+ headers: {
3753
+ [name: string]: unknown;
3754
+ };
3755
+ content: {
3756
+ "application/json": {
3757
+ id: number;
3758
+ source_id: number;
3759
+ dataset: string;
3760
+ table_name: string;
3761
+ description: string | null;
3762
+ is_visible: boolean;
3763
+ tags: string[];
3764
+ row_count: number | null;
3765
+ created_at: string;
3766
+ updated_at: string;
3767
+ };
3768
+ };
3769
+ };
3770
+ /** @description Invalid request */
3771
+ 400: {
3772
+ headers: {
3773
+ [name: string]: unknown;
3774
+ };
3775
+ content: {
3776
+ "application/json": {
3777
+ error: string;
3778
+ };
3779
+ };
3780
+ };
3781
+ /** @description No source connector found for company */
3782
+ 404: {
3783
+ headers: {
3784
+ [name: string]: unknown;
3785
+ };
3786
+ content: {
3787
+ "application/json": {
3788
+ error: string;
3789
+ };
3790
+ };
3791
+ };
3792
+ /** @description Data table with this dataset and table_name already exists */
3793
+ 409: {
3794
+ headers: {
3795
+ [name: string]: unknown;
3796
+ };
3797
+ content: {
3798
+ "application/json": {
3799
+ error: string;
3800
+ };
3801
+ };
3802
+ };
3803
+ /** @description Internal server error */
3804
+ 500: {
3805
+ headers: {
3806
+ [name: string]: unknown;
3807
+ };
3808
+ content: {
3809
+ "application/json": {
3810
+ error: string;
3811
+ };
3812
+ };
3813
+ };
3814
+ };
3815
+ };
3816
+ getDataTable: {
3817
+ parameters: {
3818
+ query?: never;
3819
+ header?: {
3820
+ "sp-access-token"?: string;
3821
+ };
3822
+ path: {
3823
+ id: number;
3824
+ };
3825
+ cookie?: never;
3826
+ };
3827
+ requestBody?: never;
3828
+ responses: {
3829
+ /** @description The data table */
3830
+ 200: {
3831
+ headers: {
3832
+ [name: string]: unknown;
3833
+ };
3834
+ content: {
3835
+ "application/json": {
3836
+ id: number;
3837
+ source_id: number;
3838
+ dataset: string;
3839
+ table_name: string;
3840
+ description: string | null;
3841
+ is_visible: boolean;
3842
+ tags: string[];
3843
+ row_count: number | null;
3844
+ created_at: string;
3845
+ updated_at: string;
3846
+ };
3847
+ };
3848
+ };
3849
+ /** @description Data table not found */
3850
+ 404: {
3851
+ headers: {
3852
+ [name: string]: unknown;
3853
+ };
3854
+ content: {
3855
+ "application/json": {
3856
+ error: string;
3857
+ };
3858
+ };
3859
+ };
3860
+ /** @description Internal server error */
3861
+ 500: {
3862
+ headers: {
3863
+ [name: string]: unknown;
3864
+ };
3865
+ content: {
3866
+ "application/json": {
3867
+ error: string;
3868
+ };
3869
+ };
3870
+ };
3871
+ };
3872
+ };
3873
+ deleteDataTable: {
3874
+ parameters: {
3875
+ query?: never;
3876
+ header?: {
3877
+ "sp-access-token"?: string;
3878
+ };
3879
+ path: {
3880
+ id: number;
3881
+ };
3882
+ cookie?: never;
3883
+ };
3884
+ requestBody?: never;
3885
+ responses: {
3886
+ /** @description Deletion result */
3887
+ 200: {
3888
+ headers: {
3889
+ [name: string]: unknown;
3890
+ };
3891
+ content: {
3892
+ "application/json": {
3893
+ deleted: boolean;
3894
+ };
3895
+ };
3896
+ };
3897
+ /** @description Data table not found */
3898
+ 404: {
3899
+ headers: {
3900
+ [name: string]: unknown;
3901
+ };
3902
+ content: {
3903
+ "application/json": {
3904
+ error: string;
3905
+ };
3906
+ };
3907
+ };
3908
+ /** @description Internal server error */
3909
+ 500: {
3910
+ headers: {
3911
+ [name: string]: unknown;
3912
+ };
3913
+ content: {
3914
+ "application/json": {
3915
+ error: string;
3916
+ };
3917
+ };
3918
+ };
3919
+ };
3920
+ };
3921
+ updateDataTable: {
3922
+ parameters: {
3923
+ query?: never;
3924
+ header?: {
3925
+ "sp-access-token"?: string;
3926
+ };
3927
+ path: {
3928
+ id: number;
3929
+ };
3930
+ cookie?: never;
3931
+ };
3932
+ requestBody: {
3933
+ content: {
3934
+ "application/json": {
3935
+ description?: string;
3936
+ is_visible?: boolean;
3937
+ tags?: string[];
3938
+ };
3939
+ };
3940
+ };
3941
+ responses: {
3942
+ /** @description Updated data table */
3943
+ 200: {
3944
+ headers: {
3945
+ [name: string]: unknown;
3946
+ };
3947
+ content: {
3948
+ "application/json": {
3949
+ id: number;
3950
+ source_id: number;
3951
+ dataset: string;
3952
+ table_name: string;
3953
+ description: string | null;
3954
+ is_visible: boolean;
3955
+ tags: string[];
3956
+ row_count: number | null;
3957
+ created_at: string;
3958
+ updated_at: string;
3959
+ };
3960
+ };
3961
+ };
3962
+ /** @description Invalid request */
3963
+ 400: {
3964
+ headers: {
3965
+ [name: string]: unknown;
3966
+ };
3967
+ content: {
3968
+ "application/json": {
3969
+ error: string;
3970
+ };
3971
+ };
3972
+ };
3973
+ /** @description Data table not found */
3974
+ 404: {
3975
+ headers: {
3976
+ [name: string]: unknown;
3977
+ };
3978
+ content: {
3979
+ "application/json": {
3980
+ error: string;
3981
+ };
3982
+ };
3983
+ };
3984
+ /** @description Internal server error */
3985
+ 500: {
3986
+ headers: {
3987
+ [name: string]: unknown;
3988
+ };
3989
+ content: {
3990
+ "application/json": {
3991
+ error: string;
3992
+ };
3993
+ };
3994
+ };
3995
+ };
3996
+ };
3997
+ listDataTableColumns: {
3998
+ parameters: {
3999
+ query: {
4000
+ table_id: number;
4001
+ };
4002
+ header?: {
4003
+ "sp-access-token"?: string;
4004
+ };
4005
+ path?: never;
4006
+ cookie?: never;
4007
+ };
4008
+ requestBody?: never;
4009
+ responses: {
4010
+ /** @description Data table columns for the given table */
4011
+ 200: {
4012
+ headers: {
4013
+ [name: string]: unknown;
4014
+ };
4015
+ content: {
4016
+ "application/json": {
4017
+ id: number;
4018
+ table_id: number;
4019
+ name: string;
4020
+ data_type: string | null;
4021
+ description: string | null;
4022
+ is_visible: boolean;
4023
+ is_indexed: boolean;
4024
+ is_indexable: boolean;
4025
+ is_primary: boolean;
4026
+ is_system: boolean;
4027
+ created_at: string;
4028
+ updated_at: string;
4029
+ }[];
4030
+ };
4031
+ };
4032
+ /** @description Table not found */
4033
+ 404: {
4034
+ headers: {
4035
+ [name: string]: unknown;
4036
+ };
4037
+ content: {
4038
+ "application/json": {
4039
+ error: string;
4040
+ };
4041
+ };
4042
+ };
4043
+ /** @description Internal server error */
4044
+ 500: {
4045
+ headers: {
4046
+ [name: string]: unknown;
4047
+ };
4048
+ content: {
4049
+ "application/json": {
4050
+ error: string;
4051
+ };
4052
+ };
4053
+ };
4054
+ };
4055
+ };
4056
+ getDataTableColumn: {
4057
+ parameters: {
4058
+ query?: never;
4059
+ header?: {
4060
+ "sp-access-token"?: string;
4061
+ };
4062
+ path: {
4063
+ id: number;
4064
+ };
3398
4065
  cookie?: never;
3399
4066
  };
3400
4067
  requestBody?: never;
3401
4068
  responses: {
3402
- /** @description List of available user filters */
4069
+ /** @description The data table column */
3403
4070
  200: {
3404
4071
  headers: {
3405
4072
  [name: string]: unknown;
@@ -3407,20 +4074,32 @@ declare interface operations {
3407
4074
  content: {
3408
4075
  "application/json": {
3409
4076
  id: number;
3410
- field_key: string;
3411
- display_name: string;
3412
- /** @default true */
3413
- is_active: boolean;
3414
- /** @default false */
3415
- include_visualization: boolean;
3416
- values: (string | {
3417
- label: string;
3418
- value: string;
3419
- })[];
3420
- }[];
4077
+ table_id: number;
4078
+ name: string;
4079
+ data_type: string | null;
4080
+ description: string | null;
4081
+ is_visible: boolean;
4082
+ is_indexed: boolean;
4083
+ is_indexable: boolean;
4084
+ is_primary: boolean;
4085
+ is_system: boolean;
4086
+ created_at: string;
4087
+ updated_at: string;
4088
+ };
3421
4089
  };
3422
4090
  };
3423
- /** @description Something wrong happened */
4091
+ /** @description Column not found */
4092
+ 404: {
4093
+ headers: {
4094
+ [name: string]: unknown;
4095
+ };
4096
+ content: {
4097
+ "application/json": {
4098
+ error: string;
4099
+ };
4100
+ };
4101
+ };
4102
+ /** @description Internal server error */
3424
4103
  500: {
3425
4104
  headers: {
3426
4105
  [name: string]: unknown;
@@ -3433,83 +4112,71 @@ declare interface operations {
3433
4112
  };
3434
4113
  };
3435
4114
  };
3436
- getSankeyData: {
4115
+ updateDataTableColumn: {
3437
4116
  parameters: {
3438
- query?: {
3439
- user_id?: string;
3440
- cluster_id?: number | null;
3441
- subcluster_id?: number | null;
3442
- /** @description Comma-separated list of bins: lt0.6,0.6-0.8,0.8-1 (applies to average score) */
3443
- score_ranges?: string;
3444
- /** @description JSON-encoded map of { [field_key]: string[] } to be passed to RPC */
3445
- external_filters?: string;
3446
- max_results?: number;
3447
- /** @description If true, exclude users with @magemetrics emails from results */
3448
- exclude_magemetrics_emails?: string;
4117
+ query?: never;
4118
+ header?: {
4119
+ "sp-access-token"?: string;
4120
+ };
4121
+ path: {
4122
+ id: number;
3449
4123
  };
3450
- header?: never;
3451
- path?: never;
3452
4124
  cookie?: never;
3453
4125
  };
3454
- requestBody?: never;
4126
+ requestBody: {
4127
+ content: {
4128
+ "application/json": {
4129
+ is_visible?: boolean;
4130
+ is_indexed?: boolean;
4131
+ };
4132
+ };
4133
+ };
3455
4134
  responses: {
3456
- /** @description Sankey data retrieved successfully */
4135
+ /** @description Updated data table column */
3457
4136
  200: {
3458
4137
  headers: {
3459
4138
  [name: string]: unknown;
3460
4139
  };
3461
4140
  content: {
3462
4141
  "application/json": {
3463
- metadata: {
3464
- total_clusters: number;
3465
- total_requests: number;
3466
- generation_timestamp: string;
3467
- };
3468
- clusters: {
3469
- cluster_id: number;
3470
- subcluster_id?: number | null;
3471
- cluster_name: string;
3472
- representative_questions: {
3473
- subcluster_id: number;
3474
- question: string;
3475
- count: number;
3476
- sample_requests: string[];
3477
- avg_confidence_score?: number | null;
3478
- avg_assumptions_score?: number | null;
3479
- avg_friendliness_score?: number | null;
3480
- }[];
3481
- count: number;
3482
- avg_confidence_score?: number | null;
3483
- avg_assumptions_score?: number | null;
3484
- avg_friendliness_score?: number | null;
3485
- }[];
3486
- rows?: {
3487
- flow_data_id: number;
3488
- /** Format: uuid */
3489
- flow_id: string;
3490
- company_id: number;
3491
- main_cluster_id: number;
3492
- main_cluster_name: string;
3493
- subcluster_id: number | null;
3494
- subcluster_name: string | null;
3495
- core_question: string | null;
3496
- /** Format: uuid */
3497
- user_id: string;
3498
- initial_user_request: string | null;
3499
- flow_data_request: string | null;
3500
- flow_data_created_at: string | null;
3501
- confidence_score: number | null;
3502
- assumptions_score: number | null;
3503
- friendliness_score: number | null;
3504
- user_email: string | null;
3505
- external: {
3506
- [key: string]: unknown;
3507
- } | null;
3508
- }[];
4142
+ id: number;
4143
+ table_id: number;
4144
+ name: string;
4145
+ data_type: string | null;
4146
+ description: string | null;
4147
+ is_visible: boolean;
4148
+ is_indexed: boolean;
4149
+ is_indexable: boolean;
4150
+ is_primary: boolean;
4151
+ is_system: boolean;
4152
+ created_at: string;
4153
+ updated_at: string;
3509
4154
  };
3510
4155
  };
3511
4156
  };
3512
- /** @description Something wrong happened */
4157
+ /** @description Invalid request */
4158
+ 400: {
4159
+ headers: {
4160
+ [name: string]: unknown;
4161
+ };
4162
+ content: {
4163
+ "application/json": {
4164
+ error: string;
4165
+ };
4166
+ };
4167
+ };
4168
+ /** @description Column not found */
4169
+ 404: {
4170
+ headers: {
4171
+ [name: string]: unknown;
4172
+ };
4173
+ content: {
4174
+ "application/json": {
4175
+ error: string;
4176
+ };
4177
+ };
4178
+ };
4179
+ /** @description Internal server error */
3513
4180
  500: {
3514
4181
  headers: {
3515
4182
  [name: string]: unknown;
@@ -3522,57 +4189,42 @@ declare interface operations {
3522
4189
  };
3523
4190
  };
3524
4191
  };
3525
- getCompanySettings: {
4192
+ listRlsPolicies: {
3526
4193
  parameters: {
3527
- query?: never;
3528
- header?: never;
4194
+ query?: {
4195
+ table_id?: number;
4196
+ };
4197
+ header?: {
4198
+ "sp-access-token"?: string;
4199
+ };
3529
4200
  path?: never;
3530
4201
  cookie?: never;
3531
4202
  };
3532
4203
  requestBody?: never;
3533
4204
  responses: {
3534
- /** @description Company settings retrieved successfully */
4205
+ /** @description RLS policies matching the query */
3535
4206
  200: {
3536
4207
  headers: {
3537
4208
  [name: string]: unknown;
3538
4209
  };
3539
4210
  content: {
3540
4211
  "application/json": {
3541
- name: string | null;
3542
- website: string | null;
3543
- context_profile: {
3544
- company: {
3545
- description: string;
3546
- industries: string[];
3547
- revenue_streams: string[];
3548
- customers: {
3549
- label: string;
3550
- description: string;
3551
- typical_users: {
3552
- role: string;
3553
- typical_goals: string[];
3554
- }[];
3555
- }[];
3556
- };
3557
- domain: {
3558
- overview: string;
3559
- concepts: {
3560
- name: string;
3561
- definition: string;
3562
- synonyms: string[];
3563
- }[];
3564
- };
3565
- analytics: {
3566
- examples_key_metrics: {
3567
- name: string;
3568
- why: string;
3569
- }[];
3570
- };
3571
- } | null;
3572
- };
4212
+ id: number;
4213
+ company_id: number;
4214
+ table_id: number;
4215
+ table_name: string;
4216
+ schema_name: string;
4217
+ condition: string;
4218
+ context_variables: string[];
4219
+ depends_on_tables: string[];
4220
+ is_active: boolean;
4221
+ is_removed: boolean;
4222
+ created_at: string;
4223
+ updated_at: string;
4224
+ }[];
3573
4225
  };
3574
4226
  };
3575
- /** @description Failed to retrieve company settings */
4227
+ /** @description Internal server error */
3576
4228
  500: {
3577
4229
  headers: {
3578
4230
  [name: string]: unknown;
@@ -3585,64 +4237,75 @@ declare interface operations {
3585
4237
  };
3586
4238
  };
3587
4239
  };
3588
- updateCompanySettings: {
4240
+ createRlsPolicy: {
3589
4241
  parameters: {
3590
4242
  query?: never;
3591
- header?: never;
4243
+ header?: {
4244
+ "sp-access-token"?: string;
4245
+ };
3592
4246
  path?: never;
3593
4247
  cookie?: never;
3594
4248
  };
3595
- requestBody?: {
4249
+ requestBody: {
3596
4250
  content: {
3597
4251
  "application/json": {
3598
- name: string;
3599
- website: string;
4252
+ table_id: number;
4253
+ condition: string;
4254
+ /** @default [] */
4255
+ context_variables?: string[];
4256
+ /** @default [] */
4257
+ depends_on_tables?: string[];
4258
+ /** @default true */
4259
+ is_active?: boolean;
3600
4260
  };
3601
4261
  };
3602
4262
  };
3603
4263
  responses: {
3604
- /** @description Company settings updated successfully */
3605
- 200: {
4264
+ /** @description The created RLS policy */
4265
+ 201: {
3606
4266
  headers: {
3607
4267
  [name: string]: unknown;
3608
4268
  };
3609
4269
  content: {
3610
4270
  "application/json": {
3611
- name: string | null;
3612
- website: string | null;
3613
- context_profile: {
3614
- company: {
3615
- description: string;
3616
- industries: string[];
3617
- revenue_streams: string[];
3618
- customers: {
3619
- label: string;
3620
- description: string;
3621
- typical_users: {
3622
- role: string;
3623
- typical_goals: string[];
3624
- }[];
3625
- }[];
3626
- };
3627
- domain: {
3628
- overview: string;
3629
- concepts: {
3630
- name: string;
3631
- definition: string;
3632
- synonyms: string[];
3633
- }[];
3634
- };
3635
- analytics: {
3636
- examples_key_metrics: {
3637
- name: string;
3638
- why: string;
3639
- }[];
3640
- };
3641
- } | null;
4271
+ id: number;
4272
+ company_id: number;
4273
+ table_id: number;
4274
+ table_name: string;
4275
+ schema_name: string;
4276
+ condition: string;
4277
+ context_variables: string[];
4278
+ depends_on_tables: string[];
4279
+ is_active: boolean;
4280
+ is_removed: boolean;
4281
+ created_at: string;
4282
+ updated_at: string;
4283
+ };
4284
+ };
4285
+ };
4286
+ /** @description Invalid request */
4287
+ 400: {
4288
+ headers: {
4289
+ [name: string]: unknown;
4290
+ };
4291
+ content: {
4292
+ "application/json": {
4293
+ error: string;
4294
+ };
4295
+ };
4296
+ };
4297
+ /** @description Table not found */
4298
+ 404: {
4299
+ headers: {
4300
+ [name: string]: unknown;
4301
+ };
4302
+ content: {
4303
+ "application/json": {
4304
+ error: string;
3642
4305
  };
3643
4306
  };
3644
4307
  };
3645
- /** @description Failed to update company settings */
4308
+ /** @description Internal server error */
3646
4309
  500: {
3647
4310
  headers: {
3648
4311
  [name: string]: unknown;
@@ -3655,54 +4318,43 @@ declare interface operations {
3655
4318
  };
3656
4319
  };
3657
4320
  };
3658
- runCompanyResearchAgent: {
4321
+ getRlsPolicy: {
3659
4322
  parameters: {
3660
4323
  query?: never;
3661
- header?: never;
3662
- path?: never;
4324
+ header?: {
4325
+ "sp-access-token"?: string;
4326
+ };
4327
+ path: {
4328
+ id: number;
4329
+ };
3663
4330
  cookie?: never;
3664
4331
  };
3665
4332
  requestBody?: never;
3666
4333
  responses: {
3667
- /** @description Company research agent executed successfully */
4334
+ /** @description The RLS policy */
3668
4335
  200: {
3669
4336
  headers: {
3670
4337
  [name: string]: unknown;
3671
4338
  };
3672
4339
  content: {
3673
4340
  "application/json": {
3674
- company: {
3675
- description: string;
3676
- industries: string[];
3677
- revenue_streams: string[];
3678
- customers: {
3679
- label: string;
3680
- description: string;
3681
- typical_users: {
3682
- role: string;
3683
- typical_goals: string[];
3684
- }[];
3685
- }[];
3686
- };
3687
- domain: {
3688
- overview: string;
3689
- concepts: {
3690
- name: string;
3691
- definition: string;
3692
- synonyms: string[];
3693
- }[];
3694
- };
3695
- analytics: {
3696
- examples_key_metrics: {
3697
- name: string;
3698
- why: string;
3699
- }[];
3700
- };
4341
+ id: number;
4342
+ company_id: number;
4343
+ table_id: number;
4344
+ table_name: string;
4345
+ schema_name: string;
4346
+ condition: string;
4347
+ context_variables: string[];
4348
+ depends_on_tables: string[];
4349
+ is_active: boolean;
4350
+ is_removed: boolean;
4351
+ created_at: string;
4352
+ updated_at: string;
3701
4353
  };
3702
4354
  };
3703
4355
  };
3704
- /** @description Company name or website not configured */
3705
- 400: {
4356
+ /** @description RLS policy not found */
4357
+ 404: {
3706
4358
  headers: {
3707
4359
  [name: string]: unknown;
3708
4360
  };
@@ -3712,7 +4364,7 @@ declare interface operations {
3712
4364
  };
3713
4365
  };
3714
4366
  };
3715
- /** @description Company research agent failed */
4367
+ /** @description Internal server error */
3716
4368
  500: {
3717
4369
  headers: {
3718
4370
  [name: string]: unknown;
@@ -3725,48 +4377,42 @@ declare interface operations {
3725
4377
  };
3726
4378
  };
3727
4379
  };
3728
- generateSuggestedInputs: {
4380
+ deleteRlsPolicy: {
3729
4381
  parameters: {
3730
4382
  query?: never;
3731
- header?: never;
3732
- path?: never;
3733
- cookie?: never;
3734
- };
3735
- requestBody?: {
3736
- content: {
3737
- "application/json": {
3738
- objective: string;
3739
- guidelines: string;
3740
- };
4383
+ header?: {
4384
+ "sp-access-token"?: string;
4385
+ };
4386
+ path: {
4387
+ id: number;
3741
4388
  };
4389
+ cookie?: never;
3742
4390
  };
4391
+ requestBody?: never;
3743
4392
  responses: {
3744
- /** @description Suggested input fields generated */
4393
+ /** @description Deletion result */
3745
4394
  200: {
3746
4395
  headers: {
3747
4396
  [name: string]: unknown;
3748
4397
  };
3749
4398
  content: {
3750
4399
  "application/json": {
3751
- inputFields: {
3752
- id: string;
3753
- name: string;
3754
- description: string;
3755
- /** @enum {string} */
3756
- type: "text" | "enum";
3757
- options?: {
3758
- value: string;
3759
- fragment?: string;
3760
- }[];
3761
- /** @default false */
3762
- useFragmentMapping: boolean;
3763
- /** @default true */
3764
- required: boolean;
3765
- }[];
4400
+ deleted: boolean;
3766
4401
  };
3767
4402
  };
3768
4403
  };
3769
- /** @description Generation failed */
4404
+ /** @description RLS policy not found */
4405
+ 404: {
4406
+ headers: {
4407
+ [name: string]: unknown;
4408
+ };
4409
+ content: {
4410
+ "application/json": {
4411
+ error: string;
4412
+ };
4413
+ };
4414
+ };
4415
+ /** @description Internal server error */
3770
4416
  500: {
3771
4417
  headers: {
3772
4418
  [name: string]: unknown;
@@ -3779,76 +4425,52 @@ declare interface operations {
3779
4425
  };
3780
4426
  };
3781
4427
  };
3782
- generateOutputStructure: {
4428
+ updateRlsPolicy: {
3783
4429
  parameters: {
3784
4430
  query?: never;
3785
- header?: never;
3786
- path?: never;
4431
+ header?: {
4432
+ "sp-access-token"?: string;
4433
+ };
4434
+ path: {
4435
+ id: number;
4436
+ };
3787
4437
  cookie?: never;
3788
4438
  };
3789
- requestBody?: {
4439
+ requestBody: {
3790
4440
  content: {
3791
4441
  "application/json": {
3792
- objective: string;
3793
- guidelines: string;
3794
- inputFields: {
3795
- id: string;
3796
- name: string;
3797
- description: string;
3798
- /** @enum {string} */
3799
- type: "text" | "enum";
3800
- options?: {
3801
- value: string;
3802
- fragment?: string;
3803
- }[];
3804
- /** @default false */
3805
- useFragmentMapping?: boolean;
3806
- /** @default true */
3807
- required?: boolean;
3808
- }[];
4442
+ condition?: string;
4443
+ context_variables?: string[];
4444
+ depends_on_tables?: string[];
4445
+ is_active?: boolean;
3809
4446
  };
3810
4447
  };
3811
4448
  };
3812
4449
  responses: {
3813
- /** @description Output structure generated */
4450
+ /** @description Updated RLS policy */
3814
4451
  200: {
3815
4452
  headers: {
3816
4453
  [name: string]: unknown;
3817
4454
  };
3818
4455
  content: {
3819
4456
  "application/json": {
3820
- outputStructure: {
3821
- key: string;
3822
- /** @enum {string} */
3823
- type: "text" | "number" | "boolean" | "enum" | "array" | "object";
3824
- description: string;
3825
- /** @default false */
3826
- attachEvidences: boolean;
3827
- enumValues?: string[];
3828
- children?: {
3829
- key: string;
3830
- /** @enum {string} */
3831
- type: "text" | "number" | "boolean" | "enum" | "array" | "object";
3832
- description: string;
3833
- /** @default false */
3834
- attachEvidences: boolean;
3835
- enumValues?: string[];
3836
- children?: {
3837
- key: string;
3838
- /** @enum {string} */
3839
- type: "text" | "number" | "boolean" | "enum" | "array" | "object";
3840
- description: string;
3841
- /** @default false */
3842
- attachEvidences: boolean;
3843
- enumValues?: string[];
3844
- }[];
3845
- }[];
3846
- }[];
4457
+ id: number;
4458
+ company_id: number;
4459
+ table_id: number;
4460
+ table_name: string;
4461
+ schema_name: string;
4462
+ condition: string;
4463
+ context_variables: string[];
4464
+ depends_on_tables: string[];
4465
+ is_active: boolean;
4466
+ is_removed: boolean;
4467
+ created_at: string;
4468
+ updated_at: string;
3847
4469
  };
3848
4470
  };
3849
4471
  };
3850
- /** @description Generation failed */
3851
- 500: {
4472
+ /** @description Invalid request */
4473
+ 400: {
3852
4474
  headers: {
3853
4475
  [name: string]: unknown;
3854
4476
  };
@@ -3858,80 +4480,18 @@ declare interface operations {
3858
4480
  };
3859
4481
  };
3860
4482
  };
3861
- };
3862
- };
3863
- generateFragments: {
3864
- parameters: {
3865
- query?: never;
3866
- header?: never;
3867
- path?: never;
3868
- cookie?: never;
3869
- };
3870
- requestBody?: {
3871
- content: {
3872
- "application/json": {
3873
- objective: string;
3874
- guidelines: string;
3875
- inputFields: {
3876
- id: string;
3877
- name: string;
3878
- description: string;
3879
- /** @enum {string} */
3880
- type: "text" | "enum";
3881
- options?: {
3882
- value: string;
3883
- fragment?: string;
3884
- }[];
3885
- /** @default false */
3886
- useFragmentMapping?: boolean;
3887
- /** @default true */
3888
- required?: boolean;
3889
- }[];
3890
- outputStructure: {
3891
- key: string;
3892
- /** @enum {string} */
3893
- type: "text" | "number" | "boolean" | "enum" | "array" | "object";
3894
- description: string;
3895
- /** @default false */
3896
- attachEvidences?: boolean;
3897
- enumValues?: string[];
3898
- children?: {
3899
- key: string;
3900
- /** @enum {string} */
3901
- type: "text" | "number" | "boolean" | "enum" | "array" | "object";
3902
- description: string;
3903
- /** @default false */
3904
- attachEvidences?: boolean;
3905
- enumValues?: string[];
3906
- children?: {
3907
- key: string;
3908
- /** @enum {string} */
3909
- type: "text" | "number" | "boolean" | "enum" | "array" | "object";
3910
- description: string;
3911
- /** @default false */
3912
- attachEvidences?: boolean;
3913
- enumValues?: string[];
3914
- }[];
3915
- }[];
3916
- }[];
3917
- };
3918
- };
3919
- };
3920
- responses: {
3921
- /** @description Prompt fragments generated */
3922
- 200: {
4483
+ /** @description RLS policy not found */
4484
+ 404: {
3923
4485
  headers: {
3924
4486
  [name: string]: unknown;
3925
4487
  };
3926
4488
  content: {
3927
4489
  "application/json": {
3928
- objectiveFragment: string;
3929
- inputsFragment: string;
3930
- outputFragment: string;
4490
+ error: string;
3931
4491
  };
3932
4492
  };
3933
4493
  };
3934
- /** @description Generation failed */
4494
+ /** @description Internal server error */
3935
4495
  500: {
3936
4496
  headers: {
3937
4497
  [name: string]: unknown;
@@ -3944,24 +4504,36 @@ declare interface operations {
3944
4504
  };
3945
4505
  };
3946
4506
  };
3947
- listAgents: {
4507
+ listUserTableAccess: {
3948
4508
  parameters: {
3949
- query?: never;
3950
- header: {
3951
- "sp-access-token": string;
4509
+ query: {
4510
+ table_id: number;
4511
+ };
4512
+ header?: {
4513
+ "sp-access-token"?: string;
3952
4514
  };
3953
4515
  path?: never;
3954
4516
  cookie?: never;
3955
4517
  };
3956
4518
  requestBody?: never;
3957
4519
  responses: {
3958
- /** @description List of agents for the company */
4520
+ /** @description User table access records for the given table */
3959
4521
  200: {
3960
4522
  headers: {
3961
4523
  [name: string]: unknown;
3962
4524
  };
3963
4525
  content: {
3964
- "application/json": components["schemas"]["Agent"][];
4526
+ "application/json": {
4527
+ id: number;
4528
+ table_id: number;
4529
+ user_column_path: string;
4530
+ operator: string;
4531
+ condition_value: string;
4532
+ is_active: boolean;
4533
+ is_removed: boolean;
4534
+ created_at: string;
4535
+ updated_at: string;
4536
+ }[];
3965
4537
  };
3966
4538
  };
3967
4539
  /** @description Internal server error */
@@ -3977,11 +4549,11 @@ declare interface operations {
3977
4549
  };
3978
4550
  };
3979
4551
  };
3980
- createAgent: {
4552
+ createUserTableAccess: {
3981
4553
  parameters: {
3982
4554
  query?: never;
3983
- header: {
3984
- "sp-access-token": string;
4555
+ header?: {
4556
+ "sp-access-token"?: string;
3985
4557
  };
3986
4558
  path?: never;
3987
4559
  cookie?: never;
@@ -3989,57 +4561,33 @@ declare interface operations {
3989
4561
  requestBody: {
3990
4562
  content: {
3991
4563
  "application/json": {
3992
- name: string;
3993
- objective?: string;
3994
- generated_inputs_fragment?: string;
3995
- generated_outputs_fragment?: string;
3996
- generated_objective_fragment?: string;
3997
- /** @default [] */
3998
- active_tools?: string[];
3999
- input_schema?: ({
4000
- id: string;
4001
- name: string;
4002
- description?: string;
4003
- /** @enum {string} */
4004
- type: "enum";
4005
- options: {
4006
- value: string;
4007
- fragment?: string;
4008
- }[];
4009
- /** @default false */
4010
- useFragmentMapping?: boolean;
4011
- /** @default false */
4012
- required?: boolean;
4013
- } | {
4014
- id: string;
4015
- name: string;
4016
- description?: string;
4017
- /** @enum {string} */
4018
- type: "text";
4019
- /**
4020
- * @default false
4021
- * @enum {boolean}
4022
- */
4023
- useFragmentMapping?: false;
4024
- /** @default false */
4025
- required?: boolean;
4026
- })[];
4027
- output_schema: {
4028
- [key: string]: unknown;
4029
- };
4030
- master_prompt_name?: string;
4031
- master_prompt_version?: number;
4564
+ table_id: number;
4565
+ user_column_path: string;
4566
+ operator: string;
4567
+ condition_value: string;
4568
+ /** @default true */
4569
+ is_active?: boolean;
4032
4570
  };
4033
4571
  };
4034
4572
  };
4035
4573
  responses: {
4036
- /** @description The created agent */
4037
- 200: {
4574
+ /** @description The created user table access */
4575
+ 201: {
4038
4576
  headers: {
4039
4577
  [name: string]: unknown;
4040
4578
  };
4041
4579
  content: {
4042
- "application/json": components["schemas"]["Agent"];
4580
+ "application/json": {
4581
+ id: number;
4582
+ table_id: number;
4583
+ user_column_path: string;
4584
+ operator: string;
4585
+ condition_value: string;
4586
+ is_active: boolean;
4587
+ is_removed: boolean;
4588
+ created_at: string;
4589
+ updated_at: string;
4590
+ };
4043
4591
  };
4044
4592
  };
4045
4593
  /** @description Invalid request */
@@ -4053,6 +4601,17 @@ declare interface operations {
4053
4601
  };
4054
4602
  };
4055
4603
  };
4604
+ /** @description Table not found */
4605
+ 404: {
4606
+ headers: {
4607
+ [name: string]: unknown;
4608
+ };
4609
+ content: {
4610
+ "application/json": {
4611
+ error: string;
4612
+ };
4613
+ };
4614
+ };
4056
4615
  /** @description Internal server error */
4057
4616
  500: {
4058
4617
  headers: {
@@ -4066,29 +4625,39 @@ declare interface operations {
4066
4625
  };
4067
4626
  };
4068
4627
  };
4069
- getAgent: {
4628
+ getUserTableAccess: {
4070
4629
  parameters: {
4071
4630
  query?: never;
4072
- header: {
4073
- "sp-access-token": string;
4631
+ header?: {
4632
+ "sp-access-token"?: string;
4074
4633
  };
4075
4634
  path: {
4076
- id: string;
4635
+ id: number;
4077
4636
  };
4078
4637
  cookie?: never;
4079
4638
  };
4080
4639
  requestBody?: never;
4081
4640
  responses: {
4082
- /** @description The agent */
4641
+ /** @description The user table access record */
4083
4642
  200: {
4084
4643
  headers: {
4085
4644
  [name: string]: unknown;
4086
4645
  };
4087
4646
  content: {
4088
- "application/json": components["schemas"]["Agent"];
4647
+ "application/json": {
4648
+ id: number;
4649
+ table_id: number;
4650
+ user_column_path: string;
4651
+ operator: string;
4652
+ condition_value: string;
4653
+ is_active: boolean;
4654
+ is_removed: boolean;
4655
+ created_at: string;
4656
+ updated_at: string;
4657
+ };
4089
4658
  };
4090
4659
  };
4091
- /** @description Agent not found */
4660
+ /** @description User table access not found */
4092
4661
  404: {
4093
4662
  headers: {
4094
4663
  [name: string]: unknown;
@@ -4112,84 +4681,31 @@ declare interface operations {
4112
4681
  };
4113
4682
  };
4114
4683
  };
4115
- updateAgent: {
4684
+ deleteUserTableAccess: {
4116
4685
  parameters: {
4117
4686
  query?: never;
4118
- header: {
4119
- "sp-access-token": string;
4687
+ header?: {
4688
+ "sp-access-token"?: string;
4120
4689
  };
4121
4690
  path: {
4122
- id: string;
4691
+ id: number;
4123
4692
  };
4124
4693
  cookie?: never;
4125
4694
  };
4126
- requestBody: {
4127
- content: {
4128
- "application/json": {
4129
- name?: string;
4130
- objective?: string | null;
4131
- generated_inputs_fragment?: string | null;
4132
- generated_outputs_fragment?: string | null;
4133
- generated_objective_fragment?: string | null;
4134
- active_tools?: string[];
4135
- input_schema?: ({
4136
- id: string;
4137
- name: string;
4138
- description?: string;
4139
- /** @enum {string} */
4140
- type: "enum";
4141
- options: {
4142
- value: string;
4143
- fragment?: string;
4144
- }[];
4145
- /** @default false */
4146
- useFragmentMapping?: boolean;
4147
- /** @default false */
4148
- required?: boolean;
4149
- } | {
4150
- id: string;
4151
- name: string;
4152
- description?: string;
4153
- /** @enum {string} */
4154
- type: "text";
4155
- /**
4156
- * @default false
4157
- * @enum {boolean}
4158
- */
4159
- useFragmentMapping?: false;
4160
- /** @default false */
4161
- required?: boolean;
4162
- })[] | null;
4163
- output_schema?: {
4164
- [key: string]: unknown;
4165
- } | null;
4166
- master_prompt_name?: string | null;
4167
- master_prompt_version?: number | null;
4168
- };
4169
- };
4170
- };
4695
+ requestBody?: never;
4171
4696
  responses: {
4172
- /** @description The updated agent */
4697
+ /** @description Deletion result */
4173
4698
  200: {
4174
- headers: {
4175
- [name: string]: unknown;
4176
- };
4177
- content: {
4178
- "application/json": components["schemas"]["Agent"];
4179
- };
4180
- };
4181
- /** @description Invalid request (e.g., invalid tools) */
4182
- 400: {
4183
4699
  headers: {
4184
4700
  [name: string]: unknown;
4185
4701
  };
4186
4702
  content: {
4187
4703
  "application/json": {
4188
- error: string;
4704
+ deleted: boolean;
4189
4705
  };
4190
4706
  };
4191
4707
  };
4192
- /** @description Agent not found */
4708
+ /** @description User table access not found */
4193
4709
  404: {
4194
4710
  headers: {
4195
4711
  [name: string]: unknown;
@@ -4213,32 +4729,59 @@ declare interface operations {
4213
4729
  };
4214
4730
  };
4215
4731
  };
4216
- deleteAgent: {
4732
+ updateUserTableAccess: {
4217
4733
  parameters: {
4218
4734
  query?: never;
4219
- header: {
4220
- "sp-access-token": string;
4735
+ header?: {
4736
+ "sp-access-token"?: string;
4221
4737
  };
4222
4738
  path: {
4223
- id: string;
4739
+ id: number;
4224
4740
  };
4225
4741
  cookie?: never;
4226
4742
  };
4227
- requestBody?: never;
4743
+ requestBody: {
4744
+ content: {
4745
+ "application/json": {
4746
+ user_column_path?: string;
4747
+ operator?: string;
4748
+ condition_value?: string;
4749
+ is_active?: boolean;
4750
+ };
4751
+ };
4752
+ };
4228
4753
  responses: {
4229
- /** @description Agent deleted successfully */
4754
+ /** @description Updated user table access */
4230
4755
  200: {
4231
4756
  headers: {
4232
4757
  [name: string]: unknown;
4233
4758
  };
4234
4759
  content: {
4235
4760
  "application/json": {
4236
- /** @enum {boolean} */
4237
- success: true;
4761
+ id: number;
4762
+ table_id: number;
4763
+ user_column_path: string;
4764
+ operator: string;
4765
+ condition_value: string;
4766
+ is_active: boolean;
4767
+ is_removed: boolean;
4768
+ created_at: string;
4769
+ updated_at: string;
4238
4770
  };
4239
4771
  };
4240
4772
  };
4241
- /** @description Agent not found */
4773
+ /** @description Invalid request */
4774
+ 400: {
4775
+ headers: {
4776
+ [name: string]: unknown;
4777
+ };
4778
+ content: {
4779
+ "application/json": {
4780
+ error: string;
4781
+ };
4782
+ };
4783
+ };
4784
+ /** @description User table access not found */
4242
4785
  404: {
4243
4786
  headers: {
4244
4787
  [name: string]: unknown;
@@ -4450,22 +4993,6 @@ declare interface paths {
4450
4993
  patch?: never;
4451
4994
  trace?: never;
4452
4995
  };
4453
- "/api/v1/flows/{flowId}/data-reports/last/status": {
4454
- parameters: {
4455
- query?: never;
4456
- header?: never;
4457
- path?: never;
4458
- cookie?: never;
4459
- };
4460
- get: operations["retrieveLatestDataReportStatus"];
4461
- put?: never;
4462
- post?: never;
4463
- delete?: never;
4464
- options?: never;
4465
- head?: never;
4466
- patch?: never;
4467
- trace?: never;
4468
- };
4469
4996
  "/api/v1/data-reports/{report_id}/explainability": {
4470
4997
  parameters: {
4471
4998
  query?: never;
@@ -4498,22 +5025,6 @@ declare interface paths {
4498
5025
  patch?: never;
4499
5026
  trace?: never;
4500
5027
  };
4501
- "/api/v1/timeline/bookmark": {
4502
- parameters: {
4503
- query?: never;
4504
- header?: never;
4505
- path?: never;
4506
- cookie?: never;
4507
- };
4508
- get?: never;
4509
- put?: never;
4510
- post: operations["toggleBookmark"];
4511
- delete?: never;
4512
- options?: never;
4513
- head?: never;
4514
- patch?: never;
4515
- trace?: never;
4516
- };
4517
5028
  "/api/v1/data-tables/latest-refresh": {
4518
5029
  parameters: {
4519
5030
  query?: never;
@@ -4866,216 +5377,206 @@ declare interface paths {
4866
5377
  patch?: never;
4867
5378
  trace?: never;
4868
5379
  };
4869
- "/api/v1/admin-console/query-examples": {
5380
+ "/api/v1/agents": {
4870
5381
  parameters: {
4871
5382
  query?: never;
4872
5383
  header?: never;
4873
5384
  path?: never;
4874
5385
  cookie?: never;
4875
5386
  };
4876
- get?: never;
5387
+ get: operations["listAgents"];
4877
5388
  put?: never;
4878
- post: operations["createQueryExample"];
5389
+ post: operations["createAgent"];
4879
5390
  delete?: never;
4880
5391
  options?: never;
4881
5392
  head?: never;
4882
5393
  patch?: never;
4883
5394
  trace?: never;
4884
5395
  };
4885
- "/api/v1/admin-console/query-examples/{id}": {
5396
+ "/api/v1/agents/{id}": {
4886
5397
  parameters: {
4887
5398
  query?: never;
4888
5399
  header?: never;
4889
5400
  path?: never;
4890
5401
  cookie?: never;
4891
5402
  };
4892
- get?: never;
4893
- put?: never;
5403
+ get: operations["getAgent"];
5404
+ put: operations["updateAgent"];
4894
5405
  post?: never;
4895
- delete?: never;
4896
- options?: never;
4897
- head?: never;
4898
- patch: operations["updateQueryExample"];
4899
- trace?: never;
4900
- };
4901
- "/api/v1/admin-console/sql/preview": {
4902
- parameters: {
4903
- query?: never;
4904
- header?: never;
4905
- path?: never;
4906
- cookie?: never;
4907
- };
4908
- get?: never;
4909
- put?: never;
4910
- post: operations["sqlPreview"];
4911
- delete?: never;
5406
+ delete: operations["deleteAgent"];
4912
5407
  options?: never;
4913
5408
  head?: never;
4914
5409
  patch?: never;
4915
5410
  trace?: never;
4916
5411
  };
4917
- "/api/v1/admin-console/tables/{tableId}/preview": {
5412
+ "/api/v1/applications": {
4918
5413
  parameters: {
4919
5414
  query?: never;
4920
5415
  header?: never;
4921
5416
  path?: never;
4922
5417
  cookie?: never;
4923
5418
  };
4924
- get: operations["tablePreview"];
5419
+ get: operations["listApplications"];
4925
5420
  put?: never;
4926
- post?: never;
5421
+ post: operations["createApplication"];
4927
5422
  delete?: never;
4928
5423
  options?: never;
4929
5424
  head?: never;
4930
5425
  patch?: never;
4931
5426
  trace?: never;
4932
5427
  };
4933
- "/api/v1/admin-console/usage-insights/filters": {
5428
+ "/api/v1/applications/{id}": {
4934
5429
  parameters: {
4935
5430
  query?: never;
4936
5431
  header?: never;
4937
5432
  path?: never;
4938
5433
  cookie?: never;
4939
5434
  };
4940
- get: operations["listSankeyUserFilters"];
5435
+ get: operations["getApplication"];
4941
5436
  put?: never;
4942
5437
  post?: never;
4943
- delete?: never;
5438
+ delete: operations["deleteApplication"];
4944
5439
  options?: never;
4945
5440
  head?: never;
4946
- patch?: never;
5441
+ patch: operations["updateApplication"];
4947
5442
  trace?: never;
4948
5443
  };
4949
- "/api/v1/admin-console/usage-insights/sankey": {
5444
+ "/api/v1/data-tables": {
4950
5445
  parameters: {
4951
5446
  query?: never;
4952
5447
  header?: never;
4953
5448
  path?: never;
4954
5449
  cookie?: never;
4955
5450
  };
4956
- get: operations["getSankeyData"];
5451
+ get: operations["listDataTables"];
4957
5452
  put?: never;
4958
- post?: never;
5453
+ post: operations["createDataTable"];
4959
5454
  delete?: never;
4960
5455
  options?: never;
4961
5456
  head?: never;
4962
5457
  patch?: never;
4963
5458
  trace?: never;
4964
5459
  };
4965
- "/api/v1/admin-console/company-settings": {
5460
+ "/api/v1/data-tables/{id}": {
4966
5461
  parameters: {
4967
5462
  query?: never;
4968
5463
  header?: never;
4969
5464
  path?: never;
4970
5465
  cookie?: never;
4971
5466
  };
4972
- get: operations["getCompanySettings"];
5467
+ get: operations["getDataTable"];
4973
5468
  put?: never;
4974
5469
  post?: never;
4975
- delete?: never;
5470
+ delete: operations["deleteDataTable"];
4976
5471
  options?: never;
4977
5472
  head?: never;
4978
- patch: operations["updateCompanySettings"];
5473
+ patch: operations["updateDataTable"];
4979
5474
  trace?: never;
4980
5475
  };
4981
- "/api/v1/admin-console/company-research-agent": {
5476
+ "/api/v1/data-table-columns": {
4982
5477
  parameters: {
4983
5478
  query?: never;
4984
5479
  header?: never;
4985
5480
  path?: never;
4986
5481
  cookie?: never;
4987
5482
  };
4988
- get?: never;
5483
+ get: operations["listDataTableColumns"];
4989
5484
  put?: never;
4990
- post: operations["runCompanyResearchAgent"];
5485
+ post?: never;
4991
5486
  delete?: never;
4992
5487
  options?: never;
4993
5488
  head?: never;
4994
5489
  patch?: never;
4995
5490
  trace?: never;
4996
5491
  };
4997
- "/api/v1/admin-console/agents/generate-inputs": {
5492
+ "/api/v1/data-table-columns/{id}": {
4998
5493
  parameters: {
4999
5494
  query?: never;
5000
5495
  header?: never;
5001
5496
  path?: never;
5002
5497
  cookie?: never;
5003
5498
  };
5004
- get?: never;
5499
+ get: operations["getDataTableColumn"];
5005
5500
  put?: never;
5006
- post: operations["generateSuggestedInputs"];
5501
+ post?: never;
5007
5502
  delete?: never;
5008
5503
  options?: never;
5009
5504
  head?: never;
5010
- patch?: never;
5505
+ patch: operations["updateDataTableColumn"];
5011
5506
  trace?: never;
5012
5507
  };
5013
- "/api/v1/admin-console/agents/generate-output": {
5508
+ "/api/v1/rls-policies": {
5014
5509
  parameters: {
5015
5510
  query?: never;
5016
5511
  header?: never;
5017
5512
  path?: never;
5018
5513
  cookie?: never;
5019
5514
  };
5020
- get?: never;
5515
+ get: operations["listRlsPolicies"];
5021
5516
  put?: never;
5022
- post: operations["generateOutputStructure"];
5517
+ post: operations["createRlsPolicy"];
5023
5518
  delete?: never;
5024
5519
  options?: never;
5025
5520
  head?: never;
5026
5521
  patch?: never;
5027
5522
  trace?: never;
5028
5523
  };
5029
- "/api/v1/admin-console/agents/generate-fragments": {
5524
+ "/api/v1/rls-policies/{id}": {
5030
5525
  parameters: {
5031
5526
  query?: never;
5032
5527
  header?: never;
5033
5528
  path?: never;
5034
5529
  cookie?: never;
5035
5530
  };
5036
- get?: never;
5531
+ get: operations["getRlsPolicy"];
5037
5532
  put?: never;
5038
- post: operations["generateFragments"];
5039
- delete?: never;
5533
+ post?: never;
5534
+ delete: operations["deleteRlsPolicy"];
5040
5535
  options?: never;
5041
5536
  head?: never;
5042
- patch?: never;
5537
+ patch: operations["updateRlsPolicy"];
5043
5538
  trace?: never;
5044
5539
  };
5045
- "/api/v1/agents": {
5540
+ "/api/v1/user-table-access": {
5046
5541
  parameters: {
5047
5542
  query?: never;
5048
5543
  header?: never;
5049
5544
  path?: never;
5050
5545
  cookie?: never;
5051
5546
  };
5052
- get: operations["listAgents"];
5547
+ get: operations["listUserTableAccess"];
5053
5548
  put?: never;
5054
- post: operations["createAgent"];
5549
+ post: operations["createUserTableAccess"];
5055
5550
  delete?: never;
5056
5551
  options?: never;
5057
5552
  head?: never;
5058
5553
  patch?: never;
5059
5554
  trace?: never;
5060
5555
  };
5061
- "/api/v1/agents/{id}": {
5556
+ "/api/v1/user-table-access/{id}": {
5062
5557
  parameters: {
5063
5558
  query?: never;
5064
5559
  header?: never;
5065
5560
  path?: never;
5066
5561
  cookie?: never;
5067
5562
  };
5068
- get: operations["getAgent"];
5069
- put: operations["updateAgent"];
5563
+ get: operations["getUserTableAccess"];
5564
+ put?: never;
5070
5565
  post?: never;
5071
- delete: operations["deleteAgent"];
5566
+ delete: operations["deleteUserTableAccess"];
5072
5567
  options?: never;
5073
5568
  head?: never;
5074
- patch?: never;
5569
+ patch: operations["updateUserTableAccess"];
5075
5570
  trace?: never;
5076
5571
  };
5077
5572
  }
5078
5573
 
5574
+ declare type PublicApiClient = Simplify<Client<PublicPaths, `${string}/${string}`>>;
5575
+
5576
+ declare type PublicPaths = Simplify<{
5577
+ [Path in keyof paths]: RemoveAuthHeader<paths[Path]>;
5578
+ }>;
5579
+
5079
5580
  declare type QuickActions = z.infer<typeof QuickActionsSchema>;
5080
5581
 
5081
5582
  declare const QuickActionsSchema: z.ZodArray<z.ZodObject<{