@arbidocs/react 0.4.108 → 0.4.110

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.ts 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, TagListQuery, StepActionRequest, UpdateConversationRequest, UpdateWorkflowRequest, TagKind, TagKindSchema, TagFieldDefinition, ProjectEventKind, ProjectUpdateRequest, LoginProfile, settings } from '@arbidocs/sdk/browser';
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
7
  import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
@@ -566,6 +566,7 @@ declare const arbiQueryKeys: {
566
566
  projectInvoices: (projectExtId: string) => readonly ["arbi", "projectInvoices", string];
567
567
  userUsageToday: () => readonly ["arbi", "userUsageToday"];
568
568
  currentUser: () => readonly ["arbi", "currentUser"];
569
+ firmPool: () => readonly ["arbi", "firmPool"];
569
570
  contacts: () => readonly ["arbi", "contacts"];
570
571
  skills: () => readonly ["arbi", "skills"];
571
572
  /** An agent's pinned config; `undefined` = the library default config. */
@@ -755,6 +756,7 @@ declare function useConversations(workspaceId: string | undefined, options?: {
755
756
  last_message_updated_at?: string | null | undefined;
756
757
  last_message_status?: string | null | undefined;
757
758
  assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
759
+ meeting_call_ext_id?: string | null | undefined;
758
760
  status?: (_arbidocs_client.components["schemas"]["WorkStatus"] | null) | undefined;
759
761
  description?: string | null | undefined;
760
762
  due_at?: string | null | undefined;
@@ -1051,6 +1053,12 @@ declare function useConversationThreads(workspaceId: string | undefined, convers
1051
1053
  name: "workflow_step";
1052
1054
  description: string;
1053
1055
  workflow_step: string;
1056
+ } | {
1057
+ name: "transcript_segment";
1058
+ description: string;
1059
+ segment_id: string;
1060
+ speaker_ext_id: string;
1061
+ started_at?: string | null | undefined;
1054
1062
  } | {
1055
1063
  name: "mail_context";
1056
1064
  description: string;
@@ -1295,9 +1303,7 @@ declare function useActivity(options?: {
1295
1303
  is_identity_verified: boolean;
1296
1304
  };
1297
1305
  workspace_ext_id?: string | null | undefined;
1298
- dm_context_only: boolean;
1299
1306
  content?: string | null | undefined;
1300
- attachments?: string | null | undefined;
1301
1307
  conversation_ext_id?: string | null | undefined;
1302
1308
  message_ext_id?: string | null | undefined;
1303
1309
  read: boolean;
@@ -2028,6 +2034,70 @@ declare function useCurrentUser(options?: {
2028
2034
  can_create_projects: boolean;
2029
2035
  is_deployment_admin: boolean;
2030
2036
  }>, Error>;
2037
+ /**
2038
+ * The firm's pooled monthly £ of AI usage (Box deployments). A 403 (the caller is not a firm member
2039
+ * or Box admin) is not retried: treat an error like `has_pool: false` and show nothing.
2040
+ */
2041
+ declare function useFirmPool(options?: {
2042
+ enabled?: boolean;
2043
+ }): _tanstack_react_query.UseQueryResult<NoInfer<{
2044
+ has_pool: boolean;
2045
+ month?: string | null;
2046
+ resets_at?: string | null;
2047
+ licence_status?: string | null;
2048
+ expires_at?: string | null;
2049
+ premium_only: boolean;
2050
+ box_seats?: number | null;
2051
+ plus_seats?: number | null;
2052
+ ai_addons?: number | null;
2053
+ addon_gbp?: number | null;
2054
+ base_gbp?: number | null;
2055
+ auto_addons?: number | null;
2056
+ auto_addon_gbp?: number | null;
2057
+ auto_addon_price_pence?: number | null;
2058
+ auto_addon_spent_pence?: number | null;
2059
+ auto_addon_limit_pence?: number | null;
2060
+ total_gbp?: number | null;
2061
+ used_gbp?: number | null;
2062
+ remaining_gbp?: number | null;
2063
+ people_this_month?: number | null;
2064
+ report_computed_at?: string | null;
2065
+ subscription_status?: string | null;
2066
+ cancel_at_period_end?: boolean | null;
2067
+ period_end?: string | null;
2068
+ can_top_up: boolean;
2069
+ }>, Error>;
2070
+ /** Buy add-ons for the firm (Box admins). Refreshes the pool; the result may carry an invoice URL. */
2071
+ declare function useTopUpFirmPool(): _tanstack_react_query.UseMutationResult<{
2072
+ pool: {
2073
+ has_pool: boolean;
2074
+ month?: string | null | undefined;
2075
+ resets_at?: string | null | undefined;
2076
+ licence_status?: string | null | undefined;
2077
+ expires_at?: string | null | undefined;
2078
+ premium_only: boolean;
2079
+ box_seats?: number | null | undefined;
2080
+ plus_seats?: number | null | undefined;
2081
+ ai_addons?: number | null | undefined;
2082
+ addon_gbp?: number | null | undefined;
2083
+ base_gbp?: number | null | undefined;
2084
+ auto_addons?: number | null | undefined;
2085
+ auto_addon_gbp?: number | null | undefined;
2086
+ auto_addon_price_pence?: number | null | undefined;
2087
+ auto_addon_spent_pence?: number | null | undefined;
2088
+ auto_addon_limit_pence?: number | null | undefined;
2089
+ total_gbp?: number | null | undefined;
2090
+ used_gbp?: number | null | undefined;
2091
+ remaining_gbp?: number | null | undefined;
2092
+ people_this_month?: number | null | undefined;
2093
+ report_computed_at?: string | null | undefined;
2094
+ subscription_status?: string | null | undefined;
2095
+ cancel_at_period_end?: boolean | null | undefined;
2096
+ period_end?: string | null | undefined;
2097
+ can_top_up: boolean;
2098
+ };
2099
+ invoice_url?: string | null | undefined;
2100
+ }, Error, number, unknown>;
2031
2101
  /** Why "New project" / "New workspace" is unavailable to someone who may not create them. */
2032
2102
  declare const PROJECT_CREATION_DENIED_REASON = "Only members of your firm can create projects and workspaces.";
2033
2103
  /**
@@ -2064,6 +2134,7 @@ declare function useUpdateConversation(): _tanstack_react_query.UseMutationResul
2064
2134
  last_message_updated_at?: string | null;
2065
2135
  last_message_status?: string | null;
2066
2136
  assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
2137
+ meeting_call_ext_id?: string | null;
2067
2138
  status?: _arbidocs_client.components["schemas"]["WorkStatus"] | null;
2068
2139
  description?: string | null;
2069
2140
  due_at?: string | null;
@@ -2113,6 +2184,7 @@ declare function useCreateWork(): _tanstack_react_query.UseMutationResult<{
2113
2184
  last_message_updated_at?: string | null;
2114
2185
  last_message_status?: string | null;
2115
2186
  assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
2187
+ meeting_call_ext_id?: string | null;
2116
2188
  status?: _arbidocs_client.components["schemas"]["WorkStatus"] | null;
2117
2189
  description?: string | null;
2118
2190
  due_at?: string | null;
@@ -2174,6 +2246,7 @@ declare function useRunConversation(): _tanstack_react_query.UseMutationResult<{
2174
2246
  last_message_updated_at?: string | null;
2175
2247
  last_message_status?: string | null;
2176
2248
  assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
2249
+ meeting_call_ext_id?: string | null;
2177
2250
  status?: _arbidocs_client.components["schemas"]["WorkStatus"] | null;
2178
2251
  description?: string | null;
2179
2252
  due_at?: string | null;
@@ -2220,6 +2293,7 @@ declare function useActOnStep(): _tanstack_react_query.UseMutationResult<{
2220
2293
  last_message_updated_at?: string | null;
2221
2294
  last_message_status?: string | null;
2222
2295
  assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
2296
+ meeting_call_ext_id?: string | null;
2223
2297
  status?: _arbidocs_client.components["schemas"]["WorkStatus"] | null;
2224
2298
  description?: string | null;
2225
2299
  due_at?: string | null;
@@ -2270,6 +2344,7 @@ declare function useSendBackStep(): _tanstack_react_query.UseMutationResult<{
2270
2344
  last_message_updated_at?: string | null;
2271
2345
  last_message_status?: string | null;
2272
2346
  assistant_mode: _arbidocs_client.components["schemas"]["AssistantMode"];
2347
+ meeting_call_ext_id?: string | null;
2273
2348
  status?: _arbidocs_client.components["schemas"]["WorkStatus"] | null;
2274
2349
  description?: string | null;
2275
2350
  due_at?: string | null;
@@ -2923,79 +2998,48 @@ declare function useProjectConversationUsage(projectExtId: string | undefined, m
2923
2998
  unattributed: _arbidocs_client.components["schemas"]["TagBreakdown"];
2924
2999
  }>, Error>;
2925
3000
 
2926
- /**
2927
- * Contacts: the user's colleagues and pending invitations.
2928
- *
2929
- * Shares `arbiQueryKeys.contacts()` with `useDirectMessages`, so a change made here refreshes the
2930
- * conversation rail on its own. The parts that turn an email list into a request and the backend
2931
- * outcome into a sentence live in `@arbidocs/blocks/collaboration` (`AddContactsForm`).
2932
- */
2933
- /** The user's contacts, registered and pending. */
3001
+ /** Every contact: registered, invited and plain cards. */
2934
3002
  declare function useContacts(options?: {
2935
3003
  enabled?: boolean;
2936
3004
  }): _tanstack_react_query.UseQueryResult<NoInfer<{
2937
- external_id?: string | null | undefined;
2938
- email: string;
2939
- user?: {
2940
- external_id: string;
2941
- parent_ext_id?: string | null | undefined;
2942
- email: string;
2943
- given_name: string;
2944
- family_name?: string | null | undefined;
2945
- picture?: string | null | undefined;
2946
- encryption_public_key: string;
2947
- is_sso: boolean;
2948
- is_identity_verified: boolean;
2949
- } | null | undefined;
2950
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3005
+ external_id?: string | null;
3006
+ email?: string | null;
3007
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3008
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3009
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3010
+ address_book_ext_id?: string | null;
2951
3011
  created_at: string;
2952
- shared_workspace_ext_id?: string | null | undefined;
2953
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
2954
- outcome_detail?: string | null | undefined;
3012
+ shared_workspace_ext_id?: string | null;
3013
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3014
+ outcome_detail?: string | null;
2955
3015
  }[]>, Error>;
2956
- /** Contacts still waiting to join (an invitation sent or expired); `Invite again` re-adds them. */
3016
+ /** Contacts still waiting to join (an invitation sent or expired); `Invite again` re-invites them. */
2957
3017
  declare function usePendingContacts(options?: {
2958
3018
  enabled?: boolean;
2959
3019
  }): {
2960
3020
  pending: {
2961
- external_id?: string | null | undefined;
2962
- email: string;
2963
- user?: {
2964
- external_id: string;
2965
- parent_ext_id?: string | null | undefined;
2966
- email: string;
2967
- given_name: string;
2968
- family_name?: string | null | undefined;
2969
- picture?: string | null | undefined;
2970
- encryption_public_key: string;
2971
- is_sso: boolean;
2972
- is_identity_verified: boolean;
2973
- } | null | undefined;
2974
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3021
+ external_id?: string | null;
3022
+ email?: string | null;
3023
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3024
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3025
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3026
+ address_book_ext_id?: string | null;
2975
3027
  created_at: string;
2976
- shared_workspace_ext_id?: string | null | undefined;
2977
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
2978
- outcome_detail?: string | null | undefined;
3028
+ shared_workspace_ext_id?: string | null;
3029
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3030
+ outcome_detail?: string | null;
2979
3031
  }[];
2980
3032
  data: NoInfer<{
2981
- external_id?: string | null | undefined;
2982
- email: string;
2983
- user?: {
2984
- external_id: string;
2985
- parent_ext_id?: string | null | undefined;
2986
- email: string;
2987
- given_name: string;
2988
- family_name?: string | null | undefined;
2989
- picture?: string | null | undefined;
2990
- encryption_public_key: string;
2991
- is_sso: boolean;
2992
- is_identity_verified: boolean;
2993
- } | null | undefined;
2994
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3033
+ external_id?: string | null;
3034
+ email?: string | null;
3035
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3036
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3037
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3038
+ address_book_ext_id?: string | null;
2995
3039
  created_at: string;
2996
- shared_workspace_ext_id?: string | null | undefined;
2997
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
2998
- outcome_detail?: string | null | undefined;
3040
+ shared_workspace_ext_id?: string | null;
3041
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3042
+ outcome_detail?: string | null;
2999
3043
  }[]>;
3000
3044
  error: Error;
3001
3045
  isError: true;
@@ -3020,86 +3064,54 @@ declare function usePendingContacts(options?: {
3020
3064
  isStale: boolean;
3021
3065
  isEnabled: boolean;
3022
3066
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
3023
- external_id?: string | null | undefined;
3024
- email: string;
3025
- user?: {
3026
- external_id: string;
3027
- parent_ext_id?: string | null | undefined;
3028
- email: string;
3029
- given_name: string;
3030
- family_name?: string | null | undefined;
3031
- picture?: string | null | undefined;
3032
- encryption_public_key: string;
3033
- is_sso: boolean;
3034
- is_identity_verified: boolean;
3035
- } | null | undefined;
3036
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3067
+ external_id?: string | null;
3068
+ email?: string | null;
3069
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3070
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3071
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3072
+ address_book_ext_id?: string | null;
3037
3073
  created_at: string;
3038
- shared_workspace_ext_id?: string | null | undefined;
3039
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3040
- outcome_detail?: string | null | undefined;
3074
+ shared_workspace_ext_id?: string | null;
3075
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3076
+ outcome_detail?: string | null;
3041
3077
  }[]>, Error>>;
3042
3078
  fetchStatus: _tanstack_query_core.FetchStatus;
3043
3079
  promise: Promise<NoInfer<{
3044
- external_id?: string | null | undefined;
3045
- email: string;
3046
- user?: {
3047
- external_id: string;
3048
- parent_ext_id?: string | null | undefined;
3049
- email: string;
3050
- given_name: string;
3051
- family_name?: string | null | undefined;
3052
- picture?: string | null | undefined;
3053
- encryption_public_key: string;
3054
- is_sso: boolean;
3055
- is_identity_verified: boolean;
3056
- } | null | undefined;
3057
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3080
+ external_id?: string | null;
3081
+ email?: string | null;
3082
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3083
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3084
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3085
+ address_book_ext_id?: string | null;
3058
3086
  created_at: string;
3059
- shared_workspace_ext_id?: string | null | undefined;
3060
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3061
- outcome_detail?: string | null | undefined;
3087
+ shared_workspace_ext_id?: string | null;
3088
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3089
+ outcome_detail?: string | null;
3062
3090
  }[]>>;
3063
3091
  } | {
3064
3092
  pending: {
3065
- external_id?: string | null | undefined;
3066
- email: string;
3067
- user?: {
3068
- external_id: string;
3069
- parent_ext_id?: string | null | undefined;
3070
- email: string;
3071
- given_name: string;
3072
- family_name?: string | null | undefined;
3073
- picture?: string | null | undefined;
3074
- encryption_public_key: string;
3075
- is_sso: boolean;
3076
- is_identity_verified: boolean;
3077
- } | null | undefined;
3078
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3093
+ external_id?: string | null;
3094
+ email?: string | null;
3095
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3096
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3097
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3098
+ address_book_ext_id?: string | null;
3079
3099
  created_at: string;
3080
- shared_workspace_ext_id?: string | null | undefined;
3081
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3082
- outcome_detail?: string | null | undefined;
3100
+ shared_workspace_ext_id?: string | null;
3101
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3102
+ outcome_detail?: string | null;
3083
3103
  }[];
3084
3104
  data: NoInfer<{
3085
- external_id?: string | null | undefined;
3086
- email: string;
3087
- user?: {
3088
- external_id: string;
3089
- parent_ext_id?: string | null | undefined;
3090
- email: string;
3091
- given_name: string;
3092
- family_name?: string | null | undefined;
3093
- picture?: string | null | undefined;
3094
- encryption_public_key: string;
3095
- is_sso: boolean;
3096
- is_identity_verified: boolean;
3097
- } | null | undefined;
3098
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3105
+ external_id?: string | null;
3106
+ email?: string | null;
3107
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3108
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3109
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3110
+ address_book_ext_id?: string | null;
3099
3111
  created_at: string;
3100
- shared_workspace_ext_id?: string | null | undefined;
3101
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3102
- outcome_detail?: string | null | undefined;
3112
+ shared_workspace_ext_id?: string | null;
3113
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3114
+ outcome_detail?: string | null;
3103
3115
  }[]>;
3104
3116
  error: null;
3105
3117
  isError: false;
@@ -3124,66 +3136,42 @@ declare function usePendingContacts(options?: {
3124
3136
  isStale: boolean;
3125
3137
  isEnabled: boolean;
3126
3138
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
3127
- external_id?: string | null | undefined;
3128
- email: string;
3129
- user?: {
3130
- external_id: string;
3131
- parent_ext_id?: string | null | undefined;
3132
- email: string;
3133
- given_name: string;
3134
- family_name?: string | null | undefined;
3135
- picture?: string | null | undefined;
3136
- encryption_public_key: string;
3137
- is_sso: boolean;
3138
- is_identity_verified: boolean;
3139
- } | null | undefined;
3140
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3139
+ external_id?: string | null;
3140
+ email?: string | null;
3141
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3142
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3143
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3144
+ address_book_ext_id?: string | null;
3141
3145
  created_at: string;
3142
- shared_workspace_ext_id?: string | null | undefined;
3143
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3144
- outcome_detail?: string | null | undefined;
3146
+ shared_workspace_ext_id?: string | null;
3147
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3148
+ outcome_detail?: string | null;
3145
3149
  }[]>, Error>>;
3146
3150
  fetchStatus: _tanstack_query_core.FetchStatus;
3147
3151
  promise: Promise<NoInfer<{
3148
- external_id?: string | null | undefined;
3149
- email: string;
3150
- user?: {
3151
- external_id: string;
3152
- parent_ext_id?: string | null | undefined;
3153
- email: string;
3154
- given_name: string;
3155
- family_name?: string | null | undefined;
3156
- picture?: string | null | undefined;
3157
- encryption_public_key: string;
3158
- is_sso: boolean;
3159
- is_identity_verified: boolean;
3160
- } | null | undefined;
3161
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3152
+ external_id?: string | null;
3153
+ email?: string | null;
3154
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3155
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3156
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3157
+ address_book_ext_id?: string | null;
3162
3158
  created_at: string;
3163
- shared_workspace_ext_id?: string | null | undefined;
3164
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3165
- outcome_detail?: string | null | undefined;
3159
+ shared_workspace_ext_id?: string | null;
3160
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3161
+ outcome_detail?: string | null;
3166
3162
  }[]>>;
3167
3163
  } | {
3168
3164
  pending: {
3169
- external_id?: string | null | undefined;
3170
- email: string;
3171
- user?: {
3172
- external_id: string;
3173
- parent_ext_id?: string | null | undefined;
3174
- email: string;
3175
- given_name: string;
3176
- family_name?: string | null | undefined;
3177
- picture?: string | null | undefined;
3178
- encryption_public_key: string;
3179
- is_sso: boolean;
3180
- is_identity_verified: boolean;
3181
- } | null | undefined;
3182
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3165
+ external_id?: string | null;
3166
+ email?: string | null;
3167
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3168
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3169
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3170
+ address_book_ext_id?: string | null;
3183
3171
  created_at: string;
3184
- shared_workspace_ext_id?: string | null | undefined;
3185
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3186
- outcome_detail?: string | null | undefined;
3172
+ shared_workspace_ext_id?: string | null;
3173
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3174
+ outcome_detail?: string | null;
3187
3175
  }[];
3188
3176
  data: undefined;
3189
3177
  error: Error;
@@ -3209,66 +3197,42 @@ declare function usePendingContacts(options?: {
3209
3197
  isStale: boolean;
3210
3198
  isEnabled: boolean;
3211
3199
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
3212
- external_id?: string | null | undefined;
3213
- email: string;
3214
- user?: {
3215
- external_id: string;
3216
- parent_ext_id?: string | null | undefined;
3217
- email: string;
3218
- given_name: string;
3219
- family_name?: string | null | undefined;
3220
- picture?: string | null | undefined;
3221
- encryption_public_key: string;
3222
- is_sso: boolean;
3223
- is_identity_verified: boolean;
3224
- } | null | undefined;
3225
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3200
+ external_id?: string | null;
3201
+ email?: string | null;
3202
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3203
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3204
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3205
+ address_book_ext_id?: string | null;
3226
3206
  created_at: string;
3227
- shared_workspace_ext_id?: string | null | undefined;
3228
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3229
- outcome_detail?: string | null | undefined;
3207
+ shared_workspace_ext_id?: string | null;
3208
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3209
+ outcome_detail?: string | null;
3230
3210
  }[]>, Error>>;
3231
3211
  fetchStatus: _tanstack_query_core.FetchStatus;
3232
3212
  promise: Promise<NoInfer<{
3233
- external_id?: string | null | undefined;
3234
- email: string;
3235
- user?: {
3236
- external_id: string;
3237
- parent_ext_id?: string | null | undefined;
3238
- email: string;
3239
- given_name: string;
3240
- family_name?: string | null | undefined;
3241
- picture?: string | null | undefined;
3242
- encryption_public_key: string;
3243
- is_sso: boolean;
3244
- is_identity_verified: boolean;
3245
- } | null | undefined;
3246
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3213
+ external_id?: string | null;
3214
+ email?: string | null;
3215
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3216
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3217
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3218
+ address_book_ext_id?: string | null;
3247
3219
  created_at: string;
3248
- shared_workspace_ext_id?: string | null | undefined;
3249
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3250
- outcome_detail?: string | null | undefined;
3220
+ shared_workspace_ext_id?: string | null;
3221
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3222
+ outcome_detail?: string | null;
3251
3223
  }[]>>;
3252
3224
  } | {
3253
3225
  pending: {
3254
- external_id?: string | null | undefined;
3255
- email: string;
3256
- user?: {
3257
- external_id: string;
3258
- parent_ext_id?: string | null | undefined;
3259
- email: string;
3260
- given_name: string;
3261
- family_name?: string | null | undefined;
3262
- picture?: string | null | undefined;
3263
- encryption_public_key: string;
3264
- is_sso: boolean;
3265
- is_identity_verified: boolean;
3266
- } | null | undefined;
3267
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3226
+ external_id?: string | null;
3227
+ email?: string | null;
3228
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3229
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3230
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3231
+ address_book_ext_id?: string | null;
3268
3232
  created_at: string;
3269
- shared_workspace_ext_id?: string | null | undefined;
3270
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3271
- outcome_detail?: string | null | undefined;
3233
+ shared_workspace_ext_id?: string | null;
3234
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3235
+ outcome_detail?: string | null;
3272
3236
  }[];
3273
3237
  data: undefined;
3274
3238
  error: null;
@@ -3294,66 +3258,42 @@ declare function usePendingContacts(options?: {
3294
3258
  isStale: boolean;
3295
3259
  isEnabled: boolean;
3296
3260
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
3297
- external_id?: string | null | undefined;
3298
- email: string;
3299
- user?: {
3300
- external_id: string;
3301
- parent_ext_id?: string | null | undefined;
3302
- email: string;
3303
- given_name: string;
3304
- family_name?: string | null | undefined;
3305
- picture?: string | null | undefined;
3306
- encryption_public_key: string;
3307
- is_sso: boolean;
3308
- is_identity_verified: boolean;
3309
- } | null | undefined;
3310
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3261
+ external_id?: string | null;
3262
+ email?: string | null;
3263
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3264
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3265
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3266
+ address_book_ext_id?: string | null;
3311
3267
  created_at: string;
3312
- shared_workspace_ext_id?: string | null | undefined;
3313
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3314
- outcome_detail?: string | null | undefined;
3268
+ shared_workspace_ext_id?: string | null;
3269
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3270
+ outcome_detail?: string | null;
3315
3271
  }[]>, Error>>;
3316
3272
  fetchStatus: _tanstack_query_core.FetchStatus;
3317
3273
  promise: Promise<NoInfer<{
3318
- external_id?: string | null | undefined;
3319
- email: string;
3320
- user?: {
3321
- external_id: string;
3322
- parent_ext_id?: string | null | undefined;
3323
- email: string;
3324
- given_name: string;
3325
- family_name?: string | null | undefined;
3326
- picture?: string | null | undefined;
3327
- encryption_public_key: string;
3328
- is_sso: boolean;
3329
- is_identity_verified: boolean;
3330
- } | null | undefined;
3331
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3274
+ external_id?: string | null;
3275
+ email?: string | null;
3276
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3277
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3278
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3279
+ address_book_ext_id?: string | null;
3332
3280
  created_at: string;
3333
- shared_workspace_ext_id?: string | null | undefined;
3334
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3335
- outcome_detail?: string | null | undefined;
3281
+ shared_workspace_ext_id?: string | null;
3282
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3283
+ outcome_detail?: string | null;
3336
3284
  }[]>>;
3337
3285
  } | {
3338
3286
  pending: {
3339
- external_id?: string | null | undefined;
3340
- email: string;
3341
- user?: {
3342
- external_id: string;
3343
- parent_ext_id?: string | null | undefined;
3344
- email: string;
3345
- given_name: string;
3346
- family_name?: string | null | undefined;
3347
- picture?: string | null | undefined;
3348
- encryption_public_key: string;
3349
- is_sso: boolean;
3350
- is_identity_verified: boolean;
3351
- } | null | undefined;
3352
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3287
+ external_id?: string | null;
3288
+ email?: string | null;
3289
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3290
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3291
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3292
+ address_book_ext_id?: string | null;
3353
3293
  created_at: string;
3354
- shared_workspace_ext_id?: string | null | undefined;
3355
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3356
- outcome_detail?: string | null | undefined;
3294
+ shared_workspace_ext_id?: string | null;
3295
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3296
+ outcome_detail?: string | null;
3357
3297
  }[];
3358
3298
  data: undefined;
3359
3299
  error: null;
@@ -3379,86 +3319,54 @@ declare function usePendingContacts(options?: {
3379
3319
  isStale: boolean;
3380
3320
  isEnabled: boolean;
3381
3321
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
3382
- external_id?: string | null | undefined;
3383
- email: string;
3384
- user?: {
3385
- external_id: string;
3386
- parent_ext_id?: string | null | undefined;
3387
- email: string;
3388
- given_name: string;
3389
- family_name?: string | null | undefined;
3390
- picture?: string | null | undefined;
3391
- encryption_public_key: string;
3392
- is_sso: boolean;
3393
- is_identity_verified: boolean;
3394
- } | null | undefined;
3395
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3322
+ external_id?: string | null;
3323
+ email?: string | null;
3324
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3325
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3326
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3327
+ address_book_ext_id?: string | null;
3396
3328
  created_at: string;
3397
- shared_workspace_ext_id?: string | null | undefined;
3398
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3399
- outcome_detail?: string | null | undefined;
3329
+ shared_workspace_ext_id?: string | null;
3330
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3331
+ outcome_detail?: string | null;
3400
3332
  }[]>, Error>>;
3401
3333
  fetchStatus: _tanstack_query_core.FetchStatus;
3402
3334
  promise: Promise<NoInfer<{
3403
- external_id?: string | null | undefined;
3404
- email: string;
3405
- user?: {
3406
- external_id: string;
3407
- parent_ext_id?: string | null | undefined;
3408
- email: string;
3409
- given_name: string;
3410
- family_name?: string | null | undefined;
3411
- picture?: string | null | undefined;
3412
- encryption_public_key: string;
3413
- is_sso: boolean;
3414
- is_identity_verified: boolean;
3415
- } | null | undefined;
3416
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3335
+ external_id?: string | null;
3336
+ email?: string | null;
3337
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3338
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3339
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3340
+ address_book_ext_id?: string | null;
3417
3341
  created_at: string;
3418
- shared_workspace_ext_id?: string | null | undefined;
3419
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3420
- outcome_detail?: string | null | undefined;
3342
+ shared_workspace_ext_id?: string | null;
3343
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3344
+ outcome_detail?: string | null;
3421
3345
  }[]>>;
3422
3346
  } | {
3423
3347
  pending: {
3424
- external_id?: string | null | undefined;
3425
- email: string;
3426
- user?: {
3427
- external_id: string;
3428
- parent_ext_id?: string | null | undefined;
3429
- email: string;
3430
- given_name: string;
3431
- family_name?: string | null | undefined;
3432
- picture?: string | null | undefined;
3433
- encryption_public_key: string;
3434
- is_sso: boolean;
3435
- is_identity_verified: boolean;
3436
- } | null | undefined;
3437
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3348
+ external_id?: string | null;
3349
+ email?: string | null;
3350
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3351
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3352
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3353
+ address_book_ext_id?: string | null;
3438
3354
  created_at: string;
3439
- shared_workspace_ext_id?: string | null | undefined;
3440
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3441
- outcome_detail?: string | null | undefined;
3355
+ shared_workspace_ext_id?: string | null;
3356
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3357
+ outcome_detail?: string | null;
3442
3358
  }[];
3443
3359
  data: NoInfer<{
3444
- external_id?: string | null | undefined;
3445
- email: string;
3446
- user?: {
3447
- external_id: string;
3448
- parent_ext_id?: string | null | undefined;
3449
- email: string;
3450
- given_name: string;
3451
- family_name?: string | null | undefined;
3452
- picture?: string | null | undefined;
3453
- encryption_public_key: string;
3454
- is_sso: boolean;
3455
- is_identity_verified: boolean;
3456
- } | null | undefined;
3457
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3360
+ external_id?: string | null;
3361
+ email?: string | null;
3362
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3363
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3364
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3365
+ address_book_ext_id?: string | null;
3458
3366
  created_at: string;
3459
- shared_workspace_ext_id?: string | null | undefined;
3460
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3461
- outcome_detail?: string | null | undefined;
3367
+ shared_workspace_ext_id?: string | null;
3368
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3369
+ outcome_detail?: string | null;
3462
3370
  }[]>;
3463
3371
  isError: false;
3464
3372
  error: null;
@@ -3483,73 +3391,82 @@ declare function usePendingContacts(options?: {
3483
3391
  isStale: boolean;
3484
3392
  isEnabled: boolean;
3485
3393
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<NoInfer<{
3486
- external_id?: string | null | undefined;
3487
- email: string;
3488
- user?: {
3489
- external_id: string;
3490
- parent_ext_id?: string | null | undefined;
3491
- email: string;
3492
- given_name: string;
3493
- family_name?: string | null | undefined;
3494
- picture?: string | null | undefined;
3495
- encryption_public_key: string;
3496
- is_sso: boolean;
3497
- is_identity_verified: boolean;
3498
- } | null | undefined;
3499
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3394
+ external_id?: string | null;
3395
+ email?: string | null;
3396
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3397
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3398
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3399
+ address_book_ext_id?: string | null;
3500
3400
  created_at: string;
3501
- shared_workspace_ext_id?: string | null | undefined;
3502
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3503
- outcome_detail?: string | null | undefined;
3401
+ shared_workspace_ext_id?: string | null;
3402
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3403
+ outcome_detail?: string | null;
3504
3404
  }[]>, Error>>;
3505
3405
  fetchStatus: _tanstack_query_core.FetchStatus;
3506
3406
  promise: Promise<NoInfer<{
3507
- external_id?: string | null | undefined;
3508
- email: string;
3509
- user?: {
3510
- external_id: string;
3511
- parent_ext_id?: string | null | undefined;
3512
- email: string;
3513
- given_name: string;
3514
- family_name?: string | null | undefined;
3515
- picture?: string | null | undefined;
3516
- encryption_public_key: string;
3517
- is_sso: boolean;
3518
- is_identity_verified: boolean;
3519
- } | null | undefined;
3520
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3407
+ external_id?: string | null;
3408
+ email?: string | null;
3409
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3410
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3411
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3412
+ address_book_ext_id?: string | null;
3521
3413
  created_at: string;
3522
- shared_workspace_ext_id?: string | null | undefined;
3523
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3524
- outcome_detail?: string | null | undefined;
3414
+ shared_workspace_ext_id?: string | null;
3415
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3416
+ outcome_detail?: string | null;
3525
3417
  }[]>>;
3526
3418
  };
3527
3419
  /**
3528
- * Add contacts by email. An address not yet on ARBI is invited. Resolves with one row per
3529
- * address (`outcome`, `status`); map it with `toAddContactsRows` from `@arbidocs/blocks/collaboration`.
3420
+ * Invite (or link) people by email. An address not yet on ARBI gets an invitation. Resolves with one
3421
+ * row per address (`outcome`, `status`); map it with `toAddContactsRows` from `@arbidocs/blocks/collaboration`.
3530
3422
  */
3531
- declare function useAddContacts(): _tanstack_react_query.UseMutationResult<{
3532
- external_id?: string | null | undefined;
3533
- email: string;
3534
- user?: {
3535
- external_id: string;
3536
- parent_ext_id?: string | null | undefined;
3537
- email: string;
3538
- given_name: string;
3539
- family_name?: string | null | undefined;
3540
- picture?: string | null | undefined;
3541
- encryption_public_key: string;
3542
- is_sso: boolean;
3543
- is_identity_verified: boolean;
3544
- } | null | undefined;
3545
- status: "invitation_pending" | "invitation_expired" | "registered" | "failed";
3423
+ declare function useInviteContacts(): _tanstack_react_query.UseMutationResult<{
3424
+ external_id?: string | null;
3425
+ email?: string | null;
3426
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3427
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3428
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3429
+ address_book_ext_id?: string | null;
3546
3430
  created_at: string;
3547
- shared_workspace_ext_id?: string | null | undefined;
3548
- outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null | undefined;
3549
- outcome_detail?: string | null | undefined;
3431
+ shared_workspace_ext_id?: string | null;
3432
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3433
+ outcome_detail?: string | null;
3550
3434
  }[], Error, string[], unknown>;
3551
- /** Remove contacts, or withdraw invitations, by contact id. */
3552
- declare function useRemoveContacts(): _tanstack_react_query.UseMutationResult<void, Error, string[], unknown>;
3435
+ /** Create a card, optionally linking `email` and inviting it (`invite: true`). */
3436
+ declare function useCreateContact(): _tanstack_react_query.UseMutationResult<{
3437
+ external_id?: string | null;
3438
+ email?: string | null;
3439
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3440
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3441
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3442
+ address_book_ext_id?: string | null;
3443
+ created_at: string;
3444
+ shared_workspace_ext_id?: string | null;
3445
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3446
+ outcome_detail?: string | null;
3447
+ }, Error, {
3448
+ email?: string | null;
3449
+ card?: _arbidocs_client.components["schemas"]["ContactCardWrite"] | null;
3450
+ invite: boolean;
3451
+ }, unknown>;
3452
+ /** Replace a contact's card details. */
3453
+ declare function useUpdateContact(): _tanstack_react_query.UseMutationResult<{
3454
+ external_id?: string | null;
3455
+ email?: string | null;
3456
+ user?: _arbidocs_client.components["schemas"]["UserResponse"] | null;
3457
+ status: ("registered" | "invited" | "expired" | "card") | "failed";
3458
+ card?: _arbidocs_client.components["schemas"]["ContactCard"] | null;
3459
+ address_book_ext_id?: string | null;
3460
+ created_at: string;
3461
+ shared_workspace_ext_id?: string | null;
3462
+ outcome?: ("invited" | "reinvited" | "not_resent_still_pending" | "contact_added" | "already_contact" | "failed") | null;
3463
+ outcome_detail?: string | null;
3464
+ }, Error, {
3465
+ id: string;
3466
+ card: contacts.ContactCardWrite;
3467
+ }, unknown>;
3468
+ /** Delete a contact, or withdraw its invitation, by contact id. */
3469
+ declare function useDeleteContact(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
3553
3470
 
3554
3471
  interface ProfileView {
3555
3472
  givenName: string;
@@ -5140,9 +5057,7 @@ declare function useWorkNotifications(options: {
5140
5057
  is_identity_verified: boolean;
5141
5058
  };
5142
5059
  workspace_ext_id?: string | null | undefined;
5143
- dm_context_only: boolean;
5144
5060
  content?: string | null | undefined;
5145
- attachments?: string | null | undefined;
5146
5061
  conversation_ext_id?: string | null | undefined;
5147
5062
  message_ext_id?: string | null | undefined;
5148
5063
  read: boolean;
@@ -5197,9 +5112,7 @@ declare function useWorkNotifications(options: {
5197
5112
  is_identity_verified: boolean;
5198
5113
  };
5199
5114
  workspace_ext_id?: string | null | undefined;
5200
- dm_context_only: boolean;
5201
5115
  content?: string | null | undefined;
5202
- attachments?: string | null | undefined;
5203
5116
  conversation_ext_id?: string | null | undefined;
5204
5117
  message_ext_id?: string | null | undefined;
5205
5118
  read: boolean;
@@ -5233,9 +5146,7 @@ declare function useWorkNotifications(options: {
5233
5146
  is_identity_verified: boolean;
5234
5147
  };
5235
5148
  workspace_ext_id?: string | null | undefined;
5236
- dm_context_only: boolean;
5237
5149
  content?: string | null | undefined;
5238
- attachments?: string | null | undefined;
5239
5150
  conversation_ext_id?: string | null | undefined;
5240
5151
  message_ext_id?: string | null | undefined;
5241
5152
  read: boolean;
@@ -5270,9 +5181,7 @@ declare function useWorkNotifications(options: {
5270
5181
  is_identity_verified: boolean;
5271
5182
  };
5272
5183
  workspace_ext_id?: string | null | undefined;
5273
- dm_context_only: boolean;
5274
5184
  content?: string | null | undefined;
5275
- attachments?: string | null | undefined;
5276
5185
  conversation_ext_id?: string | null | undefined;
5277
5186
  message_ext_id?: string | null | undefined;
5278
5187
  read: boolean;
@@ -5327,9 +5236,7 @@ declare function useWorkNotifications(options: {
5327
5236
  is_identity_verified: boolean;
5328
5237
  };
5329
5238
  workspace_ext_id?: string | null | undefined;
5330
- dm_context_only: boolean;
5331
5239
  content?: string | null | undefined;
5332
- attachments?: string | null | undefined;
5333
5240
  conversation_ext_id?: string | null | undefined;
5334
5241
  message_ext_id?: string | null | undefined;
5335
5242
  read: boolean;
@@ -5363,9 +5270,7 @@ declare function useWorkNotifications(options: {
5363
5270
  is_identity_verified: boolean;
5364
5271
  };
5365
5272
  workspace_ext_id?: string | null | undefined;
5366
- dm_context_only: boolean;
5367
5273
  content?: string | null | undefined;
5368
- attachments?: string | null | undefined;
5369
5274
  conversation_ext_id?: string | null | undefined;
5370
5275
  message_ext_id?: string | null | undefined;
5371
5276
  read: boolean;
@@ -5423,9 +5328,7 @@ declare function useWorkNotifications(options: {
5423
5328
  is_identity_verified: boolean;
5424
5329
  };
5425
5330
  workspace_ext_id?: string | null | undefined;
5426
- dm_context_only: boolean;
5427
5331
  content?: string | null | undefined;
5428
- attachments?: string | null | undefined;
5429
5332
  conversation_ext_id?: string | null | undefined;
5430
5333
  message_ext_id?: string | null | undefined;
5431
5334
  read: boolean;
@@ -5459,9 +5362,7 @@ declare function useWorkNotifications(options: {
5459
5362
  is_identity_verified: boolean;
5460
5363
  };
5461
5364
  workspace_ext_id?: string | null | undefined;
5462
- dm_context_only: boolean;
5463
5365
  content?: string | null | undefined;
5464
- attachments?: string | null | undefined;
5465
5366
  conversation_ext_id?: string | null | undefined;
5466
5367
  message_ext_id?: string | null | undefined;
5467
5368
  read: boolean;
@@ -5519,9 +5420,7 @@ declare function useWorkNotifications(options: {
5519
5420
  is_identity_verified: boolean;
5520
5421
  };
5521
5422
  workspace_ext_id?: string | null | undefined;
5522
- dm_context_only: boolean;
5523
5423
  content?: string | null | undefined;
5524
- attachments?: string | null | undefined;
5525
5424
  conversation_ext_id?: string | null | undefined;
5526
5425
  message_ext_id?: string | null | undefined;
5527
5426
  read: boolean;
@@ -5555,9 +5454,7 @@ declare function useWorkNotifications(options: {
5555
5454
  is_identity_verified: boolean;
5556
5455
  };
5557
5456
  workspace_ext_id?: string | null | undefined;
5558
- dm_context_only: boolean;
5559
5457
  content?: string | null | undefined;
5560
- attachments?: string | null | undefined;
5561
5458
  conversation_ext_id?: string | null | undefined;
5562
5459
  message_ext_id?: string | null | undefined;
5563
5460
  read: boolean;
@@ -5615,9 +5512,7 @@ declare function useWorkNotifications(options: {
5615
5512
  is_identity_verified: boolean;
5616
5513
  };
5617
5514
  workspace_ext_id?: string | null | undefined;
5618
- dm_context_only: boolean;
5619
5515
  content?: string | null | undefined;
5620
- attachments?: string | null | undefined;
5621
5516
  conversation_ext_id?: string | null | undefined;
5622
5517
  message_ext_id?: string | null | undefined;
5623
5518
  read: boolean;
@@ -5651,9 +5546,7 @@ declare function useWorkNotifications(options: {
5651
5546
  is_identity_verified: boolean;
5652
5547
  };
5653
5548
  workspace_ext_id?: string | null | undefined;
5654
- dm_context_only: boolean;
5655
5549
  content?: string | null | undefined;
5656
- attachments?: string | null | undefined;
5657
5550
  conversation_ext_id?: string | null | undefined;
5658
5551
  message_ext_id?: string | null | undefined;
5659
5552
  read: boolean;
@@ -5688,9 +5581,7 @@ declare function useWorkNotifications(options: {
5688
5581
  is_identity_verified: boolean;
5689
5582
  };
5690
5583
  workspace_ext_id?: string | null | undefined;
5691
- dm_context_only: boolean;
5692
5584
  content?: string | null | undefined;
5693
- attachments?: string | null | undefined;
5694
5585
  conversation_ext_id?: string | null | undefined;
5695
5586
  message_ext_id?: string | null | undefined;
5696
5587
  read: boolean;
@@ -5745,9 +5636,7 @@ declare function useWorkNotifications(options: {
5745
5636
  is_identity_verified: boolean;
5746
5637
  };
5747
5638
  workspace_ext_id?: string | null | undefined;
5748
- dm_context_only: boolean;
5749
5639
  content?: string | null | undefined;
5750
- attachments?: string | null | undefined;
5751
5640
  conversation_ext_id?: string | null | undefined;
5752
5641
  message_ext_id?: string | null | undefined;
5753
5642
  read: boolean;
@@ -5781,9 +5670,7 @@ declare function useWorkNotifications(options: {
5781
5670
  is_identity_verified: boolean;
5782
5671
  };
5783
5672
  workspace_ext_id?: string | null | undefined;
5784
- dm_context_only: boolean;
5785
5673
  content?: string | null | undefined;
5786
- attachments?: string | null | undefined;
5787
5674
  conversation_ext_id?: string | null | undefined;
5788
5675
  message_ext_id?: string | null | undefined;
5789
5676
  read: boolean;
@@ -5795,13 +5682,12 @@ declare function useWorkNotifications(options: {
5795
5682
  /**
5796
5683
  * Direct-message view types.
5797
5684
  *
5798
- * These are the app-facing shapes derived from the raw, already-decrypted
5799
- * `NotificationResponse` rows the SDK returns. The kit groups a flat DM list
5800
- * into per-peer conversations so the UI never touches notifications directly.
5685
+ * These are the app-facing shapes derived from the SDK's decrypted chats
5686
+ * (`/v1/chats`). The kit maps each chat into a conversation so the UI never
5687
+ * touches chat keys or ciphertext directly.
5801
5688
  */
5802
5689
 
5803
5690
  type DmUser = components['schemas']['UserResponse'];
5804
- type DmNotification = components['schemas']['NotificationResponse'];
5805
5691
  /** One decrypted message within a 1:1 thread. */
5806
5692
  interface DmMessage {
5807
5693
  externalId: string;
@@ -5810,10 +5696,13 @@ interface DmMessage {
5810
5696
  createdAt: string;
5811
5697
  /** True when the current user sent this message. */
5812
5698
  isMine: boolean;
5813
- /** Whether the recipient has read it (read receipt). */
5699
+ /** Mine: whether the peer has read it (read receipt). Theirs: whether I have. */
5814
5700
  read: boolean;
5815
5701
  sender: DmUser;
5816
- recipient: DmUser;
5702
+ /** The other party of a 1:1 message, when there is exactly one. */
5703
+ recipient?: DmUser;
5704
+ /** The chat this message belongs to (`cht-`). */
5705
+ chatExtId?: string;
5817
5706
  }
5818
5707
  /**
5819
5708
  * Per-slot class overrides. The kit ships a complete semantic-token look; a
@@ -5830,9 +5719,20 @@ interface DmClassNames {
5830
5719
  /** The composer's send button. */
5831
5720
  sendButton?: string;
5832
5721
  }
5833
- /** A 1:1 conversation with a single peer, newest activity last. */
5722
+ /** A conversation (a 1:1 chat with a peer, or a group), newest activity last. */
5834
5723
  interface DmConversation {
5835
- /** The other party in the thread. */
5724
+ /**
5725
+ * Row identity and what `onSelect` receives. Defaults to `peer.external_id`;
5726
+ * a group row sets its chat id here.
5727
+ */
5728
+ id?: string;
5729
+ /** Shown instead of the peer's name — e.g. a group title. */
5730
+ title?: string;
5731
+ /** Member count, for a group row. */
5732
+ memberCount?: number;
5733
+ /** The chat behind this row (`cht-`), once one exists. */
5734
+ chatExtId?: string;
5735
+ /** The other party in the thread (for a group, the member whose avatar stands for it). */
5836
5736
  peer: DmUser;
5837
5737
  /** Messages in ascending time order. May be empty for a contact not yet messaged. */
5838
5738
  messages: DmMessage[];
@@ -5929,8 +5829,10 @@ declare function DirectMessages({ className, classNames, emptyThread, emptyList,
5929
5829
 
5930
5830
  interface ConversationListProps {
5931
5831
  conversations: DmConversation[];
5832
+ /** The selected row's id (`id ?? peer.external_id`). */
5932
5833
  selectedPeerId: string | null;
5933
- onSelect: (peerId: string) => void;
5834
+ /** Receives the row's id (`id ?? peer.external_id`). */
5835
+ onSelect: (id: string) => void;
5934
5836
  classNames?: Pick<DmClassNames, 'unreadBadge'>;
5935
5837
  /** Rendered when there are no conversations. */
5936
5838
  emptyState?: React.ReactNode;
@@ -6023,10 +5925,10 @@ declare function DmAvatar({ user, className, size }: DmAvatarProps): React$1.JSX
6023
5925
  /**
6024
5926
  * useDirectMessages — the data layer for the DM block kit.
6025
5927
  *
6026
- * Sits entirely on top of the SDK's encrypted-by-default `arbi.dm` surface:
6027
- * it never touches `/v1/notifications` or crypto directly. It lists decrypted
6028
- * DMs, groups them into per-peer conversations, refreshes live over the shared
6029
- * WebSocket, and exposes send / mark-read mutations.
5928
+ * Sits entirely on top of the SDK's encrypted-by-default `arbi.chats` / `arbi.dm`
5929
+ * surfaces: it never touches `/v1/chats` or crypto directly. It lists my direct
5930
+ * chats with their decrypted threads, maps them to per-peer conversations,
5931
+ * refreshes live over the shared WebSocket, and exposes send / mark-read mutations.
6030
5932
  *
6031
5933
  * Requires an <ArbiWebSocketProvider> above it for live updates (standard in
6032
5934
  * the ARBI provider stack).
@@ -6041,15 +5943,18 @@ interface UseDirectMessagesResult {
6041
5943
  isError: boolean;
6042
5944
  error: unknown;
6043
5945
  refetch: () => void;
6044
- /** Send a message to a known peer (extId + public key from a conversation). */
6045
- sendMessage: (recipientExtId: string, recipientPublicKey: string, text: string) => Promise<unknown>;
6046
- /** Send by email / external_id, resolving the recipient's key internally. */
6047
- sendMessageTo: (recipient: string, text: string) => Promise<unknown>;
5946
+ /**
5947
+ * Send a message to a known peer. The public key is no longer needed (the SDK
5948
+ * opens the direct chat and derives the pair key) but the signature is kept.
5949
+ */
5950
+ sendMessage: (recipientExtId: string, recipientPublicKey: string | null | undefined, text: string) => Promise<DecryptedChatMessage>;
5951
+ /** Send by email / external_id, resolving the recipient internally. */
5952
+ sendMessageTo: (recipient: string, text: string) => Promise<DecryptedChatMessage>;
6048
5953
  isSending: boolean;
6049
5954
  /** The last send failure, or null. A failed send must never pass silently. */
6050
5955
  sendError: Error | null;
6051
- /** Mark the given message ids as read. */
6052
- markRead: (messageIds: string[]) => Promise<unknown>;
5956
+ /** Move my read watermark in a chat (to a message, or to now). */
5957
+ markRead: (chatExtId: string, messageExtId?: string) => Promise<unknown>;
6053
5958
  }
6054
5959
  declare function useDirectMessages(options?: {
6055
5960
  enabled?: boolean;
@@ -6397,6 +6302,78 @@ interface DocumentReviewProps {
6397
6302
  }
6398
6303
  declare function DocumentReview({ docId, doc, workspaceId, stage, activeChunkId, onClose, className, }: DocumentReviewProps): React__default.JSX.Element;
6399
6304
 
6305
+ /**
6306
+ * audio-segmenter — the voice-activity state machine behind `useAudioRecorder`'s
6307
+ * segmenting mode. Pure: fed one (level, time) sample per meter tick, it says
6308
+ * when a speech segment starts and when it ends, and whether the segment held
6309
+ * enough voice to be worth keeping. The hook owns the MediaRecorders; this
6310
+ * owns only the decisions, so it is unit-testable with synthetic levels.
6311
+ *
6312
+ * A segment starts on the first sample at or above `voiceThreshold`, ends after
6313
+ * `silenceMs` without voice or at `maxMs` (a cut while still speaking starts the
6314
+ * next segment on the same sample), and is dropped when it held less than
6315
+ * `minVoiceMs` of voice — a cough, a click, a door.
6316
+ */
6317
+ interface SegmenterConfig {
6318
+ /** Meter level (0-1, as `useAudioRecorder` reports it) that counts as voice. */
6319
+ voiceThreshold: number;
6320
+ /** Silence that ends a segment. */
6321
+ silenceMs: number;
6322
+ /** Longest segment; a longer utterance is cut into several. */
6323
+ maxMs: number;
6324
+ /** Segments with less voice than this are dropped. */
6325
+ minVoiceMs: number;
6326
+ /**
6327
+ * Extra silence a segment that is still too short waits for more voice before it ends (0 = none).
6328
+ * A short word and a short phrase a pause apart — "Perfect." … "Thank you both." — then make one
6329
+ * segment instead of two dropped ones.
6330
+ */
6331
+ holdShortMs?: number;
6332
+ }
6333
+ declare const DEFAULT_SEGMENTER_CONFIG: SegmenterConfig;
6334
+ type SegmenterState = {
6335
+ phase: 'idle';
6336
+ } | {
6337
+ phase: 'voice';
6338
+ /** When the segment started (the clock of the samples). */
6339
+ startedAt: number;
6340
+ /** The last sample that carried voice. */
6341
+ lastVoiceAt: number;
6342
+ /** The previous sample, to integrate voice time between samples. */
6343
+ lastSampleAt: number;
6344
+ /** Voice accumulated so far. */
6345
+ voiceMs: number;
6346
+ };
6347
+ type SegmenterEvent = {
6348
+ type: 'start';
6349
+ at: number;
6350
+ } | {
6351
+ type: 'end';
6352
+ at: number;
6353
+ startedAt: number;
6354
+ voiceMs: number;
6355
+ /** False when the segment held too little voice: discard it. */
6356
+ keep: boolean;
6357
+ reason: 'silence' | 'max' | 'flush';
6358
+ };
6359
+ declare const INITIAL_SEGMENTER_STATE: SegmenterState;
6360
+ /**
6361
+ * The meter level (0-1) of an RMS amplitude, as the segmenter's thresholds expect it. Normal
6362
+ * speech RMS is tiny (a laptop mic at conversational distance rarely exceeds ~0.1), so it is
6363
+ * boosted, then a sqrt (perceptual) curve makes quiet-to-moderate speech clearly visible.
6364
+ */
6365
+ declare function levelFromRms(rms: number): number;
6366
+ /** Feed one meter sample. Returns the next state and what happened (0-2 events). */
6367
+ declare function stepSegmenter(state: SegmenterState, level: number, t: number, config?: SegmenterConfig): {
6368
+ state: SegmenterState;
6369
+ events: SegmenterEvent[];
6370
+ };
6371
+ /** Close the open segment, if any (recording stopped). */
6372
+ declare function flushSegmenter(state: SegmenterState, t: number, config?: SegmenterConfig): {
6373
+ state: SegmenterState;
6374
+ events: SegmenterEvent[];
6375
+ };
6376
+
6400
6377
  /**
6401
6378
  * useAudioRecorder
6402
6379
  *
@@ -6406,11 +6383,55 @@ declare function DocumentReview({ docId, doc, workspaceId, stage, activeChunkId,
6406
6383
  * calls start()/stop() on press/release and never pauses; a toggle-style
6407
6384
  * recorder exposes all of start/pause/resume/stop/reset as buttons.
6408
6385
  *
6386
+ * Two optional modes extend it (both used by live call transcription):
6387
+ * - `track`: record from a MediaStreamTrack the host already has (a call's
6388
+ * microphone track) instead of opening the microphone; the track stays the
6389
+ * host's and is never stopped here.
6390
+ * - `onSegment`: segmenting mode. Instead of one recording, the level meter
6391
+ * drives a voice-activity state machine (`audio-segmenter.ts`) and each
6392
+ * speech segment is recorded by its own MediaRecorder, so every emitted
6393
+ * blob is a standalone file. Too-short segments are dropped. `blob` stays
6394
+ * null and pause/resume do nothing in this mode. Stopping, unmounting or
6395
+ * hiding the page emits the open segment (if it held enough voice).
6396
+ * - `chunkMs` (with `onSegment`): chunk mode, used by call recording. No
6397
+ * voice detection: the recorder is restarted every `chunkMs`
6398
+ * (`chunked-recorder.ts`), so every part — silence included — is a
6399
+ * standalone file, emitted in order through `onSegment`. Stopping (or
6400
+ * unmounting) flushes the tail part: a recording never drops audio.
6401
+ *
6409
6402
  * REUSE-FIRST: no app coupling. Failures surface via the returned `error`
6410
6403
  * string rather than an app-specific toast/notification call — the host
6411
6404
  * decides how (or whether) to display it.
6412
6405
  */
6406
+
6413
6407
  type AudioRecorderState = 'idle' | 'recording' | 'paused' | 'stopped';
6408
+ /** One speech segment emitted in segmenting mode. */
6409
+ interface AudioSegment {
6410
+ /** A standalone recording (its own container header), ready to upload. */
6411
+ blob: Blob;
6412
+ mimeType: string;
6413
+ /** Wall-clock start of the segment, ms since epoch. */
6414
+ startedAt: number;
6415
+ durationMs: number;
6416
+ /** How much of it carried voice (chunk mode: the whole part). */
6417
+ voiceMs: number;
6418
+ /** Chunk mode: the part's index in this recording run (0, 1, 2…). */
6419
+ index?: number;
6420
+ }
6421
+ interface UseAudioRecorderOptions {
6422
+ /** Record from this track instead of opening the microphone (it is never stopped here). */
6423
+ track?: MediaStreamTrack | null;
6424
+ /** Segmenting mode: called with each kept speech segment. */
6425
+ onSegment?: (segment: AudioSegment) => void;
6426
+ /** Voice-activity tuning for segmenting mode. */
6427
+ segmenter?: Partial<SegmenterConfig>;
6428
+ /** Chunk mode (with `onSegment`): a standalone part every `chunkMs`, no voice detection. */
6429
+ chunkMs?: number;
6430
+ /** Chunk mode: the MediaRecorder MIME type (default: Opus/WebM, else AAC/MP4). */
6431
+ mimeType?: string;
6432
+ /** Chunk mode: the encoder bitrate. */
6433
+ audioBitsPerSecond?: number;
6434
+ }
6414
6435
  interface UseAudioRecorderResult {
6415
6436
  state: AudioRecorderState;
6416
6437
  /** Live input level, 0-1. 0 while idle/paused/stopped. */
@@ -6434,7 +6455,68 @@ interface UseAudioRecorderResult {
6434
6455
  /** Back to idle: clears blob/elapsedMs/mimeType, ready to record again. */
6435
6456
  reset: () => void;
6436
6457
  }
6437
- declare function useAudioRecorder(): UseAudioRecorderResult;
6458
+ declare function useAudioRecorder(options?: UseAudioRecorderOptions): UseAudioRecorderResult;
6459
+
6460
+ /**
6461
+ * Chunked MediaRecorder engine — records a stream in fixed-length parts for a
6462
+ * long-running recording that is uploaded as it goes (call recording).
6463
+ *
6464
+ * Two ways to cut the parts:
6465
+ * - `restart` (default): every `chunkMs` the recorder is stopped and a new
6466
+ * one started on the same stream, so EVERY part is a standalone file with
6467
+ * its own container header (playable, decodable and transcribable on its
6468
+ * own). The gap between two parts is the few ms between stop and start.
6469
+ * - `timeslice`: one recorder, `requestData()` every `chunkMs` — the parts
6470
+ * are consecutive byte ranges of ONE file (only the first carries the
6471
+ * header), so concatenating them in order gives the whole recording with
6472
+ * no gap. Used where the parts are only ever played back as one file.
6473
+ *
6474
+ * Framework-free (no React) so it can be driven by `useAudioRecorder`'s
6475
+ * chunk mode and directly by a host that records a composed stream.
6476
+ */
6477
+ /** One part of a chunked recording. */
6478
+ interface RecordedChunk {
6479
+ blob: Blob;
6480
+ mimeType: string;
6481
+ /** 0, 1, 2… in recording order (per recorder instance). */
6482
+ index: number;
6483
+ /** Wall-clock start of the part, ms since epoch. */
6484
+ startedAt: number;
6485
+ durationMs: number;
6486
+ /** `restart`: always true. `timeslice`: only the first part starts a file. */
6487
+ standalone: boolean;
6488
+ }
6489
+ interface ChunkedRecorderOptions {
6490
+ stream: MediaStream;
6491
+ /** MediaRecorder MIME type (pick it with {@link pickRecorderMimeType}). */
6492
+ mimeType: string;
6493
+ /** Part length, ms (~30 s for call recording). */
6494
+ chunkMs: number;
6495
+ mode?: 'restart' | 'timeslice';
6496
+ audioBitsPerSecond?: number;
6497
+ videoBitsPerSecond?: number;
6498
+ onChunk(chunk: RecordedChunk): void;
6499
+ /** Called when a MediaRecorder fails; the recorder stops. */
6500
+ onError?(error: unknown): void;
6501
+ /** Wall clock (tests). */
6502
+ now?: () => number;
6503
+ }
6504
+ interface ChunkedRecorder {
6505
+ readonly running: boolean;
6506
+ start(): void;
6507
+ /** Stop and flush the tail part; resolves once it was handed to `onChunk`. */
6508
+ stop(): Promise<void>;
6509
+ }
6510
+ /** Audio MIME types in preference order: Opus/WebM, then AAC/MP4 (Safari). */
6511
+ declare const AUDIO_MIME_PREFERENCE: readonly ["audio/webm;codecs=opus", "audio/ogg;codecs=opus", "audio/mp4;codecs=mp4a.40.2", "audio/mp4"];
6512
+ /** Video MIME types in preference order: AV1, VP9, VP8 (with Opus), then MP4. */
6513
+ declare const VIDEO_MIME_PREFERENCE: readonly ["video/webm;codecs=av01,opus", "video/webm;codecs=av1,opus", "video/webm;codecs=vp9,opus", "video/webm;codecs=vp8,opus", "video/webm", "video/mp4"];
6514
+ /**
6515
+ * The first MIME type `isTypeSupported` accepts, or the last of the list (the
6516
+ * broadest container) when it accepts none.
6517
+ */
6518
+ declare function pickRecorderMimeType(kind: 'audio' | 'video', isTypeSupported?: (type: string) => boolean): string;
6519
+ declare function createChunkedRecorder(options: ChunkedRecorderOptions): ChunkedRecorder;
6438
6520
 
6439
6521
  /**
6440
6522
  * MicWaveformIndicator
@@ -6767,4 +6849,4 @@ interface ArbiUiState {
6767
6849
  }
6768
6850
  declare const useArbiUiStore: zustand.UseBoundStore<zustand.StoreApi<ArbiUiState>>;
6769
6851
 
6770
- 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, 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, GeminiIcon, GitHubIcon, GoogleIcon, type GrantAgentAccessVars, HtmlIcon, 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 RelevancePatch, 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, type WorkspaceNotificationLevel, XlsIcon, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, arbiMailClient, arbiQueryKeys, captureFrameAsBlob, classifyMediaError, createMailClient, cropImage, dayKey, defaultMailAlias, describeActivity, fileAttachment, formatElapsed, formatIdentityPrice, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isAliasTakenError, isUsageMetered, isWorkspaceNotificationType, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, 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, useCanCreateProjects, useClaimNativeAlias, useCloseAgentSession, useCommandPalette, useConfigs, useConfirmEmailChange, useConnectMailAccount, useContacts, useConversationActivity, useConversationPendingAuth, useConversationThreads, useConversationUsage, useConversations, useCreateAgent, useCreateWork, useCreateWorkflow, useCurrentSessionId, useCurrentUser, useDeleteAccount, useDeleteAccountFlow, useDeleteAgents, useDeleteWorkflow, useDeploymentDomain, useDirectMessages, useDisconnectMailAccount, useDocuments, useEmailChange, useFacts, useFilteredProjects, useFollowThread, useGrantAgentAccess, useHealth, useIdentityVerification, useIdentityVerificationFlow, useInvalidateTagData, useLogoutAllSessions, 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, useRemoveContacts, useRequestEmailChange, useRevokeAgentAccess, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveMailDraft, useSemanticSearch, useSendBackStep, useSendMail, useSessions, useSetTagValues, useShellWorkspaces, useSkills, useStartAgentSession, useStartWorkQuery, useTagKindSchema, useTags, useTerminateSession, useThumbnails, useUpdateConversation, useUpdateMailMessage, useUpdateProfile, useUpdateProjectFields, useUpdateTagKindSchema, useUpdateWorkflow, useUploadSkillFiles, useUserSettings, useUserUsageToday, useVideoRecorder, useWorkNotifications, useWorkflows, useWorkspaceActivity, useWorkspaceDocs, useWorkspaceNotificationLevel, useWorkspaceUsers, useWorkspaces, userDisplayName, userInitials, workflowStepOf };
6852
+ 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, ArbiIcon, ArbiProvider, type ArbiProviderProps, type ArbiUiState, 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, 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, arbiMailClient, arbiQueryKeys, captureFrameAsBlob, classifyMediaError, createChunkedRecorder, createMailClient, cropImage, dayKey, defaultMailAlias, describeActivity, fileAttachment, flushSegmenter, formatElapsed, formatIdentityPrice, formatRelativeTime, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, invalidateTagData, isAliasTakenError, isUsageMetered, isWorkspaceNotificationType, levelFromRms, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, pickRecorderMimeType, redlineStats, resolveActiveWorkspace, stepSegmenter, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useActOnStep, useActivity, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAgents, useAiTask, useArbi, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiShellWorkspaces, useArbiUiStore, 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, useLogoutAllSessions, 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, 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 };