nexabase-console 1.1.4 → 2.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.
Files changed (72) hide show
  1. package/README.md +33 -8
  2. package/dist/app/NexaApp.d.ts +63 -0
  3. package/dist/app/NexaApp.js +184 -0
  4. package/dist/app/initializeApp.d.ts +8 -0
  5. package/dist/app/initializeApp.js +27 -0
  6. package/dist/auth/Auth.d.ts +21 -0
  7. package/dist/auth/Auth.js +73 -0
  8. package/dist/auth/authTypes.d.ts +1 -0
  9. package/dist/auth/authTypes.js +2 -0
  10. package/dist/auth/persistence.d.ts +9 -0
  11. package/dist/auth/persistence.js +34 -0
  12. package/dist/errors/NexaError.d.ts +7 -0
  13. package/dist/errors/NexaError.js +61 -0
  14. package/dist/firestore/CollectionReference.d.ts +3 -0
  15. package/dist/firestore/CollectionReference.js +7 -0
  16. package/dist/firestore/DocumentReference.d.ts +3 -0
  17. package/dist/firestore/DocumentReference.js +22 -0
  18. package/dist/firestore/FieldPath.d.ts +7 -0
  19. package/dist/firestore/FieldPath.js +23 -0
  20. package/dist/firestore/FieldValue.d.ts +11 -0
  21. package/dist/firestore/FieldValue.js +21 -0
  22. package/dist/firestore/Firestore.d.ts +8 -0
  23. package/dist/firestore/Firestore.js +24 -0
  24. package/dist/firestore/GeoPoint.d.ts +10 -0
  25. package/dist/firestore/GeoPoint.js +22 -0
  26. package/dist/firestore/Query.d.ts +4 -0
  27. package/dist/firestore/Query.js +172 -0
  28. package/dist/firestore/Snapshot.d.ts +6 -0
  29. package/dist/firestore/Snapshot.js +126 -0
  30. package/dist/firestore/SnapshotManager.d.ts +9 -0
  31. package/dist/firestore/SnapshotManager.js +37 -0
  32. package/dist/firestore/Timestamp.d.ts +16 -0
  33. package/dist/firestore/Timestamp.js +36 -0
  34. package/dist/firestore/batch.d.ts +3 -0
  35. package/dist/firestore/batch.js +79 -0
  36. package/dist/firestore/queryConstraints.d.ts +9 -0
  37. package/dist/firestore/queryConstraints.js +31 -0
  38. package/dist/firestore/transaction.d.ts +5 -0
  39. package/dist/firestore/transaction.js +71 -0
  40. package/dist/firestore/writes.d.ts +15 -0
  41. package/dist/firestore/writes.js +146 -0
  42. package/dist/index.d.ts +34 -206
  43. package/dist/index.js +56 -1022
  44. package/dist/persistence/IndexedDB.d.ts +8 -0
  45. package/dist/persistence/IndexedDB.js +37 -0
  46. package/dist/persistence/LocalStore.d.ts +12 -0
  47. package/dist/persistence/LocalStore.js +78 -0
  48. package/dist/persistence/MutationQueue.d.ts +22 -0
  49. package/dist/persistence/MutationQueue.js +145 -0
  50. package/dist/realtime/RealtimeConnection.d.ts +7 -0
  51. package/dist/realtime/RealtimeConnection.js +19 -0
  52. package/dist/realtime/RealtimeDatabase.d.ts +10 -0
  53. package/dist/realtime/RealtimeDatabase.js +62 -0
  54. package/dist/storage/Storage.d.ts +12 -0
  55. package/dist/storage/Storage.js +41 -0
  56. package/dist/storage/StorageReference.d.ts +13 -0
  57. package/dist/storage/StorageReference.js +20 -0
  58. package/dist/storage/UploadTask.d.ts +10 -0
  59. package/dist/storage/UploadTask.js +22 -0
  60. package/dist/sync/ConflictResolver.d.ts +3 -0
  61. package/dist/sync/ConflictResolver.js +24 -0
  62. package/dist/sync/SyncEngine.d.ts +13 -0
  63. package/dist/sync/SyncEngine.js +47 -0
  64. package/dist/transport/HttpClient.d.ts +8 -0
  65. package/dist/transport/HttpClient.js +42 -0
  66. package/dist/transport/SSEClient.d.ts +15 -0
  67. package/dist/transport/SSEClient.js +96 -0
  68. package/dist/types/index.d.ts +150 -0
  69. package/dist/types/index.js +2 -0
  70. package/dist/utils/helpers.d.ts +7 -0
  71. package/dist/utils/helpers.js +124 -0
  72. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runTransaction = void 0;
4
+ const SnapshotManager_1 = require("./SnapshotManager");
5
+ const ConflictResolver_1 = require("../sync/ConflictResolver");
6
+ const NexaError_1 = require("../errors/NexaError");
7
+ const helpers_1 = require("../utils/helpers");
8
+ const runTransaction = async (db, updateFunction, options) => {
9
+ if (db._initPromise)
10
+ await db._initPromise;
11
+ return ConflictResolver_1.ConflictResolver.resolveWithRetry(async () => {
12
+ const reads = [];
13
+ const operations = [];
14
+ const idempotencyKey = (0, helpers_1.generateIdempotencyKey)();
15
+ const transaction = {
16
+ get: async (docRef) => {
17
+ let res;
18
+ try {
19
+ if (typeof navigator !== 'undefined' && !navigator.onLine) {
20
+ throw new Error('offline');
21
+ }
22
+ res = await db.client.get(`/api/firestore/${db.projectId}/documentWithMetadata?docPath=${encodeURIComponent(docRef.path)}`);
23
+ }
24
+ catch (err) {
25
+ throw (0, NexaError_1.toNexaError)(new Error('Transaction failed: Perangkat sedang offline atau jaringan terputus. Transaksi memerlukan koneksi aktif.'));
26
+ }
27
+ const { data, updatedAt } = res.data;
28
+ reads.push({ path: docRef.path, readUpdatedAt: updatedAt });
29
+ return SnapshotManager_1.SnapshotManager.createDocumentSnapshot(docRef, data, false, db.hasPendingWrites(docRef.path));
30
+ },
31
+ set: (docRef, data) => {
32
+ operations.push({ type: 'set', path: docRef.path, data });
33
+ return transaction;
34
+ },
35
+ update: (docRef, data) => {
36
+ operations.push({ type: 'update', path: docRef.path, data });
37
+ return transaction;
38
+ },
39
+ patch: (docRef, data) => {
40
+ operations.push({ type: 'update', path: docRef.path, data });
41
+ return transaction;
42
+ },
43
+ delete: (docRef) => {
44
+ operations.push({ type: 'delete', path: docRef.path });
45
+ return transaction;
46
+ }
47
+ };
48
+ const result = await updateFunction(transaction);
49
+ if (operations.length > 0 || reads.length > 0) {
50
+ if (typeof navigator !== 'undefined' && !navigator.onLine) {
51
+ throw (0, NexaError_1.toNexaError)(new Error('Transaction failed: Perangkat sedang offline atau jaringan terputus. Transaksi memerlukan koneksi aktif.'));
52
+ }
53
+ await db.client.post(`/api/firestore/${db.projectId}/transaction`, { reads, operations, idempotencyKey }, { headers: { 'X-Idempotency-Key': idempotencyKey } });
54
+ }
55
+ for (const op of operations) {
56
+ if (op.type === 'set' || op.type === 'update') {
57
+ const newData = (0, helpers_1.applyDataTransforms)(db._firestoreCache[op.path] || {}, op.data);
58
+ await db._setCache(op.path, newData);
59
+ db._broadcastLocalMutation(op.path, op.type === 'set' ? 'set' : 'patch', op.data);
60
+ db._notifySnapshotCallbacks(op.path, 'document_written', db._firestoreCache[op.path]);
61
+ }
62
+ else if (op.type === 'delete') {
63
+ await db._deleteCache(op.path);
64
+ db._broadcastLocalMutation(op.path, 'delete');
65
+ db._notifySnapshotCallbacks(op.path, 'document_deleted', null);
66
+ }
67
+ }
68
+ return result;
69
+ }, options?.maxAttempts ?? 5);
70
+ };
71
+ exports.runTransaction = runTransaction;
@@ -0,0 +1,15 @@
1
+ import { DocumentReference } from '../types/index';
2
+ export { FieldValue } from './FieldValue';
3
+ export declare const setDoc: (docRef: DocumentReference, data: any, options?: {
4
+ merge?: boolean;
5
+ idempotencyKey?: string;
6
+ }) => Promise<any>;
7
+ export declare const patchDoc: (docRef: DocumentReference, data: any, options?: {
8
+ idempotencyKey?: string;
9
+ }) => Promise<any>;
10
+ export declare const updateDoc: (docRef: DocumentReference, data: any, options?: {
11
+ idempotencyKey?: string;
12
+ }) => Promise<any>;
13
+ export declare const deleteDoc: (docRef: DocumentReference, options?: {
14
+ idempotencyKey?: string;
15
+ }) => Promise<any>;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteDoc = exports.updateDoc = exports.patchDoc = exports.setDoc = exports.FieldValue = void 0;
4
+ const helpers_1 = require("../utils/helpers");
5
+ var FieldValue_1 = require("./FieldValue");
6
+ Object.defineProperty(exports, "FieldValue", { enumerable: true, get: function () { return FieldValue_1.FieldValue; } });
7
+ const setDoc = async (docRef, data, options) => {
8
+ const db = docRef.db;
9
+ if (db._initPromise)
10
+ await db._initPromise;
11
+ const existingData = options?.merge ? db._firestoreCache[docRef.path] || {} : {};
12
+ const finalData = (0, helpers_1.applyDataTransforms)(existingData, data);
13
+ await db._setCache(docRef.path, finalData);
14
+ db._broadcastLocalMutation(docRef.path, 'set', finalData);
15
+ db._notifySnapshotCallbacks(docRef.path, 'document_written', finalData);
16
+ const key = options?.idempotencyKey || (0, helpers_1.generateIdempotencyKey)();
17
+ const jobId = Math.random().toString(36).substring(2, 9);
18
+ const isOnline = typeof navigator !== 'undefined' ? navigator.onLine : true;
19
+ if (!isOnline) {
20
+ await db._addOfflineJob({
21
+ id: jobId,
22
+ type: 'set',
23
+ path: docRef.path,
24
+ data,
25
+ idempotencyKey: key,
26
+ merge: options?.merge,
27
+ state: 'pending'
28
+ });
29
+ return { success: true, message: 'Offline: Tersimpan di cache lokal' };
30
+ }
31
+ else {
32
+ db.markInflight(docRef.path);
33
+ try {
34
+ const res = (await db.client.post(`/api/firestore/${db.projectId}/document`, { docPath: docRef.path, data, idempotencyKey: key, merge: options?.merge }, { headers: { 'X-Idempotency-Key': key } })).data;
35
+ return res;
36
+ }
37
+ catch (error) {
38
+ await db._addOfflineJob({
39
+ id: jobId,
40
+ type: 'set',
41
+ path: docRef.path,
42
+ data,
43
+ idempotencyKey: key,
44
+ merge: options?.merge,
45
+ state: 'pending'
46
+ });
47
+ return { success: true, message: 'Koneksi terganggu: Tersimpan di antrean offline' };
48
+ }
49
+ finally {
50
+ db.unmarkInflight(docRef.path);
51
+ }
52
+ }
53
+ };
54
+ exports.setDoc = setDoc;
55
+ const patchDoc = async (docRef, data, options) => {
56
+ const db = docRef.db;
57
+ if (db._initPromise)
58
+ await db._initPromise;
59
+ const existingData = db._firestoreCache[docRef.path] || {};
60
+ const finalData = (0, helpers_1.applyDataTransforms)(existingData, data);
61
+ await db._setCache(docRef.path, finalData);
62
+ db._broadcastLocalMutation(docRef.path, 'patch', finalData);
63
+ db._notifySnapshotCallbacks(docRef.path, 'document_written', finalData);
64
+ const key = options?.idempotencyKey || (0, helpers_1.generateIdempotencyKey)();
65
+ const jobId = Math.random().toString(36).substring(2, 9);
66
+ const isOnline = typeof navigator !== 'undefined' ? navigator.onLine : true;
67
+ if (!isOnline) {
68
+ await db._addOfflineJob({
69
+ id: jobId,
70
+ type: 'patch',
71
+ path: docRef.path,
72
+ data,
73
+ idempotencyKey: key,
74
+ state: 'pending'
75
+ });
76
+ return { success: true, message: 'Offline: Tersimpan di cache lokal' };
77
+ }
78
+ else {
79
+ db.markInflight(docRef.path);
80
+ try {
81
+ const res = (await db.client.patch(`/api/firestore/${db.projectId}/document`, { docPath: docRef.path, data, idempotencyKey: key }, { headers: { 'X-Idempotency-Key': key } })).data;
82
+ return res;
83
+ }
84
+ catch (error) {
85
+ await db._addOfflineJob({
86
+ id: jobId,
87
+ type: 'patch',
88
+ path: docRef.path,
89
+ data,
90
+ idempotencyKey: key,
91
+ state: 'pending'
92
+ });
93
+ return { success: true, message: 'Koneksi terganggu: Tersimpan di antrean offline' };
94
+ }
95
+ finally {
96
+ db.unmarkInflight(docRef.path);
97
+ }
98
+ }
99
+ };
100
+ exports.patchDoc = patchDoc;
101
+ const updateDoc = async (docRef, data, options) => {
102
+ return (0, exports.patchDoc)(docRef, data, options);
103
+ };
104
+ exports.updateDoc = updateDoc;
105
+ const deleteDoc = async (docRef, options) => {
106
+ const db = docRef.db;
107
+ if (db._initPromise)
108
+ await db._initPromise;
109
+ await db._deleteCache(docRef.path);
110
+ db._broadcastLocalMutation(docRef.path, 'delete');
111
+ db._notifySnapshotCallbacks(docRef.path, 'document_deleted', null);
112
+ const key = options?.idempotencyKey || (0, helpers_1.generateIdempotencyKey)();
113
+ const jobId = Math.random().toString(36).substring(2, 9);
114
+ const isOnline = typeof navigator !== 'undefined' ? navigator.onLine : true;
115
+ if (!isOnline) {
116
+ await db._addOfflineJob({
117
+ id: jobId,
118
+ type: 'delete',
119
+ path: docRef.path,
120
+ idempotencyKey: key,
121
+ state: 'pending'
122
+ });
123
+ return { success: true };
124
+ }
125
+ else {
126
+ db.markInflight(docRef.path);
127
+ try {
128
+ const res = (await db.client.delete(`/api/firestore/${db.projectId}/document?docPath=${encodeURIComponent(docRef.path)}`, { headers: { 'X-Idempotency-Key': key } })).data;
129
+ return res;
130
+ }
131
+ catch (error) {
132
+ await db._addOfflineJob({
133
+ id: jobId,
134
+ type: 'delete',
135
+ path: docRef.path,
136
+ idempotencyKey: key,
137
+ state: 'pending'
138
+ });
139
+ return { success: true };
140
+ }
141
+ finally {
142
+ db.unmarkInflight(docRef.path);
143
+ }
144
+ }
145
+ };
146
+ exports.deleteDoc = deleteDoc;
package/dist/index.d.ts CHANGED
@@ -1,206 +1,34 @@
1
- import { AxiosInstance } from 'axios';
2
- export interface NexaConfig {
3
- projectId: string;
4
- apiKey?: string;
5
- endpoint?: string;
6
- enablePersistence?: boolean;
7
- cacheStrategy?: 'network-first' | 'cache-first';
8
- }
9
- export interface User {
10
- id: string;
11
- email: string;
12
- name: string;
13
- role: string;
14
- }
15
- export interface AuthResponse {
16
- token: string;
17
- user: User;
18
- }
19
- export interface QueryConstraint {
20
- type: 'where' | 'orderBy' | 'limit';
21
- fieldPath?: string;
22
- opStr?: string;
23
- value?: any;
24
- directionStr?: 'asc' | 'desc';
25
- limitValue?: number;
26
- }
27
- export interface DocumentReference<T = any> {
28
- type: 'document';
29
- path: string;
30
- db: NexaApp;
31
- patch?: (data: Partial<T>) => Promise<any>;
32
- }
33
- export interface CollectionReference<T = any> {
34
- type: 'collection';
35
- path: string;
36
- db: NexaApp;
37
- }
38
- export interface Query<T = any> {
39
- type: 'query' | 'collection';
40
- path: string;
41
- db: NexaApp;
42
- constraints?: QueryConstraint[];
43
- }
44
- export interface DocumentSnapshot<T = any> {
45
- id: string;
46
- ref: DocumentReference<T>;
47
- exists: () => boolean;
48
- data: () => T | null;
49
- }
50
- export interface QueryDocumentSnapshot<T = any> {
51
- id: string;
52
- ref: DocumentReference<T>;
53
- exists: () => boolean;
54
- data: () => T;
55
- }
56
- export interface QuerySnapshot<T = any> {
57
- docs: QueryDocumentSnapshot<T>[];
58
- forEach: (callback: (doc: QueryDocumentSnapshot<T>) => void) => void;
59
- empty: boolean;
60
- size: number;
61
- docChanges: () => any[];
62
- }
63
- export interface DatabaseReference {
64
- path: string;
65
- get: () => Promise<any>;
66
- set: (data: any) => Promise<any>;
67
- update: (data: any) => Promise<any>;
68
- delete: () => Promise<any>;
69
- remove: () => Promise<any>;
70
- onDataChanged: (callback: (data: any) => void) => () => void;
71
- }
72
- export interface UploadOptions {
73
- contextType?: 'chat' | 'public_post';
74
- contextId?: string;
75
- fileId?: string;
76
- }
77
- export interface StorageReference {
78
- name: string;
79
- fullPath: string;
80
- put: (file: File | Blob, options?: UploadOptions | ((percent: number) => void), onProgress?: (percent: number) => void) => Promise<{
81
- url: string;
82
- success: boolean;
83
- fileId?: string;
84
- proxyViewUrl?: string;
85
- proxyDownloadUrl?: string;
86
- metadata?: any;
87
- }>;
88
- delete: () => Promise<{
89
- success: boolean;
90
- message?: string;
91
- }>;
92
- }
93
- export interface WriteBatch {
94
- set: (docRef: DocumentReference, data: any) => WriteBatch;
95
- update: (docRef: DocumentReference, data: any) => WriteBatch;
96
- patch: (docRef: DocumentReference, data: any) => WriteBatch;
97
- delete: (docRef: DocumentReference) => WriteBatch;
98
- commit: () => Promise<any>;
99
- }
100
- interface OfflineJob {
101
- id: string;
102
- type: 'set' | 'update' | 'patch' | 'delete';
103
- path: string;
104
- data?: any;
105
- idempotencyKey?: string;
106
- timestamp?: number;
107
- }
108
- export declare function generateIdempotencyKey(): string;
109
- export declare class NexaApp {
110
- projectId: string;
111
- token: string | null;
112
- endpoint: string;
113
- client: AxiosInstance;
114
- sse: EventSource | null;
115
- enablePersistence: boolean;
116
- cacheStrategy: 'network-first' | 'cache-first';
117
- _firestoreCache: Record<string, any>;
118
- _snapshotCallbacks: Record<string, (payload?: any) => void>;
119
- _sseCallbacks: {
120
- data_changed: ((payload: any) => void)[];
121
- firestore_changed: ((payload: any) => void)[];
122
- };
123
- _offlineQueueInitialized: boolean;
124
- _isSyncing: boolean;
125
- _idb: any;
126
- _firestoreListening: boolean;
127
- _initPromise: Promise<void> | null;
128
- _broadcastChannel: any;
129
- _reconnectAttempts: number;
130
- _reconnectTimer: any;
131
- constructor(config: NexaConfig);
132
- _initCrossTabSync(): void;
133
- _broadcastLocalMutation(docPath: string, action: 'set' | 'update' | 'patch' | 'delete' | 'bulk_update', data?: any): void;
134
- connectRealtime(): EventSource;
135
- _notifySnapshotCallbacks(docPath: string, eventType: string, data?: any): void;
136
- database(): {
137
- ref: (path?: string) => DatabaseReference;
138
- };
139
- auth(): {
140
- signInWithEmailAndPassword: (email: string, password: string) => Promise<AuthResponse>;
141
- createUserWithEmailAndPassword: (email: string, password: string, name: string) => Promise<User>;
142
- sendOtp: (email: string) => Promise<{
143
- success: boolean;
144
- message: string;
145
- }>;
146
- signInWithOtp: (email: string, otp: string, name?: string) => Promise<AuthResponse>;
147
- signOut: () => void;
148
- getCurrentUser: () => User | null;
149
- };
150
- storage(): {
151
- ref: (path?: string) => StorageReference;
152
- refFromURL: (url: string) => StorageReference;
153
- };
154
- _initFirestoreState(): Promise<void>;
155
- _getOfflineQueue(): Promise<OfflineJob[]>;
156
- _saveOfflineQueue(queue: OfflineJob[]): Promise<void>;
157
- _addOfflineJob(job: OfflineJob): Promise<void>;
158
- _setCache(path: string, data: any): Promise<void>;
159
- _deleteCache(path: string): Promise<void>;
160
- _loadCache(): Promise<void>;
161
- _syncOfflineQueue(): Promise<void>;
162
- _ensureFirestoreSSE(): void;
163
- }
164
- export declare const NexaBase: {
165
- init: (config: NexaConfig) => NexaApp;
166
- initializeApp: (config: NexaConfig) => NexaApp;
167
- };
168
- export declare const initializeApp: (config: NexaConfig) => NexaApp;
169
- export declare const getFirestore: (app: NexaApp) => NexaApp;
170
- export declare const collection: <T = any>(db: NexaApp, collectionPath: string) => CollectionReference<T>;
171
- export declare const doc: <T = any>(dbOrCollection: NexaApp | CollectionReference<any>, ...pathSegments: string[]) => DocumentReference<T>;
172
- export declare const query: <T = any>(queryObject: Query<T> | CollectionReference<T>, ...queryConstraints: QueryConstraint[]) => Query<T>;
173
- export declare const where: (fieldPath: string, opStr: "==" | ">" | "<" | ">=" | "<=" | "!=", value: any) => QueryConstraint;
174
- export declare const orderBy: (fieldPath: string, directionStr?: "asc" | "desc") => QueryConstraint;
175
- export declare const limit: (limitValue: number) => QueryConstraint;
176
- export declare const getCachedDocs: <T = any>(queryOrCollection: Query<T> | CollectionReference<T>) => QuerySnapshot<T>;
177
- export declare const getCachedDoc: <T = any>(docRef: DocumentReference<T>) => DocumentSnapshot<T>;
178
- export declare const getDocs: <T = any>(queryOrCollection: Query<T> | CollectionReference<T>) => Promise<QuerySnapshot<T>>;
179
- export declare const getDoc: <T = any>(docRef: DocumentReference<T>) => Promise<DocumentSnapshot<T>>;
180
- export declare const setDoc: (docRef: DocumentReference, data: any, options?: {
181
- idempotencyKey?: string;
182
- }) => Promise<any>;
183
- export declare const patchDoc: (docRef: DocumentReference, data: any, options?: {
184
- idempotencyKey?: string;
185
- }) => Promise<any>;
186
- export declare const updateDoc: (docRef: DocumentReference, data: any, options?: {
187
- idempotencyKey?: string;
188
- }) => Promise<any>;
189
- export declare const deleteDoc: (docRef: DocumentReference, options?: {
190
- idempotencyKey?: string;
191
- }) => Promise<any>;
192
- export declare const onSnapshot: (ref: CollectionReference | DocumentReference | Query, callback: (snapshot: any) => void) => (() => void);
193
- export declare const enableIndexedDbPersistence: (db: NexaApp) => Promise<void>;
194
- export declare const enableOfflinePersistence: (db: NexaApp) => Promise<void>;
195
- export declare const writeBatch: (db: NexaApp) => WriteBatch;
196
- export interface Transaction {
197
- get: <T = any>(docRef: DocumentReference<T>) => Promise<DocumentSnapshot<T>>;
198
- set: (docRef: DocumentReference, data: any) => Transaction;
199
- update: (docRef: DocumentReference, data: any) => Transaction;
200
- patch: (docRef: DocumentReference, data: any) => Transaction;
201
- delete: (docRef: DocumentReference) => Transaction;
202
- }
203
- export declare const runTransaction: <T = any>(db: NexaApp, updateFunction: (transaction: Transaction) => Promise<T>, options?: {
204
- maxAttempts?: number;
205
- }) => Promise<T>;
206
- export {};
1
+ export * from './app/initializeApp';
2
+ export * from './app/NexaApp';
3
+ export * from './auth/Auth';
4
+ export * from './auth/authTypes';
5
+ export * from './auth/persistence';
6
+ export * from './firestore/Firestore';
7
+ export * from './firestore/DocumentReference';
8
+ export * from './firestore/CollectionReference';
9
+ export * from './firestore/Query';
10
+ export * from './firestore/Snapshot';
11
+ export * from './firestore/queryConstraints';
12
+ export * from './firestore/writes';
13
+ export * from './firestore/batch';
14
+ export * from './firestore/transaction';
15
+ export * from './firestore/Timestamp';
16
+ export * from './firestore/GeoPoint';
17
+ export * from './firestore/FieldPath';
18
+ export * from './firestore/FieldValue';
19
+ export * from './firestore/SnapshotManager';
20
+ export * from './realtime/RealtimeDatabase';
21
+ export * from './realtime/RealtimeConnection';
22
+ export * from './storage/Storage';
23
+ export * from './storage/StorageReference';
24
+ export * from './storage/UploadTask';
25
+ export * from './persistence/IndexedDB';
26
+ export * from './persistence/LocalStore';
27
+ export * from './persistence/MutationQueue';
28
+ export * from './sync/SyncEngine';
29
+ export * from './sync/ConflictResolver';
30
+ export * from './transport/HttpClient';
31
+ export * from './transport/SSEClient';
32
+ export * from './errors/NexaError';
33
+ export * from './types/index';
34
+ export * from './utils/helpers';