@arbidocs/react 0.4.138 → 0.4.139
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 +8 -8
- package/dist/artifacts/index.js +3 -3
- package/dist/{chunk-KMMBMYJQ.js → chunk-2NDXBQAT.js} +7 -3
- package/dist/chunk-2NDXBQAT.js.map +1 -0
- package/dist/{chunk-Q2QUWZYX.cjs → chunk-QXGGFMMX.cjs} +7 -3
- package/dist/chunk-QXGGFMMX.cjs.map +1 -0
- package/dist/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/index.cjs +1436 -270
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1223 -4
- package/dist/index.d.ts +1223 -4
- package/dist/index.js +1076 -16
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-KMMBMYJQ.js.map +0 -1
- package/dist/chunk-Q2QUWZYX.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunk65WT5PHA_cjs = require('./chunk-65WT5PHA.cjs');
|
|
5
|
-
var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
|
|
3
|
+
var chunkQXGGFMMX_cjs = require('./chunk-QXGGFMMX.cjs');
|
|
6
4
|
var chunkTYUQFRHF_cjs = require('./chunk-TYUQFRHF.cjs');
|
|
7
5
|
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
8
6
|
require('./chunk-VOFNX4P6.cjs');
|
|
7
|
+
var chunkKLPY2HUC_cjs = require('./chunk-KLPY2HUC.cjs');
|
|
8
|
+
var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
|
|
9
|
+
var chunkR2MF7YCW_cjs = require('./chunk-R2MF7YCW.cjs');
|
|
10
|
+
var chunk65WT5PHA_cjs = require('./chunk-65WT5PHA.cjs');
|
|
11
|
+
var chunkOC7F5SNA_cjs = require('./chunk-OC7F5SNA.cjs');
|
|
9
12
|
var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
|
|
10
13
|
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
11
|
-
var chunkKLPY2HUC_cjs = require('./chunk-KLPY2HUC.cjs');
|
|
12
14
|
var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
|
|
13
15
|
var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
|
|
14
16
|
var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
|
|
15
|
-
var chunkTMPDW7J5_cjs = require('./chunk-TMPDW7J5.cjs');
|
|
16
|
-
var chunkR2MF7YCW_cjs = require('./chunk-R2MF7YCW.cjs');
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var reactQuery = require('@tanstack/react-query');
|
|
19
19
|
var browser = require('@arbidocs/sdk/browser');
|
|
@@ -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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: [...chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_cjs.arbiQueryKeys.workflows() }),
|
|
169
|
+
qc.invalidateQueries({ queryKey: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_cjs.arbiQueryKeys.configs() }),
|
|
240
|
+
qc.invalidateQueries({ queryKey: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: [...chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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: chunkQXGGFMMX_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
|
+
chunkQXGGFMMX_cjs.arbiQueryKeys.agentSession(agentId),
|
|
408
|
+
chunkQXGGFMMX_cjs.arbiQueryKeys.agentWorkspaces(agentId),
|
|
409
|
+
chunkQXGGFMMX_cjs.arbiQueryKeys.agentChats(agentId),
|
|
410
|
+
chunkQXGGFMMX_cjs.arbiQueryKeys.sessions()
|
|
411
411
|
].map((queryKey) => qc.invalidateQueries({ queryKey }))
|
|
412
412
|
);
|
|
413
413
|
}
|
|
@@ -554,8 +554,8 @@ function useArbiChat(options = {}) {
|
|
|
554
554
|
const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
|
|
555
555
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
556
556
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
557
|
-
const { data: docs = [], isLoading: isLoadingDocuments, refetch } =
|
|
558
|
-
const ordinaryHistory =
|
|
557
|
+
const { data: docs = [], isLoading: isLoadingDocuments, refetch } = chunkQXGGFMMX_cjs.useDocuments(workspaceId);
|
|
558
|
+
const ordinaryHistory = chunkQXGGFMMX_cjs.useConversations(workspaceId, { enabled: !agentId, live: true });
|
|
559
559
|
const agentHistory = useAgentChats(agentId);
|
|
560
560
|
const stored = React.useMemo(
|
|
561
561
|
() => agentId ? (agentHistory.data ?? []).filter((chat) => chat.workspace_ext_id === workspaceId).map((chat) => ({
|
|
@@ -570,7 +570,7 @@ function useArbiChat(options = {}) {
|
|
|
570
570
|
);
|
|
571
571
|
const isLoadingThreads = agentId ? agentHistory.isLoading : ordinaryHistory.isLoading;
|
|
572
572
|
const refetchConversations = agentId ? agentHistory.refetch : ordinaryHistory.refetch;
|
|
573
|
-
const query =
|
|
573
|
+
const query = chunkQXGGFMMX_cjs.useAssistantQuery();
|
|
574
574
|
const { mutateAsync } = query;
|
|
575
575
|
const [stagedFiles, setStagedFiles] = React.useState([]);
|
|
576
576
|
const [threads, setThreads] = React.useState(() => [emptyThread()]);
|
|
@@ -630,7 +630,7 @@ function useArbiChat(options = {}) {
|
|
|
630
630
|
(conversation) => conversation.external_id === active.conversationId && conversation.status === "generating"
|
|
631
631
|
) || active.messages.some((message) => message.status === "streaming");
|
|
632
632
|
const needsLoad = !!active.conversationId && !active.isLoaded;
|
|
633
|
-
const loaded =
|
|
633
|
+
const loaded = chunkQXGGFMMX_cjs.useConversationThreads(workspaceId, active.conversationId ?? void 0, {
|
|
634
634
|
enabled: needsLoad || liveHistory && !isRunning && !isPostingComment,
|
|
635
635
|
live: liveHistory
|
|
636
636
|
});
|
|
@@ -1411,14 +1411,14 @@ function useArbiDocumentSync(workspaceId) {
|
|
|
1411
1411
|
if (!workspaceId) return;
|
|
1412
1412
|
if (client.isMessageType(msg, "batch_complete")) {
|
|
1413
1413
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1414
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1415
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1414
|
+
void queryClient.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1415
|
+
void queryClient.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.tags(workspaceId) });
|
|
1416
1416
|
return;
|
|
1417
1417
|
}
|
|
1418
1418
|
if (client.isMessageType(msg, "task_update")) {
|
|
1419
1419
|
if (msg.workspace_ext_id !== workspaceId) return;
|
|
1420
1420
|
if (TERMINAL_STATUSES.has(msg.status)) {
|
|
1421
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1421
|
+
void queryClient.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
1424
|
});
|
|
@@ -1547,7 +1547,7 @@ function useShellWorkspaces(options) {
|
|
|
1547
1547
|
}
|
|
1548
1548
|
function useArbiShellWorkspaces(options = {}) {
|
|
1549
1549
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1550
|
-
const query =
|
|
1550
|
+
const query = chunkQXGGFMMX_cjs.useWorkspaces();
|
|
1551
1551
|
const { select, ...rest } = options;
|
|
1552
1552
|
const defaultSelect = React.useCallback(
|
|
1553
1553
|
(workspace) => arbi.selectWorkspace(workspace.id),
|
|
@@ -1566,7 +1566,7 @@ function useFacts(workspaceId, options) {
|
|
|
1566
1566
|
const { enabled = true, ...filter } = options ?? {};
|
|
1567
1567
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
1568
1568
|
return reactQuery.useQuery({
|
|
1569
|
-
queryKey: [...
|
|
1569
|
+
queryKey: [...chunkQXGGFMMX_cjs.arbiQueryKeys.facts(workspace), filter],
|
|
1570
1570
|
queryFn: () => arbi.facts.list(filter),
|
|
1571
1571
|
enabled: enabled && !!workspace && arbi.hasWorkspace,
|
|
1572
1572
|
staleTime: 3e4
|
|
@@ -1574,7 +1574,7 @@ function useFacts(workspaceId, options) {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
function useRefreshFacts() {
|
|
1576
1576
|
const qc = reactQuery.useQueryClient();
|
|
1577
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1577
|
+
return () => qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.allFacts() });
|
|
1578
1578
|
}
|
|
1579
1579
|
function useCreateFact() {
|
|
1580
1580
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
@@ -1619,8 +1619,8 @@ function openWorkspaceId(arbi) {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
function invalidateTagData(qc, workspaceId) {
|
|
1621
1621
|
return Promise.all([
|
|
1622
|
-
qc.invalidateQueries({ queryKey:
|
|
1623
|
-
qc.invalidateQueries({ queryKey:
|
|
1622
|
+
qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.tags(workspaceId) }),
|
|
1623
|
+
qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.facts(workspaceId) })
|
|
1624
1624
|
]);
|
|
1625
1625
|
}
|
|
1626
1626
|
function useInvalidateTagData() {
|
|
@@ -1635,7 +1635,7 @@ function useTagKindSchema(kind, options) {
|
|
|
1635
1635
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1636
1636
|
const workspaceId = openWorkspaceId(arbi) ?? "";
|
|
1637
1637
|
return reactQuery.useQuery({
|
|
1638
|
-
queryKey:
|
|
1638
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.tagKind(workspaceId, kind ?? ""),
|
|
1639
1639
|
queryFn: () => arbi.tagKinds.get(kind),
|
|
1640
1640
|
enabled: (options?.enabled ?? true) && !!kind && !!workspaceId
|
|
1641
1641
|
});
|
|
@@ -1644,7 +1644,7 @@ function useUpdateTagKindSchema() {
|
|
|
1644
1644
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1645
1645
|
const qc = reactQuery.useQueryClient();
|
|
1646
1646
|
return reactQuery.useMutation({
|
|
1647
|
-
mutationKey:
|
|
1647
|
+
mutationKey: chunkQXGGFMMX_cjs.arbiMutationKeys.updateTagKindSchema(),
|
|
1648
1648
|
mutationFn: ({
|
|
1649
1649
|
kind,
|
|
1650
1650
|
fields
|
|
@@ -1652,7 +1652,7 @@ function useUpdateTagKindSchema() {
|
|
|
1652
1652
|
onSuccess: (schema) => {
|
|
1653
1653
|
const workspaceId = openWorkspaceId(arbi);
|
|
1654
1654
|
if (!workspaceId) return;
|
|
1655
|
-
qc.setQueryData(
|
|
1655
|
+
qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.tagKind(workspaceId, schema.kind), schema);
|
|
1656
1656
|
return invalidateTagData(qc, workspaceId);
|
|
1657
1657
|
}
|
|
1658
1658
|
});
|
|
@@ -1671,7 +1671,7 @@ function useSetTagValues() {
|
|
|
1671
1671
|
function useFilteredProjects(filters, options) {
|
|
1672
1672
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1673
1673
|
return reactQuery.useQuery({
|
|
1674
|
-
queryKey:
|
|
1674
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.projectsFiltered(filters.stage, filters.leadUser),
|
|
1675
1675
|
queryFn: () => arbi.projects.list(filters),
|
|
1676
1676
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1677
1677
|
});
|
|
@@ -1684,14 +1684,14 @@ function useUpdateProjectFields() {
|
|
|
1684
1684
|
projectExtId,
|
|
1685
1685
|
patch
|
|
1686
1686
|
}) => arbi.projects.update(projectExtId, patch),
|
|
1687
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
1687
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.projects() })
|
|
1688
1688
|
});
|
|
1689
1689
|
}
|
|
1690
1690
|
function useProjectEvents(projectExtId, options) {
|
|
1691
1691
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1692
1692
|
return reactQuery.useQuery({
|
|
1693
1693
|
queryKey: [
|
|
1694
|
-
...
|
|
1694
|
+
...chunkQXGGFMMX_cjs.arbiQueryKeys.projectEvents(projectExtId ?? ""),
|
|
1695
1695
|
options?.kind ?? "all",
|
|
1696
1696
|
options?.limit ?? "default"
|
|
1697
1697
|
],
|
|
@@ -1702,7 +1702,7 @@ function useProjectEvents(projectExtId, options) {
|
|
|
1702
1702
|
function useConversationUsage(conversationId, options) {
|
|
1703
1703
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1704
1704
|
return reactQuery.useQuery({
|
|
1705
|
-
queryKey:
|
|
1705
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.conversationUsage(conversationId ?? ""),
|
|
1706
1706
|
queryFn: () => arbi.conversations.usage(conversationId),
|
|
1707
1707
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.isLoggedIn,
|
|
1708
1708
|
refetchInterval: options?.live ? 1e4 : false
|
|
@@ -1711,7 +1711,7 @@ function useConversationUsage(conversationId, options) {
|
|
|
1711
1711
|
function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
1712
1712
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1713
1713
|
return reactQuery.useQuery({
|
|
1714
|
-
queryKey:
|
|
1714
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.projectConversationUsage(projectExtId ?? "", monthsBack),
|
|
1715
1715
|
queryFn: () => arbi.projects.usageByConversation(projectExtId, monthsBack),
|
|
1716
1716
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1717
1717
|
});
|
|
@@ -1719,7 +1719,7 @@ function useProjectConversationUsage(projectExtId, monthsBack = 0, options) {
|
|
|
1719
1719
|
function useContacts(options) {
|
|
1720
1720
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1721
1721
|
return reactQuery.useQuery({
|
|
1722
|
-
queryKey:
|
|
1722
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.contacts(),
|
|
1723
1723
|
queryFn: () => arbi.contacts.list(),
|
|
1724
1724
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1725
1725
|
});
|
|
@@ -1734,7 +1734,7 @@ function usePendingContacts(options) {
|
|
|
1734
1734
|
}
|
|
1735
1735
|
function useInvalidateContacts() {
|
|
1736
1736
|
const qc = reactQuery.useQueryClient();
|
|
1737
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1737
|
+
return () => qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.contacts() });
|
|
1738
1738
|
}
|
|
1739
1739
|
function useInviteContacts() {
|
|
1740
1740
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
@@ -1768,6 +1768,26 @@ function useDeleteContact() {
|
|
|
1768
1768
|
onSuccess: () => invalidate()
|
|
1769
1769
|
});
|
|
1770
1770
|
}
|
|
1771
|
+
function useSearchContacts(q, { debounceMs = 200 } = {}) {
|
|
1772
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
1773
|
+
const term = useDebounced(q.trim(), debounceMs);
|
|
1774
|
+
return reactQuery.useQuery({
|
|
1775
|
+
queryKey: [...chunkQXGGFMMX_cjs.arbiQueryKeys.contacts(), "search", term],
|
|
1776
|
+
queryFn: () => arbi.contacts.search(term),
|
|
1777
|
+
enabled: term.length > 0 && arbi.isLoggedIn,
|
|
1778
|
+
staleTime: 6e4,
|
|
1779
|
+
placeholderData: (previous) => previous,
|
|
1780
|
+
retry: false
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
function useDebounced(value, ms) {
|
|
1784
|
+
const [debounced, setDebounced] = React.useState(value);
|
|
1785
|
+
React.useEffect(() => {
|
|
1786
|
+
const t = setTimeout(() => setDebounced(value), ms);
|
|
1787
|
+
return () => clearTimeout(t);
|
|
1788
|
+
}, [value, ms]);
|
|
1789
|
+
return debounced;
|
|
1790
|
+
}
|
|
1771
1791
|
var AccountClientContext = React.createContext(null);
|
|
1772
1792
|
function arbiProfile(arbi) {
|
|
1773
1793
|
const profile = arbi.user.profile();
|
|
@@ -1863,11 +1883,11 @@ function useProfile(options) {
|
|
|
1863
1883
|
const { client, enabled } = useAccountClient();
|
|
1864
1884
|
const qc = reactQuery.useQueryClient();
|
|
1865
1885
|
React.useEffect(
|
|
1866
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
1886
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
1867
1887
|
[client, qc]
|
|
1868
1888
|
);
|
|
1869
1889
|
return reactQuery.useQuery({
|
|
1870
|
-
queryKey:
|
|
1890
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.profile(),
|
|
1871
1891
|
queryFn: () => client.profile(),
|
|
1872
1892
|
enabled: (options?.enabled ?? true) && enabled,
|
|
1873
1893
|
staleTime: Infinity
|
|
@@ -1882,9 +1902,9 @@ function useUpdateProfile() {
|
|
|
1882
1902
|
return client.profile();
|
|
1883
1903
|
},
|
|
1884
1904
|
onSuccess: (profile) => {
|
|
1885
|
-
qc.setQueryData(
|
|
1886
|
-
void qc.invalidateQueries({ queryKey:
|
|
1887
|
-
return qc.invalidateQueries({ queryKey:
|
|
1905
|
+
qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.profile(), profile);
|
|
1906
|
+
void qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.identity() });
|
|
1907
|
+
return qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.workspaces() });
|
|
1888
1908
|
}
|
|
1889
1909
|
});
|
|
1890
1910
|
}
|
|
@@ -1967,7 +1987,7 @@ function useConfirmEmailChange() {
|
|
|
1967
1987
|
const qc = reactQuery.useQueryClient();
|
|
1968
1988
|
return reactQuery.useMutation({
|
|
1969
1989
|
mutationFn: ({ newEmail, code }) => client.confirmEmailChange(newEmail, code),
|
|
1970
|
-
onSuccess: () => qc.setQueryData(
|
|
1990
|
+
onSuccess: () => qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.profile(), client.profile())
|
|
1971
1991
|
});
|
|
1972
1992
|
}
|
|
1973
1993
|
function useEmailChange({
|
|
@@ -2135,7 +2155,7 @@ function toNotificationPreferences(stored, keys) {
|
|
|
2135
2155
|
function useUserSettings(options) {
|
|
2136
2156
|
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
2137
2157
|
return reactQuery.useQuery({
|
|
2138
|
-
queryKey:
|
|
2158
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings(),
|
|
2139
2159
|
queryFn: () => arbi.settings.get(),
|
|
2140
2160
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
2141
2161
|
});
|
|
@@ -2148,18 +2168,18 @@ function useNotificationPreferences(keys, options) {
|
|
|
2148
2168
|
const save = reactQuery.useMutation({
|
|
2149
2169
|
mutationFn: (patch) => arbi.settings.update({ email_notifications: patch }),
|
|
2150
2170
|
onMutate: async (patch) => {
|
|
2151
|
-
await qc.cancelQueries({ queryKey:
|
|
2152
|
-
const previous = qc.getQueryData(
|
|
2171
|
+
await qc.cancelQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings() });
|
|
2172
|
+
const previous = qc.getQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings());
|
|
2153
2173
|
qc.setQueryData(
|
|
2154
|
-
|
|
2174
|
+
chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings(),
|
|
2155
2175
|
(old) => old ? { ...old, email_notifications: { ...old.email_notifications, ...patch } } : old
|
|
2156
2176
|
);
|
|
2157
2177
|
return { previous };
|
|
2158
2178
|
},
|
|
2159
2179
|
onError: (_err, _patch, context) => {
|
|
2160
|
-
qc.setQueryData(
|
|
2180
|
+
qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2161
2181
|
},
|
|
2162
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2182
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings() })
|
|
2163
2183
|
});
|
|
2164
2184
|
const model = React.useMemo(() => toNotificationPreferences(stored, keys), [stored, keys]);
|
|
2165
2185
|
const setAll = React.useCallback(
|
|
@@ -2186,18 +2206,18 @@ function useRelevanceSave() {
|
|
|
2186
2206
|
return reactQuery.useMutation({
|
|
2187
2207
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
2188
2208
|
onMutate: async (patch) => {
|
|
2189
|
-
await qc.cancelQueries({ queryKey:
|
|
2190
|
-
const previous = qc.getQueryData(
|
|
2209
|
+
await qc.cancelQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings() });
|
|
2210
|
+
const previous = qc.getQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings());
|
|
2191
2211
|
qc.setQueryData(
|
|
2192
|
-
|
|
2212
|
+
chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings(),
|
|
2193
2213
|
(old) => old ? { ...old, ...patch } : old
|
|
2194
2214
|
);
|
|
2195
2215
|
return { previous };
|
|
2196
2216
|
},
|
|
2197
2217
|
onError: (_err, _patch, context) => {
|
|
2198
|
-
qc.setQueryData(
|
|
2218
|
+
qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
2199
2219
|
},
|
|
2200
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
2220
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings() })
|
|
2201
2221
|
});
|
|
2202
2222
|
}
|
|
2203
2223
|
function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
@@ -2208,7 +2228,7 @@ function useWorkspaceNotificationLevel(workspaceId, options) {
|
|
|
2208
2228
|
const setLevel = React.useCallback(
|
|
2209
2229
|
(next) => {
|
|
2210
2230
|
if (!workspaceId) return;
|
|
2211
|
-
const current = qc.getQueryData(
|
|
2231
|
+
const current = qc.getQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2212
2232
|
save.mutate(browser.settings.workspaceLevelPatch(current, workspaceId, next));
|
|
2213
2233
|
},
|
|
2214
2234
|
[qc, save, settings.data, workspaceId]
|
|
@@ -2229,7 +2249,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2229
2249
|
const setFollowing = React.useCallback(
|
|
2230
2250
|
(on, callbacks) => {
|
|
2231
2251
|
if (!conversationId) return;
|
|
2232
|
-
const current = qc.getQueryData(
|
|
2252
|
+
const current = qc.getQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.userSettings()) ?? settings.data;
|
|
2233
2253
|
save.mutate(
|
|
2234
2254
|
{
|
|
2235
2255
|
followed_threads: browser.settings.withMembership(
|
|
@@ -2254,7 +2274,7 @@ function useFollowThread(conversationId, options) {
|
|
|
2254
2274
|
function useSessions(options) {
|
|
2255
2275
|
const { client, enabled } = useAccountClient();
|
|
2256
2276
|
return reactQuery.useQuery({
|
|
2257
|
-
queryKey:
|
|
2277
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.sessions(),
|
|
2258
2278
|
queryFn: () => client.listSessions(),
|
|
2259
2279
|
enabled: (options?.enabled ?? true) && enabled
|
|
2260
2280
|
});
|
|
@@ -2264,7 +2284,7 @@ function useTerminateSession() {
|
|
|
2264
2284
|
const qc = reactQuery.useQueryClient();
|
|
2265
2285
|
return reactQuery.useMutation({
|
|
2266
2286
|
mutationFn: (sessionId) => client.terminateSession(sessionId),
|
|
2267
|
-
onSuccess: () => qc.invalidateQueries({ queryKey:
|
|
2287
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.sessions() })
|
|
2268
2288
|
});
|
|
2269
2289
|
}
|
|
2270
2290
|
function useSignOut() {
|
|
@@ -2407,7 +2427,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2407
2427
|
const apiRef = React.useRef(api);
|
|
2408
2428
|
apiRef.current = api;
|
|
2409
2429
|
const query = reactQuery.useQuery({
|
|
2410
|
-
queryKey:
|
|
2430
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.identity(),
|
|
2411
2431
|
queryFn: () => apiRef.current.status(),
|
|
2412
2432
|
enabled,
|
|
2413
2433
|
staleTime: 6e4
|
|
@@ -2425,7 +2445,7 @@ function useIdentityVerificationFlow(api, {
|
|
|
2425
2445
|
const lastVerified = React.useRef(void 0);
|
|
2426
2446
|
const apply = React.useCallback(
|
|
2427
2447
|
(next) => {
|
|
2428
|
-
qc.setQueryData(
|
|
2448
|
+
qc.setQueryData(chunkQXGGFMMX_cjs.arbiQueryKeys.identity(), next);
|
|
2429
2449
|
if (lastVerified.current !== void 0 && lastVerified.current !== next.verified) {
|
|
2430
2450
|
onVerifiedChange?.(next.verified);
|
|
2431
2451
|
}
|
|
@@ -2620,12 +2640,12 @@ function useIdentityVerification(options = {}) {
|
|
|
2620
2640
|
enabled,
|
|
2621
2641
|
formatPrice,
|
|
2622
2642
|
onVerifiedChange: (verified) => {
|
|
2623
|
-
void qc.invalidateQueries({ queryKey:
|
|
2643
|
+
void qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.profile() });
|
|
2624
2644
|
onVerifiedChange?.(verified);
|
|
2625
2645
|
},
|
|
2626
2646
|
onNameAccepted: (name) => {
|
|
2627
|
-
void qc.invalidateQueries({ queryKey:
|
|
2628
|
-
void qc.invalidateQueries({ queryKey:
|
|
2647
|
+
void qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.profile() });
|
|
2648
|
+
void qc.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.workspaces() });
|
|
2629
2649
|
onNameAccepted?.(name);
|
|
2630
2650
|
}
|
|
2631
2651
|
});
|
|
@@ -2766,7 +2786,8 @@ var mailQueryKeys = {
|
|
|
2766
2786
|
folders: (accountId) => ["mail", "folders", accountId],
|
|
2767
2787
|
allMessages: () => ["mail", "messages"],
|
|
2768
2788
|
messages: (accountId, folderId, query, cursor) => ["mail", "messages", accountId, folderId, query, cursor],
|
|
2769
|
-
message: (accountId, messageId) => ["mail", "message", accountId, messageId]
|
|
2789
|
+
message: (accountId, messageId) => ["mail", "message", accountId, messageId],
|
|
2790
|
+
attachmentText: (accountId, messageId, attachmentId) => ["mail", "attachment-text", accountId, messageId, attachmentId]
|
|
2770
2791
|
};
|
|
2771
2792
|
function useMailOnline() {
|
|
2772
2793
|
return React.useSyncExternalStore(
|
|
@@ -2842,6 +2863,25 @@ function useMailMessage(account, messageId, options = {}) {
|
|
|
2842
2863
|
retry: false
|
|
2843
2864
|
});
|
|
2844
2865
|
}
|
|
2866
|
+
function decodeBase64Text(b64) {
|
|
2867
|
+
const bytes = Uint8Array.from(atob(b64), (c) => c.charCodeAt(0));
|
|
2868
|
+
return new TextDecoder().decode(bytes);
|
|
2869
|
+
}
|
|
2870
|
+
function useMailAttachmentText(accountId, messageId, attachment, options = {}) {
|
|
2871
|
+
const { client } = useMailClient();
|
|
2872
|
+
return reactQuery.useQuery({
|
|
2873
|
+
queryKey: mailQueryKeys.attachmentText(accountId, messageId, attachment?.id ?? ""),
|
|
2874
|
+
queryFn: async () => {
|
|
2875
|
+
const a = attachment;
|
|
2876
|
+
if (a.content_base64) return decodeBase64Text(a.content_base64);
|
|
2877
|
+
const path = `${accountPath(accountId)}/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(a.id)}`;
|
|
2878
|
+
return (await client.fetch(path)).text();
|
|
2879
|
+
},
|
|
2880
|
+
enabled: !!attachment && (options.enabled ?? true),
|
|
2881
|
+
staleTime: Infinity,
|
|
2882
|
+
retry: false
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2845
2885
|
function useClaimNativeAlias(onClaimed) {
|
|
2846
2886
|
const { client } = useMailClient();
|
|
2847
2887
|
const queryClient = reactQuery.useQueryClient();
|
|
@@ -3042,8 +3082,633 @@ function useMailDraftReplaced(draftId, onReplaced) {
|
|
|
3042
3082
|
return () => window.removeEventListener(MAIL_DRAFT_REPLACED_EVENT, listener);
|
|
3043
3083
|
}, [draftId]);
|
|
3044
3084
|
}
|
|
3085
|
+
|
|
3086
|
+
// src/calendar/keys.ts
|
|
3087
|
+
var calendarQueryKeys = {
|
|
3088
|
+
all: () => ["arbi", "calendar"],
|
|
3089
|
+
settings: () => ["arbi", "calendar", "settings"],
|
|
3090
|
+
calendars: () => ["arbi", "calendar", "calendars"],
|
|
3091
|
+
/** Every event list: the prefix an event write invalidates. */
|
|
3092
|
+
events: () => ["arbi", "calendar", "events"],
|
|
3093
|
+
eventList: (p) => [
|
|
3094
|
+
"arbi",
|
|
3095
|
+
"calendar",
|
|
3096
|
+
"events",
|
|
3097
|
+
{ start: p.start, end: p.end, calendars: p.calendars?.join(",") ?? null }
|
|
3098
|
+
],
|
|
3099
|
+
/** Every single event read. */
|
|
3100
|
+
eventDetails: () => ["arbi", "calendar", "event"],
|
|
3101
|
+
event: (id, recurrenceId) => ["arbi", "calendar", "event", id, recurrenceId ?? null],
|
|
3102
|
+
shares: (calId) => ["arbi", "calendar", "shares", calId],
|
|
3103
|
+
invitations: () => ["arbi", "calendar", "invitations"],
|
|
3104
|
+
holidayCountries: () => ["arbi", "calendar", "holiday-countries"],
|
|
3105
|
+
allRooms: () => ["arbi", "calendar", "rooms"],
|
|
3106
|
+
rooms: (q) => ["arbi", "calendar", "rooms", q],
|
|
3107
|
+
freebusy: (attendees, start, end) => ["arbi", "calendar", "freebusy", attendees.join(","), start, end],
|
|
3108
|
+
allLookups: () => ["arbi", "calendar", "lookup"],
|
|
3109
|
+
lookup: (uid) => ["arbi", "calendar", "lookup", uid],
|
|
3110
|
+
overlays: (workspaceId, w, layers) => [
|
|
3111
|
+
"arbi",
|
|
3112
|
+
"calendar",
|
|
3113
|
+
"overlays",
|
|
3114
|
+
workspaceId,
|
|
3115
|
+
w ? { start: w.start, end: w.end, layers: layers?.join(",") } : null
|
|
3116
|
+
],
|
|
3117
|
+
accounts: () => ["arbi", "calendar", "accounts"],
|
|
3118
|
+
caldavProfiles: () => ["arbi", "calendar", "caldav-profiles"],
|
|
3119
|
+
appPasswords: () => ["arbi", "calendar", "app-passwords"],
|
|
3120
|
+
bookingPages: () => ["arbi", "calendar", "booking-pages"],
|
|
3121
|
+
/** The offline outbox (writes made offline, not yet sent). */
|
|
3122
|
+
outbox: () => ["arbi", "calendar", "outbox"]
|
|
3123
|
+
};
|
|
3124
|
+
function isQueuedCalendarWrite(value) {
|
|
3125
|
+
return !!value && typeof value === "object" && value.queued === true;
|
|
3126
|
+
}
|
|
3127
|
+
var CalendarSupportContext = React.createContext({});
|
|
3128
|
+
function CalendarSupportProvider({
|
|
3129
|
+
value,
|
|
3130
|
+
children
|
|
3131
|
+
}) {
|
|
3132
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CalendarSupportContext.Provider, { value, children });
|
|
3133
|
+
}
|
|
3134
|
+
function useCalendarSupport() {
|
|
3135
|
+
return React.useContext(CalendarSupportContext);
|
|
3136
|
+
}
|
|
3137
|
+
function invalidateCalendarEvents(qc) {
|
|
3138
|
+
return Promise.all([
|
|
3139
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.events() }),
|
|
3140
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.eventDetails() }),
|
|
3141
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.invitations() }),
|
|
3142
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.allLookups() })
|
|
3143
|
+
]);
|
|
3144
|
+
}
|
|
3145
|
+
function invalidateCalendars(qc) {
|
|
3146
|
+
return Promise.all([
|
|
3147
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.calendars() }),
|
|
3148
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.events() })
|
|
3149
|
+
]);
|
|
3150
|
+
}
|
|
3151
|
+
function useOfflineRead() {
|
|
3152
|
+
const { offline } = useCalendarSupport();
|
|
3153
|
+
return {
|
|
3154
|
+
read: (key, fetch) => offline ? offline.read(key, fetch) : fetch(),
|
|
3155
|
+
// Offline-capable queries must run without the network to reach the saved copy.
|
|
3156
|
+
networkMode: offline ? "always" : void 0
|
|
3157
|
+
};
|
|
3158
|
+
}
|
|
3159
|
+
function useOfflineWrite() {
|
|
3160
|
+
const { offline } = useCalendarSupport();
|
|
3161
|
+
return {
|
|
3162
|
+
write: (op, send) => offline ? offline.write(op, send) : send(),
|
|
3163
|
+
networkMode: offline ? "always" : void 0
|
|
3164
|
+
};
|
|
3165
|
+
}
|
|
3166
|
+
function useCalendarSettings(enabled = true) {
|
|
3167
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3168
|
+
const { read, networkMode } = useOfflineRead();
|
|
3169
|
+
return reactQuery.useQuery({
|
|
3170
|
+
queryKey: calendarQueryKeys.settings(),
|
|
3171
|
+
queryFn: () => read(calendarQueryKeys.settings(), () => arbi.calendar.getSettings()),
|
|
3172
|
+
networkMode,
|
|
3173
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3174
|
+
staleTime: 5 * 6e4,
|
|
3175
|
+
retry: false
|
|
3176
|
+
});
|
|
3177
|
+
}
|
|
3178
|
+
function useCalendars(enabled = true) {
|
|
3179
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3180
|
+
const { read, networkMode } = useOfflineRead();
|
|
3181
|
+
return reactQuery.useQuery({
|
|
3182
|
+
queryKey: calendarQueryKeys.calendars(),
|
|
3183
|
+
queryFn: () => read(calendarQueryKeys.calendars(), () => arbi.calendar.listCalendars()),
|
|
3184
|
+
networkMode,
|
|
3185
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3186
|
+
staleTime: 6e4,
|
|
3187
|
+
retry: false
|
|
3188
|
+
});
|
|
3189
|
+
}
|
|
3190
|
+
function useCalendarEvents(params) {
|
|
3191
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3192
|
+
const { read, networkMode } = useOfflineRead();
|
|
3193
|
+
return reactQuery.useQuery({
|
|
3194
|
+
queryKey: params ? calendarQueryKeys.eventList(params) : calendarQueryKeys.events(),
|
|
3195
|
+
queryFn: () => read(
|
|
3196
|
+
calendarQueryKeys.eventList(params),
|
|
3197
|
+
() => arbi.calendar.listEvents(params)
|
|
3198
|
+
),
|
|
3199
|
+
networkMode,
|
|
3200
|
+
enabled: !!params && arbi.isLoggedIn,
|
|
3201
|
+
staleTime: 3e4,
|
|
3202
|
+
placeholderData: (previous) => previous,
|
|
3203
|
+
retry: false
|
|
3204
|
+
});
|
|
3205
|
+
}
|
|
3206
|
+
function useCalendarEvent(id, recurrenceId) {
|
|
3207
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3208
|
+
const { read, networkMode } = useOfflineRead();
|
|
3209
|
+
return reactQuery.useQuery({
|
|
3210
|
+
queryKey: calendarQueryKeys.event(id ?? "", recurrenceId),
|
|
3211
|
+
queryFn: () => read(
|
|
3212
|
+
calendarQueryKeys.event(id, recurrenceId),
|
|
3213
|
+
() => arbi.calendar.getEvent(id, recurrenceId)
|
|
3214
|
+
),
|
|
3215
|
+
networkMode,
|
|
3216
|
+
enabled: !!id && arbi.isLoggedIn,
|
|
3217
|
+
retry: false
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
function useFetchCalendarEvent() {
|
|
3221
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3222
|
+
const qc = reactQuery.useQueryClient();
|
|
3223
|
+
const { read, networkMode } = useOfflineRead();
|
|
3224
|
+
return (id, recurrenceId) => qc.fetchQuery({
|
|
3225
|
+
queryKey: calendarQueryKeys.event(id, recurrenceId),
|
|
3226
|
+
queryFn: () => read(
|
|
3227
|
+
calendarQueryKeys.event(id, recurrenceId),
|
|
3228
|
+
() => arbi.calendar.getEvent(id, recurrenceId)
|
|
3229
|
+
),
|
|
3230
|
+
networkMode,
|
|
3231
|
+
retry: false
|
|
3232
|
+
});
|
|
3233
|
+
}
|
|
3234
|
+
function useCalendarOverlays(range, layers) {
|
|
3235
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3236
|
+
const workspaceId = arbi.hasWorkspace ? arbi.getWorkspaceId() : null;
|
|
3237
|
+
return reactQuery.useQuery({
|
|
3238
|
+
queryKey: calendarQueryKeys.overlays(workspaceId, range ?? void 0, layers),
|
|
3239
|
+
queryFn: () => arbi.calendar.listOverlays(range, layers),
|
|
3240
|
+
enabled: !!workspaceId && !!range && layers.length > 0,
|
|
3241
|
+
staleTime: 6e4,
|
|
3242
|
+
placeholderData: (previous) => previous,
|
|
3243
|
+
retry: false
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
function useCalendarOutbox() {
|
|
3247
|
+
const qc = reactQuery.useQueryClient();
|
|
3248
|
+
const { offline } = useCalendarSupport();
|
|
3249
|
+
React.useEffect(
|
|
3250
|
+
() => offline?.subscribe(() => {
|
|
3251
|
+
void qc.invalidateQueries({ queryKey: calendarQueryKeys.outbox() });
|
|
3252
|
+
}),
|
|
3253
|
+
[offline, qc]
|
|
3254
|
+
);
|
|
3255
|
+
return reactQuery.useQuery({
|
|
3256
|
+
queryKey: calendarQueryKeys.outbox(),
|
|
3257
|
+
queryFn: () => offline ? offline.pending() : Promise.resolve([]),
|
|
3258
|
+
networkMode: "always",
|
|
3259
|
+
staleTime: Infinity
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3262
|
+
function useCalendarShares(calId) {
|
|
3263
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3264
|
+
return reactQuery.useQuery({
|
|
3265
|
+
queryKey: calendarQueryKeys.shares(calId ?? ""),
|
|
3266
|
+
queryFn: () => arbi.calendar.listShares(calId),
|
|
3267
|
+
enabled: !!calId && arbi.isLoggedIn,
|
|
3268
|
+
retry: false
|
|
3269
|
+
});
|
|
3270
|
+
}
|
|
3271
|
+
function useHolidayCountries(enabled = true) {
|
|
3272
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3273
|
+
return reactQuery.useQuery({
|
|
3274
|
+
queryKey: calendarQueryKeys.holidayCountries(),
|
|
3275
|
+
queryFn: () => arbi.calendar.listHolidayCountries(),
|
|
3276
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3277
|
+
staleTime: Infinity,
|
|
3278
|
+
retry: false
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3281
|
+
function useRooms(q) {
|
|
3282
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3283
|
+
return reactQuery.useQuery({
|
|
3284
|
+
queryKey: calendarQueryKeys.rooms(q ?? {}),
|
|
3285
|
+
queryFn: () => arbi.calendar.listRooms(q ?? {}),
|
|
3286
|
+
enabled: !!q && arbi.isLoggedIn,
|
|
3287
|
+
staleTime: 3e4,
|
|
3288
|
+
placeholderData: (previous) => previous,
|
|
3289
|
+
retry: false
|
|
3290
|
+
});
|
|
3291
|
+
}
|
|
3292
|
+
function useFreeBusy(attendees, start, end) {
|
|
3293
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3294
|
+
return reactQuery.useQuery({
|
|
3295
|
+
queryKey: calendarQueryKeys.freebusy(attendees, start ?? "", end ?? ""),
|
|
3296
|
+
queryFn: () => arbi.calendar.freeBusy({ attendees, start, end }),
|
|
3297
|
+
enabled: attendees.length > 0 && !!start && !!end && arbi.isLoggedIn,
|
|
3298
|
+
staleTime: 3e4,
|
|
3299
|
+
placeholderData: (previous) => previous,
|
|
3300
|
+
retry: false
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
function useCalendarInvitations() {
|
|
3304
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3305
|
+
return reactQuery.useQuery({
|
|
3306
|
+
queryKey: calendarQueryKeys.invitations(),
|
|
3307
|
+
queryFn: () => arbi.calendar.listInvitations(),
|
|
3308
|
+
enabled: arbi.isLoggedIn,
|
|
3309
|
+
staleTime: 3e4,
|
|
3310
|
+
refetchInterval: 6e4,
|
|
3311
|
+
retry: false
|
|
3312
|
+
});
|
|
3313
|
+
}
|
|
3314
|
+
function useCalendarEventByUid(uid) {
|
|
3315
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3316
|
+
return reactQuery.useQuery({
|
|
3317
|
+
queryKey: calendarQueryKeys.lookup(uid ?? ""),
|
|
3318
|
+
queryFn: () => arbi.calendar.lookupByUid(uid),
|
|
3319
|
+
enabled: !!uid && arbi.isLoggedIn,
|
|
3320
|
+
retry: false
|
|
3321
|
+
});
|
|
3322
|
+
}
|
|
3323
|
+
function useSaveCalendarSettings() {
|
|
3324
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3325
|
+
const qc = reactQuery.useQueryClient();
|
|
3326
|
+
return reactQuery.useMutation({
|
|
3327
|
+
mutationFn: (body) => arbi.calendar.putSettings(body),
|
|
3328
|
+
onSuccess: (data) => qc.setQueryData(calendarQueryKeys.settings(), data)
|
|
3329
|
+
});
|
|
3330
|
+
}
|
|
3331
|
+
function useCreateCalendar() {
|
|
3332
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3333
|
+
const qc = reactQuery.useQueryClient();
|
|
3334
|
+
return reactQuery.useMutation({
|
|
3335
|
+
mutationFn: (body) => arbi.calendar.createCalendar(body),
|
|
3336
|
+
onSuccess: () => invalidateCalendars(qc)
|
|
3337
|
+
});
|
|
3338
|
+
}
|
|
3339
|
+
function useUpdateCalendar() {
|
|
3340
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3341
|
+
const qc = reactQuery.useQueryClient();
|
|
3342
|
+
return reactQuery.useMutation({
|
|
3343
|
+
mutationFn: ({ id, body }) => arbi.calendar.updateCalendar(id, body),
|
|
3344
|
+
onSuccess: () => invalidateCalendars(qc)
|
|
3345
|
+
});
|
|
3346
|
+
}
|
|
3347
|
+
function useDeleteCalendar() {
|
|
3348
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3349
|
+
const qc = reactQuery.useQueryClient();
|
|
3350
|
+
return reactQuery.useMutation({
|
|
3351
|
+
mutationFn: (calId) => arbi.calendar.deleteCalendar(calId),
|
|
3352
|
+
onSuccess: () => invalidateCalendars(qc)
|
|
3353
|
+
});
|
|
3354
|
+
}
|
|
3355
|
+
function useCreateEvent() {
|
|
3356
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3357
|
+
const qc = reactQuery.useQueryClient();
|
|
3358
|
+
const { write, networkMode } = useOfflineWrite();
|
|
3359
|
+
return reactQuery.useMutation({
|
|
3360
|
+
mutationFn: (body) => write({ kind: "create", body }, () => arbi.calendar.createEvent(body)),
|
|
3361
|
+
networkMode,
|
|
3362
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3363
|
+
});
|
|
3364
|
+
}
|
|
3365
|
+
function useUpdateEvent() {
|
|
3366
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3367
|
+
const qc = reactQuery.useQueryClient();
|
|
3368
|
+
const { write, networkMode } = useOfflineWrite();
|
|
3369
|
+
return reactQuery.useMutation({
|
|
3370
|
+
mutationFn: ({ target, body }) => write({ kind: "update", target, body }, () => arbi.calendar.updateEvent(target, body)),
|
|
3371
|
+
networkMode,
|
|
3372
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3375
|
+
function useDeleteEvent() {
|
|
3376
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3377
|
+
const qc = reactQuery.useQueryClient();
|
|
3378
|
+
const { write, networkMode } = useOfflineWrite();
|
|
3379
|
+
return reactQuery.useMutation({
|
|
3380
|
+
mutationFn: (target) => write({ kind: "delete", target }, () => arbi.calendar.deleteEvent(target)),
|
|
3381
|
+
networkMode,
|
|
3382
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3383
|
+
});
|
|
3384
|
+
}
|
|
3385
|
+
function useMoveEvent() {
|
|
3386
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3387
|
+
const qc = reactQuery.useQueryClient();
|
|
3388
|
+
return reactQuery.useMutation({
|
|
3389
|
+
mutationFn: ({ id, calendarId }) => arbi.calendar.moveEvent(id, calendarId),
|
|
3390
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3391
|
+
});
|
|
3392
|
+
}
|
|
3393
|
+
function useRespondToEvent() {
|
|
3394
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3395
|
+
const qc = reactQuery.useQueryClient();
|
|
3396
|
+
const { write, networkMode } = useOfflineWrite();
|
|
3397
|
+
return reactQuery.useMutation({
|
|
3398
|
+
mutationFn: (params) => write({ kind: "respond", params }, () => arbi.calendar.respond(params)),
|
|
3399
|
+
networkMode,
|
|
3400
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
function useImportCalendar() {
|
|
3404
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3405
|
+
const qc = reactQuery.useQueryClient();
|
|
3406
|
+
return reactQuery.useMutation({
|
|
3407
|
+
mutationFn: ({ ics, calendarId }) => arbi.calendar.importIcs(ics, calendarId),
|
|
3408
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3409
|
+
});
|
|
3410
|
+
}
|
|
3411
|
+
function useShareCalendar() {
|
|
3412
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3413
|
+
const qc = reactQuery.useQueryClient();
|
|
3414
|
+
return reactQuery.useMutation({
|
|
3415
|
+
mutationFn: ({ calId, grantee, role }) => arbi.calendar.share(calId, grantee, role),
|
|
3416
|
+
onSuccess: (_d, v) => qc.invalidateQueries({ queryKey: calendarQueryKeys.shares(v.calId) })
|
|
3417
|
+
});
|
|
3418
|
+
}
|
|
3419
|
+
function useUnshareCalendar() {
|
|
3420
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3421
|
+
const qc = reactQuery.useQueryClient();
|
|
3422
|
+
return reactQuery.useMutation({
|
|
3423
|
+
mutationFn: ({ calId, userId }) => arbi.calendar.unshare(calId, userId),
|
|
3424
|
+
onSuccess: (_d, v) => qc.invalidateQueries({ queryKey: calendarQueryKeys.shares(v.calId) })
|
|
3425
|
+
});
|
|
3426
|
+
}
|
|
3427
|
+
function useSubscribeCalendar() {
|
|
3428
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3429
|
+
const qc = reactQuery.useQueryClient();
|
|
3430
|
+
return reactQuery.useMutation({
|
|
3431
|
+
mutationFn: (body) => arbi.calendar.subscribe(body),
|
|
3432
|
+
onSuccess: () => invalidateCalendars(qc)
|
|
3433
|
+
});
|
|
3434
|
+
}
|
|
3435
|
+
function useRefreshCalendar() {
|
|
3436
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3437
|
+
const qc = reactQuery.useQueryClient();
|
|
3438
|
+
return reactQuery.useMutation({
|
|
3439
|
+
mutationFn: (calId) => arbi.calendar.refresh(calId),
|
|
3440
|
+
onSuccess: () => invalidateCalendars(qc)
|
|
3441
|
+
});
|
|
3442
|
+
}
|
|
3443
|
+
function useAddHolidayCalendar() {
|
|
3444
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3445
|
+
const qc = reactQuery.useQueryClient();
|
|
3446
|
+
return reactQuery.useMutation({
|
|
3447
|
+
mutationFn: (body) => arbi.calendar.addHolidays(body),
|
|
3448
|
+
onSuccess: () => invalidateCalendars(qc)
|
|
3449
|
+
});
|
|
3450
|
+
}
|
|
3451
|
+
function useCreateRoom() {
|
|
3452
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3453
|
+
const qc = reactQuery.useQueryClient();
|
|
3454
|
+
return reactQuery.useMutation({
|
|
3455
|
+
mutationFn: (body) => arbi.calendar.createRoom(body),
|
|
3456
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: calendarQueryKeys.allRooms() })
|
|
3457
|
+
});
|
|
3458
|
+
}
|
|
3459
|
+
function useFindTime() {
|
|
3460
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3461
|
+
return reactQuery.useMutation({ mutationFn: (body) => arbi.calendar.findTime(body) });
|
|
3462
|
+
}
|
|
3463
|
+
function useDecideCounter() {
|
|
3464
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3465
|
+
const qc = reactQuery.useQueryClient();
|
|
3466
|
+
return reactQuery.useMutation({
|
|
3467
|
+
mutationFn: ({
|
|
3468
|
+
id,
|
|
3469
|
+
accept,
|
|
3470
|
+
comment
|
|
3471
|
+
}) => arbi.calendar.decideCounter(id, accept, comment),
|
|
3472
|
+
onSuccess: () => invalidateCalendarEvents(qc)
|
|
3473
|
+
});
|
|
3474
|
+
}
|
|
3475
|
+
function usePublishCalendar() {
|
|
3476
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3477
|
+
const qc = reactQuery.useQueryClient();
|
|
3478
|
+
return reactQuery.useMutation({
|
|
3479
|
+
mutationFn: ({ accountId, calendarId }) => arbi.calendar.publishToAccount(accountId, calendarId),
|
|
3480
|
+
onSuccess: () => {
|
|
3481
|
+
void invalidateCalendars(qc);
|
|
3482
|
+
void qc.invalidateQueries({ queryKey: calendarQueryKeys.accounts() });
|
|
3483
|
+
}
|
|
3484
|
+
});
|
|
3485
|
+
}
|
|
3486
|
+
function invalidateAccounts(qc) {
|
|
3487
|
+
return Promise.all([
|
|
3488
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.accounts() }),
|
|
3489
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.calendars() }),
|
|
3490
|
+
qc.invalidateQueries({ queryKey: calendarQueryKeys.events() })
|
|
3491
|
+
]);
|
|
3492
|
+
}
|
|
3493
|
+
function useCalendarAccounts(enabled = true) {
|
|
3494
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3495
|
+
return reactQuery.useQuery({
|
|
3496
|
+
queryKey: calendarQueryKeys.accounts(),
|
|
3497
|
+
queryFn: () => arbi.calendar.listAccounts(),
|
|
3498
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3499
|
+
staleTime: 3e4,
|
|
3500
|
+
retry: false
|
|
3501
|
+
});
|
|
3502
|
+
}
|
|
3503
|
+
function useCalDavProfiles(enabled = true) {
|
|
3504
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3505
|
+
return reactQuery.useQuery({
|
|
3506
|
+
queryKey: calendarQueryKeys.caldavProfiles(),
|
|
3507
|
+
queryFn: () => arbi.calendar.listCalDavProfiles(),
|
|
3508
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3509
|
+
staleTime: 10 * 6e4,
|
|
3510
|
+
retry: false
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
async function connectOAuthCalendarAccount(arbi, connectors, kind, backgroundSync = false) {
|
|
3514
|
+
try {
|
|
3515
|
+
return await arbi.calendar.connectOAuthAccount(kind, backgroundSync);
|
|
3516
|
+
} catch (err) {
|
|
3517
|
+
if (!(err instanceof browser.ArbiApiError) || err.status !== 401 || !connectors) throw err;
|
|
3518
|
+
await connectors.bridge(browser.ACCOUNT_VENDOR[kind]);
|
|
3519
|
+
return arbi.calendar.connectOAuthAccount(kind, backgroundSync);
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
function useConnectOAuthAccount() {
|
|
3523
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3524
|
+
const { connectors } = useCalendarSupport();
|
|
3525
|
+
const qc = reactQuery.useQueryClient();
|
|
3526
|
+
return reactQuery.useMutation({
|
|
3527
|
+
mutationFn: ({ kind, backgroundSync }) => connectOAuthCalendarAccount(arbi, connectors, kind, !!backgroundSync),
|
|
3528
|
+
onSuccess: () => invalidateAccounts(qc)
|
|
3529
|
+
});
|
|
3530
|
+
}
|
|
3531
|
+
function useConnectCalDavAccount() {
|
|
3532
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3533
|
+
const qc = reactQuery.useQueryClient();
|
|
3534
|
+
return reactQuery.useMutation({
|
|
3535
|
+
mutationFn: (body) => arbi.calendar.connectCalDavAccount(body),
|
|
3536
|
+
onSuccess: () => invalidateAccounts(qc)
|
|
3537
|
+
});
|
|
3538
|
+
}
|
|
3539
|
+
function useUpdateCalendarAccount() {
|
|
3540
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3541
|
+
const qc = reactQuery.useQueryClient();
|
|
3542
|
+
return reactQuery.useMutation({
|
|
3543
|
+
mutationFn: ({ id, backgroundSync }) => arbi.calendar.updateAccount(id, backgroundSync),
|
|
3544
|
+
onSuccess: () => invalidateAccounts(qc)
|
|
3545
|
+
});
|
|
3546
|
+
}
|
|
3547
|
+
function useSyncCalendarAccount() {
|
|
3548
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3549
|
+
const qc = reactQuery.useQueryClient();
|
|
3550
|
+
return reactQuery.useMutation({
|
|
3551
|
+
mutationFn: (id) => arbi.calendar.syncAccount(id),
|
|
3552
|
+
onSettled: () => invalidateAccounts(qc)
|
|
3553
|
+
});
|
|
3554
|
+
}
|
|
3555
|
+
function useDisconnectCalendarAccount() {
|
|
3556
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3557
|
+
const qc = reactQuery.useQueryClient();
|
|
3558
|
+
return reactQuery.useMutation({
|
|
3559
|
+
mutationFn: (id) => arbi.calendar.disconnectAccount(id),
|
|
3560
|
+
onSuccess: () => invalidateAccounts(qc)
|
|
3561
|
+
});
|
|
3562
|
+
}
|
|
3563
|
+
var PENDING_CONNECT_KEY = "arbi-calendar-pending-account-connect";
|
|
3564
|
+
function readPendingConnect() {
|
|
3565
|
+
try {
|
|
3566
|
+
const raw = window.sessionStorage.getItem(PENDING_CONNECT_KEY);
|
|
3567
|
+
if (!raw) return null;
|
|
3568
|
+
const value = JSON.parse(raw);
|
|
3569
|
+
if (!value || Date.now() - value.at > 30 * 6e4) return null;
|
|
3570
|
+
return value;
|
|
3571
|
+
} catch {
|
|
3572
|
+
return null;
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
function clearPendingConnect() {
|
|
3576
|
+
try {
|
|
3577
|
+
window.sessionStorage.removeItem(PENDING_CONNECT_KEY);
|
|
3578
|
+
} catch {
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
function useStartCalendarAccountOAuth() {
|
|
3582
|
+
const { connectors, oauthReturnPath } = useCalendarSupport();
|
|
3583
|
+
if (!connectors) return void 0;
|
|
3584
|
+
return async (kind, backgroundSync = false) => {
|
|
3585
|
+
try {
|
|
3586
|
+
window.sessionStorage.setItem(
|
|
3587
|
+
PENDING_CONNECT_KEY,
|
|
3588
|
+
JSON.stringify({ kind, backgroundSync, at: Date.now() })
|
|
3589
|
+
);
|
|
3590
|
+
} catch {
|
|
3591
|
+
}
|
|
3592
|
+
const returnPath = oauthReturnPath ?? `${window.location.pathname}${window.location.search}`;
|
|
3593
|
+
window.location.assign(await connectors.authorize(browser.ACCOUNT_VENDOR[kind], returnPath));
|
|
3594
|
+
};
|
|
3595
|
+
}
|
|
3596
|
+
function useResumeCalendarAccountConnect(onDone) {
|
|
3597
|
+
const { connectors } = useCalendarSupport();
|
|
3598
|
+
const connect = useConnectOAuthAccount();
|
|
3599
|
+
const started = React.useRef(false);
|
|
3600
|
+
React.useEffect(() => {
|
|
3601
|
+
if (started.current || !connectors) return;
|
|
3602
|
+
const pending = readPendingConnect();
|
|
3603
|
+
if (!pending) return;
|
|
3604
|
+
let live = true;
|
|
3605
|
+
void connectors.connectedVendors().then((vendors) => {
|
|
3606
|
+
if (!live || started.current || !vendors.includes(browser.ACCOUNT_VENDOR[pending.kind])) return;
|
|
3607
|
+
started.current = true;
|
|
3608
|
+
clearPendingConnect();
|
|
3609
|
+
connect.mutate(
|
|
3610
|
+
{ kind: pending.kind, backgroundSync: pending.backgroundSync },
|
|
3611
|
+
{
|
|
3612
|
+
onSuccess: (account) => onDone?.({ account }),
|
|
3613
|
+
onError: (error) => onDone?.({ error })
|
|
3614
|
+
}
|
|
3615
|
+
);
|
|
3616
|
+
}).catch(() => {
|
|
3617
|
+
});
|
|
3618
|
+
return () => {
|
|
3619
|
+
live = false;
|
|
3620
|
+
};
|
|
3621
|
+
}, [connectors]);
|
|
3622
|
+
return connect;
|
|
3623
|
+
}
|
|
3624
|
+
var syncedThisSession = /* @__PURE__ */ new Set();
|
|
3625
|
+
function resetCalendarAccountSyncState() {
|
|
3626
|
+
syncedThisSession.clear();
|
|
3627
|
+
}
|
|
3628
|
+
function useSyncAccountsOnOpen(enabled = true) {
|
|
3629
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3630
|
+
const { data: accounts } = useCalendarAccounts(enabled);
|
|
3631
|
+
const qc = reactQuery.useQueryClient();
|
|
3632
|
+
const [syncing, setSyncing] = React.useState(false);
|
|
3633
|
+
React.useEffect(() => {
|
|
3634
|
+
if (!enabled || !accounts?.length) return;
|
|
3635
|
+
const due = accounts.filter((a) => !syncedThisSession.has(a.id));
|
|
3636
|
+
if (!due.length) return;
|
|
3637
|
+
for (const a of due) syncedThisSession.add(a.id);
|
|
3638
|
+
setSyncing(true);
|
|
3639
|
+
void Promise.allSettled(due.map((a) => arbi.calendar.syncAccount(a.id))).then(() => {
|
|
3640
|
+
setSyncing(false);
|
|
3641
|
+
void invalidateAccounts(qc);
|
|
3642
|
+
});
|
|
3643
|
+
}, [enabled, accounts, arbi, qc]);
|
|
3644
|
+
return { syncing };
|
|
3645
|
+
}
|
|
3646
|
+
function useAppPasswords(enabled = true) {
|
|
3647
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3648
|
+
return reactQuery.useQuery({
|
|
3649
|
+
queryKey: calendarQueryKeys.appPasswords(),
|
|
3650
|
+
queryFn: () => arbi.calendar.listAppPasswords(),
|
|
3651
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3652
|
+
staleTime: 3e4,
|
|
3653
|
+
retry: false
|
|
3654
|
+
});
|
|
3655
|
+
}
|
|
3656
|
+
function useInvalidateAppPasswords() {
|
|
3657
|
+
const qc = reactQuery.useQueryClient();
|
|
3658
|
+
return () => qc.invalidateQueries({ queryKey: calendarQueryKeys.appPasswords() });
|
|
3659
|
+
}
|
|
3660
|
+
function useCreateAppPassword() {
|
|
3661
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3662
|
+
const invalidate = useInvalidateAppPasswords();
|
|
3663
|
+
return reactQuery.useMutation({
|
|
3664
|
+
mutationFn: (body) => arbi.calendar.createAppPassword(body),
|
|
3665
|
+
onSuccess: () => invalidate()
|
|
3666
|
+
});
|
|
3667
|
+
}
|
|
3668
|
+
function useCreateFeed() {
|
|
3669
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3670
|
+
const invalidate = useInvalidateAppPasswords();
|
|
3671
|
+
return reactQuery.useMutation({
|
|
3672
|
+
mutationFn: (body) => arbi.calendar.createFeed(body),
|
|
3673
|
+
onSuccess: () => invalidate()
|
|
3674
|
+
});
|
|
3675
|
+
}
|
|
3676
|
+
function useRevokeAppPassword() {
|
|
3677
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3678
|
+
const invalidate = useInvalidateAppPasswords();
|
|
3679
|
+
return reactQuery.useMutation({
|
|
3680
|
+
mutationFn: (id) => arbi.calendar.revokeAppPassword(id),
|
|
3681
|
+
onSuccess: () => invalidate()
|
|
3682
|
+
});
|
|
3683
|
+
}
|
|
3684
|
+
function useBookingPages(enabled = true) {
|
|
3685
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3686
|
+
return reactQuery.useQuery({
|
|
3687
|
+
queryKey: calendarQueryKeys.bookingPages(),
|
|
3688
|
+
queryFn: () => arbi.calendar.listBookingPages(),
|
|
3689
|
+
enabled: enabled && arbi.isLoggedIn,
|
|
3690
|
+
staleTime: 3e4,
|
|
3691
|
+
retry: false
|
|
3692
|
+
});
|
|
3693
|
+
}
|
|
3694
|
+
function useSaveBookingPage() {
|
|
3695
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3696
|
+
const qc = reactQuery.useQueryClient();
|
|
3697
|
+
return reactQuery.useMutation({
|
|
3698
|
+
mutationFn: (body) => arbi.calendar.putBookingPage(body),
|
|
3699
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: calendarQueryKeys.bookingPages() })
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3702
|
+
function useDeleteBookingPage() {
|
|
3703
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
3704
|
+
const qc = reactQuery.useQueryClient();
|
|
3705
|
+
return reactQuery.useMutation({
|
|
3706
|
+
mutationFn: (slug) => arbi.calendar.deleteBookingPage(slug),
|
|
3707
|
+
onSuccess: () => qc.invalidateQueries({ queryKey: calendarQueryKeys.bookingPages() })
|
|
3708
|
+
});
|
|
3709
|
+
}
|
|
3045
3710
|
function useWorkspaceDocs(workspaceId) {
|
|
3046
|
-
const { data: docs = [], isLoading, isError } =
|
|
3711
|
+
const { data: docs = [], isLoading, isError } = chunkQXGGFMMX_cjs.useDocuments(workspaceId);
|
|
3047
3712
|
const docIds = React.useMemo(
|
|
3048
3713
|
() => docs.map((d) => d.external_id).filter((id) => !!id),
|
|
3049
3714
|
[docs]
|
|
@@ -3051,7 +3716,7 @@ function useWorkspaceDocs(workspaceId) {
|
|
|
3051
3716
|
return { wsId: workspaceId, docs, docIds, isLoading, isError, ready: docIds.length > 0 };
|
|
3052
3717
|
}
|
|
3053
3718
|
function useAiTask() {
|
|
3054
|
-
const mutation =
|
|
3719
|
+
const mutation = chunkQXGGFMMX_cjs.useAssistantQuery();
|
|
3055
3720
|
const [status, setStatus] = React.useState("idle");
|
|
3056
3721
|
const [text, setText] = React.useState("");
|
|
3057
3722
|
const [stepCount, setStepCount] = React.useState(0);
|
|
@@ -3671,8 +4336,8 @@ function DocumentReview({
|
|
|
3671
4336
|
onClose,
|
|
3672
4337
|
className
|
|
3673
4338
|
}) {
|
|
3674
|
-
const parsedQuery =
|
|
3675
|
-
const tagsQuery =
|
|
4339
|
+
const parsedQuery = chunkQXGGFMMX_cjs.useParsedDocument(docId, stage);
|
|
4340
|
+
const tagsQuery = chunkQXGGFMMX_cjs.useTags(workspaceId);
|
|
3676
4341
|
const tagNameById = React__default.default.useMemo(() => {
|
|
3677
4342
|
const map = /* @__PURE__ */ new Map();
|
|
3678
4343
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -3903,7 +4568,7 @@ function SemanticSearch({
|
|
|
3903
4568
|
const { results, status, error, search, isRunning, query } = useSemanticSearch(docIds);
|
|
3904
4569
|
const [value, setValue] = React.useState("");
|
|
3905
4570
|
const [selected, setSelected] = React.useState(null);
|
|
3906
|
-
const { data: docs = [] } =
|
|
4571
|
+
const { data: docs = [] } = chunkQXGGFMMX_cjs.useDocuments(workspaceId, { enabled: !!workspaceId });
|
|
3907
4572
|
const docMap = React.useMemo(() => {
|
|
3908
4573
|
const map = /* @__PURE__ */ new Map();
|
|
3909
4574
|
for (const d of docs) if (d.external_id) map.set(d.external_id, d);
|
|
@@ -5005,7 +5670,7 @@ function ActivityFeed({
|
|
|
5005
5670
|
enabled,
|
|
5006
5671
|
"data-testid": testId = "activity-feed"
|
|
5007
5672
|
}) {
|
|
5008
|
-
const { data, isLoading, isError } =
|
|
5673
|
+
const { data, isLoading, isError } = chunkQXGGFMMX_cjs.useActivity({ limit, enabled });
|
|
5009
5674
|
if (isLoading) {
|
|
5010
5675
|
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: [
|
|
5011
5676
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 shrink-0 animate-pulse rounded-full bg-muted" }),
|
|
@@ -5029,50 +5694,445 @@ function ActivityFeed({
|
|
|
5029
5694
|
}
|
|
5030
5695
|
);
|
|
5031
5696
|
}
|
|
5032
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: chunkS6A6FSG7_cjs.cn("divide-y divide-border", className), "data-testid": testId, children: items.map((item) => {
|
|
5033
|
-
const desc = describeActivity(item.content);
|
|
5034
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5035
|
-
"li",
|
|
5036
|
-
{
|
|
5037
|
-
className: "flex items-center gap-3 py-2",
|
|
5038
|
-
"data-testid": "activity-feed-item",
|
|
5039
|
-
children: [
|
|
5040
|
-
/* @__PURE__ */ jsxRuntime.jsx(desc.Icon, { className: chunkS6A6FSG7_cjs.cn("h-4 w-4 shrink-0", desc.iconClassName) }),
|
|
5041
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground", children: desc.title }),
|
|
5042
|
-
/* @__PURE__ */ jsxRuntime.jsx("time", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: formatRelative(item.created_at) })
|
|
5043
|
-
]
|
|
5044
|
-
},
|
|
5045
|
-
item.external_id
|
|
5046
|
-
);
|
|
5047
|
-
}) });
|
|
5048
|
-
}
|
|
5049
|
-
var workTypes = [
|
|
5050
|
-
"mention",
|
|
5051
|
-
"workspace_access_request",
|
|
5052
|
-
"conversation_ready",
|
|
5053
|
-
"conversation_done",
|
|
5054
|
-
"workflow_failed",
|
|
5055
|
-
"mail_draft_ready"
|
|
5056
|
-
];
|
|
5057
|
-
function useWorkNotifications(options) {
|
|
5058
|
-
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
5059
|
-
const queries = reactQuery.useQueryClient();
|
|
5060
|
-
const queryKey = ["work-notifications", options.apiUrl, options.userId];
|
|
5061
|
-
const query = reactQuery.useQuery({
|
|
5062
|
-
queryKey,
|
|
5063
|
-
queryFn: async () => (await Promise.all(workTypes.map((type) => arbi.notifications.list(type)))).flat(),
|
|
5064
|
-
enabled: options.enabled && Boolean(options.userId),
|
|
5065
|
-
refetchInterval: 3e4
|
|
5066
|
-
});
|
|
5067
|
-
useArbiWebSocket((message) => {
|
|
5068
|
-
if (workTypes.some((type) => type === message.type))
|
|
5069
|
-
void queries.invalidateQueries({ queryKey });
|
|
5070
|
-
});
|
|
5071
|
-
const receipt = reactQuery.useMutation({
|
|
5072
|
-
mutationFn: (ids) => arbi.notifications.markRead(ids),
|
|
5073
|
-
onSuccess: () => queries.invalidateQueries({ queryKey })
|
|
5074
|
-
});
|
|
5075
|
-
return { ...query, markRead: receipt.mutateAsync };
|
|
5697
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: chunkS6A6FSG7_cjs.cn("divide-y divide-border", className), "data-testid": testId, children: items.map((item) => {
|
|
5698
|
+
const desc = describeActivity(item.content);
|
|
5699
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5700
|
+
"li",
|
|
5701
|
+
{
|
|
5702
|
+
className: "flex items-center gap-3 py-2",
|
|
5703
|
+
"data-testid": "activity-feed-item",
|
|
5704
|
+
children: [
|
|
5705
|
+
/* @__PURE__ */ jsxRuntime.jsx(desc.Icon, { className: chunkS6A6FSG7_cjs.cn("h-4 w-4 shrink-0", desc.iconClassName) }),
|
|
5706
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground", children: desc.title }),
|
|
5707
|
+
/* @__PURE__ */ jsxRuntime.jsx("time", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: formatRelative(item.created_at) })
|
|
5708
|
+
]
|
|
5709
|
+
},
|
|
5710
|
+
item.external_id
|
|
5711
|
+
);
|
|
5712
|
+
}) });
|
|
5713
|
+
}
|
|
5714
|
+
var workTypes = [
|
|
5715
|
+
"mention",
|
|
5716
|
+
"workspace_access_request",
|
|
5717
|
+
"conversation_ready",
|
|
5718
|
+
"conversation_done",
|
|
5719
|
+
"workflow_failed",
|
|
5720
|
+
"mail_draft_ready"
|
|
5721
|
+
];
|
|
5722
|
+
function useWorkNotifications(options) {
|
|
5723
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
5724
|
+
const queries = reactQuery.useQueryClient();
|
|
5725
|
+
const queryKey = ["work-notifications", options.apiUrl, options.userId];
|
|
5726
|
+
const query = reactQuery.useQuery({
|
|
5727
|
+
queryKey,
|
|
5728
|
+
queryFn: async () => (await Promise.all(workTypes.map((type) => arbi.notifications.list({ type })))).flat(),
|
|
5729
|
+
enabled: options.enabled && Boolean(options.userId),
|
|
5730
|
+
refetchInterval: 3e4
|
|
5731
|
+
});
|
|
5732
|
+
useArbiWebSocket((message) => {
|
|
5733
|
+
if (workTypes.some((type) => type === message.type))
|
|
5734
|
+
void queries.invalidateQueries({ queryKey });
|
|
5735
|
+
});
|
|
5736
|
+
const receipt = reactQuery.useMutation({
|
|
5737
|
+
mutationFn: (ids) => arbi.notifications.markRead(ids),
|
|
5738
|
+
onSuccess: () => queries.invalidateQueries({ queryKey })
|
|
5739
|
+
});
|
|
5740
|
+
return { ...query, markRead: receipt.mutateAsync };
|
|
5741
|
+
}
|
|
5742
|
+
function useNotifications(options = {}) {
|
|
5743
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
5744
|
+
const queries = reactQuery.useQueryClient();
|
|
5745
|
+
const limit = options.limit ?? 100;
|
|
5746
|
+
const ws = React.useContext(ArbiWsContext);
|
|
5747
|
+
React.useEffect(
|
|
5748
|
+
() => ws?.subscribe((message) => {
|
|
5749
|
+
if ("sender" in message && "recipient" in message)
|
|
5750
|
+
void queries.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.allNotifications() });
|
|
5751
|
+
}),
|
|
5752
|
+
[ws, queries]
|
|
5753
|
+
);
|
|
5754
|
+
return reactQuery.useQuery({
|
|
5755
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.notifications(limit),
|
|
5756
|
+
queryFn: () => arbi.notifications.list({ limit }),
|
|
5757
|
+
enabled: (options.enabled ?? true) && arbi.isLoggedIn
|
|
5758
|
+
});
|
|
5759
|
+
}
|
|
5760
|
+
function useDeleteNotifications() {
|
|
5761
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
5762
|
+
const queries = reactQuery.useQueryClient();
|
|
5763
|
+
return reactQuery.useMutation({
|
|
5764
|
+
mutationFn: (ids) => arbi.notifications.delete(ids),
|
|
5765
|
+
onSuccess: () => queries.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.allNotifications() })
|
|
5766
|
+
});
|
|
5767
|
+
}
|
|
5768
|
+
function useMarkNotificationsRead() {
|
|
5769
|
+
const arbi = chunkR2MF7YCW_cjs.useArbi();
|
|
5770
|
+
const queries = reactQuery.useQueryClient();
|
|
5771
|
+
return reactQuery.useMutation({
|
|
5772
|
+
mutationFn: (ids) => arbi.notifications.markRead(ids),
|
|
5773
|
+
onSuccess: () => queries.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.allNotifications() })
|
|
5774
|
+
});
|
|
5775
|
+
}
|
|
5776
|
+
|
|
5777
|
+
// src/notifications/server-notifications.ts
|
|
5778
|
+
function notificationUserName(user) {
|
|
5779
|
+
return [user.given_name, user.family_name].filter(Boolean).join(" ") || user.email;
|
|
5780
|
+
}
|
|
5781
|
+
var CONVERSATION_ID = /^con-[a-zA-Z0-9]+$/;
|
|
5782
|
+
var DOCUMENT_ID = /^doc-[a-zA-Z0-9]+$/;
|
|
5783
|
+
function parse(content) {
|
|
5784
|
+
try {
|
|
5785
|
+
const value = JSON.parse(content || "{}");
|
|
5786
|
+
return value && typeof value === "object" ? value : null;
|
|
5787
|
+
} catch {
|
|
5788
|
+
return null;
|
|
5789
|
+
}
|
|
5790
|
+
}
|
|
5791
|
+
function inputRequestTitle(content) {
|
|
5792
|
+
const metadata = parse(content);
|
|
5793
|
+
if (!metadata) return "ARBI needs your input \u2014 open the thread to reply";
|
|
5794
|
+
const timeout = typeof metadata.timeout_seconds === "number" ? metadata.timeout_seconds : 300;
|
|
5795
|
+
const minutes = Math.ceil(timeout / 60);
|
|
5796
|
+
const deadline = typeof metadata.expires_at === "string" ? new Date(metadata.expires_at) : null;
|
|
5797
|
+
if (deadline && Number.isFinite(deadline.getTime())) {
|
|
5798
|
+
return `ARBI needs your input \u2014 ${minutes} min to reply (until ${deadline.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })})`;
|
|
5799
|
+
}
|
|
5800
|
+
return `ARBI needs your input \u2014 ${minutes} min to reply`;
|
|
5801
|
+
}
|
|
5802
|
+
function documentActivityMeta(content) {
|
|
5803
|
+
const meta = parse(content);
|
|
5804
|
+
if (!meta) return {};
|
|
5805
|
+
const documentId = typeof meta.doc_ext_id === "string" && DOCUMENT_ID.test(meta.doc_ext_id) ? meta.doc_ext_id : void 0;
|
|
5806
|
+
const version = typeof meta.version === "number" && Number.isInteger(meta.version) && meta.version > 0 ? meta.version : void 0;
|
|
5807
|
+
const reason = typeof meta.reason === "string" ? meta.reason : void 0;
|
|
5808
|
+
return { documentId, reason, version };
|
|
5809
|
+
}
|
|
5810
|
+
function documentActivityPhrase(content) {
|
|
5811
|
+
const { reason, version } = documentActivityMeta(content);
|
|
5812
|
+
if (reason === "signed") return "signed a document";
|
|
5813
|
+
return version ? `saved version ${version} of a document` : "saved a new version of a document";
|
|
5814
|
+
}
|
|
5815
|
+
function docxMentionMeta(content) {
|
|
5816
|
+
const meta = parse(content);
|
|
5817
|
+
if (!meta || typeof meta.document_id !== "string" || !DOCUMENT_ID.test(meta.document_id))
|
|
5818
|
+
return {};
|
|
5819
|
+
return {
|
|
5820
|
+
documentId: meta.document_id,
|
|
5821
|
+
commentId: typeof meta.comment_id === "string" && meta.comment_id ? meta.comment_id : void 0
|
|
5822
|
+
};
|
|
5823
|
+
}
|
|
5824
|
+
function signatureRequestMeta(content) {
|
|
5825
|
+
const meta = parse(content);
|
|
5826
|
+
if (!meta) return {};
|
|
5827
|
+
const documentId = typeof meta.document_id === "string" && DOCUMENT_ID.test(meta.document_id) ? meta.document_id : void 0;
|
|
5828
|
+
const version = typeof meta.signed_version === "number" && Number.isInteger(meta.signed_version) ? meta.signed_version : void 0;
|
|
5829
|
+
return { documentId, version };
|
|
5830
|
+
}
|
|
5831
|
+
var SIGNATURE_NOTIFICATION_TYPES = [
|
|
5832
|
+
"signature_requested",
|
|
5833
|
+
"signature_completed",
|
|
5834
|
+
"signature_declined"
|
|
5835
|
+
];
|
|
5836
|
+
function isSignatureNotificationType(type) {
|
|
5837
|
+
return SIGNATURE_NOTIFICATION_TYPES.includes(type ?? "");
|
|
5838
|
+
}
|
|
5839
|
+
function signatureNotificationPhrase(type, incoming) {
|
|
5840
|
+
if (incoming) {
|
|
5841
|
+
switch (type) {
|
|
5842
|
+
case "signature_requested":
|
|
5843
|
+
return { lead: "", showPerson: true, verb: "asked you to sign", tail: "" };
|
|
5844
|
+
case "signature_completed":
|
|
5845
|
+
return { lead: "", showPerson: true, verb: "signed", tail: " \u2014 everyone has now signed" };
|
|
5846
|
+
case "signature_declined":
|
|
5847
|
+
return { lead: "", showPerson: true, verb: "declined to sign", tail: "" };
|
|
5848
|
+
}
|
|
5849
|
+
}
|
|
5850
|
+
switch (type) {
|
|
5851
|
+
case "signature_requested":
|
|
5852
|
+
return { lead: "You asked", showPerson: true, verb: "to sign", tail: "" };
|
|
5853
|
+
case "signature_completed":
|
|
5854
|
+
return { lead: "You signed", showPerson: false, verb: "", tail: " \u2014 everyone has now signed" };
|
|
5855
|
+
case "signature_declined":
|
|
5856
|
+
return { lead: "You declined to sign", showPerson: false, verb: "", tail: "" };
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5859
|
+
function callNotificationMeta(content) {
|
|
5860
|
+
const meta = parse(content);
|
|
5861
|
+
return {
|
|
5862
|
+
callExtId: typeof meta?.call_ext_id === "string" && /^call-[a-zA-Z0-9]{8}$/.test(meta.call_ext_id) ? meta.call_ext_id : void 0
|
|
5863
|
+
};
|
|
5864
|
+
}
|
|
5865
|
+
var BOX_SEAT_REFUSED = "box_seat_refused";
|
|
5866
|
+
var BOX_SEAT_REFUSED_TITLE = "Invitation not sent: your Box has no seat left. Your Box admins have been notified and can add users in the ARBI portal.";
|
|
5867
|
+
var BOX_SEAT_REFUSED_ACTION = "Open the ARBI portal";
|
|
5868
|
+
function isDeploymentUserNotification(type) {
|
|
5869
|
+
return type === "deployment_user_invited" || type === "deployment_user_registered";
|
|
5870
|
+
}
|
|
5871
|
+
var ALLOWED_PORTAL_ORIGINS = ["https://portal.arbicity.com"];
|
|
5872
|
+
function safePortalUrl(value, origins = ALLOWED_PORTAL_ORIGINS) {
|
|
5873
|
+
if (typeof value !== "string") return void 0;
|
|
5874
|
+
try {
|
|
5875
|
+
const url = new URL(value);
|
|
5876
|
+
if (url.protocol !== "https:" || !origins.includes(url.origin)) return void 0;
|
|
5877
|
+
return url.href;
|
|
5878
|
+
} catch {
|
|
5879
|
+
return void 0;
|
|
5880
|
+
}
|
|
5881
|
+
}
|
|
5882
|
+
function deploymentUserMeta(content, origins = ALLOWED_PORTAL_ORIGINS) {
|
|
5883
|
+
const meta = parse(content);
|
|
5884
|
+
if (!meta) return { external: false };
|
|
5885
|
+
const email = typeof meta.email === "string" && meta.email.trim() ? meta.email.trim() : void 0;
|
|
5886
|
+
return {
|
|
5887
|
+
email,
|
|
5888
|
+
external: meta.user_type === "external",
|
|
5889
|
+
portalUrl: safePortalUrl(meta.portal_url, origins)
|
|
5890
|
+
};
|
|
5891
|
+
}
|
|
5892
|
+
function documentDisplayName(doc) {
|
|
5893
|
+
return doc?.doc_metadata?.title || doc?.file_name || void 0;
|
|
5894
|
+
}
|
|
5895
|
+
var WORK_NOTIFICATION_LABELS = {
|
|
5896
|
+
conversation_ready: "A task is ready",
|
|
5897
|
+
conversation_done: "A task was marked done",
|
|
5898
|
+
conversation_notified: "You were notified in a thread",
|
|
5899
|
+
workflow_failed: "A workflow failed to run"
|
|
5900
|
+
};
|
|
5901
|
+
function conversationTarget(n) {
|
|
5902
|
+
if (!n.conversation_ext_id || !CONVERSATION_ID.test(n.conversation_ext_id)) return void 0;
|
|
5903
|
+
return {
|
|
5904
|
+
kind: "conversation",
|
|
5905
|
+
workspaceId: n.workspace_ext_id ?? void 0,
|
|
5906
|
+
conversationId: n.conversation_ext_id,
|
|
5907
|
+
...n.message_ext_id ? { messageId: n.message_ext_id } : {}
|
|
5908
|
+
};
|
|
5909
|
+
}
|
|
5910
|
+
function signatureTitle(n, senderName, documentName) {
|
|
5911
|
+
const type = n.type;
|
|
5912
|
+
const { documentId } = signatureRequestMeta(n.content);
|
|
5913
|
+
const name = documentId ? documentName?.(n.workspace_ext_id, documentId) : void 0;
|
|
5914
|
+
const fallback = type === "signature_requested" ? "a document" : "your document";
|
|
5915
|
+
const { verb, tail } = signatureNotificationPhrase(type, true);
|
|
5916
|
+
return `${senderName} ${verb} ${name ?? fallback}${tail}`;
|
|
5917
|
+
}
|
|
5918
|
+
function quotaPercent(type) {
|
|
5919
|
+
if (type === "quota_threshold_100") return 100;
|
|
5920
|
+
if (type === "quota_threshold_90") return 90;
|
|
5921
|
+
if (type === "quota_threshold_50") return 50;
|
|
5922
|
+
return null;
|
|
5923
|
+
}
|
|
5924
|
+
function describeServerNotification(n, options = {}) {
|
|
5925
|
+
const senderName = options.senderName ?? notificationUserName(n.sender);
|
|
5926
|
+
const workspace = n.workspace_ext_id ? { kind: "workspace", workspaceId: n.workspace_ext_id } : void 0;
|
|
5927
|
+
const type = n.type;
|
|
5928
|
+
if (type === BOX_SEAT_REFUSED) {
|
|
5929
|
+
return {
|
|
5930
|
+
title: BOX_SEAT_REFUSED_TITLE,
|
|
5931
|
+
variant: "warning",
|
|
5932
|
+
actionLabel: BOX_SEAT_REFUSED_ACTION,
|
|
5933
|
+
target: { kind: "seats" }
|
|
5934
|
+
};
|
|
5935
|
+
}
|
|
5936
|
+
const pct = quotaPercent(type);
|
|
5937
|
+
if (pct !== null) {
|
|
5938
|
+
return {
|
|
5939
|
+
title: `You have used ${pct}% of your daily AI limit for this project.`,
|
|
5940
|
+
variant: pct === 100 ? "error" : pct === 90 ? "warning" : "info",
|
|
5941
|
+
target: { kind: "projects" }
|
|
5942
|
+
};
|
|
5943
|
+
}
|
|
5944
|
+
switch (type) {
|
|
5945
|
+
case "call_missed":
|
|
5946
|
+
return {
|
|
5947
|
+
title: `Missed call from ${senderName}`,
|
|
5948
|
+
variant: "warning",
|
|
5949
|
+
actionLabel: "Call back",
|
|
5950
|
+
target: { kind: "call-back", user: n.sender }
|
|
5951
|
+
};
|
|
5952
|
+
case "native_mail_received":
|
|
5953
|
+
return {
|
|
5954
|
+
title: "New email in your encrypted inbox",
|
|
5955
|
+
variant: "info",
|
|
5956
|
+
target: { kind: "mail" }
|
|
5957
|
+
};
|
|
5958
|
+
case "mail_draft_ready": {
|
|
5959
|
+
const draftId = mailDraftIdFromContent(n.content);
|
|
5960
|
+
return {
|
|
5961
|
+
title: `${senderName} left a draft email for you to review`,
|
|
5962
|
+
variant: "info",
|
|
5963
|
+
target: { kind: "mail", ...draftId ? { draftId } : {} }
|
|
5964
|
+
};
|
|
5965
|
+
}
|
|
5966
|
+
case "workspaceuser_added_owner":
|
|
5967
|
+
return { title: `${senderName} added you as owner`, variant: "info", target: workspace };
|
|
5968
|
+
case "workspaceuser_added_collaborator":
|
|
5969
|
+
return {
|
|
5970
|
+
title: `${senderName} added you as collaborator`,
|
|
5971
|
+
variant: "info",
|
|
5972
|
+
target: workspace
|
|
5973
|
+
};
|
|
5974
|
+
case "workspaceuser_added_guest":
|
|
5975
|
+
return { title: `${senderName} added you as guest`, variant: "info", target: workspace };
|
|
5976
|
+
case "workspaceuser_removed":
|
|
5977
|
+
return { title: `${senderName} removed you from a workspace`, variant: "warning" };
|
|
5978
|
+
case "workspaceuser_updated_owner":
|
|
5979
|
+
return {
|
|
5980
|
+
title: `${senderName} changed your role to owner`,
|
|
5981
|
+
variant: "info",
|
|
5982
|
+
target: workspace
|
|
5983
|
+
};
|
|
5984
|
+
case "workspaceuser_updated_collaborator":
|
|
5985
|
+
return {
|
|
5986
|
+
title: `${senderName} changed your role to collaborator`,
|
|
5987
|
+
variant: "info",
|
|
5988
|
+
target: workspace
|
|
5989
|
+
};
|
|
5990
|
+
case "workspaceuser_updated_guest":
|
|
5991
|
+
return {
|
|
5992
|
+
title: `${senderName} changed your role to guest`,
|
|
5993
|
+
variant: "info",
|
|
5994
|
+
target: workspace
|
|
5995
|
+
};
|
|
5996
|
+
case "signature_requested":
|
|
5997
|
+
case "signature_completed":
|
|
5998
|
+
case "signature_declined": {
|
|
5999
|
+
const { documentId, version } = signatureRequestMeta(n.content);
|
|
6000
|
+
return {
|
|
6001
|
+
title: signatureTitle(n, senderName, options.documentName),
|
|
6002
|
+
variant: type === "signature_completed" ? "success" : type === "signature_declined" ? "warning" : "info",
|
|
6003
|
+
actionLabel: type === "signature_requested" ? "Review and sign" : "Open",
|
|
6004
|
+
// A request opens the current version on its PDF, where the banner offers "Review and
|
|
6005
|
+
// sign"; a completed request opens the signed copy.
|
|
6006
|
+
target: documentId ? {
|
|
6007
|
+
kind: "document",
|
|
6008
|
+
workspaceId: n.workspace_ext_id ?? void 0,
|
|
6009
|
+
documentId,
|
|
6010
|
+
...version ? { version } : {},
|
|
6011
|
+
tab: "pdf"
|
|
6012
|
+
} : void 0
|
|
6013
|
+
};
|
|
6014
|
+
}
|
|
6015
|
+
case "docx_mention": {
|
|
6016
|
+
const { documentId, commentId } = docxMentionMeta(n.content);
|
|
6017
|
+
return {
|
|
6018
|
+
title: `${senderName} mentioned you in a document comment`,
|
|
6019
|
+
variant: "info",
|
|
6020
|
+
target: documentId ? {
|
|
6021
|
+
kind: "document",
|
|
6022
|
+
workspaceId: n.workspace_ext_id ?? void 0,
|
|
6023
|
+
documentId,
|
|
6024
|
+
...commentId ? { commentId } : {}
|
|
6025
|
+
} : void 0
|
|
6026
|
+
};
|
|
6027
|
+
}
|
|
6028
|
+
case "agent_input_requested":
|
|
6029
|
+
return { title: inputRequestTitle(n.content), variant: "info", target: conversationTarget(n) };
|
|
6030
|
+
case "mention":
|
|
6031
|
+
return {
|
|
6032
|
+
title: `${senderName} mentioned you in a conversation`,
|
|
6033
|
+
variant: "info",
|
|
6034
|
+
target: conversationTarget(n)
|
|
6035
|
+
};
|
|
6036
|
+
case "thread_reply":
|
|
6037
|
+
return {
|
|
6038
|
+
title: `${senderName} replied in a thread`,
|
|
6039
|
+
variant: "info",
|
|
6040
|
+
target: conversationTarget(n)
|
|
6041
|
+
};
|
|
6042
|
+
case "document_activity": {
|
|
6043
|
+
const { documentId, version } = documentActivityMeta(n.content);
|
|
6044
|
+
return {
|
|
6045
|
+
title: `${senderName} ${documentActivityPhrase(n.content)}`,
|
|
6046
|
+
variant: "info",
|
|
6047
|
+
target: documentId ? {
|
|
6048
|
+
kind: "document",
|
|
6049
|
+
workspaceId: n.workspace_ext_id ?? void 0,
|
|
6050
|
+
documentId,
|
|
6051
|
+
...version ? { version } : {}
|
|
6052
|
+
} : void 0
|
|
6053
|
+
};
|
|
6054
|
+
}
|
|
6055
|
+
// Each of these opens the thread, so the person it is for finds it. One about your own thread
|
|
6056
|
+
// (you started the work) says so.
|
|
6057
|
+
case "conversation_ready":
|
|
6058
|
+
return {
|
|
6059
|
+
title: n.sender.external_id === n.recipient.external_id ? "Your thread is ready" : `${senderName}\u2019s thread is ready`,
|
|
6060
|
+
variant: "info",
|
|
6061
|
+
target: conversationTarget(n)
|
|
6062
|
+
};
|
|
6063
|
+
case "conversation_notified":
|
|
6064
|
+
return {
|
|
6065
|
+
title: `${senderName} notified you in a thread`,
|
|
6066
|
+
variant: "info",
|
|
6067
|
+
target: conversationTarget(n)
|
|
6068
|
+
};
|
|
6069
|
+
case "conversation_done":
|
|
6070
|
+
return {
|
|
6071
|
+
title: `${senderName} marked a thread done`,
|
|
6072
|
+
variant: "success",
|
|
6073
|
+
target: conversationTarget(n)
|
|
6074
|
+
};
|
|
6075
|
+
case "workflow_completed": {
|
|
6076
|
+
const workflowId = parse(n.content)?.workflow_ext_id;
|
|
6077
|
+
return {
|
|
6078
|
+
title: "A workflow completed",
|
|
6079
|
+
variant: "success",
|
|
6080
|
+
target: {
|
|
6081
|
+
kind: "workflows",
|
|
6082
|
+
...typeof workflowId === "string" ? { workflowId } : {}
|
|
6083
|
+
}
|
|
6084
|
+
};
|
|
6085
|
+
}
|
|
6086
|
+
case "workflow_failed":
|
|
6087
|
+
return {
|
|
6088
|
+
title: "A workflow failed to start",
|
|
6089
|
+
variant: "error",
|
|
6090
|
+
target: { kind: "workflows" }
|
|
6091
|
+
};
|
|
6092
|
+
case "deployment_user_invited":
|
|
6093
|
+
case "deployment_user_registered": {
|
|
6094
|
+
const { email, external, portalUrl } = deploymentUserMeta(n.content, options.portalOrigins);
|
|
6095
|
+
const suffix = external ? " \xB7 External" : "";
|
|
6096
|
+
return {
|
|
6097
|
+
title: type === "deployment_user_invited" ? `${senderName} invited ${email ?? "a new user"}${suffix}` : `${email ?? senderName} joined${suffix}`,
|
|
6098
|
+
variant: "info",
|
|
6099
|
+
...portalUrl && {
|
|
6100
|
+
actionLabel: "Manage users",
|
|
6101
|
+
target: { kind: "url", url: portalUrl }
|
|
6102
|
+
}
|
|
6103
|
+
};
|
|
6104
|
+
}
|
|
6105
|
+
case "contact_accepted":
|
|
6106
|
+
return { title: `${senderName} joined the platform`, variant: "success", target: workspace };
|
|
6107
|
+
case "workspace_access_request":
|
|
6108
|
+
return {
|
|
6109
|
+
title: `${senderName} asked for workspace access`,
|
|
6110
|
+
variant: "info",
|
|
6111
|
+
// Straight into the review — granting needs a workspace choice and a role, so a bare
|
|
6112
|
+
// "grant" action could never be right here.
|
|
6113
|
+
target: { kind: "access-request", notification: n }
|
|
6114
|
+
};
|
|
6115
|
+
case "storage_quota_exceeded":
|
|
6116
|
+
return {
|
|
6117
|
+
title: "Your storage is full. Mail still arrives, but new uploads and attachments are paused until you free space or add storage.",
|
|
6118
|
+
variant: "error",
|
|
6119
|
+
target: { kind: "storage" }
|
|
6120
|
+
};
|
|
6121
|
+
case "signup_reward":
|
|
6122
|
+
return {
|
|
6123
|
+
title: n.content ? `\u{1F389} Signup bonus \u2014 ${n.content}` : "\u{1F389} You earned a signup bonus!",
|
|
6124
|
+
variant: "success",
|
|
6125
|
+
target: { kind: "projects" }
|
|
6126
|
+
};
|
|
6127
|
+
case "referral_reward":
|
|
6128
|
+
return {
|
|
6129
|
+
title: n.content ? `\u{1F381} Reward \u2014 ${n.content}` : "\u{1F381} You earned a reward!",
|
|
6130
|
+
variant: "success",
|
|
6131
|
+
target: { kind: "projects" }
|
|
6132
|
+
};
|
|
6133
|
+
default:
|
|
6134
|
+
return null;
|
|
6135
|
+
}
|
|
5076
6136
|
}
|
|
5077
6137
|
|
|
5078
6138
|
// src/directmessages/utils.ts
|
|
@@ -5163,7 +6223,7 @@ function useDirectMessages(options) {
|
|
|
5163
6223
|
enabled
|
|
5164
6224
|
});
|
|
5165
6225
|
const contactsQuery = reactQuery.useQuery({
|
|
5166
|
-
queryKey:
|
|
6226
|
+
queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.contacts(),
|
|
5167
6227
|
queryFn: () => arbi.contacts.list(),
|
|
5168
6228
|
enabled
|
|
5169
6229
|
});
|
|
@@ -6432,10 +7492,10 @@ function DocumentTable({
|
|
|
6432
7492
|
extraColumns,
|
|
6433
7493
|
className
|
|
6434
7494
|
}) {
|
|
6435
|
-
const query =
|
|
7495
|
+
const query = chunkQXGGFMMX_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6436
7496
|
const rows = documents ?? query.data ?? [];
|
|
6437
7497
|
const isLoading = !documents && query.isLoading;
|
|
6438
|
-
const tagsQuery =
|
|
7498
|
+
const tagsQuery = chunkQXGGFMMX_cjs.useTags(workspaceId);
|
|
6439
7499
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6440
7500
|
const map = /* @__PURE__ */ new Map();
|
|
6441
7501
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6616,7 +7676,7 @@ function DocumentCardMenu({
|
|
|
6616
7676
|
const invalidateDocuments = () => {
|
|
6617
7677
|
const workspaceId = arbi.getWorkspaceId();
|
|
6618
7678
|
if (workspaceId) {
|
|
6619
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
7679
|
+
void queryClient.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
6620
7680
|
}
|
|
6621
7681
|
};
|
|
6622
7682
|
const download = reactQuery.useMutation({
|
|
@@ -6715,10 +7775,10 @@ function DocumentGallery({
|
|
|
6715
7775
|
minTileWidth = 148,
|
|
6716
7776
|
className
|
|
6717
7777
|
}) {
|
|
6718
|
-
const query =
|
|
7778
|
+
const query = chunkQXGGFMMX_cjs.useDocuments(workspaceId, { enabled: !documents });
|
|
6719
7779
|
const rows = documents ?? query.data ?? [];
|
|
6720
7780
|
const isLoading = !documents && query.isLoading;
|
|
6721
|
-
const tagsQuery =
|
|
7781
|
+
const tagsQuery = chunkQXGGFMMX_cjs.useTags(workspaceId);
|
|
6722
7782
|
const tagNameById = React__default.default.useMemo(() => {
|
|
6723
7783
|
const map = /* @__PURE__ */ new Map();
|
|
6724
7784
|
for (const t of tagsQuery.data ?? []) {
|
|
@@ -6730,7 +7790,7 @@ function DocumentGallery({
|
|
|
6730
7790
|
() => rows.map((d) => d.external_id).filter((id) => !!id),
|
|
6731
7791
|
[rows]
|
|
6732
7792
|
);
|
|
6733
|
-
const thumbsQuery =
|
|
7793
|
+
const thumbsQuery = chunkQXGGFMMX_cjs.useThumbnails(docIds);
|
|
6734
7794
|
const thumbs = thumbsQuery.data ?? {};
|
|
6735
7795
|
const session = useArbiSessionStore();
|
|
6736
7796
|
const storeSelected = useArbiSessionState((s) => s.selectedDocumentIds);
|
|
@@ -6766,7 +7826,7 @@ function DocumentGallery({
|
|
|
6766
7826
|
setRenamingId(null);
|
|
6767
7827
|
const activeWorkspace = workspaceId ?? arbi.getWorkspaceId();
|
|
6768
7828
|
if (activeWorkspace) {
|
|
6769
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
7829
|
+
void queryClient.invalidateQueries({ queryKey: chunkQXGGFMMX_cjs.arbiQueryKeys.documents(activeWorkspace) });
|
|
6770
7830
|
}
|
|
6771
7831
|
}
|
|
6772
7832
|
});
|
|
@@ -7384,115 +8444,207 @@ function hasVideoTrack(blob) {
|
|
|
7384
8444
|
|
|
7385
8445
|
Object.defineProperty(exports, "PROJECT_CREATION_DENIED_REASON", {
|
|
7386
8446
|
enumerable: true,
|
|
7387
|
-
get: function () { return
|
|
8447
|
+
get: function () { return chunkQXGGFMMX_cjs.PROJECT_CREATION_DENIED_REASON; }
|
|
7388
8448
|
});
|
|
7389
8449
|
Object.defineProperty(exports, "arbiMutationKeys", {
|
|
7390
8450
|
enumerable: true,
|
|
7391
|
-
get: function () { return
|
|
8451
|
+
get: function () { return chunkQXGGFMMX_cjs.arbiMutationKeys; }
|
|
7392
8452
|
});
|
|
7393
8453
|
Object.defineProperty(exports, "arbiQueryKeys", {
|
|
7394
8454
|
enumerable: true,
|
|
7395
|
-
get: function () { return
|
|
8455
|
+
get: function () { return chunkQXGGFMMX_cjs.arbiQueryKeys; }
|
|
7396
8456
|
});
|
|
7397
8457
|
Object.defineProperty(exports, "isUsageMetered", {
|
|
7398
8458
|
enumerable: true,
|
|
7399
|
-
get: function () { return
|
|
8459
|
+
get: function () { return chunkQXGGFMMX_cjs.isUsageMetered; }
|
|
7400
8460
|
});
|
|
7401
8461
|
Object.defineProperty(exports, "useActivity", {
|
|
7402
8462
|
enumerable: true,
|
|
7403
|
-
get: function () { return
|
|
8463
|
+
get: function () { return chunkQXGGFMMX_cjs.useActivity; }
|
|
7404
8464
|
});
|
|
7405
8465
|
Object.defineProperty(exports, "useAgents", {
|
|
7406
8466
|
enumerable: true,
|
|
7407
|
-
get: function () { return
|
|
8467
|
+
get: function () { return chunkQXGGFMMX_cjs.useAgents; }
|
|
7408
8468
|
});
|
|
7409
8469
|
Object.defineProperty(exports, "useAssistantQuery", {
|
|
7410
8470
|
enumerable: true,
|
|
7411
|
-
get: function () { return
|
|
8471
|
+
get: function () { return chunkQXGGFMMX_cjs.useAssistantQuery; }
|
|
7412
8472
|
});
|
|
7413
8473
|
Object.defineProperty(exports, "useCanCreateProjects", {
|
|
7414
8474
|
enumerable: true,
|
|
7415
|
-
get: function () { return
|
|
8475
|
+
get: function () { return chunkQXGGFMMX_cjs.useCanCreateProjects; }
|
|
7416
8476
|
});
|
|
7417
8477
|
Object.defineProperty(exports, "useConfigs", {
|
|
7418
8478
|
enumerable: true,
|
|
7419
|
-
get: function () { return
|
|
8479
|
+
get: function () { return chunkQXGGFMMX_cjs.useConfigs; }
|
|
7420
8480
|
});
|
|
7421
8481
|
Object.defineProperty(exports, "useConversationThreads", {
|
|
7422
8482
|
enumerable: true,
|
|
7423
|
-
get: function () { return
|
|
8483
|
+
get: function () { return chunkQXGGFMMX_cjs.useConversationThreads; }
|
|
7424
8484
|
});
|
|
7425
8485
|
Object.defineProperty(exports, "useConversations", {
|
|
7426
8486
|
enumerable: true,
|
|
7427
|
-
get: function () { return
|
|
8487
|
+
get: function () { return chunkQXGGFMMX_cjs.useConversations; }
|
|
7428
8488
|
});
|
|
7429
8489
|
Object.defineProperty(exports, "useCurrentUser", {
|
|
7430
8490
|
enumerable: true,
|
|
7431
|
-
get: function () { return
|
|
8491
|
+
get: function () { return chunkQXGGFMMX_cjs.useCurrentUser; }
|
|
7432
8492
|
});
|
|
7433
8493
|
Object.defineProperty(exports, "useDeleteAgents", {
|
|
7434
8494
|
enumerable: true,
|
|
7435
|
-
get: function () { return
|
|
8495
|
+
get: function () { return chunkQXGGFMMX_cjs.useDeleteAgents; }
|
|
7436
8496
|
});
|
|
7437
8497
|
Object.defineProperty(exports, "useDocuments", {
|
|
7438
8498
|
enumerable: true,
|
|
7439
|
-
get: function () { return
|
|
8499
|
+
get: function () { return chunkQXGGFMMX_cjs.useDocuments; }
|
|
7440
8500
|
});
|
|
7441
8501
|
Object.defineProperty(exports, "useFirmPool", {
|
|
7442
8502
|
enumerable: true,
|
|
7443
|
-
get: function () { return
|
|
8503
|
+
get: function () { return chunkQXGGFMMX_cjs.useFirmPool; }
|
|
7444
8504
|
});
|
|
7445
8505
|
Object.defineProperty(exports, "useHealth", {
|
|
7446
8506
|
enumerable: true,
|
|
7447
|
-
get: function () { return
|
|
8507
|
+
get: function () { return chunkQXGGFMMX_cjs.useHealth; }
|
|
7448
8508
|
});
|
|
7449
8509
|
Object.defineProperty(exports, "useParsedDocument", {
|
|
7450
8510
|
enumerable: true,
|
|
7451
|
-
get: function () { return
|
|
8511
|
+
get: function () { return chunkQXGGFMMX_cjs.useParsedDocument; }
|
|
7452
8512
|
});
|
|
7453
8513
|
Object.defineProperty(exports, "useProjectInvoices", {
|
|
7454
8514
|
enumerable: true,
|
|
7455
|
-
get: function () { return
|
|
8515
|
+
get: function () { return chunkQXGGFMMX_cjs.useProjectInvoices; }
|
|
7456
8516
|
});
|
|
7457
8517
|
Object.defineProperty(exports, "useProjectUsage", {
|
|
7458
8518
|
enumerable: true,
|
|
7459
|
-
get: function () { return
|
|
8519
|
+
get: function () { return chunkQXGGFMMX_cjs.useProjectUsage; }
|
|
7460
8520
|
});
|
|
7461
8521
|
Object.defineProperty(exports, "useProjects", {
|
|
7462
8522
|
enumerable: true,
|
|
7463
|
-
get: function () { return
|
|
8523
|
+
get: function () { return chunkQXGGFMMX_cjs.useProjects; }
|
|
7464
8524
|
});
|
|
7465
8525
|
Object.defineProperty(exports, "useProjectsUsage", {
|
|
7466
8526
|
enumerable: true,
|
|
7467
|
-
get: function () { return
|
|
8527
|
+
get: function () { return chunkQXGGFMMX_cjs.useProjectsUsage; }
|
|
7468
8528
|
});
|
|
7469
8529
|
Object.defineProperty(exports, "useTags", {
|
|
7470
8530
|
enumerable: true,
|
|
7471
|
-
get: function () { return
|
|
8531
|
+
get: function () { return chunkQXGGFMMX_cjs.useTags; }
|
|
7472
8532
|
});
|
|
7473
8533
|
Object.defineProperty(exports, "useThumbnails", {
|
|
7474
8534
|
enumerable: true,
|
|
7475
|
-
get: function () { return
|
|
8535
|
+
get: function () { return chunkQXGGFMMX_cjs.useThumbnails; }
|
|
7476
8536
|
});
|
|
7477
8537
|
Object.defineProperty(exports, "useTopUpFirmPool", {
|
|
7478
8538
|
enumerable: true,
|
|
7479
|
-
get: function () { return
|
|
8539
|
+
get: function () { return chunkQXGGFMMX_cjs.useTopUpFirmPool; }
|
|
7480
8540
|
});
|
|
7481
8541
|
Object.defineProperty(exports, "useUserUsageToday", {
|
|
7482
8542
|
enumerable: true,
|
|
7483
|
-
get: function () { return
|
|
8543
|
+
get: function () { return chunkQXGGFMMX_cjs.useUserUsageToday; }
|
|
7484
8544
|
});
|
|
7485
8545
|
Object.defineProperty(exports, "useWorkspaceActivity", {
|
|
7486
8546
|
enumerable: true,
|
|
7487
|
-
get: function () { return
|
|
8547
|
+
get: function () { return chunkQXGGFMMX_cjs.useWorkspaceActivity; }
|
|
7488
8548
|
});
|
|
7489
8549
|
Object.defineProperty(exports, "useWorkspaceUsers", {
|
|
7490
8550
|
enumerable: true,
|
|
7491
|
-
get: function () { return
|
|
8551
|
+
get: function () { return chunkQXGGFMMX_cjs.useWorkspaceUsers; }
|
|
7492
8552
|
});
|
|
7493
8553
|
Object.defineProperty(exports, "useWorkspaces", {
|
|
7494
8554
|
enumerable: true,
|
|
7495
|
-
get: function () { return
|
|
8555
|
+
get: function () { return chunkQXGGFMMX_cjs.useWorkspaces; }
|
|
8556
|
+
});
|
|
8557
|
+
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
8558
|
+
enumerable: true,
|
|
8559
|
+
get: function () { return chunkZWFMFOGP_cjs.cleanDraftMarkdown; }
|
|
8560
|
+
});
|
|
8561
|
+
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
8562
|
+
enumerable: true,
|
|
8563
|
+
get: function () { return chunkZWFMFOGP_cjs.cleanDraftWithReport; }
|
|
8564
|
+
});
|
|
8565
|
+
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
8566
|
+
enumerable: true,
|
|
8567
|
+
get: function () { return chunkZWFMFOGP_cjs.promoteBoldTitle; }
|
|
8568
|
+
});
|
|
8569
|
+
Object.defineProperty(exports, "repairParsedStructure", {
|
|
8570
|
+
enumerable: true,
|
|
8571
|
+
get: function () { return chunkZWFMFOGP_cjs.repairParsedStructure; }
|
|
8572
|
+
});
|
|
8573
|
+
Object.defineProperty(exports, "repairParsedTitle", {
|
|
8574
|
+
enumerable: true,
|
|
8575
|
+
get: function () { return chunkZWFMFOGP_cjs.repairParsedTitle; }
|
|
8576
|
+
});
|
|
8577
|
+
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
8578
|
+
enumerable: true,
|
|
8579
|
+
get: function () { return chunkZWFMFOGP_cjs.stripAgentPreamble; }
|
|
8580
|
+
});
|
|
8581
|
+
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
8582
|
+
enumerable: true,
|
|
8583
|
+
get: function () { return chunkZWFMFOGP_cjs.unescapeMarkdown; }
|
|
8584
|
+
});
|
|
8585
|
+
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
8586
|
+
enumerable: true,
|
|
8587
|
+
get: function () { return chunkZWFMFOGP_cjs.unwrapCitationLinks; }
|
|
8588
|
+
});
|
|
8589
|
+
Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
|
|
8590
|
+
enumerable: true,
|
|
8591
|
+
get: function () { return chunkKLPY2HUC_cjs.DEFAULT_NOTIFY_TONE; }
|
|
8592
|
+
});
|
|
8593
|
+
Object.defineProperty(exports, "MAX_SESSION_NOTIFICATIONS", {
|
|
8594
|
+
enumerable: true,
|
|
8595
|
+
get: function () { return chunkKLPY2HUC_cjs.MAX_SESSION_NOTIFICATIONS; }
|
|
8596
|
+
});
|
|
8597
|
+
Object.defineProperty(exports, "NotificationBell", {
|
|
8598
|
+
enumerable: true,
|
|
8599
|
+
get: function () { return chunkKLPY2HUC_cjs.NotificationBell; }
|
|
8600
|
+
});
|
|
8601
|
+
Object.defineProperty(exports, "Toaster", {
|
|
8602
|
+
enumerable: true,
|
|
8603
|
+
get: function () { return chunkKLPY2HUC_cjs.Toaster; }
|
|
8604
|
+
});
|
|
8605
|
+
Object.defineProperty(exports, "configureNotify", {
|
|
8606
|
+
enumerable: true,
|
|
8607
|
+
get: function () { return chunkKLPY2HUC_cjs.configureNotify; }
|
|
8608
|
+
});
|
|
8609
|
+
Object.defineProperty(exports, "formatRelativeTime", {
|
|
8610
|
+
enumerable: true,
|
|
8611
|
+
get: function () { return chunkKLPY2HUC_cjs.formatRelativeTime; }
|
|
8612
|
+
});
|
|
8613
|
+
Object.defineProperty(exports, "notify", {
|
|
8614
|
+
enumerable: true,
|
|
8615
|
+
get: function () { return chunkKLPY2HUC_cjs.notify; }
|
|
8616
|
+
});
|
|
8617
|
+
Object.defineProperty(exports, "persistNotifyHistory", {
|
|
8618
|
+
enumerable: true,
|
|
8619
|
+
get: function () { return chunkKLPY2HUC_cjs.persistNotifyHistory; }
|
|
8620
|
+
});
|
|
8621
|
+
Object.defineProperty(exports, "seedNotifications", {
|
|
8622
|
+
enumerable: true,
|
|
8623
|
+
get: function () { return chunkKLPY2HUC_cjs.seedNotifications; }
|
|
8624
|
+
});
|
|
8625
|
+
Object.defineProperty(exports, "selectUnread", {
|
|
8626
|
+
enumerable: true,
|
|
8627
|
+
get: function () { return chunkKLPY2HUC_cjs.selectUnread; }
|
|
8628
|
+
});
|
|
8629
|
+
Object.defineProperty(exports, "toast", {
|
|
8630
|
+
enumerable: true,
|
|
8631
|
+
get: function () { return chunkKLPY2HUC_cjs.toast; }
|
|
8632
|
+
});
|
|
8633
|
+
Object.defineProperty(exports, "useNotify", {
|
|
8634
|
+
enumerable: true,
|
|
8635
|
+
get: function () { return chunkKLPY2HUC_cjs.useNotify; }
|
|
8636
|
+
});
|
|
8637
|
+
Object.defineProperty(exports, "ArbiProvider", {
|
|
8638
|
+
enumerable: true,
|
|
8639
|
+
get: function () { return chunkR2MF7YCW_cjs.ArbiProvider; }
|
|
8640
|
+
});
|
|
8641
|
+
Object.defineProperty(exports, "useArbi", {
|
|
8642
|
+
enumerable: true,
|
|
8643
|
+
get: function () { return chunkR2MF7YCW_cjs.useArbi; }
|
|
8644
|
+
});
|
|
8645
|
+
Object.defineProperty(exports, "useDeploymentDomain", {
|
|
8646
|
+
enumerable: true,
|
|
8647
|
+
get: function () { return chunkR2MF7YCW_cjs.useDeploymentDomain; }
|
|
7496
8648
|
});
|
|
7497
8649
|
Object.defineProperty(exports, "AUDIO_MIME_PREFERENCE", {
|
|
7498
8650
|
enumerable: true,
|
|
@@ -8094,38 +9246,6 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
|
|
|
8094
9246
|
enumerable: true,
|
|
8095
9247
|
get: function () { return chunkOC7F5SNA_cjs.splitMarkdownBlocks; }
|
|
8096
9248
|
});
|
|
8097
|
-
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
8098
|
-
enumerable: true,
|
|
8099
|
-
get: function () { return chunkZWFMFOGP_cjs.cleanDraftMarkdown; }
|
|
8100
|
-
});
|
|
8101
|
-
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
8102
|
-
enumerable: true,
|
|
8103
|
-
get: function () { return chunkZWFMFOGP_cjs.cleanDraftWithReport; }
|
|
8104
|
-
});
|
|
8105
|
-
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
8106
|
-
enumerable: true,
|
|
8107
|
-
get: function () { return chunkZWFMFOGP_cjs.promoteBoldTitle; }
|
|
8108
|
-
});
|
|
8109
|
-
Object.defineProperty(exports, "repairParsedStructure", {
|
|
8110
|
-
enumerable: true,
|
|
8111
|
-
get: function () { return chunkZWFMFOGP_cjs.repairParsedStructure; }
|
|
8112
|
-
});
|
|
8113
|
-
Object.defineProperty(exports, "repairParsedTitle", {
|
|
8114
|
-
enumerable: true,
|
|
8115
|
-
get: function () { return chunkZWFMFOGP_cjs.repairParsedTitle; }
|
|
8116
|
-
});
|
|
8117
|
-
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
8118
|
-
enumerable: true,
|
|
8119
|
-
get: function () { return chunkZWFMFOGP_cjs.stripAgentPreamble; }
|
|
8120
|
-
});
|
|
8121
|
-
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
8122
|
-
enumerable: true,
|
|
8123
|
-
get: function () { return chunkZWFMFOGP_cjs.unescapeMarkdown; }
|
|
8124
|
-
});
|
|
8125
|
-
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
8126
|
-
enumerable: true,
|
|
8127
|
-
get: function () { return chunkZWFMFOGP_cjs.unwrapCitationLinks; }
|
|
8128
|
-
});
|
|
8129
9249
|
Object.defineProperty(exports, "Button", {
|
|
8130
9250
|
enumerable: true,
|
|
8131
9251
|
get: function () { return chunkWYZJLZ67_cjs.Button; }
|
|
@@ -8186,54 +9306,6 @@ Object.defineProperty(exports, "trimOpenCitation", {
|
|
|
8186
9306
|
enumerable: true,
|
|
8187
9307
|
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
8188
9308
|
});
|
|
8189
|
-
Object.defineProperty(exports, "DEFAULT_NOTIFY_TONE", {
|
|
8190
|
-
enumerable: true,
|
|
8191
|
-
get: function () { return chunkKLPY2HUC_cjs.DEFAULT_NOTIFY_TONE; }
|
|
8192
|
-
});
|
|
8193
|
-
Object.defineProperty(exports, "MAX_SESSION_NOTIFICATIONS", {
|
|
8194
|
-
enumerable: true,
|
|
8195
|
-
get: function () { return chunkKLPY2HUC_cjs.MAX_SESSION_NOTIFICATIONS; }
|
|
8196
|
-
});
|
|
8197
|
-
Object.defineProperty(exports, "NotificationBell", {
|
|
8198
|
-
enumerable: true,
|
|
8199
|
-
get: function () { return chunkKLPY2HUC_cjs.NotificationBell; }
|
|
8200
|
-
});
|
|
8201
|
-
Object.defineProperty(exports, "Toaster", {
|
|
8202
|
-
enumerable: true,
|
|
8203
|
-
get: function () { return chunkKLPY2HUC_cjs.Toaster; }
|
|
8204
|
-
});
|
|
8205
|
-
Object.defineProperty(exports, "configureNotify", {
|
|
8206
|
-
enumerable: true,
|
|
8207
|
-
get: function () { return chunkKLPY2HUC_cjs.configureNotify; }
|
|
8208
|
-
});
|
|
8209
|
-
Object.defineProperty(exports, "formatRelativeTime", {
|
|
8210
|
-
enumerable: true,
|
|
8211
|
-
get: function () { return chunkKLPY2HUC_cjs.formatRelativeTime; }
|
|
8212
|
-
});
|
|
8213
|
-
Object.defineProperty(exports, "notify", {
|
|
8214
|
-
enumerable: true,
|
|
8215
|
-
get: function () { return chunkKLPY2HUC_cjs.notify; }
|
|
8216
|
-
});
|
|
8217
|
-
Object.defineProperty(exports, "persistNotifyHistory", {
|
|
8218
|
-
enumerable: true,
|
|
8219
|
-
get: function () { return chunkKLPY2HUC_cjs.persistNotifyHistory; }
|
|
8220
|
-
});
|
|
8221
|
-
Object.defineProperty(exports, "seedNotifications", {
|
|
8222
|
-
enumerable: true,
|
|
8223
|
-
get: function () { return chunkKLPY2HUC_cjs.seedNotifications; }
|
|
8224
|
-
});
|
|
8225
|
-
Object.defineProperty(exports, "selectUnread", {
|
|
8226
|
-
enumerable: true,
|
|
8227
|
-
get: function () { return chunkKLPY2HUC_cjs.selectUnread; }
|
|
8228
|
-
});
|
|
8229
|
-
Object.defineProperty(exports, "toast", {
|
|
8230
|
-
enumerable: true,
|
|
8231
|
-
get: function () { return chunkKLPY2HUC_cjs.toast; }
|
|
8232
|
-
});
|
|
8233
|
-
Object.defineProperty(exports, "useNotify", {
|
|
8234
|
-
enumerable: true,
|
|
8235
|
-
get: function () { return chunkKLPY2HUC_cjs.useNotify; }
|
|
8236
|
-
});
|
|
8237
9309
|
Object.defineProperty(exports, "ScrollArea", {
|
|
8238
9310
|
enumerable: true,
|
|
8239
9311
|
get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
|
|
@@ -8314,17 +9386,9 @@ Object.defineProperty(exports, "cn", {
|
|
|
8314
9386
|
enumerable: true,
|
|
8315
9387
|
get: function () { return chunkS6A6FSG7_cjs.cn; }
|
|
8316
9388
|
});
|
|
8317
|
-
Object.defineProperty(exports, "
|
|
8318
|
-
enumerable: true,
|
|
8319
|
-
get: function () { return chunkR2MF7YCW_cjs.ArbiProvider; }
|
|
8320
|
-
});
|
|
8321
|
-
Object.defineProperty(exports, "useArbi", {
|
|
8322
|
-
enumerable: true,
|
|
8323
|
-
get: function () { return chunkR2MF7YCW_cjs.useArbi; }
|
|
8324
|
-
});
|
|
8325
|
-
Object.defineProperty(exports, "useDeploymentDomain", {
|
|
9389
|
+
Object.defineProperty(exports, "ACCOUNT_VENDOR", {
|
|
8326
9390
|
enumerable: true,
|
|
8327
|
-
get: function () { return
|
|
9391
|
+
get: function () { return browser.ACCOUNT_VENDOR; }
|
|
8328
9392
|
});
|
|
8329
9393
|
Object.defineProperty(exports, "Arbi", {
|
|
8330
9394
|
enumerable: true,
|
|
@@ -8338,6 +9402,18 @@ Object.defineProperty(exports, "DEFAULT_AI_USD_PER_GBP", {
|
|
|
8338
9402
|
enumerable: true,
|
|
8339
9403
|
get: function () { return browser.DEFAULT_AI_USD_PER_GBP; }
|
|
8340
9404
|
});
|
|
9405
|
+
Object.defineProperty(exports, "PublicBookingError", {
|
|
9406
|
+
enumerable: true,
|
|
9407
|
+
get: function () { return browser.PublicBookingError; }
|
|
9408
|
+
});
|
|
9409
|
+
Object.defineProperty(exports, "bookPublicSlot", {
|
|
9410
|
+
enumerable: true,
|
|
9411
|
+
get: function () { return browser.bookPublicSlot; }
|
|
9412
|
+
});
|
|
9413
|
+
Object.defineProperty(exports, "cancelPublicBooking", {
|
|
9414
|
+
enumerable: true,
|
|
9415
|
+
get: function () { return browser.cancelPublicBooking; }
|
|
9416
|
+
});
|
|
8341
9417
|
Object.defineProperty(exports, "formatGbp", {
|
|
8342
9418
|
enumerable: true,
|
|
8343
9419
|
get: function () { return browser.formatGbp; }
|
|
@@ -8346,6 +9422,14 @@ Object.defineProperty(exports, "formatGbpPerMillionTokens", {
|
|
|
8346
9422
|
enumerable: true,
|
|
8347
9423
|
get: function () { return browser.formatGbpPerMillionTokens; }
|
|
8348
9424
|
});
|
|
9425
|
+
Object.defineProperty(exports, "getPublicBookingPage", {
|
|
9426
|
+
enumerable: true,
|
|
9427
|
+
get: function () { return browser.getPublicBookingPage; }
|
|
9428
|
+
});
|
|
9429
|
+
Object.defineProperty(exports, "splitAppPasswords", {
|
|
9430
|
+
enumerable: true,
|
|
9431
|
+
get: function () { return browser.splitAppPasswords; }
|
|
9432
|
+
});
|
|
8349
9433
|
Object.defineProperty(exports, "usdToGbp", {
|
|
8350
9434
|
enumerable: true,
|
|
8351
9435
|
get: function () { return browser.usdToGbp; }
|
|
@@ -8354,6 +9438,7 @@ Object.defineProperty(exports, "isMessageType", {
|
|
|
8354
9438
|
enumerable: true,
|
|
8355
9439
|
get: function () { return client.isMessageType; }
|
|
8356
9440
|
});
|
|
9441
|
+
exports.ALLOWED_PORTAL_ORIGINS = ALLOWED_PORTAL_ORIGINS;
|
|
8357
9442
|
exports.AccountClientProvider = AccountClientProvider;
|
|
8358
9443
|
exports.ActivityFeed = ActivityFeed;
|
|
8359
9444
|
exports.AiActionCard = AiActionCard;
|
|
@@ -8363,6 +9448,10 @@ exports.ArbiBotIcon = ArbiBotIcon;
|
|
|
8363
9448
|
exports.ArbiSessionStateProvider = ArbiSessionStateProvider;
|
|
8364
9449
|
exports.ArbiWebSocketProvider = ArbiWebSocketProvider;
|
|
8365
9450
|
exports.ArtifactCanvas = ArtifactCanvas;
|
|
9451
|
+
exports.BOX_SEAT_REFUSED = BOX_SEAT_REFUSED;
|
|
9452
|
+
exports.BOX_SEAT_REFUSED_ACTION = BOX_SEAT_REFUSED_ACTION;
|
|
9453
|
+
exports.BOX_SEAT_REFUSED_TITLE = BOX_SEAT_REFUSED_TITLE;
|
|
9454
|
+
exports.CalendarSupportProvider = CalendarSupportProvider;
|
|
8366
9455
|
exports.ChatBubble = ChatBubble;
|
|
8367
9456
|
exports.CitationRenderer = CitationRenderer;
|
|
8368
9457
|
exports.ClaudeIcon = ClaudeIcon;
|
|
@@ -8403,24 +9492,35 @@ exports.OpenAIIcon = OpenAIIcon;
|
|
|
8403
9492
|
exports.PhotoCapture = PhotoCapture;
|
|
8404
9493
|
exports.ProviderIcon = ProviderIcon;
|
|
8405
9494
|
exports.RUN_WINDOW_MS = RUN_WINDOW_MS;
|
|
9495
|
+
exports.SIGNATURE_NOTIFICATION_TYPES = SIGNATURE_NOTIFICATION_TYPES;
|
|
8406
9496
|
exports.SemanticSearch = SemanticSearch;
|
|
8407
9497
|
exports.StartByEmail = StartByEmail;
|
|
8408
9498
|
exports.TypingIndicator = TypingIndicator;
|
|
8409
9499
|
exports.VideoCapture = VideoCapture;
|
|
8410
9500
|
exports.VoiceNoteRecorder = VoiceNoteRecorder;
|
|
9501
|
+
exports.WORK_NOTIFICATION_LABELS = WORK_NOTIFICATION_LABELS;
|
|
8411
9502
|
exports.accountPath = accountPath;
|
|
8412
9503
|
exports.aliasTakenMessage = aliasTakenMessage;
|
|
8413
9504
|
exports.annotateThread = annotateThread;
|
|
8414
9505
|
exports.announceMailDraftReplaced = announceMailDraftReplaced;
|
|
8415
9506
|
exports.arbiAccountClient = arbiAccountClient;
|
|
8416
9507
|
exports.arbiMailClient = arbiMailClient;
|
|
9508
|
+
exports.calendarQueryKeys = calendarQueryKeys;
|
|
9509
|
+
exports.callNotificationMeta = callNotificationMeta;
|
|
8417
9510
|
exports.captureFrameAsBlob = captureFrameAsBlob;
|
|
9511
|
+
exports.connectOAuthCalendarAccount = connectOAuthCalendarAccount;
|
|
8418
9512
|
exports.createArbiSessionStore = createArbiSessionStore;
|
|
8419
9513
|
exports.createMailClient = createMailClient;
|
|
8420
9514
|
exports.cropImage = cropImage;
|
|
8421
9515
|
exports.dayKey = dayKey;
|
|
8422
9516
|
exports.defaultMailAlias = defaultMailAlias;
|
|
9517
|
+
exports.deploymentUserMeta = deploymentUserMeta;
|
|
8423
9518
|
exports.describeActivity = describeActivity;
|
|
9519
|
+
exports.describeServerNotification = describeServerNotification;
|
|
9520
|
+
exports.documentActivityMeta = documentActivityMeta;
|
|
9521
|
+
exports.documentActivityPhrase = documentActivityPhrase;
|
|
9522
|
+
exports.documentDisplayName = documentDisplayName;
|
|
9523
|
+
exports.docxMentionMeta = docxMentionMeta;
|
|
8424
9524
|
exports.downloadRecoveryFile = downloadRecoveryFile;
|
|
8425
9525
|
exports.fileAttachment = fileAttachment;
|
|
8426
9526
|
exports.formatIdentityPrice = formatIdentityPrice;
|
|
@@ -8430,8 +9530,14 @@ exports.getWorkspaceKind = getWorkspaceKind;
|
|
|
8430
9530
|
exports.getWorkspaceSentPhrase = getWorkspaceSentPhrase;
|
|
8431
9531
|
exports.hasVideoTrack = hasVideoTrack;
|
|
8432
9532
|
exports.identityStepFor = identityStepFor;
|
|
9533
|
+
exports.inputRequestTitle = inputRequestTitle;
|
|
9534
|
+
exports.invalidateCalendarEvents = invalidateCalendarEvents;
|
|
9535
|
+
exports.invalidateCalendars = invalidateCalendars;
|
|
8433
9536
|
exports.invalidateTagData = invalidateTagData;
|
|
8434
9537
|
exports.isAliasTakenError = isAliasTakenError;
|
|
9538
|
+
exports.isDeploymentUserNotification = isDeploymentUserNotification;
|
|
9539
|
+
exports.isQueuedCalendarWrite = isQueuedCalendarWrite;
|
|
9540
|
+
exports.isSignatureNotificationType = isSignatureNotificationType;
|
|
8435
9541
|
exports.isWorkspaceNotificationType = isWorkspaceNotificationType;
|
|
8436
9542
|
exports.mailDraftIdFromContent = mailDraftIdFromContent;
|
|
8437
9543
|
exports.mailJson = mailJson;
|
|
@@ -8439,13 +9545,18 @@ exports.mailQueryKeys = mailQueryKeys;
|
|
|
8439
9545
|
exports.mountDiditVerification = mountDiditVerification;
|
|
8440
9546
|
exports.nextAliasSuggestion = nextAliasSuggestion;
|
|
8441
9547
|
exports.nextViewingDocument = nextViewingDocument;
|
|
9548
|
+
exports.notificationUserName = notificationUserName;
|
|
8442
9549
|
exports.parseActivityContent = parseActivityContent;
|
|
8443
9550
|
exports.parseDeleteAccountBlockers = parseDeleteAccountBlockers;
|
|
8444
9551
|
exports.pickRecentWorkspaces = pickRecentWorkspaces;
|
|
8445
9552
|
exports.redlineStats = redlineStats;
|
|
9553
|
+
exports.resetCalendarAccountSyncState = resetCalendarAccountSyncState;
|
|
8446
9554
|
exports.resolveActiveWorkspace = resolveActiveWorkspace;
|
|
9555
|
+
exports.safePortalUrl = safePortalUrl;
|
|
8447
9556
|
exports.selectIsGenerating = selectIsGenerating;
|
|
8448
9557
|
exports.selectViewingDocumentId = selectViewingDocumentId;
|
|
9558
|
+
exports.signatureNotificationPhrase = signatureNotificationPhrase;
|
|
9559
|
+
exports.signatureRequestMeta = signatureRequestMeta;
|
|
8449
9560
|
exports.textToArtifact = textToArtifact;
|
|
8450
9561
|
exports.titleFromQuestion = titleFromQuestion;
|
|
8451
9562
|
exports.toChatCitations = toChatCitations;
|
|
@@ -8455,12 +9566,14 @@ exports.toRedlineMarkdown = toRedlineMarkdown;
|
|
|
8455
9566
|
exports.toShellWorkspace = toShellWorkspace;
|
|
8456
9567
|
exports.useAccountClient = useAccountClient;
|
|
8457
9568
|
exports.useActOnStep = useActOnStep;
|
|
9569
|
+
exports.useAddHolidayCalendar = useAddHolidayCalendar;
|
|
8458
9570
|
exports.useAgentChats = useAgentChats;
|
|
8459
9571
|
exports.useAgentConfig = useAgentConfig;
|
|
8460
9572
|
exports.useAgentModels = useAgentModels;
|
|
8461
9573
|
exports.useAgentSession = useAgentSession;
|
|
8462
9574
|
exports.useAgentWorkspaces = useAgentWorkspaces;
|
|
8463
9575
|
exports.useAiTask = useAiTask;
|
|
9576
|
+
exports.useAppPasswords = useAppPasswords;
|
|
8464
9577
|
exports.useArbiChat = useArbiChat;
|
|
8465
9578
|
exports.useArbiConnected = useArbiConnected;
|
|
8466
9579
|
exports.useArbiDocumentSync = useArbiDocumentSync;
|
|
@@ -8476,42 +9589,74 @@ exports.useArbiWsTask = useArbiWsTask;
|
|
|
8476
9589
|
exports.useArbiWsTasks = useArbiWsTasks;
|
|
8477
9590
|
exports.useAuthorizeLimits = useAuthorizeLimits;
|
|
8478
9591
|
exports.useAvatarCrop = useAvatarCrop;
|
|
9592
|
+
exports.useBookingPages = useBookingPages;
|
|
9593
|
+
exports.useCalDavProfiles = useCalDavProfiles;
|
|
9594
|
+
exports.useCalendarAccounts = useCalendarAccounts;
|
|
9595
|
+
exports.useCalendarEvent = useCalendarEvent;
|
|
9596
|
+
exports.useCalendarEventByUid = useCalendarEventByUid;
|
|
9597
|
+
exports.useCalendarEvents = useCalendarEvents;
|
|
9598
|
+
exports.useCalendarInvitations = useCalendarInvitations;
|
|
9599
|
+
exports.useCalendarOutbox = useCalendarOutbox;
|
|
9600
|
+
exports.useCalendarOverlays = useCalendarOverlays;
|
|
9601
|
+
exports.useCalendarSettings = useCalendarSettings;
|
|
9602
|
+
exports.useCalendarShares = useCalendarShares;
|
|
9603
|
+
exports.useCalendarSupport = useCalendarSupport;
|
|
9604
|
+
exports.useCalendars = useCalendars;
|
|
8479
9605
|
exports.useCameraStream = useCameraStream;
|
|
8480
9606
|
exports.useClaimNativeAlias = useClaimNativeAlias;
|
|
8481
9607
|
exports.useCloseAgentSession = useCloseAgentSession;
|
|
8482
9608
|
exports.useCommandPalette = useCommandPalette;
|
|
8483
9609
|
exports.useConfirmEmailChange = useConfirmEmailChange;
|
|
9610
|
+
exports.useConnectCalDavAccount = useConnectCalDavAccount;
|
|
8484
9611
|
exports.useConnectMailAccount = useConnectMailAccount;
|
|
9612
|
+
exports.useConnectOAuthAccount = useConnectOAuthAccount;
|
|
8485
9613
|
exports.useContacts = useContacts;
|
|
8486
9614
|
exports.useConversationActivity = useConversationActivity;
|
|
8487
9615
|
exports.useConversationPendingAuth = useConversationPendingAuth;
|
|
8488
9616
|
exports.useConversationUsage = useConversationUsage;
|
|
8489
9617
|
exports.useCreateAgent = useCreateAgent;
|
|
9618
|
+
exports.useCreateAppPassword = useCreateAppPassword;
|
|
9619
|
+
exports.useCreateCalendar = useCreateCalendar;
|
|
8490
9620
|
exports.useCreateContact = useCreateContact;
|
|
9621
|
+
exports.useCreateEvent = useCreateEvent;
|
|
8491
9622
|
exports.useCreateFact = useCreateFact;
|
|
8492
9623
|
exports.useCreateFacts = useCreateFacts;
|
|
9624
|
+
exports.useCreateFeed = useCreateFeed;
|
|
9625
|
+
exports.useCreateRoom = useCreateRoom;
|
|
8493
9626
|
exports.useCreateWork = useCreateWork;
|
|
8494
9627
|
exports.useCreateWorkflow = useCreateWorkflow;
|
|
8495
9628
|
exports.useCurrentSessionId = useCurrentSessionId;
|
|
9629
|
+
exports.useDecideCounter = useDecideCounter;
|
|
8496
9630
|
exports.useDeleteAccount = useDeleteAccount;
|
|
8497
9631
|
exports.useDeleteAccountFlow = useDeleteAccountFlow;
|
|
9632
|
+
exports.useDeleteBookingPage = useDeleteBookingPage;
|
|
9633
|
+
exports.useDeleteCalendar = useDeleteCalendar;
|
|
8498
9634
|
exports.useDeleteContact = useDeleteContact;
|
|
9635
|
+
exports.useDeleteEvent = useDeleteEvent;
|
|
8499
9636
|
exports.useDeleteFact = useDeleteFact;
|
|
9637
|
+
exports.useDeleteNotifications = useDeleteNotifications;
|
|
8500
9638
|
exports.useDeleteSkill = useDeleteSkill;
|
|
8501
9639
|
exports.useDeleteWorkflow = useDeleteWorkflow;
|
|
8502
9640
|
exports.useDirectMessages = useDirectMessages;
|
|
9641
|
+
exports.useDisconnectCalendarAccount = useDisconnectCalendarAccount;
|
|
8503
9642
|
exports.useDisconnectMailAccount = useDisconnectMailAccount;
|
|
8504
9643
|
exports.useEmailChange = useEmailChange;
|
|
8505
9644
|
exports.useFacts = useFacts;
|
|
9645
|
+
exports.useFetchCalendarEvent = useFetchCalendarEvent;
|
|
8506
9646
|
exports.useFilteredProjects = useFilteredProjects;
|
|
9647
|
+
exports.useFindTime = useFindTime;
|
|
8507
9648
|
exports.useFollowThread = useFollowThread;
|
|
9649
|
+
exports.useFreeBusy = useFreeBusy;
|
|
8508
9650
|
exports.useGenerateAgentAvatar = useGenerateAgentAvatar;
|
|
8509
9651
|
exports.useGrantAgentAccess = useGrantAgentAccess;
|
|
9652
|
+
exports.useHolidayCountries = useHolidayCountries;
|
|
8510
9653
|
exports.useIdentityVerification = useIdentityVerification;
|
|
8511
9654
|
exports.useIdentityVerificationFlow = useIdentityVerificationFlow;
|
|
9655
|
+
exports.useImportCalendar = useImportCalendar;
|
|
8512
9656
|
exports.useInvalidateTagData = useInvalidateTagData;
|
|
8513
9657
|
exports.useInviteContacts = useInviteContacts;
|
|
8514
9658
|
exports.useMailAccounts = useMailAccounts;
|
|
9659
|
+
exports.useMailAttachmentText = useMailAttachmentText;
|
|
8515
9660
|
exports.useMailCache = useMailCache;
|
|
8516
9661
|
exports.useMailClient = useMailClient;
|
|
8517
9662
|
exports.useMailDraftCompose = useMailDraftCompose;
|
|
@@ -8524,9 +9669,12 @@ exports.useMailOnline = useMailOnline;
|
|
|
8524
9669
|
exports.useMailPolicy = useMailPolicy;
|
|
8525
9670
|
exports.useMailProjects = useMailProjects;
|
|
8526
9671
|
exports.useMailUnlock = useMailUnlock;
|
|
9672
|
+
exports.useMarkNotificationsRead = useMarkNotificationsRead;
|
|
8527
9673
|
exports.useMcpTools = useMcpTools;
|
|
9674
|
+
exports.useMoveEvent = useMoveEvent;
|
|
8528
9675
|
exports.useNameEditor = useNameEditor;
|
|
8529
9676
|
exports.useNotificationPreferences = useNotificationPreferences;
|
|
9677
|
+
exports.useNotifications = useNotifications;
|
|
8530
9678
|
exports.usePasswordChange = usePasswordChange;
|
|
8531
9679
|
exports.usePasswordChangeForm = usePasswordChangeForm;
|
|
8532
9680
|
exports.usePendingContacts = usePendingContacts;
|
|
@@ -8534,12 +9682,21 @@ exports.usePlanWork = usePlanWork;
|
|
|
8534
9682
|
exports.useProfile = useProfile;
|
|
8535
9683
|
exports.useProjectConversationUsage = useProjectConversationUsage;
|
|
8536
9684
|
exports.useProjectEvents = useProjectEvents;
|
|
9685
|
+
exports.usePublishCalendar = usePublishCalendar;
|
|
9686
|
+
exports.useRefreshCalendar = useRefreshCalendar;
|
|
8537
9687
|
exports.useRequestEmailChange = useRequestEmailChange;
|
|
9688
|
+
exports.useRespondToEvent = useRespondToEvent;
|
|
9689
|
+
exports.useResumeCalendarAccountConnect = useResumeCalendarAccountConnect;
|
|
8538
9690
|
exports.useRevokeAgentAccess = useRevokeAgentAccess;
|
|
9691
|
+
exports.useRevokeAppPassword = useRevokeAppPassword;
|
|
9692
|
+
exports.useRooms = useRooms;
|
|
8539
9693
|
exports.useRunConversation = useRunConversation;
|
|
8540
9694
|
exports.useRunWorkflow = useRunWorkflow;
|
|
8541
9695
|
exports.useSaveAgentConfig = useSaveAgentConfig;
|
|
9696
|
+
exports.useSaveBookingPage = useSaveBookingPage;
|
|
9697
|
+
exports.useSaveCalendarSettings = useSaveCalendarSettings;
|
|
8542
9698
|
exports.useSaveMailDraft = useSaveMailDraft;
|
|
9699
|
+
exports.useSearchContacts = useSearchContacts;
|
|
8543
9700
|
exports.useSearchFacts = useSearchFacts;
|
|
8544
9701
|
exports.useSemanticSearch = useSemanticSearch;
|
|
8545
9702
|
exports.useSendBackStep = useSendBackStep;
|
|
@@ -8547,16 +9704,25 @@ exports.useSendMail = useSendMail;
|
|
|
8547
9704
|
exports.useSessions = useSessions;
|
|
8548
9705
|
exports.useSetSkillVisibility = useSetSkillVisibility;
|
|
8549
9706
|
exports.useSetTagValues = useSetTagValues;
|
|
9707
|
+
exports.useShareCalendar = useShareCalendar;
|
|
8550
9708
|
exports.useShellWorkspaces = useShellWorkspaces;
|
|
8551
9709
|
exports.useSignOut = useSignOut;
|
|
8552
9710
|
exports.useSkillSource = useSkillSource;
|
|
8553
9711
|
exports.useSkills = useSkills;
|
|
8554
9712
|
exports.useStartAgentSession = useStartAgentSession;
|
|
9713
|
+
exports.useStartCalendarAccountOAuth = useStartCalendarAccountOAuth;
|
|
8555
9714
|
exports.useStartWorkQuery = useStartWorkQuery;
|
|
9715
|
+
exports.useSubscribeCalendar = useSubscribeCalendar;
|
|
9716
|
+
exports.useSyncAccountsOnOpen = useSyncAccountsOnOpen;
|
|
9717
|
+
exports.useSyncCalendarAccount = useSyncCalendarAccount;
|
|
8556
9718
|
exports.useTagKindSchema = useTagKindSchema;
|
|
8557
9719
|
exports.useTerminateSession = useTerminateSession;
|
|
9720
|
+
exports.useUnshareCalendar = useUnshareCalendar;
|
|
9721
|
+
exports.useUpdateCalendar = useUpdateCalendar;
|
|
9722
|
+
exports.useUpdateCalendarAccount = useUpdateCalendarAccount;
|
|
8558
9723
|
exports.useUpdateContact = useUpdateContact;
|
|
8559
9724
|
exports.useUpdateConversation = useUpdateConversation;
|
|
9725
|
+
exports.useUpdateEvent = useUpdateEvent;
|
|
8560
9726
|
exports.useUpdateFact = useUpdateFact;
|
|
8561
9727
|
exports.useUpdateMailMessage = useUpdateMailMessage;
|
|
8562
9728
|
exports.useUpdateProfile = useUpdateProfile;
|