@arbidocs/react 0.5.77 → 0.5.79
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 +31 -6
- package/dist/artifacts/index.cjs +11 -11
- package/dist/artifacts/index.js +4 -4
- package/dist/calls/livekit/index.cjs +43 -43
- package/dist/calls/livekit/index.js +4 -4
- package/dist/{chunk-LBAGMNGG.js → chunk-4MNYCQ3L.js} +3 -3
- package/dist/{chunk-LBAGMNGG.js.map → chunk-4MNYCQ3L.js.map} +1 -1
- package/dist/{chunk-RDERZWMO.cjs → chunk-5IN5OGBT.cjs} +33 -33
- package/dist/{chunk-RDERZWMO.cjs.map → chunk-5IN5OGBT.cjs.map} +1 -1
- package/dist/{chunk-O2HDONQE.js → chunk-5UJ4ZKJN.js} +3 -3
- package/dist/{chunk-O2HDONQE.js.map → chunk-5UJ4ZKJN.js.map} +1 -1
- package/dist/{chunk-2MECTZLS.js → chunk-DFA2W3YH.js} +5 -5
- package/dist/{chunk-2MECTZLS.js.map → chunk-DFA2W3YH.js.map} +1 -1
- package/dist/{chunk-IHKQPOPK.cjs → chunk-I3VG2ZOT.cjs} +3 -3
- package/dist/{chunk-IHKQPOPK.cjs.map → chunk-I3VG2ZOT.cjs.map} +1 -1
- package/dist/{chunk-PMHFLOXY.cjs → chunk-KNO6K35X.cjs} +50 -50
- package/dist/{chunk-PMHFLOXY.cjs.map → chunk-KNO6K35X.cjs.map} +1 -1
- package/dist/{chunk-33PVGKXT.js → chunk-OZWAKXB2.js} +232 -70
- package/dist/chunk-OZWAKXB2.js.map +1 -0
- package/dist/{chunk-MWW54PY6.cjs → chunk-RW3URTNE.cjs} +20 -20
- package/dist/{chunk-MWW54PY6.cjs.map → chunk-RW3URTNE.cjs.map} +1 -1
- package/dist/{chunk-AOEJ744V.js → chunk-TK7ERJPE.js} +5 -2
- package/dist/{chunk-AOEJ744V.js.map → chunk-TK7ERJPE.js.map} +1 -1
- package/dist/{chunk-GQAXAZN7.cjs → chunk-U4PWVSCT.cjs} +5 -2
- package/dist/{chunk-GQAXAZN7.cjs.map → chunk-U4PWVSCT.cjs.map} +1 -1
- package/dist/{chunk-6RSVGLQY.cjs → chunk-UHXU5MHV.cjs} +265 -99
- package/dist/chunk-UHXU5MHV.cjs.map +1 -0
- package/dist/{chunk-JHN4PKWX.js → chunk-YJEZEPUB.js} +3 -3
- package/dist/{chunk-JHN4PKWX.js.map → chunk-YJEZEPUB.js.map} +1 -1
- package/dist/document-tools/core.cjs +82 -82
- package/dist/document-tools/core.d.cts +2 -2
- package/dist/document-tools/core.d.ts +2 -2
- package/dist/document-tools/core.js +2 -2
- package/dist/document-tools/index.cjs +82 -82
- package/dist/document-tools/index.d.cts +1 -1
- package/dist/document-tools/index.d.ts +1 -1
- package/dist/document-tools/index.js +2 -2
- package/dist/index.cjs +1344 -1181
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +352 -550
- package/dist/index.d.ts +352 -550
- package/dist/index.js +176 -32
- package/dist/index.js.map +1 -1
- package/dist/{query-keys.d-BFKQVevT.d.ts → query-keys.d-Dm0NL9nr.d.cts} +3 -0
- package/dist/{query-keys.d-BFKQVevT.d.cts → query-keys.d-Dm0NL9nr.d.ts} +3 -0
- package/dist/ui/index.cjs +165 -165
- package/dist/ui/index.js +2 -2
- package/package.json +5 -3
- package/dist/chunk-33PVGKXT.js.map +0 -1
- package/dist/chunk-6RSVGLQY.cjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunkGQAXAZN7_cjs = require('./chunk-GQAXAZN7.cjs');
|
|
5
|
-
var chunk5YGUBXXH_cjs = require('./chunk-5YGUBXXH.cjs');
|
|
3
|
+
var chunkUHXU5MHV_cjs = require('./chunk-UHXU5MHV.cjs');
|
|
6
4
|
var chunkDZUBZ45Y_cjs = require('./chunk-DZUBZ45Y.cjs');
|
|
5
|
+
var chunkU4PWVSCT_cjs = require('./chunk-U4PWVSCT.cjs');
|
|
6
|
+
var chunk5YGUBXXH_cjs = require('./chunk-5YGUBXXH.cjs');
|
|
7
7
|
var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
|
|
8
8
|
var reactQuery = require('@tanstack/react-query');
|
|
9
9
|
var react = require('react');
|
|
@@ -13,7 +13,7 @@ var client = require('@arbidocs/client');
|
|
|
13
13
|
function useUserSettings(options) {
|
|
14
14
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
15
15
|
return reactQuery.useQuery({
|
|
16
|
-
queryKey:
|
|
16
|
+
queryKey: chunkU4PWVSCT_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,
|
|
@@ -26,18 +26,18 @@ function useUpdateUserSettings() {
|
|
|
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: chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings() });
|
|
30
|
+
const previous = qc.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings());
|
|
31
31
|
qc.setQueryData(
|
|
32
|
-
|
|
32
|
+
chunkU4PWVSCT_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(chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
39
39
|
},
|
|
40
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
40
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.userSettings() })
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
var ALWAYS_ON = { on: true, set: () => {
|
|
@@ -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 = chunkU4PWVSCT_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);
|
|
@@ -214,13 +214,13 @@ function byActivity(a, b) {
|
|
|
214
214
|
return bt - at;
|
|
215
215
|
}
|
|
216
216
|
function cachedChats(queryClient) {
|
|
217
|
-
return queryClient.getQueryData(
|
|
217
|
+
return queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatList()) ?? [];
|
|
218
218
|
}
|
|
219
219
|
function cachedChat(queryClient, chatExtId) {
|
|
220
220
|
return cachedChats(queryClient).find((c) => c.external_id === chatExtId);
|
|
221
221
|
}
|
|
222
222
|
function upsertChat(queryClient, chat) {
|
|
223
|
-
queryClient.setQueryData(
|
|
223
|
+
queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(), (old) => {
|
|
224
224
|
if (!old) return old;
|
|
225
225
|
const rest = old.filter((c) => c.external_id !== chat.external_id);
|
|
226
226
|
return [chat, ...rest].sort(byActivity);
|
|
@@ -228,13 +228,13 @@ function upsertChat(queryClient, chat) {
|
|
|
228
228
|
}
|
|
229
229
|
function removeChat(queryClient, chatExtId) {
|
|
230
230
|
queryClient.setQueryData(
|
|
231
|
-
|
|
231
|
+
chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(),
|
|
232
232
|
(old) => old?.filter((c) => c.external_id !== chatExtId)
|
|
233
233
|
);
|
|
234
|
-
queryClient.removeQueries({ queryKey:
|
|
234
|
+
queryClient.removeQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId) });
|
|
235
235
|
}
|
|
236
236
|
function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
|
|
237
|
-
queryClient.setQueryData(
|
|
237
|
+
queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
|
|
238
238
|
if (!old) return old;
|
|
239
239
|
const without = old.messages.filter(
|
|
240
240
|
(m) => m.external_id !== message.external_id && m.external_id !== replaceOptimisticId
|
|
@@ -244,12 +244,12 @@ function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
|
|
|
244
244
|
}
|
|
245
245
|
function dropFromThread(queryClient, chatExtId, messageExtId) {
|
|
246
246
|
queryClient.setQueryData(
|
|
247
|
-
|
|
247
|
+
chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId),
|
|
248
248
|
(old) => old ? { ...old, messages: old.messages.filter((m) => m.external_id !== messageExtId) } : old
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
251
|
function replaceInThread(queryClient, chatExtId, message) {
|
|
252
|
-
queryClient.setQueryData(
|
|
252
|
+
queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
|
|
253
253
|
if (!old || !old.messages.some((m) => m.external_id === message.external_id)) return old;
|
|
254
254
|
return {
|
|
255
255
|
...old,
|
|
@@ -259,14 +259,14 @@ function replaceInThread(queryClient, chatExtId, message) {
|
|
|
259
259
|
}
|
|
260
260
|
function patchLastMessage(queryClient, chatExtId, message) {
|
|
261
261
|
queryClient.setQueryData(
|
|
262
|
-
|
|
262
|
+
chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(),
|
|
263
263
|
(old) => old?.map(
|
|
264
264
|
(c) => c.external_id === chatExtId && c.last_message?.external_id === message.external_id ? { ...c, last_message: message } : c
|
|
265
265
|
)
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
268
|
async function deleteChatMessage(arbi, queryClient, chatExtId, messageExtId) {
|
|
269
|
-
const thread = queryClient.getQueryData(
|
|
269
|
+
const thread = queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId));
|
|
270
270
|
const before = thread?.messages.find((m) => m.external_id === messageExtId);
|
|
271
271
|
const listed = cachedChat(queryClient, chatExtId);
|
|
272
272
|
const wasLast = listed?.last_message?.external_id === messageExtId ? listed.last_message : null;
|
|
@@ -287,7 +287,7 @@ async function applyChangedMessage(arbi, queryClient, chatExtId, message) {
|
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
const chat = cachedChat(queryClient, chatExtId);
|
|
290
|
-
if (!chat || !queryClient.getQueryData(
|
|
290
|
+
if (!chat || !queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
|
|
291
291
|
try {
|
|
292
292
|
replaceInThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
|
|
293
293
|
} catch (err) {
|
|
@@ -299,7 +299,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
299
299
|
const me = myChatId(arbi);
|
|
300
300
|
const chat = cachedChat(queryClient, chatExtId);
|
|
301
301
|
if (!chat) {
|
|
302
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
302
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatList() });
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
const mine = message.sender_ext_id === me;
|
|
@@ -313,7 +313,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
313
313
|
(m) => m.user.external_id === me ? { ...m, last_read_at: message.created_at } : m
|
|
314
314
|
) : chat.members
|
|
315
315
|
});
|
|
316
|
-
if (queryClient.getQueryData(
|
|
316
|
+
if (queryClient.getQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId))) {
|
|
317
317
|
try {
|
|
318
318
|
appendToThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
|
|
319
319
|
} catch (err) {
|
|
@@ -324,7 +324,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
324
324
|
function applyChatRead(arbi, queryClient, chatExtId, userExtId, lastReadAt) {
|
|
325
325
|
const me = myChatId(arbi);
|
|
326
326
|
queryClient.setQueryData(
|
|
327
|
-
|
|
327
|
+
chunkU4PWVSCT_cjs.arbiQueryKeys.chatList(),
|
|
328
328
|
(old) => old?.map(
|
|
329
329
|
(c) => c.external_id !== chatExtId ? c : {
|
|
330
330
|
...c,
|
|
@@ -350,11 +350,11 @@ async function applyChatUpdated(arbi, queryClient, chatExtId, message) {
|
|
|
350
350
|
}
|
|
351
351
|
upsertChat(queryClient, chat);
|
|
352
352
|
if (!message)
|
|
353
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
353
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatThread(chatExtId) });
|
|
354
354
|
}
|
|
355
355
|
function applyAgentDmStatus(queryClient, status) {
|
|
356
356
|
if (!["queued", "working", "done", "failed"].includes(status.status)) return;
|
|
357
|
-
queryClient.setQueryData(
|
|
357
|
+
queryClient.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
|
|
358
358
|
}
|
|
359
359
|
async function applyChatEvent(arbi, queryClient, event) {
|
|
360
360
|
const e = event;
|
|
@@ -369,13 +369,13 @@ async function applyChatEvent(arbi, queryClient, event) {
|
|
|
369
369
|
|
|
370
370
|
// src/calls/keys.ts
|
|
371
371
|
function serverCallsExperimental(queryClient) {
|
|
372
|
-
return queryClient.getQueryData(
|
|
372
|
+
return queryClient.getQueryData(chunkU4PWVSCT_cjs.callQueryKeys.config())?.experimental !== false;
|
|
373
373
|
}
|
|
374
374
|
function invalidateCall(queryClient, message) {
|
|
375
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
375
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.call(message.call_ext_id) });
|
|
376
376
|
const thread = message.log_conversation_ext_id;
|
|
377
377
|
if (thread) {
|
|
378
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
378
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.conversationActivity(thread) });
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
|
|
@@ -626,19 +626,19 @@ function applyCallEvent(queryClient, event, options = {}) {
|
|
|
626
626
|
}
|
|
627
627
|
case "call.recording": {
|
|
628
628
|
if (callExtId)
|
|
629
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
629
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
630
630
|
const state2 = browser.calls.recordingStateFrom(m);
|
|
631
631
|
relay("call.recording", callExtId && state2 ? { ...state2, call_ext_id: callExtId } : null);
|
|
632
632
|
return true;
|
|
633
633
|
}
|
|
634
634
|
case "call.recording_updated": {
|
|
635
635
|
if (callExtId)
|
|
636
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
636
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
637
637
|
return true;
|
|
638
638
|
}
|
|
639
639
|
case "call.recording_deleted": {
|
|
640
640
|
if (callExtId)
|
|
641
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
641
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
642
642
|
const recordingExtId = str(m.recording_ext_id);
|
|
643
643
|
relay(
|
|
644
644
|
"call.recording_deleted",
|
|
@@ -679,11 +679,11 @@ function useProfile(options) {
|
|
|
679
679
|
const { client, enabled } = useAccountClient();
|
|
680
680
|
const qc = reactQuery.useQueryClient();
|
|
681
681
|
react.useEffect(
|
|
682
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
682
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
683
683
|
[client, qc]
|
|
684
684
|
);
|
|
685
685
|
return reactQuery.useQuery({
|
|
686
|
-
queryKey:
|
|
686
|
+
queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.profile(),
|
|
687
687
|
queryFn: () => client.profile(),
|
|
688
688
|
enabled: (options?.enabled ?? true) && enabled,
|
|
689
689
|
staleTime: Infinity
|
|
@@ -698,9 +698,9 @@ function useUpdateProfile() {
|
|
|
698
698
|
return client.profile();
|
|
699
699
|
},
|
|
700
700
|
onSuccess: (profile) => {
|
|
701
|
-
qc.setQueryData(
|
|
702
|
-
void qc.invalidateQueries({ queryKey:
|
|
703
|
-
return qc.invalidateQueries({ queryKey:
|
|
701
|
+
qc.setQueryData(chunkU4PWVSCT_cjs.arbiQueryKeys.profile(), profile);
|
|
702
|
+
void qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.identity() });
|
|
703
|
+
return qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.workspaces() });
|
|
704
704
|
}
|
|
705
705
|
});
|
|
706
706
|
}
|
|
@@ -802,7 +802,7 @@ function arbiAccountClient(arbi, overrides = {}) {
|
|
|
802
802
|
if (everywhere) await arbi.sessions.logoutAll();
|
|
803
803
|
else await arbi.logout();
|
|
804
804
|
} finally {
|
|
805
|
-
|
|
805
|
+
chunkUHXU5MHV_cjs.clearSealedDrafts();
|
|
806
806
|
chunkDZUBZ45Y_cjs.clearChatArtifacts();
|
|
807
807
|
}
|
|
808
808
|
},
|
|
@@ -860,7 +860,7 @@ function useAccountClient() {
|
|
|
860
860
|
function useEntitlements() {
|
|
861
861
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
862
862
|
return reactQuery.useQuery({
|
|
863
|
-
queryKey:
|
|
863
|
+
queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.entitlements(),
|
|
864
864
|
queryFn: () => arbi.account.entitlements(),
|
|
865
865
|
enabled: arbi.isLoggedIn,
|
|
866
866
|
// A plan change shows on the next read; the API enforces it at once either way.
|
|
@@ -869,7 +869,7 @@ function useEntitlements() {
|
|
|
869
869
|
}
|
|
870
870
|
function useInvalidateEntitlements() {
|
|
871
871
|
const qc = reactQuery.useQueryClient();
|
|
872
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
872
|
+
return () => qc.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.entitlements() });
|
|
873
873
|
}
|
|
874
874
|
function useIsEntitled(feature) {
|
|
875
875
|
const { data } = useEntitlements();
|
|
@@ -993,7 +993,7 @@ function ensureMeetingChat(arbi, queryClient, callExtId, callKey) {
|
|
|
993
993
|
});
|
|
994
994
|
if (!ref) throw new Error("The server did not return a meeting chat");
|
|
995
995
|
if (ref.kind === "chat")
|
|
996
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
996
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.arbiQueryKeys.chatList() });
|
|
997
997
|
else void invalidateConversationLists(queryClient);
|
|
998
998
|
return ref;
|
|
999
999
|
})();
|
|
@@ -2001,7 +2001,7 @@ async function transcribeRecording(params) {
|
|
|
2001
2001
|
function useCallsConfig() {
|
|
2002
2002
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
2003
2003
|
const { data } = reactQuery.useQuery({
|
|
2004
|
-
queryKey:
|
|
2004
|
+
queryKey: chunkU4PWVSCT_cjs.callQueryKeys.config(),
|
|
2005
2005
|
queryFn: () => arbi.calls.config(),
|
|
2006
2006
|
enabled: arbi.isLoggedIn,
|
|
2007
2007
|
staleTime: 5 * 6e4,
|
|
@@ -2021,7 +2021,7 @@ function useCallTranscriptionAvailable() {
|
|
|
2021
2021
|
function useCall(callExtId) {
|
|
2022
2022
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
2023
2023
|
return reactQuery.useQuery({
|
|
2024
|
-
queryKey:
|
|
2024
|
+
queryKey: chunkU4PWVSCT_cjs.callQueryKeys.call(callExtId ?? ""),
|
|
2025
2025
|
queryFn: () => arbi.calls.get(callExtId),
|
|
2026
2026
|
enabled: !!callExtId && arbi.isLoggedIn,
|
|
2027
2027
|
staleTime: 6e4,
|
|
@@ -2031,7 +2031,7 @@ function useCall(callExtId) {
|
|
|
2031
2031
|
function useCallRecordings(callExtId, enabled = true) {
|
|
2032
2032
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
2033
2033
|
return reactQuery.useQuery({
|
|
2034
|
-
queryKey:
|
|
2034
|
+
queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordings(callExtId ?? ""),
|
|
2035
2035
|
queryFn: () => arbi.calls.recording.list(callExtId),
|
|
2036
2036
|
enabled: !!callExtId && enabled && arbi.isLoggedIn,
|
|
2037
2037
|
retry: false
|
|
@@ -2040,7 +2040,7 @@ function useCallRecordings(callExtId, enabled = true) {
|
|
|
2040
2040
|
function useCallRecording(callExtId, recordingExtId) {
|
|
2041
2041
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
2042
2042
|
return reactQuery.useQuery({
|
|
2043
|
-
queryKey:
|
|
2043
|
+
queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
|
|
2044
2044
|
queryFn: () => arbi.calls.recording.get(callExtId, recordingExtId),
|
|
2045
2045
|
enabled: !!callExtId && !!recordingExtId && arbi.isLoggedIn,
|
|
2046
2046
|
retry: false
|
|
@@ -2054,7 +2054,7 @@ function useRecordingWindows(callExtId, enabled) {
|
|
|
2054
2054
|
function useCallInviteLinks(callExtId) {
|
|
2055
2055
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
2056
2056
|
return reactQuery.useQuery({
|
|
2057
|
-
queryKey:
|
|
2057
|
+
queryKey: chunkU4PWVSCT_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
|
|
2058
2058
|
queryFn: () => arbi.calls.inviteLinks.list(callExtId),
|
|
2059
2059
|
enabled: !!callExtId && arbi.isLoggedIn,
|
|
2060
2060
|
retry: false
|
|
@@ -2066,7 +2066,7 @@ function useRecordingActions(call) {
|
|
|
2066
2066
|
return react.useMemo(
|
|
2067
2067
|
() => ({
|
|
2068
2068
|
refresh: () => void queryClient.invalidateQueries({
|
|
2069
|
-
queryKey:
|
|
2069
|
+
queryKey: chunkU4PWVSCT_cjs.callQueryKeys.recordingsOf(call.external_id)
|
|
2070
2070
|
}),
|
|
2071
2071
|
open: (recording) => openRecording(arbi, queryClient, call, recording.external_id, recording),
|
|
2072
2072
|
transcribe: async (opened, onProgress) => transcribeRecording({
|
|
@@ -2087,7 +2087,7 @@ function useRevokeCallInviteLink(callExtId) {
|
|
|
2087
2087
|
return react.useCallback(
|
|
2088
2088
|
async (inviteExtId) => {
|
|
2089
2089
|
await arbi.calls.inviteLinks.revoke(callExtId, inviteExtId);
|
|
2090
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
2090
|
+
void queryClient.invalidateQueries({ queryKey: chunkU4PWVSCT_cjs.callQueryKeys.inviteLinks(callExtId) });
|
|
2091
2091
|
},
|
|
2092
2092
|
[arbi, queryClient, callExtId]
|
|
2093
2093
|
);
|
|
@@ -2434,7 +2434,7 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
|
|
|
2434
2434
|
function useMeetingReadOnly(lockedWorkspaceExtId) {
|
|
2435
2435
|
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
2436
2436
|
const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
|
|
2437
|
-
const { data: workspaces } =
|
|
2437
|
+
const { data: workspaces } = chunkUHXU5MHV_cjs.useWorkspaces({
|
|
2438
2438
|
enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
|
|
2439
2439
|
});
|
|
2440
2440
|
return isWorkspaceGuestOf(
|
|
@@ -2669,5 +2669,5 @@ exports.useUpdateUserSettings = useUpdateUserSettings;
|
|
|
2669
2669
|
exports.useUserSettings = useUserSettings;
|
|
2670
2670
|
exports.wrapTrackKey = wrapTrackKey;
|
|
2671
2671
|
exports.writeSamples = writeSamples;
|
|
2672
|
-
//# sourceMappingURL=chunk-
|
|
2673
|
-
//# sourceMappingURL=chunk-
|
|
2672
|
+
//# sourceMappingURL=chunk-KNO6K35X.cjs.map
|
|
2673
|
+
//# sourceMappingURL=chunk-KNO6K35X.cjs.map
|