@arbidocs/react 0.5.23 → 0.5.25
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 +9 -9
- package/dist/artifacts/index.js +3 -3
- package/dist/calls/livekit/index.cjs +48 -48
- package/dist/calls/livekit/index.js +3 -3
- package/dist/{chunk-4UDIA47U.cjs → chunk-2ERRXEOB.cjs} +15 -15
- package/dist/{chunk-4UDIA47U.cjs.map → chunk-2ERRXEOB.cjs.map} +1 -1
- package/dist/{chunk-LYGJVSNM.js → chunk-CIWI5UFT.js} +3 -3
- package/dist/{chunk-LYGJVSNM.js.map → chunk-CIWI5UFT.js.map} +1 -1
- package/dist/{chunk-KRAUMKBG.js → chunk-CMNZI4WQ.js} +5 -3
- package/dist/chunk-CMNZI4WQ.js.map +1 -0
- package/dist/{chunk-3WIBD44F.js → chunk-I4JYI6GY.js} +7 -4
- package/dist/chunk-I4JYI6GY.js.map +1 -0
- package/dist/{chunk-5YWIUUUT.cjs → chunk-KC474WVG.cjs} +12 -2
- package/dist/chunk-KC474WVG.cjs.map +1 -0
- package/dist/{chunk-2HVCNYFH.js → chunk-KOLCL4KV.js} +3 -3
- package/dist/{chunk-2HVCNYFH.js.map → chunk-KOLCL4KV.js.map} +1 -1
- package/dist/{chunk-I4WI3MNH.js → chunk-L2U4GOKU.js} +4 -4
- package/dist/{chunk-I4WI3MNH.js.map → chunk-L2U4GOKU.js.map} +1 -1
- package/dist/{chunk-KGCGA452.js → chunk-MB34NKBZ.js} +2 -2
- package/dist/{chunk-KGCGA452.js.map → chunk-MB34NKBZ.js.map} +1 -1
- package/dist/{chunk-FLAZSNC5.cjs → chunk-NV5G5RR5.cjs} +31 -31
- package/dist/{chunk-FLAZSNC5.cjs.map → chunk-NV5G5RR5.cjs.map} +1 -1
- package/dist/{chunk-CZP7FF3E.cjs → chunk-ONGNP4JM.cjs} +4 -4
- package/dist/{chunk-CZP7FF3E.cjs.map → chunk-ONGNP4JM.cjs.map} +1 -1
- package/dist/{chunk-TUKW4MCI.cjs → chunk-OQWNWK74.cjs} +20 -20
- package/dist/{chunk-TUKW4MCI.cjs.map → chunk-OQWNWK74.cjs.map} +1 -1
- package/dist/{chunk-YBIW7T66.cjs → chunk-TUPSNW3B.cjs} +7 -5
- package/dist/chunk-TUPSNW3B.cjs.map +1 -0
- package/dist/{chunk-MQ7LZWGP.js → chunk-VHGJG32Q.js} +3 -3
- package/dist/{chunk-MQ7LZWGP.js.map → chunk-VHGJG32Q.js.map} +1 -1
- package/dist/{chunk-NA3FJX37.js → chunk-Y3MTRA7D.js} +11 -3
- package/dist/chunk-Y3MTRA7D.js.map +1 -0
- package/dist/{chunk-QQ7SCJRY.cjs → chunk-YIUUTRMQ.cjs} +2 -2
- package/dist/{chunk-QQ7SCJRY.cjs.map → chunk-YIUUTRMQ.cjs.map} +1 -1
- package/dist/{chunk-7NHOKV7N.cjs → chunk-YMAZYYD5.cjs} +7 -3
- package/dist/chunk-YMAZYYD5.cjs.map +1 -0
- package/dist/document-tools/index.cjs +43 -43
- package/dist/document-tools/index.js +6 -6
- package/dist/index.cjs +959 -951
- package/dist/{index.d-BO71E6NO.d.cts → index.d-BLw5AN0H.d.cts} +2 -2
- package/dist/{index.d-BO71E6NO.d.ts → index.d-BLw5AN0H.d.ts} +2 -2
- package/dist/{index.d-DscWCwr2.d.cts → index.d-DklHLjcu.d.cts} +32 -3
- package/dist/{index.d-DscWCwr2.d.ts → index.d-DklHLjcu.d.ts} +32 -3
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +17 -17
- package/dist/shell/index.cjs +34 -34
- 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/ui/index.cjs +167 -159
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/dist/viewers/index.cjs +2 -2
- package/dist/viewers/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-3WIBD44F.js.map +0 -1
- package/dist/chunk-5YWIUUUT.cjs.map +0 -1
- package/dist/chunk-7NHOKV7N.cjs.map +0 -1
- package/dist/chunk-KRAUMKBG.js.map +0 -1
- package/dist/chunk-NA3FJX37.js.map +0 -1
- package/dist/chunk-YBIW7T66.cjs.map +0 -1
|
@@ -18,5 +18,5 @@ function useDeploymentDomain() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export { useArbi, useArbiHost, useDeploymentDomain };
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-MB34NKBZ.js.map
|
|
22
|
+
//# sourceMappingURL=chunk-MB34NKBZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/host/config.ts","../src/useArbi.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/host/config.ts","../src/useArbi.ts"],"names":[],"mappings":";;;AAuHO,SAAS,WAAA,GAA8B;AAC5C,EAAA,OAAO,WAAW,eAAe,CAAA;AACnC;;;AClHO,SAAS,OAAA,GAAgB;AAC9B,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,WAAA,EAAY;AAC7B,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,MAAM,IAAI,MAAM,0DAA0D,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAA;AACT;AAOO,SAAS,mBAAA,GAA0C;AACxD,EAAA,OAAO,WAAA,EAAY,CAAE,IAAA,EAAM,mBAAA,EAAoB;AACjD","file":"chunk-MB34NKBZ.js","sourcesContent":["/**\n * What a host hands the `@arbidocs/react` hooks, as one configuration (`<ArbiHost config>`). Every\n * field is optional: without one the hooks use their own default. `@arbidocs/blocks` extends it\n * with the blocks domains (environment, billing, viewer, …).\n *\n * A field whose value lives in the host's state is a hook (`use…`), called by the hooks and kits\n * that need it, so the configuration itself stays one stable object for the host's life.\n */\n\nimport { useContext } from 'react'\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport type { AccountClient } from '../account/client'\nimport type { CalendarSupport } from '../calendar/support'\nimport type { ComponentType } from 'react'\nimport type { MeetingChatRef } from '../calls/meeting-chat'\nimport type { ActiveCall } from '../calls/session'\nimport type { ArbiChatHost } from '../chat/host'\nimport type { DocumentsSupport } from '../documents/support'\nimport type { MailClient } from '../mail/client'\nimport type { ArbiSessionStore } from '../session/store'\nimport type { DictateContextValue } from '../ui/DictateContext'\nimport type { EntityVocabulary } from '../entities/vocabulary'\nimport type { ArbiHostConnection } from './ArbiHost'\nimport { ArbiHostContext } from './context'\n\n/** The mail client, and whether mail is on for the signed-in user. */\nexport interface MailHost {\n client: MailClient\n /**\n * Whether mail reads run (signed in and entitled), and the server session the mailbox is\n * unlocked for: unlocking runs again when it changes (`null`: none yet, nothing is unlocked).\n * Absent: on, for one session.\n */\n useStatus?: () => { enabled: boolean; sessionKey: string | null }\n}\n\n/** The account client of the settings kits, and whether account reads run (signed in). */\nexport interface AccountHost {\n client: AccountClient\n /** Absent: always. */\n useEnabled?: () => boolean\n}\n\n/** A person in the call UI (a participant, a speaker, a host). */\nexport interface CallUserPillProps {\n /** Their LiveKit identity: the user ext id. */\n identity: string\n /** The call's name for them, for someone the host does not know. */\n name?: string | null\n size?: 'xs' | 'sm' | 'md' | 'lg'\n variant?: 'pill' | 'icon'\n /** Click opens a chat with them (off by default inside the call). */\n interactive?: boolean\n className?: string\n}\n\n/** Where the call panel goes in the host's layout. */\nexport type CallSlotMode = 'docked' | 'main'\n\n/** What the calls need from the host: navigation and layout are the host's. */\nexport interface CallsHost {\n /**\n * The host's switch for the call UI (call buttons, the ringer, upcoming calls), on top of the\n * server's: ARBI's Settings → Experimental toggle. Absent: on.\n */\n useEnabled?: () => boolean\n /**\n * Show a call's meeting chat: an end-to-end chat, or a workspace meeting thread. Absent: the\n * in-call \"Open meeting chat\" does nothing.\n */\n openMeetingChat?: (ref: MeetingChatRef) => void\n /**\n * Once connected, show the call's conversation (its chat and live transcript) beside the call.\n * Absent: nothing is shown.\n */\n showConversation?: (call: ActiveCall) => void | Promise<void>\n /**\n * The element whose box the shown call fills: the right-hand dock, or (a webinar's audience) the\n * main area. The host claims its slot while `shown` and calls `onLost` when another panel takes\n * it (the call then minimises). Absent: the call floats at the right edge.\n */\n useSlot?: (mode: CallSlotMode, shown: boolean, onLost: () => void) => HTMLElement | null\n /** How a person shows in the call UI. Absent: the plain user pill with the call's name. */\n UserPill?: ComponentType<CallUserPillProps>\n}\n\nexport interface ArbiHostConfig {\n /**\n * The SDK on the signed-in session. A host with its own login passes one on its session\n * (`new Arbi({ url, session })`); a blocks-only site gets one from `defaultHost`. A new instance (a\n * new session, a newly opened workspace) re-renders every hook.\n */\n arbi?: Arbi\n /** The session state the kits share. Absent: an in-memory one per top-level host. */\n session?: ArbiSessionStore\n /** Live processing, uploads and the host's document actions. Absent: the package's own. */\n documents?: DocumentsSupport\n /** The calendar kept on this device and account OAuth. Absent: online only, the user's connectors. */\n calendar?: CalendarSupport\n /** Absent: mail on the `arbi` session. */\n mail?: MailHost\n /** Absent: the account on the `arbi` session. */\n account?: AccountHost\n /** Absent: calls open no meeting chat from the room. */\n calls?: CallsHost\n /** Dictation for every `dictate` field. Absent: no mic button. */\n dictate?: DictateContextValue\n /** The sign-in layer of a blocks-only site (`defaultHost` in `@arbidocs/blocks/connect`). */\n connection?: ArbiHostConnection\n /** Where the chat engine's side effects go (documents shown, mail drafts, used-up quota). */\n chat?: ArbiChatHost\n /**\n * The site's words for the entities (`{ PROJECT: 'Matter' }`), read by every kit through\n * `getEntityLabel`. Absent: the registry's (\"Project\", \"Workspace\", \"Thread\", …).\n */\n vocabulary?: EntityVocabulary\n}\n\n/** The host configuration in scope (`{}` outside an `<ArbiHost>`). */\nexport function useArbiHost(): ArbiHostConfig {\n return useContext(ArbiHostContext) as ArbiHostConfig\n}\n","/**\n * The `Arbi` of the host configuration (`<ArbiHost config={{ arbi }}>`).\n */\n\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport { useArbiHost } from './host/config'\n\nexport function useArbi(): Arbi {\n const { arbi } = useArbiHost()\n if (!arbi) {\n throw new Error('useArbi() needs an <ArbiHost> whose config has an `arbi`')\n }\n return arbi\n}\n\n/**\n * The deployment domain the user's keys are derived for, as the host's `Arbi` computes it\n * (`deploymentDomain`, else the API URL's hostname). `undefined` without one. The document tools\n * default their `deploymentDomain` (needed for e-signing) to it.\n */\nexport function useDeploymentDomain(): string | undefined {\n return useArbiHost().arbi?.getDeploymentDomain()\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chunkRRWAX52L_cjs = require('./chunk-RRWAX52L.cjs');
|
|
4
4
|
var chunkN73IMVFF_cjs = require('./chunk-N73IMVFF.cjs');
|
|
5
5
|
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkYIUUTRMQ_cjs = require('./chunk-YIUUTRMQ.cjs');
|
|
7
7
|
var client = require('@arbidocs/client');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactQuery = require('@tanstack/react-query');
|
|
@@ -588,7 +588,7 @@ var createOwnStore = (host) => createArbiSessionStore(
|
|
|
588
588
|
var moduleDefault = null;
|
|
589
589
|
var defaultStore = () => moduleDefault ??= createArbiSessionStore();
|
|
590
590
|
function useArbiSessionStore() {
|
|
591
|
-
const host =
|
|
591
|
+
const host = chunkYIUUTRMQ_cjs.useArbiHost();
|
|
592
592
|
if (host.session) return host.session;
|
|
593
593
|
const own = host[chunkN73IMVFF_cjs.OWN_SESSION_SLOT];
|
|
594
594
|
if (own) return own.current ??= createOwnStore(host);
|
|
@@ -609,7 +609,7 @@ var SIGNED_OUT = {
|
|
|
609
609
|
var noSubscription = () => () => {
|
|
610
610
|
};
|
|
611
611
|
function useArbiSession() {
|
|
612
|
-
return useSignedInSession(
|
|
612
|
+
return useSignedInSession(chunkYIUUTRMQ_cjs.useArbiHost().arbi?.session ?? null);
|
|
613
613
|
}
|
|
614
614
|
function useSignedInSession(session) {
|
|
615
615
|
const state = react.useSyncExternalStore(
|
|
@@ -635,7 +635,7 @@ function isUsageMetered(usage, subscription) {
|
|
|
635
635
|
return !(empty && subscription === "dev");
|
|
636
636
|
}
|
|
637
637
|
function useWorkspaces(options) {
|
|
638
|
-
const arbi =
|
|
638
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
639
639
|
return reactQuery.useQuery({
|
|
640
640
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.workspaces(),
|
|
641
641
|
queryFn: () => arbi.workspaces.list(),
|
|
@@ -643,7 +643,7 @@ function useWorkspaces(options) {
|
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
645
|
function useDocumentVersionList(docId, options) {
|
|
646
|
-
const arbi =
|
|
646
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
647
647
|
return reactQuery.useQuery({
|
|
648
648
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.documentVersions(docId ?? ""),
|
|
649
649
|
queryFn: () => arbi.documents.versions(docId),
|
|
@@ -651,7 +651,7 @@ function useDocumentVersionList(docId, options) {
|
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
function useConversations(workspaceId, options) {
|
|
654
|
-
const arbi =
|
|
654
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
655
655
|
const live = options?.live === true;
|
|
656
656
|
return reactQuery.useQuery({
|
|
657
657
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.conversations(workspaceId ?? ""),
|
|
@@ -664,7 +664,7 @@ function useConversations(workspaceId, options) {
|
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
666
|
function useBuiltinCommands() {
|
|
667
|
-
const arbi =
|
|
667
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
668
668
|
const query = reactQuery.useQuery({
|
|
669
669
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.assistantCommands(),
|
|
670
670
|
queryFn: () => arbi.assistant.commands(),
|
|
@@ -675,7 +675,7 @@ function useBuiltinCommands() {
|
|
|
675
675
|
return { commands, isLoading: query.isLoading };
|
|
676
676
|
}
|
|
677
677
|
function useMessageDetails(messageId, options) {
|
|
678
|
-
const arbi =
|
|
678
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
679
679
|
return reactQuery.useQuery({
|
|
680
680
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.messageDetails(messageId ?? ""),
|
|
681
681
|
queryFn: () => arbi.conversations.getMessage(messageId),
|
|
@@ -683,7 +683,7 @@ function useMessageDetails(messageId, options) {
|
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
function useConversationThreads(conversationId, options) {
|
|
686
|
-
const arbi =
|
|
686
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
687
687
|
const session = useArbiSessionStore();
|
|
688
688
|
return reactQuery.useQuery({
|
|
689
689
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.conversationThreads(conversationId ?? ""),
|
|
@@ -711,7 +711,7 @@ var tagListKey = (query) => [
|
|
|
711
711
|
query.linksLimit !== void 0 ? `links:${query.linksLimit}` : ""
|
|
712
712
|
].filter(Boolean).join("|");
|
|
713
713
|
function useTags(workspaceId, options) {
|
|
714
|
-
const arbi =
|
|
714
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
715
715
|
const { enabled, ...query } = options ?? {};
|
|
716
716
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
717
717
|
const key = tagListKey(query);
|
|
@@ -723,7 +723,7 @@ function useTags(workspaceId, options) {
|
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
function useThumbnails(docIds, options) {
|
|
726
|
-
const arbi =
|
|
726
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
727
727
|
return reactQuery.useQuery({
|
|
728
728
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.thumbnails(docIds),
|
|
729
729
|
queryFn: () => arbi.documents.getThumbnails(docIds),
|
|
@@ -732,7 +732,7 @@ function useThumbnails(docIds, options) {
|
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
734
|
function useParsedDocument(docId, stage = "final", options) {
|
|
735
|
-
const arbi =
|
|
735
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
736
736
|
return reactQuery.useQuery({
|
|
737
737
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.parsedDoc(docId ?? "", stage),
|
|
738
738
|
queryFn: () => {
|
|
@@ -747,13 +747,13 @@ function useParsedDocument(docId, stage = "final", options) {
|
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
function useAssistantQuery() {
|
|
750
|
-
const arbi =
|
|
750
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
751
751
|
return reactQuery.useMutation({
|
|
752
752
|
mutationFn: ({ request, handlers }) => arbi.assistant.ask(request, handlers)
|
|
753
753
|
});
|
|
754
754
|
}
|
|
755
755
|
function useAgents(options) {
|
|
756
|
-
const arbi =
|
|
756
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
757
757
|
return reactQuery.useQuery({
|
|
758
758
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.agents(),
|
|
759
759
|
queryFn: () => arbi.agents.list(),
|
|
@@ -761,7 +761,7 @@ function useAgents(options) {
|
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
763
|
function useDeleteAgents() {
|
|
764
|
-
const arbi =
|
|
764
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
765
765
|
const qc = reactQuery.useQueryClient();
|
|
766
766
|
return reactQuery.useMutation({
|
|
767
767
|
mutationFn: ({ agentExtIds }) => arbi.agents.delete(agentExtIds),
|
|
@@ -780,7 +780,7 @@ function useDeleteAgents() {
|
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
function useHealth(options) {
|
|
783
|
-
const arbi =
|
|
783
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
784
784
|
return reactQuery.useQuery({
|
|
785
785
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.health(),
|
|
786
786
|
queryFn: () => arbi.health.check(),
|
|
@@ -788,7 +788,7 @@ function useHealth(options) {
|
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
function useAvailableModels(options) {
|
|
791
|
-
const arbi =
|
|
791
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
792
792
|
return reactQuery.useQuery({
|
|
793
793
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.availableModels(),
|
|
794
794
|
queryFn: () => arbi.health.models(),
|
|
@@ -797,7 +797,7 @@ function useAvailableModels(options) {
|
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
function useConfigs(options) {
|
|
800
|
-
const arbi =
|
|
800
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
801
801
|
return reactQuery.useQuery({
|
|
802
802
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.configVersions(),
|
|
803
803
|
queryFn: () => arbi.agentConfig.list(),
|
|
@@ -805,7 +805,7 @@ function useConfigs(options) {
|
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
function useConfig(configId, options) {
|
|
808
|
-
const arbi =
|
|
808
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
809
809
|
return reactQuery.useQuery({
|
|
810
810
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.config(configId ?? ""),
|
|
811
811
|
queryFn: () => arbi.agentConfig.get(configId),
|
|
@@ -814,7 +814,7 @@ function useConfig(configId, options) {
|
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
function useActivity(options) {
|
|
817
|
-
const arbi =
|
|
817
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
818
818
|
return reactQuery.useQuery({
|
|
819
819
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.activity(),
|
|
820
820
|
queryFn: () => arbi.dm.listActivity({ limit: options?.limit, offset: options?.offset }),
|
|
@@ -822,7 +822,7 @@ function useActivity(options) {
|
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
824
|
function useWorkspaceActivity(workspaceId, options) {
|
|
825
|
-
const arbi =
|
|
825
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
826
826
|
return reactQuery.useInfiniteQuery({
|
|
827
827
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.workspaceActivity(workspaceId ?? ""),
|
|
828
828
|
queryFn: async ({ pageParam }) => {
|
|
@@ -838,7 +838,7 @@ function useWorkspaceActivity(workspaceId, options) {
|
|
|
838
838
|
});
|
|
839
839
|
}
|
|
840
840
|
function useProjects(options) {
|
|
841
|
-
const arbi =
|
|
841
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
842
842
|
return reactQuery.useQuery({
|
|
843
843
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.projects(),
|
|
844
844
|
queryFn: () => arbi.projects.list(),
|
|
@@ -846,7 +846,7 @@ function useProjects(options) {
|
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
848
|
function useProjectUsage(projectExtId, monthsBack = 0, options) {
|
|
849
|
-
const arbi =
|
|
849
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
850
850
|
const usage = reactQuery.useQuery({
|
|
851
851
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.projectUsage(projectExtId ?? "", monthsBack),
|
|
852
852
|
queryFn: () => arbi.projects.usage(projectExtId, monthsBack),
|
|
@@ -858,7 +858,7 @@ function useProjectUsage(projectExtId, monthsBack = 0, options) {
|
|
|
858
858
|
return { ...usage, metered };
|
|
859
859
|
}
|
|
860
860
|
function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
|
|
861
|
-
const arbi =
|
|
861
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
862
862
|
const enabled = (options?.enabled ?? true) && arbi.isLoggedIn;
|
|
863
863
|
const projects = useProjects({ enabled: enabled && projectExtIds.length > 0 });
|
|
864
864
|
const results = reactQuery.useQueries({
|
|
@@ -932,7 +932,7 @@ function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
|
|
|
932
932
|
}, [signature]);
|
|
933
933
|
}
|
|
934
934
|
function useProjectInvoices(projectExtId, options) {
|
|
935
|
-
const arbi =
|
|
935
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
936
936
|
return reactQuery.useQuery({
|
|
937
937
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.projectInvoices(projectExtId ?? ""),
|
|
938
938
|
queryFn: () => arbi.projects.invoices(projectExtId),
|
|
@@ -940,7 +940,7 @@ function useProjectInvoices(projectExtId, options) {
|
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
942
|
function useCurrentUser(options) {
|
|
943
|
-
const arbi =
|
|
943
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
944
944
|
return reactQuery.useQuery({
|
|
945
945
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.currentUser(),
|
|
946
946
|
queryFn: () => arbi.user.me(),
|
|
@@ -950,7 +950,7 @@ function useCurrentUser(options) {
|
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
952
|
function useFirmPool(options) {
|
|
953
|
-
const arbi =
|
|
953
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
954
954
|
return reactQuery.useQuery({
|
|
955
955
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.firmPool(),
|
|
956
956
|
queryFn: () => arbi.firm.pool(),
|
|
@@ -966,7 +966,7 @@ function useBoxRole(options = {}) {
|
|
|
966
966
|
return { isBox, isBoxAdmin: isBox && !!data?.can_top_up };
|
|
967
967
|
}
|
|
968
968
|
function useTopUpFirmPool() {
|
|
969
|
-
const arbi =
|
|
969
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
970
970
|
const queryClient = reactQuery.useQueryClient();
|
|
971
971
|
return reactQuery.useMutation({
|
|
972
972
|
mutationFn: (aiAddons) => arbi.firm.topUp(aiAddons),
|
|
@@ -991,7 +991,7 @@ function useCanCreateProjects() {
|
|
|
991
991
|
return user.data?.can_create_projects;
|
|
992
992
|
}
|
|
993
993
|
function useUserUsageToday(options) {
|
|
994
|
-
const arbi =
|
|
994
|
+
const arbi = chunkYIUUTRMQ_cjs.useArbi();
|
|
995
995
|
return reactQuery.useQuery({
|
|
996
996
|
queryKey: chunkRRWAX52L_cjs.arbiQueryKeys.userUsageToday(),
|
|
997
997
|
queryFn: () => arbi.user.usageToday(),
|
|
@@ -1051,5 +1051,5 @@ exports.useTopUpFirmPool = useTopUpFirmPool;
|
|
|
1051
1051
|
exports.useUserUsageToday = useUserUsageToday;
|
|
1052
1052
|
exports.useWorkspaceActivity = useWorkspaceActivity;
|
|
1053
1053
|
exports.useWorkspaces = useWorkspaces;
|
|
1054
|
-
//# sourceMappingURL=chunk-
|
|
1055
|
-
//# sourceMappingURL=chunk-
|
|
1054
|
+
//# sourceMappingURL=chunk-NV5G5RR5.cjs.map
|
|
1055
|
+
//# sourceMappingURL=chunk-NV5G5RR5.cjs.map
|