dexie-cloud-addon 4.0.1-beta.46 → 4.0.1-beta.48

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 (264) hide show
  1. package/dist/{types → modern}/DexieCloudAPI.d.ts +3 -0
  2. package/dist/{types → modern}/DexieCloudOptions.d.ts +1 -0
  3. package/dist/modern/InvalidLicenseError.d.ts +5 -0
  4. package/dist/{types → modern}/TSON.d.ts +1 -1
  5. package/dist/modern/authentication/TokenErrorResponseError.d.ts +10 -0
  6. package/dist/{types → modern}/authentication/authenticate.d.ts +3 -3
  7. package/dist/{types → modern}/authentication/interactWithUser.d.ts +3 -0
  8. package/dist/modern/authentication/logout.d.ts +5 -0
  9. package/dist/modern/authentication/waitUntil.d.ts +3 -0
  10. package/dist/{types → modern}/currentUserEmitter.d.ts +1 -1
  11. package/dist/{types → modern}/db/entities/UserLogin.d.ts +6 -0
  12. package/dist/modern/default-ui/LoginDialog.d.ts +3 -0
  13. package/dist/modern/dexie-cloud-addon.d.ts +3 -0
  14. package/dist/modern/dexie-cloud-addon.js +488 -367
  15. package/dist/modern/dexie-cloud-addon.js.map +1 -1
  16. package/dist/modern/dexie-cloud-addon.min.js +2 -2
  17. package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
  18. package/dist/{types → modern}/dexie-cloud-client.d.ts +2 -0
  19. package/dist/modern/helpers/resolveText.d.ts +16 -0
  20. package/dist/modern/isEagerSyncDisabled.d.ts +2 -0
  21. package/dist/{types → modern}/middlewares/createMutationTrackingMiddleware.d.ts +1 -1
  22. package/dist/modern/prodLog.d.ts +9 -0
  23. package/dist/modern/service-worker.js +2027 -268
  24. package/dist/modern/service-worker.js.map +1 -1
  25. package/dist/modern/service-worker.min.js +2 -2
  26. package/dist/modern/service-worker.min.js.map +1 -1
  27. package/dist/modern/sync/performGuardedJob.d.ts +2 -0
  28. package/dist/modern/sync/ratelimit.d.ts +3 -0
  29. package/dist/{types → modern}/sync/sync.d.ts +0 -1
  30. package/dist/{types → modern}/types/DXCAlert.d.ts +1 -1
  31. package/dist/{types → modern}/types/DXCUserInteraction.d.ts +40 -2
  32. package/dist/{types → modern}/types/SyncState.d.ts +1 -0
  33. package/dist/umd/DISABLE_SERVICEWORKER_STRATEGY.d.ts +1 -0
  34. package/dist/umd/DXCWebSocketStatus.d.ts +1 -0
  35. package/dist/umd/DexieCloudAPI.d.ts +72 -0
  36. package/dist/umd/DexieCloudOptions.d.ts +22 -0
  37. package/dist/umd/DexieCloudSyncOptions.d.ts +4 -0
  38. package/dist/umd/DexieCloudTable.d.ts +18 -0
  39. package/dist/umd/InvalidLicenseError.d.ts +5 -0
  40. package/dist/umd/Invite.d.ts +8 -0
  41. package/dist/umd/PermissionChecker.d.ts +15 -0
  42. package/dist/umd/TSON.d.ts +17 -0
  43. package/dist/umd/WSObservable.d.ts +68 -0
  44. package/dist/umd/associate.d.ts +1 -0
  45. package/dist/umd/authentication/AuthPersistedContext.d.ts +9 -0
  46. package/dist/umd/authentication/TokenErrorResponseError.d.ts +10 -0
  47. package/dist/umd/authentication/TokenExpiredError.d.ts +3 -0
  48. package/dist/umd/authentication/UNAUTHORIZED_USER.d.ts +2 -0
  49. package/dist/umd/authentication/authenticate.d.ts +20 -0
  50. package/dist/umd/authentication/currentUserObservable.d.ts +1 -0
  51. package/dist/umd/authentication/interactWithUser.d.ts +21 -0
  52. package/dist/umd/authentication/login.d.ts +6 -0
  53. package/dist/umd/authentication/logout.d.ts +5 -0
  54. package/dist/umd/authentication/otpFetchTokenCallback.d.ts +3 -0
  55. package/dist/umd/authentication/setCurrentUser.d.ts +14 -0
  56. package/dist/umd/authentication/waitUntil.d.ts +3 -0
  57. package/dist/umd/computeSyncState.d.ts +4 -0
  58. package/dist/umd/createSharedValueObservable.d.ts +3 -0
  59. package/dist/umd/currentUserEmitter.d.ts +3 -0
  60. package/dist/umd/db/DexieCloudDB.d.ts +59 -0
  61. package/dist/umd/db/entities/BaseRevisionMapEntry.d.ts +5 -0
  62. package/dist/umd/db/entities/EntityCommon.d.ts +5 -0
  63. package/dist/umd/db/entities/GuardedJob.d.ts +5 -0
  64. package/dist/umd/db/entities/Member.d.ts +19 -0
  65. package/dist/umd/db/entities/PersistedSyncState.d.ts +14 -0
  66. package/dist/umd/db/entities/Realm.d.ts +16 -0
  67. package/dist/umd/db/entities/Role.d.ts +11 -0
  68. package/dist/umd/db/entities/UserLogin.d.ts +22 -0
  69. package/dist/umd/default-ui/Dialog.d.ts +5 -0
  70. package/dist/umd/default-ui/LoginDialog.d.ts +3 -0
  71. package/dist/umd/default-ui/Styles.d.ts +3 -0
  72. package/dist/umd/default-ui/index.d.ts +24 -0
  73. package/dist/umd/dexie-cloud-addon.d.ts +3 -0
  74. package/dist/umd/dexie-cloud-addon.js +505 -388
  75. package/dist/umd/dexie-cloud-addon.js.map +1 -1
  76. package/dist/umd/dexie-cloud-client.d.ts +13 -0
  77. package/dist/umd/errors/HttpError.d.ts +5 -0
  78. package/dist/umd/extend-dexie-interface.d.ts +23 -0
  79. package/dist/umd/getGlobalRolesObservable.d.ts +5 -0
  80. package/dist/umd/getInternalAccessControlObservable.d.ts +12 -0
  81. package/dist/umd/getInvitesObservable.d.ts +23 -0
  82. package/dist/umd/getPermissionsLookupObservable.d.ts +16 -0
  83. package/dist/umd/getTiedRealmId.d.ts +2 -0
  84. package/dist/umd/helpers/BroadcastedAndLocalEvent.d.ts +8 -0
  85. package/dist/umd/helpers/CancelToken.d.ts +4 -0
  86. package/dist/umd/helpers/IS_SERVICE_WORKER.d.ts +1 -0
  87. package/dist/umd/helpers/SWBroadcastChannel.d.ts +12 -0
  88. package/dist/umd/helpers/allSettled.d.ts +1 -0
  89. package/dist/umd/helpers/bulkUpdate.d.ts +4 -0
  90. package/dist/umd/helpers/computeRealmSetHash.d.ts +2 -0
  91. package/dist/umd/helpers/date-constants.d.ts +5 -0
  92. package/dist/umd/helpers/dbOnClosed.d.ts +2 -0
  93. package/dist/umd/helpers/flatten.d.ts +1 -0
  94. package/dist/umd/helpers/getMutationTable.d.ts +1 -0
  95. package/dist/umd/helpers/getSyncableTables.d.ts +4 -0
  96. package/dist/umd/helpers/getTableFromMutationTable.d.ts +1 -0
  97. package/dist/umd/helpers/makeArray.d.ts +1 -0
  98. package/dist/umd/helpers/randomString.d.ts +1 -0
  99. package/dist/umd/helpers/resolveText.d.ts +16 -0
  100. package/dist/umd/helpers/throwVersionIncrementNeeded.d.ts +1 -0
  101. package/dist/umd/helpers/visibilityState.d.ts +1 -0
  102. package/dist/umd/isEagerSyncDisabled.d.ts +2 -0
  103. package/dist/umd/isFirefox.d.ts +1 -0
  104. package/dist/umd/isSafari.d.ts +2 -0
  105. package/dist/umd/mapValueObservable.d.ts +5 -0
  106. package/dist/umd/mergePermissions.d.ts +2 -0
  107. package/dist/umd/middleware-helpers/guardedTable.d.ts +11 -0
  108. package/dist/umd/middleware-helpers/idGenerationHelpers.d.ts +18 -0
  109. package/dist/umd/middlewares/createIdGenerationMiddleware.d.ts +3 -0
  110. package/dist/umd/middlewares/createImplicitPropSetterMiddleware.d.ts +3 -0
  111. package/dist/umd/middlewares/createMutationTrackingMiddleware.d.ts +17 -0
  112. package/dist/umd/middlewares/outstandingTransaction.d.ts +4 -0
  113. package/dist/umd/overrideParseStoresSpec.d.ts +4 -0
  114. package/dist/umd/performInitialSync.d.ts +4 -0
  115. package/dist/umd/permissions.d.ts +9 -0
  116. package/dist/umd/prodLog.d.ts +9 -0
  117. package/dist/umd/service-worker.d.ts +1 -0
  118. package/dist/umd/service-worker.js +2078 -322
  119. package/dist/umd/service-worker.js.map +1 -1
  120. package/dist/umd/sync/LocalSyncWorker.d.ts +7 -0
  121. package/dist/umd/sync/SyncRequiredError.d.ts +3 -0
  122. package/dist/umd/sync/applyServerChanges.d.ts +3 -0
  123. package/dist/umd/sync/connectWebSocket.d.ts +2 -0
  124. package/dist/umd/sync/encodeIdsForServer.d.ts +4 -0
  125. package/dist/umd/sync/extractRealm.d.ts +2 -0
  126. package/dist/umd/sync/getLatestRevisionsPerTable.d.ts +6 -0
  127. package/dist/umd/sync/getTablesToSyncify.d.ts +3 -0
  128. package/dist/umd/sync/isOnline.d.ts +1 -0
  129. package/dist/umd/sync/isSyncNeeded.d.ts +2 -0
  130. package/dist/umd/sync/listClientChanges.d.ts +9 -0
  131. package/dist/umd/sync/listSyncifiedChanges.d.ts +5 -0
  132. package/dist/umd/sync/messageConsumerIsReady.d.ts +2 -0
  133. package/dist/umd/sync/messagesFromServerQueue.d.ts +8 -0
  134. package/dist/umd/sync/modifyLocalObjectsWithNewUserId.d.ts +4 -0
  135. package/dist/umd/sync/myId.d.ts +1 -0
  136. package/dist/umd/sync/numUnsyncedMutations.d.ts +2 -0
  137. package/dist/umd/sync/old_startSyncingClientChanges.d.ts +39 -0
  138. package/dist/umd/sync/performGuardedJob.d.ts +2 -0
  139. package/dist/umd/sync/ratelimit.d.ts +3 -0
  140. package/dist/umd/sync/registerSyncEvent.d.ts +3 -0
  141. package/dist/umd/sync/sync.d.ts +15 -0
  142. package/dist/umd/sync/syncIfPossible.d.ts +5 -0
  143. package/dist/umd/sync/syncWithServer.d.ts +6 -0
  144. package/dist/umd/sync/triggerSync.d.ts +2 -0
  145. package/dist/umd/sync/updateBaseRevs.d.ts +5 -0
  146. package/dist/umd/types/DXCAlert.d.ts +25 -0
  147. package/dist/umd/types/DXCInputField.d.ts +11 -0
  148. package/dist/umd/types/DXCUserInteraction.d.ts +93 -0
  149. package/dist/umd/types/NewIdOptions.d.ts +3 -0
  150. package/dist/umd/types/SWMessageEvent.d.ts +3 -0
  151. package/dist/umd/types/SWSyncEvent.d.ts +4 -0
  152. package/dist/umd/types/SyncState.d.ts +9 -0
  153. package/dist/umd/types/TXExpandos.d.ts +11 -0
  154. package/dist/umd/updateSchemaFromOptions.d.ts +3 -0
  155. package/dist/umd/userIsActive.d.ts +7 -0
  156. package/dist/umd/verifyConfig.d.ts +2 -0
  157. package/dist/umd/verifySchema.d.ts +2 -0
  158. package/package.json +14 -48
  159. package/LICENSE +0 -202
  160. package/copydts.sh +0 -5
  161. package/dist/types/default-ui/LoginDialog.d.ts +0 -6
  162. package/dist/types/helpers/resolveText.d.ts +0 -2
  163. package/dist/types/sync/performGuardedJob.d.ts +0 -4
  164. package/dist/umd/dexie-cloud-addon.min.js +0 -2
  165. package/dist/umd/dexie-cloud-addon.min.js.map +0 -1
  166. package/dist/umd/service-worker.min.js +0 -2
  167. package/dist/umd/service-worker.min.js.map +0 -1
  168. /package/dist/{types → modern}/DISABLE_SERVICEWORKER_STRATEGY.d.ts +0 -0
  169. /package/dist/{types → modern}/DXCWebSocketStatus.d.ts +0 -0
  170. /package/dist/{types → modern}/DexieCloudSyncOptions.d.ts +0 -0
  171. /package/dist/{types → modern}/DexieCloudTable.d.ts +0 -0
  172. /package/dist/{types → modern}/Invite.d.ts +0 -0
  173. /package/dist/{types → modern}/PermissionChecker.d.ts +0 -0
  174. /package/dist/{types → modern}/WSObservable.d.ts +0 -0
  175. /package/dist/{types → modern}/associate.d.ts +0 -0
  176. /package/dist/{types → modern}/authentication/AuthPersistedContext.d.ts +0 -0
  177. /package/dist/{types → modern}/authentication/TokenExpiredError.d.ts +0 -0
  178. /package/dist/{types → modern}/authentication/UNAUTHORIZED_USER.d.ts +0 -0
  179. /package/dist/{types → modern}/authentication/currentUserObservable.d.ts +0 -0
  180. /package/dist/{types → modern}/authentication/login.d.ts +0 -0
  181. /package/dist/{types → modern}/authentication/otpFetchTokenCallback.d.ts +0 -0
  182. /package/dist/{types → modern}/authentication/setCurrentUser.d.ts +0 -0
  183. /package/dist/{types → modern}/computeSyncState.d.ts +0 -0
  184. /package/dist/{types → modern}/createSharedValueObservable.d.ts +0 -0
  185. /package/dist/{types → modern}/db/DexieCloudDB.d.ts +0 -0
  186. /package/dist/{types → modern}/db/entities/BaseRevisionMapEntry.d.ts +0 -0
  187. /package/dist/{types → modern}/db/entities/EntityCommon.d.ts +0 -0
  188. /package/dist/{types → modern}/db/entities/GuardedJob.d.ts +0 -0
  189. /package/dist/{types → modern}/db/entities/Member.d.ts +0 -0
  190. /package/dist/{types → modern}/db/entities/PersistedSyncState.d.ts +0 -0
  191. /package/dist/{types → modern}/db/entities/Realm.d.ts +0 -0
  192. /package/dist/{types → modern}/db/entities/Role.d.ts +0 -0
  193. /package/dist/{types → modern}/default-ui/Dialog.d.ts +0 -0
  194. /package/dist/{types → modern}/default-ui/Styles.d.ts +0 -0
  195. /package/dist/{types → modern}/default-ui/index.d.ts +0 -0
  196. /package/dist/{types → modern}/errors/HttpError.d.ts +0 -0
  197. /package/dist/{types → modern}/extend-dexie-interface.d.ts +0 -0
  198. /package/dist/{types → modern}/getGlobalRolesObservable.d.ts +0 -0
  199. /package/dist/{types → modern}/getInternalAccessControlObservable.d.ts +0 -0
  200. /package/dist/{types → modern}/getInvitesObservable.d.ts +0 -0
  201. /package/dist/{types → modern}/getPermissionsLookupObservable.d.ts +0 -0
  202. /package/dist/{types → modern}/getTiedRealmId.d.ts +0 -0
  203. /package/dist/{types → modern}/helpers/BroadcastedAndLocalEvent.d.ts +0 -0
  204. /package/dist/{types → modern}/helpers/CancelToken.d.ts +0 -0
  205. /package/dist/{types → modern}/helpers/IS_SERVICE_WORKER.d.ts +0 -0
  206. /package/dist/{types → modern}/helpers/SWBroadcastChannel.d.ts +0 -0
  207. /package/dist/{types → modern}/helpers/allSettled.d.ts +0 -0
  208. /package/dist/{types → modern}/helpers/bulkUpdate.d.ts +0 -0
  209. /package/dist/{types → modern}/helpers/computeRealmSetHash.d.ts +0 -0
  210. /package/dist/{types → modern}/helpers/date-constants.d.ts +0 -0
  211. /package/dist/{types → modern}/helpers/dbOnClosed.d.ts +0 -0
  212. /package/dist/{types → modern}/helpers/flatten.d.ts +0 -0
  213. /package/dist/{types → modern}/helpers/getMutationTable.d.ts +0 -0
  214. /package/dist/{types → modern}/helpers/getSyncableTables.d.ts +0 -0
  215. /package/dist/{types → modern}/helpers/getTableFromMutationTable.d.ts +0 -0
  216. /package/dist/{types → modern}/helpers/makeArray.d.ts +0 -0
  217. /package/dist/{types → modern}/helpers/randomString.d.ts +0 -0
  218. /package/dist/{types → modern}/helpers/throwVersionIncrementNeeded.d.ts +0 -0
  219. /package/dist/{types → modern}/helpers/visibilityState.d.ts +0 -0
  220. /package/dist/{types → modern}/isFirefox.d.ts +0 -0
  221. /package/dist/{types → modern}/isSafari.d.ts +0 -0
  222. /package/dist/{types → modern}/mapValueObservable.d.ts +0 -0
  223. /package/dist/{types → modern}/mergePermissions.d.ts +0 -0
  224. /package/dist/{types → modern}/middleware-helpers/guardedTable.d.ts +0 -0
  225. /package/dist/{types → modern}/middleware-helpers/idGenerationHelpers.d.ts +0 -0
  226. /package/dist/{types → modern}/middlewares/createIdGenerationMiddleware.d.ts +0 -0
  227. /package/dist/{types → modern}/middlewares/createImplicitPropSetterMiddleware.d.ts +0 -0
  228. /package/dist/{types → modern}/middlewares/outstandingTransaction.d.ts +0 -0
  229. /package/dist/{types → modern}/overrideParseStoresSpec.d.ts +0 -0
  230. /package/dist/{types → modern}/performInitialSync.d.ts +0 -0
  231. /package/dist/{types → modern}/permissions.d.ts +0 -0
  232. /package/dist/{types → modern}/service-worker.d.ts +0 -0
  233. /package/dist/{types → modern}/sync/LocalSyncWorker.d.ts +0 -0
  234. /package/dist/{types → modern}/sync/SyncRequiredError.d.ts +0 -0
  235. /package/dist/{types → modern}/sync/applyServerChanges.d.ts +0 -0
  236. /package/dist/{types → modern}/sync/connectWebSocket.d.ts +0 -0
  237. /package/dist/{types → modern}/sync/encodeIdsForServer.d.ts +0 -0
  238. /package/dist/{types → modern}/sync/extractRealm.d.ts +0 -0
  239. /package/dist/{types → modern}/sync/getLatestRevisionsPerTable.d.ts +0 -0
  240. /package/dist/{types → modern}/sync/getTablesToSyncify.d.ts +0 -0
  241. /package/dist/{types → modern}/sync/isOnline.d.ts +0 -0
  242. /package/dist/{types → modern}/sync/isSyncNeeded.d.ts +0 -0
  243. /package/dist/{types → modern}/sync/listClientChanges.d.ts +0 -0
  244. /package/dist/{types → modern}/sync/listSyncifiedChanges.d.ts +0 -0
  245. /package/dist/{types → modern}/sync/messageConsumerIsReady.d.ts +0 -0
  246. /package/dist/{types → modern}/sync/messagesFromServerQueue.d.ts +0 -0
  247. /package/dist/{types → modern}/sync/modifyLocalObjectsWithNewUserId.d.ts +0 -0
  248. /package/dist/{types → modern}/sync/myId.d.ts +0 -0
  249. /package/dist/{types → modern}/sync/numUnsyncedMutations.d.ts +0 -0
  250. /package/dist/{types → modern}/sync/old_startSyncingClientChanges.d.ts +0 -0
  251. /package/dist/{types → modern}/sync/registerSyncEvent.d.ts +0 -0
  252. /package/dist/{types → modern}/sync/syncIfPossible.d.ts +0 -0
  253. /package/dist/{types → modern}/sync/syncWithServer.d.ts +0 -0
  254. /package/dist/{types → modern}/sync/triggerSync.d.ts +0 -0
  255. /package/dist/{types → modern}/sync/updateBaseRevs.d.ts +0 -0
  256. /package/dist/{types → modern}/types/DXCInputField.d.ts +0 -0
  257. /package/dist/{types → modern}/types/NewIdOptions.d.ts +0 -0
  258. /package/dist/{types → modern}/types/SWMessageEvent.d.ts +0 -0
  259. /package/dist/{types → modern}/types/SWSyncEvent.d.ts +0 -0
  260. /package/dist/{types → modern}/types/TXExpandos.d.ts +0 -0
  261. /package/dist/{types → modern}/updateSchemaFromOptions.d.ts +0 -0
  262. /package/dist/{types → modern}/userIsActive.d.ts +0 -0
  263. /package/dist/{types → modern}/verifyConfig.d.ts +0 -0
  264. /package/dist/{types → modern}/verifySchema.d.ts +0 -0
@@ -41,6 +41,9 @@ export interface DexieCloudAPI {
41
41
  userId?: string;
42
42
  grant_type?: 'demo' | 'otp';
43
43
  }): Promise<void>;
44
+ logout(options?: {
45
+ force?: boolean;
46
+ }): Promise<void>;
44
47
  /**
45
48
  * Connect to given URL
46
49
  */
@@ -11,6 +11,7 @@ export interface DexieCloudOptions {
11
11
  unsyncedTables?: string[];
12
12
  nameSuffix?: boolean;
13
13
  disableWebSocket?: boolean;
14
+ disableEagerSync?: boolean;
14
15
  fetchTokens?: (tokenParams: {
15
16
  public_key: string;
16
17
  hints?: {
@@ -0,0 +1,5 @@
1
+ export declare class InvalidLicenseError extends Error {
2
+ name: string;
3
+ license?: 'expired' | 'deactivated';
4
+ constructor(license?: 'expired' | 'deactivated');
5
+ }
@@ -1,5 +1,5 @@
1
1
  export declare const hasBigIntSupport: boolean;
2
- export declare function compareBigInts(a: bigint | FakeBigInt | string, b: bigint | FakeBigInt | string): 0 | 1 | -1;
2
+ export declare function compareBigInts(a: bigint | FakeBigInt | string, b: bigint | FakeBigInt | string): 1 | 0 | -1;
3
3
  export declare class FakeBigInt {
4
4
  v: string;
5
5
  toString(): string;
@@ -0,0 +1,10 @@
1
+ import { TokenErrorResponse } from 'dexie-cloud-common';
2
+ export declare class TokenErrorResponseError extends Error {
3
+ title: string;
4
+ messageCode: 'INVALID_OTP' | 'INVALID_EMAIL' | 'LICENSE_LIMIT_REACHED' | 'GENERIC_ERROR';
5
+ message: string;
6
+ messageParams?: {
7
+ [param: string]: string;
8
+ };
9
+ constructor({ title, message, messageCode, messageParams, }: TokenErrorResponse);
10
+ }
@@ -1,4 +1,4 @@
1
- import type { TokenFinalResponse } from 'dexie-cloud-common';
1
+ import type { TokenErrorResponse, TokenFinalResponse } from 'dexie-cloud-common';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { DexieCloudDB } from '../db/DexieCloudDB';
4
4
  import { UserLogin } from '../db/entities/UserLogin';
@@ -10,8 +10,8 @@ export type FetchTokenCallback = (tokenParams: {
10
10
  email?: string;
11
11
  grant_type?: string;
12
12
  };
13
- }) => Promise<TokenFinalResponse>;
14
- export declare function loadAccessToken(db: DexieCloudDB): Promise<string | undefined>;
13
+ }) => Promise<TokenFinalResponse | TokenErrorResponse>;
14
+ export declare function loadAccessToken(db: DexieCloudDB): Promise<UserLogin | null>;
15
15
  export declare function authenticate(url: string, context: UserLogin, fetchToken: FetchTokenCallback, userInteraction: BehaviorSubject<DXCUserInteraction | undefined>, hints?: {
16
16
  userId?: string;
17
17
  email?: string;
@@ -6,6 +6,8 @@ export interface DXCUserInteractionRequest {
6
6
  type: DXCUserInteraction['type'];
7
7
  title: string;
8
8
  alerts: DXCAlert[];
9
+ submitLabel?: string;
10
+ cancelLabel?: string | null;
9
11
  fields: {
10
12
  [name: string]: DXCInputField;
11
13
  };
@@ -16,3 +18,4 @@ export declare function interactWithUser<T extends DXCUserInteractionRequest>(us
16
18
  export declare function alertUser(userInteraction: BehaviorSubject<DXCUserInteraction | undefined>, title: string, ...alerts: DXCAlert[]): Promise<{}>;
17
19
  export declare function promptForEmail(userInteraction: BehaviorSubject<DXCUserInteraction | undefined>, title: string, emailHint?: string): Promise<string>;
18
20
  export declare function promptForOTP(userInteraction: BehaviorSubject<DXCUserInteraction | undefined>, email: string, alert?: DXCAlert): Promise<string>;
21
+ export declare function confirmLogout(userInteraction: BehaviorSubject<DXCUserInteraction | undefined>, currentUserId: string, numUnsyncedChanges: number): Promise<boolean>;
@@ -0,0 +1,5 @@
1
+ import { DexieCloudDB } from '../db/DexieCloudDB';
2
+ export declare function logout(db: DexieCloudDB): Promise<void>;
3
+ export declare function _logout(db: DexieCloudDB, { deleteUnsyncedData }?: {
4
+ deleteUnsyncedData?: boolean | undefined;
5
+ }): Promise<number>;
@@ -0,0 +1,3 @@
1
+ import { InteropObservable, Observable } from 'rxjs';
2
+ export declare function waitUntil<T>(o: Observable<T> | InteropObservable<T>, // Works with Dexie's liveQuery observables if we'd need that
3
+ predicate: (value: T) => boolean): Promise<T>;
@@ -1,3 +1,3 @@
1
1
  import Dexie from "dexie";
2
2
  import { BehaviorSubject } from "rxjs";
3
- export declare const getCurrentUserEmitter: (x: Dexie) => BehaviorSubject<import("./db/entities/UserLogin").UserLogin>;
3
+ export declare const getCurrentUserEmitter: (x: Dexie) => BehaviorSubject<import("./dexie-cloud-client").UserLogin>;
@@ -5,6 +5,12 @@ export interface UserLogin {
5
5
  claims: {
6
6
  [claimName: string]: any;
7
7
  };
8
+ license?: {
9
+ type: 'demo' | 'eval' | 'prod' | 'client';
10
+ status: 'ok' | 'expired' | 'deactivated';
11
+ validUntil?: Date;
12
+ evalDaysLeft?: number;
13
+ };
8
14
  lastLogin: Date;
9
15
  accessToken?: string;
10
16
  accessTokenExpiration?: Date;
@@ -0,0 +1,3 @@
1
+ import { h } from 'preact';
2
+ import { DXCUserInteraction } from '../types/DXCUserInteraction';
3
+ export declare function LoginDialog({ title, type, alerts, fields, submitLabel, cancelLabel, onCancel, onSubmit, }: DXCUserInteraction): h.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import dexieCloudAddon from './dexie-cloud-client';
2
+ export * from './dexie-cloud-client';
3
+ export default dexieCloudAddon;