@spacelr/sdk 0.1.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.
@@ -0,0 +1,609 @@
1
+ declare enum FileVisibility {
2
+ PRIVATE = "private",
3
+ SHARED = "shared",
4
+ PUBLIC = "public"
5
+ }
6
+ declare enum GrantType {
7
+ AUTHORIZATION_CODE = "authorization_code",
8
+ CLIENT_CREDENTIALS = "client_credentials",
9
+ REFRESH_TOKEN = "refresh_token"
10
+ }
11
+ declare enum CodeChallengeMethod {
12
+ PLAIN = "plain",
13
+ S256 = "S256"
14
+ }
15
+ declare enum SharePermission {
16
+ READ = "read",
17
+ WRITE = "write"
18
+ }
19
+ interface ApiResponse<T = unknown> {
20
+ success: boolean;
21
+ data?: T;
22
+ error?: {
23
+ message: string;
24
+ code: string;
25
+ details?: Record<string, unknown>;
26
+ };
27
+ }
28
+
29
+ interface LoginParams {
30
+ email: string;
31
+ password: string;
32
+ }
33
+ interface RegisterParams {
34
+ email: string;
35
+ password: string;
36
+ username?: string;
37
+ firstName?: string;
38
+ lastName?: string;
39
+ displayName?: string;
40
+ }
41
+ interface LoginResponse {
42
+ user: {
43
+ id: string;
44
+ sub: string;
45
+ email: string;
46
+ username?: string;
47
+ name?: string;
48
+ roles: string[];
49
+ };
50
+ access_token: string;
51
+ refresh_token?: string;
52
+ expires_in?: number;
53
+ }
54
+ interface RegisterResponse {
55
+ user: {
56
+ id: string;
57
+ email: string;
58
+ username: string;
59
+ displayName?: string;
60
+ };
61
+ access_token: string;
62
+ refresh_token: string;
63
+ emailVerificationRequired?: boolean;
64
+ }
65
+ interface TokenResponse {
66
+ access_token: string;
67
+ token_type: string;
68
+ expires_in: number;
69
+ refresh_token?: string;
70
+ scope?: string;
71
+ }
72
+ interface UserInfo {
73
+ sub: string;
74
+ name?: string;
75
+ given_name?: string;
76
+ family_name?: string;
77
+ preferred_username?: string;
78
+ picture?: string;
79
+ updated_at?: number;
80
+ email?: string;
81
+ email_verified?: boolean;
82
+ }
83
+ interface UserProfile {
84
+ id: string;
85
+ email: string;
86
+ username?: string;
87
+ name?: string;
88
+ roles: string[];
89
+ }
90
+ interface AuthorizationUrlParams {
91
+ redirectUri: string;
92
+ responseType?: string;
93
+ state?: string;
94
+ scope?: string;
95
+ codeChallenge?: string;
96
+ codeChallengeMethod?: CodeChallengeMethod;
97
+ }
98
+ interface ExchangeCodeParams {
99
+ code: string;
100
+ redirectUri: string;
101
+ grantType?: GrantType;
102
+ clientSecret?: string;
103
+ codeVerifier?: string;
104
+ }
105
+ interface PKCEChallenge {
106
+ codeVerifier: string;
107
+ codeChallenge: string;
108
+ codeChallengeMethod: CodeChallengeMethod;
109
+ }
110
+ interface OpenIDConfiguration {
111
+ issuer: string;
112
+ authorization_endpoint: string;
113
+ token_endpoint: string;
114
+ jwks_uri: string;
115
+ response_types_supported: string[];
116
+ grant_types_supported: string[];
117
+ subject_types_supported: string[];
118
+ id_token_signing_alg_values_supported: string[];
119
+ token_endpoint_auth_methods_supported: string[];
120
+ code_challenge_methods_supported: string[];
121
+ }
122
+ interface JWKSResponse {
123
+ keys: JWK[];
124
+ }
125
+ interface JWK {
126
+ kty: string;
127
+ kid?: string;
128
+ use?: string;
129
+ alg?: string;
130
+ n?: string;
131
+ e?: string;
132
+ [key: string]: unknown;
133
+ }
134
+ interface StoredTokens {
135
+ accessToken: string;
136
+ refreshToken?: string;
137
+ expiresAt?: number;
138
+ }
139
+ interface TwoFactorResponse {
140
+ twoFactorRequired: true;
141
+ twoFactorToken: string;
142
+ }
143
+ interface TwoFactorVerifyParams {
144
+ token: string;
145
+ code: string;
146
+ }
147
+
148
+ interface TokenStorage {
149
+ getTokens(): Promise<StoredTokens | null>;
150
+ setTokens(tokens: StoredTokens): Promise<void>;
151
+ clearTokens(): Promise<void>;
152
+ }
153
+ interface SpacelrClientConfig {
154
+ /** Project ID for multi-tenant requests */
155
+ projectId: string;
156
+ /** OAuth client ID */
157
+ clientId: string;
158
+ /** Base URL for the public API gateway (e.g. "http://localhost:3002/api/v1") */
159
+ apiUrl: string;
160
+ /** Path for the OAuth authorization endpoint (e.g. "/auth/authorize") */
161
+ authorizationEndpoint?: string;
162
+ /** Path for the OAuth token endpoint (e.g. "/auth/token") */
163
+ tokenEndpoint?: string;
164
+ /** Path for the OIDC userinfo endpoint (e.g. "/auth/userinfo") */
165
+ userInfoEndpoint?: string;
166
+ /** OAuth scopes to request (e.g. ["openid", "profile", "email"]) */
167
+ scopes?: string[];
168
+ /** Request timeout in milliseconds (default: 30000) */
169
+ timeout?: number;
170
+ /** Custom token storage implementation (default: MemoryTokenStorage) */
171
+ tokenStorage?: TokenStorage;
172
+ /** Buffer in seconds before token expiry to trigger auto-refresh (default: 60) */
173
+ refreshBufferSeconds?: number;
174
+ }
175
+
176
+ interface FileInfo {
177
+ id: string;
178
+ filename: string;
179
+ originalFilename: string;
180
+ mimeType: string;
181
+ sizeBytes: number;
182
+ visibility: FileVisibility;
183
+ ownerId: string;
184
+ projectId: string;
185
+ description?: string;
186
+ createdAt: string;
187
+ updatedAt: string;
188
+ shareCount?: number;
189
+ }
190
+ interface FileListResponse {
191
+ files: FileInfo[];
192
+ total: number;
193
+ }
194
+ interface ListFilesParams {
195
+ limit?: number;
196
+ offset?: number;
197
+ }
198
+ interface InitMultipartUploadParams {
199
+ filename: string;
200
+ mimeType: string;
201
+ totalSizeBytes: number;
202
+ visibility?: FileVisibility;
203
+ description?: string;
204
+ }
205
+ interface InitMultipartUploadResponse {
206
+ fileId: string;
207
+ uploadId: string;
208
+ partSize: number;
209
+ totalParts: number;
210
+ }
211
+ interface PartEtag {
212
+ partNumber: number;
213
+ etag: string;
214
+ }
215
+ interface ShareFileParams {
216
+ userIds: string[];
217
+ permission?: SharePermission;
218
+ }
219
+ interface UnshareFileParams {
220
+ userIds: string[];
221
+ }
222
+ interface QuotaInfo {
223
+ userId: string;
224
+ projectId: string;
225
+ quotaBytes: number;
226
+ usedBytes: number;
227
+ availableBytes: number;
228
+ usagePercentage: number;
229
+ fileCount: number;
230
+ }
231
+ interface DownloadUrlResponse {
232
+ downloadUrl: string;
233
+ expiresIn: number;
234
+ }
235
+ interface UploadFileParams {
236
+ filename: string;
237
+ mimeType: string;
238
+ visibility?: FileVisibility;
239
+ description?: string;
240
+ }
241
+ interface UploadLargeFileParams extends UploadFileParams {
242
+ /** Concurrent part uploads (default: 3) */
243
+ concurrency?: number;
244
+ }
245
+ interface UploadProgress {
246
+ loaded: number;
247
+ total: number;
248
+ percentage: number;
249
+ }
250
+
251
+ type RefreshCallback = (refreshToken: string) => Promise<StoredTokens>;
252
+ declare class TokenManager {
253
+ private storage;
254
+ private refreshBufferSeconds;
255
+ private refreshCallback;
256
+ private refreshPromise;
257
+ constructor(storage?: TokenStorage, refreshBufferSeconds?: number);
258
+ setRefreshCallback(callback: RefreshCallback): void;
259
+ getAccessToken(): Promise<string | null>;
260
+ setTokens(tokens: StoredTokens): Promise<void>;
261
+ clearTokens(): Promise<void>;
262
+ getStoredTokens(): Promise<StoredTokens | null>;
263
+ private isTokenExpired;
264
+ private shouldRefresh;
265
+ private tryRefresh;
266
+ private executeRefresh;
267
+ }
268
+
269
+ interface HttpRequestOptions {
270
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
271
+ path: string;
272
+ body?: unknown;
273
+ authenticated?: boolean;
274
+ headers?: Record<string, string>;
275
+ query?: Record<string, string | number | undefined>;
276
+ /** Send cookies cross-origin (credentials: 'include'). Defaults to true for /auth/ paths. */
277
+ withCredentials?: boolean;
278
+ }
279
+ declare class HttpClient {
280
+ private config;
281
+ private tokenManager;
282
+ constructor(config: SpacelrClientConfig, tokenManager: TokenManager);
283
+ request<T>(options: HttpRequestOptions): Promise<T>;
284
+ uploadForm<T>(path: string, formData: FormData, onProgress?: (event: {
285
+ loaded: number;
286
+ total: number;
287
+ }) => void): Promise<T>;
288
+ private uploadFormWithProgress;
289
+ private buildUrl;
290
+ private buildHeaders;
291
+ private buildFormHeaders;
292
+ private parseResponse;
293
+ private throwHttpError;
294
+ private extractData;
295
+ }
296
+
297
+ declare class MemoryTokenStorage implements TokenStorage {
298
+ private tokens;
299
+ getTokens(): Promise<StoredTokens | null>;
300
+ setTokens(tokens: StoredTokens): Promise<void>;
301
+ clearTokens(): Promise<void>;
302
+ }
303
+ declare class BrowserTokenStorage implements TokenStorage {
304
+ private readonly storageKey;
305
+ constructor(storageKey?: string);
306
+ getTokens(): Promise<StoredTokens | null>;
307
+ setTokens(tokens: StoredTokens): Promise<void>;
308
+ clearTokens(): Promise<void>;
309
+ }
310
+
311
+ declare function generatePKCEChallenge(): Promise<PKCEChallenge>;
312
+
313
+ declare class SpacelrError extends Error {
314
+ readonly code: string;
315
+ readonly statusCode?: number;
316
+ readonly details?: Record<string, unknown>;
317
+ constructor(message: string, code: string, statusCode?: number, details?: Record<string, unknown>);
318
+ }
319
+ declare class SpacelrAuthError extends SpacelrError {
320
+ constructor(message: string, statusCode?: number, details?: Record<string, unknown>);
321
+ }
322
+ declare class SpacelrNetworkError extends SpacelrError {
323
+ constructor(message: string, details?: Record<string, unknown>);
324
+ }
325
+ declare class SpacelrTimeoutError extends SpacelrError {
326
+ constructor(timeoutMs: number);
327
+ }
328
+ declare class SpacelrTwoFactorRequiredError extends SpacelrError {
329
+ readonly twoFactorToken: string;
330
+ constructor(twoFactorToken: string, details?: Record<string, unknown>);
331
+ }
332
+ declare class SpacelrEmailVerificationRequiredError extends SpacelrError {
333
+ readonly emailSent: boolean;
334
+ constructor(emailSent: boolean, details?: Record<string, unknown>);
335
+ }
336
+
337
+ interface DatabaseChangeEvent {
338
+ type: 'insert' | 'update' | 'delete';
339
+ projectId: string;
340
+ collectionName: string;
341
+ documentId: string;
342
+ document?: Record<string, unknown>;
343
+ timestamp: number;
344
+ }
345
+ interface RealtimeConfig {
346
+ baseUrl: string;
347
+ getToken: () => Promise<string | null>;
348
+ }
349
+ declare class RealtimeClient {
350
+ private socket;
351
+ private config;
352
+ private subscriptions;
353
+ private connecting;
354
+ private roomWhereMap;
355
+ constructor(config: RealtimeConfig);
356
+ subscribe(projectId: string, collectionName: string, callback: (event: DatabaseChangeEvent) => void, onError?: (error: Error) => void, where?: Record<string, string | number | boolean>): Promise<() => void>;
357
+ disconnect(): void;
358
+ private buildRoomKey;
359
+ private ensureConnected;
360
+ private connect;
361
+ private eventMatchesRoom;
362
+ private resubscribeAll;
363
+ }
364
+
365
+ declare class AuthModule {
366
+ private http;
367
+ private tokenManager;
368
+ private config;
369
+ constructor(http: HttpClient, tokenManager: TokenManager, config: SpacelrClientConfig);
370
+ login(params: LoginParams): Promise<LoginResponse>;
371
+ register(params: RegisterParams): Promise<RegisterResponse>;
372
+ refresh(refreshToken: string): Promise<TokenResponse>;
373
+ getProfile(): Promise<UserProfile>;
374
+ logout(): Promise<void>;
375
+ verifyEmail(token: string): Promise<{
376
+ message: string;
377
+ }>;
378
+ resendVerification(email: string): Promise<{
379
+ message: string;
380
+ }>;
381
+ getUserInfo(): Promise<UserInfo>;
382
+ getAuthorizationUrl(params: AuthorizationUrlParams): string;
383
+ exchangeCode(params: ExchangeCodeParams): Promise<TokenResponse>;
384
+ generatePKCE(): Promise<PKCEChallenge>;
385
+ getOpenIDConfiguration(): Promise<OpenIDConfiguration>;
386
+ getJWKS(): Promise<JWKSResponse>;
387
+ /**
388
+ * Request a password reset email.
389
+ * Always returns a generic message regardless of whether the email exists.
390
+ */
391
+ requestPasswordReset(email: string): Promise<{
392
+ message: string;
393
+ }>;
394
+ /**
395
+ * Reset password using a token received via email.
396
+ */
397
+ resetPassword(token: string, password: string): Promise<{
398
+ message: string;
399
+ }>;
400
+ /**
401
+ * Exchange a one-time verification code for tokens.
402
+ * Use this after email verification redirects the user with a ?loginCode= parameter.
403
+ */
404
+ exchangeVerificationCode(code: string): Promise<LoginResponse>;
405
+ /**
406
+ * Resend a two-factor authentication code email.
407
+ * Call this when the user hasn't received the code or it expired.
408
+ */
409
+ resendTwoFactorCode(token: string): Promise<{
410
+ message: string;
411
+ }>;
412
+ /**
413
+ * Verify a two-factor authentication code.
414
+ * Call this after catching SpacelrTwoFactorRequiredError from login().
415
+ */
416
+ verifyTwoFactor(params: TwoFactorVerifyParams): Promise<LoginResponse>;
417
+ private storeTokensFromLogin;
418
+ private storeTokensFromRegister;
419
+ }
420
+
421
+ declare class StorageModule {
422
+ private http;
423
+ private tokenManager;
424
+ private config;
425
+ constructor(http: HttpClient, tokenManager: TokenManager, config: SpacelrClientConfig);
426
+ /**
427
+ * Upload a file through the gateway (no direct MinIO access).
428
+ * Accepts a Blob/File (browser) or ArrayBuffer/Uint8Array (Node).
429
+ */
430
+ uploadFile(file: Blob | ArrayBuffer | Uint8Array, params: UploadFileParams, onProgress?: (progress: UploadProgress) => void): Promise<FileInfo>;
431
+ /**
432
+ * Upload a large file using multipart upload through the gateway.
433
+ * Splits into parts, uploads concurrently, and completes.
434
+ */
435
+ uploadLargeFile(file: Blob | ArrayBuffer | Uint8Array, params: UploadLargeFileParams, onProgress?: (progress: UploadProgress) => void): Promise<FileInfo>;
436
+ initMultipartUpload(params: InitMultipartUploadParams): Promise<InitMultipartUploadResponse>;
437
+ completeMultipartUpload(fileId: string, parts: PartEtag[]): Promise<FileInfo>;
438
+ abortMultipartUpload(fileId: string): Promise<void>;
439
+ listFiles(params?: ListFilesParams): Promise<FileListResponse>;
440
+ listSharedFiles(params?: ListFilesParams): Promise<FileListResponse>;
441
+ getFileInfo(fileId: string): Promise<FileInfo>;
442
+ downloadFile(fileId: string): Promise<Blob>;
443
+ getDownloadUrl(fileId: string): Promise<DownloadUrlResponse>;
444
+ deleteFile(fileId: string): Promise<void>;
445
+ shareFile(fileId: string, params: ShareFileParams): Promise<void>;
446
+ unshareFile(fileId: string, params: UnshareFileParams): Promise<void>;
447
+ updateVisibility(fileId: string, visibility: FileVisibility): Promise<FileInfo>;
448
+ getQuota(): Promise<QuotaInfo>;
449
+ getPublicFileUrl(fileId: string, projectId?: string): Promise<string>;
450
+ }
451
+
452
+ interface PopulateOption {
453
+ field: string;
454
+ collection: string;
455
+ foreignField?: string;
456
+ }
457
+ interface FindResult<T = Record<string, unknown>> {
458
+ documents: (T & {
459
+ _id: string;
460
+ })[];
461
+ total: number;
462
+ limit: number;
463
+ offset: number;
464
+ }
465
+ interface InsertResult {
466
+ insertedCount: number;
467
+ insertedIds: string[];
468
+ }
469
+ interface UpdateResult {
470
+ matchedCount: number;
471
+ modifiedCount: number;
472
+ }
473
+ interface DeleteResult {
474
+ deletedCount: number;
475
+ }
476
+ interface FindByIdOptions {
477
+ populate?: PopulateOption[];
478
+ }
479
+ interface SubscribeHandlers<T = Record<string, unknown>> {
480
+ where?: Record<string, string | number | boolean>;
481
+ onInsert?: (doc: T & {
482
+ _id: string;
483
+ }) => void;
484
+ onUpdate?: (doc: T & {
485
+ _id: string;
486
+ }) => void;
487
+ onDelete?: (documentId: string) => void;
488
+ onError?: (error: Error) => void;
489
+ }
490
+ declare class QueryBuilder<T = Record<string, unknown>> {
491
+ private http;
492
+ private basePath;
493
+ private _filter?;
494
+ private _sort?;
495
+ private _limit?;
496
+ private _offset?;
497
+ private _fields?;
498
+ private _populate;
499
+ constructor(http: HttpClient, basePath: string, filter?: Record<string, unknown>);
500
+ sort(sort: Record<string, 1 | -1>): QueryBuilder<T>;
501
+ limit(limit: number): QueryBuilder<T>;
502
+ offset(offset: number): QueryBuilder<T>;
503
+ select(fields: string[]): QueryBuilder<T>;
504
+ populate(field: string, collection: string, foreignField?: string): QueryBuilder<T>;
505
+ execute(): Promise<FindResult<T>>;
506
+ }
507
+ declare class CollectionRef<T = Record<string, unknown>> {
508
+ private http;
509
+ private realtime;
510
+ private projectId;
511
+ private basePath;
512
+ private collectionName;
513
+ constructor(http: HttpClient, realtime: RealtimeClient | null, projectId: string, collectionName: string);
514
+ insert(document: Partial<T> & {
515
+ _id?: string;
516
+ }): Promise<InsertResult>;
517
+ insertMany(documents: (Partial<T> & {
518
+ _id?: string;
519
+ })[]): Promise<InsertResult>;
520
+ find(filter?: Record<string, unknown>): QueryBuilder<T>;
521
+ findById(id: string, options?: FindByIdOptions): Promise<T & {
522
+ _id: string;
523
+ }>;
524
+ update(id: string, update: Partial<T>): Promise<UpdateResult>;
525
+ delete(id: string): Promise<DeleteResult>;
526
+ count(filter?: Record<string, unknown>): Promise<number>;
527
+ subscribe(handlers: SubscribeHandlers<T>): () => void;
528
+ }
529
+ declare class DatabaseModule {
530
+ private http;
531
+ private realtime;
532
+ private projectId;
533
+ constructor(http: HttpClient, projectId: string, realtime?: RealtimeClient);
534
+ collection<T = Record<string, unknown>>(name: string): CollectionRef<T>;
535
+ }
536
+
537
+ interface PushSubscriptionInfo {
538
+ id: string;
539
+ platform: 'web' | 'android' | 'ios';
540
+ endpoint?: string;
541
+ deviceToken?: string;
542
+ deviceId?: string;
543
+ deviceName?: string;
544
+ userAgent?: string;
545
+ isActive: boolean;
546
+ lastUsedAt?: string;
547
+ createdAt: string;
548
+ updatedAt: string;
549
+ }
550
+ interface VapidKeyResponse {
551
+ publicKey: string;
552
+ }
553
+ declare class NotificationsModule {
554
+ private http;
555
+ private customDeviceId;
556
+ private customDeviceName;
557
+ constructor(http: HttpClient);
558
+ /** Set a custom device ID (e.g. from Capacitor Preferences for persistence beyond localStorage) */
559
+ setDeviceId(id: string): void;
560
+ /** Set a custom device name (e.g. "iOS App", "macOS - Chrome") */
561
+ setDeviceName(name: string): void;
562
+ /** Get or generate a stable device identifier. Custom ID takes priority over localStorage. */
563
+ private getDeviceId;
564
+ /** Get device name: custom name > auto-detected from user agent > undefined */
565
+ private getDeviceName;
566
+ /** Auto-detect a short device label from navigator.userAgent (e.g. "macOS - Chrome") */
567
+ private detectDeviceName;
568
+ /** Get the VAPID public key for Web Push setup */
569
+ getVapidPublicKey(): Promise<VapidKeyResponse>;
570
+ /** Register a push subscription (web, android, or ios) */
571
+ subscribe(subscription: {
572
+ platform: 'web' | 'android' | 'ios';
573
+ endpoint?: string;
574
+ keys?: {
575
+ p256dh: string;
576
+ auth: string;
577
+ };
578
+ deviceToken?: string;
579
+ }, deviceName?: string): Promise<PushSubscriptionInfo>;
580
+ /** Unregister a push subscription */
581
+ unsubscribe(platform: 'web' | 'android' | 'ios', identifier: string): Promise<{
582
+ deleted: boolean;
583
+ }>;
584
+ /** Get all subscriptions for the current user */
585
+ getSubscriptions(): Promise<PushSubscriptionInfo[]>;
586
+ /**
587
+ * Helper: Register browser Web Push subscription.
588
+ * Requests notification permission, subscribes via Push API,
589
+ * and registers the subscription with the server.
590
+ */
591
+ registerBrowserPush(serviceWorkerRegistration: ServiceWorkerRegistration, deviceName?: string): Promise<PushSubscriptionInfo>;
592
+ /**
593
+ * Helper: Register a mobile device push token (FCM or APNs).
594
+ */
595
+ registerDevicePush(deviceToken: string, platform: 'android' | 'ios', deviceName?: string): Promise<PushSubscriptionInfo>;
596
+ private urlBase64ToUint8Array;
597
+ }
598
+
599
+ interface SpacelrClient {
600
+ readonly auth: AuthModule;
601
+ readonly storage: StorageModule;
602
+ readonly db: DatabaseModule;
603
+ readonly notifications: NotificationsModule;
604
+ /** Disconnect realtime WebSocket (if connected) */
605
+ disconnect(): void;
606
+ }
607
+ declare function createClient(config: SpacelrClientConfig): SpacelrClient;
608
+
609
+ export { type ApiResponse, type AuthorizationUrlParams, BrowserTokenStorage, CodeChallengeMethod, type DatabaseChangeEvent, type DownloadUrlResponse, type ExchangeCodeParams, type FileInfo, type FileListResponse, FileVisibility, GrantType, type InitMultipartUploadParams, type InitMultipartUploadResponse, type JWK, type JWKSResponse, type ListFilesParams, type LoginParams, type LoginResponse, MemoryTokenStorage, type OpenIDConfiguration, type PKCEChallenge, type PartEtag, type PushSubscriptionInfo, type QuotaInfo, type RegisterParams, type RegisterResponse, type ShareFileParams, SharePermission, SpacelrAuthError, type SpacelrClient, type SpacelrClientConfig, SpacelrEmailVerificationRequiredError, SpacelrError, SpacelrNetworkError, SpacelrTimeoutError, SpacelrTwoFactorRequiredError, type StoredTokens, type SubscribeHandlers, type TokenResponse, type TokenStorage, type TwoFactorResponse, type TwoFactorVerifyParams, type UnshareFileParams, type UploadFileParams, type UploadLargeFileParams, type UploadProgress, type UserInfo, type UserProfile, type VapidKeyResponse, createClient, generatePKCEChallenge };