@iblai/data-layer 1.33.1 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -72778,6 +72778,12 @@ declare const useGetLlmUsageObservationsQuery: <R extends Record<string, any> =
72778
72778
 
72779
72779
  type DownloadReportArgs = {
72780
72780
  url: string;
72781
+ /**
72782
+ * CSV only. Sets the download's `clean` param: `true` for the readable
72783
+ * format (line breaks kept in cells), `false` for raw. Omit to use the
72784
+ * platform default.
72785
+ */
72786
+ clean?: boolean;
72781
72787
  };
72782
72788
  type DownloadReportTrigger = (args: DownloadReportArgs) => {
72783
72789
  unwrap: () => Promise<Blob>;
package/dist/index.esm.js CHANGED
@@ -43639,11 +43639,19 @@ useGetFinancialStatsQuery,
43639
43639
  */
43640
43640
  useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesQuery, useGetTranscriptsMessagesDetailsQuery, useTimeTrackingMutation, useGetTranscriptsConversationHeadlineQuery, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetLearnerDetailsQuery, useGetLlmUsageMetricsQuery, useGetLlmUsageTracesQuery, useGetLlmUsageObservationsQuery, } = analyticsApiSlice;
43641
43641
 
43642
+ const withCleanParam = (url, clean) => {
43643
+ var _a;
43644
+ if (clean === undefined)
43645
+ return url;
43646
+ const parsed = new URL(url, (_a = globalThis.location) === null || _a === void 0 ? void 0 : _a.href);
43647
+ parsed.searchParams.set('clean', String(clean));
43648
+ return parsed.toString();
43649
+ };
43642
43650
  const useLazyGetDownloadReportFromURLQuery = () => {
43643
- const fetchReportBlob = useCallback(({ url }) => {
43651
+ const fetchReportBlob = useCallback(({ url, clean }) => {
43644
43652
  const promise = (async () => {
43645
43653
  const authHeaders = await getHeaders(SERVICES.DM);
43646
- const response = await fetch(url, {
43654
+ const response = await fetch(withCleanParam(url, clean), {
43647
43655
  method: 'GET',
43648
43656
  credentials: 'omit',
43649
43657
  headers: { ...(authHeaders !== null && authHeaders !== void 0 ? authHeaders : {}) },