dexie-cloud-addon 4.0.1-beta.37 → 4.0.1-beta.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modern/dexie-cloud-addon.js +35 -3
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +172 -1760
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/types/DexieCloudAPI.d.ts +11 -11
- package/dist/umd/dexie-cloud-addon.js +2765 -3812
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +2 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +205 -1794
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/package.json +14 -26
- package/dist/module-es5/dexie-cloud-addon.js +0 -7388
- package/dist/module-es5/dexie-cloud-addon.js.map +0 -1
- package/dist/module-es5/dexie-cloud-addon.min.js +0 -2
- package/dist/module-es5/dexie-cloud-addon.min.js.map +0 -1
- package/dist/types/DexieCloudEntity.d.ts +0 -8
- package/dist/types/DexieCloudServerState.d.ts +0 -5
- package/dist/types/WebSocketStatus.d.ts +0 -1
- package/dist/types/createMyMembersObservable.d.ts +0 -14
- package/dist/types/currentUserObservable.d.ts +0 -3
- package/dist/types/helpers/BroadcastedLocalEvent.d.ts +0 -8
- package/dist/types/helpers/visibleState.d.ts +0 -1
- package/dist/types/permissionsLookup.d.ts +0 -9
- package/dist/types/permissionsLookupObservable.d.ts +0 -14
- package/dist/types/sync/globalizePrivateIds.d.ts +0 -4
- package/dist/types/sync/syncServerToClientOnly.d.ts +0 -3
- package/dist/types/types/CloudConnectionStatus.d.ts +0 -0
- package/dist/types/types/ConnectionStatus.d.ts +0 -0
- package/dist/types/types/LoginState.d.ts +0 -41
- package/dist/types/types/SyncConnectionStatus.d.ts +0 -1
- package/dist/types/types/SyncFlowStatus.d.ts +0 -6
- package/dist/types/types/SyncStatus.d.ts +0 -6
- package/dist/umd-modern/dexie-cloud-addon.js +0 -6323
- package/dist/umd-modern/dexie-cloud-addon.js.map +0 -1
- package/dist/umd-modern/dexie-cloud-addon.min.js +0 -2
- package/dist/umd-modern/dexie-cloud-addon.min.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DexieCloudOptions } from './DexieCloudOptions';
|
|
2
2
|
import { DBRealmRole, DexieCloudSchema } from 'dexie-cloud-common';
|
|
3
3
|
import { UserLogin } from './db/entities/UserLogin';
|
|
4
|
-
import * as Rx from 'rxjs';
|
|
5
4
|
import { PersistedSyncState } from './db/entities/PersistedSyncState';
|
|
6
5
|
import { SyncState } from './types/SyncState';
|
|
7
6
|
import { DXCUserInteraction } from './types/DXCUserInteraction';
|
|
@@ -9,6 +8,7 @@ import { DXCWebSocketStatus } from './DXCWebSocketStatus';
|
|
|
9
8
|
import { PermissionChecker } from './PermissionChecker';
|
|
10
9
|
import { DexieCloudSyncOptions } from "./DexieCloudSyncOptions";
|
|
11
10
|
import { Invite } from './Invite';
|
|
11
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
12
12
|
/** The API of db.cloud, where `db` is an instance of Dexie with dexie-cloud-addon active.
|
|
13
13
|
*/
|
|
14
14
|
export interface DexieCloudAPI {
|
|
@@ -16,16 +16,16 @@ export interface DexieCloudAPI {
|
|
|
16
16
|
options: DexieCloudOptions | null;
|
|
17
17
|
schema: DexieCloudSchema | null;
|
|
18
18
|
currentUserId: string;
|
|
19
|
-
currentUser:
|
|
20
|
-
webSocketStatus:
|
|
21
|
-
syncState:
|
|
22
|
-
persistedSyncState:
|
|
19
|
+
currentUser: BehaviorSubject<UserLogin>;
|
|
20
|
+
webSocketStatus: BehaviorSubject<DXCWebSocketStatus>;
|
|
21
|
+
syncState: BehaviorSubject<SyncState>;
|
|
22
|
+
persistedSyncState: BehaviorSubject<PersistedSyncState | undefined>;
|
|
23
23
|
events: {
|
|
24
|
-
syncComplete:
|
|
24
|
+
syncComplete: Observable<void>;
|
|
25
25
|
};
|
|
26
|
-
userInteraction:
|
|
27
|
-
invites:
|
|
28
|
-
roles:
|
|
26
|
+
userInteraction: BehaviorSubject<DXCUserInteraction | undefined>;
|
|
27
|
+
invites: Observable<Invite[]>;
|
|
28
|
+
roles: Observable<{
|
|
29
29
|
[roleName: string]: DBRealmRole;
|
|
30
30
|
}>;
|
|
31
31
|
usingServiceWorker?: boolean;
|
|
@@ -58,12 +58,12 @@ export interface DexieCloudAPI {
|
|
|
58
58
|
owner: string;
|
|
59
59
|
realmId: string;
|
|
60
60
|
table: () => string;
|
|
61
|
-
}>(entity: T):
|
|
61
|
+
}>(entity: T): Observable<PermissionChecker<T>>;
|
|
62
62
|
/** Method that returns an observable of the available permissions of given
|
|
63
63
|
* object and table name.
|
|
64
64
|
*
|
|
65
65
|
* @param obj Object retrieved from a dexie query
|
|
66
66
|
* @param table Table name that the object was retrieved from
|
|
67
67
|
*/
|
|
68
|
-
permissions<T>(obj: T, table: string):
|
|
68
|
+
permissions<T>(obj: T, table: string): Observable<PermissionChecker<T, string>>;
|
|
69
69
|
}
|