@bluecopa/react 0.1.98 → 0.1.100

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 (63) hide show
  1. package/dist/hooks/reconV2/useGetReconV2Workflow.d.ts +11 -0
  2. package/dist/hooks/reconV2/useGetReconV2Workflow.d.ts.map +1 -0
  3. package/dist/hooks/reconV2/useReconV2Detail.d.ts +15 -0
  4. package/dist/hooks/reconV2/useReconV2Detail.d.ts.map +1 -0
  5. package/dist/hooks/reconV2/useReconV2Editor.d.ts +17 -0
  6. package/dist/hooks/reconV2/useReconV2Editor.d.ts.map +1 -0
  7. package/dist/hooks/reconV2/useReconV2List.d.ts +23 -0
  8. package/dist/hooks/reconV2/useReconV2List.d.ts.map +1 -0
  9. package/dist/hooks/reconV2/useReconV2Results.d.ts +32 -0
  10. package/dist/hooks/reconV2/useReconV2Results.d.ts.map +1 -0
  11. package/dist/hooks/reconV2/useReconV2RunController.d.ts +35 -0
  12. package/dist/hooks/reconV2/useReconV2RunController.d.ts.map +1 -0
  13. package/dist/hooks/useDatabox.d.ts +24 -0
  14. package/dist/hooks/useDatabox.d.ts.map +1 -0
  15. package/dist/hooks/useDropFileToDatabox.d.ts +14 -0
  16. package/dist/hooks/useDropFileToDatabox.d.ts.map +1 -0
  17. package/dist/hooks/useGetDataboxFile.d.ts +11 -0
  18. package/dist/hooks/useGetDataboxFile.d.ts.map +1 -0
  19. package/dist/hooks/useGetDataboxFileDownloadUrl.d.ts +12 -0
  20. package/dist/hooks/useGetDataboxFileDownloadUrl.d.ts.map +1 -0
  21. package/dist/hooks/useGetDataboxFileRuns.d.ts +11 -0
  22. package/dist/hooks/useGetDataboxFileRuns.d.ts.map +1 -0
  23. package/dist/hooks/useGetDataboxFileStatus.d.ts +12 -0
  24. package/dist/hooks/useGetDataboxFileStatus.d.ts.map +1 -0
  25. package/dist/hooks/useGetDataboxFolder.d.ts +11 -0
  26. package/dist/hooks/useGetDataboxFolder.d.ts.map +1 -0
  27. package/dist/hooks/useGetDataboxFolderDatasets.d.ts +12 -0
  28. package/dist/hooks/useGetDataboxFolderDatasets.d.ts.map +1 -0
  29. package/dist/hooks/useGetDataboxFolderDuplicates.d.ts +13 -0
  30. package/dist/hooks/useGetDataboxFolderDuplicates.d.ts.map +1 -0
  31. package/dist/hooks/useGetDataboxFolderFiles.d.ts +11 -0
  32. package/dist/hooks/useGetDataboxFolderFiles.d.ts.map +1 -0
  33. package/dist/hooks/useGetDataboxFolderSchema.d.ts +11 -0
  34. package/dist/hooks/useGetDataboxFolderSchema.d.ts.map +1 -0
  35. package/dist/hooks/useGetDataboxSchemaHistory.d.ts +11 -0
  36. package/dist/hooks/useGetDataboxSchemaHistory.d.ts.map +1 -0
  37. package/dist/hooks/useGetDataboxTrashFiles.d.ts +11 -0
  38. package/dist/hooks/useGetDataboxTrashFiles.d.ts.map +1 -0
  39. package/dist/hooks/useGetDatasetDuplicates.d.ts +13 -0
  40. package/dist/hooks/useGetDatasetDuplicates.d.ts.map +1 -0
  41. package/dist/hooks/useGetDatasetExceptions.d.ts +12 -0
  42. package/dist/hooks/useGetDatasetExceptions.d.ts.map +1 -0
  43. package/dist/hooks/useMetric.d.ts.map +1 -1
  44. package/dist/hooks/usePermanentDeleteDataboxFiles.d.ts +12 -0
  45. package/dist/hooks/usePermanentDeleteDataboxFiles.d.ts.map +1 -0
  46. package/dist/hooks/useReconV2Templates.d.ts +11 -0
  47. package/dist/hooks/useReconV2Templates.d.ts.map +1 -0
  48. package/dist/hooks/useRestoreDataboxFile.d.ts +10 -0
  49. package/dist/hooks/useRestoreDataboxFile.d.ts.map +1 -0
  50. package/dist/hooks/useRunDataboxFolder.d.ts +11 -0
  51. package/dist/hooks/useRunDataboxFolder.d.ts.map +1 -0
  52. package/dist/hooks/useRunPublishedDefinition.d.ts +2 -0
  53. package/dist/hooks/useRunPublishedDefinition.d.ts.map +1 -1
  54. package/dist/hooks/useTrashDataboxFiles.d.ts +13 -0
  55. package/dist/hooks/useTrashDataboxFiles.d.ts.map +1 -0
  56. package/dist/hooks/useUpdateDataboxFolderSchema.d.ts +10 -0
  57. package/dist/hooks/useUpdateDataboxFolderSchema.d.ts.map +1 -0
  58. package/dist/index.d.ts +26 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.es.js +997 -667
  61. package/dist/types/index.d.ts +5 -0
  62. package/dist/types/index.d.ts.map +1 -1
  63. 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";
3
- import { copaApi as r, copaGetConfig as p, copaUtils as R } from "@bluecopa/core";
1
+ import { useQuery as s, useMutation as u, useQueryClient as f } from "@tanstack/react-query";
2
+ import * as N from "@tanstack/react-query";
3
+ import { copaApi as r, copaGetConfig as p, copaUtils as T } 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 k, useMemo as x } from "react";
6
+ import { ReactQueryDevtools as Dn } from "@tanstack/react-query-devtools";
7
+ const E = {
8
8
  enabled: !0,
9
9
  staleTime: 1e3 * 60 * 5,
10
10
  // 5 minutes
@@ -13,396 +13,397 @@ const C = {
13
13
  retry: 2,
14
14
  retryDelay: (e) => Math.min(1e3 * 2 ** e, 3e4)
15
15
  };
16
- function E(e = {}) {
16
+ function K(e = {}) {
17
17
  return {
18
- ...C,
18
+ ...E,
19
19
  ...e
20
20
  };
21
21
  }
22
- function K(e = 5e3) {
23
- return new Promise((n) => setTimeout(n, e));
22
+ function V(e = 5e3) {
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 R(e, t) {
26
+ const n = Object.entries(e).filter(([a, o]) => !o).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 c(e, t, n = 0) {
33
+ return async () => (await V(n), await e());
34
34
  }
35
- function c(e) {
36
- const n = E(e.options);
35
+ function l(e) {
36
+ const t = K(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 J(e, t = {}) {
50
+ const n = t.enabled !== !1 && !!e, a = t.solutionBindings ?? null, o = c(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
- }), l = c({
57
- queryKey: ["metricData", e, u],
57
+ }), i = l({
58
+ queryKey: ["metricData", e, a, t.limit ?? null],
58
59
  queryFn: o,
59
- enabled: t,
60
- options: n
60
+ enabled: n,
61
+ options: t
61
62
  });
62
- return s(l);
63
+ return s(i);
63
64
  }
64
- function x(e, n = {}) {
65
- const t = !!e, u = i(async () => {
65
+ function Y(e, t = {}) {
66
+ const n = !!e, a = c(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
+ }), o = l({
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
79
  return s(o);
79
80
  }
80
- function M(e = {}) {
81
- return a({
82
- mutationFn: async (n) => await r.chat.createThread(n),
81
+ function $(e = {}) {
82
+ return u({
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 X(e, t = {}) {
91
+ const n = t.enabled !== !1 && !!e, a = c(async () => (R(
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))), o = l({
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
100
  return s(o);
100
101
  }
101
- function Q(e = {}) {
102
- return a({
103
- mutationFn: async (n) => await r.chat.postComment(n),
102
+ function Z(e = {}) {
103
+ return u({
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
- function _(e = {}) {
111
- return a({
112
- mutationFn: async (n) => await r.chat.updateComment(n),
111
+ function ee(e = {}) {
112
+ return u({
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 te(e = {}) {
121
+ return u({
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 ne(e = {}) {
130
+ return u({
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
- function L(e = {}) {
138
- return a({
139
- mutationFn: async (n) => await r.chat.unsubscribeUser(n),
138
+ function re(e = {}) {
139
+ return u({
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 ae(e, t, n = {}) {
148
+ const a = n.enabled !== !1 && !!e && !!t, o = c(async () => (R(
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],
151
+ ), await r.chat.checkSubscriptionStatus(e, t))), i = l({
152
+ queryKey: ["chat", "subscription", e, t],
152
153
  queryFn: o,
153
- enabled: u,
154
- options: t
154
+ enabled: a,
155
+ options: n
155
156
  });
156
- return s(l);
157
+ return s(i);
157
158
  }
158
- function j(e = {}) {
159
- return a({
160
- mutationFn: async (n) => await r.statement.createNewRun(n),
159
+ function oe(e = {}) {
160
+ return u({
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 ue(e, t = {}) {
166
+ const n = !!e, a = c(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
+ }), o = l({
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
178
  return s(o);
178
179
  }
179
- function Y() {
180
- const e = i(async () => (console.log("Fetching dataset data..."), await r.dataset.getAllDatasets())), n = c({
180
+ function se() {
181
+ const e = c(async () => (console.log("Fetching dataset data..."), await r.dataset.getAllDatasets())), t = l({
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
- function $() {
188
- const e = i(async () => await r.dataset.getVirtualDatasets()), n = c({
188
+ function ie() {
189
+ const e = c(async () => await r.dataset.getVirtualDatasets()), t = l({
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 ce(e, t, n, a = {}) {
197
+ const o = !!e && !!t && !!n, i = c(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
- }), y = c({
205
- queryKey: ["file", "getFileUrlByFileId", e, n, t],
206
- queryFn: l,
205
+ }), y = l({
206
+ queryKey: ["file", "getFileUrlByFileId", e, t, n],
207
+ queryFn: i,
207
208
  enabled: o,
208
- options: 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,
213
+ function le(e, t, n = {}) {
214
+ const a = e?.trim(), o = t?.trim(), i = !!(a && o), y = c(async () => await r.files.getFileByFolderIdAndName({
215
+ folderId: a,
215
216
  name: o
216
- })), g = c({
217
+ })), d = l({
217
218
  queryKey: [
218
219
  "file",
219
220
  "getFileByFolderIdAndName",
220
- u,
221
+ a,
221
222
  o
222
223
  ],
223
224
  queryFn: y,
224
- enabled: l,
225
- options: t
225
+ enabled: i,
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 ye(e, t, n = {}) {
231
+ const a = !!e && !!t, o = c(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
- }), l = c({
235
- queryKey: ["workbook", "getPublishedWorkbookById", e, n],
234
+ return console.log("Fetching published workbook by ID..."), await r.workbook.getPublishedWorkbookById({ type: e, id: t });
235
+ }), i = l({
236
+ queryKey: ["workbook", "getPublishedWorkbookById", e, t],
236
237
  queryFn: o,
237
- enabled: u,
238
- options: t
238
+ enabled: a,
239
+ options: n
239
240
  });
240
- return s(l);
241
+ return s(i);
241
242
  }
242
- function ne(e, n = {}) {
243
- const t = !!e, u = i(async () => {
243
+ function de(e, t = {}) {
244
+ const n = !!e, a = c(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
+ }), o = l({
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
254
  return s(o);
254
255
  }
255
- function te(e, n = {}) {
256
- const t = !!e, u = i(async () => {
256
+ function fe(e, t = {}) {
257
+ const n = !!e, a = c(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
+ }), o = l({
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
267
  return s(o);
267
268
  }
268
- function re(e, n, t, u = {}) {
269
- const o = !!e, l = i(async () => {
269
+ function we(e, t, n, a = {}) {
270
+ const o = !!e, i = c(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
- }), y = c({
278
- queryKey: ["statement", "getData", e, n, t],
279
- queryFn: l,
278
+ }), y = l({
279
+ queryKey: ["statement", "getData", e, t, n],
280
+ queryFn: i,
280
281
  enabled: o,
281
- options: 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 ge(e, t = {}) {
287
+ const n = !!e, a = c(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
+ }), o = l({
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
297
  return s(o);
297
298
  }
298
- function oe(e, n = {}) {
299
- const t = !!e, u = i(async () => {
299
+ function me(e, t = {}) {
300
+ const n = !!e, a = c(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
+ }), o = l({
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
310
  return s(o);
310
311
  }
311
- function ae(e, n = {}) {
312
- const t = !!e, u = i(async () => {
312
+ function Fe(e, t = {}) {
313
+ const n = !!e, a = c(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
+ }), o = l({
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
323
  return s(o);
323
324
  }
324
- function se(e, n = {}) {
325
- const t = !!e, u = i(async () => {
325
+ function qe(e, t = {}) {
326
+ const n = !!e, a = c(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
+ }), o = l({
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
336
  return s(o);
336
337
  }
337
- var V = /* @__PURE__ */ ((e) => (e.Succeeded = "Succeeded", e.Failed = "Failed", e.Running = "Running", e.NotFound = "NotFound", e))(V || {});
338
- function ie(e = {}) {
339
- return a({
340
- mutationFn: async (n) => (console.log("Fetching workflow instance status..."), await r.workflow.getWorkflowInstanceStatusById(n)),
338
+ var C = /* @__PURE__ */ ((e) => (e.Succeeded = "Succeeded", e.Failed = "Failed", e.Running = "Running", e.NotFound = "NotFound", e))(C || {});
339
+ function be(e = {}) {
340
+ return u({
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 De(e, t = {}) {
346
+ const n = !!e && e.length > 0, a = c(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
+ }), o = l({
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
356
  return s(o);
356
357
  }
357
- function le(e, n = {}) {
358
- const t = !!e, u = i(async () => {
358
+ function he(e, t = {}) {
359
+ const n = !!e, a = c(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
+ }), o = l({
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
369
  return s(o);
369
370
  }
370
- function ye(e, n, t = {}) {
371
+ function pe(e, t, n = {}) {
371
372
  const {
372
- limitParams: u = { limit: 2e3, limitFrom: "top" },
373
+ limitParams: a = { limit: 2e3, limitFrom: "top" },
373
374
  pageParams: o,
374
- sortParams: l,
375
+ sortParams: i,
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, g = c(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
+ inputTableViewId: t,
383
384
  pageParams: o,
384
- limitParams: u,
385
- sortParams: l,
385
+ limitParams: a,
386
+ sortParams: i,
386
387
  offsetParam: y
387
388
  });
388
- }), F = c({
389
- queryKey: ["inputTableData", e, n],
390
- queryFn: m,
389
+ }), m = l({
390
+ queryKey: ["inputTableData", e, t],
391
+ queryFn: g,
391
392
  enabled: w,
392
- options: g
393
+ options: d
393
394
  });
394
- return s(F);
395
+ return s(m);
395
396
  }
396
- function ge() {
397
- const e = i(async () => (console.log("Fetching input table data..."), await r.inputTable.getInputTables())), n = c({
397
+ function Re() {
398
+ const e = c(async () => (console.log("Fetching input table data..."), await r.inputTable.getInputTables())), t = l({
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 Te(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: o, order: i, order_by: y, ...d } = t, w = {}, g = { limit: a, offset: o, order: i, order_by: y };
415
+ Object.keys(d).forEach((F) => {
416
+ n.includes(F) ? w[F] = d[F] : g[F] = d[F];
416
417
  });
417
- const F = w.enabled !== !1 && !!e, b = i(async () => {
418
+ const m = w.enabled !== !1 && !!e, b = c(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, g);
422
+ }), q = l({
423
+ queryKey: ["inputTableRows", e, t],
423
424
  queryFn: b,
424
- enabled: F,
425
+ enabled: m,
425
426
  options: w
426
427
  });
427
428
  return s(q);
428
429
  }
429
- 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);
430
+ function Se(e = {}) {
431
+ const t = f();
432
+ return u({
433
+ mutationFn: async (n) => (console.log("Inserting row into input table..."), await r.inputTable.insertRow(n.tableId, n.rowData)),
434
+ onSuccess: (n, a, o) => {
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, o) => {
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 ke(e = {}) {
446
+ const t = f();
447
+ return u({
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, o) => {
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, o) => {
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 xe(e = {}) {
465
+ const t = f();
466
+ return u({
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, o) => {
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, o) => {
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 Ee(e = {}) {
484
+ return u({
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 Ke(e = {}) {
490
+ return u({
491
+ mutationFn: async (t) => await r.definition.runPublishedDefinition(t),
491
492
  ...e
492
493
  });
493
494
  }
494
- function be(e = {}) {
495
- return a({
496
- mutationFn: async (n) => await r.definition.runSampleDefinition(n),
495
+ function Ve(e = {}) {
496
+ return u({
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 Ce(e = {}) {
502
+ return u({
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 Ge(e = {}) {
508
+ return u({
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 = c(async () => (console.log("Fetching user details..."), await r.user.getLoggedInUserDetails())), a = l({
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 Ie = G, I = ["Owner", "Editor", "Viewer", "ReadOnly"], h = r.permissions?.getPermissions;
523
+ function Pe(e, t, n = {}) {
524
+ const a = n.enabled !== !1 && !!e?.trim(), o = c(
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 ?? I
542
543
  });
543
544
  },
544
545
  void 0,
545
546
  0
546
- ), l = c({
547
- queryKey: ["documentPermissions", e ?? "", n, t.relations ?? []],
547
+ ), i = l({
548
+ queryKey: ["documentPermissions", e ?? "", t, n.relations ?? []],
548
549
  queryFn: o,
549
- enabled: u,
550
- options: t
550
+ enabled: a,
551
+ options: n
551
552
  });
552
- return s(l);
553
+ return s(i);
553
554
  }
554
- function Re(e = {}) {
555
- return a({
556
- mutationFn: async (n) => (console.log("Uploading file..."), await r.files.fileUpload(n)),
555
+ function Be(e = {}) {
556
+ return u({
557
+ mutationFn: async (t) => (console.log("Uploading file..."), await r.files.fileUpload(t)),
557
558
  ...e
558
559
  });
559
560
  }
560
- function Se({
561
+ function Ae({
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 o = !!e, i = c(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
- }), y = c({
569
+ return console.log("Downloading file..."), await r.files.fileDownload({ fileId: e, contentType: t, method: n });
570
+ }), y = l({
570
571
  queryKey: ["file", "fileDownload", e],
571
- queryFn: l,
572
+ queryFn: i,
572
573
  enabled: o,
573
- options: 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 Oe(e, t = {}) {
579
+ const n = !!e, a = c(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
+ }), o = l({
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
589
  return s(o);
589
590
  }
590
- function Ce(e, n = {}) {
591
- const t = !!e, u = i(async () => {
591
+ function Ue(e, t = {}) {
592
+ const n = !!e, a = c(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
+ }), o = l({
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
602
  return s(o);
602
603
  }
603
- function Ee(e = {}) {
604
- return a({
605
- mutationFn: async (n) => (console.log("Saving workbook..."), await r.workbook.saveWorkbook(n)),
604
+ function ve(e = {}) {
605
+ return u({
606
+ mutationFn: async (t) => (console.log("Saving workbook..."), await r.workbook.saveWorkbook(t)),
606
607
  ...e
607
608
  });
608
609
  }
609
- function Ke(e = {}) {
610
- return a({
611
- mutationFn: async (n) => (console.log("Publishing workbook..."), await r.workbook.publishWorkbook(n)),
610
+ function Me(e = {}) {
611
+ return u({
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 We(e = {}) {
617
+ return u({
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 Qe(e, t, n = {}) {
623
+ const a = !!e && !!t, o = c(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
- c({
629
- queryKey: ["form", "getFormSchema", e, n],
629
+ l({
630
+ queryKey: ["form", "getFormSchema", e, t],
630
631
  queryFn: o,
631
- enabled: u,
632
- options: t
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 Le(e, t = {}) {
638
+ const n = !!e, a = c(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
+ }), o = l({
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
648
  return s(o);
648
649
  }
649
- function Pe(e, n = {}) {
650
+ function _e(e, t = {}) {
650
651
  return s({
651
652
  queryKey: ["form", e],
652
653
  queryFn: async () => {
@@ -655,90 +656,97 @@ 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 He(e = {}) {
663
+ return u({
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 Ne(e = {}) {
669
+ return u({
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 ze(e = {}) {
675
+ return u({
676
+ mutationFn: async (t) => await r.audit.createAuditLog(t),
676
677
  ...e
677
678
  });
678
679
  }
679
- function ve(e = {}) {
680
+ function je(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 Je(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 P(e = {}) {
695
+ return u({
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 B(e = {}) {
701
+ return u({
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 Ye(e = {}) {
707
+ return u({
708
+ mutationFn: async (t) => await r.reconV2.deleteReconV2(t),
708
709
  ...e
709
710
  });
710
711
  }
711
- function Qe(e = {}) {
712
- return a({
713
- mutationFn: async (n) => await r.reconV2.runReconV2(n),
712
+ function A(e = {}) {
713
+ return u({
714
+ mutationFn: async (t) => await r.reconV2.runReconV2(t),
714
715
  ...e
715
716
  });
716
717
  }
717
- function _e(e = {}) {
718
+ function O(e = {}) {
718
719
  return s({
719
720
  queryKey: ["reconV2Workflows"],
720
721
  queryFn: async () => await r.reconV2.getAllReconV2Workflows(),
721
722
  ...e
722
723
  });
723
724
  }
724
- function Ne(e, n = {}) {
725
- const t = e?.trim();
725
+ function U(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 $e(e = {}) {
735
+ return s({
736
+ queryKey: ["reconV2", "templates"],
737
+ queryFn: async () => await r.reconV2.getReconV2Templates(),
738
+ ...e
739
+ });
740
+ }
741
+ function v(e, t = {}) {
734
742
  return s({
735
743
  queryKey: ["reconV2", "runResult", e],
736
744
  queryFn: async () => await r.reconV2.getReconV2RunResult({ runId: e }),
737
745
  enabled: !!e,
738
- ...n
746
+ ...t
739
747
  });
740
748
  }
741
- function Le(e, n = {}) {
749
+ function M(e, t = {}) {
742
750
  return s({
743
751
  queryKey: [
744
752
  "reconV2",
@@ -753,270 +761,356 @@ function Le(e, n = {}) {
753
761
  e
754
762
  ),
755
763
  enabled: !!e.runId && !!e.workflowId,
756
- ...n
764
+ ...t
757
765
  });
758
766
  }
759
- function ze(e = {}) {
760
- return a({
761
- mutationFn: async (n) => await r.reconV2.startReconV2Profile(n),
767
+ function Xe(e = {}) {
768
+ return u({
769
+ mutationFn: async (t) => await r.reconV2.startReconV2Profile(t),
762
770
  ...e
763
771
  });
764
772
  }
765
- function je(e, n = "left", t = {}) {
773
+ function Ze(e, t = "left", n = {}) {
766
774
  return s({
767
- queryKey: ["reconV2", "profile", e, n],
775
+ queryKey: ["reconV2", "profile", e, t],
768
776
  queryFn: async () => await r.reconV2.getReconV2ProfileResult({
769
777
  workflowId: e,
770
- side: n
778
+ side: t
771
779
  }),
772
780
  enabled: !!e,
773
- ...t
781
+ ...n
774
782
  });
775
783
  }
776
- function Je(e = {}) {
777
- return a({
778
- mutationFn: async (n) => await r.reconV2.startReconV2Clean(n),
784
+ function et(e = {}) {
785
+ return u({
786
+ mutationFn: async (t) => await r.reconV2.startReconV2Clean(t),
779
787
  ...e
780
788
  });
781
789
  }
782
- function Ye(e, n = "left", t = {}) {
790
+ function tt(e, t = "left", n = {}) {
783
791
  return s({
784
- queryKey: ["reconV2", "clean", e, n],
792
+ queryKey: ["reconV2", "clean", e, t],
785
793
  queryFn: async () => await r.reconV2.getReconV2CleanResult({
786
794
  workflowId: e,
787
- side: n
795
+ side: t
788
796
  }),
789
797
  enabled: !!e,
790
- ...t
798
+ ...n
791
799
  });
792
800
  }
793
- function $e(e, n, t, u = {}) {
801
+ function nt(e, t, n, a = {}) {
794
802
  return s({
795
- queryKey: ["reconV2", "diff", e, t],
803
+ queryKey: ["reconV2", "diff", e, n],
796
804
  queryFn: async () => await r.reconV2.getReconV2Diff({
797
805
  runId: e,
798
- workflowId: n,
799
- prevRunId: t
806
+ workflowId: t,
807
+ prevRunId: n
800
808
  }),
801
- enabled: !!e && !!n && !!t,
802
- ...u
809
+ enabled: !!e && !!t && !!n,
810
+ ...a
803
811
  });
804
812
  }
805
- function Xe(e, n, t = {}) {
813
+ function rt(e, t, n = {}) {
806
814
  return s({
807
815
  queryKey: ["reconV2", "explanation", e],
808
816
  queryFn: async () => await r.reconV2.getReconV2Explanation({
809
817
  runId: e,
810
- workflowId: n
818
+ workflowId: t
811
819
  }),
812
- enabled: !!e && !!n,
813
- ...t
820
+ enabled: !!e && !!t,
821
+ ...n
814
822
  });
815
823
  }
816
- const P = ["SUCCEEDED", "FAILED"];
817
- function Ze(e, n = {}) {
818
- const [t, u] = h(
824
+ const W = ["SUCCEEDED", "FAILED"];
825
+ function Q(e, t = {}) {
826
+ const [n, a] = D(
819
827
  void 0
820
- ), [o, l] = h(!1), y = S(n.onComplete);
821
- return y.current = n.onComplete, k(() => {
828
+ ), [o, i] = D(!1), y = S(t.onComplete);
829
+ return y.current = t.onComplete, k(() => {
822
830
  if (!e)
823
831
  return;
824
- const g = p().websocketProvider;
825
- if (!g)
832
+ const d = p().websocketProvider;
833
+ if (!d)
826
834
  return;
827
- u(void 0), l(!1);
828
- const w = R.websocketUtils.ReconResultChannel;
829
- let m = !1;
830
- const F = () => {
831
- m || (m = !0, g.unbind(w, e));
835
+ a(void 0), i(!1);
836
+ const w = T.websocketUtils.ReconResultChannel;
837
+ let g = !1;
838
+ const m = () => {
839
+ g || (g = !0, d.unbind(w, e));
832
840
  };
833
- return g.bind(w, e, (b) => {
841
+ return d.bind(w, e, (b) => {
834
842
  let q;
835
843
  try {
836
844
  q = typeof b == "string" ? JSON.parse(b) : b;
837
845
  } catch {
838
846
  q = { status: void 0 };
839
847
  }
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 };
848
+ a(q);
849
+ const F = q?.status?.toUpperCase();
850
+ F && W.includes(F) && (i(!0), y.current?.(q), m());
851
+ }), m;
852
+ }, [e]), { data: n, isTerminal: o };
853
+ }
854
+ function L(e, t = {}) {
855
+ const n = e?.trim();
856
+ return s({
857
+ queryKey: ["reconV2", "workflow", n],
858
+ queryFn: async () => await r.reconV2.getReconV2Workflow({ id: n }),
859
+ enabled: !!n,
860
+ ...t
861
+ });
862
+ }
863
+ function _(e, t) {
864
+ return t.split(".").reduce(
865
+ (n, a) => n && typeof n == "object" ? n[a] : void 0,
866
+ e
867
+ );
868
+ }
869
+ function at(e, t = {}) {
870
+ const n = O(t);
871
+ return {
872
+ workflows: x(() => {
873
+ const o = n.data ?? [];
874
+ return e?.key ? o.filter((i) => _(i, e.key) === e.value) : o;
875
+ }, [n.data, e?.key, e?.value]),
876
+ isLoading: n.isLoading,
877
+ error: n.error,
878
+ refetch: n.refetch
879
+ };
880
+ }
881
+ function ot(e, t = {}) {
882
+ const n = L(e, t);
883
+ return {
884
+ workflow: n.data,
885
+ isLoading: n.isLoading,
886
+ error: n.error,
887
+ refetch: n.refetch
888
+ };
889
+ }
890
+ function ut() {
891
+ const e = P(), t = B();
892
+ return {
893
+ create: e.mutateAsync,
894
+ update: t.mutateAsync,
895
+ isSaving: e.isPending || t.isPending,
896
+ error: e.error ?? t.error,
897
+ data: t.data ?? e.data
898
+ };
845
899
  }
846
- function en(e = {}) {
900
+ function st(e, t = {}) {
901
+ const n = e?.trim(), [a, o] = D(void 0), i = A(), y = Q(a, { onComplete: t.onComplete }), d = U(n);
902
+ return {
903
+ startRun: async (g = {}) => {
904
+ if (!n)
905
+ throw new Error("workflowId is required to start a run");
906
+ const m = await i.mutateAsync({ workflowId: n, ...g });
907
+ return o(m?.runId), m?.runId;
908
+ },
909
+ runId: a,
910
+ status: y.data,
911
+ isRunning: i.isPending || !!a && !y.isTerminal,
912
+ isTerminal: y.isTerminal,
913
+ runs: d.data,
914
+ refetchRuns: d.refetch
915
+ };
916
+ }
917
+ function it({
918
+ runId: e,
919
+ workflowId: t,
920
+ exceptionType: n,
921
+ ruleFilter: a,
922
+ orderBy: o
923
+ }) {
924
+ const i = v(e), y = M({
925
+ runId: e ?? void 0,
926
+ workflowId: t ?? void 0,
927
+ exceptionType: n,
928
+ ruleFilter: a,
929
+ orderBy: o
930
+ }), d = y.data?.result;
931
+ return {
932
+ runResult: i.data,
933
+ records: d?.data ?? [],
934
+ description: d?.description ?? [],
935
+ isLoading: i.isLoading || y.isLoading,
936
+ error: i.error ?? y.error,
937
+ refetch: y.refetch
938
+ };
939
+ }
940
+ function ct(e = {}) {
847
941
  return s({
848
942
  queryKey: ["users"],
849
943
  queryFn: async () => await r.user.getAllUsers(),
850
944
  ...e
851
945
  });
852
946
  }
853
- function nn(e = {}) {
947
+ function lt(e = {}) {
854
948
  return s({
855
949
  queryKey: ["httpTriggers"],
856
950
  queryFn: async () => await r.workflow.getAllHttpTriggers(),
857
951
  ...e
858
952
  });
859
953
  }
860
- function tn(e = {}) {
861
- return a({
862
- mutationFn: async (n) => await r.process.markTaskDone(n),
954
+ function yt(e = {}) {
955
+ return u({
956
+ mutationFn: async (t) => await r.process.markTaskDone(t),
863
957
  ...e
864
958
  });
865
959
  }
866
- function rn(e = {}) {
867
- return a({
868
- mutationFn: async (n) => await r.process.reassignTask(n),
960
+ function dt(e = {}) {
961
+ return u({
962
+ mutationFn: async (t) => await r.process.reassignTask(t),
869
963
  ...e
870
964
  });
871
965
  }
872
- function un(e, n = {}) {
966
+ function ft(e, t = {}) {
873
967
  return s({
874
968
  queryKey: ["processTriggers", e],
875
969
  queryFn: async () => await r.process.getTriggersBySheet(e),
876
970
  enabled: !!e,
877
- ...n
971
+ ...t
878
972
  });
879
973
  }
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]
974
+ function wt(e = {}) {
975
+ const t = f();
976
+ return u({
977
+ mutationFn: async (n) => await r.process.registerProcessTrigger(n),
978
+ onSuccess: (n, a) => {
979
+ t.invalidateQueries({
980
+ queryKey: ["processTriggers", a.process_sheet_id]
887
981
  });
888
982
  },
889
983
  ...e
890
984
  });
891
985
  }
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"]
986
+ function gt(e = {}) {
987
+ const t = f();
988
+ return u({
989
+ mutationFn: async ({ id: n }) => await r.process.deleteProcessTrigger(n),
990
+ onSuccess: (n, a) => {
991
+ t.invalidateQueries({
992
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
899
993
  });
900
994
  },
901
995
  ...e
902
996
  });
903
997
  }
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]
998
+ function mt(e = {}) {
999
+ const t = f();
1000
+ return u({
1001
+ mutationFn: async ({ triggerId: n, scheduleName: a }) => await r.process.pauseSchedule(n, a),
1002
+ onSuccess: (n, a) => {
1003
+ t.invalidateQueries({
1004
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
1005
+ }), t.invalidateQueries({
1006
+ queryKey: ["scheduleStatus", a.triggerId, a.scheduleName]
913
1007
  });
914
1008
  },
915
1009
  ...e
916
1010
  });
917
1011
  }
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]
1012
+ function Ft(e = {}) {
1013
+ const t = f();
1014
+ return u({
1015
+ mutationFn: async ({ triggerId: n, scheduleName: a }) => await r.process.resumeSchedule(n, a),
1016
+ onSuccess: (n, a) => {
1017
+ t.invalidateQueries({
1018
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
1019
+ }), t.invalidateQueries({
1020
+ queryKey: ["scheduleStatus", a.triggerId, a.scheduleName]
927
1021
  });
928
1022
  },
929
1023
  ...e
930
1024
  });
931
1025
  }
932
- function ln(e, n, t = {}) {
1026
+ function qt(e, t, n = {}) {
933
1027
  return s({
934
- queryKey: ["scheduleStatus", e, n],
1028
+ queryKey: ["scheduleStatus", e, t],
935
1029
  queryFn: async () => await r.process.getScheduleStatus(
936
1030
  e,
937
- n
1031
+ t
938
1032
  ),
939
- enabled: !!e && !!n,
940
- ...t
1033
+ enabled: !!e && !!t,
1034
+ ...n
941
1035
  });
942
1036
  }
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"]
1037
+ function bt(e = {}) {
1038
+ const t = f();
1039
+ return u({
1040
+ mutationFn: async ({ triggerId: n, scheduleName: a }) => await r.process.executeNow(n, a),
1041
+ onSuccess: (n, a) => {
1042
+ t.invalidateQueries({
1043
+ queryKey: a.sheetId ? ["processTriggers", a.sheetId] : ["processTriggers"]
950
1044
  });
951
1045
  },
952
1046
  ...e
953
1047
  });
954
1048
  }
955
- function gn(e = {}, n = {}) {
1049
+ function Dt(e = {}, t = {}) {
956
1050
  return s({
957
1051
  queryKey: ["inboxItems", "all", e.page, e.perPage],
958
1052
  queryFn: async () => await r.inboxItems.getAllInboxItems(e),
959
- ...n
1053
+ ...t
960
1054
  });
961
1055
  }
962
- function fn(e = {}) {
963
- return a({
964
- mutationFn: async (n) => await r.inboxItems.markItemAsRead(n),
1056
+ function ht(e = {}) {
1057
+ return u({
1058
+ mutationFn: async (t) => await r.inboxItems.markItemAsRead(t),
965
1059
  ...e
966
1060
  });
967
1061
  }
968
- function wn(e = {}) {
969
- return a({
970
- mutationFn: async (n) => await r.inboxItems.markItemAsUnread(n),
1062
+ function pt(e = {}) {
1063
+ return u({
1064
+ mutationFn: async (t) => await r.inboxItems.markItemAsUnread(t),
971
1065
  ...e
972
1066
  });
973
1067
  }
974
- function dn(e = {}) {
975
- return a({
976
- mutationFn: async (n) => await r.inboxItems.createInboxItemPerUser(n),
1068
+ function Rt(e = {}) {
1069
+ return u({
1070
+ mutationFn: async (t) => await r.inboxItems.createInboxItemPerUser(t),
977
1071
  ...e
978
1072
  });
979
1073
  }
980
- function mn(e, n = {}) {
1074
+ function Tt(e, t = {}) {
981
1075
  return s({
982
1076
  queryKey: ["emailConversations", e?.page, e?.pageSize, e?.tag, e?.orderByCreatedDate],
983
1077
  queryFn: async () => await r.emailEngine.getAllConversations(e),
984
- ...n
1078
+ ...t
985
1079
  });
986
1080
  }
987
- function qn(e, n = {}) {
1081
+ function St(e, t = {}) {
988
1082
  return s({
989
1083
  queryKey: ["emailConversation", e],
990
1084
  queryFn: async () => await r.emailEngine.getConversation({
991
1085
  conversationId: e
992
1086
  }),
993
1087
  enabled: !!e,
994
- ...n
1088
+ ...t
995
1089
  });
996
1090
  }
997
- function Fn(e = {}) {
998
- const n = f();
999
- return a({
1000
- mutationFn: async (t) => await r.emailEngine.createConversation(t),
1091
+ function kt(e = {}) {
1092
+ const t = f();
1093
+ return u({
1094
+ mutationFn: async (n) => await r.emailEngine.createConversation(n),
1001
1095
  onSuccess: () => {
1002
- n.invalidateQueries({ queryKey: ["emailConversations"] });
1096
+ t.invalidateQueries({ queryKey: ["emailConversations"] });
1003
1097
  },
1004
1098
  ...e
1005
1099
  });
1006
1100
  }
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]
1101
+ function xt(e = {}) {
1102
+ const t = f();
1103
+ return u({
1104
+ mutationFn: async (n) => await r.emailEngine.replyToConversation(n),
1105
+ onSuccess: (n, a) => {
1106
+ t.invalidateQueries({
1107
+ queryKey: ["emailConversation", a.conversationId]
1014
1108
  });
1015
1109
  },
1016
1110
  ...e
1017
1111
  });
1018
1112
  }
1019
- function hn(e, n = {}) {
1113
+ function Et(e, t = {}) {
1020
1114
  return s({
1021
1115
  queryKey: [
1022
1116
  "emailMessagesBySender",
@@ -1028,264 +1122,500 @@ function hn(e, n = {}) {
1028
1122
  ],
1029
1123
  queryFn: async () => await r.emailEngine.getMessageBySenderId(e),
1030
1124
  enabled: !!e.senderId,
1031
- ...n
1125
+ ...t
1032
1126
  });
1033
1127
  }
1034
- function Dn(e = {}) {
1035
- return a({
1036
- mutationFn: async (n) => await r.emailEngine.searchMessages(n),
1128
+ function Kt(e = {}) {
1129
+ return u({
1130
+ mutationFn: async (t) => await r.emailEngine.searchMessages(t),
1037
1131
  ...e
1038
1132
  });
1039
1133
  }
1040
- function pn(e = {}) {
1041
- const n = i(async () => await r.tcn.getAuthUrl()), t = c({
1134
+ function Vt(e = {}) {
1135
+ const t = c(async () => await r.tcn.getAuthUrl()), n = l({
1042
1136
  queryKey: ["tcn", "authUrl"],
1043
- queryFn: n,
1137
+ queryFn: t,
1044
1138
  enabled: !0,
1045
1139
  options: e
1046
1140
  });
1047
- return s(t);
1141
+ return s(n);
1048
1142
  }
1049
- function Tn(e = {}) {
1050
- return a({
1051
- mutationFn: async ({ code: n }) => await r.tcn.exchangeCode(n),
1143
+ function Ct(e = {}) {
1144
+ return u({
1145
+ mutationFn: async ({ code: t }) => await r.tcn.exchangeCode(t),
1052
1146
  ...e
1053
1147
  });
1054
1148
  }
1055
- function Rn(e = {}) {
1056
- return a({
1057
- mutationFn: async ({ refresh_token: n }) => await r.tcn.refreshToken(n),
1149
+ function Gt(e = {}) {
1150
+ return u({
1151
+ mutationFn: async ({ refresh_token: t }) => await r.tcn.refreshToken(t),
1058
1152
  ...e
1059
1153
  });
1060
1154
  }
1061
- function Sn(e = {}) {
1062
- return a({
1063
- mutationFn: async ({ token: n }) => await r.tcn.getCurrentAgent(n),
1155
+ function It(e = {}) {
1156
+ return u({
1157
+ mutationFn: async ({ token: t }) => await r.tcn.getCurrentAgent(t),
1064
1158
  ...e
1065
1159
  });
1066
1160
  }
1067
- function kn(e = {}) {
1068
- return a({
1069
- mutationFn: async ({ token: n, huntGroupSid: t }) => await r.tcn.getAgentSkills(n, t),
1161
+ function Pt(e = {}) {
1162
+ return u({
1163
+ mutationFn: async ({ token: t, huntGroupSid: n }) => await r.tcn.getAgentSkills(t, n),
1070
1164
  ...e
1071
1165
  });
1072
1166
  }
1073
- function Cn(e = {}) {
1074
- return a({
1075
- mutationFn: async ({ token: n, huntGroupSid: t, skills: u }) => await r.tcn.createSession(n, t, u),
1167
+ function Bt(e = {}) {
1168
+ return u({
1169
+ mutationFn: async ({ token: t, huntGroupSid: n, skills: a }) => await r.tcn.createSession(t, n, a),
1076
1170
  ...e
1077
1171
  });
1078
1172
  }
1079
- function En(e = {}) {
1080
- return a({
1081
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.keepAlive(n, t),
1173
+ function At(e = {}) {
1174
+ return u({
1175
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.keepAlive(t, n),
1082
1176
  ...e
1083
1177
  });
1084
1178
  }
1085
- function Kn(e = {}) {
1086
- return a({
1087
- mutationFn: async ({ token: n }) => await r.tcn.agentGetStatus(n),
1179
+ function Ot(e = {}) {
1180
+ return u({
1181
+ mutationFn: async ({ token: t }) => await r.tcn.agentGetStatus(t),
1088
1182
  ...e
1089
1183
  });
1090
1184
  }
1091
- function Vn(e = {}) {
1092
- return a({
1093
- mutationFn: async ({ token: n, huntGroupSid: t }) => await r.tcn.getHuntGroupAgentSettings(n, t),
1185
+ function Ut(e = {}) {
1186
+ return u({
1187
+ mutationFn: async ({ token: t, huntGroupSid: n }) => await r.tcn.getHuntGroupAgentSettings(t, n),
1094
1188
  ...e
1095
1189
  });
1096
1190
  }
1097
- function Bn(e = {}) {
1098
- return a({
1099
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.dialManualPrepare(n, t),
1191
+ function vt(e = {}) {
1192
+ return u({
1193
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.dialManualPrepare(t, n),
1100
1194
  ...e
1101
1195
  });
1102
1196
  }
1103
- function Gn(e = {}) {
1104
- return a({
1105
- mutationFn: async ({ token: n, call: t }) => await r.tcn.processManualDial(n, t),
1197
+ function Mt(e = {}) {
1198
+ return u({
1199
+ mutationFn: async ({ token: t, call: n }) => await r.tcn.processManualDial(t, n),
1106
1200
  ...e
1107
1201
  });
1108
1202
  }
1109
- function Pn(e = {}) {
1110
- return a({
1111
- mutationFn: async ({ token: n, agentSessionSid: t, huntGroupSid: u, simpleCallData: o }) => await r.tcn.manualDialStart(
1112
- n,
1203
+ function Wt(e = {}) {
1204
+ return u({
1205
+ mutationFn: async ({ token: t, agentSessionSid: n, huntGroupSid: a, simpleCallData: o }) => await r.tcn.manualDialStart(
1113
1206
  t,
1114
- u,
1207
+ n,
1208
+ a,
1115
1209
  o
1116
1210
  ),
1117
1211
  ...e
1118
1212
  });
1119
1213
  }
1120
- function On(e = {}) {
1121
- return a({
1122
- mutationFn: async ({ token: n, sessionSid: t, reason: u }) => await r.tcn.agentDisconnect(n, t, u),
1214
+ function Qt(e = {}) {
1215
+ return u({
1216
+ mutationFn: async ({ token: t, sessionSid: n, reason: a }) => await r.tcn.agentDisconnect(t, n, a),
1217
+ ...e
1218
+ });
1219
+ }
1220
+ function Lt(e = {}) {
1221
+ return u({
1222
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.agentPause(t, n),
1223
+ ...e
1224
+ });
1225
+ }
1226
+ function _t(e = {}) {
1227
+ return u({
1228
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.agentSetReady(t, n),
1229
+ ...e
1230
+ });
1231
+ }
1232
+ function Ht(e = {}) {
1233
+ return u({
1234
+ mutationFn: async ({ token: t, sessionSid: n }) => await r.tcn.agentGetConnectedParty(t, n),
1123
1235
  ...e
1124
1236
  });
1125
1237
  }
1126
- function An(e = {}) {
1127
- return a({
1128
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.agentPause(n, t),
1238
+ function Nt(e = {}) {
1239
+ return u({
1240
+ mutationFn: async ({ token: t, callSid: n }) => await r.tcn.getCallData(t, n),
1129
1241
  ...e
1130
1242
  });
1131
1243
  }
1132
- function Un(e = {}) {
1133
- return a({
1134
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.agentSetReady(n, t),
1244
+ function zt(e = {}) {
1245
+ return u({
1246
+ mutationFn: async ({ token: t, sessionSid: n, holdType: a }) => await r.tcn.agentPutCallOnHold(t, n, a),
1135
1247
  ...e
1136
1248
  });
1137
1249
  }
1138
- function vn(e = {}) {
1139
- return a({
1140
- mutationFn: async ({ token: n, sessionSid: t }) => await r.tcn.agentGetConnectedParty(n, t),
1250
+ function jt(e = {}) {
1251
+ return u({
1252
+ mutationFn: async ({ token: t, sessionSid: n, holdType: a }) => await r.tcn.agentGetCallFromHold(t, n, a),
1141
1253
  ...e
1142
1254
  });
1143
1255
  }
1144
- function Wn(e = {}) {
1145
- return a({
1146
- mutationFn: async ({ token: n, callSid: t }) => await r.tcn.getCallData(n, t),
1256
+ function Jt(e = {}) {
1257
+ return u({
1258
+ mutationFn: async ({ token: t, templateNumber: n, groupSid: a }) => await r.tcn.ftpManualDialReport(t, n, a),
1147
1259
  ...e
1148
1260
  });
1149
1261
  }
1150
- function xn(e = {}) {
1151
- return a({
1152
- mutationFn: async ({ token: n, sessionSid: t, holdType: u }) => await r.tcn.agentPutCallOnHold(n, t, u),
1262
+ function Yt(e = {}) {
1263
+ return u({
1264
+ mutationFn: async (t) => await r.templates.renderTemplate(t),
1153
1265
  ...e
1154
1266
  });
1155
1267
  }
1156
- function Mn(e = {}) {
1157
- return a({
1158
- mutationFn: async ({ token: n, sessionSid: t, holdType: u }) => await r.tcn.agentGetCallFromHold(n, t, u),
1268
+ function $t(e, t = {}) {
1269
+ const n = e?.trim();
1270
+ return s({
1271
+ queryKey: ["databox", "folder", n],
1272
+ queryFn: async () => {
1273
+ if (!n)
1274
+ throw new Error("Folder ID is required");
1275
+ return await r.databox.getDataboxFolder({ folderId: n });
1276
+ },
1277
+ enabled: !!n,
1278
+ ...t
1279
+ });
1280
+ }
1281
+ function Xt(e, t = {}) {
1282
+ const n = e?.trim();
1283
+ return s({
1284
+ queryKey: ["databox", "folder", n, "files"],
1285
+ queryFn: async () => {
1286
+ if (!n)
1287
+ throw new Error("Folder ID is required");
1288
+ return await r.databox.getDataboxFolderFiles({ folderId: n });
1289
+ },
1290
+ enabled: !!n,
1291
+ ...t
1292
+ });
1293
+ }
1294
+ function Zt(e, t = {}) {
1295
+ const n = e?.trim();
1296
+ return s({
1297
+ queryKey: ["databox", "folder", n, "datasets"],
1298
+ queryFn: async () => {
1299
+ if (!n)
1300
+ throw new Error("Folder ID is required");
1301
+ return await r.databox.getDataboxFolderDatasets({ folderId: n });
1302
+ },
1303
+ enabled: !!n,
1304
+ ...t
1305
+ });
1306
+ }
1307
+ function en(e, t = {}) {
1308
+ const n = e?.trim();
1309
+ return s({
1310
+ queryKey: ["databox", "folder", n, "duplicates"],
1311
+ queryFn: async () => {
1312
+ if (!n)
1313
+ throw new Error("Folder ID is required");
1314
+ return await r.databox.getDataboxFolderDuplicates({
1315
+ folderId: n
1316
+ });
1317
+ },
1318
+ enabled: !!n,
1319
+ ...t
1320
+ });
1321
+ }
1322
+ function tn(e, t = {}) {
1323
+ const n = e?.trim();
1324
+ return s({
1325
+ queryKey: ["dataset", n, "exceptions"],
1326
+ queryFn: async () => {
1327
+ if (!n)
1328
+ throw new Error("Dataset ID is required");
1329
+ return await r.dataset.getDatasetExceptions({ datasetId: n });
1330
+ },
1331
+ enabled: !!n,
1332
+ ...t
1333
+ });
1334
+ }
1335
+ function nn(e, t, n = {}) {
1336
+ const a = e?.trim();
1337
+ return s({
1338
+ queryKey: ["dataset", a, "duplicates", t ?? null],
1339
+ queryFn: async () => {
1340
+ if (!a)
1341
+ throw new Error("Dataset ID is required");
1342
+ return await r.dataset.getDatasetDuplicates({
1343
+ datasetId: a,
1344
+ group: t
1345
+ });
1346
+ },
1347
+ enabled: !!a,
1348
+ ...n
1349
+ });
1350
+ }
1351
+ function rn(e, t = {}) {
1352
+ const n = e?.trim();
1353
+ return s({
1354
+ queryKey: ["databox", "folder", n, "schema"],
1355
+ queryFn: async () => {
1356
+ if (!n)
1357
+ throw new Error("Folder ID is required");
1358
+ return await r.databox.getDataboxFolderSchema({ folderId: n });
1359
+ },
1360
+ enabled: !!n,
1361
+ ...t
1362
+ });
1363
+ }
1364
+ function an(e, t = {}) {
1365
+ const n = e?.trim();
1366
+ return s({
1367
+ queryKey: ["databox", "folder", n, "schema", "history"],
1368
+ queryFn: async () => {
1369
+ if (!n)
1370
+ throw new Error("Folder ID is required");
1371
+ return await r.databox.getDataboxSchemaHistory({ folderId: n });
1372
+ },
1373
+ enabled: !!n,
1374
+ ...t
1375
+ });
1376
+ }
1377
+ function on(e, t = {}) {
1378
+ const n = e?.trim();
1379
+ return s({
1380
+ queryKey: ["databox", "folder", n, "trash"],
1381
+ queryFn: async () => {
1382
+ if (!n)
1383
+ throw new Error("Folder ID is required");
1384
+ return await r.databox.getDataboxTrashFiles({ folderId: n });
1385
+ },
1386
+ enabled: !!n,
1387
+ ...t
1388
+ });
1389
+ }
1390
+ function un(e, t = {}) {
1391
+ const n = e?.trim();
1392
+ return s({
1393
+ queryKey: ["databox", "file", n],
1394
+ queryFn: async () => {
1395
+ if (!n)
1396
+ throw new Error("File ID is required");
1397
+ return await r.databox.getDataboxFile({ fileId: n });
1398
+ },
1399
+ enabled: !!n,
1400
+ ...t
1401
+ });
1402
+ }
1403
+ function sn(e, t = {}) {
1404
+ const n = e?.trim();
1405
+ return s({
1406
+ queryKey: ["databox", "file", n, "status"],
1407
+ queryFn: async () => {
1408
+ if (!n)
1409
+ throw new Error("File ID is required");
1410
+ return await r.databox.getDataboxFileStatus({ fileId: n });
1411
+ },
1412
+ enabled: !!n,
1413
+ ...t
1414
+ });
1415
+ }
1416
+ function cn(e, t = {}) {
1417
+ const n = e?.trim();
1418
+ return s({
1419
+ queryKey: ["databox", "file", n, "runs"],
1420
+ queryFn: async () => {
1421
+ if (!n)
1422
+ throw new Error("File ID is required");
1423
+ return await r.databox.getDataboxFileRuns({ fileId: n });
1424
+ },
1425
+ enabled: !!n,
1426
+ ...t
1427
+ });
1428
+ }
1429
+ function ln(e, t = {}) {
1430
+ const n = e?.trim();
1431
+ return s({
1432
+ queryKey: ["databox", "file", n, "download-url"],
1433
+ queryFn: async () => {
1434
+ if (!n)
1435
+ throw new Error("File ID is required");
1436
+ return await r.databox.getDataboxFileDownloadUrl({ fileId: n });
1437
+ },
1438
+ enabled: !!n,
1439
+ ...t
1440
+ });
1441
+ }
1442
+ function yn(e = {}) {
1443
+ return u({
1444
+ mutationFn: async (t) => await r.databox.dropFileToDatabox(t),
1445
+ ...e
1446
+ });
1447
+ }
1448
+ function dn(e = {}) {
1449
+ return u({
1450
+ mutationFn: async (t) => await r.databox.runDataboxFolder(t),
1451
+ ...e
1452
+ });
1453
+ }
1454
+ function fn(e = {}) {
1455
+ return u({
1456
+ mutationFn: async (t) => await r.databox.updateDataboxFolderSchema(t),
1457
+ ...e
1458
+ });
1459
+ }
1460
+ function wn(e = {}) {
1461
+ return u({
1462
+ mutationFn: async (t) => await r.databox.trashDataboxFiles(t),
1159
1463
  ...e
1160
1464
  });
1161
1465
  }
1162
- function In(e = {}) {
1163
- return a({
1164
- mutationFn: async ({ token: n, templateNumber: t, groupSid: u }) => await r.tcn.ftpManualDialReport(n, t, u),
1466
+ function gn(e = {}) {
1467
+ return u({
1468
+ mutationFn: async (t) => await r.databox.restoreDataboxFile(t),
1165
1469
  ...e
1166
1470
  });
1167
1471
  }
1168
- function Qn(e = {}) {
1169
- return a({
1170
- mutationFn: async (n) => await r.templates.renderTemplate(n),
1472
+ function mn(e = {}) {
1473
+ return u({
1474
+ mutationFn: async (t) => await r.databox.permanentDeleteDataboxFiles(t),
1171
1475
  ...e
1172
1476
  });
1173
1477
  }
1174
1478
  export {
1175
- Ln as ReactQueryDevtools,
1176
- V as WorkflowStatus,
1177
- A as reactQuery,
1178
- z as useCheckSubscriptionStatus,
1179
- Ue as useCreateAuditLog,
1180
- Fn as useCreateConversation,
1181
- dn as useCreateInboxItemPerUser,
1182
- Oe as useCreateOrUpdateForm,
1183
- xe as useCreateReconV2,
1184
- j as useCreateStatementRun,
1185
- M as useCreateThread,
1186
- J as useDataset,
1187
- x as useDatasetSample,
1188
- N as useDeleteComment,
1189
- an as useDeleteProcessTrigger,
1190
- Ie as useDeleteReconV2,
1191
- me as useDeleteRow,
1192
- Te as useDocumentPermissions,
1193
- yn as useExecuteNow,
1194
- Se as useFileDownload,
1195
- Re as useFileUpload,
1196
- hn as useFilterMessagesBySenderId,
1197
- mn as useGetAllConversations,
1198
- nn as useGetAllHttpTriggers,
1199
- gn as useGetAllInboxItems,
1200
- We as useGetAllRecon,
1201
- _e as useGetAllReconV2,
1202
- ve as useGetAllTemplatedPipelines,
1203
- en as useGetAllUsers,
1204
- Ae as useGetAuditLogs,
1205
- I as useGetCommentsByThreadId,
1206
- qn as useGetConversation,
1207
- Y as useGetDatasets,
1208
- Z as useGetFileByFolderIdAndName,
1209
- X as useGetFileUrlByFileId,
1210
- Pe as useGetFormById,
1211
- Ge as useGetFormData,
1212
- Be as useGetFormSchema,
1213
- ge as useGetInputTables,
1214
- ee as useGetPublishedWorkbookById,
1215
- Ye as useGetReconV2CleanResult,
1216
- $e as useGetReconV2Diff,
1217
- Xe as useGetReconV2Explanation,
1218
- je as useGetReconV2ProfileResult,
1219
- He as useGetReconV2RunResult,
1220
- Ne as useGetReconV2Runs,
1221
- Le as useGetReconV2SmartResult,
1222
- ne as useGetRunResultById,
1223
- te as useGetRunsByViewId,
1224
- ln as useGetScheduleStatus,
1225
- re as useGetStatementData,
1226
- ue as useGetTableById,
1227
- ke as useGetTaskDetails,
1228
- un as useGetTriggersBySheet,
1229
- oe as useGetViewById,
1230
- ae as useGetViewsBySheetId,
1231
- $ as useGetVirtualDatasets,
1232
- Ce as useGetWorkbookDetails,
1233
- se as useGetWorkbooksByType,
1234
- ie as useGetWorkflowInstanceStatusById,
1235
- ce as useGetWorksheets,
1236
- le as useGetWorksheetsByType,
1237
- ye as useInputTable,
1238
- we as useInsertRow,
1239
- fn as useMarkItemAsRead,
1240
- wn as useMarkItemAsUnread,
1241
- tn as useMarkTaskDone,
1242
- W as useMetric,
1243
- sn as usePauseSchedule,
1244
- Q as usePostComment,
1245
- Ke as usePublishWorkbook,
1246
- rn as useReassignTask,
1247
- Ze as useReconV2RunStatus,
1248
- on as useRegisterProcessTrigger,
1249
- Qn as useRenderTemplate,
1250
- bn as useReplyToConversation,
1251
- cn as useResumeSchedule,
1252
- fe as useRows,
1253
- qe as useRunDefinition,
1254
- Fe as useRunPublishedDefinition,
1255
- Ve as useRunRecon,
1256
- Qe as useRunReconV2,
1257
- be as useRunSampleDefinition,
1258
- Ee as useSaveWorkbook,
1259
- Dn as useSearchMessages,
1260
- Je as useStartReconV2Clean,
1261
- 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,
1285
- L as useUnsubscribeUser,
1286
- _ as useUpdateComment,
1287
- Me as useUpdateReconV2,
1288
- de as useUpdateRow,
1289
- B as useUser,
1290
- pe as useUserDetails
1479
+ Dn as ReactQueryDevtools,
1480
+ C as WorkflowStatus,
1481
+ N as reactQuery,
1482
+ ae as useCheckSubscriptionStatus,
1483
+ ze as useCreateAuditLog,
1484
+ kt as useCreateConversation,
1485
+ Rt as useCreateInboxItemPerUser,
1486
+ He as useCreateOrUpdateForm,
1487
+ P as useCreateReconV2,
1488
+ oe as useCreateStatementRun,
1489
+ $ as useCreateThread,
1490
+ ue as useDataset,
1491
+ Y as useDatasetSample,
1492
+ te as useDeleteComment,
1493
+ gt as useDeleteProcessTrigger,
1494
+ Ye as useDeleteReconV2,
1495
+ xe as useDeleteRow,
1496
+ Pe as useDocumentPermissions,
1497
+ yn as useDropFileToDatabox,
1498
+ bt as useExecuteNow,
1499
+ Ae as useFileDownload,
1500
+ Be as useFileUpload,
1501
+ Et as useFilterMessagesBySenderId,
1502
+ Tt as useGetAllConversations,
1503
+ lt as useGetAllHttpTriggers,
1504
+ Dt as useGetAllInboxItems,
1505
+ Je as useGetAllRecon,
1506
+ O as useGetAllReconV2,
1507
+ je as useGetAllTemplatedPipelines,
1508
+ ct as useGetAllUsers,
1509
+ Ne as useGetAuditLogs,
1510
+ X as useGetCommentsByThreadId,
1511
+ St as useGetConversation,
1512
+ un as useGetDataboxFile,
1513
+ ln as useGetDataboxFileDownloadUrl,
1514
+ cn as useGetDataboxFileRuns,
1515
+ sn as useGetDataboxFileStatus,
1516
+ $t as useGetDataboxFolder,
1517
+ Zt as useGetDataboxFolderDatasets,
1518
+ en as useGetDataboxFolderDuplicates,
1519
+ Xt as useGetDataboxFolderFiles,
1520
+ rn as useGetDataboxFolderSchema,
1521
+ an as useGetDataboxSchemaHistory,
1522
+ on as useGetDataboxTrashFiles,
1523
+ nn as useGetDatasetDuplicates,
1524
+ tn as useGetDatasetExceptions,
1525
+ se as useGetDatasets,
1526
+ le as useGetFileByFolderIdAndName,
1527
+ ce as useGetFileUrlByFileId,
1528
+ _e as useGetFormById,
1529
+ Le as useGetFormData,
1530
+ Qe as useGetFormSchema,
1531
+ Re as useGetInputTables,
1532
+ ye as useGetPublishedWorkbookById,
1533
+ tt as useGetReconV2CleanResult,
1534
+ nt as useGetReconV2Diff,
1535
+ rt as useGetReconV2Explanation,
1536
+ Ze as useGetReconV2ProfileResult,
1537
+ v as useGetReconV2RunResult,
1538
+ U as useGetReconV2Runs,
1539
+ M as useGetReconV2SmartResult,
1540
+ L as useGetReconV2Workflow,
1541
+ de as useGetRunResultById,
1542
+ fe as useGetRunsByViewId,
1543
+ qt as useGetScheduleStatus,
1544
+ we as useGetStatementData,
1545
+ ge as useGetTableById,
1546
+ Oe as useGetTaskDetails,
1547
+ ft as useGetTriggersBySheet,
1548
+ me as useGetViewById,
1549
+ Fe as useGetViewsBySheetId,
1550
+ ie as useGetVirtualDatasets,
1551
+ Ue as useGetWorkbookDetails,
1552
+ qe as useGetWorkbooksByType,
1553
+ be as useGetWorkflowInstanceStatusById,
1554
+ De as useGetWorksheets,
1555
+ he as useGetWorksheetsByType,
1556
+ pe as useInputTable,
1557
+ Se as useInsertRow,
1558
+ ht as useMarkItemAsRead,
1559
+ pt as useMarkItemAsUnread,
1560
+ yt as useMarkTaskDone,
1561
+ J as useMetric,
1562
+ mt as usePauseSchedule,
1563
+ mn as usePermanentDeleteDataboxFiles,
1564
+ Z as usePostComment,
1565
+ Me as usePublishWorkbook,
1566
+ dt as useReassignTask,
1567
+ ot as useReconV2Detail,
1568
+ ut as useReconV2Editor,
1569
+ at as useReconV2List,
1570
+ it as useReconV2Results,
1571
+ st as useReconV2RunController,
1572
+ Q as useReconV2RunStatus,
1573
+ $e as useReconV2Templates,
1574
+ wt as useRegisterProcessTrigger,
1575
+ Yt as useRenderTemplate,
1576
+ xt as useReplyToConversation,
1577
+ gn as useRestoreDataboxFile,
1578
+ Ft as useResumeSchedule,
1579
+ Te as useRows,
1580
+ dn as useRunDataboxFolder,
1581
+ Ee as useRunDefinition,
1582
+ Ke as useRunPublishedDefinition,
1583
+ We as useRunRecon,
1584
+ A as useRunReconV2,
1585
+ Ve as useRunSampleDefinition,
1586
+ ve as useSaveWorkbook,
1587
+ Kt as useSearchMessages,
1588
+ et as useStartReconV2Clean,
1589
+ Xe as useStartReconV2Profile,
1590
+ ne as useSubscribeUser,
1591
+ Qt as useTcnAgentDisconnect,
1592
+ jt as useTcnAgentGetCallFromHold,
1593
+ Ot as useTcnAgentGetStatus,
1594
+ Lt as useTcnAgentPause,
1595
+ zt as useTcnAgentPutCallOnHold,
1596
+ _t as useTcnAgentSetReady,
1597
+ Pt as useTcnAgentSkills,
1598
+ Vt as useTcnAuthUrl,
1599
+ Nt as useTcnCallData,
1600
+ Ht as useTcnConnectedParty,
1601
+ Bt as useTcnCreateSession,
1602
+ It as useTcnCurrentAgent,
1603
+ vt as useTcnDialManualPrepare,
1604
+ Ct as useTcnExchangeCode,
1605
+ Jt as useTcnFtpManualDialReport,
1606
+ Ut as useTcnHuntGroupSettings,
1607
+ At as useTcnKeepAlive,
1608
+ Wt as useTcnManualDialStart,
1609
+ Mt as useTcnProcessManualDial,
1610
+ Gt as useTcnRefreshToken,
1611
+ wn as useTrashDataboxFiles,
1612
+ Ce as useTriggerHttpWorkflow,
1613
+ Ge as useTriggerWorkflow,
1614
+ re as useUnsubscribeUser,
1615
+ ee as useUpdateComment,
1616
+ fn as useUpdateDataboxFolderSchema,
1617
+ B as useUpdateReconV2,
1618
+ ke as useUpdateRow,
1619
+ G as useUser,
1620
+ Ie as useUserDetails
1291
1621
  };