@arbidocs/react 0.5.60 → 0.5.62
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/ProductionDialog.d-CpzslFn0.d.cts +51 -0
- package/dist/ProductionDialog.d-CpzslFn0.d.ts +51 -0
- package/dist/annotations/freeze/index.cjs +14 -14
- package/dist/annotations/freeze/index.js +3 -3
- package/dist/annotations/index.d.cts +3 -2
- package/dist/annotations/index.d.ts +3 -2
- package/dist/artifacts/index.cjs +12 -12
- package/dist/artifacts/index.js +5 -5
- package/dist/bundle-IC65W2AO.cjs +14 -0
- package/dist/{bundle-DCWPYNGD.cjs.map → bundle-IC65W2AO.cjs.map} +1 -1
- package/dist/bundle-YNOX7VIL.js +5 -0
- package/dist/{bundle-JCKKGEJE.js.map → bundle-YNOX7VIL.js.map} +1 -1
- package/dist/calls/livekit/index.cjs +54 -54
- package/dist/calls/livekit/index.js +6 -6
- package/dist/{chunk-S2W3ZOWG.js → chunk-2LV53J46.js} +85 -16
- package/dist/chunk-2LV53J46.js.map +1 -0
- package/dist/{chunk-H3HYKAS5.cjs → chunk-3BFSALPC.cjs} +3 -3
- package/dist/{chunk-H3HYKAS5.cjs.map → chunk-3BFSALPC.cjs.map} +1 -1
- package/dist/{chunk-2NFUEC5O.js → chunk-3NBPMR3X.js} +3 -3
- package/dist/{chunk-2NFUEC5O.js.map → chunk-3NBPMR3X.js.map} +1 -1
- package/dist/chunk-4DTTEUVY.js +1042 -0
- package/dist/chunk-4DTTEUVY.js.map +1 -0
- package/dist/{chunk-U64WCQP3.js → chunk-AOEJ744V.js} +25 -14
- package/dist/chunk-AOEJ744V.js.map +1 -0
- package/dist/{chunk-4E737GNX.cjs → chunk-BLBXADTN.cjs} +86 -73
- package/dist/chunk-BLBXADTN.cjs.map +1 -0
- package/dist/{chunk-X7JXQT6F.cjs → chunk-DVL7EFZZ.cjs} +42 -46
- package/dist/chunk-DVL7EFZZ.cjs.map +1 -0
- package/dist/{chunk-VAMPYLQ4.cjs → chunk-DZUBZ45Y.cjs} +78 -2
- package/dist/chunk-DZUBZ45Y.cjs.map +1 -0
- package/dist/{chunk-OSWKXZTJ.js → chunk-ER4LFZG3.js} +12 -16
- package/dist/chunk-ER4LFZG3.js.map +1 -0
- package/dist/{chunk-5HDC43MF.js → chunk-G4Z3IP4J.js} +72 -3
- package/dist/chunk-G4Z3IP4J.js.map +1 -0
- package/dist/chunk-GOJHU7RZ.cjs +1122 -0
- package/dist/chunk-GOJHU7RZ.cjs.map +1 -0
- package/dist/{chunk-G76ASVVH.cjs → chunk-GQAXAZN7.cjs} +25 -14
- package/dist/chunk-GQAXAZN7.cjs.map +1 -0
- package/dist/{chunk-TUPSNW3B.cjs → chunk-LMW46NBD.cjs} +11 -11
- package/dist/{chunk-TUPSNW3B.cjs.map → chunk-LMW46NBD.cjs.map} +1 -1
- package/dist/{chunk-KRH55LXW.js → chunk-NCMSQACC.js} +37 -24
- package/dist/chunk-NCMSQACC.js.map +1 -0
- package/dist/{chunk-A2XSLTIP.js → chunk-NIKPG4PW.js} +3 -3
- package/dist/{chunk-A2XSLTIP.js.map → chunk-NIKPG4PW.js.map} +1 -1
- package/dist/{chunk-B6I2HRRF.cjs → chunk-PC4O3JDV.cjs} +3 -3
- package/dist/{chunk-B6I2HRRF.cjs.map → chunk-PC4O3JDV.cjs.map} +1 -1
- package/dist/{chunk-M2SZQBCO.js → chunk-SI7DJWBT.js} +3 -3
- package/dist/{chunk-M2SZQBCO.js.map → chunk-SI7DJWBT.js.map} +1 -1
- package/dist/{chunk-3QK4VVPG.cjs → chunk-TGSEQGM3.cjs} +3 -3
- package/dist/{chunk-3QK4VVPG.cjs.map → chunk-TGSEQGM3.cjs.map} +1 -1
- package/dist/{chunk-LCSUCZVX.cjs → chunk-ZNQPUPX6.cjs} +118 -41
- package/dist/chunk-ZNQPUPX6.cjs.map +1 -0
- package/dist/{chunk-CMNZI4WQ.js → chunk-ZTPJNKF2.js} +4 -4
- package/dist/{chunk-CMNZI4WQ.js.map → chunk-ZTPJNKF2.js.map} +1 -1
- package/dist/document-tools/core.cjs +408 -0
- package/dist/document-tools/core.cjs.map +1 -0
- package/dist/document-tools/core.d.cts +957 -0
- package/dist/document-tools/core.d.ts +957 -0
- package/dist/document-tools/core.js +15 -0
- package/dist/document-tools/core.js.map +1 -0
- package/dist/document-tools/index.cjs +347 -1130
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +12 -950
- package/dist/document-tools/index.d.ts +12 -950
- package/dist/document-tools/index.js +13 -1034
- package/dist/document-tools/index.js.map +1 -1
- package/dist/index.cjs +1510 -1255
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BLw5AN0H.d.cts → index.d-AT7wdTWC.d.cts} +50 -2
- package/dist/{index.d-BLw5AN0H.d.ts → index.d-AT7wdTWC.d.ts} +50 -2
- package/dist/{index.d-DPVj21h1.d.ts → index.d-B0dosFZc.d.cts} +6 -6
- package/dist/{index.d-DPVj21h1.d.cts → index.d-B0dosFZc.d.ts} +6 -6
- package/dist/index.d.cts +145 -69
- package/dist/index.d.ts +145 -69
- package/dist/index.js +346 -121
- package/dist/index.js.map +1 -1
- package/dist/{query-keys.d-DEEMzkLz.d.cts → query-keys.d-BFKQVevT.d.cts} +21 -12
- package/dist/{query-keys.d-DEEMzkLz.d.ts → query-keys.d-BFKQVevT.d.ts} +21 -12
- package/dist/shell/index.cjs +68 -40
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/store.d-DkFXbWDk.d.ts +35 -0
- package/dist/store.d-GADDvC7w.d.cts +35 -0
- package/dist/ui/index.cjs +149 -149
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +11 -3
- package/dist/ProductionDialog.d-BDJwBSzj.d.ts +0 -84
- package/dist/ProductionDialog.d-DjRQFmQw.d.cts +0 -84
- package/dist/bundle-DCWPYNGD.cjs +0 -14
- package/dist/bundle-JCKKGEJE.js +0 -5
- package/dist/chunk-4E737GNX.cjs.map +0 -1
- package/dist/chunk-5HDC43MF.js.map +0 -1
- package/dist/chunk-G76ASVVH.cjs.map +0 -1
- package/dist/chunk-KRH55LXW.js.map +0 -1
- package/dist/chunk-LCSUCZVX.cjs.map +0 -1
- package/dist/chunk-OSWKXZTJ.js.map +0 -1
- package/dist/chunk-S2W3ZOWG.js.map +0 -1
- package/dist/chunk-U64WCQP3.js.map +0 -1
- package/dist/chunk-VAMPYLQ4.cjs.map +0 -1
- package/dist/chunk-X7JXQT6F.cjs.map +0 -1
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkGQAXAZN7_cjs = require('./chunk-GQAXAZN7.cjs');
|
|
4
|
+
var chunkY7S2SQH3_cjs = require('./chunk-Y7S2SQH3.cjs');
|
|
4
5
|
var chunkN73IMVFF_cjs = require('./chunk-N73IMVFF.cjs');
|
|
5
6
|
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
6
|
-
var chunkY7S2SQH3_cjs = require('./chunk-Y7S2SQH3.cjs');
|
|
7
7
|
var client = require('@arbidocs/client');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactQuery = require('@tanstack/react-query');
|
|
10
|
-
var browser = require('@arbidocs/sdk/browser');
|
|
11
10
|
|
|
12
11
|
// src/session/layout.ts
|
|
13
12
|
var PANEL_MODES = ["main", "docked", "overlay", "popout"];
|
|
@@ -1122,7 +1121,7 @@ function isUsageMetered(usage, subscription) {
|
|
|
1122
1121
|
function useWorkspaces(options) {
|
|
1123
1122
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1124
1123
|
return reactQuery.useQuery({
|
|
1125
|
-
queryKey:
|
|
1124
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.workspaces(),
|
|
1126
1125
|
queryFn: () => arbi.workspaces.list(),
|
|
1127
1126
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1128
1127
|
});
|
|
@@ -1130,7 +1129,7 @@ function useWorkspaces(options) {
|
|
|
1130
1129
|
function useDocumentVersionList(docId, options) {
|
|
1131
1130
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1132
1131
|
return reactQuery.useQuery({
|
|
1133
|
-
queryKey:
|
|
1132
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.documentVersions(docId ?? ""),
|
|
1134
1133
|
queryFn: () => arbi.documents.versions(docId),
|
|
1135
1134
|
enabled: (options?.enabled ?? true) && !!docId && arbi.hasWorkspace
|
|
1136
1135
|
});
|
|
@@ -1139,7 +1138,7 @@ function useConversations(workspaceId, options) {
|
|
|
1139
1138
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1140
1139
|
const live = options?.live === true;
|
|
1141
1140
|
return reactQuery.useQuery({
|
|
1142
|
-
queryKey:
|
|
1141
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.conversations(workspaceId ?? ""),
|
|
1143
1142
|
queryFn: () => arbi.readInWorkspace(workspaceId, () => arbi.conversations.list()),
|
|
1144
1143
|
enabled: (options?.enabled ?? true) && !!workspaceId && arbi.hasWorkspace,
|
|
1145
1144
|
placeholderData: (previous) => previous,
|
|
@@ -1151,7 +1150,7 @@ function useConversations(workspaceId, options) {
|
|
|
1151
1150
|
function useBuiltinCommands() {
|
|
1152
1151
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1153
1152
|
const query = reactQuery.useQuery({
|
|
1154
|
-
queryKey:
|
|
1153
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.assistantCommands(),
|
|
1155
1154
|
queryFn: () => arbi.assistant.commands(),
|
|
1156
1155
|
staleTime: 30 * 1e3,
|
|
1157
1156
|
enabled: arbi.isLoggedIn
|
|
@@ -1162,7 +1161,7 @@ function useBuiltinCommands() {
|
|
|
1162
1161
|
function useMessageDetails(messageId, options) {
|
|
1163
1162
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1164
1163
|
return reactQuery.useQuery({
|
|
1165
|
-
queryKey:
|
|
1164
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.messageDetails(messageId ?? ""),
|
|
1166
1165
|
queryFn: () => arbi.conversations.getMessage(messageId),
|
|
1167
1166
|
enabled: (options?.enabled ?? true) && !!messageId && arbi.isLoggedIn
|
|
1168
1167
|
});
|
|
@@ -1171,17 +1170,8 @@ function useConversationThreads(conversationId, options) {
|
|
|
1171
1170
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1172
1171
|
const session = useArbiSessionStore();
|
|
1173
1172
|
return reactQuery.useQuery({
|
|
1174
|
-
queryKey:
|
|
1175
|
-
queryFn:
|
|
1176
|
-
try {
|
|
1177
|
-
return await arbi.conversations.getThreads(conversationId);
|
|
1178
|
-
} catch (error) {
|
|
1179
|
-
if (error instanceof browser.ArbiApiError && error.status === 404) {
|
|
1180
|
-
return { conversation_ext_id: conversationId, threads: [] };
|
|
1181
|
-
}
|
|
1182
|
-
throw error;
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1173
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.conversationThreads(conversationId ?? ""),
|
|
1174
|
+
queryFn: () => arbi.conversations.getThreads(conversationId),
|
|
1185
1175
|
enabled: (options?.enabled ?? true) && !!conversationId && arbi.hasWorkspace,
|
|
1186
1176
|
staleTime: 2 * 60 * 1e3,
|
|
1187
1177
|
refetchOnWindowFocus: () => session.getState().generating[conversationId ?? ""]?.isGenerating ? false : "always",
|
|
@@ -1201,8 +1191,14 @@ function useTags(workspaceId, options) {
|
|
|
1201
1191
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
1202
1192
|
const key = tagListKey(query);
|
|
1203
1193
|
return reactQuery.useQuery({
|
|
1204
|
-
queryKey: key ?
|
|
1205
|
-
|
|
1194
|
+
queryKey: key ? chunkGQAXAZN7_cjs.arbiQueryKeys.tagList(workspace, key) : chunkGQAXAZN7_cjs.arbiQueryKeys.tags(workspace),
|
|
1195
|
+
// The request names the workspace (opened for this session first when it is not the current
|
|
1196
|
+
// one), so another workspace's tags can be listed and a switch cannot answer for it. The
|
|
1197
|
+
// current workspace's list is also read under the switch guard.
|
|
1198
|
+
queryFn: () => {
|
|
1199
|
+
const list = () => arbi.tags.list({ ...key ? query : {}, workspaceId: workspace });
|
|
1200
|
+
return workspace === arbi.getWorkspaceId() ? arbi.readInWorkspace(workspace, list) : list();
|
|
1201
|
+
},
|
|
1206
1202
|
enabled: (enabled ?? true) && !!workspace && arbi.hasWorkspace && (query.ids === void 0 || query.ids.length > 0),
|
|
1207
1203
|
...key ? {} : { staleTime: Infinity }
|
|
1208
1204
|
});
|
|
@@ -1210,7 +1206,7 @@ function useTags(workspaceId, options) {
|
|
|
1210
1206
|
function useThumbnails(docIds, options) {
|
|
1211
1207
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1212
1208
|
return reactQuery.useQuery({
|
|
1213
|
-
queryKey:
|
|
1209
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.thumbnails(docIds),
|
|
1214
1210
|
queryFn: () => arbi.documents.getThumbnails(docIds),
|
|
1215
1211
|
enabled: (options?.enabled ?? true) && docIds.length > 0 && arbi.hasWorkspace,
|
|
1216
1212
|
staleTime: 5 * 6e4
|
|
@@ -1219,7 +1215,7 @@ function useThumbnails(docIds, options) {
|
|
|
1219
1215
|
function useParsedDocument(docId, stage = "final", options) {
|
|
1220
1216
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1221
1217
|
return reactQuery.useQuery({
|
|
1222
|
-
queryKey:
|
|
1218
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.parsedDoc(docId ?? "", stage),
|
|
1223
1219
|
queryFn: () => {
|
|
1224
1220
|
const { docId: id, version } = chunkZWFMFOGP_cjs.parseVersionRef(docId);
|
|
1225
1221
|
return arbi.documents.getParsedContent(
|
|
@@ -1240,7 +1236,7 @@ function useAssistantQuery() {
|
|
|
1240
1236
|
function useAgents(options) {
|
|
1241
1237
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1242
1238
|
return reactQuery.useQuery({
|
|
1243
|
-
queryKey:
|
|
1239
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.agents(),
|
|
1244
1240
|
queryFn: () => arbi.agents.list(),
|
|
1245
1241
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
1246
1242
|
});
|
|
@@ -1252,14 +1248,14 @@ function useDeleteAgents() {
|
|
|
1252
1248
|
mutationFn: ({ agentExtIds }) => arbi.agents.delete(agentExtIds),
|
|
1253
1249
|
onSuccess: (_result, { agentExtIds }) => {
|
|
1254
1250
|
for (const id of agentExtIds) {
|
|
1255
|
-
qc.removeQueries({ queryKey:
|
|
1256
|
-
qc.removeQueries({ queryKey:
|
|
1251
|
+
qc.removeQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.agentConfig(id) });
|
|
1252
|
+
qc.removeQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.agentWorkspaces(id) });
|
|
1257
1253
|
}
|
|
1258
1254
|
return Promise.all([
|
|
1259
|
-
qc.invalidateQueries({ queryKey:
|
|
1260
|
-
qc.invalidateQueries({ queryKey:
|
|
1261
|
-
qc.invalidateQueries({ queryKey:
|
|
1262
|
-
qc.invalidateQueries({ queryKey:
|
|
1255
|
+
qc.invalidateQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.agents() }),
|
|
1256
|
+
qc.invalidateQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.workflows() }),
|
|
1257
|
+
qc.invalidateQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.allConversations() }),
|
|
1258
|
+
qc.invalidateQueries({ queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.configs() })
|
|
1263
1259
|
]);
|
|
1264
1260
|
}
|
|
1265
1261
|
});
|
|
@@ -1267,7 +1263,7 @@ function useDeleteAgents() {
|
|
|
1267
1263
|
function useHealth(options) {
|
|
1268
1264
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1269
1265
|
return reactQuery.useQuery({
|
|
1270
|
-
queryKey:
|
|
1266
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.health(),
|
|
1271
1267
|
queryFn: () => arbi.health.check(),
|
|
1272
1268
|
enabled: options?.enabled
|
|
1273
1269
|
});
|
|
@@ -1275,7 +1271,7 @@ function useHealth(options) {
|
|
|
1275
1271
|
function useAvailableModels(options) {
|
|
1276
1272
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1277
1273
|
return reactQuery.useQuery({
|
|
1278
|
-
queryKey:
|
|
1274
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.availableModels(),
|
|
1279
1275
|
queryFn: () => arbi.health.models(),
|
|
1280
1276
|
staleTime: Infinity,
|
|
1281
1277
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn
|
|
@@ -1284,7 +1280,7 @@ function useAvailableModels(options) {
|
|
|
1284
1280
|
function useConfigs(options) {
|
|
1285
1281
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1286
1282
|
return reactQuery.useQuery({
|
|
1287
|
-
queryKey:
|
|
1283
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.configVersions(),
|
|
1288
1284
|
queryFn: () => arbi.agentConfig.list(),
|
|
1289
1285
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1290
1286
|
});
|
|
@@ -1292,7 +1288,7 @@ function useConfigs(options) {
|
|
|
1292
1288
|
function useConfig(configId, options) {
|
|
1293
1289
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1294
1290
|
return reactQuery.useQuery({
|
|
1295
|
-
queryKey:
|
|
1291
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.config(configId ?? ""),
|
|
1296
1292
|
queryFn: () => arbi.agentConfig.get(configId),
|
|
1297
1293
|
staleTime: 10 * 60 * 1e3,
|
|
1298
1294
|
enabled: (options?.enabled ?? true) && !!configId && arbi.isLoggedIn
|
|
@@ -1301,7 +1297,7 @@ function useConfig(configId, options) {
|
|
|
1301
1297
|
function useActivity(options) {
|
|
1302
1298
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1303
1299
|
return reactQuery.useQuery({
|
|
1304
|
-
queryKey:
|
|
1300
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.activity(),
|
|
1305
1301
|
queryFn: () => arbi.dm.listActivity({ limit: options?.limit, offset: options?.offset }),
|
|
1306
1302
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1307
1303
|
});
|
|
@@ -1309,7 +1305,7 @@ function useActivity(options) {
|
|
|
1309
1305
|
function useWorkspaceActivity(workspaceId, options) {
|
|
1310
1306
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1311
1307
|
return reactQuery.useInfiniteQuery({
|
|
1312
|
-
queryKey:
|
|
1308
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.workspaceActivity(workspaceId ?? ""),
|
|
1313
1309
|
queryFn: async ({ pageParam }) => {
|
|
1314
1310
|
await options?.beforeFetch?.();
|
|
1315
1311
|
return arbi.workspaces.activity(workspaceId, {
|
|
@@ -1325,7 +1321,7 @@ function useWorkspaceActivity(workspaceId, options) {
|
|
|
1325
1321
|
function useProjects(options) {
|
|
1326
1322
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1327
1323
|
return reactQuery.useQuery({
|
|
1328
|
-
queryKey:
|
|
1324
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projects(),
|
|
1329
1325
|
queryFn: () => arbi.projects.list(),
|
|
1330
1326
|
enabled: options?.enabled ?? arbi.isLoggedIn
|
|
1331
1327
|
});
|
|
@@ -1333,7 +1329,7 @@ function useProjects(options) {
|
|
|
1333
1329
|
function useProjectUsage(projectExtId, monthsBack = 0, options) {
|
|
1334
1330
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1335
1331
|
const usage = reactQuery.useQuery({
|
|
1336
|
-
queryKey:
|
|
1332
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projectUsage(projectExtId ?? "", monthsBack),
|
|
1337
1333
|
queryFn: () => arbi.projects.usage(projectExtId, monthsBack),
|
|
1338
1334
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1339
1335
|
});
|
|
@@ -1348,7 +1344,7 @@ function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
|
|
|
1348
1344
|
const projects = useProjects({ enabled: enabled && projectExtIds.length > 0 });
|
|
1349
1345
|
const results = reactQuery.useQueries({
|
|
1350
1346
|
queries: projectExtIds.map((id) => ({
|
|
1351
|
-
queryKey:
|
|
1347
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projectUsage(id, monthsBack),
|
|
1352
1348
|
queryFn: () => arbi.projects.usage(id, monthsBack),
|
|
1353
1349
|
enabled: enabled && !!id
|
|
1354
1350
|
}))
|
|
@@ -1419,7 +1415,7 @@ function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
|
|
|
1419
1415
|
function useProjectInvoices(projectExtId, options) {
|
|
1420
1416
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1421
1417
|
return reactQuery.useQuery({
|
|
1422
|
-
queryKey:
|
|
1418
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projectInvoices(projectExtId ?? ""),
|
|
1423
1419
|
queryFn: () => arbi.projects.invoices(projectExtId),
|
|
1424
1420
|
enabled: (options?.enabled ?? true) && !!projectExtId && arbi.isLoggedIn
|
|
1425
1421
|
});
|
|
@@ -1427,7 +1423,7 @@ function useProjectInvoices(projectExtId, options) {
|
|
|
1427
1423
|
function useCurrentUser(options) {
|
|
1428
1424
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1429
1425
|
return reactQuery.useQuery({
|
|
1430
|
-
queryKey:
|
|
1426
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.currentUser(),
|
|
1431
1427
|
queryFn: () => arbi.user.me(),
|
|
1432
1428
|
enabled: options?.enabled ?? arbi.isLoggedIn,
|
|
1433
1429
|
refetchOnWindowFocus: true,
|
|
@@ -1437,7 +1433,7 @@ function useCurrentUser(options) {
|
|
|
1437
1433
|
function useFirmPool(options) {
|
|
1438
1434
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1439
1435
|
return reactQuery.useQuery({
|
|
1440
|
-
queryKey:
|
|
1436
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.firmPool(),
|
|
1441
1437
|
queryFn: () => arbi.firm.pool(),
|
|
1442
1438
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
1443
1439
|
retry: false,
|
|
@@ -1456,7 +1452,7 @@ function useTopUpFirmPool() {
|
|
|
1456
1452
|
return reactQuery.useMutation({
|
|
1457
1453
|
mutationFn: (aiAddons) => arbi.firm.topUp(aiAddons),
|
|
1458
1454
|
onSuccess: (result) => {
|
|
1459
|
-
queryClient.setQueryData(
|
|
1455
|
+
queryClient.setQueryData(chunkGQAXAZN7_cjs.arbiQueryKeys.firmPool(), result.pool);
|
|
1460
1456
|
}
|
|
1461
1457
|
});
|
|
1462
1458
|
}
|
|
@@ -1478,7 +1474,7 @@ function useCanCreateProjects() {
|
|
|
1478
1474
|
function useUserUsageToday(options) {
|
|
1479
1475
|
const arbi = chunkY7S2SQH3_cjs.useArbi();
|
|
1480
1476
|
return reactQuery.useQuery({
|
|
1481
|
-
queryKey:
|
|
1477
|
+
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.userUsageToday(),
|
|
1482
1478
|
queryFn: () => arbi.user.usageToday(),
|
|
1483
1479
|
enabled: (options?.enabled ?? true) && arbi.isLoggedIn,
|
|
1484
1480
|
refetchOnWindowFocus: true,
|
|
@@ -1558,5 +1554,5 @@ exports.useTransientView = useTransientView;
|
|
|
1558
1554
|
exports.useUserUsageToday = useUserUsageToday;
|
|
1559
1555
|
exports.useWorkspaceActivity = useWorkspaceActivity;
|
|
1560
1556
|
exports.useWorkspaces = useWorkspaces;
|
|
1561
|
-
//# sourceMappingURL=chunk-
|
|
1562
|
-
//# sourceMappingURL=chunk-
|
|
1557
|
+
//# sourceMappingURL=chunk-DVL7EFZZ.cjs.map
|
|
1558
|
+
//# sourceMappingURL=chunk-DVL7EFZZ.cjs.map
|