@anuma/sdk 6.43.1 → 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 */
@@ -12029,8 +11508,10 @@ declare function createRemoteMemoryPipeline(options: RemoteMemoryPipelineOptions
12029
11508
  interface RemoteMemoryStoreOptions {
12030
11509
  persistence: RemoteMemoryPersistence;
12031
11510
  embeddingOptions: EmbeddingOptions;
12032
- graphRanking: RecallFactSource["graphRanking"];
12033
- temporalRanking: RecallFactSource["temporalRanking"];
11511
+ /** Defaults to ranking memories by how many query entities their topics name. */
11512
+ graphRanking?: RecallFactSource["graphRanking"];
11513
+ /** Defaults to no temporal lane: nearby has no event-time filter yet. */
11514
+ temporalRanking?: RecallFactSource["temporalRanking"];
12034
11515
  pollIntervalMs?: number;
12035
11516
  }
12036
11517
  declare class RemoteMemoryPartialCreateError extends Error {
@@ -14091,12 +13572,6 @@ interface UseBackupOptions {
14091
13572
  importConversation: (blob: Blob, userAddress: string) => Promise<{
14092
13573
  success: boolean;
14093
13574
  }>;
14094
- /** Dropbox folder path for backups (default: '/ai-chat-app/conversations') */
14095
- dropboxFolder?: string;
14096
- /** Google Drive root folder name (default: 'ai-chat-app') */
14097
- googleRootFolder?: string;
14098
- /** Google Drive conversations subfolder (default: 'conversations') */
14099
- googleConversationsFolder?: string;
14100
13575
  }
14101
13576
  /**
14102
13577
  * Progress callback type
@@ -14117,14 +13592,14 @@ interface ProviderBackupState {
14117
13592
  /** Whether user has authenticated with this provider */
14118
13593
  isAuthenticated: boolean;
14119
13594
  /** Backup all conversations to this provider */
14120
- backup: (options?: BackupOperationOptions) => Promise<DropboxExportResult | GoogleDriveExportResult | ICloudExportResult | {
13595
+ backup: (options?: BackupOperationOptions) => Promise<ICloudExportResult | {
14121
13596
  error: string;
14122
13597
  }>;
14123
13598
  /** Restore conversations from this provider */
14124
- restore: (options?: BackupOperationOptions) => Promise<DropboxImportResult | GoogleDriveImportResult | ICloudImportResult | {
13599
+ restore: (options?: BackupOperationOptions) => Promise<ICloudImportResult | {
14125
13600
  error: string;
14126
13601
  }>;
14127
- /** Request access to this provider (triggers OAuth if needed) */
13602
+ /** Request access to this provider (triggers iCloud sign-in if needed) */
14128
13603
  connect: () => Promise<string>;
14129
13604
  /** Disconnect from this provider */
14130
13605
  disconnect: () => Promise<void>;
@@ -14133,10 +13608,6 @@ interface ProviderBackupState {
14133
13608
  * Result returned by useBackup hook
14134
13609
  */
14135
13610
  interface UseBackupResult {
14136
- /** Dropbox backup state and methods */
14137
- dropbox: ProviderBackupState;
14138
- /** Google Drive backup state and methods */
14139
- googleDrive: ProviderBackupState;
14140
13611
  /** iCloud backup state and methods */
14141
13612
  icloud: ProviderBackupState;
14142
13613
  /** Whether any backup provider is configured */
@@ -14149,9 +13620,9 @@ interface UseBackupResult {
14149
13620
  /**
14150
13621
  * Unified React hook for backup and restore functionality.
14151
13622
  *
14152
- * This hook provides methods to backup conversations to both Dropbox and Google Drive,
14153
- * and restore them. It handles all the logic for checking timestamps, skipping
14154
- * 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.
14155
13626
  *
14156
13627
  * Must be used within a BackupAuthProvider.
14157
13628
  *
@@ -14160,7 +13631,7 @@ interface UseBackupResult {
14160
13631
  * import { useBackup } from "@anuma/sdk/react";
14161
13632
  *
14162
13633
  * function BackupManager() {
14163
- * const { dropbox, googleDrive, hasAnyProvider } = useBackup({
13634
+ * const { icloud, hasAnyProvider } = useBackup({
14164
13635
  * database,
14165
13636
  * userAddress,
14166
13637
  * requestEncryptionKey,
@@ -14172,38 +13643,14 @@ interface UseBackupResult {
14172
13643
  * return <p>No backup providers configured</p>;
14173
13644
  * }
14174
13645
  *
14175
- * return (
14176
- * <div>
14177
- * {dropbox.isConfigured && (
14178
- * <div>
14179
- * <h3>Dropbox</h3>
14180
- * {dropbox.isAuthenticated ? (
14181
- * <>
14182
- * <button onClick={() => dropbox.backup()}>Backup</button>
14183
- * <button onClick={() => dropbox.restore()}>Restore</button>
14184
- * <button onClick={dropbox.disconnect}>Disconnect</button>
14185
- * </>
14186
- * ) : (
14187
- * <button onClick={dropbox.connect}>Connect Dropbox</button>
14188
- * )}
14189
- * </div>
14190
- * )}
14191
- *
14192
- * {googleDrive.isConfigured && (
14193
- * <div>
14194
- * <h3>Google Drive</h3>
14195
- * {googleDrive.isAuthenticated ? (
14196
- * <>
14197
- * <button onClick={() => googleDrive.backup()}>Backup</button>
14198
- * <button onClick={() => googleDrive.restore()}>Restore</button>
14199
- * <button onClick={googleDrive.disconnect}>Disconnect</button>
14200
- * </>
14201
- * ) : (
14202
- * <button onClick={googleDrive.connect}>Connect Google Drive</button>
14203
- * )}
14204
- * </div>
14205
- * )}
14206
- * </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>
14207
13654
  * );
14208
13655
  * }
14209
13656
  * ```
@@ -14214,35 +13661,15 @@ declare function useBackup(options: UseBackupOptions): UseBackupResult;
14214
13661
 
14215
13662
  /**
14216
13663
  * Props for BackupAuthProvider
14217
- *
14218
- * At least one of `dropboxAppKey`, `googleClientId`, or `icloudApiToken` should be provided
14219
- * for the provider to be useful. All are optional to allow using just one backup provider.
14220
13664
  */
14221
13665
  interface BackupAuthProviderProps {
14222
- /** Dropbox App Key (from Dropbox Developer Console). Optional - omit to disable Dropbox. */
14223
- dropboxAppKey?: string;
14224
- /** Dropbox OAuth callback path (default: "/auth/dropbox/callback") */
14225
- dropboxCallbackPath?: string;
14226
- /** Google OAuth Client ID (from Google Cloud Console). Optional - omit to disable Google Drive. */
14227
- googleClientId?: string;
14228
- /** Google OAuth callback path (default: "/auth/google/callback") */
14229
- googleCallbackPath?: string;
14230
13666
  /** CloudKit API token (from Apple Developer Console). Optional - omit to disable iCloud. */
14231
13667
  icloudApiToken?: string;
14232
13668
  /** CloudKit container identifier (default: "iCloud.Memoryless") */
14233
13669
  icloudContainerIdentifier?: string;
14234
13670
  /** CloudKit environment (default: "production") */
14235
13671
  icloudEnvironment?: "development" | "production";
14236
- /**
14237
- * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
14238
- * Only needed if you have a custom client configuration (e.g., different baseUrl).
14239
- */
14240
- apiClient?: Client;
14241
- /**
14242
- * Wallet address for encrypting OAuth tokens at rest.
14243
- * If provided, tokens will be encrypted before storing in localStorage.
14244
- * If omitted, tokens are stored temporarily in sessionStorage (cleared on page close).
14245
- */
13672
+ /** @deprecated This prop is ignored. */
14246
13673
  walletAddress?: string;
14247
13674
  /** Children to render */
14248
13675
  children: ReactNode;
@@ -14257,21 +13684,17 @@ interface ProviderAuthState {
14257
13684
  isAuthenticated: boolean;
14258
13685
  /** Whether this provider is configured */
14259
13686
  isConfigured: boolean;
14260
- /** Request access - returns token or redirects to OAuth */
13687
+ /** Request access - triggers iCloud sign-in if needed and returns the user record name */
14261
13688
  requestAccess: () => Promise<string>;
14262
- /** Clear stored token and log out */
13689
+ /** Sign out of iCloud */
14263
13690
  logout: () => Promise<void>;
14264
- /** Refresh the access token using the refresh token */
13691
+ /** Re-check the iCloud session and return the user record name */
14265
13692
  refreshToken: () => Promise<string | null>;
14266
13693
  }
14267
13694
  /**
14268
13695
  * Context value for unified backup authentication
14269
13696
  */
14270
13697
  interface BackupAuthContextValue {
14271
- /** Dropbox authentication state and methods */
14272
- dropbox: ProviderAuthState;
14273
- /** Google Drive authentication state and methods */
14274
- googleDrive: ProviderAuthState;
14275
13698
  /** iCloud authentication state and methods */
14276
13699
  icloud: ProviderAuthState;
14277
13700
  /** Check if any provider is configured */
@@ -14282,11 +13705,9 @@ interface BackupAuthContextValue {
14282
13705
  logoutAll: () => Promise<void>;
14283
13706
  }
14284
13707
  /**
14285
- * Unified provider component for backup OAuth authentication.
13708
+ * Provider component for backup authentication.
14286
13709
  *
14287
- * Wrap your app with this provider to enable both Dropbox and Google Drive
14288
- * authentication. It handles the OAuth 2.0 Authorization Code flow with
14289
- * refresh tokens for both providers.
13710
+ * Wrap your app with this provider to enable iCloud backup authentication.
14290
13711
  *
14291
13712
  * @example
14292
13713
  * ```tsx
@@ -14295,13 +13716,8 @@ interface BackupAuthContextValue {
14295
13716
  * function App() {
14296
13717
  * return (
14297
13718
  * <BackupAuthProvider
14298
- * dropboxAppKey={process.env.NEXT_PUBLIC_DROPBOX_APP_KEY}
14299
- * dropboxCallbackPath="/auth/dropbox/callback"
14300
- * googleClientId={process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}
14301
- * googleCallbackPath="/auth/google/callback"
14302
13719
  * icloudApiToken={process.env.NEXT_PUBLIC_CLOUDKIT_API_TOKEN}
14303
13720
  * icloudContainerIdentifier="iCloud.Memoryless"
14304
- * apiClient={apiClient}
14305
13721
  * >
14306
13722
  * <MyApp />
14307
13723
  * </BackupAuthProvider>
@@ -14310,7 +13726,7 @@ interface BackupAuthContextValue {
14310
13726
  * ```
14311
13727
  *
14312
13728
  */
14313
- 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;
14314
13730
  /**
14315
13731
  * Hook to access unified backup authentication state and methods.
14316
13732
  *
@@ -14321,35 +13737,18 @@ declare function BackupAuthProvider({ dropboxAppKey, dropboxCallbackPath, google
14321
13737
  * import { useBackupAuth } from "@anuma/sdk/react";
14322
13738
  *
14323
13739
  * function BackupSettings() {
14324
- * const { dropbox, googleDrive, logoutAll } = useBackupAuth();
13740
+ * const { icloud, logoutAll } = useBackupAuth();
13741
+ *
13742
+ * if (!icloud.isConfigured) return null;
14325
13743
  *
14326
13744
  * return (
14327
13745
  * <div>
14328
- * <h3>Backup Providers</h3>
14329
- *
14330
- * {dropbox.isConfigured && (
14331
- * <div>
14332
- * <span>Dropbox: {dropbox.isAuthenticated ? 'Connected' : 'Not connected'}</span>
14333
- * {dropbox.isAuthenticated ? (
14334
- * <button onClick={dropbox.logout}>Disconnect</button>
14335
- * ) : (
14336
- * <button onClick={dropbox.requestAccess}>Connect</button>
14337
- * )}
14338
- * </div>
14339
- * )}
14340
- *
14341
- * {googleDrive.isConfigured && (
14342
- * <div>
14343
- * <span>Google Drive: {googleDrive.isAuthenticated ? 'Connected' : 'Not connected'}</span>
14344
- * {googleDrive.isAuthenticated ? (
14345
- * <button onClick={googleDrive.logout}>Disconnect</button>
14346
- * ) : (
14347
- * <button onClick={googleDrive.requestAccess}>Connect</button>
14348
- * )}
14349
- * </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>
14350
13751
  * )}
14351
- *
14352
- * <button onClick={logoutAll}>Disconnect All</button>
14353
13752
  * </div>
14354
13753
  * );
14355
13754
  * }
@@ -15079,194 +14478,6 @@ declare function useCredits(options?: UseCreditsOptions): UseCreditsResult;
15079
14478
  */
15080
14479
  declare function useDatabaseManager(walletAddress: string | undefined, manager: DatabaseManager): Database;
15081
14480
 
15082
- /**
15083
- * Clear Dropbox token data
15084
- */
15085
- declare function clearToken(): void;
15086
- /**
15087
- * Check if we have any stored credentials (including refresh token)
15088
- */
15089
- declare function hasDropboxCredentials(walletAddress?: string): Promise<boolean>;
15090
-
15091
- /**
15092
- * Props for DropboxAuthProvider
15093
- */
15094
- interface DropboxAuthProviderProps {
15095
- /** Dropbox App Key (from Dropbox Developer Console) */
15096
- appKey: string | undefined;
15097
- /** OAuth callback path (default: "/auth/dropbox/callback") */
15098
- callbackPath?: string;
15099
- /**
15100
- * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
15101
- * Only needed if you have a custom client configuration (e.g., different baseUrl).
15102
- */
15103
- apiClient?: Client;
15104
- /**
15105
- * Wallet address for encrypting OAuth tokens at rest.
15106
- * If provided, tokens will be encrypted before storing in localStorage.
15107
- * If omitted, tokens are stored temporarily in sessionStorage (cleared on page close).
15108
- */
15109
- walletAddress?: string;
15110
- /** Children to render */
15111
- children: ReactNode;
15112
- }
15113
- /**
15114
- * Context value for Dropbox authentication
15115
- */
15116
- interface DropboxAuthContextValue {
15117
- /** Current access token (null if not authenticated) */
15118
- accessToken: string | null;
15119
- /** Whether user has authenticated with Dropbox */
15120
- isAuthenticated: boolean;
15121
- /** Whether Dropbox is configured (app key exists) */
15122
- isConfigured: boolean;
15123
- /** Request Dropbox access - returns token or redirects to OAuth */
15124
- requestAccess: () => Promise<string>;
15125
- /** Clear stored token and log out */
15126
- logout: () => Promise<void>;
15127
- /** Refresh the access token using the refresh token */
15128
- refreshToken: () => Promise<string | null>;
15129
- }
15130
- /**
15131
- * Provider component for Dropbox OAuth authentication.
15132
- *
15133
- * Wrap your app with this provider to enable Dropbox authentication.
15134
- * It handles the OAuth 2.0 Authorization Code flow with refresh tokens.
15135
- *
15136
- * @example
15137
- * ```tsx
15138
- * import { DropboxAuthProvider } from "@anuma/sdk/react";
15139
- *
15140
- * function App() {
15141
- * return (
15142
- * <DropboxAuthProvider
15143
- * appKey={process.env.NEXT_PUBLIC_DROPBOX_APP_KEY}
15144
- * callbackPath="/auth/dropbox/callback"
15145
- * >
15146
- * <MyApp />
15147
- * </DropboxAuthProvider>
15148
- * );
15149
- * }
15150
- * ```
15151
- *
15152
- */
15153
- declare function DropboxAuthProvider({ appKey, callbackPath, apiClient, walletAddress, children, }: DropboxAuthProviderProps): JSX.Element;
15154
- /**
15155
- * Hook to access Dropbox authentication state and methods.
15156
- *
15157
- * Must be used within a DropboxAuthProvider.
15158
- *
15159
- * @example
15160
- * ```tsx
15161
- * import { useDropboxAuth } from "@anuma/sdk/react";
15162
- *
15163
- * function DropboxButton() {
15164
- * const { isAuthenticated, isConfigured, requestAccess, logout } = useDropboxAuth();
15165
- *
15166
- * if (!isConfigured) {
15167
- * return <p>Dropbox not configured</p>;
15168
- * }
15169
- *
15170
- * if (isAuthenticated) {
15171
- * return <button onClick={logout}>Disconnect Dropbox</button>;
15172
- * }
15173
- *
15174
- * return <button onClick={requestAccess}>Connect Dropbox</button>;
15175
- * }
15176
- * ```
15177
- *
15178
- * @category Hooks
15179
- */
15180
- declare function useDropboxAuth(): DropboxAuthContextValue;
15181
-
15182
- /**
15183
- * Options for useDropboxBackup hook
15184
- * @inline
15185
- */
15186
- interface UseDropboxBackupOptions {
15187
- /** WatermelonDB database instance */
15188
- database: Database;
15189
- /** Current user address (null if not signed in) */
15190
- userAddress: string | null;
15191
- /** Request encryption key for the user address */
15192
- requestEncryptionKey: (address: string) => Promise<void>;
15193
- /** Export a conversation to an encrypted blob */
15194
- exportConversation: (conversationId: string, userAddress: string) => Promise<{
15195
- success: boolean;
15196
- blob?: Blob;
15197
- }>;
15198
- /** Import a conversation from an encrypted blob */
15199
- importConversation: (blob: Blob, userAddress: string) => Promise<{
15200
- success: boolean;
15201
- }>;
15202
- /** Dropbox folder path for backups (default: '/ai-chat-app/conversations') */
15203
- backupFolder?: string;
15204
- }
15205
- /**
15206
- * Result returned by useDropboxBackup hook
15207
- */
15208
- interface UseDropboxBackupResult {
15209
- /** Backup all conversations to Dropbox */
15210
- backup: (options?: {
15211
- onProgress?: (current: number, total: number) => void;
15212
- }) => Promise<DropboxExportResult | {
15213
- error: string;
15214
- }>;
15215
- /** Restore conversations from Dropbox */
15216
- restore: (options?: {
15217
- onProgress?: (current: number, total: number) => void;
15218
- }) => Promise<DropboxImportResult | {
15219
- error: string;
15220
- }>;
15221
- /** Whether Dropbox is configured */
15222
- isConfigured: boolean;
15223
- /** Whether user has a Dropbox token */
15224
- isAuthenticated: boolean;
15225
- }
15226
- /**
15227
- * React hook for Dropbox backup and restore functionality.
15228
- *
15229
- * This hook provides methods to backup conversations to Dropbox and restore them.
15230
- * It handles all the logic for checking timestamps, skipping unchanged files,
15231
- * authentication, and managing the backup/restore process.
15232
- *
15233
- * Must be used within a DropboxAuthProvider.
15234
- *
15235
- * @example
15236
- * ```tsx
15237
- * import { useDropboxBackup } from "@anuma/sdk/react";
15238
- *
15239
- * function BackupButton() {
15240
- * const { backup, restore, isConfigured } = useDropboxBackup({
15241
- * database,
15242
- * userAddress,
15243
- * requestEncryptionKey,
15244
- * exportConversation,
15245
- * importConversation,
15246
- * });
15247
- *
15248
- * const handleBackup = async () => {
15249
- * const result = await backup({
15250
- * onProgress: (current, total) => {
15251
- * console.log(`Progress: ${current}/${total}`);
15252
- * },
15253
- * });
15254
- *
15255
- * if ("error" in result) {
15256
- * console.error(result.error);
15257
- * } else {
15258
- * console.log(`Uploaded: ${result.uploaded}, Skipped: ${result.skipped}`);
15259
- * }
15260
- * };
15261
- *
15262
- * return <button onClick={handleBackup} disabled={!isConfigured}>Backup</button>;
15263
- * }
15264
- * ```
15265
- *
15266
- * @category Hooks
15267
- */
15268
- declare function useDropboxBackup(options: UseDropboxBackupOptions): UseDropboxBackupResult;
15269
-
15270
14481
  /**
15271
14482
  * Result returned by the useExportPdf hook.
15272
14483
  * @category Hooks
@@ -15437,200 +14648,6 @@ interface UseFilesResult {
15437
14648
  */
15438
14649
  declare function useFiles(options: UseFilesOptions): UseFilesResult;
15439
14650
 
15440
- /**
15441
- * Get stored token data for Google Drive
15442
- */
15443
- declare function getGoogleDriveStoredToken(walletAddress?: string): Promise<string | null>;
15444
- /**
15445
- * Clear Google Drive token data
15446
- */
15447
- declare function clearGoogleDriveToken(): void;
15448
- /**
15449
- * Check if we have any stored credentials (including refresh token)
15450
- */
15451
- declare function hasGoogleDriveCredentials(walletAddress?: string): Promise<boolean>;
15452
-
15453
- /**
15454
- * Props for GoogleDriveAuthProvider
15455
- */
15456
- interface GoogleDriveAuthProviderProps {
15457
- /** Google OAuth Client ID (from Google Cloud Console) */
15458
- clientId: string | undefined;
15459
- /** OAuth callback path (default: "/auth/google/callback") */
15460
- callbackPath?: string;
15461
- /**
15462
- * API client for backend OAuth requests. Optional - uses the default SDK client if not provided.
15463
- * Only needed if you have a custom client configuration (e.g., different baseUrl).
15464
- */
15465
- apiClient?: Client;
15466
- /**
15467
- * Wallet address for encrypting OAuth tokens at rest.
15468
- * If provided, tokens will be encrypted before storing in localStorage.
15469
- * If omitted, tokens are stored temporarily in sessionStorage (cleared on page close).
15470
- */
15471
- walletAddress?: string;
15472
- /** Children to render */
15473
- children: ReactNode;
15474
- }
15475
- /**
15476
- * Context value for Google Drive authentication
15477
- */
15478
- interface GoogleDriveAuthContextValue {
15479
- /** Current access token (null if not authenticated) */
15480
- accessToken: string | null;
15481
- /** Whether user has authenticated with Google Drive */
15482
- isAuthenticated: boolean;
15483
- /** Whether Google Drive is configured (client ID exists) */
15484
- isConfigured: boolean;
15485
- /** Request Google Drive access - returns token or redirects to OAuth */
15486
- requestAccess: () => Promise<string>;
15487
- /** Clear stored token and log out */
15488
- logout: () => Promise<void>;
15489
- /** Refresh the access token using the refresh token */
15490
- refreshToken: () => Promise<string | null>;
15491
- }
15492
- /**
15493
- * Provider component for Google Drive OAuth authentication.
15494
- *
15495
- * Wrap your app with this provider to enable Google Drive authentication.
15496
- * It handles the OAuth 2.0 Authorization Code flow with refresh tokens.
15497
- *
15498
- * @example
15499
- * ```tsx
15500
- * import { GoogleDriveAuthProvider } from "@anuma/sdk/react";
15501
- *
15502
- * function App() {
15503
- * return (
15504
- * <GoogleDriveAuthProvider
15505
- * clientId={process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}
15506
- * callbackPath="/auth/google/callback"
15507
- * >
15508
- * <MyApp />
15509
- * </GoogleDriveAuthProvider>
15510
- * );
15511
- * }
15512
- * ```
15513
- *
15514
- */
15515
- declare function GoogleDriveAuthProvider({ clientId, callbackPath, apiClient, walletAddress, children, }: GoogleDriveAuthProviderProps): JSX.Element;
15516
- /**
15517
- * Hook to access Google Drive authentication state and methods.
15518
- *
15519
- * Must be used within a GoogleDriveAuthProvider.
15520
- *
15521
- * @example
15522
- * ```tsx
15523
- * import { useGoogleDriveAuth } from "@anuma/sdk/react";
15524
- *
15525
- * function GoogleDriveButton() {
15526
- * const { isAuthenticated, isConfigured, requestAccess, logout } = useGoogleDriveAuth();
15527
- *
15528
- * if (!isConfigured) {
15529
- * return <p>Google Drive not configured</p>;
15530
- * }
15531
- *
15532
- * if (isAuthenticated) {
15533
- * return <button onClick={logout}>Disconnect Google Drive</button>;
15534
- * }
15535
- *
15536
- * return <button onClick={requestAccess}>Connect Google Drive</button>;
15537
- * }
15538
- * ```
15539
- *
15540
- * @category Hooks
15541
- */
15542
- declare function useGoogleDriveAuth(): GoogleDriveAuthContextValue;
15543
-
15544
- /**
15545
- * Options for useGoogleDriveBackup hook
15546
- * @inline
15547
- */
15548
- interface UseGoogleDriveBackupOptions {
15549
- /** WatermelonDB database instance */
15550
- database: Database;
15551
- /** Current user address (null if not signed in) */
15552
- userAddress: string | null;
15553
- /** Request encryption key for the user address */
15554
- requestEncryptionKey: (address: string) => Promise<void>;
15555
- /** Export a conversation to an encrypted blob */
15556
- exportConversation: (conversationId: string, userAddress: string) => Promise<{
15557
- success: boolean;
15558
- blob?: Blob;
15559
- }>;
15560
- /** Import a conversation from an encrypted blob */
15561
- importConversation: (blob: Blob, userAddress: string) => Promise<{
15562
- success: boolean;
15563
- }>;
15564
- /** Root folder name in Google Drive (default: 'ai-chat-app') */
15565
- rootFolder?: string;
15566
- /** Subfolder for conversations (default: 'conversations') */
15567
- conversationsFolder?: string;
15568
- }
15569
- /**
15570
- * Result returned by useGoogleDriveBackup hook
15571
- */
15572
- interface UseGoogleDriveBackupResult {
15573
- /** Backup all conversations to Google Drive */
15574
- backup: (options?: {
15575
- onProgress?: (current: number, total: number) => void;
15576
- }) => Promise<GoogleDriveExportResult | {
15577
- error: string;
15578
- }>;
15579
- /** Restore conversations from Google Drive */
15580
- restore: (options?: {
15581
- onProgress?: (current: number, total: number) => void;
15582
- }) => Promise<GoogleDriveImportResult | {
15583
- error: string;
15584
- }>;
15585
- /** Whether Google Drive is configured */
15586
- isConfigured: boolean;
15587
- /** Whether user has a Google Drive token */
15588
- isAuthenticated: boolean;
15589
- }
15590
- /**
15591
- * React hook for Google Drive backup and restore functionality.
15592
- *
15593
- * This hook provides methods to backup conversations to Google Drive and restore them.
15594
- * It handles all the logic for checking timestamps, skipping unchanged files,
15595
- * authentication, and managing the backup/restore process.
15596
- *
15597
- * Must be used within a GoogleDriveAuthProvider.
15598
- *
15599
- * @example
15600
- * ```tsx
15601
- * import { useGoogleDriveBackup } from "@anuma/sdk/react";
15602
- *
15603
- * function BackupButton() {
15604
- * const { backup, restore, isConfigured, isAuthenticated } = useGoogleDriveBackup({
15605
- * database,
15606
- * userAddress,
15607
- * requestEncryptionKey,
15608
- * exportConversation,
15609
- * importConversation,
15610
- * });
15611
- *
15612
- * const handleBackup = async () => {
15613
- * const result = await backup({
15614
- * onProgress: (current, total) => {
15615
- * console.log(`Progress: ${current}/${total}`);
15616
- * },
15617
- * });
15618
- *
15619
- * if ("error" in result) {
15620
- * console.error(result.error);
15621
- * } else {
15622
- * console.log(`Uploaded: ${result.uploaded}, Skipped: ${result.skipped}`);
15623
- * }
15624
- * };
15625
- *
15626
- * return <button onClick={handleBackup} disabled={!isConfigured}>Backup</button>;
15627
- * }
15628
- * ```
15629
- *
15630
- * @category Hooks
15631
- */
15632
- declare function useGoogleDriveBackup(options: UseGoogleDriveBackupOptions): UseGoogleDriveBackupResult;
15633
-
15634
14651
  /**
15635
14652
  * Props for ICloudAuthProvider
15636
14653
  */
@@ -16513,4 +15530,4 @@ type UseWalletBindingResult = {
16513
15530
  */
16514
15531
  declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
16515
15532
 
16516
- 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 };