@datarecce/ui 0.1.23 → 0.1.25

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 (53) hide show
  1. package/dist/{RecceCheckContext-DIQjrvH8.mjs → RecceCheckContext-CiG9fGRW.mjs} +4 -3
  2. package/dist/RecceCheckContext-CiG9fGRW.mjs.map +1 -0
  3. package/dist/{RecceCheckContext-_xzNlnbJ.js → RecceCheckContext-tUxygNmN.js} +4 -3
  4. package/dist/RecceCheckContext-tUxygNmN.js.map +1 -0
  5. package/dist/api.d.mts +2 -2
  6. package/dist/api.d.ts +2 -2
  7. package/dist/api.js +3 -2
  8. package/dist/api.mjs +3 -3
  9. package/dist/{components-DXbVq9Cw.js → components-Chaffojm.js} +274 -227
  10. package/dist/components-Chaffojm.js.map +1 -0
  11. package/dist/{components-CfY72Lq2.mjs → components-DoLZeY_e.mjs} +274 -225
  12. package/dist/components-DoLZeY_e.mjs.map +1 -0
  13. package/dist/components.d.mts +1 -1
  14. package/dist/components.d.ts +1 -1
  15. package/dist/components.js +4 -4
  16. package/dist/components.mjs +4 -4
  17. package/dist/{hooks-C4jkoryM.js → hooks-VXI-W5Aq.js} +3 -3
  18. package/dist/{hooks-C4jkoryM.js.map → hooks-VXI-W5Aq.js.map} +1 -1
  19. package/dist/{hooks-C8pyX9m_.mjs → hooks-XsKEyc3k.mjs} +3 -3
  20. package/dist/{hooks-C8pyX9m_.mjs.map → hooks-XsKEyc3k.mjs.map} +1 -1
  21. package/dist/hooks.d.mts +2 -2
  22. package/dist/hooks.d.ts +2 -2
  23. package/dist/hooks.js +4 -3
  24. package/dist/hooks.mjs +4 -4
  25. package/dist/{index-CVPmrztP.d.ts → index-OeBjAMJ6.d.ts} +46 -40
  26. package/dist/index-OeBjAMJ6.d.ts.map +1 -0
  27. package/dist/{index-DIHuswfP.d.mts → index-_KWh3aGd.d.mts} +115 -109
  28. package/dist/index-_KWh3aGd.d.mts.map +1 -0
  29. package/dist/index.d.mts +2 -2
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +7 -5
  32. package/dist/index.mjs +6 -6
  33. package/dist/{state-BbgVwFV2.mjs → state-DyHCt6IJ.mjs} +118 -96
  34. package/dist/state-DyHCt6IJ.mjs.map +1 -0
  35. package/dist/{state-AeoqV9ja.js → state-FkYREAs-.js} +123 -95
  36. package/dist/state-FkYREAs-.js.map +1 -0
  37. package/dist/types.d.mts +1 -1
  38. package/dist/types.d.ts +1 -1
  39. package/dist/{version-MxW9vrDY.js → version-BGNaeW6k.js} +22 -12
  40. package/dist/version-BGNaeW6k.js.map +1 -0
  41. package/dist/{version-C2NU3xyx.mjs → version-Dav28qEz.mjs} +18 -14
  42. package/dist/version-Dav28qEz.mjs.map +1 -0
  43. package/package.json +2 -1
  44. package/dist/RecceCheckContext-DIQjrvH8.mjs.map +0 -1
  45. package/dist/RecceCheckContext-_xzNlnbJ.js.map +0 -1
  46. package/dist/components-CfY72Lq2.mjs.map +0 -1
  47. package/dist/components-DXbVq9Cw.js.map +0 -1
  48. package/dist/index-CVPmrztP.d.ts.map +0 -1
  49. package/dist/index-DIHuswfP.d.mts.map +0 -1
  50. package/dist/state-AeoqV9ja.js.map +0 -1
  51. package/dist/state-BbgVwFV2.mjs.map +0 -1
  52. package/dist/version-C2NU3xyx.mjs.map +0 -1
  53. package/dist/version-MxW9vrDY.js.map +0 -1
@@ -71,7 +71,11 @@ import ButtonGroup from "@mui/material/ButtonGroup";
71
71
  * - red -> error
72
72
  * - neutral -> grey
73
73
  */
74
+ const white = "#FFFFFF";
75
+ const black = "#000000";
74
76
  const colors = {
77
+ white,
78
+ black,
75
79
  iochmara: {
76
80
  50: "#EAF3FB",
77
81
  100: "#C4DDF3",
@@ -124,6 +128,19 @@ const colors = {
124
128
  900: "#78350F",
125
129
  950: "#431407"
126
130
  },
131
+ yellow: {
132
+ 50: "#FEFCE8",
133
+ 100: "#FEF9C3",
134
+ 200: "#FEF08A",
135
+ 300: "#FDE047",
136
+ 400: "#FACC15",
137
+ 500: "#EAB308",
138
+ 600: "#CA8A04",
139
+ 700: "#A16207",
140
+ 800: "#854D0E",
141
+ 900: "#713F12",
142
+ 950: "#422006"
143
+ },
127
144
  green: {
128
145
  50: "#F0FDF4",
129
146
  100: "#DCFCE7",
@@ -207,7 +224,7 @@ function createButtonColorVariants(colorName, colorScale) {
207
224
  },
208
225
  style: {
209
226
  backgroundColor: colorScale[500],
210
- color: "#FFFFFF",
227
+ color: white,
211
228
  "&:hover": { backgroundColor: colorScale[600] }
212
229
  }
213
230
  },
@@ -254,7 +271,7 @@ function createBadgeColorVariant(colorName, colorScale) {
254
271
  props: { color: colorName },
255
272
  style: { "& .MuiBadge-badge": {
256
273
  backgroundColor: colorScale[500],
257
- color: "#FFFFFF"
274
+ color: white
258
275
  } }
259
276
  };
260
277
  }
@@ -269,7 +286,7 @@ function createChipColorVariants(colorName, colorScale) {
269
286
  },
270
287
  style: {
271
288
  backgroundColor: colorScale[500],
272
- color: "#FFFFFF",
289
+ color: white,
273
290
  "&:hover": { backgroundColor: colorScale[600] }
274
291
  }
275
292
  }, {
@@ -347,7 +364,7 @@ const componentOverrides = {
347
364
  borderRadius: 6,
348
365
  ...ownerState.color === "neutral" && ownerState.variant === "contained" && {
349
366
  backgroundColor: colors.neutral[700],
350
- color: "#FFFFFF",
367
+ color: white,
351
368
  "&:hover": { backgroundColor: colors.neutral[800] }
352
369
  },
353
370
  ...ownerState.color === "neutral" && ownerState.variant === "outlined" && {
@@ -524,31 +541,31 @@ const baseThemeOptions = {
524
541
  main: colors.iochmara[500],
525
542
  light: colors.iochmara[300],
526
543
  dark: colors.iochmara[600],
527
- contrastText: "#FFFFFF"
544
+ contrastText: white
528
545
  },
529
546
  secondary: {
530
547
  main: colors.cyan[500],
531
548
  light: colors.cyan[400],
532
549
  dark: colors.cyan[600],
533
- contrastText: "#FFFFFF"
550
+ contrastText: white
534
551
  },
535
552
  success: {
536
553
  main: colors.green[500],
537
554
  light: colors.green[400],
538
555
  dark: colors.green[600],
539
- contrastText: "#FFFFFF"
556
+ contrastText: white
540
557
  },
541
558
  warning: {
542
559
  main: colors.amber[500],
543
560
  light: colors.amber[400],
544
561
  dark: colors.amber[600],
545
- contrastText: "#FFFFFF"
562
+ contrastText: white
546
563
  },
547
564
  error: {
548
565
  main: colors.red[500],
549
566
  light: colors.red[400],
550
567
  dark: colors.red[600],
551
- contrastText: "#FFFFFF"
568
+ contrastText: white
552
569
  },
553
570
  grey: {
554
571
  50: colors.neutral[50],
@@ -622,8 +639,8 @@ const lightThemeOptions = {
622
639
  ...baseThemeOptions.palette,
623
640
  mode: "light",
624
641
  background: {
625
- default: "#FFFFFF",
626
- paper: "#FFFFFF"
642
+ default: white,
643
+ paper: white
627
644
  },
628
645
  text: {
629
646
  primary: colors.neutral[900],
@@ -653,7 +670,7 @@ function createPaletteColor(colorScale) {
653
670
  main: colorScale[500],
654
671
  light: colorScale[300],
655
672
  dark: colorScale[600],
656
- contrastText: "#FFFFFF"
673
+ contrastText: white
657
674
  };
658
675
  }
659
676
  const customPaletteAdditions = {
@@ -662,7 +679,7 @@ const customPaletteAdditions = {
662
679
  main: colors.iochmara[500],
663
680
  light: colors.iochmara[50],
664
681
  dark: colors.iochmara[700],
665
- contrastText: "#FFFFFF"
682
+ contrastText: white
666
683
  },
667
684
  cyan: createPaletteColor(colors.cyan),
668
685
  amber: createPaletteColor(colors.amber),
@@ -674,7 +691,7 @@ const customPaletteAdditions = {
674
691
  main: colors.neutral[500],
675
692
  light: colors.neutral[300],
676
693
  dark: colors.neutral[600],
677
- contrastText: "#FFFFFF"
694
+ contrastText: white
678
695
  },
679
696
  envBase: semanticColors.envBase,
680
697
  envCurrent: semanticColors.envCurrent
@@ -710,8 +727,8 @@ function token(path$1) {
710
727
  let colorName = parts[1];
711
728
  const variant = parts[2];
712
729
  if (colorName in colorAliases) colorName = colorAliases[colorName];
713
- if (colorName === "white") return "#FFFFFF";
714
- if (colorName === "black") return "#000000";
730
+ if (colorName === "white") return white;
731
+ if (colorName === "black") return black;
715
732
  if (colorName in semanticColors) {
716
733
  const semantic = semanticColors[colorName];
717
734
  if (typeof semantic === "object" && variant in semantic) return semantic[variant];
@@ -1030,8 +1047,8 @@ async function getModelInfo(model) {
1030
1047
 
1031
1048
  //#endregion
1032
1049
  //#region recce-source/js/src/lib/api/cll.ts
1033
- async function getCll(input) {
1034
- return (await axiosClient.post("/api/cll", input)).data;
1050
+ async function getCll(input, client = axiosClient) {
1051
+ return (await client.post("/api/cll", input)).data;
1035
1052
  }
1036
1053
 
1037
1054
  //#endregion
@@ -1528,37 +1545,37 @@ function mutateAddKey(run) {
1528
1545
  });
1529
1546
  return run;
1530
1547
  }
1531
- async function submitRun(type, params, options) {
1548
+ async function submitRun(type, params, options, client = axiosClient) {
1532
1549
  const track_props = options?.trackProps ? { ...options.trackProps } : {};
1533
1550
  if (getExperimentTrackingBreakingChangeEnabled()) track_props.breaking_change_analysis = true;
1534
- return (await axiosClient.post("/api/runs", {
1551
+ return (await client.post("/api/runs", {
1535
1552
  type,
1536
1553
  params,
1537
1554
  nowait: options?.nowait,
1538
1555
  track_props
1539
1556
  })).data;
1540
1557
  }
1541
- async function getRun(runId) {
1542
- return (await axiosClient.get(`/api/runs/${runId}`)).data;
1558
+ async function getRun(runId, client = axiosClient) {
1559
+ return (await client.get(`/api/runs/${runId}`)).data;
1543
1560
  }
1544
- async function waitRun(runId, timeout) {
1545
- return mutateAddKey((await axiosClient.get(`/api/runs/${runId}/wait`, { params: { timeout } })).data);
1561
+ async function waitRun(runId, timeout, client = axiosClient) {
1562
+ return mutateAddKey((await client.get(`/api/runs/${runId}/wait`, { params: { timeout } })).data);
1546
1563
  }
1547
- async function cancelRun(runId) {
1548
- return await axiosClient.post(`/api/runs/${runId}/cancel`);
1564
+ async function cancelRun(runId, client = axiosClient) {
1565
+ return await client.post(`/api/runs/${runId}/cancel`);
1549
1566
  }
1550
- async function submitRunFromCheck(checkId, options) {
1551
- return (await axiosClient.post(`/api/checks/${checkId}/run`, { nowait: options?.nowait })).data;
1567
+ async function submitRunFromCheck(checkId, options, client = axiosClient) {
1568
+ return (await client.post(`/api/checks/${checkId}/run`, { nowait: options?.nowait })).data;
1552
1569
  }
1553
- async function searchRuns(type, params, limit) {
1554
- return (await axiosClient.post(`/api/runs/search`, {
1570
+ async function searchRuns(type, params, limit, client = axiosClient) {
1571
+ return (await client.post(`/api/runs/search`, {
1555
1572
  type,
1556
1573
  params,
1557
1574
  limit
1558
1575
  })).data;
1559
1576
  }
1560
- async function listRuns() {
1561
- return (await axiosClient.get("/api/runs")).data;
1577
+ async function listRuns(client = axiosClient) {
1578
+ return (await client.get("/api/runs")).data;
1562
1579
  }
1563
1580
  async function aggregateRuns(client = axiosClient) {
1564
1581
  return (await client.post(`/api/runs/aggregate`, {})).data;
@@ -1566,20 +1583,20 @@ async function aggregateRuns(client = axiosClient) {
1566
1583
 
1567
1584
  //#endregion
1568
1585
  //#region recce-source/js/src/lib/api/adhocQuery.ts
1569
- async function submitQuery(params, options) {
1570
- return await submitRun("query", params, options);
1586
+ async function submitQuery(params, options, client = axiosClient) {
1587
+ return await submitRun("query", params, options, client);
1571
1588
  }
1572
- async function submitQueryBase(params, options) {
1573
- return await submitRun("query_base", params, options);
1589
+ async function submitQueryBase(params, options, client = axiosClient) {
1590
+ return await submitRun("query_base", params, options, client);
1574
1591
  }
1575
- async function submitQueryDiff(params, options) {
1576
- return await submitRun("query_diff", params, options);
1592
+ async function submitQueryDiff(params, options, client = axiosClient) {
1593
+ return await submitRun("query_diff", params, options, client);
1577
1594
  }
1578
1595
 
1579
1596
  //#endregion
1580
1597
  //#region recce-source/js/src/lib/api/lineagecheck.ts
1581
- async function createLineageDiffCheck(viewOptions) {
1582
- return (await axiosClient.post("/api/checks", {
1598
+ async function createLineageDiffCheck(viewOptions, client = axiosClient) {
1599
+ return (await client.post("/api/checks", {
1583
1600
  type: "lineage_diff",
1584
1601
  params: {},
1585
1602
  view_options: viewOptions
@@ -1588,17 +1605,17 @@ async function createLineageDiffCheck(viewOptions) {
1588
1605
 
1589
1606
  //#endregion
1590
1607
  //#region recce-source/js/src/lib/api/profile.ts
1591
- async function submitProfileDiff(params, options) {
1592
- return await submitRun("profile_diff", params, options);
1608
+ async function submitProfileDiff(params, options, client = axiosClient) {
1609
+ return await submitRun("profile_diff", params, options, client);
1593
1610
  }
1594
1611
 
1595
1612
  //#endregion
1596
1613
  //#region recce-source/js/src/lib/api/valuediff.ts
1597
- async function submitValueDiff(params, options) {
1598
- return await submitRun("value_diff", params, options);
1614
+ async function submitValueDiff(params, options, client = axiosClient) {
1615
+ return await submitRun("value_diff", params, options, client);
1599
1616
  }
1600
- async function submitValueDiffDetail(params, options) {
1601
- return await submitRun("value_diff_detail", params, options);
1617
+ async function submitValueDiffDetail(params, options, client = axiosClient) {
1618
+ return await submitRun("value_diff_detail", params, options, client);
1602
1619
  }
1603
1620
 
1604
1621
  //#endregion
@@ -2164,14 +2181,15 @@ function setKeepAliveCallback(callback) {
2164
2181
  * - Minimum 3 seconds between API calls
2165
2182
  * - Prevents concurrent API calls with a lock
2166
2183
  *
2184
+ * @param client - Optional axios instance for API configuration
2167
2185
  * @returns true if keep-alive was sent, false if throttled/skipped
2168
2186
  */
2169
- async function sendKeepAlive() {
2187
+ async function sendKeepAlive(client = axiosClient) {
2170
2188
  if (Date.now() - lastKeepAliveTime < MIN_KEEP_ALIVE_INTERVAL_MS) return false;
2171
2189
  if (isSending) return false;
2172
2190
  try {
2173
2191
  isSending = true;
2174
- await axiosClient.post("/api/keep-alive");
2192
+ await client.post("/api/keep-alive");
2175
2193
  lastKeepAliveTime = Date.now();
2176
2194
  if (onKeepAliveSuccess) onKeepAliveSuccess(lastKeepAliveTime);
2177
2195
  return true;
@@ -2242,6 +2260,7 @@ const IDLE_DETECTION_CONFIG = {
2242
2260
  function useIdleDetection() {
2243
2261
  const { data: instanceInfo, isLoading, isError } = useRecceInstanceInfo();
2244
2262
  const isDisconnected = useIdleTimeoutSafe()?.isDisconnected ?? false;
2263
+ const { apiClient } = useApiConfig();
2245
2264
  const idleTimeout = instanceInfo?.idle_timeout;
2246
2265
  const isEnabled = idleTimeout !== void 0 && idleTimeout > 0 && !isDisconnected;
2247
2266
  debugLog("[Idle Detection] Instance info", {
@@ -2259,8 +2278,8 @@ function useIdleDetection() {
2259
2278
  */
2260
2279
  const sendKeepAliveNow = useCallback(async () => {
2261
2280
  if (document.hidden) return;
2262
- if (await sendKeepAlive()) debugLog("[Idle Detection] Keep-alive sent successfully", { timestamp: (/* @__PURE__ */ new Date()).toISOString() });
2263
- }, []);
2281
+ if (await sendKeepAlive(apiClient)) debugLog("[Idle Detection] Keep-alive sent successfully", { timestamp: (/* @__PURE__ */ new Date()).toISOString() });
2282
+ }, [apiClient]);
2264
2283
  /**
2265
2284
  * Handle any user activity event
2266
2285
  * Attempts to send keep-alive (axios layer handles throttling)
@@ -3296,26 +3315,26 @@ function ProfileDiffForm({ params, onParamsChanged, setIsReadyToExecute }) {
3296
3315
 
3297
3316
  //#endregion
3298
3317
  //#region recce-source/js/src/lib/api/models.ts
3299
- async function fetchModelRowCount(modelName) {
3300
- return (await axiosClient.get(`/api/models/${modelName}/row_count`)).data;
3318
+ async function fetchModelRowCount(modelName, client = axiosClient) {
3319
+ return (await client.get(`/api/models/${modelName}/row_count`)).data;
3301
3320
  }
3302
- async function queryModelRowCount(modelName) {
3303
- const { result } = await queryRowCount([modelName]);
3321
+ async function queryModelRowCount(modelName, client = axiosClient) {
3322
+ const { result } = await queryRowCount([modelName], client);
3304
3323
  return result[modelName];
3305
3324
  }
3306
- async function queryRowCount(modelNames) {
3325
+ async function queryRowCount(modelNames, client = axiosClient) {
3307
3326
  if (modelNames.length === 0) throw new Error("No model names provided");
3308
- const { run_id } = await submitRowCountDiff({ node_names: modelNames }, { nowait: true });
3327
+ const { run_id } = await submitRowCountDiff({ node_names: modelNames }, { nowait: true }, client);
3309
3328
  return {
3310
3329
  runId: run_id,
3311
- result: (await waitRun(run_id)).result
3330
+ result: (await waitRun(run_id, void 0, client)).result
3312
3331
  };
3313
3332
  }
3314
3333
 
3315
3334
  //#endregion
3316
3335
  //#region recce-source/js/src/lib/api/rowcount.ts
3317
- async function submitRowCountDiff(params, options) {
3318
- return await submitRun("row_count_diff", params, options);
3336
+ async function submitRowCountDiff(params, options, client = axiosClient) {
3337
+ return await submitRun("row_count_diff", params, options, client);
3319
3338
  }
3320
3339
 
3321
3340
  //#endregion
@@ -5509,6 +5528,7 @@ const useCloseModalEffect = (onClose) => {
5509
5528
  }, [onClose, usePathname()]);
5510
5529
  };
5511
5530
  function RecceActionContextProvider({ children }) {
5531
+ const { apiClient } = useApiConfig();
5512
5532
  const [action, setAction] = useState();
5513
5533
  const [isModalOpen, setModalOpen] = useState(false);
5514
5534
  const onModalOpen = useCallback(() => setModalOpen(true), []);
@@ -5536,7 +5556,7 @@ function RecceActionContextProvider({ children }) {
5536
5556
  const session = (/* @__PURE__ */ new Date()).getTime().toString();
5537
5557
  let lastRun = void 0;
5538
5558
  if (options?.showLast) {
5539
- const runs = await searchRuns(type, params, 1);
5559
+ const runs = await searchRuns(type, params, 1, apiClient);
5540
5560
  if (runs.length === 1) lastRun = runs[0];
5541
5561
  }
5542
5562
  const run = findByRunType(type);
@@ -5547,7 +5567,7 @@ function RecceActionContextProvider({ children }) {
5547
5567
  const { run_id } = await submitRun(type, params, {
5548
5568
  nowait: true,
5549
5569
  trackProps: options?.trackProps
5550
- });
5570
+ }, apiClient);
5551
5571
  await showRunId(run_id);
5552
5572
  await queryClient.invalidateQueries({ queryKey: cacheKeys.runs() });
5553
5573
  if (location.startsWith("/lineage")) setLocation("/lineage");
@@ -5577,7 +5597,8 @@ function RecceActionContextProvider({ children }) {
5577
5597
  showRunId,
5578
5598
  location,
5579
5599
  setLocation,
5580
- queryClient
5600
+ queryClient,
5601
+ apiClient
5581
5602
  ]);
5582
5603
  useCloseModalEffect(onModalClose);
5583
5604
  const handleExecute = async (type, params) => {
@@ -5586,7 +5607,7 @@ function RecceActionContextProvider({ children }) {
5586
5607
  const { run_id } = await submitRun(type, params, {
5587
5608
  nowait: true,
5588
5609
  trackProps: action?.options?.trackProps
5589
- });
5610
+ }, apiClient);
5590
5611
  await showRunId(run_id);
5591
5612
  } catch (e) {
5592
5613
  toaster.create({
@@ -8126,66 +8147,67 @@ const findByRunType = (runType) => {
8126
8147
 
8127
8148
  //#endregion
8128
8149
  //#region recce-source/js/src/lib/api/checks.ts
8129
- async function createSimpleCheck() {
8130
- return (await axiosClient.post("/api/checks", { type: "simple" })).data;
8150
+ async function createSimpleCheck(client = axiosClient) {
8151
+ return (await client.post("/api/checks", { type: "simple" })).data;
8131
8152
  }
8132
- async function createCheckByRun(runId, viewOptions) {
8153
+ async function createCheckByRun(runId, viewOptions, client = axiosClient) {
8133
8154
  const track_props = getExperimentTrackingBreakingChangeEnabled() ? { breaking_change_analysis: true } : {};
8134
- return (await axiosClient.post("/api/checks", {
8155
+ return (await client.post("/api/checks", {
8135
8156
  run_id: runId,
8136
8157
  view_options: viewOptions,
8137
8158
  track_props
8138
8159
  })).data;
8139
8160
  }
8140
- async function listChecks() {
8141
- return (await axiosClient.get("/api/checks")).data;
8161
+ async function listChecks(client = axiosClient) {
8162
+ return (await client.get("/api/checks")).data;
8142
8163
  }
8143
8164
  function useChecks(enabled) {
8165
+ const { apiClient } = useApiConfig();
8144
8166
  return useQuery({
8145
8167
  queryKey: cacheKeys.checks(),
8146
- queryFn: listChecks,
8168
+ queryFn: () => listChecks(apiClient),
8147
8169
  enabled
8148
8170
  });
8149
8171
  }
8150
- async function getCheck(checkId) {
8151
- return (await axiosClient.get(`/api/checks/${checkId}`)).data;
8172
+ async function getCheck(checkId, client = axiosClient) {
8173
+ return (await client.get(`/api/checks/${checkId}`)).data;
8152
8174
  }
8153
- async function updateCheck(checkId, payload) {
8154
- return (await axiosClient.patch(`/api/checks/${checkId}`, payload)).data;
8175
+ async function updateCheck(checkId, payload, client = axiosClient) {
8176
+ return (await client.patch(`/api/checks/${checkId}`, payload)).data;
8155
8177
  }
8156
- async function deleteCheck(checkId) {
8157
- return (await axiosClient.delete(`/api/checks/${checkId}`)).data;
8178
+ async function deleteCheck(checkId, client = axiosClient) {
8179
+ return (await client.delete(`/api/checks/${checkId}`)).data;
8158
8180
  }
8159
- async function reorderChecks(order) {
8160
- return await axiosClient.post("/api/checks/reorder", order);
8181
+ async function reorderChecks(order, client = axiosClient) {
8182
+ return await client.post("/api/checks/reorder", order);
8161
8183
  }
8162
- async function markAsPresetCheck(checkId) {
8163
- await axiosClient.post(`/api/checks/${checkId}/mark-as-preset`);
8184
+ async function markAsPresetCheck(checkId, client = axiosClient) {
8185
+ await client.post(`/api/checks/${checkId}/mark-as-preset`);
8164
8186
  }
8165
8187
 
8166
8188
  //#endregion
8167
8189
  //#region recce-source/js/src/lib/api/state.ts
8168
- async function saveAs(input) {
8169
- return (await axiosClient.post("/api/save-as", input)).data;
8190
+ async function saveAs(input, client = axiosClient) {
8191
+ return (await client.post("/api/save-as", input)).data;
8170
8192
  }
8171
- async function rename(input) {
8172
- return (await axiosClient.post("/api/rename", input)).data;
8193
+ async function rename(input, client = axiosClient) {
8194
+ return (await client.post("/api/rename", input)).data;
8173
8195
  }
8174
- async function exportState() {
8175
- return (await axiosClient.post("/api/export")).data;
8196
+ async function exportState(client = axiosClient) {
8197
+ return (await client.post("/api/export")).data;
8176
8198
  }
8177
- async function importState(file, checksOnly) {
8199
+ async function importState(file, checksOnly, client = axiosClient) {
8178
8200
  const formData = new FormData();
8179
8201
  formData.append("file", file);
8180
8202
  formData.append("checks_only", (!!checksOnly).toString());
8181
- return (await axiosClient.post("/api/import", formData)).data;
8203
+ return (await client.post("/api/import", formData)).data;
8182
8204
  }
8183
- async function isStateSyncing() {
8184
- return (await axiosClient.get("/api/sync")).status === 208;
8205
+ async function isStateSyncing(client = axiosClient) {
8206
+ return (await client.get("/api/sync")).status === 208;
8185
8207
  }
8186
- async function syncState(input) {
8208
+ async function syncState(input, client = axiosClient) {
8187
8209
  try {
8188
- const response = await axiosClient.post("/api/sync", input);
8210
+ const response = await client.post("/api/sync", input);
8189
8211
  if (response.status === 202) return { status: "accepted" };
8190
8212
  if (response.status === 208) return { status: "syncing" };
8191
8213
  } catch (error) {
@@ -8195,10 +8217,10 @@ async function syncState(input) {
8195
8217
  }
8196
8218
  throw new Error("Failed to sync state");
8197
8219
  }
8198
- async function shareState() {
8199
- return (await axiosClient.post("/api/share")).data;
8220
+ async function shareState(client = axiosClient) {
8221
+ return (await client.post("/api/share")).data;
8200
8222
  }
8201
8223
 
8202
8224
  //#endregion
8203
- export { ProfileDiffForm as $, trackMultiNodesAction as $t, ColumnNameCell as A, getServerInfo as An, submitQuery as At, IconImport as B, lightTheme as Bn, waitRun as Bt, TopKSummaryList as C, toReactFlow as Cn, cacheKeys as Ct, QueryDiffResultView as D, getLineageDiff as Dn, submitValueDiffDetail as Dt, QueryResultView as E, getLineage as En, submitValueDiff as Et, useRecceActionContext as F, ToasterProvider as Fn, getRun as Ft, DiffText as G, trackColumnLevelLineage as Gt, IconSave as H, EXPLORE_FORM_EVENT as Ht, useAppLocation as I, toaster as In, listRuns as It, mergeKeysWithStatus as J, trackExploreAction as Jt, useClipBoardToast as K, trackCopyToClipboard as Kt, RunModal as L, useToaster as Ln, searchRuns as Lt, useLineageViewContext as M, reactQueryClient as Mn, submitQueryDiff as Mt, useLineageViewContextSafe as N, ScreenshotBox as Nn, aggregateRuns as Nt, ProfileDiffResultView as O, getLineageWithError as On, submitProfileDiff as Ot, RecceActionContextProvider as P, Toaster as Pn, cancelRun as Pt, queryRowCount as Q, trackLineageViewRender as Qt, IconEdit as R, colors as Rn, submitRun as Rt, TopKDiffResultView as S, selectUpstream as Sn, useApiConfigSafe as St, RowCountDiffResultView as T, getCll as Tn, ScreenshotDataGrid as Tt, IconSync as U, EXPLORE_SOURCE as Ut, IconInfo as V, token as Vn, EXPLORE_ACTION as Vt, deltaPercentageString as W, LINEAGE_SELECTION_ACTION as Wt, fetchModelRowCount as X, trackHistoryAction as Xt, submitRowCountDiff as Y, trackExploreActionForm as Yt, queryModelRowCount as Z, trackLineageSelection as Zt, findByRunType as _, COLUMN_HEIGHT as _n, useRecceInstanceContext as _t, saveAs as a, trackStateAction as an, useModelColumns_default as at, ValueDiffForm as b, layout as bn, useApiClient as bt, createCheckByRun as c, isProfileDiffRun as cn, useRunsAggregated as ct, getCheck as d, isQueryRun as dn, useIdleTimeout as dt, trackNavigation as en, HistogramDiffResultView as et, listChecks as f, isRowCountDiffRun as fn, getServerFlag as ft, useChecks as g, isValueDiffRun as gn, RecceInstanceInfoProvider as gt, updateCheck as h, isValueDiffDetailRun as hn, formatDuration as ht, rename as i, trackSingleEnvironment as in, supportsHistogramDiff as it, LineageViewContext as j, axiosClient as jn, submitQueryBase as jt, createDataGridFromData as k, getModelInfo as kn, createLineageDiffCheck as kt, createSimpleCheck as l, isQueryBaseRun as ln, useRecceServerFlag as lt, reorderChecks as m, isTopKDiffRun as mn, markRelaunchHintCompleted as mt, importState as n, trackPreviewChangeFeedback as nn, SquareIcon as nt, shareState as o, RunToolbar as on, LineageGraphContextProvider as ot, markAsPresetCheck as p, isRowCountRun as pn, markOnboardingCompleted as pt, mergeKeys as q, trackEnvironmentConfig as qt, isStateSyncing as r, trackShareState as rn, HistogramDiffForm as rt, syncState as s, isHistogramDiffRun as sn, useLineageGraphContext as st, exportState as t, trackPreviewChange as tn, HistogramChart as tt, deleteCheck as u, isQueryDiffRun as un, IdleTimeoutProvider as ut, runTypeHasRef as v, isLineageGraphColumnNode as vn, useRecceInstanceInfo as vt, TopKDiffForm as w, union as wn, EmptyRowsRenderer as wt, ValueDiffDetailResultView as x, selectDownstream as xn, useApiConfig as xt, ValueDiffResultView as y, isLineageGraphNode as yn, ApiConfigProvider as yt, IconExport as z, darkTheme as zn, submitRunFromCheck as zt };
8204
- //# sourceMappingURL=state-BbgVwFV2.mjs.map
8225
+ export { queryRowCount as $, trackLineageViewRender as $t, ColumnNameCell as A, getModelInfo as An, createLineageDiffCheck as At, IconExport as B, darkTheme as Bn, submitRunFromCheck as Bt, TopKSummaryList as C, selectUpstream as Cn, useApiConfigSafe as Ct, QueryDiffResultView as D, getLineage as Dn, submitValueDiff as Dt, QueryResultView as E, getCll as En, ScreenshotDataGrid as Et, RecceActionContextProvider as F, Toaster as Fn, cancelRun as Ft, deltaPercentageString as G, LINEAGE_SELECTION_ACTION as Gt, IconInfo as H, token as Hn, EXPLORE_ACTION as Ht, useRecceActionContext as I, ToasterProvider as In, getRun as It, mergeKeys as J, trackEnvironmentConfig as Jt, DiffText as K, trackColumnLevelLineage as Kt, useAppLocation as L, toaster as Ln, listRuns as Lt, useLineageViewContext as M, axiosClient as Mn, submitQueryBase as Mt, useLineageViewContextSafe as N, reactQueryClient as Nn, submitQueryDiff as Nt, ProfileDiffResultView as O, getLineageDiff as On, submitValueDiffDetail as Ot, RecceActionContext as P, ScreenshotBox as Pn, aggregateRuns as Pt, queryModelRowCount as Q, trackLineageSelection as Qt, RunModal as R, useToaster as Rn, searchRuns as Rt, TopKDiffResultView as S, selectDownstream as Sn, useApiConfig as St, RowCountDiffResultView as T, union as Tn, EmptyRowsRenderer as Tt, IconSave as U, EXPLORE_FORM_EVENT as Ut, IconImport as V, lightTheme as Vn, waitRun as Vt, IconSync as W, EXPLORE_SOURCE as Wt, submitRowCountDiff as X, trackExploreActionForm as Xt, mergeKeysWithStatus as Y, trackExploreAction as Yt, fetchModelRowCount as Z, trackHistoryAction as Zt, findByRunType as _, isValueDiffRun as _n, RecceInstanceInfoProvider as _t, saveAs as a, trackSingleEnvironment as an, supportsHistogramDiff as at, ValueDiffForm as b, isLineageGraphNode as bn, ApiConfigProvider as bt, createCheckByRun as c, isHistogramDiffRun as cn, useLineageGraphContext as ct, getCheck as d, isQueryDiffRun as dn, IdleTimeoutProvider as dt, trackMultiNodesAction as en, ProfileDiffForm as et, listChecks as f, isQueryRun as fn, useIdleTimeout as ft, useChecks as g, isValueDiffDetailRun as gn, formatDuration as gt, updateCheck as h, isTopKDiffRun as hn, markRelaunchHintCompleted as ht, rename as i, trackShareState as in, HistogramDiffForm as it, LineageViewContext as j, getServerInfo as jn, submitQuery as jt, createDataGridFromData as k, getLineageWithError as kn, submitProfileDiff as kt, createSimpleCheck as l, isProfileDiffRun as ln, useRunsAggregated as lt, reorderChecks as m, isRowCountRun as mn, markOnboardingCompleted as mt, importState as n, trackPreviewChange as nn, HistogramChart as nt, shareState as o, trackStateAction as on, useModelColumns_default as ot, markAsPresetCheck as p, isRowCountDiffRun as pn, getServerFlag as pt, useClipBoardToast as q, trackCopyToClipboard as qt, isStateSyncing as r, trackPreviewChangeFeedback as rn, SquareIcon as rt, syncState as s, RunToolbar as sn, LineageGraphContextProvider as st, exportState as t, trackNavigation as tn, HistogramDiffResultView as tt, deleteCheck as u, isQueryBaseRun as un, useRecceServerFlag as ut, runTypeHasRef as v, COLUMN_HEIGHT as vn, useRecceInstanceContext as vt, TopKDiffForm as w, toReactFlow as wn, cacheKeys as wt, ValueDiffDetailResultView as x, layout as xn, useApiClient as xt, ValueDiffResultView as y, isLineageGraphColumnNode as yn, useRecceInstanceInfo as yt, IconEdit as z, colors as zn, submitRun as zt };
8226
+ //# sourceMappingURL=state-DyHCt6IJ.mjs.map