@arbidocs/react 0.4.145 → 0.4.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifacts/index.cjs +7 -7
- package/dist/artifacts/index.js +1 -1
- package/dist/{chunk-MUYBFDYJ.js → chunk-7AFGROHZ.js} +5 -3
- package/dist/chunk-7AFGROHZ.js.map +1 -0
- package/dist/{chunk-CG6USBJX.cjs → chunk-YIFUMQGA.cjs} +5 -3
- package/dist/chunk-YIFUMQGA.cjs.map +1 -0
- package/dist/index.cjs +560 -206
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +300 -4
- package/dist/index.d.ts +300 -4
- package/dist/index.js +289 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-CG6USBJX.cjs.map +0 -1
- package/dist/chunk-MUYBFDYJ.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYIFUMQGA_cjs = require('./chunk-YIFUMQGA.cjs');
|
|
4
4
|
var chunkL57RRAII_cjs = require('./chunk-L57RRAII.cjs');
|
|
5
5
|
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
6
6
|
require('./chunk-VOFNX4P6.cjs');
|
|
@@ -43,7 +43,7 @@ function useUpdateConversation() {
|
|
|
43
43
|
conversationId,
|
|
44
44
|
patch
|
|
45
45
|
}) => arbi.conversations.update(conversationId, patch),
|
|
46
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
46
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function useCreateWork() {
|
|
@@ -51,7 +51,7 @@ function useCreateWork() {
|
|
|
51
51
|
const qc = reactQuery.useQueryClient();
|
|
52
52
|
return reactQuery.useMutation({
|
|
53
53
|
mutationFn: (body) => arbi.conversations.createWork(body),
|
|
54
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
54
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
function useRunConversation() {
|
|
@@ -59,7 +59,7 @@ function useRunConversation() {
|
|
|
59
59
|
const qc = reactQuery.useQueryClient();
|
|
60
60
|
return reactQuery.useMutation({
|
|
61
61
|
mutationFn: (conversationId) => arbi.conversations.runWithAuth(conversationId),
|
|
62
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
62
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function useActOnStep() {
|
|
@@ -70,7 +70,7 @@ function useActOnStep() {
|
|
|
70
70
|
conversationId,
|
|
71
71
|
body
|
|
72
72
|
}) => arbi.conversations.actOnStep(conversationId, body),
|
|
73
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
73
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
function useSendBackStep() {
|
|
@@ -83,7 +83,7 @@ function useSendBackStep() {
|
|
|
83
83
|
to,
|
|
84
84
|
note
|
|
85
85
|
}) => arbi.conversations.sendBackStep(conversationId, step, { to, note }),
|
|
86
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
86
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
function usePlanWork() {
|
|
@@ -95,7 +95,7 @@ function usePlanWork() {
|
|
|
95
95
|
function useConversationPendingAuth(conversationId, options) {
|
|
96
96
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
97
97
|
return reactQuery.useQuery({
|
|
98
|
-
queryKey: [...
|
|
98
|
+
queryKey: [...chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations(), conversationId ?? "", "pending-auth"],
|
|
99
99
|
queryFn: () => arbi.conversations.pendingAuth(conversationId),
|
|
100
100
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
101
101
|
retry: false
|
|
@@ -104,7 +104,7 @@ function useConversationPendingAuth(conversationId, options) {
|
|
|
104
104
|
function useConversationActivity(conversationId, options) {
|
|
105
105
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
106
106
|
return reactQuery.useQuery({
|
|
107
|
-
queryKey:
|
|
107
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.conversationActivity(conversationId ?? ""),
|
|
108
108
|
queryFn: () => arbi.conversations.activity(conversationId),
|
|
109
109
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
110
110
|
refetchInterval: options?.live ? 2500 : false
|
|
@@ -113,7 +113,7 @@ function useConversationActivity(conversationId, options) {
|
|
|
113
113
|
function useWorkflows(options) {
|
|
114
114
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
115
115
|
return reactQuery.useQuery({
|
|
116
|
-
queryKey:
|
|
116
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workflows(),
|
|
117
117
|
queryFn: () => arbi.workflows.list(),
|
|
118
118
|
// A clock or event can fire while the list is open, without a write here.
|
|
119
119
|
refetchInterval: options?.live ? 1e4 : false,
|
|
@@ -123,7 +123,7 @@ function useWorkflows(options) {
|
|
|
123
123
|
function useWorkflowRuns(workflowId) {
|
|
124
124
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
125
125
|
return reactQuery.useQuery({
|
|
126
|
-
queryKey:
|
|
126
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workflowRuns(workflowId ?? ""),
|
|
127
127
|
queryFn: () => arbi.workflows.runs(workflowId),
|
|
128
128
|
enabled: !!workflowId && arbi.isLoggedIn,
|
|
129
129
|
refetchInterval: 3e3,
|
|
@@ -136,7 +136,7 @@ function useCreateWorkflow() {
|
|
|
136
136
|
const qc = reactQuery.useQueryClient();
|
|
137
137
|
return reactQuery.useMutation({
|
|
138
138
|
mutationFn: (body) => arbi.workflows.create(body),
|
|
139
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
139
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workflows() })
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
function useUpdateWorkflow() {
|
|
@@ -147,7 +147,7 @@ function useUpdateWorkflow() {
|
|
|
147
147
|
workflowId,
|
|
148
148
|
patch
|
|
149
149
|
}) => arbi.workflows.update(workflowId, patch),
|
|
150
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
150
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workflows() })
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
function useDeleteWorkflow() {
|
|
@@ -155,18 +155,18 @@ function useDeleteWorkflow() {
|
|
|
155
155
|
const qc = reactQuery.useQueryClient();
|
|
156
156
|
return reactQuery.useMutation({
|
|
157
157
|
mutationFn: (workflowId) => arbi.workflows.delete(workflowId),
|
|
158
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
158
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workflows() })
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
function useRunWorkflow() {
|
|
162
162
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
163
163
|
const qc = reactQuery.useQueryClient();
|
|
164
164
|
return reactQuery.useMutation({
|
|
165
|
-
mutationKey:
|
|
165
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.runWorkflow(),
|
|
166
166
|
mutationFn: (workflowId) => arbi.workflows.run(workflowId),
|
|
167
167
|
onSuccess: () => Promise.all([
|
|
168
|
-
qc.invalidateQueries({ queryKey:
|
|
169
|
-
qc.invalidateQueries({ queryKey:
|
|
168
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workflows() }),
|
|
169
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
170
170
|
])
|
|
171
171
|
});
|
|
172
172
|
}
|
|
@@ -175,7 +175,7 @@ function useCreateAgent() {
|
|
|
175
175
|
const qc = reactQuery.useQueryClient();
|
|
176
176
|
return reactQuery.useMutation({
|
|
177
177
|
mutationFn: (name) => arbi.agents.create(name),
|
|
178
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
178
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agents() })
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
function useGenerateAgentAvatar() {
|
|
@@ -183,13 +183,13 @@ function useGenerateAgentAvatar() {
|
|
|
183
183
|
const qc = reactQuery.useQueryClient();
|
|
184
184
|
return reactQuery.useMutation({
|
|
185
185
|
mutationFn: ({ agentExtId, prompt }) => arbi.agents.generateAvatar(agentExtId, prompt),
|
|
186
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
186
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agents() })
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
function useAuthorizeLimits(options) {
|
|
190
190
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
191
191
|
return reactQuery.useQuery({
|
|
192
|
-
queryKey:
|
|
192
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.authorizeLimits(),
|
|
193
193
|
queryFn: () => arbi.agents.authorizeLimits(),
|
|
194
194
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
195
195
|
});
|
|
@@ -197,7 +197,7 @@ function useAuthorizeLimits(options) {
|
|
|
197
197
|
function useMcpTools(options) {
|
|
198
198
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
199
199
|
return reactQuery.useQuery({
|
|
200
|
-
queryKey:
|
|
200
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.mcpTools(),
|
|
201
201
|
queryFn: () => arbi.health.mcpTools(),
|
|
202
202
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
203
203
|
});
|
|
@@ -205,7 +205,7 @@ function useMcpTools(options) {
|
|
|
205
205
|
function useAgentConfig(agentExtId, options) {
|
|
206
206
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
207
207
|
return reactQuery.useQuery({
|
|
208
|
-
queryKey:
|
|
208
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentConfig(agentExtId),
|
|
209
209
|
queryFn: async () => agentExtId ? await arbi.agents.getConfig(agentExtId) : await arbi.agentConfig.get("default"),
|
|
210
210
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
211
211
|
});
|
|
@@ -213,7 +213,7 @@ function useAgentConfig(agentExtId, options) {
|
|
|
213
213
|
function useAgentModels(options) {
|
|
214
214
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
215
215
|
return reactQuery.useQuery({
|
|
216
|
-
queryKey:
|
|
216
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.models(),
|
|
217
217
|
queryFn: async () => (await arbi.agentConfig.getModels()).models.map((m) => m.model_name),
|
|
218
218
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
219
219
|
});
|
|
@@ -236,17 +236,17 @@ function useSaveAgentConfig() {
|
|
|
236
236
|
});
|
|
237
237
|
},
|
|
238
238
|
onSuccess: (_saved, { agentExtId }) => Promise.all([
|
|
239
|
-
qc.invalidateQueries({ queryKey:
|
|
240
|
-
qc.invalidateQueries({ queryKey:
|
|
239
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.configs() }),
|
|
240
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentConfig(agentExtId) }),
|
|
241
241
|
// The agent list shows the pinned persona/model, so it refreshes too.
|
|
242
|
-
qc.invalidateQueries({ queryKey:
|
|
242
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agents() })
|
|
243
243
|
])
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
function useAgentWorkspaces(agentExtId, options) {
|
|
247
247
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
248
248
|
return reactQuery.useQuery({
|
|
249
|
-
queryKey:
|
|
249
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentWorkspaces(agentExtId ?? ""),
|
|
250
250
|
queryFn: () => arbi.agents.listWorkspaces(agentExtId),
|
|
251
251
|
enabled: (options?.enabled ?? true) && !!agentExtId && arbi.isLoggedIn
|
|
252
252
|
});
|
|
@@ -267,7 +267,7 @@ function useGrantAgentAccess() {
|
|
|
267
267
|
if (!agent?.email) throw new Error("The agent's address is unknown.");
|
|
268
268
|
return arbi.workspaces.grantAccess({ workspaceId, emails: [agent.email] });
|
|
269
269
|
},
|
|
270
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
270
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
function useRevokeAgentAccess() {
|
|
@@ -286,13 +286,13 @@ function useRevokeAgentAccess() {
|
|
|
286
286
|
if (previous && previous !== workspaceId) await arbi.selectWorkspace(previous);
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
|
-
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey:
|
|
289
|
+
onSuccess: (_res, { agentExtId }) => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentWorkspaces(agentExtId) })
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
function useSkills(options) {
|
|
293
293
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
294
294
|
return reactQuery.useQuery({
|
|
295
|
-
queryKey: [...
|
|
295
|
+
queryKey: [...chunkYIFUMQGA_cjs.arbiQueryKeys.skills(), options?.includeHidden ?? false],
|
|
296
296
|
queryFn: () => arbi.assistant.listSkills({ includeHidden: options?.includeHidden }),
|
|
297
297
|
refetchInterval: options?.live ? 5e3 : false,
|
|
298
298
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
@@ -324,13 +324,13 @@ function useUploadSkillFiles() {
|
|
|
324
324
|
}
|
|
325
325
|
return results;
|
|
326
326
|
},
|
|
327
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
327
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.skills() })
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
function useSkillSource(docExtId, options) {
|
|
331
331
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
332
332
|
return reactQuery.useQuery({
|
|
333
|
-
queryKey:
|
|
333
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.skillSource(docExtId ?? ""),
|
|
334
334
|
queryFn: async () => {
|
|
335
335
|
const response = await arbi.documents.download(docExtId);
|
|
336
336
|
if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
|
|
@@ -345,7 +345,7 @@ function useDeleteSkill() {
|
|
|
345
345
|
const qc = reactQuery.useQueryClient();
|
|
346
346
|
return reactQuery.useMutation({
|
|
347
347
|
mutationFn: (docExtId) => arbi.documents.delete([docExtId]),
|
|
348
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
348
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.skills() })
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
function useSetSkillVisibility() {
|
|
@@ -353,7 +353,7 @@ function useSetSkillVisibility() {
|
|
|
353
353
|
const qc = reactQuery.useQueryClient();
|
|
354
354
|
return reactQuery.useMutation({
|
|
355
355
|
mutationFn: ({ docExtId, visibility }) => arbi.documents.update([{ external_id: docExtId, shared: visibility === "global" }]),
|
|
356
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
356
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.skills() })
|
|
357
357
|
});
|
|
358
358
|
}
|
|
359
359
|
function useStartWorkQuery() {
|
|
@@ -380,13 +380,13 @@ function useStartWorkQuery() {
|
|
|
380
380
|
`The run ${response.id} started, but its thread is not available yet. Do not submit it again.`
|
|
381
381
|
);
|
|
382
382
|
},
|
|
383
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
383
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allConversations() })
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
function useAgentSession(agentId, options) {
|
|
387
387
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
388
388
|
return reactQuery.useQuery({
|
|
389
|
-
queryKey:
|
|
389
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentSession(agentId ?? ""),
|
|
390
390
|
queryFn: () => arbi.agents.getSession(agentId),
|
|
391
391
|
enabled: !!agentId && arbi.isLoggedIn && (options?.enabled ?? true),
|
|
392
392
|
refetchInterval: 5e3
|
|
@@ -395,7 +395,7 @@ function useAgentSession(agentId, options) {
|
|
|
395
395
|
function useAgentChats(agentId) {
|
|
396
396
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
397
397
|
return reactQuery.useQuery({
|
|
398
|
-
queryKey:
|
|
398
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.agentChats(agentId ?? ""),
|
|
399
399
|
queryFn: () => arbi.agents.listChats(agentId),
|
|
400
400
|
enabled: !!agentId && arbi.isLoggedIn,
|
|
401
401
|
refetchInterval: 5e3
|
|
@@ -404,10 +404,10 @@ function useAgentChats(agentId) {
|
|
|
404
404
|
function refreshAgentSession(qc, agentId) {
|
|
405
405
|
return Promise.all(
|
|
406
406
|
[
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.agentSession(agentId),
|
|
408
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.agentWorkspaces(agentId),
|
|
409
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.agentChats(agentId),
|
|
410
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.sessions()
|
|
411
411
|
].map((queryKey) => qc.invalidateQueries({ queryKey }))
|
|
412
412
|
);
|
|
413
413
|
}
|
|
@@ -555,8 +555,8 @@ function useArbiChat(options = {}) {
|
|
|
555
555
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
556
556
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
557
557
|
const queryClient = reactQuery.useQueryClient();
|
|
558
|
-
const { data: docs = [], isLoading: isLoadingDocuments } =
|
|
559
|
-
const ordinaryHistory =
|
|
558
|
+
const { data: docs = [], isLoading: isLoadingDocuments } = chunkYIFUMQGA_cjs.useDocuments(workspaceId);
|
|
559
|
+
const ordinaryHistory = chunkYIFUMQGA_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
560
560
|
const agentHistory = useAgentChats(agentId);
|
|
561
561
|
const stored = React.useMemo(
|
|
562
562
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -571,7 +571,7 @@ function useArbiChat(options = {}) {
|
|
|
571
571
|
);
|
|
572
572
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
573
573
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
574
|
-
const query =
|
|
574
|
+
const query = chunkYIFUMQGA_cjs.useAssistantQuery();
|
|
575
575
|
const { mutateAsync } = query;
|
|
576
576
|
const [stagedFiles, setStagedFiles] = React.useState([]);
|
|
577
577
|
const [threads, setThreads] = React.useState(() => [emptyThread()]);
|
|
@@ -631,7 +631,7 @@ function useArbiChat(options = {}) {
|
|
|
631
631
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
632
632
|
) || active.messages.some((message) => message.status === "streaming");
|
|
633
633
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
634
|
-
const loaded =
|
|
634
|
+
const loaded = chunkYIFUMQGA_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
635
635
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
636
636
|
live: liveHistory
|
|
637
637
|
});
|
|
@@ -1106,7 +1106,7 @@ function useArbiChat(options = {}) {
|
|
|
1106
1106
|
} else
|
|
1107
1107
|
uploaded.push(...(await arbi.documents.uploadFile(file, file.name)).doc_ext_ids ?? []);
|
|
1108
1108
|
}
|
|
1109
|
-
if (uploaded.length) await
|
|
1109
|
+
if (uploaded.length) await chunkYIFUMQGA_cjs.refreshDocuments(queryClient, arbi, uploaded);
|
|
1110
1110
|
} catch (e) {
|
|
1111
1111
|
setUploadError(messageOf(e, "The upload failed."));
|
|
1112
1112
|
} finally {
|
|
@@ -1408,14 +1408,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1408
1408
|
if (!workspaceId) return;
|
|
1409
1409
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1410
1410
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1411
|
-
if (msg.doc_ext_ids?.length) void
|
|
1412
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1411
|
+
if (msg.doc_ext_ids?.length) void chunkYIFUMQGA_cjs.refreshDocuments(queryClient, arbi, msg.doc_ext_ids);
|
|
1412
|
+
void queryClient.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1413
1413
|
return;
|
|
1414
1414
|
}
|
|
1415
1415
|
if (client.isMessageType(msg, "task_update")) {
|
|
1416
1416
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1417
|
-
if (
|
|
1418
|
-
void
|
|
1417
|
+
if (chunkYIFUMQGA_cjs.FINISHED_DOCUMENT_STATUSES.has(msg.status))
|
|
1418
|
+
void chunkYIFUMQGA_cjs.refreshDocuments(queryClient, arbi, [msg.doc_ext_id]);
|
|
1419
1419
|
}
|
|
1420
1420
|
});
|
|
1421
1421
|
}
|
|
@@ -1543,7 +1543,7 @@ function useShellWorkspaces(options) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
function useArbiShellWorkspaces(options = {}) {
|
|
1545
1545
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1546
|
-
const query =
|
|
1546
|
+
const query = chunkYIFUMQGA_cjs.useWorkspaces();
|
|
1547
1547
|
const { select, ...rest } = options;
|
|
1548
1548
|
const defaultSelect = React.useCallback(
|
|
1549
1549
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1557,12 +1557,47 @@ function useArbiShellWorkspaces(options = {}) {
|
|
|
1557
1557
|
select: select ?? defaultSelect
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
|
+
function useInvalidateMembership() {
|
|
1561
|
+
const qc = reactQuery.useQueryClient();
|
|
1562
|
+
return () => Promise.all([
|
|
1563
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() }),
|
|
1564
|
+
qc.invalidateQueries({ queryKey: ["arbi", "workspaceUsers"] }),
|
|
1565
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.projects() }),
|
|
1566
|
+
qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.contacts() })
|
|
1567
|
+
]);
|
|
1568
|
+
}
|
|
1569
|
+
function useUpdateWorkspace() {
|
|
1570
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1571
|
+
const qc = reactQuery.useQueryClient();
|
|
1572
|
+
return reactQuery.useMutation({
|
|
1573
|
+
mutationFn: (body) => arbi.workspaces.update(body),
|
|
1574
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() })
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
function useAddWorkspaceMembers() {
|
|
1578
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1579
|
+
const invalidate = useInvalidateMembership();
|
|
1580
|
+
return reactQuery.useMutation({
|
|
1581
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.workspaceMembership(),
|
|
1582
|
+
mutationFn: ({ emails, role, confirmInvite }) => arbi.workspaces.addUsers(emails, role, { confirmInvite }),
|
|
1583
|
+
onSuccess: () => invalidate()
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
function useRemoveWorkspaceMembers() {
|
|
1587
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1588
|
+
const invalidate = useInvalidateMembership();
|
|
1589
|
+
return reactQuery.useMutation({
|
|
1590
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.workspaceMembership(),
|
|
1591
|
+
mutationFn: (userIds) => arbi.workspaces.removeUsers(userIds),
|
|
1592
|
+
onSuccess: () => invalidate()
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1560
1595
|
function useFacts(workspaceId, options) {
|
|
1561
1596
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1562
1597
|
const { enabled = true, ...filter } = options ?? {};
|
|
1563
1598
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
1564
1599
|
return reactQuery.useQuery({
|
|
1565
|
-
queryKey: [...
|
|
1600
|
+
queryKey: [...chunkYIFUMQGA_cjs.arbiQueryKeys.facts(workspace), filter],
|
|
1566
1601
|
queryFn: () => arbi.facts.list(filter),
|
|
1567
1602
|
enabled: enabled && !!workspace && arbi.hasWorkspace,
|
|
1568
1603
|
staleTime: 3e4
|
|
@@ -1570,7 +1605,7 @@ function useFacts(workspaceId, options) {
|
|
|
1570
1605
|
}
|
|
1571
1606
|
function useRefreshFacts() {
|
|
1572
1607
|
const qc = reactQuery.useQueryClient();
|
|
1573
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1608
|
+
return () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allFacts() });
|
|
1574
1609
|
}
|
|
1575
1610
|
function useCreateFact() {
|
|
1576
1611
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
@@ -1625,7 +1660,7 @@ function useDocumentsSupport() {
|
|
|
1625
1660
|
function applyOptimisticDocumentEdit(qc, updates) {
|
|
1626
1661
|
const byId = new Map(updates.map((update) => [update.external_id, update]));
|
|
1627
1662
|
const previous = [];
|
|
1628
|
-
|
|
1663
|
+
chunkYIFUMQGA_cjs.patchDocuments(qc, (old) => {
|
|
1629
1664
|
let changed = false;
|
|
1630
1665
|
const next = old.map((doc) => {
|
|
1631
1666
|
const update = byId.get(doc.external_id);
|
|
@@ -1638,9 +1673,9 @@ function applyOptimisticDocumentEdit(qc, updates) {
|
|
|
1638
1673
|
});
|
|
1639
1674
|
const previousOwn = updates.map((update) => {
|
|
1640
1675
|
const own = qc.getQueryData(
|
|
1641
|
-
|
|
1676
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.document(update.external_id)
|
|
1642
1677
|
);
|
|
1643
|
-
if (own)
|
|
1678
|
+
if (own) chunkYIFUMQGA_cjs.setCachedDocument(qc, { ...own, ...update });
|
|
1644
1679
|
return [update.external_id, own];
|
|
1645
1680
|
});
|
|
1646
1681
|
return { optimistic: true, previous, previousOwn };
|
|
@@ -1650,38 +1685,38 @@ function rollbackOptimisticDocumentEdit(qc, context) {
|
|
|
1650
1685
|
if (!edit?.optimistic) return;
|
|
1651
1686
|
if (edit.previous.length) {
|
|
1652
1687
|
const restore = new Map(edit.previous.map((doc) => [doc.external_id, doc]));
|
|
1653
|
-
|
|
1688
|
+
chunkYIFUMQGA_cjs.patchDocuments(
|
|
1654
1689
|
qc,
|
|
1655
1690
|
(old) => old.some((doc) => restore.has(doc.external_id)) ? old.map((doc) => restore.get(doc.external_id) ?? doc) : old
|
|
1656
1691
|
);
|
|
1657
1692
|
}
|
|
1658
|
-
for (const [id, own] of edit.previousOwn) qc.setQueryData(
|
|
1693
|
+
for (const [id, own] of edit.previousOwn) qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.document(id), own);
|
|
1659
1694
|
}
|
|
1660
1695
|
function settleUpdatedDocuments(qc, updated) {
|
|
1661
1696
|
if (!updated.length) return;
|
|
1662
1697
|
const byId = new Map(updated.map((doc) => [doc.external_id, doc]));
|
|
1663
|
-
|
|
1698
|
+
chunkYIFUMQGA_cjs.patchDocuments(
|
|
1664
1699
|
qc,
|
|
1665
1700
|
(old) => old.some((doc) => byId.has(doc.external_id)) ? old.map((doc) => byId.get(doc.external_id) ?? doc) : old
|
|
1666
1701
|
);
|
|
1667
|
-
for (const doc of updated)
|
|
1702
|
+
for (const doc of updated) chunkYIFUMQGA_cjs.setCachedDocument(qc, doc);
|
|
1668
1703
|
}
|
|
1669
1704
|
function patchEachDocument(qc, docIds, reducer) {
|
|
1670
1705
|
const ids = new Set(docIds);
|
|
1671
|
-
|
|
1706
|
+
chunkYIFUMQGA_cjs.patchDocuments(
|
|
1672
1707
|
qc,
|
|
1673
1708
|
(old) => old.some((doc) => ids.has(doc.external_id)) ? old.map((doc) => ids.has(doc.external_id) ? reducer(doc) : doc) : old
|
|
1674
1709
|
);
|
|
1675
|
-
for (const id of ids)
|
|
1710
|
+
for (const id of ids) chunkYIFUMQGA_cjs.patchCachedDocument(qc, id, reducer);
|
|
1676
1711
|
}
|
|
1677
1712
|
function workspaceOf(qc, docId) {
|
|
1678
1713
|
for (const [, docs] of qc.getQueriesData({
|
|
1679
|
-
queryKey:
|
|
1714
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allDocuments()
|
|
1680
1715
|
})) {
|
|
1681
1716
|
const doc = Array.isArray(docs) ? docs.find((d) => d.external_id === docId) : void 0;
|
|
1682
1717
|
if (doc) return doc.workspace_ext_id;
|
|
1683
1718
|
}
|
|
1684
|
-
return qc.getQueryData(
|
|
1719
|
+
return qc.getQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.document(docId))?.workspace_ext_id;
|
|
1685
1720
|
}
|
|
1686
1721
|
function settleAssignedDocTags(qc, created) {
|
|
1687
1722
|
const byDoc = /* @__PURE__ */ new Map();
|
|
@@ -1699,13 +1734,13 @@ function settleAssignedDocTags(qc, created) {
|
|
|
1699
1734
|
...doc,
|
|
1700
1735
|
doctags: [...doc.doctags ?? [], ...byDoc.get(doc.external_id) ?? []]
|
|
1701
1736
|
}));
|
|
1702
|
-
for (const [workspaceId, delta] of workspaces)
|
|
1737
|
+
for (const [workspaceId, delta] of workspaces) chunkYIFUMQGA_cjs.adjustTagCounts(qc, workspaceId, delta);
|
|
1703
1738
|
}
|
|
1704
1739
|
function settleRemovedDocTags(qc, { tagId, docIds }) {
|
|
1705
1740
|
const ids = new Set(docIds);
|
|
1706
1741
|
const removedByWorkspace = /* @__PURE__ */ new Map();
|
|
1707
1742
|
for (const [, docs] of qc.getQueriesData({
|
|
1708
|
-
queryKey:
|
|
1743
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allDocuments()
|
|
1709
1744
|
})) {
|
|
1710
1745
|
for (const doc of Array.isArray(docs) ? docs : []) {
|
|
1711
1746
|
if (!ids.has(doc.external_id)) continue;
|
|
@@ -1721,7 +1756,7 @@ function settleRemovedDocTags(qc, { tagId, docIds }) {
|
|
|
1721
1756
|
doctags: (doc.doctags ?? []).filter((dt) => dt.tag_ext_id !== tagId)
|
|
1722
1757
|
}));
|
|
1723
1758
|
for (const [workspaceId, removed] of removedByWorkspace)
|
|
1724
|
-
|
|
1759
|
+
chunkYIFUMQGA_cjs.adjustTagCounts(qc, workspaceId, /* @__PURE__ */ new Map([[tagId, -removed]]));
|
|
1725
1760
|
}
|
|
1726
1761
|
function settleUpdatedDocTag(qc, updated) {
|
|
1727
1762
|
patchEachDocument(qc, [updated.doc_ext_id], (doc) => ({
|
|
@@ -1731,22 +1766,22 @@ function settleUpdatedDocTag(qc, updated) {
|
|
|
1731
1766
|
}
|
|
1732
1767
|
var replayableDocumentMutations = [
|
|
1733
1768
|
{
|
|
1734
|
-
mutationKey:
|
|
1769
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.updateDocuments(),
|
|
1735
1770
|
run: (client, input) => browser.documents.updateDocuments(client, input.documents),
|
|
1736
1771
|
settle: (qc, updated) => settleUpdatedDocuments(qc, updated)
|
|
1737
1772
|
},
|
|
1738
1773
|
{
|
|
1739
|
-
mutationKey:
|
|
1774
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.assignDocTags(),
|
|
1740
1775
|
run: (client, input) => browser.doctags.assignDocTags(client, input.tagId, input.docIds, input.note, input.citations),
|
|
1741
1776
|
settle: (qc, created) => settleAssignedDocTags(qc, created)
|
|
1742
1777
|
},
|
|
1743
1778
|
{
|
|
1744
|
-
mutationKey:
|
|
1779
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.removeDocTags(),
|
|
1745
1780
|
run: (client, input) => browser.doctags.removeDocTags(client, input.tagId, input.docIds),
|
|
1746
1781
|
settle: (qc, _data, input) => settleRemovedDocTags(qc, input)
|
|
1747
1782
|
},
|
|
1748
1783
|
{
|
|
1749
|
-
mutationKey:
|
|
1784
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.updateDocTag(),
|
|
1750
1785
|
run: (client, input) => browser.doctags.updateDocTag(client, input.tagId, input.docId, {
|
|
1751
1786
|
note: input.note,
|
|
1752
1787
|
citations: input.citations
|
|
@@ -1769,7 +1804,7 @@ function useUpdateDocuments() {
|
|
|
1769
1804
|
const qc = reactQuery.useQueryClient();
|
|
1770
1805
|
return resolvingOffline(
|
|
1771
1806
|
reactQuery.useMutation({
|
|
1772
|
-
mutationKey:
|
|
1807
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.updateDocuments(),
|
|
1773
1808
|
mutationFn: ({ documents }) => arbi.documents.update(documents),
|
|
1774
1809
|
onMutate: ({ documents }) => reactQuery.onlineManager.isOnline() || !documents.length ? void 0 : applyOptimisticDocumentEdit(qc, documents),
|
|
1775
1810
|
onError: (_error, _input, context) => rollbackOptimisticDocumentEdit(qc, context),
|
|
@@ -1782,30 +1817,30 @@ function useDeleteDocuments() {
|
|
|
1782
1817
|
const qc = reactQuery.useQueryClient();
|
|
1783
1818
|
const { onDocumentsDeleted } = useDocumentsSupport();
|
|
1784
1819
|
return reactQuery.useMutation({
|
|
1785
|
-
mutationKey:
|
|
1820
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.deleteDocuments(),
|
|
1786
1821
|
mutationFn: (docIds) => arbi.documents.delete(docIds),
|
|
1787
1822
|
onSuccess: (_data, docIds) => {
|
|
1788
1823
|
const gone = new Set(docIds);
|
|
1789
|
-
|
|
1824
|
+
chunkYIFUMQGA_cjs.patchDocuments(
|
|
1790
1825
|
qc,
|
|
1791
1826
|
(old) => old.some((doc) => gone.has(doc.external_id)) ? old.filter((doc) => !gone.has(doc.external_id)) : old
|
|
1792
1827
|
);
|
|
1793
|
-
|
|
1828
|
+
chunkYIFUMQGA_cjs.forgetDocuments(qc, docIds);
|
|
1794
1829
|
onDocumentsDeleted?.(docIds);
|
|
1795
|
-
return qc.invalidateQueries({ queryKey:
|
|
1830
|
+
return qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() });
|
|
1796
1831
|
}
|
|
1797
1832
|
});
|
|
1798
1833
|
}
|
|
1799
1834
|
async function settleUpload(qc, arbi, docIds, processingStatus) {
|
|
1800
|
-
if (docIds?.length) await
|
|
1801
|
-
await qc.invalidateQueries({ queryKey:
|
|
1835
|
+
if (docIds?.length) await chunkYIFUMQGA_cjs.refreshDocuments(qc, arbi, docIds, { processingStatus });
|
|
1836
|
+
await qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() });
|
|
1802
1837
|
}
|
|
1803
1838
|
function useUploadDocuments() {
|
|
1804
1839
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1805
1840
|
const qc = reactQuery.useQueryClient();
|
|
1806
1841
|
const { processingStatus } = useDocumentsSupport();
|
|
1807
1842
|
return reactQuery.useMutation({
|
|
1808
|
-
mutationKey:
|
|
1843
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.uploadDocuments(),
|
|
1809
1844
|
mutationFn: ({ files, options }) => arbi.documents.upload(files, options),
|
|
1810
1845
|
onSuccess: (result) => settleUpload(qc, arbi, result.doc_ext_ids, processingStatus)
|
|
1811
1846
|
});
|
|
@@ -1815,7 +1850,7 @@ function useUploadUrls() {
|
|
|
1815
1850
|
const qc = reactQuery.useQueryClient();
|
|
1816
1851
|
const { processingStatus } = useDocumentsSupport();
|
|
1817
1852
|
return reactQuery.useMutation({
|
|
1818
|
-
mutationKey:
|
|
1853
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.uploadUrls(),
|
|
1819
1854
|
mutationFn: ({ urls, shared, configExtId }) => arbi.documents.uploadUrl(urls, { shared, configExtId }),
|
|
1820
1855
|
onSuccess: (result) => settleUpload(qc, arbi, result.doc_ext_ids, processingStatus)
|
|
1821
1856
|
});
|
|
@@ -1825,7 +1860,7 @@ function useAssignDocTags() {
|
|
|
1825
1860
|
const qc = reactQuery.useQueryClient();
|
|
1826
1861
|
return resolvingOffline(
|
|
1827
1862
|
reactQuery.useMutation({
|
|
1828
|
-
mutationKey:
|
|
1863
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.assignDocTags(),
|
|
1829
1864
|
mutationFn: ({ tagId, docIds, note, citations }) => arbi.doctags.assign(tagId, docIds, note, citations),
|
|
1830
1865
|
onSuccess: (created) => settleAssignedDocTags(qc, created)
|
|
1831
1866
|
})
|
|
@@ -1836,7 +1871,7 @@ function useRemoveDocTags() {
|
|
|
1836
1871
|
const qc = reactQuery.useQueryClient();
|
|
1837
1872
|
return resolvingOffline(
|
|
1838
1873
|
reactQuery.useMutation({
|
|
1839
|
-
mutationKey:
|
|
1874
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.removeDocTags(),
|
|
1840
1875
|
mutationFn: ({ tagId, docIds }) => arbi.doctags.remove(tagId, docIds),
|
|
1841
1876
|
onSuccess: (_data, input) => settleRemovedDocTags(qc, input)
|
|
1842
1877
|
})
|
|
@@ -1847,7 +1882,7 @@ function useUpdateDocTag() {
|
|
|
1847
1882
|
const qc = reactQuery.useQueryClient();
|
|
1848
1883
|
return resolvingOffline(
|
|
1849
1884
|
reactQuery.useMutation({
|
|
1850
|
-
mutationKey:
|
|
1885
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.updateDocTag(),
|
|
1851
1886
|
mutationFn: ({ tagId, docId, note, citations }) => arbi.doctags.update(tagId, docId, { note, citations }),
|
|
1852
1887
|
onSuccess: (updated) => settleUpdatedDocTag(qc, updated)
|
|
1853
1888
|
})
|
|
@@ -1858,13 +1893,13 @@ function useGenerateDocTags() {
|
|
|
1858
1893
|
const qc = reactQuery.useQueryClient();
|
|
1859
1894
|
const { onProcessingQueued } = useDocumentsSupport();
|
|
1860
1895
|
return reactQuery.useMutation({
|
|
1861
|
-
mutationKey:
|
|
1896
|
+
mutationKey: chunkYIFUMQGA_cjs.arbiMutationKeys.generateDocTags(),
|
|
1862
1897
|
mutationFn: ({ tagIds, docIds, overwrite }) => arbi.doctags.generate(tagIds, docIds, { overwrite }),
|
|
1863
1898
|
onMutate: ({ docIds }) => {
|
|
1864
1899
|
if (!onProcessingQueued || !docIds.length) return void 0;
|
|
1865
1900
|
const workspaceId = arbi.hasWorkspace ? arbi.getWorkspaceId() : "";
|
|
1866
1901
|
const listed = new Map(
|
|
1867
|
-
(
|
|
1902
|
+
(chunkYIFUMQGA_cjs.getCachedDocuments(qc, workspaceId) ?? []).map((doc) => [doc.external_id, doc])
|
|
1868
1903
|
);
|
|
1869
1904
|
return {
|
|
1870
1905
|
undo: onProcessingQueued(
|
|
@@ -1886,13 +1921,13 @@ function useFinaliseTranslation() {
|
|
|
1886
1921
|
const { processingStatus } = useDocumentsSupport();
|
|
1887
1922
|
return reactQuery.useMutation({
|
|
1888
1923
|
mutationFn: (docId) => arbi.documents.finaliseTranslation(docId),
|
|
1889
|
-
onSuccess: (result) => void
|
|
1924
|
+
onSuccess: (result) => void chunkYIFUMQGA_cjs.refreshDocuments(qc, arbi, [result.document_ext_id], { processingStatus })
|
|
1890
1925
|
});
|
|
1891
1926
|
}
|
|
1892
1927
|
|
|
1893
1928
|
// src/offline.ts
|
|
1894
1929
|
var REPLAYABLE = [
|
|
1895
|
-
...
|
|
1930
|
+
...chunkYIFUMQGA_cjs.replayableTagMutations,
|
|
1896
1931
|
...replayableDocumentMutations
|
|
1897
1932
|
];
|
|
1898
1933
|
function isReplayableArbiMutation(mutationKey) {
|
|
@@ -1922,13 +1957,13 @@ function isRestorableArbiQueryOnline(queryKey, data) {
|
|
|
1922
1957
|
const docs = Array.isArray(data) ? data : [data];
|
|
1923
1958
|
return !docs.some((doc) => {
|
|
1924
1959
|
const status = doc?.status;
|
|
1925
|
-
return !!status && !
|
|
1960
|
+
return !!status && !chunkYIFUMQGA_cjs.FINISHED_DOCUMENT_STATUSES.has(status);
|
|
1926
1961
|
});
|
|
1927
1962
|
}
|
|
1928
1963
|
function useFilteredProjects(filters, options) {
|
|
1929
1964
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1930
1965
|
return reactQuery.useQuery({
|
|
1931
|
-
queryKey:
|
|
1966
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
|
|
1932
1967
|
queryFn: () => arbi.projects.list(filters),
|
|
1933
1968
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1934
1969
|
});
|
|
@@ -1941,14 +1976,14 @@ function useUpdateProjectFields() {
|
|
|
1941
1976
|
projectExtId,
|
|
1942
1977
|
patch
|
|
1943
1978
|
}) => arbi.projects.update(projectExtId, patch),
|
|
1944
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1979
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.projects() })
|
|
1945
1980
|
});
|
|
1946
1981
|
}
|
|
1947
1982
|
function useProjectEvents(projectExtId, options) {
|
|
1948
1983
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1949
1984
|
return reactQuery.useQuery({
|
|
1950
1985
|
queryKey: [
|
|
1951
|
-
...
|
|
1986
|
+
...chunkYIFUMQGA_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
|
|
1952
1987
|
options?.kind ?? "all",
|
|
1953
1988
|
options?.limit ?? "default"
|
|
1954
1989
|
],
|
|
@@ -1959,7 +1994,7 @@ function useProjectEvents(projectExtId, options) {
|
|
|
1959
1994
|
function useConversationUsage(conversationId, options) {
|
|
1960
1995
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1961
1996
|
return reactQuery.useQuery({
|
|
1962
|
-
queryKey:
|
|
1997
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
|
|
1963
1998
|
queryFn: () => arbi.conversations.usage(conversationId),
|
|
1964
1999
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
1965
2000
|
refetchInterval: options?.live ? 1e4 : false
|
|
@@ -1968,7 +2003,7 @@ function useConversationUsage(conversationId, options) {
|
|
|
1968
2003
|
function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
1969
2004
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1970
2005
|
return reactQuery.useQuery({
|
|
1971
|
-
queryKey:
|
|
2006
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
|
|
1972
2007
|
queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
|
|
1973
2008
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1974
2009
|
});
|
|
@@ -1976,7 +2011,7 @@ function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
|
1976
2011
|
function useContacts(options) {
|
|
1977
2012
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1978
2013
|
return reactQuery.useQuery({
|
|
1979
|
-
queryKey:
|
|
2014
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.contacts(),
|
|
1980
2015
|
queryFn: () => arbi.contacts.list(),
|
|
1981
2016
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1982
2017
|
});
|
|
@@ -1991,7 +2026,7 @@ function usePendingContacts(options) {
|
|
|
1991
2026
|
}
|
|
1992
2027
|
function useInvalidateContacts() {
|
|
1993
2028
|
const qc = reactQuery.useQueryClient();
|
|
1994
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
2029
|
+
return () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.contacts() });
|
|
1995
2030
|
}
|
|
1996
2031
|
function useInviteContacts() {
|
|
1997
2032
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
@@ -2029,7 +2064,7 @@ function useSearchContacts(q, { debounceMs = 200 } = {}) {
|
|
|
2029
2064
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2030
2065
|
const term = useDebounced(q.trim(), debounceMs);
|
|
2031
2066
|
return reactQuery.useQuery({
|
|
2032
|
-
queryKey: [...
|
|
2067
|
+
queryKey: [...chunkYIFUMQGA_cjs.arbiQueryKeys.contacts(), "search", term],
|
|
2033
2068
|
queryFn: () => arbi.contacts.search(term),
|
|
2034
2069
|
enabled: term.length > 0 && arbi.isLoggedIn,
|
|
2035
2070
|
staleTime: 6e4,
|
|
@@ -2048,7 +2083,7 @@ function useDebounced(value, ms) {
|
|
|
2048
2083
|
function useHouseTemplateCandidates(workspaceId, enabled, staleTime = 6e4) {
|
|
2049
2084
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2050
2085
|
return reactQuery.useQuery({
|
|
2051
|
-
queryKey:
|
|
2086
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.houseTemplateCandidates(workspaceId ?? ""),
|
|
2052
2087
|
enabled: enabled && !!workspaceId && arbi.hasWorkspace,
|
|
2053
2088
|
staleTime,
|
|
2054
2089
|
queryFn: () => arbi.houseTemplates.candidates()
|
|
@@ -2059,7 +2094,7 @@ function useSetWorkspaceHouseTemplate() {
|
|
|
2059
2094
|
const queryClient = reactQuery.useQueryClient();
|
|
2060
2095
|
return reactQuery.useMutation({
|
|
2061
2096
|
mutationFn: (documentId) => arbi.houseTemplates.setWorkspace(documentId),
|
|
2062
|
-
onSuccess: () => queryClient.invalidateQueries({ queryKey:
|
|
2097
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() })
|
|
2063
2098
|
});
|
|
2064
2099
|
}
|
|
2065
2100
|
var supportsHouseTemplates = browser.houseTemplates.supportsHouseTemplates;
|
|
@@ -2160,11 +2195,11 @@ function useProfile(options) {
|
|
|
2160
2195
|
const { client, enabled } = useAccountClient();
|
|
2161
2196
|
const qc = reactQuery.useQueryClient();
|
|
2162
2197
|
React.useEffect(
|
|
2163
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
2198
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
2164
2199
|
[client, qc]
|
|
2165
2200
|
);
|
|
2166
2201
|
return reactQuery.useQuery({
|
|
2167
|
-
queryKey:
|
|
2202
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.profile(),
|
|
2168
2203
|
queryFn: () => client.profile(),
|
|
2169
2204
|
enabled: (options?.enabled ?? true) && enabled,
|
|
2170
2205
|
staleTime: Infinity
|
|
@@ -2179,9 +2214,9 @@ function useUpdateProfile() {
|
|
|
2179
2214
|
return client.profile();
|
|
2180
2215
|
},
|
|
2181
2216
|
onSuccess: (profile) => {
|
|
2182
|
-
qc.setQueryData(
|
|
2183
|
-
void qc.invalidateQueries({ queryKey:
|
|
2184
|
-
return qc.invalidateQueries({ queryKey:
|
|
2217
|
+
qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.profile(), profile);
|
|
2218
|
+
void qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.identity() });
|
|
2219
|
+
return qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() });
|
|
2185
2220
|
}
|
|
2186
2221
|
});
|
|
2187
2222
|
}
|
|
@@ -2264,7 +2299,7 @@ function useConfirmEmailChange() {
|
|
|
2264
2299
|
const qc = reactQuery.useQueryClient();
|
|
2265
2300
|
return reactQuery.useMutation({
|
|
2266
2301
|
mutationFn: ({ newEmail, code }) => client.confirmEmailChange(newEmail, code),
|
|
2267
|
-
onSuccess: () => qc.setQueryData(
|
|
2302
|
+
onSuccess: () => qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.profile(), client.profile())
|
|
2268
2303
|
});
|
|
2269
2304
|
}
|
|
2270
2305
|
function useEmailChange({
|
|
@@ -2423,7 +2458,7 @@ function usePasswordChangeForm({
|
|
|
2423
2458
|
function useUserSettings(options) {
|
|
2424
2459
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2425
2460
|
return reactQuery.useQuery({
|
|
2426
|
-
queryKey:
|
|
2461
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(),
|
|
2427
2462
|
queryFn: () => arbi.settings.get(),
|
|
2428
2463
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
2429
2464
|
});
|
|
@@ -2434,18 +2469,18 @@ function useUpdateUserSettings() {
|
|
|
2434
2469
|
return reactQuery.useMutation({
|
|
2435
2470
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
2436
2471
|
onMutate: async (patch) => {
|
|
2437
|
-
await qc.cancelQueries({ queryKey:
|
|
2438
|
-
const previous = qc.getQueryData(
|
|
2472
|
+
await qc.cancelQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings() });
|
|
2473
|
+
const previous = qc.getQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings());
|
|
2439
2474
|
qc.setQueryData(
|
|
2440
|
-
|
|
2475
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(),
|
|
2441
2476
|
(old) => old ? { ...old, ...patch } : old
|
|
2442
2477
|
);
|
|
2443
2478
|
return { previous };
|
|
2444
2479
|
},
|
|
2445
2480
|
onError: (_err, _patch, context) => {
|
|
2446
|
-
qc.setQueryData(
|
|
2481
|
+
qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2447
2482
|
},
|
|
2448
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2483
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings() })
|
|
2449
2484
|
});
|
|
2450
2485
|
}
|
|
2451
2486
|
function toNotificationPreferences(stored, keys) {
|
|
@@ -2465,18 +2500,18 @@ function useNotificationPreferences(keys, options) {
|
|
|
2465
2500
|
const save = reactQuery.useMutation({
|
|
2466
2501
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
2467
2502
|
onMutate: async (patch) => {
|
|
2468
|
-
await qc.cancelQueries({ queryKey:
|
|
2469
|
-
const previous = qc.getQueryData(
|
|
2503
|
+
await qc.cancelQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings() });
|
|
2504
|
+
const previous = qc.getQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings());
|
|
2470
2505
|
qc.setQueryData(
|
|
2471
|
-
|
|
2506
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(),
|
|
2472
2507
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
2473
2508
|
);
|
|
2474
2509
|
return { previous };
|
|
2475
2510
|
},
|
|
2476
2511
|
onError: (_err, _patch, context) => {
|
|
2477
|
-
qc.setQueryData(
|
|
2512
|
+
qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2478
2513
|
},
|
|
2479
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2514
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings() })
|
|
2480
2515
|
});
|
|
2481
2516
|
const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
2482
2517
|
const setAll = React.useCallback(
|
|
@@ -2503,18 +2538,18 @@ function useRelevanceSave() {
|
|
|
2503
2538
|
return reactQuery.useMutation({
|
|
2504
2539
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
2505
2540
|
onMutate: async (patch) => {
|
|
2506
|
-
await qc.cancelQueries({ queryKey:
|
|
2507
|
-
const previous = qc.getQueryData(
|
|
2541
|
+
await qc.cancelQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings() });
|
|
2542
|
+
const previous = qc.getQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings());
|
|
2508
2543
|
qc.setQueryData(
|
|
2509
|
-
|
|
2544
|
+
chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(),
|
|
2510
2545
|
(old) => old ? { ...old, ...patch } : old
|
|
2511
2546
|
);
|
|
2512
2547
|
return { previous };
|
|
2513
2548
|
},
|
|
2514
2549
|
onError: (_err, _patch, context) => {
|
|
2515
|
-
qc.setQueryData(
|
|
2550
|
+
qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2516
2551
|
},
|
|
2517
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2552
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings() })
|
|
2518
2553
|
});
|
|
2519
2554
|
}
|
|
2520
2555
|
function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
@@ -2525,7 +2560,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
|
2525
2560
|
const setLevel = React.useCallback(
|
|
2526
2561
|
(next) => {
|
|
2527
2562
|
if (!workspaceId) return;
|
|
2528
|
-
const current = qc.getQueryData(
|
|
2563
|
+
const current = qc.getQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2529
2564
|
save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
|
|
2530
2565
|
},
|
|
2531
2566
|
[qc, save, settings.data, workspaceId]
|
|
@@ -2546,7 +2581,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2546
2581
|
const setFollowing = React.useCallback(
|
|
2547
2582
|
(on, callbacks) => {
|
|
2548
2583
|
if (!conversationId) return;
|
|
2549
|
-
const current = qc.getQueryData(
|
|
2584
|
+
const current = qc.getQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2550
2585
|
save.mutate(
|
|
2551
2586
|
{
|
|
2552
2587
|
followed_threads: browser.settings.withMembership(
|
|
@@ -2571,7 +2606,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2571
2606
|
function useSessions(options) {
|
|
2572
2607
|
const { client, enabled } = useAccountClient();
|
|
2573
2608
|
return reactQuery.useQuery({
|
|
2574
|
-
queryKey:
|
|
2609
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.sessions(),
|
|
2575
2610
|
queryFn: () => client.listSessions(),
|
|
2576
2611
|
enabled: (options?.enabled ?? true) && enabled
|
|
2577
2612
|
});
|
|
@@ -2581,7 +2616,7 @@ function useTerminateSession() {
|
|
|
2581
2616
|
const qc = reactQuery.useQueryClient();
|
|
2582
2617
|
return reactQuery.useMutation({
|
|
2583
2618
|
mutationFn: (sessionId) => client.terminateSession(sessionId),
|
|
2584
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
2619
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.sessions() })
|
|
2585
2620
|
});
|
|
2586
2621
|
}
|
|
2587
2622
|
function useSignOut() {
|
|
@@ -2724,7 +2759,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2724
2759
|
const apiRef = React.useRef(api);
|
|
2725
2760
|
apiRef.current = api;
|
|
2726
2761
|
const query = reactQuery.useQuery({
|
|
2727
|
-
queryKey:
|
|
2762
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.identity(),
|
|
2728
2763
|
queryFn: () => apiRef.current.status(),
|
|
2729
2764
|
enabled,
|
|
2730
2765
|
staleTime: 6e4
|
|
@@ -2742,7 +2777,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2742
2777
|
const lastVerified = React.useRef(void 0);
|
|
2743
2778
|
const apply = React.useCallback(
|
|
2744
2779
|
(next) => {
|
|
2745
|
-
qc.setQueryData(
|
|
2780
|
+
qc.setQueryData(chunkYIFUMQGA_cjs.arbiQueryKeys.identity(), next);
|
|
2746
2781
|
if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
|
|
2747
2782
|
onVerifiedChange?.(next.verified);
|
|
2748
2783
|
}
|
|
@@ -2937,12 +2972,12 @@ function useIdentityVerification(options = {}) {
|
|
|
2937
2972
|
enabled,
|
|
2938
2973
|
formatPrice,
|
|
2939
2974
|
onVerifiedChange: (verified) => {
|
|
2940
|
-
void qc.invalidateQueries({ queryKey:
|
|
2975
|
+
void qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.profile() });
|
|
2941
2976
|
onVerifiedChange?.(verified);
|
|
2942
2977
|
},
|
|
2943
2978
|
onNameAccepted: (name) => {
|
|
2944
|
-
void qc.invalidateQueries({ queryKey:
|
|
2945
|
-
void qc.invalidateQueries({ queryKey:
|
|
2979
|
+
void qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.profile() });
|
|
2980
|
+
void qc.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.workspaces() });
|
|
2946
2981
|
onNameAccepted?.(name);
|
|
2947
2982
|
}
|
|
2948
2983
|
});
|
|
@@ -3418,6 +3453,237 @@ var calendarQueryKeys = {
|
|
|
3418
3453
|
/** The offline outbox (writes made offline, not yet sent). */
|
|
3419
3454
|
outbox: () => ["arbi", "calendar", "outbox"]
|
|
3420
3455
|
};
|
|
3456
|
+
var connectorQueryKeys = {
|
|
3457
|
+
all: () => ["arbi", "connectors"],
|
|
3458
|
+
catalog: () => ["arbi", "connectors", "catalog"],
|
|
3459
|
+
mine: () => ["arbi", "connectors", "mine"],
|
|
3460
|
+
mailboxFolders: (vendor) => ["arbi", "connectors", "folders", vendor],
|
|
3461
|
+
mailboxSyncProgress: (vendor, workspaceExtId) => ["arbi", "connectors", "sync-progress", vendor, workspaceExtId],
|
|
3462
|
+
allMailboxSyncProgress: () => ["arbi", "connectors", "sync-progress"],
|
|
3463
|
+
driveFolders: (vendor) => ["arbi", "connectors", "drive-folders", vendor],
|
|
3464
|
+
driveFolderChildren: (vendor, itemId) => ["arbi", "connectors", "drive-folder-children", vendor, itemId],
|
|
3465
|
+
driveFolderDocCount: (vendor, itemId) => ["arbi", "connectors", "drive-folder-doc-count", vendor, itemId],
|
|
3466
|
+
driveSyncEstimate: (vendor) => ["arbi", "connectors", "drive-sync-estimate", vendor],
|
|
3467
|
+
driveSyncProgress: (vendor) => ["arbi", "connectors", "drive-sync-progress", vendor],
|
|
3468
|
+
allDriveSyncProgress: () => ["arbi", "connectors", "drive-sync-progress"],
|
|
3469
|
+
slack: () => ["arbi", "connectors", "slack"]
|
|
3470
|
+
};
|
|
3471
|
+
function useConnectorMutation(mutationFn) {
|
|
3472
|
+
const qc = reactQuery.useQueryClient();
|
|
3473
|
+
return reactQuery.useMutation({
|
|
3474
|
+
mutationFn,
|
|
3475
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: connectorQueryKeys.all() })
|
|
3476
|
+
});
|
|
3477
|
+
}
|
|
3478
|
+
function useConnectorCatalog() {
|
|
3479
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3480
|
+
return reactQuery.useQuery({
|
|
3481
|
+
queryKey: connectorQueryKeys.catalog(),
|
|
3482
|
+
queryFn: () => arbi.connectors.catalog(),
|
|
3483
|
+
staleTime: 5 * 6e4,
|
|
3484
|
+
enabled: arbi.isLoggedIn
|
|
3485
|
+
});
|
|
3486
|
+
}
|
|
3487
|
+
function useMyConnectors() {
|
|
3488
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3489
|
+
return reactQuery.useQuery({
|
|
3490
|
+
queryKey: connectorQueryKeys.mine(),
|
|
3491
|
+
queryFn: () => arbi.connectors.mine(),
|
|
3492
|
+
staleTime: 3e4,
|
|
3493
|
+
enabled: arbi.isLoggedIn
|
|
3494
|
+
});
|
|
3495
|
+
}
|
|
3496
|
+
function useDisconnectConnector() {
|
|
3497
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3498
|
+
return useConnectorMutation(
|
|
3499
|
+
({ vendorKey }) => arbi.connectors.disconnect(vendorKey)
|
|
3500
|
+
);
|
|
3501
|
+
}
|
|
3502
|
+
function useConnectorVendorVisibility() {
|
|
3503
|
+
const { data: settings } = useUserSettings();
|
|
3504
|
+
return (vendorKey) => browser.isConnectorVendorVisible(settings, vendorKey);
|
|
3505
|
+
}
|
|
3506
|
+
function connectorReturnTo(reopen) {
|
|
3507
|
+
const params = new URLSearchParams(window.location.search);
|
|
3508
|
+
params.delete("connected");
|
|
3509
|
+
params.delete("connect_error");
|
|
3510
|
+
params.set("stay", "1");
|
|
3511
|
+
if (reopen) params.set("reopen", reopen);
|
|
3512
|
+
else params.delete("reopen");
|
|
3513
|
+
return `${window.location.pathname}?${params.toString()}`;
|
|
3514
|
+
}
|
|
3515
|
+
function useMailboxFolders(vendorKey, enabled) {
|
|
3516
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3517
|
+
return reactQuery.useQuery({
|
|
3518
|
+
queryKey: connectorQueryKeys.mailboxFolders(vendorKey),
|
|
3519
|
+
queryFn: () => arbi.connectors.mailboxFolders(vendorKey),
|
|
3520
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3521
|
+
staleTime: 6e4
|
|
3522
|
+
});
|
|
3523
|
+
}
|
|
3524
|
+
function useEnableMailboxSync() {
|
|
3525
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3526
|
+
return useConnectorMutation(
|
|
3527
|
+
(v) => arbi.connectors.enableMailboxSync(v.vendorKey, {
|
|
3528
|
+
workspace_ext_id: v.workspaceExtId,
|
|
3529
|
+
backfill_window: v.backfillWindow,
|
|
3530
|
+
backfill_since: v.backfillSince ?? null,
|
|
3531
|
+
folders: v.folders,
|
|
3532
|
+
skip_duplicates: v.skipDuplicates,
|
|
3533
|
+
auto_rename: v.autoRename ?? false,
|
|
3534
|
+
shared: v.shared ?? false,
|
|
3535
|
+
auto_sync: v.autoSync
|
|
3536
|
+
})
|
|
3537
|
+
);
|
|
3538
|
+
}
|
|
3539
|
+
function useTriggerMailboxSync() {
|
|
3540
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3541
|
+
return useConnectorMutation(
|
|
3542
|
+
({ vendorKey, workspaceExtId }) => arbi.connectors.syncMailbox(vendorKey, workspaceExtId)
|
|
3543
|
+
);
|
|
3544
|
+
}
|
|
3545
|
+
function useMailboxSyncProgress(vendorKey, workspaceExtId, enabled) {
|
|
3546
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3547
|
+
return reactQuery.useQuery({
|
|
3548
|
+
queryKey: connectorQueryKeys.mailboxSyncProgress(vendorKey, workspaceExtId),
|
|
3549
|
+
queryFn: () => arbi.connectors.mailboxSyncProgress(vendorKey, workspaceExtId),
|
|
3550
|
+
enabled: enabled && !!workspaceExtId && arbi.isLoggedIn,
|
|
3551
|
+
refetchInterval: (query) => query.state.data?.running ? 1500 : false,
|
|
3552
|
+
staleTime: 0
|
|
3553
|
+
});
|
|
3554
|
+
}
|
|
3555
|
+
function useCancelMailboxSync() {
|
|
3556
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3557
|
+
return reactQuery.useMutation({
|
|
3558
|
+
mutationFn: ({ vendorKey, workspaceExtId }) => arbi.connectors.cancelMailboxSync(vendorKey, workspaceExtId)
|
|
3559
|
+
});
|
|
3560
|
+
}
|
|
3561
|
+
function useDriveFolders(vendorKey, enabled) {
|
|
3562
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3563
|
+
return reactQuery.useQuery({
|
|
3564
|
+
queryKey: connectorQueryKeys.driveFolders(vendorKey),
|
|
3565
|
+
queryFn: () => arbi.connectors.driveFolders(vendorKey),
|
|
3566
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3567
|
+
retry: false,
|
|
3568
|
+
staleTime: 6e4
|
|
3569
|
+
});
|
|
3570
|
+
}
|
|
3571
|
+
function useDriveFolderChildren(vendorKey, itemId, enabled) {
|
|
3572
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3573
|
+
return reactQuery.useQuery({
|
|
3574
|
+
queryKey: connectorQueryKeys.driveFolderChildren(vendorKey, itemId),
|
|
3575
|
+
queryFn: () => arbi.connectors.driveFolderChildren(vendorKey, itemId),
|
|
3576
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3577
|
+
staleTime: 3e4
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3580
|
+
function useDriveFolderDocCount(vendorKey, itemId, enabled) {
|
|
3581
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3582
|
+
return reactQuery.useQuery({
|
|
3583
|
+
queryKey: connectorQueryKeys.driveFolderDocCount(vendorKey, itemId),
|
|
3584
|
+
queryFn: () => arbi.connectors.driveFolderDocCount(vendorKey, itemId),
|
|
3585
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3586
|
+
staleTime: 5 * 6e4
|
|
3587
|
+
});
|
|
3588
|
+
}
|
|
3589
|
+
function useEnableDriveSync() {
|
|
3590
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3591
|
+
return useConnectorMutation(
|
|
3592
|
+
(v) => arbi.connectors.enableDriveSync(v.vendorKey, {
|
|
3593
|
+
workspace_ext_id: v.workspaceExtId,
|
|
3594
|
+
folders: v.folders,
|
|
3595
|
+
skip_duplicates: v.skipDuplicates,
|
|
3596
|
+
auto_rename: v.autoRename,
|
|
3597
|
+
shared: v.shared,
|
|
3598
|
+
auto_sync: v.autoSync
|
|
3599
|
+
})
|
|
3600
|
+
);
|
|
3601
|
+
}
|
|
3602
|
+
function useTriggerDriveSync() {
|
|
3603
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3604
|
+
return useConnectorMutation(
|
|
3605
|
+
({ vendorKey }) => arbi.connectors.syncDrive(vendorKey)
|
|
3606
|
+
);
|
|
3607
|
+
}
|
|
3608
|
+
function useDriveSyncEstimate(vendorKey, enabled) {
|
|
3609
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3610
|
+
return reactQuery.useQuery({
|
|
3611
|
+
queryKey: connectorQueryKeys.driveSyncEstimate(vendorKey),
|
|
3612
|
+
queryFn: () => arbi.connectors.driveSyncEstimate(vendorKey),
|
|
3613
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3614
|
+
staleTime: 3e4
|
|
3615
|
+
});
|
|
3616
|
+
}
|
|
3617
|
+
function useDriveSyncProgress(vendorKey, enabled) {
|
|
3618
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3619
|
+
return reactQuery.useQuery({
|
|
3620
|
+
queryKey: connectorQueryKeys.driveSyncProgress(vendorKey),
|
|
3621
|
+
queryFn: () => arbi.connectors.driveSyncProgress(vendorKey),
|
|
3622
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3623
|
+
refetchInterval: (query) => query.state.data?.running ? 1500 : false,
|
|
3624
|
+
staleTime: 0
|
|
3625
|
+
});
|
|
3626
|
+
}
|
|
3627
|
+
function useCancelDriveSync() {
|
|
3628
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3629
|
+
return reactQuery.useMutation({
|
|
3630
|
+
mutationFn: ({ vendorKey }) => arbi.connectors.cancelDriveSync(vendorKey)
|
|
3631
|
+
});
|
|
3632
|
+
}
|
|
3633
|
+
function useSlackConnection() {
|
|
3634
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3635
|
+
return reactQuery.useQuery({
|
|
3636
|
+
queryKey: connectorQueryKeys.slack(),
|
|
3637
|
+
queryFn: () => arbi.connectors.slack.status(),
|
|
3638
|
+
enabled: arbi.isLoggedIn,
|
|
3639
|
+
// Fresh on every visit: the OAuth return lands here before the status changed server-side.
|
|
3640
|
+
staleTime: 0,
|
|
3641
|
+
refetchOnMount: "always",
|
|
3642
|
+
refetchOnWindowFocus: true
|
|
3643
|
+
});
|
|
3644
|
+
}
|
|
3645
|
+
function useDisconnectSlack() {
|
|
3646
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3647
|
+
return useConnectorMutation(() => arbi.connectors.slack.disconnect());
|
|
3648
|
+
}
|
|
3649
|
+
function useRefreshConnectorsOnRunEnd(running) {
|
|
3650
|
+
const qc = reactQuery.useQueryClient();
|
|
3651
|
+
const wasRunning = React.useRef(running);
|
|
3652
|
+
React.useEffect(() => {
|
|
3653
|
+
if (wasRunning.current && !running) {
|
|
3654
|
+
void qc.invalidateQueries({ queryKey: connectorQueryKeys.mine() });
|
|
3655
|
+
}
|
|
3656
|
+
wasRunning.current = running;
|
|
3657
|
+
}, [running, qc]);
|
|
3658
|
+
}
|
|
3659
|
+
var FOCUS_RECHECK_MS = 6e4;
|
|
3660
|
+
function useConnectorAutoSync(workspaceExtId, opened) {
|
|
3661
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3662
|
+
const qc = reactQuery.useQueryClient();
|
|
3663
|
+
const lastCheck = React.useRef(0);
|
|
3664
|
+
React.useEffect(() => {
|
|
3665
|
+
if (!opened || !workspaceExtId || !arbi.isLoggedIn) return;
|
|
3666
|
+
const check = () => {
|
|
3667
|
+
lastCheck.current = Date.now();
|
|
3668
|
+
void arbi.connectors.bridgeTokens({ autoSyncWorkspaceExtId: workspaceExtId }).then(() => {
|
|
3669
|
+
void qc.invalidateQueries({ queryKey: connectorQueryKeys.mine() });
|
|
3670
|
+
void qc.invalidateQueries({ queryKey: connectorQueryKeys.allMailboxSyncProgress() });
|
|
3671
|
+
void qc.invalidateQueries({ queryKey: connectorQueryKeys.allDriveSyncProgress() });
|
|
3672
|
+
});
|
|
3673
|
+
};
|
|
3674
|
+
check();
|
|
3675
|
+
const onVisible = () => {
|
|
3676
|
+
if (document.visibilityState !== "visible") return;
|
|
3677
|
+
if (Date.now() - lastCheck.current < FOCUS_RECHECK_MS) return;
|
|
3678
|
+
check();
|
|
3679
|
+
};
|
|
3680
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
3681
|
+
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
3682
|
+
}, [opened, workspaceExtId, arbi, qc]);
|
|
3683
|
+
}
|
|
3684
|
+
function connectorErrorStatus(err) {
|
|
3685
|
+
return err instanceof browser.ArbiApiError ? err.status : void 0;
|
|
3686
|
+
}
|
|
3421
3687
|
function isQueuedCalendarWrite(value) {
|
|
3422
3688
|
return !!value && typeof value === "object" && value.queued === true;
|
|
3423
3689
|
}
|
|
@@ -3429,7 +3695,24 @@ function CalendarSupportProvider({
|
|
|
3429
3695
|
return /* @__PURE__ */ jsxRuntime.jsx(CalendarSupportContext.Provider, { value, children });
|
|
3430
3696
|
}
|
|
3431
3697
|
function useCalendarSupport() {
|
|
3432
|
-
|
|
3698
|
+
const support = React.useContext(CalendarSupportContext);
|
|
3699
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3700
|
+
const qc = reactQuery.useQueryClient();
|
|
3701
|
+
return React.useMemo(
|
|
3702
|
+
() => ({
|
|
3703
|
+
...support,
|
|
3704
|
+
connectors: support.connectors ?? {
|
|
3705
|
+
authorize: (vendor, returnPath) => arbi.connectors.authorize(vendor, returnPath),
|
|
3706
|
+
bridge: (vendor) => arbi.connectors.bridgeTokens({ vendor }),
|
|
3707
|
+
connectedVendors: async () => (await qc.fetchQuery({
|
|
3708
|
+
queryKey: connectorQueryKeys.mine(),
|
|
3709
|
+
queryFn: () => arbi.connectors.mine(),
|
|
3710
|
+
staleTime: 3e4
|
|
3711
|
+
})).map((c) => c.vendor_key)
|
|
3712
|
+
}
|
|
3713
|
+
}),
|
|
3714
|
+
[support, arbi, qc]
|
|
3715
|
+
);
|
|
3433
3716
|
}
|
|
3434
3717
|
function invalidateCalendarEvents(qc) {
|
|
3435
3718
|
return Promise.all([
|
|
@@ -4005,7 +4288,7 @@ function useDeleteBookingPage() {
|
|
|
4005
4288
|
});
|
|
4006
4289
|
}
|
|
4007
4290
|
function useWorkspaceDocs(workspaceId) {
|
|
4008
|
-
const { data: docs = [], isLoading, isError } =
|
|
4291
|
+
const { data: docs = [], isLoading, isError } = chunkYIFUMQGA_cjs.useDocuments(workspaceId);
|
|
4009
4292
|
const docIds = React.useMemo(
|
|
4010
4293
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
4011
4294
|
[docs]
|
|
@@ -4013,7 +4296,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
4013
4296
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
4014
4297
|
}
|
|
4015
4298
|
function useAiTask() {
|
|
4016
|
-
const mutation =
|
|
4299
|
+
const mutation = chunkYIFUMQGA_cjs.useAssistantQuery();
|
|
4017
4300
|
const [status, setStatus] = React.useState("idle");
|
|
4018
4301
|
const [text, setText] = React.useState("");
|
|
4019
4302
|
const [stepCount, setStepCount] = React.useState(0);
|
|
@@ -4633,8 +4916,8 @@ function DocumentReview({
|
|
|
4633
4916
|
onClose,
|
|
4634
4917
|
className
|
|
4635
4918
|
}) {
|
|
4636
|
-
const parsedQuery =
|
|
4637
|
-
const tagsQuery =
|
|
4919
|
+
const parsedQuery = chunkYIFUMQGA_cjs.useParsedDocument(docId, stage);
|
|
4920
|
+
const tagsQuery = chunkYIFUMQGA_cjs.useTags(workspaceId);
|
|
4638
4921
|
const tagNameById = React__default.default.useMemo(() => {
|
|
4639
4922
|
const map = /* @__PURE__ */ new Map();
|
|
4640
4923
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -4865,7 +5148,7 @@ function SemanticSearch({
|
|
|
4865
5148
|
const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
|
|
4866
5149
|
const [value, setValue] = React.useState("");
|
|
4867
5150
|
const [selected, setSelected] = React.useState(null);
|
|
4868
|
-
const { data: docs = [] } =
|
|
5151
|
+
const { data: docs = [] } = chunkYIFUMQGA_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
|
|
4869
5152
|
const docMap = React.useMemo(() => {
|
|
4870
5153
|
const map = /* @__PURE__ */ new Map();
|
|
4871
5154
|
for (const d of docs) if (d.external_id) map.set(d.external_id, d);
|
|
@@ -5967,7 +6250,7 @@ function ActivityFeed({
|
|
|
5967
6250
|
enabled,
|
|
5968
6251
|
"data-testid": testId = "activity-feed"
|
|
5969
6252
|
}) {
|
|
5970
|
-
const { data, isLoading, isError } =
|
|
6253
|
+
const { data, isLoading, isError } = chunkYIFUMQGA_cjs.useActivity({ limit, enabled });
|
|
5971
6254
|
if (isLoading) {
|
|
5972
6255
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkS6A6FSG7_cjs.cn("space-y-2", className), "data-testid": testId, "aria-busy": "true", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 py-1.5", children: [
|
|
5973
6256
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -6044,12 +6327,12 @@ function useNotifications(options = {}) {
|
|
|
6044
6327
|
React.useEffect(
|
|
6045
6328
|
() => ws?.subscribe((message) => {
|
|
6046
6329
|
if ("sender" in message && "recipient" in message)
|
|
6047
|
-
void queries.invalidateQueries({ queryKey:
|
|
6330
|
+
void queries.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allNotifications() });
|
|
6048
6331
|
}),
|
|
6049
6332
|
[ws, queries]
|
|
6050
6333
|
);
|
|
6051
6334
|
return reactQuery.useQuery({
|
|
6052
|
-
queryKey:
|
|
6335
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.notifications(limit),
|
|
6053
6336
|
queryFn: () => arbi.notifications.list({ limit }),
|
|
6054
6337
|
enabled: (options.enabled ?? true) && arbi.isLoggedIn
|
|
6055
6338
|
});
|
|
@@ -6059,7 +6342,7 @@ function useDeleteNotifications() {
|
|
|
6059
6342
|
const queries = reactQuery.useQueryClient();
|
|
6060
6343
|
return reactQuery.useMutation({
|
|
6061
6344
|
mutationFn: (ids) => arbi.notifications.delete(ids),
|
|
6062
|
-
onSuccess: () => queries.invalidateQueries({ queryKey:
|
|
6345
|
+
onSuccess: () => queries.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allNotifications() })
|
|
6063
6346
|
});
|
|
6064
6347
|
}
|
|
6065
6348
|
function useMarkNotificationsRead() {
|
|
@@ -6067,7 +6350,7 @@ function useMarkNotificationsRead() {
|
|
|
6067
6350
|
const queries = reactQuery.useQueryClient();
|
|
6068
6351
|
return reactQuery.useMutation({
|
|
6069
6352
|
mutationFn: (ids) => arbi.notifications.markRead(ids),
|
|
6070
|
-
onSuccess: () => queries.invalidateQueries({ queryKey:
|
|
6353
|
+
onSuccess: () => queries.invalidateQueries({ queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.allNotifications() })
|
|
6071
6354
|
});
|
|
6072
6355
|
}
|
|
6073
6356
|
|
|
@@ -6520,7 +6803,7 @@ function useDirectMessages(options) {
|
|
|
6520
6803
|
enabled
|
|
6521
6804
|
});
|
|
6522
6805
|
const contactsQuery = reactQuery.useQuery({
|
|
6523
|
-
queryKey:
|
|
6806
|
+
queryKey: chunkYIFUMQGA_cjs.arbiQueryKeys.contacts(),
|
|
6524
6807
|
queryFn: () => arbi.contacts.list(),
|
|
6525
6808
|
enabled
|
|
6526
6809
|
});
|
|
@@ -7789,10 +8072,10 @@ function DocumentTable({
|
|
|
7789
8072
|
extraColumns,
|
|
7790
8073
|
className
|
|
7791
8074
|
}) {
|
|
7792
|
-
const query =
|
|
8075
|
+
const query = chunkYIFUMQGA_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
7793
8076
|
const rows = documents ?? query.data ?? [];
|
|
7794
8077
|
const isLoading = !documents && query.isLoading;
|
|
7795
|
-
const tagsQuery =
|
|
8078
|
+
const tagsQuery = chunkYIFUMQGA_cjs.useTags(workspaceId);
|
|
7796
8079
|
const tagNameById = React__default.default.useMemo(() => {
|
|
7797
8080
|
const map = /* @__PURE__ */ new Map();
|
|
7798
8081
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -8062,10 +8345,10 @@ function DocumentGallery({
|
|
|
8062
8345
|
minTileWidth = 148,
|
|
8063
8346
|
className
|
|
8064
8347
|
}) {
|
|
8065
|
-
const query =
|
|
8348
|
+
const query = chunkYIFUMQGA_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
8066
8349
|
const rows = documents ?? query.data ?? [];
|
|
8067
8350
|
const isLoading = !documents && query.isLoading;
|
|
8068
|
-
const tagsQuery =
|
|
8351
|
+
const tagsQuery = chunkYIFUMQGA_cjs.useTags(workspaceId);
|
|
8069
8352
|
const tagNameById = React__default.default.useMemo(() => {
|
|
8070
8353
|
const map = /* @__PURE__ */ new Map();
|
|
8071
8354
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -8077,7 +8360,7 @@ function DocumentGallery({
|
|
|
8077
8360
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
8078
8361
|
[rows]
|
|
8079
8362
|
);
|
|
8080
|
-
const thumbsQuery =
|
|
8363
|
+
const thumbsQuery = chunkYIFUMQGA_cjs.useThumbnails(docIds);
|
|
8081
8364
|
const thumbs = thumbsQuery.data ?? {};
|
|
8082
8365
|
const session = useArbiSessionStore();
|
|
8083
8366
|
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
@@ -8724,247 +9007,247 @@ function hasVideoTrack(blob) {
|
|
|
8724
9007
|
|
|
8725
9008
|
Object.defineProperty(exports, "DOCUMENTS_FIRST_PAGE_MEASURE", {
|
|
8726
9009
|
enumerable: true,
|
|
8727
|
-
get: function () { return
|
|
9010
|
+
get: function () { return chunkYIFUMQGA_cjs.DOCUMENTS_FIRST_PAGE_MEASURE; }
|
|
8728
9011
|
});
|
|
8729
9012
|
Object.defineProperty(exports, "DOCUMENTS_FIRST_PAGE_SIZE", {
|
|
8730
9013
|
enumerable: true,
|
|
8731
|
-
get: function () { return
|
|
9014
|
+
get: function () { return chunkYIFUMQGA_cjs.DOCUMENTS_FIRST_PAGE_SIZE; }
|
|
8732
9015
|
});
|
|
8733
9016
|
Object.defineProperty(exports, "DOCUMENTS_PAGE_SIZE", {
|
|
8734
9017
|
enumerable: true,
|
|
8735
|
-
get: function () { return
|
|
9018
|
+
get: function () { return chunkYIFUMQGA_cjs.DOCUMENTS_PAGE_SIZE; }
|
|
8736
9019
|
});
|
|
8737
9020
|
Object.defineProperty(exports, "FINISHED_DOCUMENT_STATUSES", {
|
|
8738
9021
|
enumerable: true,
|
|
8739
|
-
get: function () { return
|
|
9022
|
+
get: function () { return chunkYIFUMQGA_cjs.FINISHED_DOCUMENT_STATUSES; }
|
|
8740
9023
|
});
|
|
8741
9024
|
Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
|
|
8742
9025
|
enumerable: true,
|
|
8743
|
-
get: function () { return
|
|
9026
|
+
get: function () { return chunkYIFUMQGA_cjs.PROJECT_CREATION_DENIED_REASON; }
|
|
8744
9027
|
});
|
|
8745
9028
|
Object.defineProperty(exports, "SIMILARITY_THRESHOLD", {
|
|
8746
9029
|
enumerable: true,
|
|
8747
|
-
get: function () { return
|
|
9030
|
+
get: function () { return chunkYIFUMQGA_cjs.SIMILARITY_THRESHOLD; }
|
|
8748
9031
|
});
|
|
8749
9032
|
Object.defineProperty(exports, "adjustTagCounts", {
|
|
8750
9033
|
enumerable: true,
|
|
8751
|
-
get: function () { return
|
|
9034
|
+
get: function () { return chunkYIFUMQGA_cjs.adjustTagCounts; }
|
|
8752
9035
|
});
|
|
8753
9036
|
Object.defineProperty(exports, "arbiMutationKeys", {
|
|
8754
9037
|
enumerable: true,
|
|
8755
|
-
get: function () { return
|
|
9038
|
+
get: function () { return chunkYIFUMQGA_cjs.arbiMutationKeys; }
|
|
8756
9039
|
});
|
|
8757
9040
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
8758
9041
|
enumerable: true,
|
|
8759
|
-
get: function () { return
|
|
9042
|
+
get: function () { return chunkYIFUMQGA_cjs.arbiQueryKeys; }
|
|
8760
9043
|
});
|
|
8761
9044
|
Object.defineProperty(exports, "forgetDocuments", {
|
|
8762
9045
|
enumerable: true,
|
|
8763
|
-
get: function () { return
|
|
9046
|
+
get: function () { return chunkYIFUMQGA_cjs.forgetDocuments; }
|
|
8764
9047
|
});
|
|
8765
9048
|
Object.defineProperty(exports, "getCachedDocuments", {
|
|
8766
9049
|
enumerable: true,
|
|
8767
|
-
get: function () { return
|
|
9050
|
+
get: function () { return chunkYIFUMQGA_cjs.getCachedDocuments; }
|
|
8768
9051
|
});
|
|
8769
9052
|
Object.defineProperty(exports, "invalidateTagData", {
|
|
8770
9053
|
enumerable: true,
|
|
8771
|
-
get: function () { return
|
|
9054
|
+
get: function () { return chunkYIFUMQGA_cjs.invalidateTagData; }
|
|
8772
9055
|
});
|
|
8773
9056
|
Object.defineProperty(exports, "invalidateTagTables", {
|
|
8774
9057
|
enumerable: true,
|
|
8775
|
-
get: function () { return
|
|
9058
|
+
get: function () { return chunkYIFUMQGA_cjs.invalidateTagTables; }
|
|
8776
9059
|
});
|
|
8777
9060
|
Object.defineProperty(exports, "isDocumentsLoading", {
|
|
8778
9061
|
enumerable: true,
|
|
8779
|
-
get: function () { return
|
|
9062
|
+
get: function () { return chunkYIFUMQGA_cjs.isDocumentsLoading; }
|
|
8780
9063
|
});
|
|
8781
9064
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
8782
9065
|
enumerable: true,
|
|
8783
|
-
get: function () { return
|
|
9066
|
+
get: function () { return chunkYIFUMQGA_cjs.isUsageMetered; }
|
|
8784
9067
|
});
|
|
8785
9068
|
Object.defineProperty(exports, "patchCachedDocument", {
|
|
8786
9069
|
enumerable: true,
|
|
8787
|
-
get: function () { return
|
|
9070
|
+
get: function () { return chunkYIFUMQGA_cjs.patchCachedDocument; }
|
|
8788
9071
|
});
|
|
8789
9072
|
Object.defineProperty(exports, "patchDocuments", {
|
|
8790
9073
|
enumerable: true,
|
|
8791
|
-
get: function () { return
|
|
9074
|
+
get: function () { return chunkYIFUMQGA_cjs.patchDocuments; }
|
|
8792
9075
|
});
|
|
8793
9076
|
Object.defineProperty(exports, "patchWorkspaceTags", {
|
|
8794
9077
|
enumerable: true,
|
|
8795
|
-
get: function () { return
|
|
9078
|
+
get: function () { return chunkYIFUMQGA_cjs.patchWorkspaceTags; }
|
|
8796
9079
|
});
|
|
8797
9080
|
Object.defineProperty(exports, "refreshDocuments", {
|
|
8798
9081
|
enumerable: true,
|
|
8799
|
-
get: function () { return
|
|
9082
|
+
get: function () { return chunkYIFUMQGA_cjs.refreshDocuments; }
|
|
8800
9083
|
});
|
|
8801
9084
|
Object.defineProperty(exports, "setCachedDocument", {
|
|
8802
9085
|
enumerable: true,
|
|
8803
|
-
get: function () { return
|
|
9086
|
+
get: function () { return chunkYIFUMQGA_cjs.setCachedDocument; }
|
|
8804
9087
|
});
|
|
8805
9088
|
Object.defineProperty(exports, "stopDocumentsLoading", {
|
|
8806
9089
|
enumerable: true,
|
|
8807
|
-
get: function () { return
|
|
9090
|
+
get: function () { return chunkYIFUMQGA_cjs.stopDocumentsLoading; }
|
|
8808
9091
|
});
|
|
8809
9092
|
Object.defineProperty(exports, "subscribeDocumentRows", {
|
|
8810
9093
|
enumerable: true,
|
|
8811
|
-
get: function () { return
|
|
9094
|
+
get: function () { return chunkYIFUMQGA_cjs.subscribeDocumentRows; }
|
|
8812
9095
|
});
|
|
8813
9096
|
Object.defineProperty(exports, "upsertDocuments", {
|
|
8814
9097
|
enumerable: true,
|
|
8815
|
-
get: function () { return
|
|
9098
|
+
get: function () { return chunkYIFUMQGA_cjs.upsertDocuments; }
|
|
8816
9099
|
});
|
|
8817
9100
|
Object.defineProperty(exports, "useActivity", {
|
|
8818
9101
|
enumerable: true,
|
|
8819
|
-
get: function () { return
|
|
9102
|
+
get: function () { return chunkYIFUMQGA_cjs.useActivity; }
|
|
8820
9103
|
});
|
|
8821
9104
|
Object.defineProperty(exports, "useAgents", {
|
|
8822
9105
|
enumerable: true,
|
|
8823
|
-
get: function () { return
|
|
9106
|
+
get: function () { return chunkYIFUMQGA_cjs.useAgents; }
|
|
8824
9107
|
});
|
|
8825
9108
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
8826
9109
|
enumerable: true,
|
|
8827
|
-
get: function () { return
|
|
9110
|
+
get: function () { return chunkYIFUMQGA_cjs.useAssistantQuery; }
|
|
8828
9111
|
});
|
|
8829
9112
|
Object.defineProperty(exports, "useAvailableModels", {
|
|
8830
9113
|
enumerable: true,
|
|
8831
|
-
get: function () { return
|
|
9114
|
+
get: function () { return chunkYIFUMQGA_cjs.useAvailableModels; }
|
|
8832
9115
|
});
|
|
8833
9116
|
Object.defineProperty(exports, "useCanCreateProjects", {
|
|
8834
9117
|
enumerable: true,
|
|
8835
|
-
get: function () { return
|
|
9118
|
+
get: function () { return chunkYIFUMQGA_cjs.useCanCreateProjects; }
|
|
8836
9119
|
});
|
|
8837
9120
|
Object.defineProperty(exports, "useConfigs", {
|
|
8838
9121
|
enumerable: true,
|
|
8839
|
-
get: function () { return
|
|
9122
|
+
get: function () { return chunkYIFUMQGA_cjs.useConfigs; }
|
|
8840
9123
|
});
|
|
8841
9124
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
8842
9125
|
enumerable: true,
|
|
8843
|
-
get: function () { return
|
|
9126
|
+
get: function () { return chunkYIFUMQGA_cjs.useConversationThreads; }
|
|
8844
9127
|
});
|
|
8845
9128
|
Object.defineProperty(exports, "useConversations", {
|
|
8846
9129
|
enumerable: true,
|
|
8847
|
-
get: function () { return
|
|
9130
|
+
get: function () { return chunkYIFUMQGA_cjs.useConversations; }
|
|
8848
9131
|
});
|
|
8849
9132
|
Object.defineProperty(exports, "useCreateTag", {
|
|
8850
9133
|
enumerable: true,
|
|
8851
|
-
get: function () { return
|
|
9134
|
+
get: function () { return chunkYIFUMQGA_cjs.useCreateTag; }
|
|
8852
9135
|
});
|
|
8853
9136
|
Object.defineProperty(exports, "useCurrentUser", {
|
|
8854
9137
|
enumerable: true,
|
|
8855
|
-
get: function () { return
|
|
9138
|
+
get: function () { return chunkYIFUMQGA_cjs.useCurrentUser; }
|
|
8856
9139
|
});
|
|
8857
9140
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
8858
9141
|
enumerable: true,
|
|
8859
|
-
get: function () { return
|
|
9142
|
+
get: function () { return chunkYIFUMQGA_cjs.useDeleteAgents; }
|
|
8860
9143
|
});
|
|
8861
9144
|
Object.defineProperty(exports, "useDeleteTag", {
|
|
8862
9145
|
enumerable: true,
|
|
8863
|
-
get: function () { return
|
|
9146
|
+
get: function () { return chunkYIFUMQGA_cjs.useDeleteTag; }
|
|
8864
9147
|
});
|
|
8865
9148
|
Object.defineProperty(exports, "useDocument", {
|
|
8866
9149
|
enumerable: true,
|
|
8867
|
-
get: function () { return
|
|
9150
|
+
get: function () { return chunkYIFUMQGA_cjs.useDocument; }
|
|
8868
9151
|
});
|
|
8869
9152
|
Object.defineProperty(exports, "useDocumentVersionList", {
|
|
8870
9153
|
enumerable: true,
|
|
8871
|
-
get: function () { return
|
|
9154
|
+
get: function () { return chunkYIFUMQGA_cjs.useDocumentVersionList; }
|
|
8872
9155
|
});
|
|
8873
9156
|
Object.defineProperty(exports, "useDocuments", {
|
|
8874
9157
|
enumerable: true,
|
|
8875
|
-
get: function () { return
|
|
9158
|
+
get: function () { return chunkYIFUMQGA_cjs.useDocuments; }
|
|
8876
9159
|
});
|
|
8877
9160
|
Object.defineProperty(exports, "useDocumentsById", {
|
|
8878
9161
|
enumerable: true,
|
|
8879
|
-
get: function () { return
|
|
9162
|
+
get: function () { return chunkYIFUMQGA_cjs.useDocumentsById; }
|
|
8880
9163
|
});
|
|
8881
9164
|
Object.defineProperty(exports, "useDocumentsLoading", {
|
|
8882
9165
|
enumerable: true,
|
|
8883
|
-
get: function () { return
|
|
9166
|
+
get: function () { return chunkYIFUMQGA_cjs.useDocumentsLoading; }
|
|
8884
9167
|
});
|
|
8885
9168
|
Object.defineProperty(exports, "useExtractEntities", {
|
|
8886
9169
|
enumerable: true,
|
|
8887
|
-
get: function () { return
|
|
9170
|
+
get: function () { return chunkYIFUMQGA_cjs.useExtractEntities; }
|
|
8888
9171
|
});
|
|
8889
9172
|
Object.defineProperty(exports, "useFirmPool", {
|
|
8890
9173
|
enumerable: true,
|
|
8891
|
-
get: function () { return
|
|
9174
|
+
get: function () { return chunkYIFUMQGA_cjs.useFirmPool; }
|
|
8892
9175
|
});
|
|
8893
9176
|
Object.defineProperty(exports, "useHealth", {
|
|
8894
9177
|
enumerable: true,
|
|
8895
|
-
get: function () { return
|
|
9178
|
+
get: function () { return chunkYIFUMQGA_cjs.useHealth; }
|
|
8896
9179
|
});
|
|
8897
9180
|
Object.defineProperty(exports, "useInvalidateTagData", {
|
|
8898
9181
|
enumerable: true,
|
|
8899
|
-
get: function () { return
|
|
9182
|
+
get: function () { return chunkYIFUMQGA_cjs.useInvalidateTagData; }
|
|
8900
9183
|
});
|
|
8901
9184
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
8902
9185
|
enumerable: true,
|
|
8903
|
-
get: function () { return
|
|
9186
|
+
get: function () { return chunkYIFUMQGA_cjs.useParsedDocument; }
|
|
8904
9187
|
});
|
|
8905
9188
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
8906
9189
|
enumerable: true,
|
|
8907
|
-
get: function () { return
|
|
9190
|
+
get: function () { return chunkYIFUMQGA_cjs.useProjectInvoices; }
|
|
8908
9191
|
});
|
|
8909
9192
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
8910
9193
|
enumerable: true,
|
|
8911
|
-
get: function () { return
|
|
9194
|
+
get: function () { return chunkYIFUMQGA_cjs.useProjectUsage; }
|
|
8912
9195
|
});
|
|
8913
9196
|
Object.defineProperty(exports, "useProjects", {
|
|
8914
9197
|
enumerable: true,
|
|
8915
|
-
get: function () { return
|
|
9198
|
+
get: function () { return chunkYIFUMQGA_cjs.useProjects; }
|
|
8916
9199
|
});
|
|
8917
9200
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
8918
9201
|
enumerable: true,
|
|
8919
|
-
get: function () { return
|
|
9202
|
+
get: function () { return chunkYIFUMQGA_cjs.useProjectsUsage; }
|
|
8920
9203
|
});
|
|
8921
9204
|
Object.defineProperty(exports, "useSetTagValues", {
|
|
8922
9205
|
enumerable: true,
|
|
8923
|
-
get: function () { return
|
|
9206
|
+
get: function () { return chunkYIFUMQGA_cjs.useSetTagValues; }
|
|
8924
9207
|
});
|
|
8925
9208
|
Object.defineProperty(exports, "useSimilarDocuments", {
|
|
8926
9209
|
enumerable: true,
|
|
8927
|
-
get: function () { return
|
|
9210
|
+
get: function () { return chunkYIFUMQGA_cjs.useSimilarDocuments; }
|
|
8928
9211
|
});
|
|
8929
9212
|
Object.defineProperty(exports, "useTagKindSchema", {
|
|
8930
9213
|
enumerable: true,
|
|
8931
|
-
get: function () { return
|
|
9214
|
+
get: function () { return chunkYIFUMQGA_cjs.useTagKindSchema; }
|
|
8932
9215
|
});
|
|
8933
9216
|
Object.defineProperty(exports, "useTags", {
|
|
8934
9217
|
enumerable: true,
|
|
8935
|
-
get: function () { return
|
|
9218
|
+
get: function () { return chunkYIFUMQGA_cjs.useTags; }
|
|
8936
9219
|
});
|
|
8937
9220
|
Object.defineProperty(exports, "useThumbnails", {
|
|
8938
9221
|
enumerable: true,
|
|
8939
|
-
get: function () { return
|
|
9222
|
+
get: function () { return chunkYIFUMQGA_cjs.useThumbnails; }
|
|
8940
9223
|
});
|
|
8941
9224
|
Object.defineProperty(exports, "useTopUpFirmPool", {
|
|
8942
9225
|
enumerable: true,
|
|
8943
|
-
get: function () { return
|
|
9226
|
+
get: function () { return chunkYIFUMQGA_cjs.useTopUpFirmPool; }
|
|
8944
9227
|
});
|
|
8945
9228
|
Object.defineProperty(exports, "useUpdateTag", {
|
|
8946
9229
|
enumerable: true,
|
|
8947
|
-
get: function () { return
|
|
9230
|
+
get: function () { return chunkYIFUMQGA_cjs.useUpdateTag; }
|
|
8948
9231
|
});
|
|
8949
9232
|
Object.defineProperty(exports, "useUpdateTagKindSchema", {
|
|
8950
9233
|
enumerable: true,
|
|
8951
|
-
get: function () { return
|
|
9234
|
+
get: function () { return chunkYIFUMQGA_cjs.useUpdateTagKindSchema; }
|
|
8952
9235
|
});
|
|
8953
9236
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
8954
9237
|
enumerable: true,
|
|
8955
|
-
get: function () { return
|
|
9238
|
+
get: function () { return chunkYIFUMQGA_cjs.useUserUsageToday; }
|
|
8956
9239
|
});
|
|
8957
9240
|
Object.defineProperty(exports, "useWorkspaceActivity", {
|
|
8958
9241
|
enumerable: true,
|
|
8959
|
-
get: function () { return
|
|
9242
|
+
get: function () { return chunkYIFUMQGA_cjs.useWorkspaceActivity; }
|
|
8960
9243
|
});
|
|
8961
9244
|
Object.defineProperty(exports, "useWorkspaceUsers", {
|
|
8962
9245
|
enumerable: true,
|
|
8963
|
-
get: function () { return
|
|
9246
|
+
get: function () { return chunkYIFUMQGA_cjs.useWorkspaceUsers; }
|
|
8964
9247
|
});
|
|
8965
9248
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
8966
9249
|
enumerable: true,
|
|
8967
|
-
get: function () { return
|
|
9250
|
+
get: function () { return chunkYIFUMQGA_cjs.useWorkspaces; }
|
|
8968
9251
|
});
|
|
8969
9252
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
8970
9253
|
enumerable: true,
|
|
@@ -9814,10 +10097,34 @@ Object.defineProperty(exports, "DEFAULT_AI_USD_PER_GBP", {
|
|
|
9814
10097
|
enumerable: true,
|
|
9815
10098
|
get: function () { return browser.DEFAULT_AI_USD_PER_GBP; }
|
|
9816
10099
|
});
|
|
10100
|
+
Object.defineProperty(exports, "DRIVE_SYNC_VENDORS", {
|
|
10101
|
+
enumerable: true,
|
|
10102
|
+
get: function () { return browser.DRIVE_SYNC_VENDORS; }
|
|
10103
|
+
});
|
|
10104
|
+
Object.defineProperty(exports, "GOOGLE_VENDORS", {
|
|
10105
|
+
enumerable: true,
|
|
10106
|
+
get: function () { return browser.GOOGLE_VENDORS; }
|
|
10107
|
+
});
|
|
10108
|
+
Object.defineProperty(exports, "IMANAGE_VENDORS", {
|
|
10109
|
+
enumerable: true,
|
|
10110
|
+
get: function () { return browser.IMANAGE_VENDORS; }
|
|
10111
|
+
});
|
|
10112
|
+
Object.defineProperty(exports, "MAILBOX_SYNC_VENDORS", {
|
|
10113
|
+
enumerable: true,
|
|
10114
|
+
get: function () { return browser.MAILBOX_SYNC_VENDORS; }
|
|
10115
|
+
});
|
|
10116
|
+
Object.defineProperty(exports, "MICROSOFT_VENDORS", {
|
|
10117
|
+
enumerable: true,
|
|
10118
|
+
get: function () { return browser.MICROSOFT_VENDORS; }
|
|
10119
|
+
});
|
|
9817
10120
|
Object.defineProperty(exports, "PublicBookingError", {
|
|
9818
10121
|
enumerable: true,
|
|
9819
10122
|
get: function () { return browser.PublicBookingError; }
|
|
9820
10123
|
});
|
|
10124
|
+
Object.defineProperty(exports, "SHAREPOINT_VENDORS", {
|
|
10125
|
+
enumerable: true,
|
|
10126
|
+
get: function () { return browser.SHAREPOINT_VENDORS; }
|
|
10127
|
+
});
|
|
9821
10128
|
Object.defineProperty(exports, "bookPublicSlot", {
|
|
9822
10129
|
enumerable: true,
|
|
9823
10130
|
get: function () { return browser.bookPublicSlot; }
|
|
@@ -9826,6 +10133,10 @@ Object.defineProperty(exports, "cancelPublicBooking", {
|
|
|
9826
10133
|
enumerable: true,
|
|
9827
10134
|
get: function () { return browser.cancelPublicBooking; }
|
|
9828
10135
|
});
|
|
10136
|
+
Object.defineProperty(exports, "connectErrorMessage", {
|
|
10137
|
+
enumerable: true,
|
|
10138
|
+
get: function () { return browser.connectErrorMessage; }
|
|
10139
|
+
});
|
|
9829
10140
|
Object.defineProperty(exports, "formatGbp", {
|
|
9830
10141
|
enumerable: true,
|
|
9831
10142
|
get: function () { return browser.formatGbp; }
|
|
@@ -9838,6 +10149,22 @@ Object.defineProperty(exports, "getPublicBookingPage", {
|
|
|
9838
10149
|
enumerable: true,
|
|
9839
10150
|
get: function () { return browser.getPublicBookingPage; }
|
|
9840
10151
|
});
|
|
10152
|
+
Object.defineProperty(exports, "isConnectorVendorVisible", {
|
|
10153
|
+
enumerable: true,
|
|
10154
|
+
get: function () { return browser.isConnectorVendorVisible; }
|
|
10155
|
+
});
|
|
10156
|
+
Object.defineProperty(exports, "isDriveSyncVendor", {
|
|
10157
|
+
enumerable: true,
|
|
10158
|
+
get: function () { return browser.isDriveSyncVendor; }
|
|
10159
|
+
});
|
|
10160
|
+
Object.defineProperty(exports, "isMailboxSyncVendor", {
|
|
10161
|
+
enumerable: true,
|
|
10162
|
+
get: function () { return browser.isMailboxSyncVendor; }
|
|
10163
|
+
});
|
|
10164
|
+
Object.defineProperty(exports, "isSharePointVendor", {
|
|
10165
|
+
enumerable: true,
|
|
10166
|
+
get: function () { return browser.isSharePointVendor; }
|
|
10167
|
+
});
|
|
9841
10168
|
Object.defineProperty(exports, "splitAppPasswords", {
|
|
9842
10169
|
enumerable: true,
|
|
9843
10170
|
get: function () { return browser.splitAppPasswords; }
|
|
@@ -9923,6 +10250,9 @@ exports.calendarQueryKeys = calendarQueryKeys;
|
|
|
9923
10250
|
exports.callNotificationMeta = callNotificationMeta;
|
|
9924
10251
|
exports.captureFrameAsBlob = captureFrameAsBlob;
|
|
9925
10252
|
exports.connectOAuthCalendarAccount = connectOAuthCalendarAccount;
|
|
10253
|
+
exports.connectorErrorStatus = connectorErrorStatus;
|
|
10254
|
+
exports.connectorQueryKeys = connectorQueryKeys;
|
|
10255
|
+
exports.connectorReturnTo = connectorReturnTo;
|
|
9926
10256
|
exports.createArbiSessionStore = createArbiSessionStore;
|
|
9927
10257
|
exports.createMailClient = createMailClient;
|
|
9928
10258
|
exports.cropImage = cropImage;
|
|
@@ -9987,6 +10317,7 @@ exports.toShellWorkspace = toShellWorkspace;
|
|
|
9987
10317
|
exports.useAccountClient = useAccountClient;
|
|
9988
10318
|
exports.useActOnStep = useActOnStep;
|
|
9989
10319
|
exports.useAddHolidayCalendar = useAddHolidayCalendar;
|
|
10320
|
+
exports.useAddWorkspaceMembers = useAddWorkspaceMembers;
|
|
9990
10321
|
exports.useAgentChats = useAgentChats;
|
|
9991
10322
|
exports.useAgentConfig = useAgentConfig;
|
|
9992
10323
|
exports.useAgentModels = useAgentModels;
|
|
@@ -10024,6 +10355,8 @@ exports.useCalendarShares = useCalendarShares;
|
|
|
10024
10355
|
exports.useCalendarSupport = useCalendarSupport;
|
|
10025
10356
|
exports.useCalendars = useCalendars;
|
|
10026
10357
|
exports.useCameraStream = useCameraStream;
|
|
10358
|
+
exports.useCancelDriveSync = useCancelDriveSync;
|
|
10359
|
+
exports.useCancelMailboxSync = useCancelMailboxSync;
|
|
10027
10360
|
exports.useClaimNativeAlias = useClaimNativeAlias;
|
|
10028
10361
|
exports.useCloseAgentSession = useCloseAgentSession;
|
|
10029
10362
|
exports.useCommandPalette = useCommandPalette;
|
|
@@ -10031,6 +10364,9 @@ exports.useConfirmEmailChange = useConfirmEmailChange;
|
|
|
10031
10364
|
exports.useConnectCalDavAccount = useConnectCalDavAccount;
|
|
10032
10365
|
exports.useConnectMailAccount = useConnectMailAccount;
|
|
10033
10366
|
exports.useConnectOAuthAccount = useConnectOAuthAccount;
|
|
10367
|
+
exports.useConnectorAutoSync = useConnectorAutoSync;
|
|
10368
|
+
exports.useConnectorCatalog = useConnectorCatalog;
|
|
10369
|
+
exports.useConnectorVendorVisibility = useConnectorVendorVisibility;
|
|
10034
10370
|
exports.useContacts = useContacts;
|
|
10035
10371
|
exports.useConversationActivity = useConversationActivity;
|
|
10036
10372
|
exports.useConversationPendingAuth = useConversationPendingAuth;
|
|
@@ -10061,9 +10397,18 @@ exports.useDeleteSkill = useDeleteSkill;
|
|
|
10061
10397
|
exports.useDeleteWorkflow = useDeleteWorkflow;
|
|
10062
10398
|
exports.useDirectMessages = useDirectMessages;
|
|
10063
10399
|
exports.useDisconnectCalendarAccount = useDisconnectCalendarAccount;
|
|
10400
|
+
exports.useDisconnectConnector = useDisconnectConnector;
|
|
10064
10401
|
exports.useDisconnectMailAccount = useDisconnectMailAccount;
|
|
10402
|
+
exports.useDisconnectSlack = useDisconnectSlack;
|
|
10065
10403
|
exports.useDocumentsSupport = useDocumentsSupport;
|
|
10404
|
+
exports.useDriveFolderChildren = useDriveFolderChildren;
|
|
10405
|
+
exports.useDriveFolderDocCount = useDriveFolderDocCount;
|
|
10406
|
+
exports.useDriveFolders = useDriveFolders;
|
|
10407
|
+
exports.useDriveSyncEstimate = useDriveSyncEstimate;
|
|
10408
|
+
exports.useDriveSyncProgress = useDriveSyncProgress;
|
|
10066
10409
|
exports.useEmailChange = useEmailChange;
|
|
10410
|
+
exports.useEnableDriveSync = useEnableDriveSync;
|
|
10411
|
+
exports.useEnableMailboxSync = useEnableMailboxSync;
|
|
10067
10412
|
exports.useFacts = useFacts;
|
|
10068
10413
|
exports.useFetchCalendarEvent = useFetchCalendarEvent;
|
|
10069
10414
|
exports.useFilteredProjects = useFilteredProjects;
|
|
@@ -10094,9 +10439,12 @@ exports.useMailOnline = useMailOnline;
|
|
|
10094
10439
|
exports.useMailPolicy = useMailPolicy;
|
|
10095
10440
|
exports.useMailProjects = useMailProjects;
|
|
10096
10441
|
exports.useMailUnlock = useMailUnlock;
|
|
10442
|
+
exports.useMailboxFolders = useMailboxFolders;
|
|
10443
|
+
exports.useMailboxSyncProgress = useMailboxSyncProgress;
|
|
10097
10444
|
exports.useMarkNotificationsRead = useMarkNotificationsRead;
|
|
10098
10445
|
exports.useMcpTools = useMcpTools;
|
|
10099
10446
|
exports.useMoveEvent = useMoveEvent;
|
|
10447
|
+
exports.useMyConnectors = useMyConnectors;
|
|
10100
10448
|
exports.useNameEditor = useNameEditor;
|
|
10101
10449
|
exports.useNotificationPreferences = useNotificationPreferences;
|
|
10102
10450
|
exports.useNotifications = useNotifications;
|
|
@@ -10109,7 +10457,9 @@ exports.useProjectConversationUsage = useProjectConversationUsage;
|
|
|
10109
10457
|
exports.useProjectEvents = useProjectEvents;
|
|
10110
10458
|
exports.usePublishCalendar = usePublishCalendar;
|
|
10111
10459
|
exports.useRefreshCalendar = useRefreshCalendar;
|
|
10460
|
+
exports.useRefreshConnectorsOnRunEnd = useRefreshConnectorsOnRunEnd;
|
|
10112
10461
|
exports.useRemoveDocTags = useRemoveDocTags;
|
|
10462
|
+
exports.useRemoveWorkspaceMembers = useRemoveWorkspaceMembers;
|
|
10113
10463
|
exports.useRequestEmailChange = useRequestEmailChange;
|
|
10114
10464
|
exports.useRespondToEvent = useRespondToEvent;
|
|
10115
10465
|
exports.useResumeCalendarAccountConnect = useResumeCalendarAccountConnect;
|
|
@@ -10135,6 +10485,7 @@ exports.useShellWorkspaces = useShellWorkspaces;
|
|
|
10135
10485
|
exports.useSignOut = useSignOut;
|
|
10136
10486
|
exports.useSkillSource = useSkillSource;
|
|
10137
10487
|
exports.useSkills = useSkills;
|
|
10488
|
+
exports.useSlackConnection = useSlackConnection;
|
|
10138
10489
|
exports.useStartAgentSession = useStartAgentSession;
|
|
10139
10490
|
exports.useStartCalendarAccountOAuth = useStartCalendarAccountOAuth;
|
|
10140
10491
|
exports.useStartWorkQuery = useStartWorkQuery;
|
|
@@ -10142,6 +10493,8 @@ exports.useSubscribeCalendar = useSubscribeCalendar;
|
|
|
10142
10493
|
exports.useSyncAccountsOnOpen = useSyncAccountsOnOpen;
|
|
10143
10494
|
exports.useSyncCalendarAccount = useSyncCalendarAccount;
|
|
10144
10495
|
exports.useTerminateSession = useTerminateSession;
|
|
10496
|
+
exports.useTriggerDriveSync = useTriggerDriveSync;
|
|
10497
|
+
exports.useTriggerMailboxSync = useTriggerMailboxSync;
|
|
10145
10498
|
exports.useUnshareCalendar = useUnshareCalendar;
|
|
10146
10499
|
exports.useUpdateCalendar = useUpdateCalendar;
|
|
10147
10500
|
exports.useUpdateCalendarAccount = useUpdateCalendarAccount;
|
|
@@ -10156,6 +10509,7 @@ exports.useUpdateProfile = useUpdateProfile;
|
|
|
10156
10509
|
exports.useUpdateProjectFields = useUpdateProjectFields;
|
|
10157
10510
|
exports.useUpdateUserSettings = useUpdateUserSettings;
|
|
10158
10511
|
exports.useUpdateWorkflow = useUpdateWorkflow;
|
|
10512
|
+
exports.useUpdateWorkspace = useUpdateWorkspace;
|
|
10159
10513
|
exports.useUploadDocuments = useUploadDocuments;
|
|
10160
10514
|
exports.useUploadSkillFiles = useUploadSkillFiles;
|
|
10161
10515
|
exports.useUploadUrls = useUploadUrls;
|