@arbidocs/react 0.4.129 → 0.4.130
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 +52 -53
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.js +3 -5
- package/dist/artifacts/index.js.map +1 -1
- package/dist/{chunk-BOJHNPNJ.cjs → chunk-6PPWZILQ.cjs} +16 -11
- package/dist/chunk-6PPWZILQ.cjs.map +1 -0
- package/dist/{chunk-G6FHNURH.js → chunk-NNWMHMEC.js} +60 -3
- package/dist/chunk-NNWMHMEC.js.map +1 -0
- package/dist/{chunk-6AWF4HFU.js → chunk-PPRKQK4P.js} +16 -11
- package/dist/chunk-PPRKQK4P.js.map +1 -0
- package/dist/{chunk-AFGE55RQ.cjs → chunk-UN3AZUXX.cjs} +2 -11
- package/dist/chunk-UN3AZUXX.cjs.map +1 -0
- package/dist/{chunk-5WXNTCI3.js → chunk-XV7EOUQM.js} +3 -11
- package/dist/chunk-XV7EOUQM.js.map +1 -0
- package/dist/{chunk-5DCRIWCA.cjs → chunk-ZWFMFOGP.cjs} +68 -2
- package/dist/chunk-ZWFMFOGP.cjs.map +1 -0
- package/dist/document-tools/index.cjs +4 -5
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.js +1 -2
- package/dist/document-tools/index.js.map +1 -1
- package/dist/{index-C7OqcKY3.d.ts → index-D8NvRj3J.d.cts} +16 -7
- package/dist/{index-C7OqcKY3.d.cts → index-D8NvRj3J.d.ts} +16 -7
- package/dist/index.cjs +368 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +224 -90
- package/dist/index.d.ts +224 -90
- package/dist/index.js +232 -73
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +10 -6
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-5DCRIWCA.cjs.map +0 -1
- package/dist/chunk-5WXNTCI3.js.map +0 -1
- package/dist/chunk-6AWF4HFU.js.map +0 -1
- package/dist/chunk-74UTKIWQ.js +0 -62
- package/dist/chunk-74UTKIWQ.js.map +0 -1
- package/dist/chunk-AFGE55RQ.cjs.map +0 -1
- package/dist/chunk-BOJHNPNJ.cjs.map +0 -1
- package/dist/chunk-G6FHNURH.js.map +0 -1
- package/dist/chunk-NUFEZBA5.cjs +0 -72
- package/dist/chunk-NUFEZBA5.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ import * as _arbidocs_sdk_browser from '@arbidocs/sdk/browser';
|
|
|
4
4
|
import { ArbiOptions, QueryOptions, Arbi, SSEStreamResult, SSEStreamStartData, UserMessageEvent, MessageMetadataPayload, ResponseOutputItemDoneEvent, ArtifactEvent, TagListQuery, StepActionRequest, UpdateConversationRequest, UpdateWorkflowRequest, TagKind, TagKindSchema, TagFieldDefinition, ProjectEventKind, ProjectUpdateRequest, contacts, LoginProfile, settings, DecryptedChatMessage } from '@arbidocs/sdk/browser';
|
|
5
5
|
export { ActivityKind, ActivityResponse, AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, AuthMode, ConversationResponse, CreateFactRequest, CreateWorkRequest, CreateWorkflowRequest, DEFAULT_AI_USD_PER_GBP, 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, formatGbp, formatGbpPerMillionTokens, usdToGbp } from '@arbidocs/sdk/browser';
|
|
6
6
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
7
|
-
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage,
|
|
7
|
+
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components, RecoveryKeyParams } from '@arbidocs/client';
|
|
8
8
|
export { WebSocketServerMessage, WsBatchCompleteMessage, WsConversationMessagePostedMessage, WsNotificationResponse, WsPresenceUpdateMessage, WsResponseCompleteMessage, WsTaskUpdateMessage, isMessageType } from '@arbidocs/client';
|
|
9
9
|
import * as zustand from 'zustand';
|
|
10
10
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
@@ -16,7 +16,7 @@ import { VerificationResult } from '@didit-protocol/sdk-web';
|
|
|
16
16
|
import { LucideIcon } from 'lucide-react';
|
|
17
17
|
import { Components } from 'react-markdown';
|
|
18
18
|
export { D as DraftCleanReport, a as DraftCleanStage, c as cleanDraftMarkdown, b as cleanDraftWithReport, p as promoteBoldTitle, r as repairParsedStructure, d as repairParsedTitle, s as stripAgentPreamble, u as unescapeMarkdown, e as unwrapCitationLinks } from './stored-markdown-Bp18vrbr.cjs';
|
|
19
|
-
export { A as AppNotification, D as DEFAULT_NOTIFY_TONE, N as NotificationBell, a as NotificationBellProps, b as NotificationBellTriggerState, c as NotifyOptions, d as NotifyVariant, T as Toaster, n as notify, s as seedNotifications, e as selectUnread, u as useNotify } from './index-
|
|
19
|
+
export { A as AppNotification, D as DEFAULT_NOTIFY_TONE, N as NotificationBell, a as NotificationBellProps, b as NotificationBellTriggerState, c as NotifyOptions, d as NotifyVariant, T as Toaster, n as notify, s as seedNotifications, e as selectUnread, u as useNotify } from './index-D8NvRj3J.cjs';
|
|
20
20
|
import { ColDef } from 'ag-grid-community';
|
|
21
21
|
export { ToasterProps, toast } from 'sonner';
|
|
22
22
|
import 'clsx';
|
|
@@ -1208,19 +1208,6 @@ declare function useAgents(options?: {
|
|
|
1208
1208
|
declare function useDeleteAgents(): _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
1209
1209
|
agentExtIds: string[];
|
|
1210
1210
|
}, unknown>;
|
|
1211
|
-
/** List active sessions. */
|
|
1212
|
-
declare function useSessions(options?: {
|
|
1213
|
-
enabled?: boolean;
|
|
1214
|
-
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
1215
|
-
session_id: string;
|
|
1216
|
-
external_id?: string | null;
|
|
1217
|
-
name?: string | null;
|
|
1218
|
-
ip_address?: string | null;
|
|
1219
|
-
active_workspace?: string | null;
|
|
1220
|
-
workspaces: string[];
|
|
1221
|
-
status: string;
|
|
1222
|
-
ttl: number;
|
|
1223
|
-
}[]>, Error>;
|
|
1224
1211
|
/** Authorize a delegated session (generates claim code). Returns a mutation. */
|
|
1225
1212
|
/** Check backend health. */
|
|
1226
1213
|
declare function useHealth(options?: {
|
|
@@ -3601,10 +3588,7 @@ declare function useAvatarCrop({ upload, onProblem, maxBytes, }: UseAvatarCropOp
|
|
|
3601
3588
|
/** Send the 3-word verification code to the new address (not for SSO accounts). */
|
|
3602
3589
|
declare function useRequestEmailChange(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
|
|
3603
3590
|
/** Confirm the new address with the emailed code; the profile query shows the new email. */
|
|
3604
|
-
declare function useConfirmEmailChange(): _tanstack_react_query.UseMutationResult<{
|
|
3605
|
-
detail: string;
|
|
3606
|
-
email: string;
|
|
3607
|
-
}, Error, {
|
|
3591
|
+
declare function useConfirmEmailChange(): _tanstack_react_query.UseMutationResult<void, Error, {
|
|
3608
3592
|
newEmail: string;
|
|
3609
3593
|
code: string;
|
|
3610
3594
|
}, unknown>;
|
|
@@ -3654,7 +3638,7 @@ interface PasswordChangeVars {
|
|
|
3654
3638
|
/** Omit in recovery mode (after signing in with a recovery key). */
|
|
3655
3639
|
currentPassword?: string;
|
|
3656
3640
|
}
|
|
3657
|
-
/** Change (or, in recovery mode, set) the master password
|
|
3641
|
+
/** Change (or, in recovery mode, set) the master password through the account client in scope. */
|
|
3658
3642
|
declare function usePasswordChange(): _tanstack_react_query.UseMutationResult<void, Error, PasswordChangeVars, unknown>;
|
|
3659
3643
|
interface PasswordChangeFormMessages {
|
|
3660
3644
|
required: string;
|
|
@@ -3852,13 +3836,126 @@ declare function useFollowThread(conversationId: string | null | undefined, opti
|
|
|
3852
3836
|
};
|
|
3853
3837
|
|
|
3854
3838
|
/**
|
|
3855
|
-
*
|
|
3856
|
-
*
|
|
3839
|
+
* Identity verification: the optional, paid ID check behind the verified tick (Pro plans only).
|
|
3840
|
+
*
|
|
3841
|
+
* Two layers, like `profile.ts`. `useIdentityVerificationFlow` owns the dialog's state and takes
|
|
3842
|
+
* the backend calls as functions, so an app with its own API layer (ARBI-frontend) binds the same
|
|
3843
|
+
* `IdentityVerificationCard` / `IdentityVerificationDialog` blocks without a provider.
|
|
3844
|
+
* `useIdentityVerification` binds it to the SDK (`arbi.identity`).
|
|
3845
|
+
*
|
|
3846
|
+
* Steps: pay the one-time fee (charged to the user's Pro project card) → verify inside Didit's
|
|
3847
|
+
* embedded frame → result (verified, declined, in review, or the name on the document differs from
|
|
3848
|
+
* the account name, offered as the new name). No webhooks: completing Didit's flow calls `refresh`.
|
|
3857
3849
|
*/
|
|
3858
|
-
|
|
3850
|
+
|
|
3851
|
+
/** The backend calls of the flow, as functions (see the module comment). */
|
|
3852
|
+
interface IdentityVerificationApi {
|
|
3853
|
+
status: () => Promise<IdentityStatus>;
|
|
3854
|
+
purchase: () => Promise<IdentityPurchase>;
|
|
3855
|
+
/** The Didit session URL. */
|
|
3856
|
+
startSession: () => Promise<string>;
|
|
3857
|
+
refresh: () => Promise<IdentityStatus>;
|
|
3858
|
+
acceptName: () => Promise<IdentityStatus>;
|
|
3859
|
+
remove: () => Promise<IdentityStatus>;
|
|
3860
|
+
}
|
|
3861
|
+
interface UseIdentityVerificationFlowOptions {
|
|
3862
|
+
/** Load the status (default true; e.g. false while signed out). */
|
|
3863
|
+
enabled?: boolean;
|
|
3864
|
+
/** The tick changed (granted, renamed away, removed): update the host's copy of the user. */
|
|
3865
|
+
onVerifiedChange?: (verified: boolean) => void;
|
|
3866
|
+
/** The account name became the name on the document. */
|
|
3867
|
+
onNameAccepted?: (name: {
|
|
3868
|
+
givenName: string;
|
|
3869
|
+
familyName: string | null;
|
|
3870
|
+
}) => void;
|
|
3871
|
+
/** The host's price format (e.g. its billing helpers); default `formatIdentityPrice`. */
|
|
3872
|
+
formatPrice?: (status: IdentityStatus) => string;
|
|
3873
|
+
}
|
|
3874
|
+
/** Which step the dialog opens on for a status. */
|
|
3875
|
+
declare function identityStepFor(status: IdentityStatus | undefined): IdentityStep;
|
|
3876
|
+
/** "£5.00 incl. VAT": the fee is quoted including UK VAT. */
|
|
3877
|
+
declare function formatIdentityPrice(status: IdentityStatus): string;
|
|
3878
|
+
/** The identity verification dialog's state, bound to the backend calls in `api`. */
|
|
3879
|
+
declare function useIdentityVerificationFlow(api: IdentityVerificationApi, { enabled, onVerifiedChange, onNameAccepted, formatPrice, }?: UseIdentityVerificationFlowOptions): IdentityVerificationFlow;
|
|
3880
|
+
/**
|
|
3881
|
+
* The identity verification flow over the account client in scope; the profile query follows the
|
|
3882
|
+
* tick and name.
|
|
3883
|
+
*/
|
|
3884
|
+
declare function useIdentityVerification(options?: Omit<UseIdentityVerificationFlowOptions, 'enabled'>): IdentityVerificationFlow;
|
|
3885
|
+
|
|
3886
|
+
type AccountSession = components['schemas']['SessionInfoResponse'];
|
|
3887
|
+
interface AccountSignOutOptions {
|
|
3888
|
+
/** End every session on the server first, this device's included. */
|
|
3889
|
+
everywhere?: boolean;
|
|
3890
|
+
/** Why: a person's choice, or the account was just closed. */
|
|
3891
|
+
reason?: 'manual' | 'account-deleted';
|
|
3892
|
+
}
|
|
3893
|
+
interface AccountClient {
|
|
3894
|
+
/** The signed-in user's profile; `null` when there is none. */
|
|
3895
|
+
profile(): ProfileView | null;
|
|
3896
|
+
/** Be told when {@link profile} changes. Returns the unsubscribe. */
|
|
3897
|
+
onProfileChange(listener: () => void): () => void;
|
|
3898
|
+
/** Save the name and/or picture; the profile follows. */
|
|
3899
|
+
updateProfile(vars: UpdateProfileVars): Promise<void>;
|
|
3900
|
+
/** Send the verification code to the new address (not for SSO accounts). */
|
|
3901
|
+
requestEmailChange(newEmail: string): Promise<void>;
|
|
3902
|
+
/** Confirm the new address with the emailed code; the profile follows. */
|
|
3903
|
+
confirmEmailChange(newEmail: string, code: string): Promise<void>;
|
|
3904
|
+
/** Change (or, in recovery mode, set) the master password. */
|
|
3905
|
+
changePassword(vars: PasswordChangeVars): Promise<void>;
|
|
3906
|
+
listSessions(): Promise<AccountSession[]>;
|
|
3907
|
+
/** The id this device's session is listed under, or `null`. */
|
|
3908
|
+
currentSessionId(): string | null;
|
|
3909
|
+
/** End one of the user's sessions at once (not this device's: that is {@link signOut}). */
|
|
3910
|
+
terminateSession(sessionId: string): Promise<void>;
|
|
3911
|
+
/** Sign this device out of the host (and, `everywhere`, every other session first). */
|
|
3912
|
+
signOut(options?: AccountSignOutOptions): Promise<void>;
|
|
3913
|
+
/** Close the account. Rejects with the backend's refusal when something blocks it. */
|
|
3914
|
+
requestDeletion(): Promise<unknown>;
|
|
3915
|
+
/** The ID check behind the verified tick. */
|
|
3916
|
+
identity: IdentityVerificationApi;
|
|
3917
|
+
}
|
|
3918
|
+
interface AccountClientContextValue {
|
|
3919
|
+
client: AccountClient;
|
|
3920
|
+
/** Account reads run only while this is true (signed in). */
|
|
3921
|
+
enabled: boolean;
|
|
3922
|
+
}
|
|
3923
|
+
/**
|
|
3924
|
+
* The account client over an `Arbi`. `overrides` replace any of its calls: a host that keeps its
|
|
3925
|
+
* own signed-in state passes `signOut` (and `profile`) so the SDK and the host stay in step.
|
|
3926
|
+
*/
|
|
3927
|
+
declare function arbiAccountClient(arbi: Arbi, overrides?: Partial<AccountClient>): AccountClient;
|
|
3928
|
+
interface AccountClientProviderProps {
|
|
3929
|
+
client: AccountClient;
|
|
3930
|
+
/** Account reads run only while this is true; default true. */
|
|
3931
|
+
enabled?: boolean;
|
|
3932
|
+
children: ReactNode;
|
|
3933
|
+
}
|
|
3934
|
+
/**
|
|
3935
|
+
* The account client for the account hooks and settings blocks below. Without one, they use the
|
|
3936
|
+
* nearest `ArbiProvider`'s session (`arbiAccountClient`).
|
|
3937
|
+
*/
|
|
3938
|
+
declare function AccountClientProvider({ client, enabled, children, }: AccountClientProviderProps): React$1.JSX.Element;
|
|
3939
|
+
/** The account client in scope: an `AccountClientProvider`'s, else the `ArbiProvider` session's. */
|
|
3940
|
+
declare function useAccountClient(): AccountClientContextValue;
|
|
3941
|
+
|
|
3942
|
+
/** The user's active sessions (devices and agents). */
|
|
3943
|
+
declare function useSessions(options?: {
|
|
3944
|
+
enabled?: boolean;
|
|
3945
|
+
}): _tanstack_react_query.UseQueryResult<NoInfer<{
|
|
3946
|
+
session_id: string;
|
|
3947
|
+
external_id?: string | null;
|
|
3948
|
+
name?: string | null;
|
|
3949
|
+
ip_address?: string | null;
|
|
3950
|
+
active_workspace?: string | null;
|
|
3951
|
+
workspaces: string[];
|
|
3952
|
+
status: string;
|
|
3953
|
+
ttl: number;
|
|
3954
|
+
}[]>, Error>;
|
|
3955
|
+
/** End one of the user's sessions at once (not this device's: that is a sign-out). */
|
|
3859
3956
|
declare function useTerminateSession(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
|
|
3860
|
-
/** Sign out of
|
|
3861
|
-
declare function
|
|
3957
|
+
/** Sign out of this device, or (`everywhere`) of every device, this one included. */
|
|
3958
|
+
declare function useSignOut(): _tanstack_react_query.UseMutationResult<void, Error, AccountSignOutOptions, unknown>;
|
|
3862
3959
|
/** The id this device's session carries in the `useSessions` list, or `null`. */
|
|
3863
3960
|
declare function useCurrentSessionId(): string | null;
|
|
3864
3961
|
|
|
@@ -3876,10 +3973,8 @@ type DeleteAccountBlocker = {
|
|
|
3876
3973
|
};
|
|
3877
3974
|
/** Read the blockers out of a failed deletion; an empty list means it failed for another reason. */
|
|
3878
3975
|
declare function parseDeleteAccountBlockers(error: unknown): DeleteAccountBlocker[];
|
|
3879
|
-
/** Close the account
|
|
3880
|
-
declare function useDeleteAccount(): _tanstack_react_query.UseMutationResult<
|
|
3881
|
-
detail: string;
|
|
3882
|
-
}, Error, void, unknown>;
|
|
3976
|
+
/** Close the account (the account client in scope). The caller signs out afterwards. */
|
|
3977
|
+
declare function useDeleteAccount(): _tanstack_react_query.UseMutationResult<unknown, Error, void, unknown>;
|
|
3883
3978
|
interface UseDeleteAccountFlowOptions {
|
|
3884
3979
|
userEmail: string;
|
|
3885
3980
|
/** Close the account. Reject with the backend's error to surface blockers. */
|
|
@@ -3905,51 +4000,6 @@ interface DeleteAccountFlow {
|
|
|
3905
4000
|
/** Step, typed-email confirmation and blockers of `DeleteAccountDialog`. */
|
|
3906
4001
|
declare function useDeleteAccountFlow({ userEmail, remove, onClose, onDeleted, onError, }: UseDeleteAccountFlowOptions): DeleteAccountFlow;
|
|
3907
4002
|
|
|
3908
|
-
/**
|
|
3909
|
-
* Identity verification: the optional, paid ID check behind the verified tick (Pro plans only).
|
|
3910
|
-
*
|
|
3911
|
-
* Two layers, like `profile.ts`. `useIdentityVerificationFlow` owns the dialog's state and takes
|
|
3912
|
-
* the backend calls as functions, so an app with its own API layer (ARBI-frontend) binds the same
|
|
3913
|
-
* `IdentityVerificationCard` / `IdentityVerificationDialog` blocks without a provider.
|
|
3914
|
-
* `useIdentityVerification` binds it to the SDK (`arbi.identity`).
|
|
3915
|
-
*
|
|
3916
|
-
* Steps: pay the one-time fee (charged to the user's Pro project card) → verify inside Didit's
|
|
3917
|
-
* embedded frame → result (verified, declined, in review, or the name on the document differs from
|
|
3918
|
-
* the account name, offered as the new name). No webhooks: completing Didit's flow calls `refresh`.
|
|
3919
|
-
*/
|
|
3920
|
-
|
|
3921
|
-
/** The backend calls of the flow, as functions (see the module comment). */
|
|
3922
|
-
interface IdentityVerificationApi {
|
|
3923
|
-
status: () => Promise<IdentityStatus>;
|
|
3924
|
-
purchase: () => Promise<IdentityPurchase>;
|
|
3925
|
-
/** The Didit session URL. */
|
|
3926
|
-
startSession: () => Promise<string>;
|
|
3927
|
-
refresh: () => Promise<IdentityStatus>;
|
|
3928
|
-
acceptName: () => Promise<IdentityStatus>;
|
|
3929
|
-
remove: () => Promise<IdentityStatus>;
|
|
3930
|
-
}
|
|
3931
|
-
interface UseIdentityVerificationFlowOptions {
|
|
3932
|
-
/** Load the status (default true; e.g. false while signed out). */
|
|
3933
|
-
enabled?: boolean;
|
|
3934
|
-
/** The tick changed (granted, renamed away, removed): update the host's copy of the user. */
|
|
3935
|
-
onVerifiedChange?: (verified: boolean) => void;
|
|
3936
|
-
/** The account name became the name on the document. */
|
|
3937
|
-
onNameAccepted?: (name: {
|
|
3938
|
-
givenName: string;
|
|
3939
|
-
familyName: string | null;
|
|
3940
|
-
}) => void;
|
|
3941
|
-
/** The host's price format (e.g. its billing helpers); default `formatIdentityPrice`. */
|
|
3942
|
-
formatPrice?: (status: IdentityStatus) => string;
|
|
3943
|
-
}
|
|
3944
|
-
/** Which step the dialog opens on for a status. */
|
|
3945
|
-
declare function identityStepFor(status: IdentityStatus | undefined): IdentityStep;
|
|
3946
|
-
/** "£5.00 incl. VAT": the fee is quoted including UK VAT. */
|
|
3947
|
-
declare function formatIdentityPrice(status: IdentityStatus): string;
|
|
3948
|
-
/** The identity verification dialog's state, bound to the backend calls in `api`. */
|
|
3949
|
-
declare function useIdentityVerificationFlow(api: IdentityVerificationApi, { enabled, onVerifiedChange, onNameAccepted, formatPrice, }?: UseIdentityVerificationFlowOptions): IdentityVerificationFlow;
|
|
3950
|
-
/** The identity verification flow bound to the SDK; the profile query follows the tick and name. */
|
|
3951
|
-
declare function useIdentityVerification(options?: Omit<UseIdentityVerificationFlowOptions, 'enabled'>): IdentityVerificationFlow;
|
|
3952
|
-
|
|
3953
4003
|
/**
|
|
3954
4004
|
* Didit's web SDK, loaded only when a verification starts (like the app loads Stripe), and run
|
|
3955
4005
|
* embedded in a host element. ID capture, liveness and face match all happen inside Didit's frame.
|
|
@@ -6225,8 +6275,8 @@ declare function useCommandPalette(): CommandPaletteValue;
|
|
|
6225
6275
|
* REUSE-FIRST: this composes AG Grid + `DocumentEntity`/`TagEntity` + the shadcn
|
|
6226
6276
|
* `Badge`; it is not a bespoke table. Data comes from the SDK `useDocuments`
|
|
6227
6277
|
* hook (or an explicit `documents` prop). Selection is controlled via
|
|
6228
|
-
* `selectedIds`/`onSelectionChange`, falling back to
|
|
6229
|
-
* `
|
|
6278
|
+
* `selectedIds`/`onSelectionChange`, falling back to
|
|
6279
|
+
* the session state (`useArbiSessionState`) when those props are omitted.
|
|
6230
6280
|
*/
|
|
6231
6281
|
|
|
6232
6282
|
type DocResponse$2 = components['schemas']['DocResponse'];
|
|
@@ -6288,7 +6338,7 @@ declare function DocumentCardMenu({ docId, fileName, onOpen, onRename, canDelete
|
|
|
6288
6338
|
* DocumentGallery — a reusable thumbnail-grid view of a workspace's documents.
|
|
6289
6339
|
*
|
|
6290
6340
|
* REUSE-FIRST: a sibling of `DocumentTable` sharing the exact same data sources
|
|
6291
|
-
* (`useDocuments` + `useTags` + the
|
|
6341
|
+
* (`useDocuments` + `useTags` + the session state's selection).
|
|
6292
6342
|
* The only extra dependency is `useThumbnails`, which batch-loads real first-page
|
|
6293
6343
|
* previews. Each tile is a `DocumentCard`; this component only binds it to data.
|
|
6294
6344
|
*/
|
|
@@ -6880,20 +6930,104 @@ declare function VideoCapture({ onSave, onDiscard, onError, isSaving }: VideoCap
|
|
|
6880
6930
|
declare function hasVideoTrack(blob: Blob): Promise<boolean>;
|
|
6881
6931
|
|
|
6882
6932
|
/**
|
|
6883
|
-
*
|
|
6933
|
+
* The session state every block reads and writes: the selected workspace, the current conversation,
|
|
6934
|
+
* the document being viewed, the document selection, generation per conversation, Personal
|
|
6935
|
+
* Assistant mode and the documents in each conversation.
|
|
6884
6936
|
*
|
|
6885
|
-
*
|
|
6886
|
-
*
|
|
6887
|
-
*
|
|
6937
|
+
* An {@link ArbiSessionStore} is the adapter a host provides through `ArbiSessionStateProvider`:
|
|
6938
|
+
* a host with its own state (ARBI-frontend's zustand store) maps its fields onto
|
|
6939
|
+
* {@link ArbiSessionState} and its actions onto the setters, so there is one source of truth.
|
|
6940
|
+
* Other hosts use {@link createArbiSessionStore}, an in-memory store.
|
|
6888
6941
|
*/
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
/**
|
|
6894
|
-
|
|
6895
|
-
|
|
6942
|
+
/** The document being viewed. */
|
|
6943
|
+
interface ArbiViewingDocument {
|
|
6944
|
+
/** The document (`doc-…`), or a version reference (`doc-…@v2`) while an earlier version shows. */
|
|
6945
|
+
id: string;
|
|
6946
|
+
/** The page being read, when known. */
|
|
6947
|
+
page: number | null;
|
|
6948
|
+
/** The passage being read, when one is. */
|
|
6949
|
+
passageId: string | null;
|
|
6896
6950
|
}
|
|
6897
|
-
|
|
6951
|
+
/** Generation in one conversation. */
|
|
6952
|
+
interface ArbiConversationGeneration {
|
|
6953
|
+
isGenerating: boolean;
|
|
6954
|
+
error: string | null;
|
|
6955
|
+
/** When the running turn started (epoch ms). */
|
|
6956
|
+
startTime: number | null;
|
|
6957
|
+
}
|
|
6958
|
+
/** A document in a conversation's context; a pinned one stays there across turns. */
|
|
6959
|
+
interface ArbiConversationDocument {
|
|
6960
|
+
docId: string;
|
|
6961
|
+
isPinned: boolean;
|
|
6962
|
+
}
|
|
6963
|
+
interface ArbiSessionState {
|
|
6964
|
+
/** The selected workspace (`wrk-…`). */
|
|
6965
|
+
workspaceId: string | null;
|
|
6966
|
+
/** The open conversation, or null for a new one / none. */
|
|
6967
|
+
conversationId: string | null;
|
|
6968
|
+
viewingDocument: ArbiViewingDocument | null;
|
|
6969
|
+
/** The documents selected in document lists. */
|
|
6970
|
+
selectedDocumentIds: readonly string[];
|
|
6971
|
+
/** Generation state per conversation id. */
|
|
6972
|
+
generating: Readonly<Record<string, ArbiConversationGeneration>>;
|
|
6973
|
+
/** Personal Assistant mode for new conversations. */
|
|
6974
|
+
paMode: boolean;
|
|
6975
|
+
/** The documents in each conversation's context, per conversation id. */
|
|
6976
|
+
conversationDocuments: Readonly<Record<string, readonly ArbiConversationDocument[]>>;
|
|
6977
|
+
}
|
|
6978
|
+
/** What to view: page and passage are left unchanged when omitted. */
|
|
6979
|
+
interface ArbiViewingDocumentInput {
|
|
6980
|
+
id: string;
|
|
6981
|
+
page?: number | null;
|
|
6982
|
+
passageId?: string | null;
|
|
6983
|
+
}
|
|
6984
|
+
interface ArbiSessionStore {
|
|
6985
|
+
/** The current state. The same object until something in it changes. */
|
|
6986
|
+
getState(): ArbiSessionState;
|
|
6987
|
+
/** Be told when the state may have changed. Returns the unsubscribe. */
|
|
6988
|
+
subscribe(listener: () => void): () => void;
|
|
6989
|
+
setWorkspaceId(id: string | null): void;
|
|
6990
|
+
setConversationId(id: string | null): void;
|
|
6991
|
+
/**
|
|
6992
|
+
* View a document, or none. Viewing another document resets the page; `page` and `passageId`
|
|
6993
|
+
* set them when given.
|
|
6994
|
+
*/
|
|
6995
|
+
setViewingDocument(document: ArbiViewingDocumentInput | null): void;
|
|
6996
|
+
setSelectedDocumentIds(ids: string[]): void;
|
|
6997
|
+
setConversationGenerating(conversationId: string, isGenerating: boolean): void;
|
|
6998
|
+
setPaMode(enabled: boolean): void;
|
|
6999
|
+
setConversationDocuments(conversationId: string, documents: ArbiConversationDocument[]): void;
|
|
7000
|
+
}
|
|
7001
|
+
declare const EMPTY_SESSION_STATE: ArbiSessionState;
|
|
7002
|
+
/** The viewed document itself (`doc-…`), also while one of its earlier versions is on screen. */
|
|
7003
|
+
declare const selectViewingDocumentId: (state: ArbiSessionState) => string | null;
|
|
7004
|
+
/** Whether `conversationId` is generating. */
|
|
7005
|
+
declare const selectIsGenerating: (conversationId: string | null | undefined) => (state: ArbiSessionState) => boolean;
|
|
7006
|
+
/** The next viewing document, given the current one (shared by every store implementation). */
|
|
7007
|
+
declare function nextViewingDocument(current: ArbiViewingDocument | null, input: ArbiViewingDocumentInput | null): ArbiViewingDocument | null;
|
|
7008
|
+
/** An in-memory session store: the default for hosts without state of their own. */
|
|
7009
|
+
declare function createArbiSessionStore(initial?: Partial<ArbiSessionState>): ArbiSessionStore;
|
|
7010
|
+
|
|
7011
|
+
/**
|
|
7012
|
+
* The session state the blocks below share (see `./store`). A host passes its own
|
|
7013
|
+
* {@link ArbiSessionStore} (ARBI-frontend backs it with its zustand store). Without `store` the
|
|
7014
|
+
* provider uses the one above it, else keeps an in-memory one, so a kit (`ConnectionProvider`) can
|
|
7015
|
+
* always mount one and still share the host's. Blocks rendered with no provider above share a
|
|
7016
|
+
* module default, so a standalone block still coordinates with its siblings.
|
|
7017
|
+
*/
|
|
7018
|
+
|
|
7019
|
+
interface ArbiSessionStateProviderProps {
|
|
7020
|
+
/** The host's session state. Omitted: the enclosing provider's, else an in-memory one. */
|
|
7021
|
+
store?: ArbiSessionStore;
|
|
7022
|
+
children: ReactNode;
|
|
7023
|
+
}
|
|
7024
|
+
declare function ArbiSessionStateProvider({ store, children, }: ArbiSessionStateProviderProps): React.ReactElement;
|
|
7025
|
+
/** The session store: its setters, and `getState()` for the state as of now (in callbacks). */
|
|
7026
|
+
declare function useArbiSessionStore(): ArbiSessionStore;
|
|
7027
|
+
/**
|
|
7028
|
+
* A slice of the session state; re-renders when it changes. The selector returns a value from the
|
|
7029
|
+
* state or a primitive (a new object each call would never settle).
|
|
7030
|
+
*/
|
|
7031
|
+
declare function useArbiSessionState<T>(selector: (state: ArbiSessionState) => T): T;
|
|
6898
7032
|
|
|
6899
|
-
export { AUDIO_MIME_PREFERENCE, 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, ArbiProvider, type ArbiProviderProps, type
|
|
7033
|
+
export { AUDIO_MIME_PREFERENCE, type AccountClient, type AccountClientContextValue, AccountClientProvider, type AccountClientProviderProps, type AccountSession, type AccountSignOutOptions, 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, type ArbiConversationDocument, type ArbiConversationGeneration, ArbiProvider, type ArbiProviderProps, type ArbiSessionState, ArbiSessionStateProvider, type ArbiSessionStateProviderProps, type ArbiSessionStore, type ArbiViewingDocument, type ArbiViewingDocumentInput, ArbiWebSocketProvider, type ArbiWebSocketProviderProps, type ArbiWsState, type ArbiWsStatus, ArtifactCanvas, type AspectOption, AudIcon, type AudioRecorderState, type AudioSegment, type AvatarCrop, type AvatarFileProblem, ChatBubble, type ChatBubbleProps, type Chunk, type ChunkActivation, type ChunkedRecorder, type ChunkedRecorderOptions, 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_SEGMENTER_CONFIG, DEFAULT_START_BY_EMAIL_LABELS, DateSeparator, type DateSeparatorProps, type DeleteAccountBlocker, type DeleteAccountFlow, DirectMessages, type DirectMessagesProps, DmAvatar, type DmAvatarProps, type DmClassNames, DmComposer, type DmComposerProps, type DmConversation, type DmMessage, type DmUser, DocIcon, DocQaPanel, DocSearch, DocumentCardMenu, type DocumentCardMenuProps, DocumentGallery, type DocumentGalleryProps, DocumentReview, type DocumentReviewProps, DocumentTable, type DocumentTableProps, DraftTitleControls, type DraftTitleControlsProps, EMPTY_SESSION_STATE, type EmailChange, type EmailPreferences, EmlIcon, EntityIconComponent, FILE_TYPE_COLORS, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, type GrantAgentAccessVars, HtmlIcon, INITIAL_SEGMENTER_STATE, IdentityPurchase, IdentityStatus, IdentityStep, type IdentityVerificationApi, IdentityVerificationFlow, ImageCropModal, type ImageCropModalProps, ImageCropper, type ImageCropperProps, ImgIcon, InlineMicButton, type InlineMicButtonProps, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_AVATAR_FILE_BYTES, type MailAccount, type MailAddress, type MailAttachment, type MailClient, type MailClientContextValue, MailClientProvider, type MailClientProviderProps, type MailCompose, type MailDeliveryRecipient, type MailDeliveryStatus, type MailDeviceFallback, type MailDraftEditorRequest, type MailDraftEditorSession, type MailFetch, type MailFolder, type MailMessage, type MailMessageUpdate, MailOfflineUnavailableError, type MailPage, type MailPolicy, type MailProject, type MessageArtifact, MessageArtifactCard, MessageBubble, type MessageBubbleProps, MessageThread, type MessageThreadProps, MicRecordingOverlay, type MicRecordingOverlayProps, MicWaveformIndicator, type MicWaveformIndicatorProps, type MountDiditOptions, type NameEditor, type NotificationPreferencesModel, type NotificationTypeMeta, OpenAIIcon, PROJECT_CREATION_DENIED_REASON, type PaletteNavItem, type ParsedChunk, type ParsedChunkMetadata, type ParsedDocument, type ParsedDocumentMetadata, type PasswordChangeForm, type PasswordChangeFormMessages, type PasswordChangeVars, PdfIcon, PhotoCapture, type PhotoCaptureProps, type ProfileView, type ProjectsUsageAggregate, ProviderIcon, RUN_WINDOW_MS, type RecordedChunk, type RelevancePatch, type RenderMarkdown, type SaveAgentConfigVars, type SearchChunk, type SegmenterConfig, type SegmenterEvent, type SegmenterState, 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 UseAudioRecorderOptions, type UseAudioRecorderResult, type UseAvatarCropOptions, type UseCameraStreamResult, type UseDeleteAccountFlowOptions, type UseDirectMessagesResult, type UseEmailChangeOptions, type UseIdentityVerificationFlowOptions, type UseNameEditorOptions, type UsePasswordChangeFormOptions, type UseShellWorkspacesOptions, type UseShellWorkspacesResult, type UseVideoRecorderResult, VIDEO_MIME_PREFERENCE, VidIcon, VideoCapture, type VideoCaptureProps, type VideoRecorderState, VoiceNoteRecorder, type VoiceNoteRecorderProps, type WorkspaceNotificationLevel, XlsIcon, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, arbiAccountClient, arbiMailClient, arbiQueryKeys, captureFrameAsBlob, classifyMediaError, createArbiSessionStore, createChunkedRecorder, createMailClient, cropImage, dayKey, defaultMailAlias, describeActivity, downloadRecoveryFile, fileAttachment, flushSegmenter, formatElapsed, formatIdentityPrice, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isAliasTakenError, isUsageMetered, isWorkspaceNotificationType, levelFromRms, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, nextViewingDocument, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, pickRecorderMimeType, redlineStats, resolveActiveWorkspace, selectIsGenerating, selectViewingDocumentId, stepSegmenter, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useAccountClient, useActOnStep, useActivity, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAgents, useAiTask, useArbi, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiSessionState, useArbiSessionStore, useArbiShellWorkspaces, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssistantQuery, useAudioRecorder, useAvatarCrop, useCameraStream, useCanCreateProjects, useClaimNativeAlias, useCloseAgentSession, useCommandPalette, useConfigs, useConfirmEmailChange, useConnectMailAccount, useContacts, useConversationActivity, useConversationPendingAuth, useConversationThreads, useConversationUsage, useConversations, useCreateAgent, useCreateContact, useCreateWork, useCreateWorkflow, useCurrentSessionId, useCurrentUser, useDeleteAccount, useDeleteAccountFlow, useDeleteAgents, useDeleteContact, useDeleteWorkflow, useDeploymentDomain, useDirectMessages, useDisconnectMailAccount, useDocuments, useEmailChange, useFacts, useFilteredProjects, useFirmPool, useFollowThread, useGrantAgentAccess, useHealth, useIdentityVerification, useIdentityVerificationFlow, useInvalidateTagData, useInviteContacts, useMailAccounts, useMailCache, useMailClient, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailUnlock, useNameEditor, useNotificationPreferences, useParsedDocument, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanWork, useProfile, useProjectConversationUsage, useProjectEvents, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useRequestEmailChange, useRevokeAgentAccess, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveMailDraft, useSemanticSearch, useSendBackStep, useSendMail, useSessions, useSetTagValues, useShellWorkspaces, useSignOut, useSkills, useStartAgentSession, useStartWorkQuery, useTagKindSchema, useTags, useTerminateSession, useThumbnails, useTopUpFirmPool, useUpdateContact, useUpdateConversation, useUpdateMailMessage, useUpdateProfile, useUpdateProjectFields, useUpdateTagKindSchema, useUpdateWorkflow, useUploadSkillFiles, useUserSettings, useUserUsageToday, useVideoRecorder, useWorkNotifications, useWorkflows, useWorkspaceActivity, useWorkspaceDocs, useWorkspaceNotificationLevel, useWorkspaceUsers, useWorkspaces, userDisplayName, userInitials, workflowStepOf };
|