@arbidocs/react 0.5.57 → 0.5.58
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/README.md +9 -0
- package/dist/artifacts/index.cjs +14 -14
- package/dist/artifacts/index.js +4 -4
- package/dist/calls/livekit/index.cjs +49 -49
- package/dist/calls/livekit/index.js +4 -4
- package/dist/{chunk-V64EETLS.cjs → chunk-3QK4VVPG.cjs} +4 -4
- package/dist/{chunk-V64EETLS.cjs.map → chunk-3QK4VVPG.cjs.map} +1 -1
- package/dist/{chunk-WRMA2JYX.js → chunk-7VENKMLD.js} +5 -5
- package/dist/{chunk-WRMA2JYX.js.map → chunk-7VENKMLD.js.map} +1 -1
- package/dist/{chunk-2JQ7QNOO.cjs → chunk-A675AQXL.cjs} +154 -69
- package/dist/chunk-A675AQXL.cjs.map +1 -0
- package/dist/{chunk-KUGZXI7V.js → chunk-CE4RY7VA.js} +3 -3
- package/dist/{chunk-KUGZXI7V.js.map → chunk-CE4RY7VA.js.map} +1 -1
- package/dist/{chunk-RRWAX52L.cjs → chunk-G76ASVVH.cjs} +6 -2
- package/dist/chunk-G76ASVVH.cjs.map +1 -0
- package/dist/{chunk-PVUZULHI.js → chunk-J33GSXDT.js} +92 -12
- package/dist/chunk-J33GSXDT.js.map +1 -0
- package/dist/{chunk-3CVY5SGY.cjs → chunk-JNS3BOPU.cjs} +65 -65
- package/dist/{chunk-3CVY5SGY.cjs.map → chunk-JNS3BOPU.cjs.map} +1 -1
- package/dist/{chunk-UKEUDTOE.cjs → chunk-LCSUCZVX.cjs} +46 -46
- package/dist/{chunk-UKEUDTOE.cjs.map → chunk-LCSUCZVX.cjs.map} +1 -1
- package/dist/{chunk-4TKNUJKD.js → chunk-M2SZQBCO.js} +3 -3
- package/dist/{chunk-4TKNUJKD.js.map → chunk-M2SZQBCO.js.map} +1 -1
- package/dist/{chunk-DFZECLD3.js → chunk-R7YNABZY.js} +2 -2
- package/dist/chunk-R7YNABZY.js.map +1 -0
- package/dist/{chunk-JFL7BBZ6.js → chunk-S2W3ZOWG.js} +4 -4
- package/dist/{chunk-JFL7BBZ6.js.map → chunk-S2W3ZOWG.js.map} +1 -1
- package/dist/{chunk-FSPLYO52.cjs → chunk-SOOLC65L.cjs} +3 -3
- package/dist/{chunk-FSPLYO52.cjs.map → chunk-SOOLC65L.cjs.map} +1 -1
- package/dist/{chunk-PBXJFMES.js → chunk-U64WCQP3.js} +6 -2
- package/dist/chunk-U64WCQP3.js.map +1 -0
- package/dist/{chunk-YRY6DGRU.cjs → chunk-Y7S2SQH3.cjs} +2 -2
- package/dist/chunk-Y7S2SQH3.cjs.map +1 -0
- package/dist/document-tools/index.cjs +60 -60
- package/dist/document-tools/index.d.cts +2 -2
- package/dist/document-tools/index.d.ts +2 -2
- package/dist/document-tools/index.js +5 -5
- package/dist/index.cjs +2567 -1342
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1672 -1085
- package/dist/index.d.ts +1672 -1085
- package/dist/index.js +1226 -63
- package/dist/index.js.map +1 -1
- package/dist/{query-keys.d-DM2N5pzN.d.cts → query-keys.d-DEEMzkLz.d.cts} +4 -0
- package/dist/{query-keys.d-DM2N5pzN.d.ts → query-keys.d-DEEMzkLz.d.ts} +4 -0
- package/dist/ui/index.cjs +164 -164
- package/dist/ui/index.js +2 -2
- package/dist/viewers/index.cjs +2 -2
- package/dist/viewers/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-2JQ7QNOO.cjs.map +0 -1
- package/dist/chunk-DFZECLD3.js.map +0 -1
- package/dist/chunk-PBXJFMES.js.map +0 -1
- package/dist/chunk-PVUZULHI.js.map +0 -1
- package/dist/chunk-RRWAX52L.cjs.map +0 -1
- package/dist/chunk-YRY6DGRU.cjs.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunkRRWAX52L_cjs = require('./chunk-RRWAX52L.cjs');
|
|
3
|
+
var chunkA675AQXL_cjs = require('./chunk-A675AQXL.cjs');
|
|
5
4
|
var chunkVAMPYLQ4_cjs = require('./chunk-VAMPYLQ4.cjs');
|
|
5
|
+
var chunkG76ASVVH_cjs = require('./chunk-G76ASVVH.cjs');
|
|
6
6
|
var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkY7S2SQH3_cjs = require('./chunk-Y7S2SQH3.cjs');
|
|
8
8
|
var reactQuery = require('@tanstack/react-query');
|
|
9
9
|
var react = require('react');
|
|
10
10
|
var browser = require('@arbidocs/sdk/browser');
|
|
11
11
|
var client = require('@arbidocs/client');
|
|
12
12
|
|
|
13
13
|
function useUserSettings(options) {
|
|
14
|
-
const arbi =
|
|
14
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
15
15
|
return reactQuery.useQuery({
|
|
16
|
-
queryKey:
|
|
16
|
+
queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.userSettings(),
|
|
17
17
|
queryFn: () => arbi.settings.get(),
|
|
18
18
|
// Edited about once a month, and every write here patches the cache: no refetch on each mount.
|
|
19
19
|
staleTime: 30 * 60 * 1e3,
|
|
@@ -21,23 +21,23 @@ function useUserSettings(options) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function useUpdateUserSettings() {
|
|
24
|
-
const arbi =
|
|
24
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
25
25
|
const qc = reactQuery.useQueryClient();
|
|
26
26
|
return reactQuery.useMutation({
|
|
27
27
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
28
28
|
onMutate: async (patch) => {
|
|
29
|
-
await qc.cancelQueries({ queryKey:
|
|
30
|
-
const previous = qc.getQueryData(
|
|
29
|
+
await qc.cancelQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.userSettings() });
|
|
30
|
+
const previous = qc.getQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.userSettings());
|
|
31
31
|
qc.setQueryData(
|
|
32
|
-
|
|
32
|
+
chunkG76ASVVH_cjs.arbiQueryKeys.userSettings(),
|
|
33
33
|
(old) => old ? { ...old, ...patch } : old
|
|
34
34
|
);
|
|
35
35
|
return { previous };
|
|
36
36
|
},
|
|
37
37
|
onError: (_err, _patch, context) => {
|
|
38
|
-
qc.setQueryData(
|
|
38
|
+
qc.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
39
39
|
},
|
|
40
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
40
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.userSettings() })
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
var ALWAYS_ON = { on: true, set: () => {
|
|
@@ -60,7 +60,7 @@ function useLocalSwitch(source, feature) {
|
|
|
60
60
|
return { on: saved ?? fallback, set };
|
|
61
61
|
}
|
|
62
62
|
function useFeatureSwitch(feature) {
|
|
63
|
-
const source =
|
|
63
|
+
const source = chunkY7S2SQH3_cjs.useArbiHost().features?.[feature];
|
|
64
64
|
const useSource = !source ? useUnlisted : "userSetting" in source ? useUserSettingSwitch : useLocalSwitch;
|
|
65
65
|
return useSource(source, feature);
|
|
66
66
|
}
|
|
@@ -150,7 +150,7 @@ var LISTS = {
|
|
|
150
150
|
};
|
|
151
151
|
function patchConversationList(queryClient, workspaceId, reducer) {
|
|
152
152
|
if (!workspaceId) return;
|
|
153
|
-
const key =
|
|
153
|
+
const key = chunkG76ASVVH_cjs.arbiQueryKeys.conversations(workspaceId);
|
|
154
154
|
const current = queryClient.getQueryData(key) ?? [];
|
|
155
155
|
const next = reducer(current);
|
|
156
156
|
if (next !== current) queryClient.setQueryData(key, next);
|
|
@@ -218,13 +218,13 @@ function byActivity(a, b) {
|
|
|
218
218
|
return bt - at;
|
|
219
219
|
}
|
|
220
220
|
function cachedChats(queryClient) {
|
|
221
|
-
return queryClient.getQueryData(
|
|
221
|
+
return queryClient.getQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatList()) ?? [];
|
|
222
222
|
}
|
|
223
223
|
function cachedChat(queryClient, chatExtId) {
|
|
224
224
|
return cachedChats(queryClient).find((c) => c.external_id === chatExtId);
|
|
225
225
|
}
|
|
226
226
|
function upsertChat(queryClient, chat) {
|
|
227
|
-
queryClient.setQueryData(
|
|
227
|
+
queryClient.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatList(), (old) => {
|
|
228
228
|
if (!old) return old;
|
|
229
229
|
const rest = old.filter((c) => c.external_id !== chat.external_id);
|
|
230
230
|
return [chat, ...rest].sort(byActivity);
|
|
@@ -232,13 +232,13 @@ function upsertChat(queryClient, chat) {
|
|
|
232
232
|
}
|
|
233
233
|
function removeChat(queryClient, chatExtId) {
|
|
234
234
|
queryClient.setQueryData(
|
|
235
|
-
|
|
235
|
+
chunkG76ASVVH_cjs.arbiQueryKeys.chatList(),
|
|
236
236
|
(old) => old?.filter((c) => c.external_id !== chatExtId)
|
|
237
237
|
);
|
|
238
|
-
queryClient.removeQueries({ queryKey:
|
|
238
|
+
queryClient.removeQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId) });
|
|
239
239
|
}
|
|
240
240
|
function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
|
|
241
|
-
queryClient.setQueryData(
|
|
241
|
+
queryClient.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
|
|
242
242
|
if (!old) return old;
|
|
243
243
|
const without = old.messages.filter(
|
|
244
244
|
(m) => m.external_id !== message.external_id && m.external_id !== replaceOptimisticId
|
|
@@ -248,12 +248,12 @@ function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
|
|
|
248
248
|
}
|
|
249
249
|
function dropFromThread(queryClient, chatExtId, messageExtId) {
|
|
250
250
|
queryClient.setQueryData(
|
|
251
|
-
|
|
251
|
+
chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId),
|
|
252
252
|
(old) => old ? { ...old, messages: old.messages.filter((m) => m.external_id !== messageExtId) } : old
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
255
|
function replaceInThread(queryClient, chatExtId, message) {
|
|
256
|
-
queryClient.setQueryData(
|
|
256
|
+
queryClient.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
|
|
257
257
|
if (!old || !old.messages.some((m) => m.external_id === message.external_id)) return old;
|
|
258
258
|
return {
|
|
259
259
|
...old,
|
|
@@ -263,14 +263,14 @@ function replaceInThread(queryClient, chatExtId, message) {
|
|
|
263
263
|
}
|
|
264
264
|
function patchLastMessage(queryClient, chatExtId, message) {
|
|
265
265
|
queryClient.setQueryData(
|
|
266
|
-
|
|
266
|
+
chunkG76ASVVH_cjs.arbiQueryKeys.chatList(),
|
|
267
267
|
(old) => old?.map(
|
|
268
268
|
(c) => c.external_id === chatExtId && c.last_message?.external_id === message.external_id ? { ...c, last_message: message } : c
|
|
269
269
|
)
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
272
|
async function deleteChatMessage(arbi, queryClient, chatExtId, messageExtId) {
|
|
273
|
-
const thread = queryClient.getQueryData(
|
|
273
|
+
const thread = queryClient.getQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId));
|
|
274
274
|
const before = thread?.messages.find((m) => m.external_id === messageExtId);
|
|
275
275
|
const listed = cachedChat(queryClient, chatExtId);
|
|
276
276
|
const wasLast = listed?.last_message?.external_id === messageExtId ? listed.last_message : null;
|
|
@@ -291,7 +291,7 @@ async function applyChangedMessage(arbi, queryClient, chatExtId, message) {
|
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
const chat = cachedChat(queryClient, chatExtId);
|
|
294
|
-
if (!chat || !queryClient.getQueryData(
|
|
294
|
+
if (!chat || !queryClient.getQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
|
|
295
295
|
try {
|
|
296
296
|
replaceInThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
|
|
297
297
|
} catch (err) {
|
|
@@ -303,7 +303,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
303
303
|
const me = myChatId(arbi);
|
|
304
304
|
const chat = cachedChat(queryClient, chatExtId);
|
|
305
305
|
if (!chat) {
|
|
306
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
306
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.chatList() });
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
const mine = message.sender_ext_id === me;
|
|
@@ -317,7 +317,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
317
317
|
(m) => m.user.external_id === me ? { ...m, last_read_at: message.created_at } : m
|
|
318
318
|
) : chat.members
|
|
319
319
|
});
|
|
320
|
-
if (queryClient.getQueryData(
|
|
320
|
+
if (queryClient.getQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId))) {
|
|
321
321
|
try {
|
|
322
322
|
appendToThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
|
|
323
323
|
} catch (err) {
|
|
@@ -328,7 +328,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
328
328
|
function applyChatRead(arbi, queryClient, chatExtId, userExtId, lastReadAt) {
|
|
329
329
|
const me = myChatId(arbi);
|
|
330
330
|
queryClient.setQueryData(
|
|
331
|
-
|
|
331
|
+
chunkG76ASVVH_cjs.arbiQueryKeys.chatList(),
|
|
332
332
|
(old) => old?.map(
|
|
333
333
|
(c) => c.external_id !== chatExtId ? c : {
|
|
334
334
|
...c,
|
|
@@ -354,11 +354,11 @@ async function applyChatUpdated(arbi, queryClient, chatExtId, message) {
|
|
|
354
354
|
}
|
|
355
355
|
upsertChat(queryClient, chat);
|
|
356
356
|
if (!message)
|
|
357
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
357
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.chatThread(chatExtId) });
|
|
358
358
|
}
|
|
359
359
|
function applyAgentDmStatus(queryClient, status) {
|
|
360
360
|
if (!["queued", "working", "done", "failed"].includes(status.status)) return;
|
|
361
|
-
queryClient.setQueryData(
|
|
361
|
+
queryClient.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
|
|
362
362
|
}
|
|
363
363
|
async function applyChatEvent(arbi, queryClient, event) {
|
|
364
364
|
const e = event;
|
|
@@ -373,13 +373,13 @@ async function applyChatEvent(arbi, queryClient, event) {
|
|
|
373
373
|
|
|
374
374
|
// src/calls/keys.ts
|
|
375
375
|
function serverCallsExperimental(queryClient) {
|
|
376
|
-
return queryClient.getQueryData(
|
|
376
|
+
return queryClient.getQueryData(chunkG76ASVVH_cjs.callQueryKeys.config())?.experimental !== false;
|
|
377
377
|
}
|
|
378
378
|
function invalidateCall(queryClient, message) {
|
|
379
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
379
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.callQueryKeys.call(message.call_ext_id) });
|
|
380
380
|
const thread = message.log_conversation_ext_id;
|
|
381
381
|
if (thread) {
|
|
382
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
382
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.conversationActivity(thread) });
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
|
|
@@ -630,19 +630,19 @@ function applyCallEvent(queryClient, event, options = {}) {
|
|
|
630
630
|
}
|
|
631
631
|
case "call.recording": {
|
|
632
632
|
if (callExtId)
|
|
633
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
633
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
634
634
|
const state2 = browser.calls.recordingStateFrom(m);
|
|
635
635
|
relay("call.recording", callExtId && state2 ? { ...state2, call_ext_id: callExtId } : null);
|
|
636
636
|
return true;
|
|
637
637
|
}
|
|
638
638
|
case "call.recording_updated": {
|
|
639
639
|
if (callExtId)
|
|
640
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
640
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
641
641
|
return true;
|
|
642
642
|
}
|
|
643
643
|
case "call.recording_deleted": {
|
|
644
644
|
if (callExtId)
|
|
645
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
645
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
646
646
|
const recordingExtId = str(m.recording_ext_id);
|
|
647
647
|
relay(
|
|
648
648
|
"call.recording_deleted",
|
|
@@ -683,11 +683,11 @@ function useProfile(options) {
|
|
|
683
683
|
const { client, enabled } = useAccountClient();
|
|
684
684
|
const qc = reactQuery.useQueryClient();
|
|
685
685
|
react.useEffect(
|
|
686
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
686
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
687
687
|
[client, qc]
|
|
688
688
|
);
|
|
689
689
|
return reactQuery.useQuery({
|
|
690
|
-
queryKey:
|
|
690
|
+
queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.profile(),
|
|
691
691
|
queryFn: () => client.profile(),
|
|
692
692
|
enabled: (options?.enabled ?? true) && enabled,
|
|
693
693
|
staleTime: Infinity
|
|
@@ -702,9 +702,9 @@ function useUpdateProfile() {
|
|
|
702
702
|
return client.profile();
|
|
703
703
|
},
|
|
704
704
|
onSuccess: (profile) => {
|
|
705
|
-
qc.setQueryData(
|
|
706
|
-
void qc.invalidateQueries({ queryKey:
|
|
707
|
-
return qc.invalidateQueries({ queryKey:
|
|
705
|
+
qc.setQueryData(chunkG76ASVVH_cjs.arbiQueryKeys.profile(), profile);
|
|
706
|
+
void qc.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.identity() });
|
|
707
|
+
return qc.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.workspaces() });
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
}
|
|
@@ -806,7 +806,7 @@ function arbiAccountClient(arbi, overrides = {}) {
|
|
|
806
806
|
if (everywhere) await arbi.sessions.logoutAll();
|
|
807
807
|
else await arbi.logout();
|
|
808
808
|
} finally {
|
|
809
|
-
|
|
809
|
+
chunkA675AQXL_cjs.clearSealedDrafts();
|
|
810
810
|
}
|
|
811
811
|
},
|
|
812
812
|
requestDeletion: () => arbi.account.requestDeletion(),
|
|
@@ -850,7 +850,7 @@ var NO_ACCOUNT = {
|
|
|
850
850
|
};
|
|
851
851
|
var ALWAYS = () => true;
|
|
852
852
|
function useAccountClient() {
|
|
853
|
-
const { account, arbi } =
|
|
853
|
+
const { account, arbi } = chunkY7S2SQH3_cjs.useArbiHost();
|
|
854
854
|
const fallback = react.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
|
|
855
855
|
const useEnabled = account?.useEnabled ?? ALWAYS;
|
|
856
856
|
const enabled = useEnabled();
|
|
@@ -861,9 +861,9 @@ function useAccountClient() {
|
|
|
861
861
|
return { client: fallback, enabled: arbi.isLoggedIn };
|
|
862
862
|
}
|
|
863
863
|
function useEntitlements() {
|
|
864
|
-
const arbi =
|
|
864
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
865
865
|
return reactQuery.useQuery({
|
|
866
|
-
queryKey:
|
|
866
|
+
queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.entitlements(),
|
|
867
867
|
queryFn: () => arbi.account.entitlements(),
|
|
868
868
|
enabled: arbi.isLoggedIn,
|
|
869
869
|
// A plan change shows on the next read; the API enforces it at once either way.
|
|
@@ -992,7 +992,7 @@ function ensureMeetingChat(arbi, queryClient, callExtId, callKey) {
|
|
|
992
992
|
});
|
|
993
993
|
if (!ref) throw new Error("The server did not return a meeting chat");
|
|
994
994
|
if (ref.kind === "chat")
|
|
995
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
995
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.arbiQueryKeys.chatList() });
|
|
996
996
|
else void invalidateConversationLists(queryClient);
|
|
997
997
|
return ref;
|
|
998
998
|
})();
|
|
@@ -1998,9 +1998,9 @@ async function transcribeRecording(params) {
|
|
|
1998
1998
|
return { stored, failed };
|
|
1999
1999
|
}
|
|
2000
2000
|
function useCallsConfig() {
|
|
2001
|
-
const arbi =
|
|
2001
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2002
2002
|
const { data } = reactQuery.useQuery({
|
|
2003
|
-
queryKey:
|
|
2003
|
+
queryKey: chunkG76ASVVH_cjs.callQueryKeys.config(),
|
|
2004
2004
|
queryFn: () => arbi.calls.config(),
|
|
2005
2005
|
enabled: arbi.isLoggedIn,
|
|
2006
2006
|
staleTime: 5 * 6e4,
|
|
@@ -2018,9 +2018,9 @@ function useCallTranscriptionAvailable() {
|
|
|
2018
2018
|
return useCallsConfig()?.transcription_available === true;
|
|
2019
2019
|
}
|
|
2020
2020
|
function useCall(callExtId) {
|
|
2021
|
-
const arbi =
|
|
2021
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2022
2022
|
return reactQuery.useQuery({
|
|
2023
|
-
queryKey:
|
|
2023
|
+
queryKey: chunkG76ASVVH_cjs.callQueryKeys.call(callExtId ?? ""),
|
|
2024
2024
|
queryFn: () => arbi.calls.get(callExtId),
|
|
2025
2025
|
enabled: !!callExtId && arbi.isLoggedIn,
|
|
2026
2026
|
staleTime: 6e4,
|
|
@@ -2028,18 +2028,18 @@ function useCall(callExtId) {
|
|
|
2028
2028
|
});
|
|
2029
2029
|
}
|
|
2030
2030
|
function useCallRecordings(callExtId, enabled = true) {
|
|
2031
|
-
const arbi =
|
|
2031
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2032
2032
|
return reactQuery.useQuery({
|
|
2033
|
-
queryKey:
|
|
2033
|
+
queryKey: chunkG76ASVVH_cjs.callQueryKeys.recordings(callExtId ?? ""),
|
|
2034
2034
|
queryFn: () => arbi.calls.recording.list(callExtId),
|
|
2035
2035
|
enabled: !!callExtId && enabled && arbi.isLoggedIn,
|
|
2036
2036
|
retry: false
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
2039
|
function useCallRecording(callExtId, recordingExtId) {
|
|
2040
|
-
const arbi =
|
|
2040
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2041
2041
|
return reactQuery.useQuery({
|
|
2042
|
-
queryKey:
|
|
2042
|
+
queryKey: chunkG76ASVVH_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
|
|
2043
2043
|
queryFn: () => arbi.calls.recording.get(callExtId, recordingExtId),
|
|
2044
2044
|
enabled: !!callExtId && !!recordingExtId && arbi.isLoggedIn,
|
|
2045
2045
|
retry: false
|
|
@@ -2051,21 +2051,21 @@ function useRecordingWindows(callExtId, enabled) {
|
|
|
2051
2051
|
return react.useMemo(() => data ? recordingWindowsOf(data) : NO_WINDOWS, [data]);
|
|
2052
2052
|
}
|
|
2053
2053
|
function useCallInviteLinks(callExtId) {
|
|
2054
|
-
const arbi =
|
|
2054
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2055
2055
|
return reactQuery.useQuery({
|
|
2056
|
-
queryKey:
|
|
2056
|
+
queryKey: chunkG76ASVVH_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
|
|
2057
2057
|
queryFn: () => arbi.calls.inviteLinks.list(callExtId),
|
|
2058
2058
|
enabled: !!callExtId && arbi.isLoggedIn,
|
|
2059
2059
|
retry: false
|
|
2060
2060
|
});
|
|
2061
2061
|
}
|
|
2062
2062
|
function useRecordingActions(call) {
|
|
2063
|
-
const arbi =
|
|
2063
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2064
2064
|
const queryClient = reactQuery.useQueryClient();
|
|
2065
2065
|
return react.useMemo(
|
|
2066
2066
|
() => ({
|
|
2067
2067
|
refresh: () => void queryClient.invalidateQueries({
|
|
2068
|
-
queryKey:
|
|
2068
|
+
queryKey: chunkG76ASVVH_cjs.callQueryKeys.recordingsOf(call.external_id)
|
|
2069
2069
|
}),
|
|
2070
2070
|
open: (recording) => openRecording(arbi, queryClient, call, recording.external_id, recording),
|
|
2071
2071
|
transcribe: async (opened, onProgress) => transcribeRecording({
|
|
@@ -2081,12 +2081,12 @@ function useRecordingActions(call) {
|
|
|
2081
2081
|
);
|
|
2082
2082
|
}
|
|
2083
2083
|
function useRevokeCallInviteLink(callExtId) {
|
|
2084
|
-
const arbi =
|
|
2084
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2085
2085
|
const queryClient = reactQuery.useQueryClient();
|
|
2086
2086
|
return react.useCallback(
|
|
2087
2087
|
async (inviteExtId) => {
|
|
2088
2088
|
await arbi.calls.inviteLinks.revoke(callExtId, inviteExtId);
|
|
2089
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
2089
|
+
void queryClient.invalidateQueries({ queryKey: chunkG76ASVVH_cjs.callQueryKeys.inviteLinks(callExtId) });
|
|
2090
2090
|
},
|
|
2091
2091
|
[arbi, queryClient, callExtId]
|
|
2092
2092
|
);
|
|
@@ -2143,7 +2143,7 @@ async function saveRecordingFilesToThread(arbi, params) {
|
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
2145
|
function useSaveToThread() {
|
|
2146
|
-
const arbi =
|
|
2146
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2147
2147
|
const queryClient = reactQuery.useQueryClient();
|
|
2148
2148
|
return react.useMemo(() => {
|
|
2149
2149
|
const thenRefresh = async (run) => {
|
|
@@ -2430,9 +2430,9 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
|
|
|
2430
2430
|
return workspace?.users?.find((wu) => wu.user.external_id === me)?.role === "guest";
|
|
2431
2431
|
}
|
|
2432
2432
|
function useMeetingReadOnly(lockedWorkspaceExtId) {
|
|
2433
|
-
const arbi =
|
|
2433
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2434
2434
|
const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
|
|
2435
|
-
const { data: workspaces } =
|
|
2435
|
+
const { data: workspaces } = chunkA675AQXL_cjs.useWorkspaces({
|
|
2436
2436
|
enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
|
|
2437
2437
|
});
|
|
2438
2438
|
return isWorkspaceGuestOf(
|
|
@@ -2455,9 +2455,9 @@ function useCanHostCalls() {
|
|
|
2455
2455
|
return callsEnabled && entitled;
|
|
2456
2456
|
}
|
|
2457
2457
|
function useOpenCallMeetingChat() {
|
|
2458
|
-
const arbi =
|
|
2458
|
+
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
2459
2459
|
const queryClient = reactQuery.useQueryClient();
|
|
2460
|
-
const open =
|
|
2460
|
+
const open = chunkY7S2SQH3_cjs.useArbiHost().calls?.openMeetingChat;
|
|
2461
2461
|
return react.useCallback(
|
|
2462
2462
|
async (target) => {
|
|
2463
2463
|
try {
|
|
@@ -2667,5 +2667,5 @@ exports.useUpdateUserSettings = useUpdateUserSettings;
|
|
|
2667
2667
|
exports.useUserSettings = useUserSettings;
|
|
2668
2668
|
exports.wrapTrackKey = wrapTrackKey;
|
|
2669
2669
|
exports.writeSamples = writeSamples;
|
|
2670
|
-
//# sourceMappingURL=chunk-
|
|
2671
|
-
//# sourceMappingURL=chunk-
|
|
2670
|
+
//# sourceMappingURL=chunk-JNS3BOPU.cjs.map
|
|
2671
|
+
//# sourceMappingURL=chunk-JNS3BOPU.cjs.map
|