@arbidocs/react 0.4.75 → 0.4.77

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/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, ComponentType } from 'react';
3
3
  import * as _arbidocs_sdk_browser from '@arbidocs/sdk/browser';
4
- import { ArbiOptions, QueryOptions, Arbi, SSEStreamResult, SSEStreamStartData, UserMessageEvent, MessageMetadataPayload, ResponseOutputItemDoneEvent, ArtifactEvent, StepActionRequest, UpdateConversationRequest, UpdateWorkflowRequest, LoginProfile } from '@arbidocs/sdk/browser';
4
+ import { ArbiOptions, QueryOptions, Arbi, SSEStreamResult, SSEStreamStartData, UserMessageEvent, MessageMetadataPayload, ResponseOutputItemDoneEvent, ArtifactEvent, StepActionRequest, UpdateConversationRequest, UpdateWorkflowRequest, TagMatrixSelection, TagFieldDefinition, ProjectEventKind, ProjectUpdateRequest, LoginProfile } from '@arbidocs/sdk/browser';
5
5
  export { ActivityKind, ActivityResponse, AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, AuthMode, ConversationResponse, CreateFactRequest, CreateWorkRequest, CreateWorkflowRequest, FactResponse, FactSearchRequest, FactSearchResponse, LoginProfile, MessageMetadataPayload, OutputTokensDetails, PendingAuthResponse, PlanWorkRequest, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, SkillSummary, TaskPlan, UpdateConversationRequest, UpdateWorkflowRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkStatus, WorkflowAuthMode, WorkflowResponse, WorkflowRunResponse } from '@arbidocs/sdk/browser';
6
6
  import * as _arbidocs_client from '@arbidocs/client';
7
7
  import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
@@ -9,6 +9,7 @@ export { WebSocketServerMessage, WsBatchCompleteMessage, WsConversationMessagePo
9
9
  import * as zustand from 'zustand';
10
10
  import * as _tanstack_query_core from '@tanstack/query-core';
11
11
  import * as _tanstack_react_query from '@tanstack/react-query';
12
+ import { QueryClient } from '@tanstack/react-query';
12
13
  import { ao as IdentityStatus, am as IdentityPurchase, ap as IdentityStep, aq as IdentityVerificationFlow, ab as EntityIconComponent } from './index-BVMBElCu.cjs';
13
14
  export { A as AgentBadge, a as AiMarkdown, b as Avatar, c as AvatarFallback, d as AvatarImage, B as BASE_COLORS, e as Badge, f as BadgeProps, g as Button, h as ButtonProps, C as Card, i as CardContent, j as CardDescription, k as CardFooter, l as CardHeader, m as CardProps, n as CardTitle, o as Checkbox, p as Collapsible, q as CollapsibleContent, r as CollapsibleTrigger, s as Command, t as CommandDialog, u as CommandEmpty, v as CommandGroup, w as CommandInput, x as CommandItem, y as CommandList, z as CommandSeparator, D as CommandShortcut, E as Dialog, F as DialogClose, G as DialogContent, H as DialogDescription, I as DialogFooter, J as DialogHeader, K as DialogOverlay, L as DialogPortal, M as DialogPresentation, N as DialogTitle, O as DialogTrigger, P as DictateContextValue, Q as DictateProvider, R as DocumentCard, S as DocumentCardProps, T as DocumentEntity, U as DocumentEntityProps, V as DocumentLike, W as DropdownMenu, X as DropdownMenuCheckboxItem, Y as DropdownMenuContent, Z as DropdownMenuGroup, _ as DropdownMenuItem, $ as DropdownMenuLabel, a0 as DropdownMenuPortal, a1 as DropdownMenuRadioGroup, a2 as DropdownMenuRadioItem, a3 as DropdownMenuSeparator, a4 as DropdownMenuShortcut, a5 as DropdownMenuSub, a6 as DropdownMenuSubContent, a7 as DropdownMenuSubTrigger, a8 as DropdownMenuTrigger, a9 as ENTITY_MAPPINGS, aa as EntityIcon, ac as EntityPill, ad as EntityRegistryOverride, ae as EntityType, af as HoverCard, ag as HoverCardContent, ah as HoverCardTrigger, ai as IconToggle, aj as IconToggleProps, ak as IdentityBusy, al as IdentityProblem, an as IdentityState, ar as Input, as as InputProps, at as Label, au as MarkMenu, av as MarkMenuItem, aw as MarkMenuProps, ax as MarkdownRenderer, ay as MarkdownRendererProps, az as MarkdownStreamingContext, aA as NEUTRAL_GRAY, aB as PLACEHOLDER_COLOR, aC as PassageCard, aD as PassageCardProps, aE as Popover, aF as PopoverAnchor, aG as PopoverContent, aH as PopoverTrigger, aI as PortalContainerProvider, aJ as PresenceDisplayStatus, aK as PresenceLabel, aL as Progress, aM as ProjectEntity, aN as ProjectEntityProps, aO as ProjectRelation, aP as RadioGroup, aQ as RadioGroupItem, aR as Rag, aS as RagDot, aT as RelevanceDot, aU as ScrollArea, aV as ScrollBar, aW as Select, aX as SelectContent, aY as SelectGroup, aZ as SelectItem, a_ as SelectLabel, a$ as SelectScrollDownButton, b0 as SelectScrollUpButton, b1 as SelectSeparator, b2 as SelectTrigger, b3 as SelectValue, b4 as Separator, b5 as Slider, b6 as StatusBadgeComponent, b7 as StatusBadgeProps, b8 as StatusPill, b9 as StatusPillProps, ba as StatusVariant, bb as Switch, bc as TAG_TYPE_ICONS, bd as TAG_TYPE_LABELS, be as Table, bf as TableBody, bg as TableCaption, bh as TableCell, bi as TableFooter, bj as TableHead, bk as TableHeader, bl as TableRow, bm as Tabs, bn as TabsContent, bo as TabsList, bp as TabsTrigger, bq as TagEntity, br as TagEntityProps, bs as TagLike, bt as Textarea, bu as TextareaProps, bv as ThreadVisibilityIcon, bw as Toggle, bx as ToggleGroup, by as ToggleGroupItem, bz as Tooltip, bA as TooltipContent, bB as TooltipProvider, bC as TooltipTrigger, bD as UserEntity, bE as UserEntityProps, bF as UserMenu, bG as UserMenuItem, bH as UserMenuProps, bI as UserMenuStatus, bJ as VISIBILITY_ICONS, bK as VerifiedBadge, bL as VerifiedBadgeProps, bM as VisibilityIcon, bN as VisibilityToggle, bO as VisibilityToggleProps, bP as badgeVariants, bQ as buttonVariants, bR as cardVariants, bS as closeOpenEmphasis, bT as cn, bU as configureEntityRegistry, bV as configureRagLabels, bW as configureStatusRegistry, bX as getDocIcon, bY as getEntityColor, bZ as getEntityColorStyles, b_ as getEntityIcon, b$ as getEntityLabel, c0 as getStatusVariant, c1 as getTagTypeIcon, c2 as getTagTypeLabel, c3 as getWorkspaceColor, c4 as markdownBaseComponents, c5 as normalizeCitationMarkup, c6 as splitMarkdownBlocks, c7 as toggleVariants, c8 as trimOpenCitation, c9 as usePortalContainer } from './index-BVMBElCu.cjs';
14
15
  import { VerificationResult } from '@didit-protocol/sdk-web';
@@ -88,7 +89,14 @@ interface ArbiChatMessage {
88
89
  stopped?: boolean;
89
90
  /** The backend id of a finished assistant answer: what a follow-up chains from. */
90
91
  responseId?: string;
92
+ /**
93
+ * A user message the server sent to start a workflow's step (its `tools.workflow_step`): the
94
+ * step's id. A chat shows it as that step, not as the raw instruction.
95
+ */
96
+ workflowStep?: string;
91
97
  }
98
+ /** The workflow step a stored message starts (its `tools.workflow_step` marker), if any. */
99
+ declare function workflowStepOf(tools: object | null | undefined): string | undefined;
92
100
  interface ArbiChatThread {
93
101
  id: string;
94
102
  /** The backend title, else the first question; empty until there is one. */
@@ -529,6 +537,10 @@ declare const arbiQueryKeys: {
529
537
  allConversations: () => readonly ["arbi", "conversations"];
530
538
  conversationThreads: (workspaceId: string, conversationId: string) => readonly ["arbi", "conversations", string, "threads", string];
531
539
  tags: (workspaceId: string) => readonly ["arbi", "tags", string];
540
+ /** Under the workspace's tags: a tag, doctag or fact write that invalidates `tags` refreshes it. */
541
+ tagMatrix: (workspaceId: string, selection: string, linksLimit: number | undefined) => readonly ["arbi", "tags", string, "matrix", string, number | "default"];
542
+ /** Under the conversations prefix: every step action or conversation write refreshes it. */
543
+ conversationUsage: (conversationId: string) => readonly ["arbi", "conversations", string, "usage"];
532
544
  thumbnails: (docIds: string[]) => readonly ["arbi", "thumbnails", string];
533
545
  parsedDoc: (docId: string, stage: string) => readonly ["arbi", "parsedDoc", string, string];
534
546
  agents: () => readonly ["arbi", "agents"];
@@ -539,7 +551,12 @@ declare const arbiQueryKeys: {
539
551
  configs: () => readonly ["arbi", "configs"];
540
552
  activity: () => readonly ["arbi", "activity"];
541
553
  projects: () => readonly ["arbi", "projects"];
554
+ /** A filtered project list, under `projects()`. */
555
+ projectsFiltered: (stage?: string, leadUser?: string) => readonly ["arbi", "projects", "list", string, string];
556
+ /** Under `projects()`: a project update refreshes its events too. */
557
+ projectEvents: (projectExtId: string) => readonly ["arbi", "projects", string, "events"];
542
558
  projectUsage: (projectExtId: string, monthsBack: number) => readonly ["arbi", "projectUsage", string, number];
559
+ projectConversationUsage: (projectExtId: string, monthsBack: number) => readonly ["arbi", "projectUsage", string, "byConversation", number];
543
560
  projectInvoices: (projectExtId: string) => readonly ["arbi", "projectInvoices", string];
544
561
  userUsageToday: () => readonly ["arbi", "userUsageToday"];
545
562
  contacts: () => readonly ["arbi", "contacts"];
@@ -755,7 +772,7 @@ declare function useConversations(workspaceId: string | undefined, options?: {
755
772
  steps: {
756
773
  id: string;
757
774
  title: string;
758
- kind: "form" | "upload" | "agent" | "review";
775
+ kind: "form" | "upload" | "agent" | "review" | "action";
759
776
  after?: string[] | null | undefined;
760
777
  skill?: string | null | undefined;
761
778
  prompt?: string | null | undefined;
@@ -767,6 +784,74 @@ declare function useConversations(workspaceId: string | undefined, options?: {
767
784
  ui?: {
768
785
  [x: string]: unknown;
769
786
  } | null | undefined;
787
+ signals?: {
788
+ name: string;
789
+ when?: {
790
+ field?: string | null | undefined;
791
+ equals?: string | number | boolean | null | undefined;
792
+ contains?: string | null | undefined;
793
+ matches?: string | null | undefined;
794
+ approved?: boolean | null | undefined;
795
+ } | null | undefined;
796
+ }[] | undefined;
797
+ assignee?: {
798
+ user?: string | null | undefined;
799
+ run_owner?: true | null | undefined;
800
+ input?: string | null | undefined;
801
+ project_lead?: true | null | undefined;
802
+ } | null | undefined;
803
+ remind_after_hours?: number | null | undefined;
804
+ fields?: {
805
+ [x: string]: unknown;
806
+ name: string;
807
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
808
+ label?: string | null | undefined;
809
+ required: boolean;
810
+ options?: {
811
+ [x: string]: unknown;
812
+ value: string;
813
+ label?: string | null | undefined;
814
+ }[] | null | undefined;
815
+ min?: number | null | undefined;
816
+ max?: number | null | undefined;
817
+ }[] | null | undefined;
818
+ action?: {
819
+ type: "sign";
820
+ document: string | {
821
+ step?: string | null | undefined;
822
+ input?: string | null | undefined;
823
+ };
824
+ signers: {
825
+ user?: string | null | undefined;
826
+ run_owner?: true | null | undefined;
827
+ input?: string | null | undefined;
828
+ project_lead?: true | null | undefined;
829
+ }[];
830
+ message?: string | null | undefined;
831
+ expires_after_hours?: number | null | undefined;
832
+ } | {
833
+ type: "email_draft";
834
+ to?: string[] | undefined;
835
+ cc?: string[] | undefined;
836
+ subject: string;
837
+ body_template: string;
838
+ attachments?: (string | {
839
+ step?: string | null | undefined;
840
+ input?: string | null | undefined;
841
+ })[] | undefined;
842
+ } | {
843
+ type: "tabular_review";
844
+ tags: string[];
845
+ documents: "run_uploads" | "workspace" | (string | {
846
+ step?: string | null | undefined;
847
+ input?: string | null | undefined;
848
+ })[];
849
+ overwrite: boolean;
850
+ } | null | undefined;
851
+ edit_document?: string | {
852
+ step?: string | null | undefined;
853
+ input?: string | null | undefined;
854
+ } | null | undefined;
770
855
  }[];
771
856
  } | null | undefined;
772
857
  goal_state?: {
@@ -954,6 +1039,10 @@ declare function useConversationThreads(workspaceId: string | undefined, convers
954
1039
  run_id: string;
955
1040
  status: "running" | "done" | "failed";
956
1041
  };
1042
+ } | {
1043
+ name: "workflow_step";
1044
+ description: string;
1045
+ workflow_step: string;
957
1046
  };
958
1047
  } | undefined;
959
1048
  config_ext_id?: string | null | undefined;
@@ -989,6 +1078,16 @@ declare function useTags(workspaceId: string | undefined, options?: {
989
1078
  parent_ext_id?: string | null | undefined;
990
1079
  doctag_count: number;
991
1080
  facttag_count: number;
1081
+ fields?: {
1082
+ id: string;
1083
+ name: string;
1084
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
1085
+ options?: string[] | null | undefined;
1086
+ tag_ext_id: string;
1087
+ }[] | undefined;
1088
+ field_values?: {
1089
+ [x: string]: unknown;
1090
+ } | undefined;
992
1091
  created_by_ext_id: string;
993
1092
  updated_by_ext_id?: string | null | undefined;
994
1093
  created_at: string;
@@ -1193,6 +1292,24 @@ declare function useProjects(options?: {
1193
1292
  budget_reset_at?: number | null | undefined;
1194
1293
  };
1195
1294
  daily_cap_per_user?: number | null | undefined;
1295
+ budget?: {
1296
+ amount: number;
1297
+ currency: string;
1298
+ } | null | undefined;
1299
+ client?: string | null | undefined;
1300
+ client_ref?: string | null | undefined;
1301
+ stage?: string | null | undefined;
1302
+ stage_changed_at?: string | null | undefined;
1303
+ lead_user?: string | null | undefined;
1304
+ fields?: {
1305
+ [x: string]: unknown;
1306
+ } | undefined;
1307
+ field_schema?: {
1308
+ key: string;
1309
+ label?: string | null | undefined;
1310
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
1311
+ options?: string[] | null | undefined;
1312
+ }[] | null | undefined;
1196
1313
  plan_interval?: ("month" | "year") | null | undefined;
1197
1314
  packs: number;
1198
1315
  plan_change?: {
@@ -2033,6 +2150,58 @@ declare function useActOnStep(): _tanstack_react_query.UseMutationResult<{
2033
2150
  conversationId: string;
2034
2151
  body: StepActionRequest;
2035
2152
  }, unknown>;
2153
+ /**
2154
+ * Send the work back from a ready person step (`step`) to an earlier one (`to`, default: the step
2155
+ * it waits for), with an optional `note`: that step and every step after it are open again, and an
2156
+ * agent step runs again with the note. The conversation, its activity and its usage are refetched.
2157
+ */
2158
+ declare function useSendBackStep(): _tanstack_react_query.UseMutationResult<{
2159
+ label_ext_ids?: string[];
2160
+ external_id: string;
2161
+ title: string | null;
2162
+ created_by_ext_id: string;
2163
+ updated_by_ext_id?: string | null;
2164
+ created_at: string;
2165
+ updated_at: string;
2166
+ is_shared: boolean;
2167
+ message_count: number;
2168
+ last_message_actor?: _arbidocs_client.components["schemas"]["ConversationTurnActor"] | null;
2169
+ last_message_ext_id?: string | null;
2170
+ last_message_role?: string | null;
2171
+ last_message_updated_at?: string | null;
2172
+ last_message_status?: string | null;
2173
+ assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
2174
+ status?: _arbidocs_client.components["schemas"]["WorkStatus"] | null;
2175
+ description?: string | null;
2176
+ due_at?: string | null;
2177
+ completed_at?: string | null;
2178
+ completed_by_ext_id?: string | null;
2179
+ parent_conversation_ext_id?: string | null;
2180
+ workflow_ext_id?: string | null;
2181
+ agent_ext_id?: string | null;
2182
+ skill_ref?: string | null;
2183
+ skill_inputs?: {
2184
+ [key: string]: unknown;
2185
+ } | null;
2186
+ has_agent_action: boolean;
2187
+ auth_mode?: _arbidocs_client.components["schemas"]["src__models__work__AuthMode"] | null;
2188
+ plan?: _arbidocs_client.components["schemas"]["TaskPlan"] | null;
2189
+ goal_state?: {
2190
+ [key: string]: unknown;
2191
+ } | null;
2192
+ last_error?: string | null;
2193
+ pending_auth_request_id?: string | null;
2194
+ in_progress: boolean;
2195
+ active_response_id?: string | null;
2196
+ run_started_at?: string | null;
2197
+ owner_ext_id?: string | null;
2198
+ is_owner: boolean;
2199
+ }, Error, {
2200
+ conversationId: string;
2201
+ step: string;
2202
+ to?: string | null;
2203
+ note?: string | null;
2204
+ }, unknown>;
2036
2205
  /** Draft an editable plan (goal and acceptance checklist) from an objective. */
2037
2206
  declare function usePlanWork(): _tanstack_react_query.UseMutationResult<{
2038
2207
  goal: string;
@@ -2388,6 +2557,271 @@ declare function useStartAgentSession(): _tanstack_react_query.UseMutationResult
2388
2557
  }, unknown>;
2389
2558
  declare function useCloseAgentSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
2390
2559
 
2560
+ /** Refresh what a tag, doctag or fact change affects: the workspace's tags, matrix and facts. */
2561
+ declare function invalidateTagData(qc: QueryClient, workspaceId: string): Promise<unknown>;
2562
+ /** {@link invalidateTagData} for the open workspace: call it after a doctag or fact write. */
2563
+ declare function useInvalidateTagData(): () => Promise<unknown>;
2564
+ /**
2565
+ * The tag matrix of the open workspace: a parent's children (`{parentId}`) or the given tags
2566
+ * (`{tagIds}`), each row with its field values, up to `linksLimit` documents and facts, and their
2567
+ * counts. With a parent, `data.parent.fields` are the shared columns (see the SDK's
2568
+ * `tags.tagMatrixColumns`). Disabled while `selection` is empty.
2569
+ */
2570
+ declare function useTagMatrix(selection: TagMatrixSelection | null | undefined, options?: {
2571
+ linksLimit?: number;
2572
+ enabled?: boolean;
2573
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
2574
+ rows?: _arbidocs_client.components["schemas"]["TagMatrixRow"][];
2575
+ parent?: _arbidocs_client.components["schemas"]["TagResponse"] | null;
2576
+ links_limit: number;
2577
+ }>, Error>;
2578
+ /**
2579
+ * Change a tag's fields: `fields` replaces its own field definitions (keep a field's `id` to keep
2580
+ * its values), `values` merge-patches its values (`null` clears one). The workspace's tags and
2581
+ * every matrix refresh.
2582
+ */
2583
+ declare function useUpdateTagFields(): _tanstack_react_query.UseMutationResult<{
2584
+ external_id: string;
2585
+ workspace_ext_id: string;
2586
+ name: string;
2587
+ instruction?: string | null;
2588
+ tag_type: _arbidocs_client.components["schemas"]["TagFormat"];
2589
+ shared: boolean;
2590
+ parent_ext_id?: string | null;
2591
+ doctag_count: number;
2592
+ facttag_count: number;
2593
+ fields?: _arbidocs_client.components["schemas"]["TagField"][];
2594
+ field_values?: {
2595
+ [key: string]: unknown;
2596
+ };
2597
+ created_by_ext_id: string;
2598
+ updated_by_ext_id?: string | null;
2599
+ created_at: string;
2600
+ updated_at: string;
2601
+ }, Error, {
2602
+ tagId: string;
2603
+ fields?: TagFieldDefinition[];
2604
+ values?: Record<string, unknown>;
2605
+ }, unknown>;
2606
+
2607
+ /** The caller's projects at `stage` and/or led by `leadUser` (`usr-…`). */
2608
+ declare function useFilteredProjects(filters: {
2609
+ stage?: string;
2610
+ leadUser?: string;
2611
+ }, options?: {
2612
+ enabled?: boolean;
2613
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
2614
+ external_id: string;
2615
+ name: string;
2616
+ created_by: string;
2617
+ subscription: string;
2618
+ created_at: string;
2619
+ quotas: {
2620
+ storage_gb: {
2621
+ used: number;
2622
+ limit: number;
2623
+ };
2624
+ ai_credits: {
2625
+ used: number;
2626
+ limit: number;
2627
+ };
2628
+ collaborators: {
2629
+ used: number;
2630
+ limit: number;
2631
+ };
2632
+ budget_reset_at?: number | null | undefined;
2633
+ };
2634
+ daily_cap_per_user?: number | null | undefined;
2635
+ budget?: {
2636
+ amount: number;
2637
+ currency: string;
2638
+ } | null | undefined;
2639
+ client?: string | null | undefined;
2640
+ client_ref?: string | null | undefined;
2641
+ stage?: string | null | undefined;
2642
+ stage_changed_at?: string | null | undefined;
2643
+ lead_user?: string | null | undefined;
2644
+ fields?: {
2645
+ [x: string]: unknown;
2646
+ } | undefined;
2647
+ field_schema?: {
2648
+ key: string;
2649
+ label?: string | null | undefined;
2650
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person";
2651
+ options?: string[] | null | undefined;
2652
+ }[] | null | undefined;
2653
+ plan_interval?: ("month" | "year") | null | undefined;
2654
+ packs: number;
2655
+ plan_change?: {
2656
+ result: "upgraded" | "scheduled" | "unchanged" | "requires_action";
2657
+ charged_pence: number;
2658
+ charged_ex_vat_pence: number;
2659
+ confirm_url?: string | null | undefined;
2660
+ } | null | undefined;
2661
+ addons?: {
2662
+ packs: number;
2663
+ packs_next?: number | null | undefined;
2664
+ plan_name: string;
2665
+ plan_credits: number;
2666
+ plan_storage_gb: number;
2667
+ block_credits: number;
2668
+ block_storage_gb: number;
2669
+ credit_blocks: number;
2670
+ storage_blocks: number;
2671
+ credit_blocks_next?: number | null | undefined;
2672
+ storage_blocks_next?: number | null | undefined;
2673
+ storage_blocks_min: number;
2674
+ auto_topup_threshold_credits: number;
2675
+ min_auto_topup_threshold_credits: number;
2676
+ spend_cap_pence?: number | null | undefined;
2677
+ addon_spend_pence: number;
2678
+ addon_spend_window_end?: number | null | undefined;
2679
+ block_monthly_pence: number;
2680
+ block_monthly_ex_vat_pence: number;
2681
+ block_period_pence: number;
2682
+ block_period_ex_vat_pence: number;
2683
+ credit_block_price_pence: number;
2684
+ credit_block_price_ex_vat_pence: number;
2685
+ storage_block_price_pence: number;
2686
+ storage_block_price_ex_vat_pence: number;
2687
+ cap_reached: boolean;
2688
+ period_end?: number | null | undefined;
2689
+ credits_reset_at?: number | null | undefined;
2690
+ pending_interval?: ("month" | "year") | null | undefined;
2691
+ billing_error?: string | null | undefined;
2692
+ confirm_url?: string | null | undefined;
2693
+ upsell?: {
2694
+ variant: "compare" | "save";
2695
+ interval: "month" | "year";
2696
+ add_on_count: number;
2697
+ current_monthly_pence: number;
2698
+ current_monthly_ex_vat_pence: number;
2699
+ pro_plus_monthly_pence: number;
2700
+ pro_plus_monthly_ex_vat_pence: number;
2701
+ pro_plus_period_pence: number;
2702
+ pro_plus_credits: number;
2703
+ pro_plus_storage_gb: number;
2704
+ saving_monthly_pence: number;
2705
+ } | null | undefined;
2706
+ payment?: {
2707
+ status: "pending" | "paid";
2708
+ kind?: ("credits" | "storage") | null | undefined;
2709
+ amount_pence?: number | null | undefined;
2710
+ amount_ex_vat_pence?: number | null | undefined;
2711
+ tax_pence?: number | null | undefined;
2712
+ at?: number | null | undefined;
2713
+ confirm_url?: string | null | undefined;
2714
+ } | null | undefined;
2715
+ } | null | undefined;
2716
+ price_id?: string | null | undefined;
2717
+ plan?: string | null | undefined;
2718
+ amount?: number | null | undefined;
2719
+ amount_ex_vat?: number | null | undefined;
2720
+ currency?: string | null | undefined;
2721
+ current_period_end?: number | null | undefined;
2722
+ cancel_at_period_end?: boolean | null | undefined;
2723
+ portal_url?: string | null | undefined;
2724
+ }[]>, Error>;
2725
+ /**
2726
+ * Patch a project (owner only): name, daily cap, and the details a host sets (`budget` in minor
2727
+ * units, `client`, `client_ref`, `stage`, `lead_user`, `fields` merged key by key, `field_schema`).
2728
+ * The project list and the project's events refresh.
2729
+ */
2730
+ declare function useUpdateProjectFields(): _tanstack_react_query.UseMutationResult<{
2731
+ external_id: string;
2732
+ name: string;
2733
+ created_by: string;
2734
+ subscription: string;
2735
+ created_at: string;
2736
+ quotas: _arbidocs_client.components["schemas"]["ProjectQuotas"];
2737
+ daily_cap_per_user?: number | null;
2738
+ budget?: _arbidocs_client.components["schemas"]["ProjectBudget"] | null;
2739
+ client?: string | null;
2740
+ client_ref?: string | null;
2741
+ stage?: string | null;
2742
+ stage_changed_at?: string | null;
2743
+ lead_user?: string | null;
2744
+ fields?: {
2745
+ [key: string]: unknown;
2746
+ };
2747
+ field_schema?: _arbidocs_client.components["schemas"]["FieldSchemaEntry"][] | null;
2748
+ plan_interval?: ("month" | "year") | null;
2749
+ packs: number;
2750
+ plan_change?: _arbidocs_client.components["schemas"]["PlanChangeOutcome"] | null;
2751
+ addons?: _arbidocs_client.components["schemas"]["ProjectAddons"] | null;
2752
+ price_id?: string | null;
2753
+ plan?: string | null;
2754
+ amount?: number | null;
2755
+ amount_ex_vat?: number | null;
2756
+ currency?: string | null;
2757
+ current_period_end?: number | null;
2758
+ cancel_at_period_end?: boolean | null;
2759
+ portal_url?: string | null;
2760
+ }, Error, {
2761
+ projectExtId: string;
2762
+ patch: ProjectUpdateRequest;
2763
+ }, unknown>;
2764
+ /** A project's stage and budget changes, newest first. */
2765
+ declare function useProjectEvents(projectExtId: string | undefined, options?: {
2766
+ kind?: ProjectEventKind;
2767
+ limit?: number;
2768
+ enabled?: boolean;
2769
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
2770
+ external_id: string;
2771
+ kind: "stage_changed" | "budget_changed";
2772
+ actor?: string | null;
2773
+ detail: {
2774
+ [key: string]: unknown;
2775
+ };
2776
+ created_at: string;
2777
+ }[]>, Error>;
2778
+ /**
2779
+ * What a conversation's AI work cost this billing period, by step, run, model, agent and feature.
2780
+ * Spend is in CREDITS (see `formatCredits`). Pass `live` while a run is going.
2781
+ */
2782
+ declare function useConversationUsage(conversationId: string | undefined, options?: {
2783
+ enabled?: boolean;
2784
+ live?: boolean;
2785
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
2786
+ conversation_ext_id: string;
2787
+ project_ext_id: string;
2788
+ period_start: string;
2789
+ period_end: string;
2790
+ total_spend: number;
2791
+ total_tokens: number;
2792
+ total_requests: number;
2793
+ by_step: {
2794
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
2795
+ };
2796
+ by_run: {
2797
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
2798
+ };
2799
+ by_model: {
2800
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
2801
+ };
2802
+ by_agent: {
2803
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
2804
+ };
2805
+ by_feature: {
2806
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
2807
+ };
2808
+ }>, Error>;
2809
+ /** A project's spend by conversation (and what no conversation accounts for), in credits. */
2810
+ declare function useProjectConversationUsage(projectExtId: string | undefined, monthsBack?: number, options?: {
2811
+ enabled?: boolean;
2812
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
2813
+ project_ext_id: string;
2814
+ period_start: string;
2815
+ period_end: string;
2816
+ total_spend: number;
2817
+ total_tokens: number;
2818
+ total_requests: number;
2819
+ by_conversation: {
2820
+ [key: string]: _arbidocs_client.components["schemas"]["TagBreakdown"];
2821
+ };
2822
+ unattributed: _arbidocs_client.components["schemas"]["TagBreakdown"];
2823
+ }>, Error>;
2824
+
2391
2825
  /**
2392
2826
  * Contacts: the user's colleagues and pending invitations.
2393
2827
  *
@@ -5852,4 +6286,4 @@ interface ArbiUiState {
5852
6286
  }
5853
6287
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
5854
6288
 
5855
- export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AgentAccessMode, type AgentConfigSections, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, type ArbiChat, type ArbiChatCitation, type ArbiChatDocument, type ArbiChatMessage, type ArbiChatMessageStatus, type ArbiChatPassage, type ArbiChatRole, type ArbiChatThread, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, type AvatarCrop, type AvatarFileProblem, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_START_BY_EMAIL_LABELS, DEFAULT_USD_PER_CREDIT, DateSeparator, type DateSeparatorProps, type DeleteAccountBlocker, type DeleteAccountFlow, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCardMenu, type DocumentCardMenuProps, DocumentGallery, type DocumentGalleryProps, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, type EmailChange, type EmailPreferences, EmlIcon, EntityIconComponent, FILE_TYPE_COLORS, FileIcon, FireworksIcon, type FormatCreditsOptions, GeminiIcon, GitHubIcon, GoogleIcon, type GrantAgentAccessVars, HtmlIcon, IdentityPurchase, IdentityStatus, IdentityStep, type IdentityVerificationApi, IdentityVerificationFlow, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, MAX_AVATAR_FILE_BYTES, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, type MountDiditOptions, type NameEditor, type NotificationPreferencesModel, type NotificationTypeMeta, OpenAIIcon, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, type PasswordChangeForm, type PasswordChangeFormMessages, type PasswordChangeResult, type PasswordChangeVars, PdfIcon, PhotoCapture, type PhotoCaptureProps, type ProfileView, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type RenderMarkdown, type SaveAgentConfigVars, type SearchChunk, SemanticSearch, type SemanticSearchProps, type ShellRecentWorkspaceItem, type ShellWorkspaceItem, type ShellWorkspaceKind, type ShellWorkspaceMember, type ShellWorkspaceSeed, type ShellWorkspaceSource, StartByEmail, type StartByEmailLabels, type StartByEmailProps, type ThreadAccessors, type ThreadItem, type ToolResponses, TxtIcon, TypingIndicator, type UpdateProfileVars, type UsageTotals, type UseArbiChatOptions, type UseArbiShellWorkspacesOptions, type UseAudioRecorderResult, type UseAvatarCropOptions, type UseCameraStreamResult, type UseDeleteAccountFlowOptions, type UseDirectMessagesResult, type UseEmailChangeOptions, type UseIdentityVerificationFlowOptions, type UseNameEditorOptions, type UsePasswordChangeFormOptions, type UseShellWorkspacesOptions, type UseShellWorkspacesResult, type UseVideoRecorderResult, VidIcon, VideoCapture, type VideoCaptureProps, type VideoRecorderState, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, captureFrameAsBlob, classifyMediaError, creditsToUsd, cropImage, dayKey, describeActivity, formatCredits, formatElapsed, formatIdentityPrice, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, isUsageMetered, isWorkspaceNotificationType, mountDiditVerification, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, redlineStats, resolveActiveWorkspace, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useActOnStep, useActivity, useAddContacts, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAgents, useAiTask, useArbi, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiShellWorkspaces, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useAvatarCrop, useCameraStream, useCloseAgentSession, useCommandPalette, useConfigs, useConfirmEmailChange, useContacts, useConversationActivity, useConversationPendingAuth, useConversationThreads, useConversations, useCreateAgent, useCreateWork, useCreateWorkflow, useCurrentSessionId, useDeleteAccount, useDeleteAccountFlow, useDeleteAgents, useDeleteWorkflow, useDeploymentDomain, useDirectMessages, useDocuments, useEmailChange, useFacts, useGrantAgentAccess, useHealth, useIdentityVerification, useIdentityVerificationFlow, useLogoutAllSessions, useNameEditor, useNotificationPreferences, useParsedDocument, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanWork, useProfile, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useRemoveContacts, useRequestEmailChange, useRevokeAgentAccess, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSemanticSearch, useSessions, useShellWorkspaces, useSkills, useStartAgentSession, useStartWorkQuery, useTags, useTerminateSession, useThumbnails, useUpdateConversation, useUpdateProfile, useUpdateWorkflow, useUploadSkillFiles, useUserSettings, useUserUsageToday, useVideoRecorder, useWorkNotifications, useWorkflows, useWorkspaceDocs, useWorkspaceUsers, useWorkspaces, userDisplayName, userInitials };
6289
+ export { type ActivityContent, type ActivityDescription, ActivityFeed, type ActivityFeedProps, type AgentAccessMode, type AgentConfigSections, type AggregatedDailyUsage, type AggregatedModelGroupUsage, AiActionCard, AiAnswer, type AiRunOptions, type AiTaskStatus, AppleIcon, ArbiBotHeadIcon, ArbiBotIcon, type ArbiChat, type ArbiChatCitation, type ArbiChatDocument, type ArbiChatMessage, type ArbiChatMessageStatus, type ArbiChatPassage, type ArbiChatRole, type ArbiChatThread, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, type AvatarCrop, type AvatarFileProblem, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, CitationRenderer, type CitationRendererProps, type CitationState, ClaudeIcon, CommandPalette, type CommandPaletteClassNames, type CommandPaletteProps, CommandPaletteProvider, type CommandPaletteProviderProps, type CommandPaletteValue, ConversationList, type ConversationListProps, type CropArea, type CropOutput, type CropResult, DEFAULT_ASPECT_OPTIONS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_START_BY_EMAIL_LABELS, DEFAULT_USD_PER_CREDIT, DateSeparator, type DateSeparatorProps, type DeleteAccountBlocker, type DeleteAccountFlow, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmNotification, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCardMenu, type DocumentCardMenuProps, DocumentGallery, type DocumentGalleryProps, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, type EmailChange, type EmailPreferences, EmlIcon, EntityIconComponent, FILE_TYPE_COLORS, FileIcon, FireworksIcon, type FormatCreditsOptions, GeminiIcon, GitHubIcon, GoogleIcon, type GrantAgentAccessVars, HtmlIcon, IdentityPurchase, IdentityStatus, IdentityStep, type IdentityVerificationApi, IdentityVerificationFlow, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, MAX_AVATAR_FILE_BYTES, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, type MountDiditOptions, type NameEditor, type NotificationPreferencesModel, type NotificationTypeMeta, OpenAIIcon, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, type PasswordChangeForm, type PasswordChangeFormMessages, type PasswordChangeResult, type PasswordChangeVars, PdfIcon, PhotoCapture, type PhotoCaptureProps, type ProfileView, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type RenderMarkdown, type SaveAgentConfigVars, type SearchChunk, SemanticSearch, type SemanticSearchProps, type ShellRecentWorkspaceItem, type ShellWorkspaceItem, type ShellWorkspaceKind, type ShellWorkspaceMember, type ShellWorkspaceSeed, type ShellWorkspaceSource, StartByEmail, type StartByEmailLabels, type StartByEmailProps, type ThreadAccessors, type ThreadItem, type ToolResponses, TxtIcon, TypingIndicator, type UpdateProfileVars, type UsageTotals, type UseArbiChatOptions, type UseArbiShellWorkspacesOptions, type UseAudioRecorderResult, type UseAvatarCropOptions, type UseCameraStreamResult, type UseDeleteAccountFlowOptions, type UseDirectMessagesResult, type UseEmailChangeOptions, type UseIdentityVerificationFlowOptions, type UseNameEditorOptions, type UsePasswordChangeFormOptions, type UseShellWorkspacesOptions, type UseShellWorkspacesResult, type UseVideoRecorderResult, VidIcon, VideoCapture, type VideoCaptureProps, type VideoRecorderState, VoiceNoteRecorder, type VoiceNoteRecorderProps, XlsIcon, annotateThread, arbiQueryKeys, captureFrameAsBlob, classifyMediaError, creditsToUsd, cropImage, dayKey, describeActivity, formatCredits, formatElapsed, formatIdentityPrice, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isUsageMetered, isWorkspaceNotificationType, mountDiditVerification, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, redlineStats, resolveActiveWorkspace, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useActOnStep, useActivity, useAddContacts, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAgents, useAiTask, useArbi, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiShellWorkspaces, useArbiUiStore, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useAvatarCrop, useCameraStream, useCloseAgentSession, useCommandPalette, useConfigs, useConfirmEmailChange, useContacts, useConversationActivity, useConversationPendingAuth, useConversationThreads, useConversationUsage, useConversations, useCreateAgent, useCreateWork, useCreateWorkflow, useCurrentSessionId, useDeleteAccount, useDeleteAccountFlow, useDeleteAgents, useDeleteWorkflow, useDeploymentDomain, useDirectMessages, useDocuments, useEmailChange, useFacts, useFilteredProjects, useGrantAgentAccess, useHealth, useIdentityVerification, useIdentityVerificationFlow, useInvalidateTagData, useLogoutAllSessions, useNameEditor, useNotificationPreferences, useParsedDocument, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanWork, useProfile, useProjectConversationUsage, useProjectEvents, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useRemoveContacts, useRequestEmailChange, useRevokeAgentAccess, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSemanticSearch, useSendBackStep, useSessions, useShellWorkspaces, useSkills, useStartAgentSession, useStartWorkQuery, useTagMatrix, useTags, useTerminateSession, useThumbnails, useUpdateConversation, useUpdateProfile, useUpdateProjectFields, useUpdateTagFields, useUpdateWorkflow, useUploadSkillFiles, useUserSettings, useUserUsageToday, useVideoRecorder, useWorkNotifications, useWorkflows, useWorkspaceDocs, useWorkspaceUsers, useWorkspaces, userDisplayName, userInitials, workflowStepOf };