@anuma/sdk 6.44.0 → 7.0.0

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.
@@ -9,489 +9,6 @@ import { ReactNode, JSX, ReactElement } from 'react';
9
9
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
10
  import * as RechartsPrimitive from 'recharts';
11
11
 
12
- type AuthToken = string | undefined;
13
- interface Auth {
14
- /**
15
- * Which part of the request do we use to send the auth?
16
- *
17
- * @default 'header'
18
- */
19
- in?: 'header' | 'query' | 'cookie';
20
- /**
21
- * Header or query parameter name.
22
- *
23
- * @default 'Authorization'
24
- */
25
- name?: string;
26
- scheme?: 'basic' | 'bearer';
27
- type: 'apiKey' | 'http';
28
- }
29
-
30
- interface SerializerOptions<T> {
31
- /**
32
- * @default true
33
- */
34
- explode: boolean;
35
- style: T;
36
- }
37
- type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
38
- type ObjectStyle = 'form' | 'deepObject';
39
-
40
- type QuerySerializer = (query: Record<string, unknown>) => string;
41
- type BodySerializer = (body: unknown) => unknown;
42
- type QuerySerializerOptionsObject = {
43
- allowReserved?: boolean;
44
- array?: Partial<SerializerOptions<ArrayStyle>>;
45
- object?: Partial<SerializerOptions<ObjectStyle>>;
46
- };
47
- type QuerySerializerOptions = QuerySerializerOptionsObject & {
48
- /**
49
- * Per-parameter serialization overrides. When provided, these settings
50
- * override the global array/object settings for specific parameter names.
51
- */
52
- parameters?: Record<string, QuerySerializerOptionsObject>;
53
- };
54
-
55
- type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
56
- type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
57
- /**
58
- * Returns the final request URL.
59
- */
60
- buildUrl: BuildUrlFn;
61
- getConfig: () => Config;
62
- request: RequestFn;
63
- setConfig: (config: Config) => Config;
64
- } & {
65
- [K in HttpMethod]: MethodFn;
66
- } & ([SseFn] extends [never] ? {
67
- sse?: never;
68
- } : {
69
- sse: {
70
- [K in HttpMethod]: SseFn;
71
- };
72
- });
73
- interface Config$1 {
74
- /**
75
- * Auth token or a function returning auth token. The resolved value will be
76
- * added to the request payload as defined by its `security` array.
77
- */
78
- auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
79
- /**
80
- * A function for serializing request body parameter. By default,
81
- * {@link JSON.stringify()} will be used.
82
- */
83
- bodySerializer?: BodySerializer | null;
84
- /**
85
- * An object containing any HTTP headers that you want to pre-populate your
86
- * `Headers` object with.
87
- *
88
- * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
89
- */
90
- headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
91
- /**
92
- * The request method.
93
- *
94
- * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
95
- */
96
- method?: Uppercase<HttpMethod>;
97
- /**
98
- * A function for serializing request query parameters. By default, arrays
99
- * will be exploded in form style, objects will be exploded in deepObject
100
- * style, and reserved characters are percent-encoded.
101
- *
102
- * This method will have no effect if the native `paramsSerializer()` Axios
103
- * API function is used.
104
- *
105
- * {@link https://swagger.io/docs/specification/serialization/#query View examples}
106
- */
107
- querySerializer?: QuerySerializer | QuerySerializerOptions;
108
- /**
109
- * A function validating request data. This is useful if you want to ensure
110
- * the request conforms to the desired shape, so it can be safely sent to
111
- * the server.
112
- */
113
- requestValidator?: (data: unknown) => Promise<unknown>;
114
- /**
115
- * A function transforming response data before it's returned. This is useful
116
- * for post-processing data, e.g., converting ISO strings into Date objects.
117
- */
118
- responseTransformer?: (data: unknown) => Promise<unknown>;
119
- /**
120
- * A function validating response data. This is useful if you want to ensure
121
- * the response conforms to the desired shape, so it can be safely passed to
122
- * the transformers and returned to the user.
123
- */
124
- responseValidator?: (data: unknown) => Promise<unknown>;
125
- }
126
-
127
- type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
128
- /**
129
- * Fetch API implementation. You can use this option to provide a custom
130
- * fetch instance.
131
- *
132
- * @default globalThis.fetch
133
- */
134
- fetch?: typeof fetch;
135
- /**
136
- * Implementing clients can call request interceptors inside this hook.
137
- */
138
- onRequest?: (url: string, init: RequestInit) => Promise<Request>;
139
- /**
140
- * Callback invoked when a network or parsing error occurs during streaming.
141
- *
142
- * This option applies only if the endpoint returns a stream of events.
143
- *
144
- * @param error The error that occurred.
145
- */
146
- onSseError?: (error: unknown) => void;
147
- /**
148
- * Callback invoked when an event is streamed from the server.
149
- *
150
- * This option applies only if the endpoint returns a stream of events.
151
- *
152
- * @param event Event streamed from the server.
153
- * @returns Nothing (void).
154
- */
155
- onSseEvent?: (event: StreamEvent<TData>) => void;
156
- serializedBody?: RequestInit['body'];
157
- /**
158
- * Default retry delay in milliseconds.
159
- *
160
- * This option applies only if the endpoint returns a stream of events.
161
- *
162
- * @default 3000
163
- */
164
- sseDefaultRetryDelay?: number;
165
- /**
166
- * Maximum number of retry attempts before giving up.
167
- */
168
- sseMaxRetryAttempts?: number;
169
- /**
170
- * Maximum retry delay in milliseconds.
171
- *
172
- * Applies only when exponential backoff is used.
173
- *
174
- * This option applies only if the endpoint returns a stream of events.
175
- *
176
- * @default 30000
177
- */
178
- sseMaxRetryDelay?: number;
179
- /**
180
- * Optional sleep function for retry backoff.
181
- *
182
- * Defaults to using `setTimeout`.
183
- */
184
- sseSleepFn?: (ms: number) => Promise<void>;
185
- url: string;
186
- };
187
- interface StreamEvent<TData = unknown> {
188
- data: TData;
189
- event?: string;
190
- id?: string;
191
- retry?: number;
192
- }
193
- type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
194
- stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
195
- };
196
-
197
- type ErrInterceptor<Err, Res, Options> = (error: Err,
198
- /** response may be undefined due to a network error where no response object is produced */
199
- response: Res | undefined, options: Options) => Err | Promise<Err>;
200
- type ReqInterceptor<Options> = (options: Options) => void | Promise<void>;
201
- type ResInterceptor<Res, Options> = (response: Res, options: Options) => Res | Promise<Res>;
202
- declare class Interceptors<Interceptor> {
203
- fns: Array<Interceptor | null>;
204
- clear(): void;
205
- eject(id: number | Interceptor): void;
206
- exists(id: number | Interceptor): boolean;
207
- getInterceptorIndex(id: number | Interceptor): number;
208
- update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
209
- use(fn: Interceptor): number;
210
- }
211
- interface Middleware<Res, Err, Options> {
212
- error: Interceptors<ErrInterceptor<Err, Res, Options>>;
213
- request: Interceptors<ReqInterceptor<Options>>;
214
- response: Interceptors<ResInterceptor<Res, Options>>;
215
- }
216
-
217
- interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
218
- /**
219
- * Base URL for all requests made by this client.
220
- */
221
- baseUrl?: T['baseUrl'];
222
- /**
223
- * Fetch API implementation. You can use this option to provide a custom
224
- * fetch instance.
225
- *
226
- * @default globalThis.fetch
227
- */
228
- fetch?: typeof fetch;
229
- /**
230
- * Return the response data parsed in a specified format. By default, `auto`
231
- * will infer the appropriate method from the `Content-Type` response header.
232
- * You can override this behavior with any of the {@link Body} methods.
233
- * Select `stream` if you don't want to parse response data at all.
234
- *
235
- * @default 'auto'
236
- */
237
- parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
238
- /**
239
- * Throw an error instead of returning it in the response?
240
- *
241
- * @default false
242
- */
243
- throwOnError?: T['throwOnError'];
244
- }
245
- interface RequestOptions<TData = unknown, ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
246
- throwOnError: ThrowOnError;
247
- }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
248
- /**
249
- * Any body that you want to add to your request.
250
- *
251
- * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
252
- */
253
- body?: unknown;
254
- path?: Record<string, unknown>;
255
- query?: Record<string, unknown>;
256
- /**
257
- * Security mechanism(s) to use for the request.
258
- */
259
- security?: ReadonlyArray<Auth>;
260
- url: Url;
261
- }
262
- interface ResolvedRequestOptions<ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, ThrowOnError, Url> {
263
- headers: Headers;
264
- serializedBody?: string;
265
- }
266
- type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<{
267
- data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
268
- response: Response;
269
- }> : Promise<({
270
- data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
271
- error: undefined;
272
- } | {
273
- data: undefined;
274
- error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
275
- }) & {
276
- /** response may be undefined due to a network error where no response object is produced */
277
- response?: Response;
278
- }>;
279
- interface ClientOptions {
280
- baseUrl?: string;
281
- throwOnError?: boolean;
282
- }
283
- type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
284
- type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<never, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
285
- type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
286
- type BuildUrlFn = <TData extends {
287
- body?: unknown;
288
- path?: Record<string, unknown>;
289
- query?: Record<string, unknown>;
290
- url: string;
291
- }>(options: TData & Options<TData>) => string;
292
- type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
293
- interceptors: Middleware<Response, unknown, ResolvedRequestOptions>;
294
- };
295
- interface TDataShape {
296
- body?: unknown;
297
- headers?: unknown;
298
- path?: unknown;
299
- query?: unknown;
300
- url: string;
301
- }
302
- type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
303
- type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
304
-
305
- /**
306
- * Clear stored token data
307
- */
308
- declare function clearGithubToken(walletAddress?: string): void;
309
- /**
310
- * Check if current URL is a GitHub OAuth callback
311
- */
312
- declare function isGithubCallback(callbackPath: string): boolean;
313
- /**
314
- * Handle the OAuth callback - exchange code for tokens via backend
315
- */
316
- declare function handleGithubCallback(callbackPath: string, apiClient?: Client, walletAddress?: string): Promise<string | null>;
317
- /**
318
- * Refresh the access token using the stored refresh token.
319
- * Note: GitHub OAuth tokens may not have refresh tokens (non-expiring tokens).
320
- */
321
- declare function refreshGithubToken(apiClient?: Client, walletAddress?: string): Promise<string | null>;
322
- /**
323
- * Revoke the OAuth token
324
- */
325
- declare function revokeGithubToken(apiClient?: Client, walletAddress?: string): Promise<void>;
326
- /**
327
- * Get a valid access token, refreshing if necessary.
328
- * GitHub tokens may not expire — if no expiry is set, the stored token
329
- * is returned directly without attempting a refresh.
330
- */
331
- declare function getGithubAccessToken(apiClient?: Client, walletAddress?: string): Promise<string | null>;
332
- /**
333
- * Store the return URL for after OAuth completes
334
- */
335
- declare function storeGithubReturnUrl(): void;
336
- /**
337
- * Get and clear the stored return URL
338
- */
339
- declare function getAndClearGithubReturnUrl(): string | null;
340
- /**
341
- * Store a pending message to retry after OAuth completes
342
- */
343
- declare function storeGithubPendingMessage(message: string): void;
344
- /**
345
- * Get and clear the pending message
346
- */
347
- declare function getAndClearGithubPendingMessage(): string | null;
348
- /**
349
- * Start the OAuth flow - redirects to GitHub
350
- */
351
- declare function startGithubAuth(clientId: string, callbackPath: string): Promise<never>;
352
- /**
353
- * Get stored token for GitHub (async, supports encrypted storage)
354
- */
355
- declare function getValidGithubToken(walletAddress?: string): Promise<string | null>;
356
- /**
357
- * Store GitHub token data (for external use)
358
- */
359
- declare function storeGithubToken(accessToken: string, expiresIn?: number, refreshToken?: string, scope?: string, walletAddress?: string): Promise<void>;
360
- /**
361
- * Check if we have any stored credentials
362
- */
363
- declare function hasGithubCredentials(walletAddress?: string): Promise<boolean>;
364
- /**
365
- * Migrate unencrypted GitHub tokens to encrypted storage.
366
- * Call this when a wallet address and encryption key become available
367
- * after the initial OAuth flow.
368
- *
369
- * @returns true if migration occurred, false otherwise
370
- */
371
- declare function migrateGithubToken(walletAddress: string): Promise<boolean>;
372
-
373
- /**
374
- * Clear stored token data for all storage locations
375
- */
376
- declare function clearCalendarToken(walletAddress?: string): void;
377
- /**
378
- * Check if current URL is a Calendar OAuth callback
379
- */
380
- declare function isCalendarCallback(callbackPath: string): boolean;
381
- /**
382
- * Handle the OAuth callback - exchange code for tokens via backend
383
- */
384
- declare function handleCalendarCallback(callbackPath: string, apiClient?: Client, walletAddress?: string): Promise<string | null>;
385
- /**
386
- * Refresh the access token using the stored refresh token
387
- */
388
- declare function refreshCalendarToken(apiClient?: Client, walletAddress?: string): Promise<string | null>;
389
- /**
390
- * Revoke the OAuth token
391
- */
392
- declare function revokeCalendarToken(apiClient?: Client, walletAddress?: string): Promise<void>;
393
- /**
394
- * Get a valid access token, refreshing if necessary
395
- */
396
- declare function getCalendarAccessToken(apiClient?: Client, walletAddress?: string): Promise<string | null>;
397
- /**
398
- * Store the return URL for after OAuth completes
399
- */
400
- declare function storeCalendarReturnUrl(): void;
401
- /**
402
- * Get and clear the stored return URL
403
- */
404
- declare function getAndClearCalendarReturnUrl(): string | null;
405
- /**
406
- * Store a pending message to retry after OAuth completes
407
- */
408
- declare function storeCalendarPendingMessage(message: string): void;
409
- /**
410
- * Get and clear the pending message
411
- */
412
- declare function getAndClearCalendarPendingMessage(): string | null;
413
- /**
414
- * Get stored token for Calendar (async, for tool token getters)
415
- */
416
- declare function getValidCalendarToken(walletAddress?: string): Promise<string | null>;
417
- /**
418
- * Store Calendar token data (for external use)
419
- */
420
- declare function storeCalendarToken(accessToken: string, expiresIn?: number, refreshToken?: string, scope?: string, walletAddress?: string): Promise<void>;
421
- /**
422
- * Check if we have any stored credentials
423
- */
424
- declare function hasCalendarCredentials(walletAddress?: string): Promise<boolean>;
425
- /**
426
- * Migrate unencrypted Calendar tokens to encrypted wallet-scoped storage.
427
- * Call this when a wallet address and encryption key become available
428
- * after the initial OAuth flow.
429
- *
430
- * Returns true if migration was performed (or already complete), false otherwise.
431
- */
432
- declare function migrateCalendarToken(walletAddress: string): Promise<boolean>;
433
-
434
- /**
435
- * Clear stored token data
436
- */
437
- declare function clearDriveToken(walletAddress?: string): void;
438
- /**
439
- * Check if current URL is a Drive OAuth callback
440
- */
441
- declare function isDriveCallback(callbackPath: string): boolean;
442
- /**
443
- * Handle the OAuth callback - exchange code for tokens via backend
444
- */
445
- declare function handleDriveCallback(callbackPath: string, apiClient?: Client, walletAddress?: string): Promise<string | null>;
446
- /**
447
- * Refresh the access token using the stored refresh token
448
- */
449
- declare function refreshDriveToken(apiClient?: Client, walletAddress?: string): Promise<string | null>;
450
- /**
451
- * Revoke the OAuth token
452
- */
453
- declare function revokeDriveToken(apiClient?: Client, walletAddress?: string): Promise<void>;
454
- /**
455
- * Get a valid access token, refreshing if necessary
456
- */
457
- declare function getDriveAccessToken(apiClient?: Client, walletAddress?: string): Promise<string | null>;
458
- /**
459
- * Store the return URL for after OAuth completes
460
- */
461
- declare function storeDriveReturnUrl(): void;
462
- /**
463
- * Get and clear the stored return URL
464
- */
465
- declare function getAndClearDriveReturnUrl(): string | null;
466
- /**
467
- * Store a pending message to retry after OAuth completes
468
- */
469
- declare function storeDrivePendingMessage(message: string): void;
470
- /**
471
- * Get and clear the pending message
472
- */
473
- declare function getAndClearDrivePendingMessage(): string | null;
474
- /**
475
- * Get stored token for Drive (async, supports encrypted storage)
476
- */
477
- declare function getValidDriveToken(walletAddress?: string): Promise<string | null>;
478
- /**
479
- * Store Drive token data (for external use)
480
- */
481
- declare function storeDriveToken(accessToken: string, expiresIn?: number, refreshToken?: string, scope?: string, walletAddress?: string): Promise<void>;
482
- /**
483
- * Check if we have any stored credentials
484
- */
485
- declare function hasDriveCredentials(walletAddress?: string): Promise<boolean>;
486
- /**
487
- * Migrate unencrypted Drive tokens to encrypted storage.
488
- * Call this when a wallet address and encryption key become available
489
- * after the initial OAuth flow.
490
- *
491
- * @returns true if migration occurred, false otherwise
492
- */
493
- declare function migrateDriveToken(walletAddress: string): Promise<boolean>;
494
-
495
12
  /**
496
13
  * Clear stored token data from all storage locations
497
14
  */
@@ -576,44 +93,6 @@ declare function getAndClearNotionPendingMessage(): string | null;
576
93
  */
577
94
  declare function getNotionMCPUrl(): string;
578
95
 
579
- /** Default folder path for Dropbox backups */
580
- declare const DEFAULT_BACKUP_FOLDER$1 = "/ai-chat-app/conversations";
581
-
582
- interface DropboxExportResult {
583
- success: boolean;
584
- uploaded: number;
585
- skipped: number;
586
- total: number;
587
- }
588
- interface DropboxImportResult {
589
- success: boolean;
590
- restored: number;
591
- failed: number;
592
- total: number;
593
- /** True if no backups were found in Dropbox */
594
- noBackupsFound?: boolean;
595
- }
596
-
597
- /** Default root folder name for backups */
598
- declare const DEFAULT_ROOT_FOLDER = "ai-chat-app";
599
- /** Default subfolder for conversation backups */
600
- declare const DEFAULT_CONVERSATIONS_FOLDER = "conversations";
601
-
602
- interface GoogleDriveExportResult {
603
- success: boolean;
604
- uploaded: number;
605
- skipped: number;
606
- total: number;
607
- }
608
- interface GoogleDriveImportResult {
609
- success: boolean;
610
- restored: number;
611
- failed: number;
612
- total: number;
613
- /** True if no backups were found in Google Drive */
614
- noBackupsFound?: boolean;
615
- }
616
-
617
96
  /** Default folder path for iCloud backups */
618
97
  declare const DEFAULT_BACKUP_FOLDER = "conversations";
619
98
  /** CloudKit record structure */
@@ -14093,12 +13572,6 @@ interface UseBackupOptions {
14093
13572
  importConversation: (blob: Blob, userAddress: string) => Promise<{
14094
13573
  success: boolean;
14095
13574
  }>;
14096
- /** Dropbox folder path for backups (default: '/ai-chat-app/conversations') */
14097
- dropboxFolder?: string;
14098
- /** Google Drive root folder name (default: 'ai-chat-app') */
14099
- googleRootFolder?: string;
14100
- /** Google Drive conversations subfolder (default: 'conversations') */
14101
- googleConversationsFolder?: string;
14102
13575
  }
14103
13576
  /**
14104
13577
  * Progress callback type
@@ -14119,14 +13592,14 @@ interface ProviderBackupState {
14119
13592
  /** Whether user has authenticated with this provider */
14120
13593
  isAuthenticated: boolean;
14121
13594
  /** Backup all conversations to this provider */
14122
- backup: (options?: BackupOperationOptions) => Promise<DropboxExportResult | GoogleDriveExportResult | ICloudExportResult | {
13595
+ backup: (options?: BackupOperationOptions) => Promise<ICloudExportResult | {
14123
13596
  error: string;
14124
13597
  }>;
14125
13598
  /** Restore conversations from this provider */
14126
- restore: (options?: BackupOperationOptions) => Promise<DropboxImportResult | GoogleDriveImportResult | ICloudImportResult | {
13599
+ restore: (options?: BackupOperationOptions) => Promise<ICloudImportResult | {
14127
13600
  error: string;
14128
13601
  }>;
14129
- /** Request access to this provider (triggers OAuth if needed) */
13602
+ /** Request access to this provider (triggers iCloud sign-in if needed) */
14130
13603
  connect: () => Promise<string>;
14131
13604
  /** Disconnect from this provider */
14132
13605
  disconnect: () => Promise<void>;
@@ -14135,10 +13608,6 @@ interface ProviderBackupState {
14135
13608
  * Result returned by useBackup hook
14136
13609
  */
14137
13610
  interface UseBackupResult {
14138
- /** Dropbox backup state and methods */
14139
- dropbox: ProviderBackupState;
14140
- /** Google Drive backup state and methods */
14141
- googleDrive: ProviderBackupState;
14142
13611
  /** iCloud backup state and methods */
14143
13612
  icloud: ProviderBackupState;
14144
13613
  /** Whether any backup provider is configured */
@@ -14151,9 +13620,9 @@ interface UseBackupResult {
14151
13620
  /**
14152
13621
  * Unified React hook for backup and restore functionality.
14153
13622
  *
14154
- * This hook provides methods to backup conversations to both Dropbox and Google Drive,
14155
- * and restore them. It handles all the logic for checking timestamps, skipping
14156
- * unchanged files, authentication, and managing the backup/restore process.
13623
+ * This hook provides methods to backup conversations to iCloud and restore them.
13624
+ * It handles all the logic for checking timestamps, skipping unchanged files,
13625
+ * authentication, and managing the backup/restore process.
14157
13626
  *
14158
13627
  * Must be used within a BackupAuthProvider.
14159
13628
  *
@@ -14162,7 +13631,7 @@ interface UseBackupResult {
14162
13631
  * import { useBackup } from "@anuma/sdk/react";
14163
13632
  *
14164
13633
  * function BackupManager() {
14165
- * const { dropbox, googleDrive, hasAnyProvider } = useBackup({
13634
+ * const { icloud, hasAnyProvider } = useBackup({
14166
13635
  * database,
14167
13636
  * userAddress,
14168
13637
  * requestEncryptionKey,
@@ -14174,38 +13643,14 @@ interface UseBackupResult {
14174
13643
  * return <p>No backup providers configured</p>;
14175
13644
  * }
14176
13645
  *
14177
- * return (
14178
- * <div>
14179
- * {dropbox.isConfigured && (
14180
- * <div>
14181
- * <h3>Dropbox</h3>
14182
- * {dropbox.isAuthenticated ? (
14183
- * <>
14184
- * <button onClick={() => dropbox.backup()}>Backup</button>
14185
- * <button onClick={() => dropbox.restore()}>Restore</button>
14186
- * <button onClick={dropbox.disconnect}>Disconnect</button>
14187
- * </>
14188
- * ) : (
14189
- * <button onClick={dropbox.connect}>Connect Dropbox</button>
14190
- * )}
14191
- * </div>
14192
- * )}
14193
- *
14194
- * {googleDrive.isConfigured && (
14195
- * <div>
14196
- * <h3>Google Drive</h3>
14197
- * {googleDrive.isAuthenticated ? (
14198
- * <>
14199
- * <button onClick={() => googleDrive.backup()}>Backup</button>
14200
- * <button onClick={() => googleDrive.restore()}>Restore</button>
14201
- * <button onClick={googleDrive.disconnect}>Disconnect</button>
14202
- * </>
14203
- * ) : (
14204
- * <button onClick={googleDrive.connect}>Connect Google Drive</button>
14205
- * )}
14206
- * </div>
14207
- * )}
14208
- * </div>
13646
+ * return icloud.isAuthenticated ? (
13647
+ * <>
13648
+ * <button onClick={() => icloud.backup()}>Backup</button>
13649
+ * <button onClick={() => icloud.restore()}>Restore</button>
13650
+ * <button onClick={icloud.disconnect}>Disconnect</button>
13651
+ * </>
13652
+ * ) : (
13653
+ * <button onClick={icloud.connect}>Connect iCloud</button>
14209
13654
  * );
14210
13655
  * }
14211
13656
  * ```
@@ -14216,35 +13661,15 @@ declare function useBackup(options: UseBackupOptions): UseBackupResult;
14216
13661
 
14217
13662
  /**
14218
13663
  * Props for BackupAuthProvider
14219
- *
14220
- * At least one of `dropboxAppKey`, `googleClientId`, or `icloudApiToken` should be provided
14221
- * for the provider to be useful. All are optional to allow using just one backup provider.
14222
13664
  */
14223
13665
  interface BackupAuthProviderProps {
14224
- /** Dropbox App Key (from Dropbox Developer Console). Optional - omit to disable Dropbox. */
14225
- dropboxAppKey?: string;
14226
- /** Dropbox OAuth callback path (default: "/auth/dropbox/callback") */
14227
- dropboxCallbackPath?: string;
14228
- /** Google OAuth Client ID (from Google Cloud Console). Optional - omit to disable Google Drive. */
14229
- googleClientId?: string;
14230
- /** Google OAuth callback path (default: "/auth/google/callback") */
14231
- googleCallbackPath?: string;
14232
13666
  /** CloudKit API token (from Apple Developer Console). Optional - omit to disable iCloud. */
14233
13667
  icloudApiToken?: string;
14234
13668
  /** CloudKit container identifier (default: "iCloud.Memoryless") */
14235
13669
  icloudContainerIdentifier?: string;
14236
13670
  /** CloudKit environment (default: "production") */
14237
13671
  icloudEnvironment?: "development" | "production";
14238
- /**
14239
- * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
14240
- * Only needed if you have a custom client configuration (e.g., different baseUrl).
14241
- */
14242
- apiClient?: Client;
14243
- /**
14244
- * Wallet address for encrypting OAuth tokens at rest.
14245
- * If provided, tokens will be encrypted before storing in localStorage.
14246
- * If omitted, tokens are stored temporarily in sessionStorage (cleared on page close).
14247
- */
13672
+ /** @deprecated This prop is ignored. */
14248
13673
  walletAddress?: string;
14249
13674
  /** Children to render */
14250
13675
  children: ReactNode;
@@ -14259,21 +13684,17 @@ interface ProviderAuthState {
14259
13684
  isAuthenticated: boolean;
14260
13685
  /** Whether this provider is configured */
14261
13686
  isConfigured: boolean;
14262
- /** Request access - returns token or redirects to OAuth */
13687
+ /** Request access - triggers iCloud sign-in if needed and returns the user record name */
14263
13688
  requestAccess: () => Promise<string>;
14264
- /** Clear stored token and log out */
13689
+ /** Sign out of iCloud */
14265
13690
  logout: () => Promise<void>;
14266
- /** Refresh the access token using the refresh token */
13691
+ /** Re-check the iCloud session and return the user record name */
14267
13692
  refreshToken: () => Promise<string | null>;
14268
13693
  }
14269
13694
  /**
14270
13695
  * Context value for unified backup authentication
14271
13696
  */
14272
13697
  interface BackupAuthContextValue {
14273
- /** Dropbox authentication state and methods */
14274
- dropbox: ProviderAuthState;
14275
- /** Google Drive authentication state and methods */
14276
- googleDrive: ProviderAuthState;
14277
13698
  /** iCloud authentication state and methods */
14278
13699
  icloud: ProviderAuthState;
14279
13700
  /** Check if any provider is configured */
@@ -14284,11 +13705,9 @@ interface BackupAuthContextValue {
14284
13705
  logoutAll: () => Promise<void>;
14285
13706
  }
14286
13707
  /**
14287
- * Unified provider component for backup OAuth authentication.
13708
+ * Provider component for backup authentication.
14288
13709
  *
14289
- * Wrap your app with this provider to enable both Dropbox and Google Drive
14290
- * authentication. It handles the OAuth 2.0 Authorization Code flow with
14291
- * refresh tokens for both providers.
13710
+ * Wrap your app with this provider to enable iCloud backup authentication.
14292
13711
  *
14293
13712
  * @example
14294
13713
  * ```tsx
@@ -14297,13 +13716,8 @@ interface BackupAuthContextValue {
14297
13716
  * function App() {
14298
13717
  * return (
14299
13718
  * <BackupAuthProvider
14300
- * dropboxAppKey={process.env.NEXT_PUBLIC_DROPBOX_APP_KEY}
14301
- * dropboxCallbackPath="/auth/dropbox/callback"
14302
- * googleClientId={process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}
14303
- * googleCallbackPath="/auth/google/callback"
14304
13719
  * icloudApiToken={process.env.NEXT_PUBLIC_CLOUDKIT_API_TOKEN}
14305
13720
  * icloudContainerIdentifier="iCloud.Memoryless"
14306
- * apiClient={apiClient}
14307
13721
  * >
14308
13722
  * <MyApp />
14309
13723
  * </BackupAuthProvider>
@@ -14312,7 +13726,7 @@ interface BackupAuthContextValue {
14312
13726
  * ```
14313
13727
  *
14314
13728
  */
14315
- declare function BackupAuthProvider({ dropboxAppKey, dropboxCallbackPath, googleClientId, googleCallbackPath, icloudApiToken, icloudContainerIdentifier, icloudEnvironment, apiClient, walletAddress, children, }: BackupAuthProviderProps): JSX.Element;
13729
+ declare function BackupAuthProvider({ icloudApiToken, icloudContainerIdentifier, icloudEnvironment, children, }: BackupAuthProviderProps): JSX.Element;
14316
13730
  /**
14317
13731
  * Hook to access unified backup authentication state and methods.
14318
13732
  *
@@ -14323,35 +13737,18 @@ declare function BackupAuthProvider({ dropboxAppKey, dropboxCallbackPath, google
14323
13737
  * import { useBackupAuth } from "@anuma/sdk/react";
14324
13738
  *
14325
13739
  * function BackupSettings() {
14326
- * const { dropbox, googleDrive, logoutAll } = useBackupAuth();
13740
+ * const { icloud, logoutAll } = useBackupAuth();
13741
+ *
13742
+ * if (!icloud.isConfigured) return null;
14327
13743
  *
14328
13744
  * return (
14329
13745
  * <div>
14330
- * <h3>Backup Providers</h3>
14331
- *
14332
- * {dropbox.isConfigured && (
14333
- * <div>
14334
- * <span>Dropbox: {dropbox.isAuthenticated ? 'Connected' : 'Not connected'}</span>
14335
- * {dropbox.isAuthenticated ? (
14336
- * <button onClick={dropbox.logout}>Disconnect</button>
14337
- * ) : (
14338
- * <button onClick={dropbox.requestAccess}>Connect</button>
14339
- * )}
14340
- * </div>
14341
- * )}
14342
- *
14343
- * {googleDrive.isConfigured && (
14344
- * <div>
14345
- * <span>Google Drive: {googleDrive.isAuthenticated ? 'Connected' : 'Not connected'}</span>
14346
- * {googleDrive.isAuthenticated ? (
14347
- * <button onClick={googleDrive.logout}>Disconnect</button>
14348
- * ) : (
14349
- * <button onClick={googleDrive.requestAccess}>Connect</button>
14350
- * )}
14351
- * </div>
13746
+ * <span>iCloud: {icloud.isAuthenticated ? 'Connected' : 'Not connected'}</span>
13747
+ * {icloud.isAuthenticated ? (
13748
+ * <button onClick={logoutAll}>Disconnect</button>
13749
+ * ) : (
13750
+ * <button onClick={icloud.requestAccess}>Connect</button>
14352
13751
  * )}
14353
- *
14354
- * <button onClick={logoutAll}>Disconnect All</button>
14355
13752
  * </div>
14356
13753
  * );
14357
13754
  * }
@@ -15081,194 +14478,6 @@ declare function useCredits(options?: UseCreditsOptions): UseCreditsResult;
15081
14478
  */
15082
14479
  declare function useDatabaseManager(walletAddress: string | undefined, manager: DatabaseManager): Database;
15083
14480
 
15084
- /**
15085
- * Clear Dropbox token data
15086
- */
15087
- declare function clearToken(): void;
15088
- /**
15089
- * Check if we have any stored credentials (including refresh token)
15090
- */
15091
- declare function hasDropboxCredentials(walletAddress?: string): Promise<boolean>;
15092
-
15093
- /**
15094
- * Props for DropboxAuthProvider
15095
- */
15096
- interface DropboxAuthProviderProps {
15097
- /** Dropbox App Key (from Dropbox Developer Console) */
15098
- appKey: string | undefined;
15099
- /** OAuth callback path (default: "/auth/dropbox/callback") */
15100
- callbackPath?: string;
15101
- /**
15102
- * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
15103
- * Only needed if you have a custom client configuration (e.g., different baseUrl).
15104
- */
15105
- apiClient?: Client;
15106
- /**
15107
- * Wallet address for encrypting OAuth tokens at rest.
15108
- * If provided, tokens will be encrypted before storing in localStorage.
15109
- * If omitted, tokens are stored temporarily in sessionStorage (cleared on page close).
15110
- */
15111
- walletAddress?: string;
15112
- /** Children to render */
15113
- children: ReactNode;
15114
- }
15115
- /**
15116
- * Context value for Dropbox authentication
15117
- */
15118
- interface DropboxAuthContextValue {
15119
- /** Current access token (null if not authenticated) */
15120
- accessToken: string | null;
15121
- /** Whether user has authenticated with Dropbox */
15122
- isAuthenticated: boolean;
15123
- /** Whether Dropbox is configured (app key exists) */
15124
- isConfigured: boolean;
15125
- /** Request Dropbox access - returns token or redirects to OAuth */
15126
- requestAccess: () => Promise<string>;
15127
- /** Clear stored token and log out */
15128
- logout: () => Promise<void>;
15129
- /** Refresh the access token using the refresh token */
15130
- refreshToken: () => Promise<string | null>;
15131
- }
15132
- /**
15133
- * Provider component for Dropbox OAuth authentication.
15134
- *
15135
- * Wrap your app with this provider to enable Dropbox authentication.
15136
- * It handles the OAuth 2.0 Authorization Code flow with refresh tokens.
15137
- *
15138
- * @example
15139
- * ```tsx
15140
- * import { DropboxAuthProvider } from "@anuma/sdk/react";
15141
- *
15142
- * function App() {
15143
- * return (
15144
- * <DropboxAuthProvider
15145
- * appKey={process.env.NEXT_PUBLIC_DROPBOX_APP_KEY}
15146
- * callbackPath="/auth/dropbox/callback"
15147
- * >
15148
- * <MyApp />
15149
- * </DropboxAuthProvider>
15150
- * );
15151
- * }
15152
- * ```
15153
- *
15154
- */
15155
- declare function DropboxAuthProvider({ appKey, callbackPath, apiClient, walletAddress, children, }: DropboxAuthProviderProps): JSX.Element;
15156
- /**
15157
- * Hook to access Dropbox authentication state and methods.
15158
- *
15159
- * Must be used within a DropboxAuthProvider.
15160
- *
15161
- * @example
15162
- * ```tsx
15163
- * import { useDropboxAuth } from "@anuma/sdk/react";
15164
- *
15165
- * function DropboxButton() {
15166
- * const { isAuthenticated, isConfigured, requestAccess, logout } = useDropboxAuth();
15167
- *
15168
- * if (!isConfigured) {
15169
- * return <p>Dropbox not configured</p>;
15170
- * }
15171
- *
15172
- * if (isAuthenticated) {
15173
- * return <button onClick={logout}>Disconnect Dropbox</button>;
15174
- * }
15175
- *
15176
- * return <button onClick={requestAccess}>Connect Dropbox</button>;
15177
- * }
15178
- * ```
15179
- *
15180
- * @category Hooks
15181
- */
15182
- declare function useDropboxAuth(): DropboxAuthContextValue;
15183
-
15184
- /**
15185
- * Options for useDropboxBackup hook
15186
- * @inline
15187
- */
15188
- interface UseDropboxBackupOptions {
15189
- /** WatermelonDB database instance */
15190
- database: Database;
15191
- /** Current user address (null if not signed in) */
15192
- userAddress: string | null;
15193
- /** Request encryption key for the user address */
15194
- requestEncryptionKey: (address: string) => Promise<void>;
15195
- /** Export a conversation to an encrypted blob */
15196
- exportConversation: (conversationId: string, userAddress: string) => Promise<{
15197
- success: boolean;
15198
- blob?: Blob;
15199
- }>;
15200
- /** Import a conversation from an encrypted blob */
15201
- importConversation: (blob: Blob, userAddress: string) => Promise<{
15202
- success: boolean;
15203
- }>;
15204
- /** Dropbox folder path for backups (default: '/ai-chat-app/conversations') */
15205
- backupFolder?: string;
15206
- }
15207
- /**
15208
- * Result returned by useDropboxBackup hook
15209
- */
15210
- interface UseDropboxBackupResult {
15211
- /** Backup all conversations to Dropbox */
15212
- backup: (options?: {
15213
- onProgress?: (current: number, total: number) => void;
15214
- }) => Promise<DropboxExportResult | {
15215
- error: string;
15216
- }>;
15217
- /** Restore conversations from Dropbox */
15218
- restore: (options?: {
15219
- onProgress?: (current: number, total: number) => void;
15220
- }) => Promise<DropboxImportResult | {
15221
- error: string;
15222
- }>;
15223
- /** Whether Dropbox is configured */
15224
- isConfigured: boolean;
15225
- /** Whether user has a Dropbox token */
15226
- isAuthenticated: boolean;
15227
- }
15228
- /**
15229
- * React hook for Dropbox backup and restore functionality.
15230
- *
15231
- * This hook provides methods to backup conversations to Dropbox and restore them.
15232
- * It handles all the logic for checking timestamps, skipping unchanged files,
15233
- * authentication, and managing the backup/restore process.
15234
- *
15235
- * Must be used within a DropboxAuthProvider.
15236
- *
15237
- * @example
15238
- * ```tsx
15239
- * import { useDropboxBackup } from "@anuma/sdk/react";
15240
- *
15241
- * function BackupButton() {
15242
- * const { backup, restore, isConfigured } = useDropboxBackup({
15243
- * database,
15244
- * userAddress,
15245
- * requestEncryptionKey,
15246
- * exportConversation,
15247
- * importConversation,
15248
- * });
15249
- *
15250
- * const handleBackup = async () => {
15251
- * const result = await backup({
15252
- * onProgress: (current, total) => {
15253
- * console.log(`Progress: ${current}/${total}`);
15254
- * },
15255
- * });
15256
- *
15257
- * if ("error" in result) {
15258
- * console.error(result.error);
15259
- * } else {
15260
- * console.log(`Uploaded: ${result.uploaded}, Skipped: ${result.skipped}`);
15261
- * }
15262
- * };
15263
- *
15264
- * return <button onClick={handleBackup} disabled={!isConfigured}>Backup</button>;
15265
- * }
15266
- * ```
15267
- *
15268
- * @category Hooks
15269
- */
15270
- declare function useDropboxBackup(options: UseDropboxBackupOptions): UseDropboxBackupResult;
15271
-
15272
14481
  /**
15273
14482
  * Result returned by the useExportPdf hook.
15274
14483
  * @category Hooks
@@ -15439,200 +14648,6 @@ interface UseFilesResult {
15439
14648
  */
15440
14649
  declare function useFiles(options: UseFilesOptions): UseFilesResult;
15441
14650
 
15442
- /**
15443
- * Get stored token data for Google Drive
15444
- */
15445
- declare function getGoogleDriveStoredToken(walletAddress?: string): Promise<string | null>;
15446
- /**
15447
- * Clear Google Drive token data
15448
- */
15449
- declare function clearGoogleDriveToken(): void;
15450
- /**
15451
- * Check if we have any stored credentials (including refresh token)
15452
- */
15453
- declare function hasGoogleDriveCredentials(walletAddress?: string): Promise<boolean>;
15454
-
15455
- /**
15456
- * Props for GoogleDriveAuthProvider
15457
- */
15458
- interface GoogleDriveAuthProviderProps {
15459
- /** Google OAuth Client ID (from Google Cloud Console) */
15460
- clientId: string | undefined;
15461
- /** OAuth callback path (default: "/auth/google/callback") */
15462
- callbackPath?: string;
15463
- /**
15464
- * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
15465
- * Only needed if you have a custom client configuration (e.g., different baseUrl).
15466
- */
15467
- apiClient?: Client;
15468
- /**
15469
- * Wallet address for encrypting OAuth tokens at rest.
15470
- * If provided, tokens will be encrypted before storing in localStorage.
15471
- * If omitted, tokens are stored temporarily in sessionStorage (cleared on page close).
15472
- */
15473
- walletAddress?: string;
15474
- /** Children to render */
15475
- children: ReactNode;
15476
- }
15477
- /**
15478
- * Context value for Google Drive authentication
15479
- */
15480
- interface GoogleDriveAuthContextValue {
15481
- /** Current access token (null if not authenticated) */
15482
- accessToken: string | null;
15483
- /** Whether user has authenticated with Google Drive */
15484
- isAuthenticated: boolean;
15485
- /** Whether Google Drive is configured (client ID exists) */
15486
- isConfigured: boolean;
15487
- /** Request Google Drive access - returns token or redirects to OAuth */
15488
- requestAccess: () => Promise<string>;
15489
- /** Clear stored token and log out */
15490
- logout: () => Promise<void>;
15491
- /** Refresh the access token using the refresh token */
15492
- refreshToken: () => Promise<string | null>;
15493
- }
15494
- /**
15495
- * Provider component for Google Drive OAuth authentication.
15496
- *
15497
- * Wrap your app with this provider to enable Google Drive authentication.
15498
- * It handles the OAuth 2.0 Authorization Code flow with refresh tokens.
15499
- *
15500
- * @example
15501
- * ```tsx
15502
- * import { GoogleDriveAuthProvider } from "@anuma/sdk/react";
15503
- *
15504
- * function App() {
15505
- * return (
15506
- * <GoogleDriveAuthProvider
15507
- * clientId={process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}
15508
- * callbackPath="/auth/google/callback"
15509
- * >
15510
- * <MyApp />
15511
- * </GoogleDriveAuthProvider>
15512
- * );
15513
- * }
15514
- * ```
15515
- *
15516
- */
15517
- declare function GoogleDriveAuthProvider({ clientId, callbackPath, apiClient, walletAddress, children, }: GoogleDriveAuthProviderProps): JSX.Element;
15518
- /**
15519
- * Hook to access Google Drive authentication state and methods.
15520
- *
15521
- * Must be used within a GoogleDriveAuthProvider.
15522
- *
15523
- * @example
15524
- * ```tsx
15525
- * import { useGoogleDriveAuth } from "@anuma/sdk/react";
15526
- *
15527
- * function GoogleDriveButton() {
15528
- * const { isAuthenticated, isConfigured, requestAccess, logout } = useGoogleDriveAuth();
15529
- *
15530
- * if (!isConfigured) {
15531
- * return <p>Google Drive not configured</p>;
15532
- * }
15533
- *
15534
- * if (isAuthenticated) {
15535
- * return <button onClick={logout}>Disconnect Google Drive</button>;
15536
- * }
15537
- *
15538
- * return <button onClick={requestAccess}>Connect Google Drive</button>;
15539
- * }
15540
- * ```
15541
- *
15542
- * @category Hooks
15543
- */
15544
- declare function useGoogleDriveAuth(): GoogleDriveAuthContextValue;
15545
-
15546
- /**
15547
- * Options for useGoogleDriveBackup hook
15548
- * @inline
15549
- */
15550
- interface UseGoogleDriveBackupOptions {
15551
- /** WatermelonDB database instance */
15552
- database: Database;
15553
- /** Current user address (null if not signed in) */
15554
- userAddress: string | null;
15555
- /** Request encryption key for the user address */
15556
- requestEncryptionKey: (address: string) => Promise<void>;
15557
- /** Export a conversation to an encrypted blob */
15558
- exportConversation: (conversationId: string, userAddress: string) => Promise<{
15559
- success: boolean;
15560
- blob?: Blob;
15561
- }>;
15562
- /** Import a conversation from an encrypted blob */
15563
- importConversation: (blob: Blob, userAddress: string) => Promise<{
15564
- success: boolean;
15565
- }>;
15566
- /** Root folder name in Google Drive (default: 'ai-chat-app') */
15567
- rootFolder?: string;
15568
- /** Subfolder for conversations (default: 'conversations') */
15569
- conversationsFolder?: string;
15570
- }
15571
- /**
15572
- * Result returned by useGoogleDriveBackup hook
15573
- */
15574
- interface UseGoogleDriveBackupResult {
15575
- /** Backup all conversations to Google Drive */
15576
- backup: (options?: {
15577
- onProgress?: (current: number, total: number) => void;
15578
- }) => Promise<GoogleDriveExportResult | {
15579
- error: string;
15580
- }>;
15581
- /** Restore conversations from Google Drive */
15582
- restore: (options?: {
15583
- onProgress?: (current: number, total: number) => void;
15584
- }) => Promise<GoogleDriveImportResult | {
15585
- error: string;
15586
- }>;
15587
- /** Whether Google Drive is configured */
15588
- isConfigured: boolean;
15589
- /** Whether user has a Google Drive token */
15590
- isAuthenticated: boolean;
15591
- }
15592
- /**
15593
- * React hook for Google Drive backup and restore functionality.
15594
- *
15595
- * This hook provides methods to backup conversations to Google Drive and restore them.
15596
- * It handles all the logic for checking timestamps, skipping unchanged files,
15597
- * authentication, and managing the backup/restore process.
15598
- *
15599
- * Must be used within a GoogleDriveAuthProvider.
15600
- *
15601
- * @example
15602
- * ```tsx
15603
- * import { useGoogleDriveBackup } from "@anuma/sdk/react";
15604
- *
15605
- * function BackupButton() {
15606
- * const { backup, restore, isConfigured, isAuthenticated } = useGoogleDriveBackup({
15607
- * database,
15608
- * userAddress,
15609
- * requestEncryptionKey,
15610
- * exportConversation,
15611
- * importConversation,
15612
- * });
15613
- *
15614
- * const handleBackup = async () => {
15615
- * const result = await backup({
15616
- * onProgress: (current, total) => {
15617
- * console.log(`Progress: ${current}/${total}`);
15618
- * },
15619
- * });
15620
- *
15621
- * if ("error" in result) {
15622
- * console.error(result.error);
15623
- * } else {
15624
- * console.log(`Uploaded: ${result.uploaded}, Skipped: ${result.skipped}`);
15625
- * }
15626
- * };
15627
- *
15628
- * return <button onClick={handleBackup} disabled={!isConfigured}>Backup</button>;
15629
- * }
15630
- * ```
15631
- *
15632
- * @category Hooks
15633
- */
15634
- declare function useGoogleDriveBackup(options: UseGoogleDriveBackupOptions): UseGoogleDriveBackupResult;
15635
-
15636
14651
  /**
15637
14652
  * Props for ICloudAuthProvider
15638
14653
  */
@@ -16515,4 +15530,4 @@ type UseWalletBindingResult = {
16515
15530
  */
16516
15531
  declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
16517
15532
 
16518
- export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getEntitiesByMemoryIdsOp, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isCalendarCallback, isDegradedTopicSkip, isDriveCallback, isEncrypted, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshCalendarToken, refreshDriveToken, refreshEncryptionKeyIfMatches, refreshGithubToken, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
15533
+ export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };