@bluecopa/react 0.1.98 → 0.1.99

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 (49) hide show
  1. package/dist/hooks/useDatabox.d.ts +24 -0
  2. package/dist/hooks/useDatabox.d.ts.map +1 -0
  3. package/dist/hooks/useDropFileToDatabox.d.ts +14 -0
  4. package/dist/hooks/useDropFileToDatabox.d.ts.map +1 -0
  5. package/dist/hooks/useGetDataboxFile.d.ts +11 -0
  6. package/dist/hooks/useGetDataboxFile.d.ts.map +1 -0
  7. package/dist/hooks/useGetDataboxFileDownloadUrl.d.ts +12 -0
  8. package/dist/hooks/useGetDataboxFileDownloadUrl.d.ts.map +1 -0
  9. package/dist/hooks/useGetDataboxFileRuns.d.ts +11 -0
  10. package/dist/hooks/useGetDataboxFileRuns.d.ts.map +1 -0
  11. package/dist/hooks/useGetDataboxFileStatus.d.ts +12 -0
  12. package/dist/hooks/useGetDataboxFileStatus.d.ts.map +1 -0
  13. package/dist/hooks/useGetDataboxFolder.d.ts +11 -0
  14. package/dist/hooks/useGetDataboxFolder.d.ts.map +1 -0
  15. package/dist/hooks/useGetDataboxFolderDatasets.d.ts +12 -0
  16. package/dist/hooks/useGetDataboxFolderDatasets.d.ts.map +1 -0
  17. package/dist/hooks/useGetDataboxFolderDuplicates.d.ts +13 -0
  18. package/dist/hooks/useGetDataboxFolderDuplicates.d.ts.map +1 -0
  19. package/dist/hooks/useGetDataboxFolderFiles.d.ts +11 -0
  20. package/dist/hooks/useGetDataboxFolderFiles.d.ts.map +1 -0
  21. package/dist/hooks/useGetDataboxFolderSchema.d.ts +11 -0
  22. package/dist/hooks/useGetDataboxFolderSchema.d.ts.map +1 -0
  23. package/dist/hooks/useGetDataboxSchemaHistory.d.ts +11 -0
  24. package/dist/hooks/useGetDataboxSchemaHistory.d.ts.map +1 -0
  25. package/dist/hooks/useGetDataboxTrashFiles.d.ts +11 -0
  26. package/dist/hooks/useGetDataboxTrashFiles.d.ts.map +1 -0
  27. package/dist/hooks/useGetDatasetDuplicates.d.ts +13 -0
  28. package/dist/hooks/useGetDatasetDuplicates.d.ts.map +1 -0
  29. package/dist/hooks/useGetDatasetExceptions.d.ts +12 -0
  30. package/dist/hooks/useGetDatasetExceptions.d.ts.map +1 -0
  31. package/dist/hooks/useMetric.d.ts.map +1 -1
  32. package/dist/hooks/usePermanentDeleteDataboxFiles.d.ts +12 -0
  33. package/dist/hooks/usePermanentDeleteDataboxFiles.d.ts.map +1 -0
  34. package/dist/hooks/useRestoreDataboxFile.d.ts +10 -0
  35. package/dist/hooks/useRestoreDataboxFile.d.ts.map +1 -0
  36. package/dist/hooks/useRunDataboxFolder.d.ts +11 -0
  37. package/dist/hooks/useRunDataboxFolder.d.ts.map +1 -0
  38. package/dist/hooks/useRunPublishedDefinition.d.ts +2 -0
  39. package/dist/hooks/useRunPublishedDefinition.d.ts.map +1 -1
  40. package/dist/hooks/useTrashDataboxFiles.d.ts +13 -0
  41. package/dist/hooks/useTrashDataboxFiles.d.ts.map +1 -0
  42. package/dist/hooks/useUpdateDataboxFolderSchema.d.ts +10 -0
  43. package/dist/hooks/useUpdateDataboxFolderSchema.d.ts.map +1 -0
  44. package/dist/index.d.ts +19 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.es.js +852 -622
  47. package/dist/types/index.d.ts +5 -0
  48. package/dist/types/index.d.ts.map +1 -1
  49. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,10 +1,10 @@
1
- import { useQuery as s, useMutation as a, useQueryClient as f } from "@tanstack/react-query";
2
- import * as A from "@tanstack/react-query";
1
+ import { useQuery as s, useMutation as o, useQueryClient as f } from "@tanstack/react-query";
2
+ import * as P from "@tanstack/react-query";
3
3
  import { copaApi as r, copaGetConfig as p, copaUtils as R } from "@bluecopa/core";
4
4
  export * from "@bluecopa/core";
5
- import { useState as h, useRef as S, useEffect as k } from "react";
6
- import { ReactQueryDevtools as Ln } from "@tanstack/react-query-devtools";
7
- const C = {
5
+ import { useState as D, useRef as S, useEffect as x } from "react";
6
+ import { ReactQueryDevtools as yn } from "@tanstack/react-query-devtools";
7
+ const k = {
8
8
  enabled: !0,
9
9
  staleTime: 1e3 * 60 * 5,
10
10
  // 5 minutes
@@ -15,394 +15,395 @@ const C = {
15
15
  };
16
16
  function E(e = {}) {
17
17
  return {
18
- ...C,
18
+ ...k,
19
19
  ...e
20
20
  };
21
21
  }
22
22
  function K(e = 5e3) {
23
- return new Promise((n) => setTimeout(n, e));
23
+ return new Promise((t) => setTimeout(t, e));
24
24
  }
25
- function T(e, n) {
26
- const t = Object.entries(e).filter(([u, o]) => !o).map(([u]) => u);
27
- if (t.length > 0)
25
+ function T(e, t) {
26
+ const n = Object.entries(e).filter(([a, u]) => !u).map(([a]) => a);
27
+ if (n.length > 0)
28
28
  throw new Error(
29
- n || `Missing required parameters: ${t.join(", ")}`
29
+ t || `Missing required parameters: ${n.join(", ")}`
30
30
  );
31
31
  }
32
- function i(e, n, t = 0) {
33
- return async () => (await K(t), await e());
32
+ function i(e, t, n = 0) {
33
+ return async () => (await K(n), await e());
34
34
  }
35
35
  function c(e) {
36
- const n = E(e.options);
36
+ const t = E(e.options);
37
37
  return {
38
38
  queryKey: e.queryKey,
39
39
  queryFn: e.queryFn,
40
- enabled: e.enabled !== void 0 ? e.enabled : n.enabled,
41
- staleTime: n.staleTime,
42
- gcTime: n.gcTime,
43
- retry: n.retry,
44
- retryDelay: n.retryDelay,
45
- onSuccess: n.onSuccess,
46
- onError: n.onError
40
+ enabled: e.enabled !== void 0 ? e.enabled : t.enabled,
41
+ staleTime: t.staleTime,
42
+ gcTime: t.gcTime,
43
+ retry: t.retry,
44
+ retryDelay: t.retryDelay,
45
+ onSuccess: t.onSuccess,
46
+ onError: t.onError
47
47
  };
48
48
  }
49
- function W(e, n = {}) {
50
- const t = n.enabled !== !1 && !!e, u = n.solutionBindings ?? null, o = i(async () => {
49
+ function U(e, t = {}) {
50
+ const n = t.enabled !== !1 && !!e, a = t.solutionBindings ?? null, u = i(async () => {
51
51
  if (!e)
52
52
  throw new Error("Metric ID is required");
53
53
  return console.log("Fetching metric data..."), await r.metric.getData(e, {
54
- solutionBindings: n.solutionBindings
54
+ solutionBindings: t.solutionBindings,
55
+ limit: t.limit
55
56
  });
56
57
  }), l = c({
57
- queryKey: ["metricData", e, u],
58
- queryFn: o,
59
- enabled: t,
60
- options: n
58
+ queryKey: ["metricData", e, a, t.limit ?? null],
59
+ queryFn: u,
60
+ enabled: n,
61
+ options: t
61
62
  });
62
63
  return s(l);
63
64
  }
64
- function x(e, n = {}) {
65
- const t = !!e, u = i(async () => {
65
+ function v(e, t = {}) {
66
+ const n = !!e, a = i(async () => {
66
67
  if (!e)
67
68
  throw new Error("Dataset ID is required");
68
69
  return console.log("Fetching dataset data..."), await r.dataset.getSampleData({
69
70
  datasetId: e,
70
71
  dataFilter: "all_data"
71
72
  });
72
- }), o = c({
73
+ }), u = c({
73
74
  queryKey: ["datasetData", e],
74
- queryFn: u,
75
- enabled: t,
76
- options: n
75
+ queryFn: a,
76
+ enabled: n,
77
+ options: t
77
78
  });
78
- return s(o);
79
+ return s(u);
79
80
  }
80
- function M(e = {}) {
81
- return a({
82
- mutationFn: async (n) => await r.chat.createThread(n),
81
+ function W(e = {}) {
82
+ return o({
83
+ mutationFn: async (t) => await r.chat.createThread(t),
83
84
  onSuccess: e.onSuccess,
84
85
  onError: e.onError,
85
86
  retry: e.retry ?? 2,
86
- retryDelay: e.retryDelay ?? ((n) => Math.min(1e3 * 2 ** n, 3e4))
87
+ retryDelay: e.retryDelay ?? ((t) => Math.min(1e3 * 2 ** t, 3e4))
87
88
  });
88
89
  }
89
- function I(e, n = {}) {
90
- const t = n.enabled !== !1 && !!e, u = i(async () => (T(
90
+ function M(e, t = {}) {
91
+ const n = t.enabled !== !1 && !!e, a = i(async () => (T(
91
92
  { threadId: e },
92
93
  "Thread ID is required to fetch comments"
93
- ), await r.chat.getCommentsByThreadId(e))), o = c({
94
+ ), await r.chat.getCommentsByThreadId(e))), u = c({
94
95
  queryKey: ["chat", "comments", e],
95
- queryFn: u,
96
- enabled: t,
97
- options: n
96
+ queryFn: a,
97
+ enabled: n,
98
+ options: t
98
99
  });
99
- return s(o);
100
+ return s(u);
100
101
  }
101
102
  function Q(e = {}) {
102
- return a({
103
- mutationFn: async (n) => await r.chat.postComment(n),
103
+ return o({
104
+ mutationFn: async (t) => await r.chat.postComment(t),
104
105
  onSuccess: e.onSuccess,
105
106
  onError: e.onError,
106
107
  retry: e.retry ?? 2,
107
- retryDelay: e.retryDelay ?? ((n) => Math.min(1e3 * 2 ** n, 3e4))
108
+ retryDelay: e.retryDelay ?? ((t) => Math.min(1e3 * 2 ** t, 3e4))
108
109
  });
109
110
  }
110
111
  function _(e = {}) {
111
- return a({
112
- mutationFn: async (n) => await r.chat.updateComment(n),
112
+ return o({
113
+ mutationFn: async (t) => await r.chat.updateComment(t),
113
114
  onSuccess: e.onSuccess,
114
115
  onError: e.onError,
115
116
  retry: e.retry ?? 2,
116
- retryDelay: e.retryDelay ?? ((n) => Math.min(1e3 * 2 ** n, 3e4))
117
+ retryDelay: e.retryDelay ?? ((t) => Math.min(1e3 * 2 ** t, 3e4))
117
118
  });
118
119
  }
119
- function N(e = {}) {
120
- return a({
121
- mutationFn: async (n) => await r.chat.deleteComment(n),
120
+ function H(e = {}) {
121
+ return o({
122
+ mutationFn: async (t) => await r.chat.deleteComment(t),
122
123
  onSuccess: e.onSuccess,
123
124
  onError: e.onError,
124
125
  retry: e.retry ?? 2,
125
- retryDelay: e.retryDelay ?? ((n) => Math.min(1e3 * 2 ** n, 3e4))
126
+ retryDelay: e.retryDelay ?? ((t) => Math.min(1e3 * 2 ** t, 3e4))
126
127
  });
127
128
  }
128
- function H(e = {}) {
129
- return a({
130
- mutationFn: async (n) => await r.chat.subscribeUser(n),
129
+ function N(e = {}) {
130
+ return o({
131
+ mutationFn: async (t) => await r.chat.subscribeUser(t),
131
132
  onSuccess: e.onSuccess,
132
133
  onError: e.onError,
133
134
  retry: e.retry ?? 2,
134
- retryDelay: e.retryDelay ?? ((n) => Math.min(1e3 * 2 ** n, 3e4))
135
+ retryDelay: e.retryDelay ?? ((t) => Math.min(1e3 * 2 ** t, 3e4))
135
136
  });
136
137
  }
137
138
  function L(e = {}) {
138
- return a({
139
- mutationFn: async (n) => await r.chat.unsubscribeUser(n),
139
+ return o({
140
+ mutationFn: async (t) => await r.chat.unsubscribeUser(t),
140
141
  onSuccess: e.onSuccess,
141
142
  onError: e.onError,
142
143
  retry: e.retry ?? 2,
143
- retryDelay: e.retryDelay ?? ((n) => Math.min(1e3 * 2 ** n, 3e4))
144
+ retryDelay: e.retryDelay ?? ((t) => Math.min(1e3 * 2 ** t, 3e4))
144
145
  });
145
146
  }
146
- function z(e, n, t = {}) {
147
- const u = t.enabled !== !1 && !!e && !!n, o = i(async () => (T(
148
- { userId: e, threadId: n },
147
+ function z(e, t, n = {}) {
148
+ const a = n.enabled !== !1 && !!e && !!t, u = i(async () => (T(
149
+ { userId: e, threadId: t },
149
150
  "User ID and Thread ID are required to check subscription status"
150
- ), await r.chat.checkSubscriptionStatus(e, n))), l = c({
151
- queryKey: ["chat", "subscription", e, n],
152
- queryFn: o,
153
- enabled: u,
154
- options: t
151
+ ), await r.chat.checkSubscriptionStatus(e, t))), l = c({
152
+ queryKey: ["chat", "subscription", e, t],
153
+ queryFn: u,
154
+ enabled: a,
155
+ options: n
155
156
  });
156
157
  return s(l);
157
158
  }
158
159
  function j(e = {}) {
159
- return a({
160
- mutationFn: async (n) => await r.statement.createNewRun(n),
160
+ return o({
161
+ mutationFn: async (t) => await r.statement.createNewRun(t),
161
162
  ...e
162
163
  });
163
164
  }
164
- function J(e, n = {}) {
165
- const t = !!e, u = i(async () => {
165
+ function J(e, t = {}) {
166
+ const n = !!e, a = i(async () => {
166
167
  if (!e)
167
168
  throw new Error("Dataset ID is required");
168
169
  return console.log("Fetching dataset data..."), await r.dataset.getData(e, {
169
- limit: n.limit || 1e3
170
+ limit: t.limit || 1e3
170
171
  });
171
- }), o = c({
172
+ }), u = c({
172
173
  queryKey: ["datasetData", e],
173
- queryFn: u,
174
- enabled: t,
175
- options: n
174
+ queryFn: a,
175
+ enabled: n,
176
+ options: t
176
177
  });
177
- return s(o);
178
+ return s(u);
178
179
  }
179
180
  function Y() {
180
- const e = i(async () => (console.log("Fetching dataset data..."), await r.dataset.getAllDatasets())), n = c({
181
+ const e = i(async () => (console.log("Fetching dataset data..."), await r.dataset.getAllDatasets())), t = c({
181
182
  queryKey: ["datasetData"],
182
183
  queryFn: e,
183
184
  enabled: !0
184
185
  });
185
- return s(n);
186
+ return s(t);
186
187
  }
187
188
  function $() {
188
- const e = i(async () => await r.dataset.getVirtualDatasets()), n = c({
189
+ const e = i(async () => await r.dataset.getVirtualDatasets()), t = c({
189
190
  queryKey: ["virtualDatasets"],
190
191
  queryFn: e,
191
192
  enabled: !0
192
193
  });
193
- return s(n);
194
+ return s(t);
194
195
  }
195
- function X(e, n, t, u = {}) {
196
- const o = !!e && !!n && !!t, l = i(async () => {
197
- if (!e || !n || !t)
196
+ function X(e, t, n, a = {}) {
197
+ const u = !!e && !!t && !!n, l = i(async () => {
198
+ if (!e || !t || !n)
198
199
  throw new Error("Key, contentType, and method are required");
199
200
  return console.log("Getting signed file URL..."), await r.files.getFileUrlByFileId({
200
201
  key: e,
201
- contentType: n,
202
- method: t
202
+ contentType: t,
203
+ method: n
203
204
  });
204
205
  }), y = c({
205
- queryKey: ["file", "getFileUrlByFileId", e, n, t],
206
+ queryKey: ["file", "getFileUrlByFileId", e, t, n],
206
207
  queryFn: l,
207
- enabled: o,
208
- options: u
208
+ enabled: u,
209
+ options: a
209
210
  });
210
211
  return s(y);
211
212
  }
212
- function Z(e, n, t = {}) {
213
- const u = e?.trim(), o = n?.trim(), l = !!(u && o), y = i(async () => await r.files.getFileByFolderIdAndName({
214
- folderId: u,
215
- name: o
216
- })), g = c({
213
+ function Z(e, t, n = {}) {
214
+ const a = e?.trim(), u = t?.trim(), l = !!(a && u), y = i(async () => await r.files.getFileByFolderIdAndName({
215
+ folderId: a,
216
+ name: u
217
+ })), d = c({
217
218
  queryKey: [
218
219
  "file",
219
220
  "getFileByFolderIdAndName",
220
- u,
221
- o
221
+ a,
222
+ u
222
223
  ],
223
224
  queryFn: y,
224
225
  enabled: l,
225
- options: t
226
+ options: n
226
227
  });
227
- return s(g);
228
+ return s(d);
228
229
  }
229
- function ee(e, n, t = {}) {
230
- const u = !!e && !!n, o = i(async () => {
231
- if (!e || !n)
230
+ function ee(e, t, n = {}) {
231
+ const a = !!e && !!t, u = i(async () => {
232
+ if (!e || !t)
232
233
  throw new Error("Type and ID are required");
233
- return console.log("Fetching published workbook by ID..."), await r.workbook.getPublishedWorkbookById({ type: e, id: n });
234
+ return console.log("Fetching published workbook by ID..."), await r.workbook.getPublishedWorkbookById({ type: e, id: t });
234
235
  }), l = c({
235
- queryKey: ["workbook", "getPublishedWorkbookById", e, n],
236
- queryFn: o,
237
- enabled: u,
238
- options: t
236
+ queryKey: ["workbook", "getPublishedWorkbookById", e, t],
237
+ queryFn: u,
238
+ enabled: a,
239
+ options: n
239
240
  });
240
241
  return s(l);
241
242
  }
242
- function ne(e, n = {}) {
243
- const t = !!e, u = i(async () => {
243
+ function te(e, t = {}) {
244
+ const n = !!e, a = i(async () => {
244
245
  if (!e)
245
246
  throw new Error("Run ID is required");
246
247
  return await r.statement.getRunResultById(e);
247
- }), o = c({
248
+ }), u = c({
248
249
  queryKey: ["statement", "getRunResultById", e],
249
- queryFn: u,
250
- enabled: t,
251
- options: n
250
+ queryFn: a,
251
+ enabled: n,
252
+ options: t
252
253
  });
253
- return s(o);
254
+ return s(u);
254
255
  }
255
- function te(e, n = {}) {
256
- const t = !!e, u = i(async () => {
256
+ function ne(e, t = {}) {
257
+ const n = !!e, a = i(async () => {
257
258
  if (!e)
258
259
  throw new Error("View ID is required");
259
260
  return await r.statement.getRunsByViewId(e);
260
- }), o = c({
261
+ }), u = c({
261
262
  queryKey: ["statement", "getRunsByViewId", e],
262
- queryFn: u,
263
- enabled: t,
264
- options: n
263
+ queryFn: a,
264
+ enabled: n,
265
+ options: t
265
266
  });
266
- return s(o);
267
+ return s(u);
267
268
  }
268
- function re(e, n, t, u = {}) {
269
- const o = !!e, l = i(async () => {
269
+ function re(e, t, n, a = {}) {
270
+ const u = !!e, l = i(async () => {
270
271
  if (!e)
271
272
  throw new Error("Statement ID is required");
272
273
  return await r.statement.getData({
273
274
  statementId: e,
274
- viewId: n || void 0,
275
- runId: t || void 0
275
+ viewId: t || void 0,
276
+ runId: n || void 0
276
277
  });
277
278
  }), y = c({
278
- queryKey: ["statement", "getData", e, n, t],
279
+ queryKey: ["statement", "getData", e, t, n],
279
280
  queryFn: l,
280
- enabled: o,
281
- options: u
281
+ enabled: u,
282
+ options: a
282
283
  });
283
284
  return s(y);
284
285
  }
285
- function ue(e, n = {}) {
286
- const t = !!e, u = i(async () => {
286
+ function ae(e, t = {}) {
287
+ const n = !!e, a = i(async () => {
287
288
  if (!e)
288
289
  throw new Error("Table ID is required");
289
290
  return console.log("Fetching table by ID..."), await r.inputTable.getTableById(e);
290
- }), o = c({
291
+ }), u = c({
291
292
  queryKey: ["inputTable", "getTableById", e],
292
- queryFn: u,
293
- enabled: t,
294
- options: n
293
+ queryFn: a,
294
+ enabled: n,
295
+ options: t
295
296
  });
296
- return s(o);
297
+ return s(u);
297
298
  }
298
- function oe(e, n = {}) {
299
- const t = !!e, u = i(async () => {
299
+ function oe(e, t = {}) {
300
+ const n = !!e, a = i(async () => {
300
301
  if (!e)
301
302
  throw new Error("View ID is required");
302
303
  return await r.statement.getViewById(e);
303
- }), o = c({
304
+ }), u = c({
304
305
  queryKey: ["statement", "getViewById", e],
305
- queryFn: u,
306
- enabled: t,
307
- options: n
306
+ queryFn: a,
307
+ enabled: n,
308
+ options: t
308
309
  });
309
- return s(o);
310
+ return s(u);
310
311
  }
311
- function ae(e, n = {}) {
312
- const t = !!e, u = i(async () => {
312
+ function ue(e, t = {}) {
313
+ const n = !!e, a = i(async () => {
313
314
  if (!e)
314
315
  throw new Error("Sheet ID is required");
315
316
  return await r.statement.getViewsBySheetId(e);
316
- }), o = c({
317
+ }), u = c({
317
318
  queryKey: ["statement", "getViewsBySheetId", e],
318
- queryFn: u,
319
- enabled: t,
320
- options: n
319
+ queryFn: a,
320
+ enabled: n,
321
+ options: t
321
322
  });
322
- return s(o);
323
+ return s(u);
323
324
  }
324
- function se(e, n = {}) {
325
- const t = !!e, u = i(async () => {
325
+ function se(e, t = {}) {
326
+ const n = !!e, a = i(async () => {
326
327
  if (!e)
327
328
  throw new Error("Type is required");
328
329
  return console.log("Fetching workbooks by type..."), await r.workbook.getWorkbooksByType(e);
329
- }), o = c({
330
+ }), u = c({
330
331
  queryKey: ["workbook", "getWorkbooksByType", e],
331
- queryFn: u,
332
- enabled: t,
333
- options: n
332
+ queryFn: a,
333
+ enabled: n,
334
+ options: t
334
335
  });
335
- return s(o);
336
+ return s(u);
336
337
  }
337
- var V = /* @__PURE__ */ ((e) => (e.Succeeded = "Succeeded", e.Failed = "Failed", e.Running = "Running", e.NotFound = "NotFound", e))(V || {});
338
+ var C = /* @__PURE__ */ ((e) => (e.Succeeded = "Succeeded", e.Failed = "Failed", e.Running = "Running", e.NotFound = "NotFound", e))(C || {});
338
339
  function ie(e = {}) {
339
- return a({
340
- mutationFn: async (n) => (console.log("Fetching workflow instance status..."), await r.workflow.getWorkflowInstanceStatusById(n)),
340
+ return o({
341
+ mutationFn: async (t) => (console.log("Fetching workflow instance status..."), await r.workflow.getWorkflowInstanceStatusById(t)),
341
342
  ...e
342
343
  });
343
344
  }
344
- function ce(e, n = {}) {
345
- const t = !!e && e.length > 0, u = i(async () => {
345
+ function ce(e, t = {}) {
346
+ const n = !!e && e.length > 0, a = i(async () => {
346
347
  if (!e || e.length === 0)
347
348
  throw new Error("Worksheet IDs are required");
348
349
  return console.log("Fetching worksheets..."), await r.worksheet.getWorksheets(e);
349
- }), o = c({
350
+ }), u = c({
350
351
  queryKey: ["worksheet", "getWorksheets", e],
351
- queryFn: u,
352
- enabled: t,
353
- options: n
352
+ queryFn: a,
353
+ enabled: n,
354
+ options: t
354
355
  });
355
- return s(o);
356
+ return s(u);
356
357
  }
357
- function le(e, n = {}) {
358
- const t = !!e, u = i(async () => {
358
+ function le(e, t = {}) {
359
+ const n = !!e, a = i(async () => {
359
360
  if (!e)
360
361
  throw new Error("Type is required");
361
362
  return console.log("Fetching worksheets by type..."), await r.worksheet.getWorksheetsByType(e);
362
- }), o = c({
363
+ }), u = c({
363
364
  queryKey: ["worksheet", "getWorksheetsByType", e],
364
- queryFn: u,
365
- enabled: t,
366
- options: n
365
+ queryFn: a,
366
+ enabled: n,
367
+ options: t
367
368
  });
368
- return s(o);
369
+ return s(u);
369
370
  }
370
- function ye(e, n, t = {}) {
371
+ function ye(e, t, n = {}) {
371
372
  const {
372
- limitParams: u = { limit: 2e3, limitFrom: "top" },
373
- pageParams: o,
373
+ limitParams: a = { limit: 2e3, limitFrom: "top" },
374
+ pageParams: u,
374
375
  sortParams: l,
375
376
  offsetParam: y,
376
- ...g
377
- } = t, w = g.enabled !== !1 && !!e && !!n, m = i(async () => {
378
- if (!e || !n)
377
+ ...d
378
+ } = n, w = d.enabled !== !1 && !!e && !!t, F = i(async () => {
379
+ if (!e || !t)
379
380
  throw new Error("Input table ID and view ID are required");
380
381
  return console.log("Fetching input table data..."), await r.inputTable.getData({
381
382
  inputTableId: e,
382
- inputTableViewId: n,
383
- pageParams: o,
384
- limitParams: u,
383
+ inputTableViewId: t,
384
+ pageParams: u,
385
+ limitParams: a,
385
386
  sortParams: l,
386
387
  offsetParam: y
387
388
  });
388
- }), F = c({
389
- queryKey: ["inputTableData", e, n],
390
- queryFn: m,
389
+ }), q = c({
390
+ queryKey: ["inputTableData", e, t],
391
+ queryFn: F,
391
392
  enabled: w,
392
- options: g
393
+ options: d
393
394
  });
394
- return s(F);
395
+ return s(q);
395
396
  }
396
- function ge() {
397
- const e = i(async () => (console.log("Fetching input table data..."), await r.inputTable.getInputTables())), n = c({
397
+ function de() {
398
+ const e = i(async () => (console.log("Fetching input table data..."), await r.inputTable.getInputTables())), t = c({
398
399
  queryKey: ["inputTableData"],
399
400
  queryFn: e,
400
401
  enabled: !0
401
402
  });
402
- return s(n);
403
+ return s(t);
403
404
  }
404
- function fe(e, n = {}) {
405
- const t = [
405
+ function fe(e, t = {}) {
406
+ const n = [
406
407
  "enabled",
407
408
  "staleTime",
408
409
  "gcTime",
@@ -410,121 +411,121 @@ function fe(e, n = {}) {
410
411
  "retryDelay",
411
412
  "onSuccess",
412
413
  "onError"
413
- ], { limit: u, offset: o, order: l, order_by: y, ...g } = n, w = {}, m = { limit: u, offset: o, order: l, order_by: y };
414
- Object.keys(g).forEach((d) => {
415
- t.includes(d) ? w[d] = g[d] : m[d] = g[d];
414
+ ], { limit: a, offset: u, order: l, order_by: y, ...d } = t, w = {}, F = { limit: a, offset: u, order: l, order_by: y };
415
+ Object.keys(d).forEach((g) => {
416
+ n.includes(g) ? w[g] = d[g] : F[g] = d[g];
416
417
  });
417
- const F = w.enabled !== !1 && !!e, b = i(async () => {
418
+ const q = w.enabled !== !1 && !!e, b = i(async () => {
418
419
  if (!e)
419
420
  throw new Error("Table ID is required");
420
- return console.log("Fetching input table rows..."), await r.inputTable.getRows(e, m);
421
- }), q = c({
422
- queryKey: ["inputTableRows", e, n],
421
+ return console.log("Fetching input table rows..."), await r.inputTable.getRows(e, F);
422
+ }), m = c({
423
+ queryKey: ["inputTableRows", e, t],
423
424
  queryFn: b,
424
- enabled: F,
425
+ enabled: q,
425
426
  options: w
426
427
  });
427
- return s(q);
428
+ return s(m);
428
429
  }
429
430
  function we(e = {}) {
430
- const n = f();
431
- return a({
432
- mutationFn: async (t) => (console.log("Inserting row into input table..."), await r.inputTable.insertRow(t.tableId, t.rowData)),
433
- onSuccess: (t, u, o) => {
434
- n.invalidateQueries({
435
- queryKey: ["inputTableRows", u.tableId]
436
- }), e.onSuccess?.(t);
431
+ const t = f();
432
+ return o({
433
+ mutationFn: async (n) => (console.log("Inserting row into input table..."), await r.inputTable.insertRow(n.tableId, n.rowData)),
434
+ onSuccess: (n, a, u) => {
435
+ t.invalidateQueries({
436
+ queryKey: ["inputTableRows", a.tableId]
437
+ }), e.onSuccess?.(n);
437
438
  },
438
- onError: (t, u, o) => {
439
- e.onError?.(t);
439
+ onError: (n, a, u) => {
440
+ e.onError?.(n);
440
441
  },
441
442
  ...e
442
443
  });
443
444
  }
444
- function de(e = {}) {
445
- const n = f();
446
- return a({
447
- mutationFn: async (t) => (console.log("Updating input table row..."), await r.inputTable.updateRow(
448
- t.tableId,
449
- t.updateData,
450
- t.rowId
445
+ function ge(e = {}) {
446
+ const t = f();
447
+ return o({
448
+ mutationFn: async (n) => (console.log("Updating input table row..."), await r.inputTable.updateRow(
449
+ n.tableId,
450
+ n.updateData,
451
+ n.rowId
451
452
  )),
452
- onSuccess: (t, u, o) => {
453
- n.invalidateQueries({
454
- queryKey: ["inputTableRows", u.tableId]
455
- }), e.onSuccess?.(t);
453
+ onSuccess: (n, a, u) => {
454
+ t.invalidateQueries({
455
+ queryKey: ["inputTableRows", a.tableId]
456
+ }), e.onSuccess?.(n);
456
457
  },
457
- onError: (t, u, o) => {
458
- e.onError?.(t);
458
+ onError: (n, a, u) => {
459
+ e.onError?.(n);
459
460
  },
460
461
  ...e
461
462
  });
462
463
  }
463
- function me(e = {}) {
464
- const n = f();
465
- return a({
466
- mutationFn: async (t) => (console.log("Deleting input table row(s)..."), await r.inputTable.deleteRow(
467
- t.tableId,
468
- t.rowId,
469
- t.idField
464
+ function Fe(e = {}) {
465
+ const t = f();
466
+ return o({
467
+ mutationFn: async (n) => (console.log("Deleting input table row(s)..."), await r.inputTable.deleteRow(
468
+ n.tableId,
469
+ n.rowId,
470
+ n.idField
470
471
  )),
471
- onSuccess: (t, u, o) => {
472
- n.invalidateQueries({
473
- queryKey: ["inputTableRows", u.tableId]
474
- }), e.onSuccess?.(t);
472
+ onSuccess: (n, a, u) => {
473
+ t.invalidateQueries({
474
+ queryKey: ["inputTableRows", a.tableId]
475
+ }), e.onSuccess?.(n);
475
476
  },
476
- onError: (t, u, o) => {
477
- e.onError?.(t);
477
+ onError: (n, a, u) => {
478
+ e.onError?.(n);
478
479
  },
479
480
  ...e
480
481
  });
481
482
  }
482
- function qe(e = {}) {
483
- return a({
484
- mutationFn: async (n) => (console.log("Running definition..."), await r.definition.runDefinition(n)),
483
+ function me(e = {}) {
484
+ return o({
485
+ mutationFn: async (t) => (console.log("Running definition..."), await r.definition.runDefinition(t)),
485
486
  ...e
486
487
  });
487
488
  }
488
- function Fe(e = {}) {
489
- return a({
490
- mutationFn: async (n) => await r.definition.runPublishedDefinition(n),
489
+ function qe(e = {}) {
490
+ return o({
491
+ mutationFn: async (t) => await r.definition.runPublishedDefinition(t),
491
492
  ...e
492
493
  });
493
494
  }
494
495
  function be(e = {}) {
495
- return a({
496
- mutationFn: async (n) => await r.definition.runSampleDefinition(n),
496
+ return o({
497
+ mutationFn: async (t) => await r.definition.runSampleDefinition(t),
497
498
  ...e
498
499
  });
499
500
  }
500
- function he(e = {}) {
501
- return a({
502
- mutationFn: async (n) => (console.log("Triggering HTTP workflow..."), await r.workflow.triggerHttpWorkflowById(n)),
501
+ function De(e = {}) {
502
+ return o({
503
+ mutationFn: async (t) => (console.log("Triggering HTTP workflow..."), await r.workflow.triggerHttpWorkflowById(t)),
503
504
  ...e
504
505
  });
505
506
  }
506
- function De(e = {}) {
507
- return a({
508
- mutationFn: async (n) => (console.log("Triggering workflow..."), await r.workflow.triggerWorkflowById(n)),
507
+ function he(e = {}) {
508
+ return o({
509
+ mutationFn: async (t) => (console.log("Triggering workflow..."), await r.workflow.triggerWorkflowById(t)),
509
510
  ...e
510
511
  });
511
512
  }
512
- function B(e = {}) {
513
- const n = e.enabled !== !1, t = i(async () => (console.log("Fetching user details..."), await r.user.getLoggedInUserDetails())), u = c({
513
+ function G(e = {}) {
514
+ const t = e.enabled !== !1, n = i(async () => (console.log("Fetching user details..."), await r.user.getLoggedInUserDetails())), a = c({
514
515
  queryKey: ["user"],
515
- queryFn: t,
516
- enabled: n,
516
+ queryFn: n,
517
+ enabled: t,
517
518
  options: e
518
519
  });
519
- return s(u);
520
+ return s(a);
520
521
  }
521
- const pe = B, G = ["Owner", "Editor", "Viewer", "ReadOnly"], D = r.permissions?.getPermissions;
522
- function Te(e, n, t = {}) {
523
- const u = t.enabled !== !1 && !!e?.trim(), o = i(
522
+ const pe = G, V = ["Owner", "Editor", "Viewer", "ReadOnly"], h = r.permissions?.getPermissions;
523
+ function Te(e, t, n = {}) {
524
+ const a = n.enabled !== !1 && !!e?.trim(), u = i(
524
525
  async () => {
525
526
  if (!e?.trim())
526
527
  return {};
527
- if (!D)
528
+ if (!h)
528
529
  throw new Error(
529
530
  "@bluecopa/core: permissions.getPermissions not available. Rebuild the core package."
530
531
  );
@@ -533,120 +534,120 @@ function Te(e, n, t = {}) {
533
534
  throw new Error(
534
535
  "@bluecopa/core: userId is required. Call copaSetConfig({ userId, ... }) before using useDocumentPermissions."
535
536
  );
536
- return await D({
537
+ return await h({
537
538
  objectId: e.trim(),
538
- objectType: n,
539
+ objectType: t,
539
540
  user: y.userId,
540
541
  userType: "User",
541
- relations: t.relations ?? G
542
+ relations: n.relations ?? V
542
543
  });
543
544
  },
544
545
  void 0,
545
546
  0
546
547
  ), l = c({
547
- queryKey: ["documentPermissions", e ?? "", n, t.relations ?? []],
548
- queryFn: o,
549
- enabled: u,
550
- options: t
548
+ queryKey: ["documentPermissions", e ?? "", t, n.relations ?? []],
549
+ queryFn: u,
550
+ enabled: a,
551
+ options: n
551
552
  });
552
553
  return s(l);
553
554
  }
554
555
  function Re(e = {}) {
555
- return a({
556
- mutationFn: async (n) => (console.log("Uploading file..."), await r.files.fileUpload(n)),
556
+ return o({
557
+ mutationFn: async (t) => (console.log("Uploading file..."), await r.files.fileUpload(t)),
557
558
  ...e
558
559
  });
559
560
  }
560
561
  function Se({
561
562
  fileId: e,
562
- contentType: n = "application/json",
563
- method: t = "GET"
564
- }, u = {}) {
565
- const o = !!e, l = i(async () => {
563
+ contentType: t = "application/json",
564
+ method: n = "GET"
565
+ }, a = {}) {
566
+ const u = !!e, l = i(async () => {
566
567
  if (!e)
567
568
  throw new Error("File ID is required");
568
- return console.log("Downloading file..."), await r.files.fileDownload({ fileId: e, contentType: n, method: t });
569
+ return console.log("Downloading file..."), await r.files.fileDownload({ fileId: e, contentType: t, method: n });
569
570
  }), y = c({
570
571
  queryKey: ["file", "fileDownload", e],
571
572
  queryFn: l,
572
- enabled: o,
573
- options: u
573
+ enabled: u,
574
+ options: a
574
575
  });
575
576
  return s(y);
576
577
  }
577
- function ke(e, n = {}) {
578
- const t = !!e, u = i(async () => {
578
+ function xe(e, t = {}) {
579
+ const n = !!e, a = i(async () => {
579
580
  if (!e)
580
581
  throw new Error("Task ID is required");
581
582
  return console.log("Fetching task details..."), await r.task.getTaskDetails({ taskId: e });
582
- }), o = c({
583
+ }), u = c({
583
584
  queryKey: ["task", "getTaskDetails", e],
584
- queryFn: u,
585
- enabled: t,
586
- options: n
585
+ queryFn: a,
586
+ enabled: n,
587
+ options: t
587
588
  });
588
- return s(o);
589
+ return s(u);
589
590
  }
590
- function Ce(e, n = {}) {
591
- const t = !!e, u = i(async () => {
591
+ function ke(e, t = {}) {
592
+ const n = !!e, a = i(async () => {
592
593
  if (!e)
593
594
  throw new Error("Workbook ID is required");
594
595
  return console.log("Fetching workbook details..."), await r.workbook.getWorkbookDetails({ workbookId: e });
595
- }), o = c({
596
+ }), u = c({
596
597
  queryKey: ["workbook", "getWorkbookDetails", e],
597
- queryFn: u,
598
- enabled: t,
599
- options: n
598
+ queryFn: a,
599
+ enabled: n,
600
+ options: t
600
601
  });
601
- return s(o);
602
+ return s(u);
602
603
  }
603
604
  function Ee(e = {}) {
604
- return a({
605
- mutationFn: async (n) => (console.log("Saving workbook..."), await r.workbook.saveWorkbook(n)),
605
+ return o({
606
+ mutationFn: async (t) => (console.log("Saving workbook..."), await r.workbook.saveWorkbook(t)),
606
607
  ...e
607
608
  });
608
609
  }
609
610
  function Ke(e = {}) {
610
- return a({
611
- mutationFn: async (n) => (console.log("Publishing workbook..."), await r.workbook.publishWorkbook(n)),
611
+ return o({
612
+ mutationFn: async (t) => (console.log("Publishing workbook..."), await r.workbook.publishWorkbook(t)),
612
613
  ...e
613
614
  });
614
615
  }
615
- function Ve(e = {}) {
616
- return a({
617
- mutationFn: async (n) => (console.log("Running recon workflow..."), await r.recon.runRecon(n)),
616
+ function Ce(e = {}) {
617
+ return o({
618
+ mutationFn: async (t) => (console.log("Running recon workflow..."), await r.recon.runRecon(t)),
618
619
  ...e
619
620
  });
620
621
  }
621
- function Be(e, n, t = {}) {
622
- const u = !!e && !!n, o = i(async () => {
623
- if (!e || !n)
622
+ function Ge(e, t, n = {}) {
623
+ const a = !!e && !!t, u = i(async () => {
624
+ if (!e || !t)
624
625
  throw new Error("Form instance ID and revision are required");
625
- return console.log("Fetching form schema..."), await r.form.getFormSchema({ formInstanceId: e, formRevision: n });
626
+ return console.log("Fetching form schema..."), await r.form.getFormSchema({ formInstanceId: e, formRevision: t });
626
627
  });
627
628
  return s(
628
629
  c({
629
- queryKey: ["form", "getFormSchema", e, n],
630
- queryFn: o,
631
- enabled: u,
632
- options: t
630
+ queryKey: ["form", "getFormSchema", e, t],
631
+ queryFn: u,
632
+ enabled: a,
633
+ options: n
633
634
  })
634
635
  );
635
636
  }
636
- function Ge(e, n = {}) {
637
- const t = !!e, u = i(async () => {
637
+ function Ve(e, t = {}) {
638
+ const n = !!e, a = i(async () => {
638
639
  if (!e)
639
640
  throw new Error("Form ID is required");
640
641
  return console.log("Fetching form data..."), await r.form.getFormData({ formId: e });
641
- }), o = c({
642
+ }), u = c({
642
643
  queryKey: ["form", "getFormData", e],
643
- queryFn: u,
644
- enabled: t,
645
- options: n
644
+ queryFn: a,
645
+ enabled: n,
646
+ options: t
646
647
  });
647
- return s(o);
648
+ return s(u);
648
649
  }
649
- function Pe(e, n = {}) {
650
+ function Be(e, t = {}) {
650
651
  return s({
651
652
  queryKey: ["form", e],
652
653
  queryFn: async () => {
@@ -655,62 +656,62 @@ function Pe(e, n = {}) {
655
656
  return await r.form.getFormById({ formId: e });
656
657
  },
657
658
  enabled: !!e,
658
- ...n
659
+ ...t
659
660
  });
660
661
  }
661
- function Oe(e = {}) {
662
- return a({
663
- mutationFn: async (n) => await r.form.createOrUpdateForm(n),
662
+ function Ie(e = {}) {
663
+ return o({
664
+ mutationFn: async (t) => await r.form.createOrUpdateForm(t),
664
665
  ...e
665
666
  });
666
667
  }
667
- function Ae(e = {}) {
668
- return a({
669
- mutationFn: async (n) => await r.audit.getAuditLogs(n),
668
+ function Pe(e = {}) {
669
+ return o({
670
+ mutationFn: async (t) => await r.audit.getAuditLogs(t),
670
671
  ...e
671
672
  });
672
673
  }
673
- function Ue(e = {}) {
674
- return a({
675
- mutationFn: async (n) => await r.audit.createAuditLog(n),
674
+ function Oe(e = {}) {
675
+ return o({
676
+ mutationFn: async (t) => await r.audit.createAuditLog(t),
676
677
  ...e
677
678
  });
678
679
  }
679
- function ve(e = {}) {
680
+ function Ae(e = {}) {
680
681
  return s({
681
682
  queryKey: ["templatedPipelines"],
682
683
  queryFn: async () => await r.templatedPipeline.getAllTemplatedPipelines(),
683
684
  ...e
684
685
  });
685
686
  }
686
- function We(e = {}) {
687
+ function Ue(e = {}) {
687
688
  return s({
688
689
  queryKey: ["reconWorkflows"],
689
690
  queryFn: async () => await r.recon.getAllReconWorkflows(),
690
691
  ...e
691
692
  });
692
693
  }
693
- function xe(e = {}) {
694
- return a({
695
- mutationFn: async (n) => await r.reconV2.createReconV2(n),
694
+ function ve(e = {}) {
695
+ return o({
696
+ mutationFn: async (t) => await r.reconV2.createReconV2(t),
696
697
  ...e
697
698
  });
698
699
  }
699
- function Me(e = {}) {
700
- return a({
701
- mutationFn: async (n) => await r.reconV2.updateReconV2(n),
700
+ function We(e = {}) {
701
+ return o({
702
+ mutationFn: async (t) => await r.reconV2.updateReconV2(t),
702
703
  ...e
703
704
  });
704
705
  }
705
- function Ie(e = {}) {
706
- return a({
707
- mutationFn: async (n) => await r.reconV2.deleteReconV2(n),
706
+ function Me(e = {}) {
707
+ return o({
708
+ mutationFn: async (t) => await r.reconV2.deleteReconV2(t),
708
709
  ...e
709
710
  });
710
711
  }
711
712
  function Qe(e = {}) {
712
- return a({
713
- mutationFn: async (n) => await r.reconV2.runReconV2(n),
713
+ return o({
714
+ mutationFn: async (t) => await r.reconV2.runReconV2(t),
714
715
  ...e
715
716
  });
716
717
  }
@@ -721,24 +722,24 @@ function _e(e = {}) {
721
722
  ...e
722
723
  });
723
724
  }
724
- function Ne(e, n = {}) {
725
- const t = e?.trim();
725
+ function He(e, t = {}) {
726
+ const n = e?.trim();
726
727
  return s({
727
- queryKey: ["reconV2", "runs", t],
728
- queryFn: async () => await r.reconV2.getReconV2Runs({ workflowId: t }),
729
- enabled: !!t,
730
- ...n
728
+ queryKey: ["reconV2", "runs", n],
729
+ queryFn: async () => await r.reconV2.getReconV2Runs({ workflowId: n }),
730
+ enabled: !!n,
731
+ ...t
731
732
  });
732
733
  }
733
- function He(e, n = {}) {
734
+ function Ne(e, t = {}) {
734
735
  return s({
735
736
  queryKey: ["reconV2", "runResult", e],
736
737
  queryFn: async () => await r.reconV2.getReconV2RunResult({ runId: e }),
737
738
  enabled: !!e,
738
- ...n
739
+ ...t
739
740
  });
740
741
  }
741
- function Le(e, n = {}) {
742
+ function Le(e, t = {}) {
742
743
  return s({
743
744
  queryKey: [
744
745
  "reconV2",
@@ -753,270 +754,270 @@ function Le(e, n = {}) {
753
754
  e
754
755
  ),
755
756
  enabled: !!e.runId && !!e.workflowId,
756
- ...n
757
+ ...t
757
758
  });
758
759
  }
759
760
  function ze(e = {}) {
760
- return a({
761
- mutationFn: async (n) => await r.reconV2.startReconV2Profile(n),
761
+ return o({
762
+ mutationFn: async (t) => await r.reconV2.startReconV2Profile(t),
762
763
  ...e
763
764
  });
764
765
  }
765
- function je(e, n = "left", t = {}) {
766
+ function je(e, t = "left", n = {}) {
766
767
  return s({
767
- queryKey: ["reconV2", "profile", e, n],
768
+ queryKey: ["reconV2", "profile", e, t],
768
769
  queryFn: async () => await r.reconV2.getReconV2ProfileResult({
769
770
  workflowId: e,
770
- side: n
771
+ side: t
771
772
  }),
772
773
  enabled: !!e,
773
- ...t
774
+ ...n
774
775
  });
775
776
  }
776
777
  function Je(e = {}) {
777
- return a({
778
- mutationFn: async (n) => await r.reconV2.startReconV2Clean(n),
778
+ return o({
779
+ mutationFn: async (t) => await r.reconV2.startReconV2Clean(t),
779
780
  ...e
780
781
  });
781
782
  }
782
- function Ye(e, n = "left", t = {}) {
783
+ function Ye(e, t = "left", n = {}) {
783
784
  return s({
784
- queryKey: ["reconV2", "clean", e, n],
785
+ queryKey: ["reconV2", "clean", e, t],
785
786
  queryFn: async () => await r.reconV2.getReconV2CleanResult({
786
787
  workflowId: e,
787
- side: n
788
+ side: t
788
789
  }),
789
790
  enabled: !!e,
790
- ...t
791
+ ...n
791
792
  });
792
793
  }
793
- function $e(e, n, t, u = {}) {
794
+ function $e(e, t, n, a = {}) {
794
795
  return s({
795
- queryKey: ["reconV2", "diff", e, t],
796
+ queryKey: ["reconV2", "diff", e, n],
796
797
  queryFn: async () => await r.reconV2.getReconV2Diff({
797
798
  runId: e,
798
- workflowId: n,
799
- prevRunId: t
799
+ workflowId: t,
800
+ prevRunId: n
800
801
  }),
801
- enabled: !!e && !!n && !!t,
802
- ...u
802
+ enabled: !!e && !!t && !!n,
803
+ ...a
803
804
  });
804
805
  }
805
- function Xe(e, n, t = {}) {
806
+ function Xe(e, t, n = {}) {
806
807
  return s({
807
808
  queryKey: ["reconV2", "explanation", e],
808
809
  queryFn: async () => await r.reconV2.getReconV2Explanation({
809
810
  runId: e,
810
- workflowId: n
811
+ workflowId: t
811
812
  }),
812
- enabled: !!e && !!n,
813
- ...t
813
+ enabled: !!e && !!t,
814
+ ...n
814
815
  });
815
816
  }
816
- const P = ["SUCCEEDED", "FAILED"];
817
- function Ze(e, n = {}) {
818
- const [t, u] = h(
817
+ const B = ["SUCCEEDED", "FAILED"];
818
+ function Ze(e, t = {}) {
819
+ const [n, a] = D(
819
820
  void 0
820
- ), [o, l] = h(!1), y = S(n.onComplete);
821
- return y.current = n.onComplete, k(() => {
821
+ ), [u, l] = D(!1), y = S(t.onComplete);
822
+ return y.current = t.onComplete, x(() => {
822
823
  if (!e)
823
824
  return;
824
- const g = p().websocketProvider;
825
- if (!g)
825
+ const d = p().websocketProvider;
826
+ if (!d)
826
827
  return;
827
- u(void 0), l(!1);
828
+ a(void 0), l(!1);
828
829
  const w = R.websocketUtils.ReconResultChannel;
829
- let m = !1;
830
- const F = () => {
831
- m || (m = !0, g.unbind(w, e));
830
+ let F = !1;
831
+ const q = () => {
832
+ F || (F = !0, d.unbind(w, e));
832
833
  };
833
- return g.bind(w, e, (b) => {
834
- let q;
834
+ return d.bind(w, e, (b) => {
835
+ let m;
835
836
  try {
836
- q = typeof b == "string" ? JSON.parse(b) : b;
837
+ m = typeof b == "string" ? JSON.parse(b) : b;
837
838
  } catch {
838
- q = { status: void 0 };
839
+ m = { status: void 0 };
839
840
  }
840
- u(q);
841
- const d = q?.status?.toUpperCase();
842
- d && P.includes(d) && (l(!0), y.current?.(q), F());
843
- }), F;
844
- }, [e]), { data: t, isTerminal: o };
841
+ a(m);
842
+ const g = m?.status?.toUpperCase();
843
+ g && B.includes(g) && (l(!0), y.current?.(m), q());
844
+ }), q;
845
+ }, [e]), { data: n, isTerminal: u };
845
846
  }
846
- function en(e = {}) {
847
+ function et(e = {}) {
847
848
  return s({
848
849
  queryKey: ["users"],
849
850
  queryFn: async () => await r.user.getAllUsers(),
850
851
  ...e
851
852
  });
852
853
  }
853
- function nn(e = {}) {
854
+ function tt(e = {}) {
854
855
  return s({
855
856
  queryKey: ["httpTriggers"],
856
857
  queryFn: async () => await r.workflow.getAllHttpTriggers(),
857
858
  ...e
858
859
  });
859
860
  }
860
- function tn(e = {}) {
861
- return a({
862
- mutationFn: async (n) => await r.process.markTaskDone(n),
861
+ function nt(e = {}) {
862
+ return o({
863
+ mutationFn: async (t) => await r.process.markTaskDone(t),
863
864
  ...e
864
865
  });
865
866
  }
866
- function rn(e = {}) {
867
- return a({
868
- mutationFn: async (n) => await r.process.reassignTask(n),
867
+ function rt(e = {}) {
868
+ return o({
869
+ mutationFn: async (t) => await r.process.reassignTask(t),
869
870
  ...e
870
871
  });
871
872
  }
872
- function un(e, n = {}) {
873
+ function at(e, t = {}) {
873
874
  return s({
874
875
  queryKey: ["processTriggers", e],
875
876
  queryFn: async () => await r.process.getTriggersBySheet(e),
876
877
  enabled: !!e,
877
- ...n
878
+ ...t
878
879
  });
879
880
  }
880
- function on(e = {}) {
881
- const n = f();
882
- return a({
883
- mutationFn: async (t) => await r.process.registerProcessTrigger(t),
884
- onSuccess: (t, u) => {
885
- n.invalidateQueries({
886
- queryKey: ["processTriggers", u.process_sheet_id]
881
+ function ot(e = {}) {
882
+ const t = f();
883
+ return o({
884
+ mutationFn: async (n) => await r.process.registerProcessTrigger(n),
885
+ onSuccess: (n, a) => {
886
+ t.invalidateQueries({
887
+ queryKey: ["processTriggers", a.process_sheet_id]
887
888
  });
888
889
  },
889
890
  ...e
890
891
  });
891
892
  }
892
- function an(e = {}) {
893
- const n = f();
894
- return a({
895
- mutationFn: async ({ id: t }) => await r.process.deleteProcessTrigger(t),
896
- onSuccess: (t, u) => {
897
- n.invalidateQueries({
898
- queryKey: u.sheetId ? ["processTriggers", u.sheetId] : ["processTriggers"]
893
+ function ut(e = {}) {
894
+ const t = f();
895
+ return o({
896
+ mutationFn: async ({ id: n }) => await r.process.deleteProcessTrigger(n),
897
+ onSuccess: (n, a) => {
898
+ t.invalidateQueries({
899
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
899
900
  });
900
901
  },
901
902
  ...e
902
903
  });
903
904
  }
904
- function sn(e = {}) {
905
- const n = f();
906
- return a({
907
- mutationFn: async ({ triggerId: t, scheduleName: u }) => await r.process.pauseSchedule(t, u),
908
- onSuccess: (t, u) => {
909
- n.invalidateQueries({
910
- queryKey: u.sheetId ? ["processTriggers", u.sheetId] : ["processTriggers"]
911
- }), n.invalidateQueries({
912
- queryKey: ["scheduleStatus", u.triggerId, u.scheduleName]
905
+ function st(e = {}) {
906
+ const t = f();
907
+ return o({
908
+ mutationFn: async ({ triggerId: n, scheduleName: a }) => await r.process.pauseSchedule(n, a),
909
+ onSuccess: (n, a) => {
910
+ t.invalidateQueries({
911
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
912
+ }), t.invalidateQueries({
913
+ queryKey: ["scheduleStatus", a.triggerId, a.scheduleName]
913
914
  });
914
915
  },
915
916
  ...e
916
917
  });
917
918
  }
918
- function cn(e = {}) {
919
- const n = f();
920
- return a({
921
- mutationFn: async ({ triggerId: t, scheduleName: u }) => await r.process.resumeSchedule(t, u),
922
- onSuccess: (t, u) => {
923
- n.invalidateQueries({
924
- queryKey: u.sheetId ? ["processTriggers", u.sheetId] : ["processTriggers"]
925
- }), n.invalidateQueries({
926
- queryKey: ["scheduleStatus", u.triggerId, u.scheduleName]
919
+ function it(e = {}) {
920
+ const t = f();
921
+ return o({
922
+ mutationFn: async ({ triggerId: n, scheduleName: a }) => await r.process.resumeSchedule(n, a),
923
+ onSuccess: (n, a) => {
924
+ t.invalidateQueries({
925
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
926
+ }), t.invalidateQueries({
927
+ queryKey: ["scheduleStatus", a.triggerId, a.scheduleName]
927
928
  });
928
929
  },
929
930
  ...e
930
931
  });
931
932
  }
932
- function ln(e, n, t = {}) {
933
+ function ct(e, t, n = {}) {
933
934
  return s({
934
- queryKey: ["scheduleStatus", e, n],
935
+ queryKey: ["scheduleStatus", e, t],
935
936
  queryFn: async () => await r.process.getScheduleStatus(
936
937
  e,
937
- n
938
+ t
938
939
  ),
939
- enabled: !!e && !!n,
940
- ...t
940
+ enabled: !!e && !!t,
941
+ ...n
941
942
  });
942
943
  }
943
- function yn(e = {}) {
944
- const n = f();
945
- return a({
946
- mutationFn: async ({ triggerId: t, scheduleName: u }) => await r.process.executeNow(t, u),
947
- onSuccess: (t, u) => {
948
- n.invalidateQueries({
949
- queryKey: u.sheetId ? ["processTriggers", u.sheetId] : ["processTriggers"]
944
+ function lt(e = {}) {
945
+ const t = f();
946
+ return o({
947
+ mutationFn: async ({ triggerId: n, scheduleName: a }) => await r.process.executeNow(n, a),
948
+ onSuccess: (n, a) => {
949
+ t.invalidateQueries({
950
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
950
951
  });
951
952
  },
952
953
  ...e
953
954
  });
954
955
  }
955
- function gn(e = {}, n = {}) {
956
+ function yt(e = {}, t = {}) {
956
957
  return s({
957
958
  queryKey: ["inboxItems", "all", e.page, e.perPage],
958
959
  queryFn: async () => await r.inboxItems.getAllInboxItems(e),
959
- ...n
960
+ ...t
960
961
  });
961
962
  }
962
- function fn(e = {}) {
963
- return a({
964
- mutationFn: async (n) => await r.inboxItems.markItemAsRead(n),
963
+ function dt(e = {}) {
964
+ return o({
965
+ mutationFn: async (t) => await r.inboxItems.markItemAsRead(t),
965
966
  ...e
966
967
  });
967
968
  }
968
- function wn(e = {}) {
969
- return a({
970
- mutationFn: async (n) => await r.inboxItems.markItemAsUnread(n),
969
+ function ft(e = {}) {
970
+ return o({
971
+ mutationFn: async (t) => await r.inboxItems.markItemAsUnread(t),
971
972
  ...e
972
973
  });
973
974
  }
974
- function dn(e = {}) {
975
- return a({
976
- mutationFn: async (n) => await r.inboxItems.createInboxItemPerUser(n),
975
+ function wt(e = {}) {
976
+ return o({
977
+ mutationFn: async (t) => await r.inboxItems.createInboxItemPerUser(t),
977
978
  ...e
978
979
  });
979
980
  }
980
- function mn(e, n = {}) {
981
+ function gt(e, t = {}) {
981
982
  return s({
982
983
  queryKey: ["emailConversations", e?.page, e?.pageSize, e?.tag, e?.orderByCreatedDate],
983
984
  queryFn: async () => await r.emailEngine.getAllConversations(e),
984
- ...n
985
+ ...t
985
986
  });
986
987
  }
987
- function qn(e, n = {}) {
988
+ function Ft(e, t = {}) {
988
989
  return s({
989
990
  queryKey: ["emailConversation", e],
990
991
  queryFn: async () => await r.emailEngine.getConversation({
991
992
  conversationId: e
992
993
  }),
993
994
  enabled: !!e,
994
- ...n
995
+ ...t
995
996
  });
996
997
  }
997
- function Fn(e = {}) {
998
- const n = f();
999
- return a({
1000
- mutationFn: async (t) => await r.emailEngine.createConversation(t),
998
+ function mt(e = {}) {
999
+ const t = f();
1000
+ return o({
1001
+ mutationFn: async (n) => await r.emailEngine.createConversation(n),
1001
1002
  onSuccess: () => {
1002
- n.invalidateQueries({ queryKey: ["emailConversations"] });
1003
+ t.invalidateQueries({ queryKey: ["emailConversations"] });
1003
1004
  },
1004
1005
  ...e
1005
1006
  });
1006
1007
  }
1007
- function bn(e = {}) {
1008
- const n = f();
1009
- return a({
1010
- mutationFn: async (t) => await r.emailEngine.replyToConversation(t),
1011
- onSuccess: (t, u) => {
1012
- n.invalidateQueries({
1013
- queryKey: ["emailConversation", u.conversationId]
1008
+ function qt(e = {}) {
1009
+ const t = f();
1010
+ return o({
1011
+ mutationFn: async (n) => await r.emailEngine.replyToConversation(n),
1012
+ onSuccess: (n, a) => {
1013
+ t.invalidateQueries({
1014
+ queryKey: ["emailConversation", a.conversationId]
1014
1015
  });
1015
1016
  },
1016
1017
  ...e
1017
1018
  });
1018
1019
  }
1019
- function hn(e, n = {}) {
1020
+ function bt(e, t = {}) {
1020
1021
  return s({
1021
1022
  queryKey: [
1022
1023
  "emailMessagesBySender",
@@ -1028,264 +1029,493 @@ function hn(e, n = {}) {
1028
1029
  ],
1029
1030
  queryFn: async () => await r.emailEngine.getMessageBySenderId(e),
1030
1031
  enabled: !!e.senderId,
1031
- ...n
1032
+ ...t
1032
1033
  });
1033
1034
  }
1034
- function Dn(e = {}) {
1035
- return a({
1036
- mutationFn: async (n) => await r.emailEngine.searchMessages(n),
1035
+ function Dt(e = {}) {
1036
+ return o({
1037
+ mutationFn: async (t) => await r.emailEngine.searchMessages(t),
1037
1038
  ...e
1038
1039
  });
1039
1040
  }
1040
- function pn(e = {}) {
1041
- const n = i(async () => await r.tcn.getAuthUrl()), t = c({
1041
+ function ht(e = {}) {
1042
+ const t = i(async () => await r.tcn.getAuthUrl()), n = c({
1042
1043
  queryKey: ["tcn", "authUrl"],
1043
- queryFn: n,
1044
+ queryFn: t,
1044
1045
  enabled: !0,
1045
1046
  options: e
1046
1047
  });
1047
- return s(t);
1048
+ return s(n);
1048
1049
  }
1049
- function Tn(e = {}) {
1050
- return a({
1051
- mutationFn: async ({ code: n }) => await r.tcn.exchangeCode(n),
1050
+ function pt(e = {}) {
1051
+ return o({
1052
+ mutationFn: async ({ code: t }) => await r.tcn.exchangeCode(t),
1052
1053
  ...e
1053
1054
  });
1054
1055
  }
1055
- function Rn(e = {}) {
1056
- return a({
1057
- mutationFn: async ({ refresh_token: n }) => await r.tcn.refreshToken(n),
1056
+ function Tt(e = {}) {
1057
+ return o({
1058
+ mutationFn: async ({ refresh_token: t }) => await r.tcn.refreshToken(t),
1058
1059
  ...e
1059
1060
  });
1060
1061
  }
1061
- function Sn(e = {}) {
1062
- return a({
1063
- mutationFn: async ({ token: n }) => await r.tcn.getCurrentAgent(n),
1062
+ function Rt(e = {}) {
1063
+ return o({
1064
+ mutationFn: async ({ token: t }) => await r.tcn.getCurrentAgent(t),
1064
1065
  ...e
1065
1066
  });
1066
1067
  }
1067
- function kn(e = {}) {
1068
- return a({
1069
- mutationFn: async ({ token: n, huntGroupSid: t }) => await r.tcn.getAgentSkills(n, t),
1068
+ function St(e = {}) {
1069
+ return o({
1070
+ mutationFn: async ({ token: t, huntGroupSid: n }) => await r.tcn.getAgentSkills(t, n),
1070
1071
  ...e
1071
1072
  });
1072
1073
  }
1073
- function Cn(e = {}) {
1074
- return a({
1075
- mutationFn: async ({ token: n, huntGroupSid: t, skills: u }) => await r.tcn.createSession(n, t, u),
1074
+ function xt(e = {}) {
1075
+ return o({
1076
+ mutationFn: async ({ token: t, huntGroupSid: n, skills: a }) => await r.tcn.createSession(t, n, a),
1076
1077
  ...e
1077
1078
  });
1078
1079
  }
1079
- function En(e = {}) {
1080
- return a({
1081
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.keepAlive(n, t),
1080
+ function kt(e = {}) {
1081
+ return o({
1082
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.keepAlive(t, n),
1082
1083
  ...e
1083
1084
  });
1084
1085
  }
1085
- function Kn(e = {}) {
1086
- return a({
1087
- mutationFn: async ({ token: n }) => await r.tcn.agentGetStatus(n),
1086
+ function Et(e = {}) {
1087
+ return o({
1088
+ mutationFn: async ({ token: t }) => await r.tcn.agentGetStatus(t),
1088
1089
  ...e
1089
1090
  });
1090
1091
  }
1091
- function Vn(e = {}) {
1092
- return a({
1093
- mutationFn: async ({ token: n, huntGroupSid: t }) => await r.tcn.getHuntGroupAgentSettings(n, t),
1092
+ function Kt(e = {}) {
1093
+ return o({
1094
+ mutationFn: async ({ token: t, huntGroupSid: n }) => await r.tcn.getHuntGroupAgentSettings(t, n),
1094
1095
  ...e
1095
1096
  });
1096
1097
  }
1097
- function Bn(e = {}) {
1098
- return a({
1099
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.dialManualPrepare(n, t),
1098
+ function Ct(e = {}) {
1099
+ return o({
1100
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.dialManualPrepare(t, n),
1100
1101
  ...e
1101
1102
  });
1102
1103
  }
1103
- function Gn(e = {}) {
1104
- return a({
1105
- mutationFn: async ({ token: n, call: t }) => await r.tcn.processManualDial(n, t),
1104
+ function Gt(e = {}) {
1105
+ return o({
1106
+ mutationFn: async ({ token: t, call: n }) => await r.tcn.processManualDial(t, n),
1106
1107
  ...e
1107
1108
  });
1108
1109
  }
1109
- function Pn(e = {}) {
1110
- return a({
1111
- mutationFn: async ({ token: n, agentSessionSid: t, huntGroupSid: u, simpleCallData: o }) => await r.tcn.manualDialStart(
1112
- n,
1110
+ function Vt(e = {}) {
1111
+ return o({
1112
+ mutationFn: async ({ token: t, agentSessionSid: n, huntGroupSid: a, simpleCallData: u }) => await r.tcn.manualDialStart(
1113
1113
  t,
1114
- u,
1115
- o
1114
+ n,
1115
+ a,
1116
+ u
1116
1117
  ),
1117
1118
  ...e
1118
1119
  });
1119
1120
  }
1120
- function On(e = {}) {
1121
- return a({
1122
- mutationFn: async ({ token: n, sessionSid: t, reason: u }) => await r.tcn.agentDisconnect(n, t, u),
1121
+ function Bt(e = {}) {
1122
+ return o({
1123
+ mutationFn: async ({ token: t, sessionSid: n, reason: a }) => await r.tcn.agentDisconnect(t, n, a),
1124
+ ...e
1125
+ });
1126
+ }
1127
+ function It(e = {}) {
1128
+ return o({
1129
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.agentPause(t, n),
1130
+ ...e
1131
+ });
1132
+ }
1133
+ function Pt(e = {}) {
1134
+ return o({
1135
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.agentSetReady(t, n),
1136
+ ...e
1137
+ });
1138
+ }
1139
+ function Ot(e = {}) {
1140
+ return o({
1141
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.agentGetConnectedParty(t, n),
1142
+ ...e
1143
+ });
1144
+ }
1145
+ function At(e = {}) {
1146
+ return o({
1147
+ mutationFn: async ({ token: t, callSid: n }) => await r.tcn.getCallData(t, n),
1148
+ ...e
1149
+ });
1150
+ }
1151
+ function Ut(e = {}) {
1152
+ return o({
1153
+ mutationFn: async ({ token: t, sessionSid: n, holdType: a }) => await r.tcn.agentPutCallOnHold(t, n, a),
1154
+ ...e
1155
+ });
1156
+ }
1157
+ function vt(e = {}) {
1158
+ return o({
1159
+ mutationFn: async ({ token: t, sessionSid: n, holdType: a }) => await r.tcn.agentGetCallFromHold(t, n, a),
1123
1160
  ...e
1124
1161
  });
1125
1162
  }
1126
- function An(e = {}) {
1127
- return a({
1128
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.agentPause(n, t),
1163
+ function Wt(e = {}) {
1164
+ return o({
1165
+ mutationFn: async ({ token: t, templateNumber: n, groupSid: a }) => await r.tcn.ftpManualDialReport(t, n, a),
1129
1166
  ...e
1130
1167
  });
1131
1168
  }
1132
- function Un(e = {}) {
1133
- return a({
1134
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.agentSetReady(n, t),
1169
+ function Mt(e = {}) {
1170
+ return o({
1171
+ mutationFn: async (t) => await r.templates.renderTemplate(t),
1135
1172
  ...e
1136
1173
  });
1137
1174
  }
1138
- function vn(e = {}) {
1139
- return a({
1140
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.agentGetConnectedParty(n, t),
1175
+ function Qt(e, t = {}) {
1176
+ const n = e?.trim();
1177
+ return s({
1178
+ queryKey: ["databox", "folder", n],
1179
+ queryFn: async () => {
1180
+ if (!n)
1181
+ throw new Error("Folder ID is required");
1182
+ return await r.databox.getDataboxFolder({ folderId: n });
1183
+ },
1184
+ enabled: !!n,
1185
+ ...t
1186
+ });
1187
+ }
1188
+ function _t(e, t = {}) {
1189
+ const n = e?.trim();
1190
+ return s({
1191
+ queryKey: ["databox", "folder", n, "files"],
1192
+ queryFn: async () => {
1193
+ if (!n)
1194
+ throw new Error("Folder ID is required");
1195
+ return await r.databox.getDataboxFolderFiles({ folderId: n });
1196
+ },
1197
+ enabled: !!n,
1198
+ ...t
1199
+ });
1200
+ }
1201
+ function Ht(e, t = {}) {
1202
+ const n = e?.trim();
1203
+ return s({
1204
+ queryKey: ["databox", "folder", n, "datasets"],
1205
+ queryFn: async () => {
1206
+ if (!n)
1207
+ throw new Error("Folder ID is required");
1208
+ return await r.databox.getDataboxFolderDatasets({ folderId: n });
1209
+ },
1210
+ enabled: !!n,
1211
+ ...t
1212
+ });
1213
+ }
1214
+ function Nt(e, t = {}) {
1215
+ const n = e?.trim();
1216
+ return s({
1217
+ queryKey: ["databox", "folder", n, "duplicates"],
1218
+ queryFn: async () => {
1219
+ if (!n)
1220
+ throw new Error("Folder ID is required");
1221
+ return await r.databox.getDataboxFolderDuplicates({
1222
+ folderId: n
1223
+ });
1224
+ },
1225
+ enabled: !!n,
1226
+ ...t
1227
+ });
1228
+ }
1229
+ function Lt(e, t = {}) {
1230
+ const n = e?.trim();
1231
+ return s({
1232
+ queryKey: ["dataset", n, "exceptions"],
1233
+ queryFn: async () => {
1234
+ if (!n)
1235
+ throw new Error("Dataset ID is required");
1236
+ return await r.dataset.getDatasetExceptions({ datasetId: n });
1237
+ },
1238
+ enabled: !!n,
1239
+ ...t
1240
+ });
1241
+ }
1242
+ function zt(e, t, n = {}) {
1243
+ const a = e?.trim();
1244
+ return s({
1245
+ queryKey: ["dataset", a, "duplicates", t ?? null],
1246
+ queryFn: async () => {
1247
+ if (!a)
1248
+ throw new Error("Dataset ID is required");
1249
+ return await r.dataset.getDatasetDuplicates({
1250
+ datasetId: a,
1251
+ group: t
1252
+ });
1253
+ },
1254
+ enabled: !!a,
1255
+ ...n
1256
+ });
1257
+ }
1258
+ function jt(e, t = {}) {
1259
+ const n = e?.trim();
1260
+ return s({
1261
+ queryKey: ["databox", "folder", n, "schema"],
1262
+ queryFn: async () => {
1263
+ if (!n)
1264
+ throw new Error("Folder ID is required");
1265
+ return await r.databox.getDataboxFolderSchema({ folderId: n });
1266
+ },
1267
+ enabled: !!n,
1268
+ ...t
1269
+ });
1270
+ }
1271
+ function Jt(e, t = {}) {
1272
+ const n = e?.trim();
1273
+ return s({
1274
+ queryKey: ["databox", "folder", n, "schema", "history"],
1275
+ queryFn: async () => {
1276
+ if (!n)
1277
+ throw new Error("Folder ID is required");
1278
+ return await r.databox.getDataboxSchemaHistory({ folderId: n });
1279
+ },
1280
+ enabled: !!n,
1281
+ ...t
1282
+ });
1283
+ }
1284
+ function Yt(e, t = {}) {
1285
+ const n = e?.trim();
1286
+ return s({
1287
+ queryKey: ["databox", "folder", n, "trash"],
1288
+ queryFn: async () => {
1289
+ if (!n)
1290
+ throw new Error("Folder ID is required");
1291
+ return await r.databox.getDataboxTrashFiles({ folderId: n });
1292
+ },
1293
+ enabled: !!n,
1294
+ ...t
1295
+ });
1296
+ }
1297
+ function $t(e, t = {}) {
1298
+ const n = e?.trim();
1299
+ return s({
1300
+ queryKey: ["databox", "file", n],
1301
+ queryFn: async () => {
1302
+ if (!n)
1303
+ throw new Error("File ID is required");
1304
+ return await r.databox.getDataboxFile({ fileId: n });
1305
+ },
1306
+ enabled: !!n,
1307
+ ...t
1308
+ });
1309
+ }
1310
+ function Xt(e, t = {}) {
1311
+ const n = e?.trim();
1312
+ return s({
1313
+ queryKey: ["databox", "file", n, "status"],
1314
+ queryFn: async () => {
1315
+ if (!n)
1316
+ throw new Error("File ID is required");
1317
+ return await r.databox.getDataboxFileStatus({ fileId: n });
1318
+ },
1319
+ enabled: !!n,
1320
+ ...t
1321
+ });
1322
+ }
1323
+ function Zt(e, t = {}) {
1324
+ const n = e?.trim();
1325
+ return s({
1326
+ queryKey: ["databox", "file", n, "runs"],
1327
+ queryFn: async () => {
1328
+ if (!n)
1329
+ throw new Error("File ID is required");
1330
+ return await r.databox.getDataboxFileRuns({ fileId: n });
1331
+ },
1332
+ enabled: !!n,
1333
+ ...t
1334
+ });
1335
+ }
1336
+ function en(e, t = {}) {
1337
+ const n = e?.trim();
1338
+ return s({
1339
+ queryKey: ["databox", "file", n, "download-url"],
1340
+ queryFn: async () => {
1341
+ if (!n)
1342
+ throw new Error("File ID is required");
1343
+ return await r.databox.getDataboxFileDownloadUrl({ fileId: n });
1344
+ },
1345
+ enabled: !!n,
1346
+ ...t
1347
+ });
1348
+ }
1349
+ function tn(e = {}) {
1350
+ return o({
1351
+ mutationFn: async (t) => await r.databox.dropFileToDatabox(t),
1141
1352
  ...e
1142
1353
  });
1143
1354
  }
1144
- function Wn(e = {}) {
1145
- return a({
1146
- mutationFn: async ({ token: n, callSid: t }) => await r.tcn.getCallData(n, t),
1355
+ function nn(e = {}) {
1356
+ return o({
1357
+ mutationFn: async (t) => await r.databox.runDataboxFolder(t),
1147
1358
  ...e
1148
1359
  });
1149
1360
  }
1150
- function xn(e = {}) {
1151
- return a({
1152
- mutationFn: async ({ token: n, sessionSid: t, holdType: u }) => await r.tcn.agentPutCallOnHold(n, t, u),
1361
+ function rn(e = {}) {
1362
+ return o({
1363
+ mutationFn: async (t) => await r.databox.updateDataboxFolderSchema(t),
1153
1364
  ...e
1154
1365
  });
1155
1366
  }
1156
- function Mn(e = {}) {
1157
- return a({
1158
- mutationFn: async ({ token: n, sessionSid: t, holdType: u }) => await r.tcn.agentGetCallFromHold(n, t, u),
1367
+ function an(e = {}) {
1368
+ return o({
1369
+ mutationFn: async (t) => await r.databox.trashDataboxFiles(t),
1159
1370
  ...e
1160
1371
  });
1161
1372
  }
1162
- function In(e = {}) {
1163
- return a({
1164
- mutationFn: async ({ token: n, templateNumber: t, groupSid: u }) => await r.tcn.ftpManualDialReport(n, t, u),
1373
+ function on(e = {}) {
1374
+ return o({
1375
+ mutationFn: async (t) => await r.databox.restoreDataboxFile(t),
1165
1376
  ...e
1166
1377
  });
1167
1378
  }
1168
- function Qn(e = {}) {
1169
- return a({
1170
- mutationFn: async (n) => await r.templates.renderTemplate(n),
1379
+ function un(e = {}) {
1380
+ return o({
1381
+ mutationFn: async (t) => await r.databox.permanentDeleteDataboxFiles(t),
1171
1382
  ...e
1172
1383
  });
1173
1384
  }
1174
1385
  export {
1175
- Ln as ReactQueryDevtools,
1176
- V as WorkflowStatus,
1177
- A as reactQuery,
1386
+ yn as ReactQueryDevtools,
1387
+ C as WorkflowStatus,
1388
+ P as reactQuery,
1178
1389
  z as useCheckSubscriptionStatus,
1179
- Ue as useCreateAuditLog,
1180
- Fn as useCreateConversation,
1181
- dn as useCreateInboxItemPerUser,
1182
- Oe as useCreateOrUpdateForm,
1183
- xe as useCreateReconV2,
1390
+ Oe as useCreateAuditLog,
1391
+ mt as useCreateConversation,
1392
+ wt as useCreateInboxItemPerUser,
1393
+ Ie as useCreateOrUpdateForm,
1394
+ ve as useCreateReconV2,
1184
1395
  j as useCreateStatementRun,
1185
- M as useCreateThread,
1396
+ W as useCreateThread,
1186
1397
  J as useDataset,
1187
- x as useDatasetSample,
1188
- N as useDeleteComment,
1189
- an as useDeleteProcessTrigger,
1190
- Ie as useDeleteReconV2,
1191
- me as useDeleteRow,
1398
+ v as useDatasetSample,
1399
+ H as useDeleteComment,
1400
+ ut as useDeleteProcessTrigger,
1401
+ Me as useDeleteReconV2,
1402
+ Fe as useDeleteRow,
1192
1403
  Te as useDocumentPermissions,
1193
- yn as useExecuteNow,
1404
+ tn as useDropFileToDatabox,
1405
+ lt as useExecuteNow,
1194
1406
  Se as useFileDownload,
1195
1407
  Re as useFileUpload,
1196
- hn as useFilterMessagesBySenderId,
1197
- mn as useGetAllConversations,
1198
- nn as useGetAllHttpTriggers,
1199
- gn as useGetAllInboxItems,
1200
- We as useGetAllRecon,
1408
+ bt as useFilterMessagesBySenderId,
1409
+ gt as useGetAllConversations,
1410
+ tt as useGetAllHttpTriggers,
1411
+ yt as useGetAllInboxItems,
1412
+ Ue as useGetAllRecon,
1201
1413
  _e as useGetAllReconV2,
1202
- ve as useGetAllTemplatedPipelines,
1203
- en as useGetAllUsers,
1204
- Ae as useGetAuditLogs,
1205
- I as useGetCommentsByThreadId,
1206
- qn as useGetConversation,
1414
+ Ae as useGetAllTemplatedPipelines,
1415
+ et as useGetAllUsers,
1416
+ Pe as useGetAuditLogs,
1417
+ M as useGetCommentsByThreadId,
1418
+ Ft as useGetConversation,
1419
+ $t as useGetDataboxFile,
1420
+ en as useGetDataboxFileDownloadUrl,
1421
+ Zt as useGetDataboxFileRuns,
1422
+ Xt as useGetDataboxFileStatus,
1423
+ Qt as useGetDataboxFolder,
1424
+ Ht as useGetDataboxFolderDatasets,
1425
+ Nt as useGetDataboxFolderDuplicates,
1426
+ _t as useGetDataboxFolderFiles,
1427
+ jt as useGetDataboxFolderSchema,
1428
+ Jt as useGetDataboxSchemaHistory,
1429
+ Yt as useGetDataboxTrashFiles,
1430
+ zt as useGetDatasetDuplicates,
1431
+ Lt as useGetDatasetExceptions,
1207
1432
  Y as useGetDatasets,
1208
1433
  Z as useGetFileByFolderIdAndName,
1209
1434
  X as useGetFileUrlByFileId,
1210
- Pe as useGetFormById,
1211
- Ge as useGetFormData,
1212
- Be as useGetFormSchema,
1213
- ge as useGetInputTables,
1435
+ Be as useGetFormById,
1436
+ Ve as useGetFormData,
1437
+ Ge as useGetFormSchema,
1438
+ de as useGetInputTables,
1214
1439
  ee as useGetPublishedWorkbookById,
1215
1440
  Ye as useGetReconV2CleanResult,
1216
1441
  $e as useGetReconV2Diff,
1217
1442
  Xe as useGetReconV2Explanation,
1218
1443
  je as useGetReconV2ProfileResult,
1219
- He as useGetReconV2RunResult,
1220
- Ne as useGetReconV2Runs,
1444
+ Ne as useGetReconV2RunResult,
1445
+ He as useGetReconV2Runs,
1221
1446
  Le as useGetReconV2SmartResult,
1222
- ne as useGetRunResultById,
1223
- te as useGetRunsByViewId,
1224
- ln as useGetScheduleStatus,
1447
+ te as useGetRunResultById,
1448
+ ne as useGetRunsByViewId,
1449
+ ct as useGetScheduleStatus,
1225
1450
  re as useGetStatementData,
1226
- ue as useGetTableById,
1227
- ke as useGetTaskDetails,
1228
- un as useGetTriggersBySheet,
1451
+ ae as useGetTableById,
1452
+ xe as useGetTaskDetails,
1453
+ at as useGetTriggersBySheet,
1229
1454
  oe as useGetViewById,
1230
- ae as useGetViewsBySheetId,
1455
+ ue as useGetViewsBySheetId,
1231
1456
  $ as useGetVirtualDatasets,
1232
- Ce as useGetWorkbookDetails,
1457
+ ke as useGetWorkbookDetails,
1233
1458
  se as useGetWorkbooksByType,
1234
1459
  ie as useGetWorkflowInstanceStatusById,
1235
1460
  ce as useGetWorksheets,
1236
1461
  le as useGetWorksheetsByType,
1237
1462
  ye as useInputTable,
1238
1463
  we as useInsertRow,
1239
- fn as useMarkItemAsRead,
1240
- wn as useMarkItemAsUnread,
1241
- tn as useMarkTaskDone,
1242
- W as useMetric,
1243
- sn as usePauseSchedule,
1464
+ dt as useMarkItemAsRead,
1465
+ ft as useMarkItemAsUnread,
1466
+ nt as useMarkTaskDone,
1467
+ U as useMetric,
1468
+ st as usePauseSchedule,
1469
+ un as usePermanentDeleteDataboxFiles,
1244
1470
  Q as usePostComment,
1245
1471
  Ke as usePublishWorkbook,
1246
- rn as useReassignTask,
1472
+ rt as useReassignTask,
1247
1473
  Ze as useReconV2RunStatus,
1248
- on as useRegisterProcessTrigger,
1249
- Qn as useRenderTemplate,
1250
- bn as useReplyToConversation,
1251
- cn as useResumeSchedule,
1474
+ ot as useRegisterProcessTrigger,
1475
+ Mt as useRenderTemplate,
1476
+ qt as useReplyToConversation,
1477
+ on as useRestoreDataboxFile,
1478
+ it as useResumeSchedule,
1252
1479
  fe as useRows,
1253
- qe as useRunDefinition,
1254
- Fe as useRunPublishedDefinition,
1255
- Ve as useRunRecon,
1480
+ nn as useRunDataboxFolder,
1481
+ me as useRunDefinition,
1482
+ qe as useRunPublishedDefinition,
1483
+ Ce as useRunRecon,
1256
1484
  Qe as useRunReconV2,
1257
1485
  be as useRunSampleDefinition,
1258
1486
  Ee as useSaveWorkbook,
1259
- Dn as useSearchMessages,
1487
+ Dt as useSearchMessages,
1260
1488
  Je as useStartReconV2Clean,
1261
1489
  ze as useStartReconV2Profile,
1262
- H as useSubscribeUser,
1263
- On as useTcnAgentDisconnect,
1264
- Mn as useTcnAgentGetCallFromHold,
1265
- Kn as useTcnAgentGetStatus,
1266
- An as useTcnAgentPause,
1267
- xn as useTcnAgentPutCallOnHold,
1268
- Un as useTcnAgentSetReady,
1269
- kn as useTcnAgentSkills,
1270
- pn as useTcnAuthUrl,
1271
- Wn as useTcnCallData,
1272
- vn as useTcnConnectedParty,
1273
- Cn as useTcnCreateSession,
1274
- Sn as useTcnCurrentAgent,
1275
- Bn as useTcnDialManualPrepare,
1276
- Tn as useTcnExchangeCode,
1277
- In as useTcnFtpManualDialReport,
1278
- Vn as useTcnHuntGroupSettings,
1279
- En as useTcnKeepAlive,
1280
- Pn as useTcnManualDialStart,
1281
- Gn as useTcnProcessManualDial,
1282
- Rn as useTcnRefreshToken,
1283
- he as useTriggerHttpWorkflow,
1284
- De as useTriggerWorkflow,
1490
+ N as useSubscribeUser,
1491
+ Bt as useTcnAgentDisconnect,
1492
+ vt as useTcnAgentGetCallFromHold,
1493
+ Et as useTcnAgentGetStatus,
1494
+ It as useTcnAgentPause,
1495
+ Ut as useTcnAgentPutCallOnHold,
1496
+ Pt as useTcnAgentSetReady,
1497
+ St as useTcnAgentSkills,
1498
+ ht as useTcnAuthUrl,
1499
+ At as useTcnCallData,
1500
+ Ot as useTcnConnectedParty,
1501
+ xt as useTcnCreateSession,
1502
+ Rt as useTcnCurrentAgent,
1503
+ Ct as useTcnDialManualPrepare,
1504
+ pt as useTcnExchangeCode,
1505
+ Wt as useTcnFtpManualDialReport,
1506
+ Kt as useTcnHuntGroupSettings,
1507
+ kt as useTcnKeepAlive,
1508
+ Vt as useTcnManualDialStart,
1509
+ Gt as useTcnProcessManualDial,
1510
+ Tt as useTcnRefreshToken,
1511
+ an as useTrashDataboxFiles,
1512
+ De as useTriggerHttpWorkflow,
1513
+ he as useTriggerWorkflow,
1285
1514
  L as useUnsubscribeUser,
1286
1515
  _ as useUpdateComment,
1287
- Me as useUpdateReconV2,
1288
- de as useUpdateRow,
1289
- B as useUser,
1516
+ rn as useUpdateDataboxFolderSchema,
1517
+ We as useUpdateReconV2,
1518
+ ge as useUpdateRow,
1519
+ G as useUser,
1290
1520
  pe as useUserDetails
1291
1521
  };