@aiao/rxdb 0.0.5 → 0.0.7

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 (187) hide show
  1. package/dist/RxDB.d.ts +118 -21
  2. package/dist/RxDB.d.ts.map +1 -1
  3. package/dist/RxDBError.d.ts.map +1 -1
  4. package/dist/entity/@Entity.d.ts +1 -1
  5. package/dist/entity/@Entity.d.ts.map +1 -1
  6. package/dist/entity/@TreeEntity.d.ts +2 -21
  7. package/dist/entity/@TreeEntity.d.ts.map +1 -1
  8. package/dist/entity/EntityBase.d.ts +59 -11
  9. package/dist/entity/EntityBase.d.ts.map +1 -1
  10. package/dist/entity/EntityManager.d.ts +18 -25
  11. package/dist/entity/EntityManager.d.ts.map +1 -1
  12. package/dist/entity/EntityStatus.d.ts +149 -107
  13. package/dist/entity/EntityStatus.d.ts.map +1 -1
  14. package/dist/entity/EntityStatus.interface.d.ts +59 -0
  15. package/dist/entity/EntityStatus.interface.d.ts.map +1 -0
  16. package/dist/entity/TreeEntityBase.d.ts +32 -5
  17. package/dist/entity/TreeEntityBase.d.ts.map +1 -1
  18. package/dist/entity/entity.interface.d.ts +23 -34
  19. package/dist/entity/entity.interface.d.ts.map +1 -1
  20. package/dist/entity/entity.utils.d.ts +23 -2
  21. package/dist/entity/entity.utils.d.ts.map +1 -1
  22. package/dist/entity/{generate_many_to_many_entity.d.ts → many_to_many_entity.d.ts} +3 -3
  23. package/dist/entity/many_to_many_entity.d.ts.map +1 -0
  24. package/dist/entity/{entity-metadata-options.interface.d.ts → metadata-options.interface.d.ts} +312 -35
  25. package/dist/entity/metadata-options.interface.d.ts.map +1 -0
  26. package/dist/entity/{transition-metadata.d.ts → metadata-transition.d.ts} +3 -3
  27. package/dist/entity/metadata-transition.d.ts.map +1 -0
  28. package/dist/entity/{entity-metadata.interface.d.ts → metadata.interface.d.ts} +8 -2
  29. package/dist/entity/metadata.interface.d.ts.map +1 -0
  30. package/dist/entity/metadata_cascade_default.d.ts +54 -0
  31. package/dist/entity/metadata_cascade_default.d.ts.map +1 -0
  32. package/dist/entity/proxy.d.ts +7 -0
  33. package/dist/entity/proxy.d.ts.map +1 -0
  34. package/dist/entity/{entity_relation_helper.d.ts → relation_helper.d.ts} +2 -2
  35. package/dist/entity/relation_helper.d.ts.map +1 -0
  36. package/dist/entity/tree-entity.interface.d.ts +5 -0
  37. package/dist/entity/tree-entity.interface.d.ts.map +1 -0
  38. package/dist/gateway/RxDBTabsGateway.d.ts +52 -0
  39. package/dist/gateway/RxDBTabsGateway.d.ts.map +1 -0
  40. package/dist/gateway/gateway.interface.d.ts +43 -0
  41. package/dist/gateway/gateway.interface.d.ts.map +1 -0
  42. package/dist/index.d.ts +19 -13
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +6579 -2876
  45. package/dist/query/entity_type_dependencies.d.ts +22 -0
  46. package/dist/query/entity_type_dependencies.d.ts.map +1 -0
  47. package/dist/query/merge-update-basic.d.ts +30 -0
  48. package/dist/query/merge-update-basic.d.ts.map +1 -0
  49. package/dist/query/merge-update-tree.d.ts +86 -0
  50. package/dist/query/merge-update-tree.d.ts.map +1 -0
  51. package/dist/query/merge-update.utils.d.ts +52 -0
  52. package/dist/query/merge-update.utils.d.ts.map +1 -0
  53. package/dist/query/merge_create.d.ts +19 -0
  54. package/dist/query/merge_create.d.ts.map +1 -0
  55. package/dist/query/merge_remove.d.ts +6 -0
  56. package/dist/query/merge_remove.d.ts.map +1 -0
  57. package/dist/query/merge_update.d.ts +24 -0
  58. package/dist/query/merge_update.d.ts.map +1 -0
  59. package/dist/query/need_refresh_create.d.ts +11 -0
  60. package/dist/query/need_refresh_create.d.ts.map +1 -0
  61. package/dist/query/need_refresh_remove.d.ts +6 -0
  62. package/dist/query/need_refresh_remove.d.ts.map +1 -0
  63. package/dist/query/need_refresh_update.d.ts +11 -0
  64. package/dist/query/need_refresh_update.d.ts.map +1 -0
  65. package/dist/query/query-matching.utils.d.ts +60 -0
  66. package/dist/query/query-matching.utils.d.ts.map +1 -0
  67. package/dist/query/query-relation.utils.d.ts +44 -0
  68. package/dist/query/query-relation.utils.d.ts.map +1 -0
  69. package/dist/query/query-rules-builder.d.ts +68 -0
  70. package/dist/query/query-rules-builder.d.ts.map +1 -0
  71. package/dist/query/query-tree.utils.d.ts +54 -0
  72. package/dist/query/query-tree.utils.d.ts.map +1 -0
  73. package/dist/repository/QueryManager.d.ts +69 -0
  74. package/dist/repository/QueryManager.d.ts.map +1 -0
  75. package/dist/repository/QueryManager.interface.d.ts +106 -0
  76. package/dist/repository/QueryManager.interface.d.ts.map +1 -0
  77. package/dist/repository/QueryTask.d.ts +150 -0
  78. package/dist/repository/QueryTask.d.ts.map +1 -0
  79. package/dist/repository/Repository.d.ts +38 -44
  80. package/dist/repository/Repository.d.ts.map +1 -1
  81. package/dist/repository/RepositoryBase.d.ts +8 -8
  82. package/dist/repository/RepositoryBase.d.ts.map +1 -1
  83. package/dist/repository/TreeRepository.d.ts +29 -4
  84. package/dist/repository/TreeRepository.d.ts.map +1 -1
  85. package/dist/repository/fingerprint.utils.d.ts +28 -0
  86. package/dist/repository/fingerprint.utils.d.ts.map +1 -0
  87. package/dist/repository/query-options.interface.d.ts +88 -16
  88. package/dist/repository/query-options.interface.d.ts.map +1 -1
  89. package/dist/repository/query.interface.d.ts +107 -37
  90. package/dist/repository/query.interface.d.ts.map +1 -1
  91. package/dist/repository/relation-query.interface.d.ts +20 -1
  92. package/dist/repository/relation-query.interface.d.ts.map +1 -1
  93. package/dist/repository/repository.interface.d.ts +4 -29
  94. package/dist/repository/repository.interface.d.ts.map +1 -1
  95. package/dist/repository/tree-repository.interface.d.ts +34 -30
  96. package/dist/repository/tree-repository.interface.d.ts.map +1 -1
  97. package/dist/rxdb-adapter.d.ts +100 -16
  98. package/dist/rxdb-adapter.d.ts.map +1 -1
  99. package/dist/rxdb-events.d.ts +335 -66
  100. package/dist/rxdb-events.d.ts.map +1 -1
  101. package/dist/rxdb-plugin.d.ts +2 -2
  102. package/dist/rxdb-plugin.d.ts.map +1 -1
  103. package/dist/rxdb-utils.d.ts +20 -9
  104. package/dist/rxdb-utils.d.ts.map +1 -1
  105. package/dist/rxdb.interface.d.ts +5 -9
  106. package/dist/rxdb.interface.d.ts.map +1 -1
  107. package/dist/rxdb.private.d.ts +7 -36
  108. package/dist/rxdb.private.d.ts.map +1 -1
  109. package/dist/schema/SchemaManager.d.ts +5 -4
  110. package/dist/schema/SchemaManager.d.ts.map +1 -1
  111. package/dist/system/branch.d.ts +124 -7
  112. package/dist/system/branch.d.ts.map +1 -1
  113. package/dist/system/change.d.ts +605 -33
  114. package/dist/system/change.d.ts.map +1 -1
  115. package/dist/system/migration.d.ts +61 -11
  116. package/dist/system/migration.d.ts.map +1 -1
  117. package/dist/system/repository-sync.d.ts +95 -0
  118. package/dist/system/repository-sync.d.ts.map +1 -0
  119. package/dist/system/system.interface.d.ts +25 -0
  120. package/dist/system/system.interface.d.ts.map +1 -0
  121. package/dist/system/types.d.ts +234 -139
  122. package/dist/system/types.d.ts.map +1 -1
  123. package/dist/system/types.local.d.ts +156 -0
  124. package/dist/system/types.local.d.ts.map +1 -0
  125. package/dist/system/types.remote.d.ts +103 -0
  126. package/dist/system/types.remote.d.ts.map +1 -0
  127. package/dist/version/HistoryManager.d.ts +238 -0
  128. package/dist/version/HistoryManager.d.ts.map +1 -0
  129. package/dist/version/LWWConflictResolver.d.ts +41 -0
  130. package/dist/version/LWWConflictResolver.d.ts.map +1 -0
  131. package/dist/version/VersionManager.d.ts +407 -0
  132. package/dist/version/VersionManager.d.ts.map +1 -0
  133. package/dist/version/VersionManager.interface.d.ts +428 -0
  134. package/dist/version/VersionManager.interface.d.ts.map +1 -0
  135. package/dist/version/VersionManager.utils.d.ts +14 -0
  136. package/dist/version/VersionManager.utils.d.ts.map +1 -0
  137. package/dist/version/bulk-sync.d.ts +97 -0
  138. package/dist/version/bulk-sync.d.ts.map +1 -0
  139. package/dist/version/check-repository-updates.d.ts +53 -0
  140. package/dist/version/check-repository-updates.d.ts.map +1 -0
  141. package/dist/version/compact-changes.d.ts +45 -0
  142. package/dist/version/compact-changes.d.ts.map +1 -0
  143. package/dist/version/conflict.d.ts +75 -0
  144. package/dist/version/conflict.d.ts.map +1 -0
  145. package/dist/version/create_branch.d.ts +13 -0
  146. package/dist/version/create_branch.d.ts.map +1 -0
  147. package/dist/version/dependency-graph.d.ts +132 -0
  148. package/dist/version/dependency-graph.d.ts.map +1 -0
  149. package/dist/version/find_switch_branch_step.d.ts +53 -0
  150. package/dist/version/find_switch_branch_step.d.ts.map +1 -0
  151. package/dist/version/get-all-repository-sync-status.d.ts +58 -0
  152. package/dist/version/get-all-repository-sync-status.d.ts.map +1 -0
  153. package/dist/version/get-repository-sync-status.d.ts +74 -0
  154. package/dist/version/get-repository-sync-status.d.ts.map +1 -0
  155. package/dist/version/pull-repository.d.ts +99 -0
  156. package/dist/version/pull-repository.d.ts.map +1 -0
  157. package/dist/version/pull.d.ts +11 -0
  158. package/dist/version/pull.d.ts.map +1 -0
  159. package/dist/version/push-repository.d.ts +93 -0
  160. package/dist/version/push-repository.d.ts.map +1 -0
  161. package/dist/version/push.d.ts +11 -0
  162. package/dist/version/push.d.ts.map +1 -0
  163. package/dist/version/remove_branch.d.ts +8 -0
  164. package/dist/version/remove_branch.d.ts.map +1 -0
  165. package/dist/version/switch_branch_actions.d.ts +17 -0
  166. package/dist/version/switch_branch_actions.d.ts.map +1 -0
  167. package/dist/version/sync-repository.d.ts +57 -0
  168. package/dist/version/sync-repository.d.ts.map +1 -0
  169. package/dist/version/sync-type-utils.d.ts +145 -0
  170. package/dist/version/sync-type-utils.d.ts.map +1 -0
  171. package/dist/version/topological-sort.d.ts +70 -0
  172. package/dist/version/topological-sort.d.ts.map +1 -0
  173. package/dist/version/version.utils.d.ts +4 -0
  174. package/dist/version/version.utils.d.ts.map +1 -0
  175. package/package.json +4 -3
  176. package/README.md +0 -1
  177. package/dist/entity/entity-metadata-options.interface.d.ts.map +0 -1
  178. package/dist/entity/entity-metadata.interface.d.ts.map +0 -1
  179. package/dist/entity/entity_proxy_helper.d.ts +0 -49
  180. package/dist/entity/entity_proxy_helper.d.ts.map +0 -1
  181. package/dist/entity/entity_relation_helper.d.ts.map +0 -1
  182. package/dist/entity/generate_many_to_many_entity.d.ts.map +0 -1
  183. package/dist/entity/transition-metadata.d.ts.map +0 -1
  184. package/dist/repository/query.utils.d.ts +0 -27
  185. package/dist/repository/query.utils.d.ts.map +0 -1
  186. package/dist/system/VersionManager.d.ts +0 -35
  187. package/dist/system/VersionManager.d.ts.map +0 -1
@@ -1,64 +1,80 @@
1
- import { Observable } from 'rxjs';
2
- import { UUID } from '../entity/entity.interface.js';
3
- import { CountOptions, FindAllOptions, FindOneOptions, FindOneOrFailOptions, FindOptions } from '../repository/query-options.interface.js';
4
- import { BooleanRules, DateRules, NumberRules, RuleGroupCustom, StringRules, UUIDRules } from '../repository/query.interface.js';
5
- import { RelationBooleanRules, RelationDateRules, RelationNumberRules, RelationStringRules, RelationUUIDRules } from '../repository/relation-query.interface.js';
6
- import { FindTreeOptions, FindTreeRootOptions } from '../repository/tree-repository.interface.js';
1
+ import { EntityType, UUID } from '../entity/entity.interface.js';
2
+ import { CountOptions, FindAllOptions, FindByCursorOptions, FindOneOptions, FindOneOrFailOptions, FindOptions } from '../repository/query-options.interface.js';
3
+ import { BooleanRules, DateRules, NumberRules, RuleGroupBase, StringRules, UUIDRules } from '../repository/query.interface.js';
4
+ import { RelationBooleanRules, RelationDateRules, RelationExistsRules, RelationNumberRules, RelationStringRules, RelationUUIDRules } from '../repository/relation-query.interface.js';
5
+ import { FindTreeOptions } from '../repository/tree-repository.interface.js';
7
6
  import { RxDBBranch } from './branch.js';
8
7
  import { RxDBChange } from './change.js';
9
8
  import { RxDBMigration } from './migration.js';
9
+ import { RxDBRepositorySync } from './repository-sync.js';
10
10
  /**
11
11
  * rule
12
12
  */
13
- type RxDBMigrationRule = NumberRules<RxDBMigration, 'id'> | StringRules<RxDBMigration, 'name'> | DateRules<RxDBMigration, 'executedAt'>;
13
+ declare type RxDBRepositorySyncRule = StringRules<RxDBRepositorySync, 'id'> | StringRules<RxDBRepositorySync, 'namespace'> | StringRules<RxDBRepositorySync, 'entity'> | StringRules<RxDBRepositorySync, 'syncType'> | NumberRules<RxDBRepositorySync, 'lastPushedChangeId'> | DateRules<RxDBRepositorySync, 'lastPushedAt'> | DateRules<RxDBRepositorySync, 'lastPulledAt'> | NumberRules<RxDBRepositorySync, 'lastPullRemoteChangeId'> | BooleanRules<RxDBRepositorySync, 'enabled'> | DateRules<RxDBRepositorySync, 'createdAt'> | DateRules<RxDBRepositorySync, 'updatedAt'> | StringRules<RxDBRepositorySync, 'branchId'> | RelationExistsRules<'branch', RxDBBranchRuleGroup> | RelationStringRules<'branch.id', string> | RelationBooleanRules<'branch.activated', boolean> | RelationNumberRules<'branch.fromChangeId', number | null> | RelationBooleanRules<'branch.local', boolean> | RelationBooleanRules<'branch.remote', boolean> | RelationDateRules<'branch.createdAt', Date | null> | RelationDateRules<'branch.updatedAt', Date | null> | StringRules<RxDBBranch, 'parentId'> | RelationNumberRules<'branch.changes.id', number> | RelationNumberRules<'branch.changes.remoteId', number | null> | RelationStringRules<'branch.changes.type', string> | RelationUUIDRules<'branch.changes.transactionId', UUID | null> | RelationStringRules<'branch.changes.namespace', string> | RelationStringRules<'branch.changes.entity', string> | RelationUUIDRules<'branch.changes.entityId', UUID> | RelationDateRules<'branch.changes.createdAt', Date> | RelationDateRules<'branch.changes.updatedAt', Date> | RelationDateRules<'branch.changes.revertChangedAt', Date | null> | RelationNumberRules<'branch.changes.revertChangeId', number | null> | RelationDateRules<'branch.changes.redoInvalidatedAt', Date | null> | StringRules<RxDBChange, 'branchId'> | RelationStringRules<'branch.children.id', string> | RelationBooleanRules<'branch.children.activated', boolean> | RelationNumberRules<'branch.children.fromChangeId', number | null> | RelationBooleanRules<'branch.children.local', boolean> | RelationBooleanRules<'branch.children.remote', boolean> | RelationDateRules<'branch.children.createdAt', Date | null> | RelationDateRules<'branch.children.updatedAt', Date | null> | RelationStringRules<'branch.parent.id', string> | RelationBooleanRules<'branch.parent.activated', boolean> | RelationNumberRules<'branch.parent.fromChangeId', number | null> | RelationBooleanRules<'branch.parent.local', boolean> | RelationBooleanRules<'branch.parent.remote', boolean> | RelationDateRules<'branch.parent.createdAt', Date | null> | RelationDateRules<'branch.parent.updatedAt', Date | null>;
14
14
  /**
15
- * RuleGroupCustom
15
+ * RuleGroupBase
16
16
  */
17
- type RxDBMigrationRuleGroup = RuleGroupCustom<typeof RxDBMigration, 'id' | 'name' | 'executedAt', RxDBMigrationRule>;
17
+ export declare type RxDBRepositorySyncRuleGroup = RuleGroupBase<typeof RxDBRepositorySync, 'id' | 'namespace' | 'entity' | 'syncType' | 'lastPushedChangeId' | 'lastPushedAt' | 'lastPulledAt' | 'lastPullRemoteChangeId' | 'enabled' | 'createdAt' | 'updatedAt' | 'branchId' | 'branch' | 'branch.id' | 'branch.activated' | 'branch.fromChangeId' | 'branch.local' | 'branch.remote' | 'branch.createdAt' | 'branch.updatedAt' | 'parentId' | 'branch.changes.id' | 'branch.changes.remoteId' | 'branch.changes.type' | 'branch.changes.transactionId' | 'branch.changes.namespace' | 'branch.changes.entity' | 'branch.changes.entityId' | 'branch.changes.createdAt' | 'branch.changes.updatedAt' | 'branch.changes.revertChangedAt' | 'branch.changes.revertChangeId' | 'branch.changes.redoInvalidatedAt' | 'branchId' | 'branch.children.id' | 'branch.children.activated' | 'branch.children.fromChangeId' | 'branch.children.local' | 'branch.children.remote' | 'branch.children.createdAt' | 'branch.children.updatedAt' | 'parentId' | 'branch.parent.id' | 'branch.parent.activated' | 'branch.parent.fromChangeId' | 'branch.parent.local' | 'branch.parent.remote' | 'branch.parent.createdAt' | 'branch.parent.updatedAt' | 'parentId', RxDBRepositorySyncRule>;
18
18
  /**
19
19
  * OrderByField
20
20
  */
21
- type RxDBMigrationOrderByField = 'id' | 'name' | 'executedAt';
21
+ export declare type RxDBRepositorySyncOrderByField = 'id' | 'namespace' | 'entity' | 'syncType' | 'lastPushedChangeId' | 'lastPushedAt' | 'lastPulledAt' | 'lastPullRemoteChangeId' | 'enabled' | 'createdAt' | 'updatedAt';
22
22
  /**
23
23
  * rule
24
24
  */
25
- type RxDBChangeRule = NumberRules<RxDBChange, 'id'> | StringRules<RxDBChange, 'type'> | UUIDRules<RxDBChange, 'transactionId'> | StringRules<RxDBChange, 'namespace'> | StringRules<RxDBChange, 'entity'> | UUIDRules<RxDBChange, 'entityId'> | DateRules<RxDBChange, 'createdAt'> | DateRules<RxDBChange, 'updatedAt'> | DateRules<RxDBChange, 'revertChangedAt'> | NumberRules<RxDBChange, 'revertChangeId'> | UUIDRules<RxDBChange, 'parentId'> | UUIDRules<RxDBChange, 'branchId'> | RelationNumberRules<'children.id', any> | RelationStringRules<'children.type', string> | RelationUUIDRules<'children.transactionId', UUID | null> | RelationStringRules<'children.namespace', string | null> | RelationStringRules<'children.entity', string | null> | RelationUUIDRules<'children.entityId', UUID | null> | RelationDateRules<'children.createdAt', Date | null> | RelationDateRules<'children.updatedAt', Date | null> | RelationDateRules<'children.revertChangedAt', Date | null> | RelationNumberRules<'children.revertChangeId', any | null> | RelationNumberRules<'parent.id', any> | RelationStringRules<'parent.type', string> | RelationUUIDRules<'parent.transactionId', UUID | null> | RelationStringRules<'parent.namespace', string | null> | RelationStringRules<'parent.entity', string | null> | RelationUUIDRules<'parent.entityId', UUID | null> | RelationDateRules<'parent.createdAt', Date | null> | RelationDateRules<'parent.updatedAt', Date | null> | RelationDateRules<'parent.revertChangedAt', Date | null> | RelationNumberRules<'parent.revertChangeId', any | null> | RelationStringRules<'branch.id', string> | RelationBooleanRules<'branch.activated', boolean> | RelationBooleanRules<'branch.local', boolean> | RelationBooleanRules<'branch.remote', boolean>;
25
+ declare type RxDBMigrationRule = NumberRules<RxDBMigration, 'id'> | StringRules<RxDBMigration, 'name'> | DateRules<RxDBMigration, 'executedAt'>;
26
26
  /**
27
- * RuleGroupCustom
27
+ * RuleGroupBase
28
28
  */
29
- type RxDBChangeRuleGroup = RuleGroupCustom<typeof RxDBChange, 'id' | 'type' | 'transactionId' | 'namespace' | 'entity' | 'entityId' | 'createdAt' | 'updatedAt' | 'revertChangedAt' | 'revertChangeId' | 'parentId' | 'branchId' | 'children.id' | 'children.type' | 'children.transactionId' | 'children.namespace' | 'children.entity' | 'children.entityId' | 'children.createdAt' | 'children.updatedAt' | 'children.revertChangedAt' | 'children.revertChangeId' | 'parentId' | 'branchId' | 'parent.id' | 'parent.type' | 'parent.transactionId' | 'parent.namespace' | 'parent.entity' | 'parent.entityId' | 'parent.createdAt' | 'parent.updatedAt' | 'parent.revertChangedAt' | 'parent.revertChangeId' | 'parentId' | 'branchId' | 'branch.id' | 'branch.activated' | 'branch.local' | 'branch.remote', RxDBChangeRule>;
29
+ export declare type RxDBMigrationRuleGroup = RuleGroupBase<typeof RxDBMigration, 'id' | 'name' | 'executedAt', RxDBMigrationRule>;
30
30
  /**
31
31
  * OrderByField
32
32
  */
33
- declare type RxDBChangeOrderByField = 'id' | 'type' | 'transactionId' | 'namespace' | 'entity' | 'entityId' | 'inversePatch' | 'patch' | 'createdAt' | 'updatedAt' | 'revertChangedAt' | 'revertChangeId';
33
+ export declare type RxDBMigrationOrderByField = 'id' | 'name' | 'executedAt';
34
34
  /**
35
- * TreeRule
35
+ * rule
36
36
  */
37
- declare type RxDBChangeTreeRule = RelationStringRules<'children.type', string> | RelationUUIDRules<'children.transactionId', UUID | null> | RelationStringRules<'children.namespace', string | null> | RelationStringRules<'children.entity', string | null> | RelationUUIDRules<'children.entityId', UUID | null> | RelationDateRules<'children.createdAt', Date | null> | RelationDateRules<'children.updatedAt', Date | null> | RelationDateRules<'children.revertChangedAt', Date | null> | RelationNumberRules<'children.revertChangeId', any | null>;
37
+ declare type RxDBChangeRule = NumberRules<RxDBChange, 'id'> | NumberRules<RxDBChange, 'remoteId'> | StringRules<RxDBChange, 'type'> | UUIDRules<RxDBChange, 'transactionId'> | StringRules<RxDBChange, 'namespace'> | StringRules<RxDBChange, 'entity'> | UUIDRules<RxDBChange, 'entityId'> | DateRules<RxDBChange, 'createdAt'> | DateRules<RxDBChange, 'updatedAt'> | DateRules<RxDBChange, 'revertChangedAt'> | NumberRules<RxDBChange, 'revertChangeId'> | DateRules<RxDBChange, 'redoInvalidatedAt'> | StringRules<RxDBChange, 'branchId'> | RelationExistsRules<'branch', RxDBBranchRuleGroup> | RelationStringRules<'branch.id', string> | RelationBooleanRules<'branch.activated', boolean> | RelationNumberRules<'branch.fromChangeId', number | null> | RelationBooleanRules<'branch.local', boolean> | RelationBooleanRules<'branch.remote', boolean> | RelationDateRules<'branch.createdAt', Date | null> | RelationDateRules<'branch.updatedAt', Date | null> | StringRules<RxDBBranch, 'parentId'> | RelationStringRules<'branch.repositorySyncs.id', string> | RelationStringRules<'branch.repositorySyncs.namespace', string> | RelationStringRules<'branch.repositorySyncs.entity', string> | RelationStringRules<'branch.repositorySyncs.syncType', string> | RelationNumberRules<'branch.repositorySyncs.lastPushedChangeId', number | null> | RelationDateRules<'branch.repositorySyncs.lastPushedAt', Date | null> | RelationDateRules<'branch.repositorySyncs.lastPulledAt', Date | null> | RelationNumberRules<'branch.repositorySyncs.lastPullRemoteChangeId', number | null> | RelationBooleanRules<'branch.repositorySyncs.enabled', boolean> | RelationDateRules<'branch.repositorySyncs.createdAt', Date | null> | RelationDateRules<'branch.repositorySyncs.updatedAt', Date | null> | StringRules<RxDBRepositorySync, 'branchId'> | RelationStringRules<'branch.children.id', string> | RelationBooleanRules<'branch.children.activated', boolean> | RelationNumberRules<'branch.children.fromChangeId', number | null> | RelationBooleanRules<'branch.children.local', boolean> | RelationBooleanRules<'branch.children.remote', boolean> | RelationDateRules<'branch.children.createdAt', Date | null> | RelationDateRules<'branch.children.updatedAt', Date | null> | RelationStringRules<'branch.parent.id', string> | RelationBooleanRules<'branch.parent.activated', boolean> | RelationNumberRules<'branch.parent.fromChangeId', number | null> | RelationBooleanRules<'branch.parent.local', boolean> | RelationBooleanRules<'branch.parent.remote', boolean> | RelationDateRules<'branch.parent.createdAt', Date | null> | RelationDateRules<'branch.parent.updatedAt', Date | null>;
38
38
  /**
39
- * TreeRuleGroup
39
+ * RuleGroupBase
40
40
  */
41
- export declare type RxDBChangeTreeRuleGroup = RuleGroupCustom<typeof RxDBChange, 'children.type' | 'children.transactionId' | 'children.namespace' | 'children.entity' | 'children.entityId' | 'children.createdAt' | 'children.updatedAt' | 'children.revertChangedAt' | 'children.revertChangeId', RxDBChangeTreeRule>;
41
+ export declare type RxDBChangeRuleGroup = RuleGroupBase<typeof RxDBChange, 'id' | 'remoteId' | 'type' | 'transactionId' | 'namespace' | 'entity' | 'entityId' | 'createdAt' | 'updatedAt' | 'revertChangedAt' | 'revertChangeId' | 'redoInvalidatedAt' | 'branchId' | 'branch' | 'branch.id' | 'branch.activated' | 'branch.fromChangeId' | 'branch.local' | 'branch.remote' | 'branch.createdAt' | 'branch.updatedAt' | 'parentId' | 'branch.repositorySyncs.id' | 'branch.repositorySyncs.namespace' | 'branch.repositorySyncs.entity' | 'branch.repositorySyncs.syncType' | 'branch.repositorySyncs.lastPushedChangeId' | 'branch.repositorySyncs.lastPushedAt' | 'branch.repositorySyncs.lastPulledAt' | 'branch.repositorySyncs.lastPullRemoteChangeId' | 'branch.repositorySyncs.enabled' | 'branch.repositorySyncs.createdAt' | 'branch.repositorySyncs.updatedAt' | 'branchId' | 'branch.children.id' | 'branch.children.activated' | 'branch.children.fromChangeId' | 'branch.children.local' | 'branch.children.remote' | 'branch.children.createdAt' | 'branch.children.updatedAt' | 'parentId' | 'branch.parent.id' | 'branch.parent.activated' | 'branch.parent.fromChangeId' | 'branch.parent.local' | 'branch.parent.remote' | 'branch.parent.createdAt' | 'branch.parent.updatedAt' | 'parentId', RxDBChangeRule>;
42
+ /**
43
+ * OrderByField
44
+ */
45
+ export declare type RxDBChangeOrderByField = 'id' | 'remoteId' | 'type' | 'transactionId' | 'namespace' | 'entity' | 'entityId' | 'inversePatch' | 'patch' | 'createdAt' | 'updatedAt' | 'revertChangedAt' | 'revertChangeId' | 'redoInvalidatedAt';
42
46
  /**
43
47
  * rule
44
48
  */
45
- declare type RxDBBranchRule = StringRules<RxDBBranch, 'id'> | BooleanRules<RxDBBranch, 'activated'> | BooleanRules<RxDBBranch, 'local'> | BooleanRules<RxDBBranch, 'remote'> | RelationNumberRules<'changes.id', any> | RelationStringRules<'changes.type', string> | RelationUUIDRules<'changes.transactionId', UUID | null> | RelationStringRules<'changes.namespace', string | null> | RelationStringRules<'changes.entity', string | null> | RelationUUIDRules<'changes.entityId', UUID | null> | RelationDateRules<'changes.createdAt', Date | null> | RelationDateRules<'changes.updatedAt', Date | null> | RelationDateRules<'changes.revertChangedAt', Date | null> | RelationNumberRules<'changes.revertChangeId', any | null> | UUIDRules<RxDBChange, 'parentId'> | UUIDRules<RxDBChange, 'branchId'> | RelationNumberRules<'changes.children.id', any> | RelationStringRules<'changes.children.type', string> | RelationUUIDRules<'changes.children.transactionId', UUID | null> | RelationStringRules<'changes.children.namespace', string | null> | RelationStringRules<'changes.children.entity', string | null> | RelationUUIDRules<'changes.children.entityId', UUID | null> | RelationDateRules<'changes.children.createdAt', Date | null> | RelationDateRules<'changes.children.updatedAt', Date | null> | RelationDateRules<'changes.children.revertChangedAt', Date | null> | RelationNumberRules<'changes.children.revertChangeId', any | null> | RelationNumberRules<'changes.parent.id', any> | RelationStringRules<'changes.parent.type', string> | RelationUUIDRules<'changes.parent.transactionId', UUID | null> | RelationStringRules<'changes.parent.namespace', string | null> | RelationStringRules<'changes.parent.entity', string | null> | RelationUUIDRules<'changes.parent.entityId', UUID | null> | RelationDateRules<'changes.parent.createdAt', Date | null> | RelationDateRules<'changes.parent.updatedAt', Date | null> | RelationDateRules<'changes.parent.revertChangedAt', Date | null> | RelationNumberRules<'changes.parent.revertChangeId', any | null>;
49
+ declare type RxDBBranchRule = StringRules<RxDBBranch, 'id'> | BooleanRules<RxDBBranch, 'activated'> | NumberRules<RxDBBranch, 'fromChangeId'> | BooleanRules<RxDBBranch, 'local'> | BooleanRules<RxDBBranch, 'remote'> | DateRules<RxDBBranch, 'createdAt'> | DateRules<RxDBBranch, 'updatedAt'> | StringRules<RxDBBranch, 'parentId'> | RelationExistsRules<'changes', RxDBChangeRuleGroup> | RelationNumberRules<'changes.id', number> | RelationNumberRules<'changes.remoteId', number | null> | RelationStringRules<'changes.type', string> | RelationUUIDRules<'changes.transactionId', UUID | null> | RelationStringRules<'changes.namespace', string> | RelationStringRules<'changes.entity', string> | RelationUUIDRules<'changes.entityId', UUID> | RelationDateRules<'changes.createdAt', Date> | RelationDateRules<'changes.updatedAt', Date> | RelationDateRules<'changes.revertChangedAt', Date | null> | RelationNumberRules<'changes.revertChangeId', number | null> | RelationDateRules<'changes.redoInvalidatedAt', Date | null> | StringRules<RxDBChange, 'branchId'> | RelationExistsRules<'repositorySyncs', RxDBRepositorySyncRuleGroup> | RelationStringRules<'repositorySyncs.id', string> | RelationStringRules<'repositorySyncs.namespace', string> | RelationStringRules<'repositorySyncs.entity', string> | RelationStringRules<'repositorySyncs.syncType', string> | RelationNumberRules<'repositorySyncs.lastPushedChangeId', number | null> | RelationDateRules<'repositorySyncs.lastPushedAt', Date | null> | RelationDateRules<'repositorySyncs.lastPulledAt', Date | null> | RelationNumberRules<'repositorySyncs.lastPullRemoteChangeId', number | null> | RelationBooleanRules<'repositorySyncs.enabled', boolean> | RelationDateRules<'repositorySyncs.createdAt', Date | null> | RelationDateRules<'repositorySyncs.updatedAt', Date | null> | StringRules<RxDBRepositorySync, 'branchId'> | RelationExistsRules<'children', RxDBBranchRuleGroup> | RelationStringRules<'children.id', string> | RelationBooleanRules<'children.activated', boolean> | RelationNumberRules<'children.fromChangeId', number | null> | RelationBooleanRules<'children.local', boolean> | RelationBooleanRules<'children.remote', boolean> | RelationDateRules<'children.createdAt', Date | null> | RelationDateRules<'children.updatedAt', Date | null> | RelationExistsRules<'parent', RxDBBranchRuleGroup> | RelationStringRules<'parent.id', string> | RelationBooleanRules<'parent.activated', boolean> | RelationNumberRules<'parent.fromChangeId', number | null> | RelationBooleanRules<'parent.local', boolean> | RelationBooleanRules<'parent.remote', boolean> | RelationDateRules<'parent.createdAt', Date | null> | RelationDateRules<'parent.updatedAt', Date | null>;
46
50
  /**
47
- * RuleGroupCustom
51
+ * RuleGroupBase
48
52
  */
49
- export declare type RxDBBranchRuleGroup = RuleGroupCustom<typeof RxDBBranch, 'id' | 'activated' | 'local' | 'remote' | 'changes.id' | 'changes.type' | 'changes.transactionId' | 'changes.namespace' | 'changes.entity' | 'changes.entityId' | 'changes.createdAt' | 'changes.updatedAt' | 'changes.revertChangedAt' | 'changes.revertChangeId' | 'parentId' | 'branchId' | 'changes.children.id' | 'changes.children.type' | 'changes.children.transactionId' | 'changes.children.namespace' | 'changes.children.entity' | 'changes.children.entityId' | 'changes.children.createdAt' | 'changes.children.updatedAt' | 'changes.children.revertChangedAt' | 'changes.children.revertChangeId' | 'parentId' | 'branchId' | 'changes.parent.id' | 'changes.parent.type' | 'changes.parent.transactionId' | 'changes.parent.namespace' | 'changes.parent.entity' | 'changes.parent.entityId' | 'changes.parent.createdAt' | 'changes.parent.updatedAt' | 'changes.parent.revertChangedAt' | 'changes.parent.revertChangeId' | 'parentId' | 'branchId', RxDBBranchRule>;
53
+ export declare type RxDBBranchRuleGroup = RuleGroupBase<typeof RxDBBranch, 'id' | 'activated' | 'fromChangeId' | 'local' | 'remote' | 'createdAt' | 'updatedAt' | 'parentId' | 'changes' | 'changes.id' | 'changes.remoteId' | 'changes.type' | 'changes.transactionId' | 'changes.namespace' | 'changes.entity' | 'changes.entityId' | 'changes.createdAt' | 'changes.updatedAt' | 'changes.revertChangedAt' | 'changes.revertChangeId' | 'changes.redoInvalidatedAt' | 'branchId' | 'repositorySyncs' | 'repositorySyncs.id' | 'repositorySyncs.namespace' | 'repositorySyncs.entity' | 'repositorySyncs.syncType' | 'repositorySyncs.lastPushedChangeId' | 'repositorySyncs.lastPushedAt' | 'repositorySyncs.lastPulledAt' | 'repositorySyncs.lastPullRemoteChangeId' | 'repositorySyncs.enabled' | 'repositorySyncs.createdAt' | 'repositorySyncs.updatedAt' | 'branchId' | 'children' | 'children.id' | 'children.activated' | 'children.fromChangeId' | 'children.local' | 'children.remote' | 'children.createdAt' | 'children.updatedAt' | 'parentId' | 'parent' | 'parent.id' | 'parent.activated' | 'parent.fromChangeId' | 'parent.local' | 'parent.remote' | 'parent.createdAt' | 'parent.updatedAt' | 'parentId', RxDBBranchRule>;
50
54
  /**
51
55
  * OrderByField
52
56
  */
53
- type RxDBBranchOrderByField = 'id' | 'activated' | 'local' | 'remote';
57
+ export declare type RxDBBranchOrderByField = 'id' | 'activated' | 'fromChangeId' | 'local' | 'remote' | 'createdAt' | 'updatedAt';
58
+ /**
59
+ * TreeRule
60
+ */
61
+ declare type RxDBBranchTreeRule = RelationBooleanRules<'children.activated', boolean> | RelationNumberRules<'children.fromChangeId', number | null> | RelationBooleanRules<'children.local', boolean> | RelationBooleanRules<'children.remote', boolean> | RelationDateRules<'children.createdAt', Date | null> | RelationDateRules<'children.updatedAt', Date | null>;
62
+ /**
63
+ * TreeRuleGroup
64
+ */
65
+ export declare type RxDBBranchTreeRuleGroup = RuleGroupBase<typeof RxDBBranch, 'children.activated' | 'children.fromChangeId' | 'children.local' | 'children.remote' | 'children.createdAt' | 'children.updatedAt', RxDBBranchTreeRule>;
54
66
  /**
55
67
  * rxdb
56
68
  */
57
- declare module '@aiao/rxdb' {
69
+ declare module '../../packages/rxdb/src/index.ts' {
58
70
  /**
59
71
  * RxDB
60
72
  */
61
73
  interface RxDB {
74
+ /**
75
+ * RxDBRepositorySync
76
+ */
77
+ RxDBRepositorySync: typeof RxDBRepositorySync;
62
78
  /**
63
79
  * RxDBMigration
64
80
  */
@@ -76,260 +92,339 @@ declare module '@aiao/rxdb' {
76
92
  /**
77
93
  * 静态类型
78
94
  */
79
- export interface RxDBMigrationStaticTypes {
95
+ export interface RxDBRepositorySyncStaticTypes {
80
96
  /**
81
97
  * id 类型
82
98
  */
83
- idType: number;
99
+ idType: string;
84
100
  /**
85
101
  * 查询选项
86
102
  */
87
- getOptions: number;
103
+ getOptions: string;
88
104
  /**
89
105
  * 查询选项
90
106
  */
91
- findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
107
+ findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBRepositorySync, RxDBRepositorySyncRuleGroup, RxDBRepositorySyncOrderByField>;
92
108
  /**
93
109
  * 查询选项
94
110
  */
95
- findOptions: FindOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
111
+ findOptions: FindOptions<typeof RxDBRepositorySync, RxDBRepositorySyncRuleGroup, RxDBRepositorySyncOrderByField>;
96
112
  /**
97
113
  * 查询选项
98
114
  */
99
- findOneOptions: FindOneOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
115
+ findOneOptions: FindOneOptions<typeof RxDBRepositorySync, RxDBRepositorySyncRuleGroup, RxDBRepositorySyncOrderByField>;
100
116
  /**
101
117
  * 查询选项
102
118
  */
103
- findAllOptions: FindAllOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
119
+ findAllOptions: FindAllOptions<typeof RxDBRepositorySync, RxDBRepositorySyncRuleGroup, RxDBRepositorySyncOrderByField>;
104
120
  /**
105
121
  * 查询选项
106
122
  */
107
- countOptions: CountOptions<typeof RxDBMigration, RxDBMigrationRuleGroup>;
123
+ findByCursorOptions: FindByCursorOptions<typeof RxDBRepositorySync, RxDBRepositorySyncRuleGroup, RxDBRepositorySyncOrderByField>;
124
+ /**
125
+ * 查询选项
126
+ */
127
+ countOptions: CountOptions<typeof RxDBRepositorySync, RxDBRepositorySyncRuleGroup>;
108
128
  }
109
129
  /**
110
- * 静态类型
130
+ * 初始化数据
111
131
  */
112
- export interface RxDBChangeStaticTypes {
132
+ export interface RxDBRepositorySyncInitData {
113
133
  /**
114
- * id 类型
134
+ * id
115
135
  */
116
- idType: number;
136
+ id?: string;
117
137
  /**
118
- * 查询选项
138
+ * namespace
119
139
  */
120
- getOptions: number;
140
+ namespace?: string;
121
141
  /**
122
- * 查询选项
142
+ * entity
123
143
  */
124
- findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
144
+ entity?: string;
125
145
  /**
126
- * 查询选项
146
+ * syncType
147
+ * @default 'none'
127
148
  */
128
- findOptions: FindOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
149
+ syncType?: 'full' | 'remote' | 'local' | 'none';
129
150
  /**
130
- * 查询选项
151
+ * lastPushedChangeId
131
152
  */
132
- findOneOptions: FindOneOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
153
+ lastPushedChangeId?: number | null;
133
154
  /**
134
- * 查询选项
155
+ * lastPushedAt
135
156
  */
136
- findAllOptions: FindAllOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
157
+ lastPushedAt?: Date | null;
137
158
  /**
138
- * 查询选项
159
+ * lastPulledAt
139
160
  */
140
- countOptions: CountOptions<typeof RxDBChange, RxDBChangeRuleGroup>;
161
+ lastPulledAt?: Date | null;
141
162
  /**
142
- * 查询的实体
163
+ * lastPullRemoteChangeId
143
164
  */
144
- entity: RxDBChange;
165
+ lastPullRemoteChangeId?: number | null;
166
+ /**
167
+ * enabled
168
+ */
169
+ enabled?: boolean;
170
+ /**
171
+ * createdAt
172
+ * @default new Date()
173
+ */
174
+ createdAt?: Date | null;
175
+ /**
176
+ * updatedAt
177
+ * @default new Date()
178
+ */
179
+ updatedAt?: Date | null;
180
+ }
181
+ /**
182
+ * 静态类型
183
+ */
184
+ export interface RxDBMigrationStaticTypes {
185
+ /**
186
+ * id 类型
187
+ */
188
+ idType: number;
145
189
  /**
146
190
  * 查询选项
147
191
  */
148
- findRootOptions: FindTreeRootOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>;
192
+ getOptions: number;
149
193
  /**
150
194
  * 查询选项
151
195
  */
152
- countRootOptions: FindTreeRootOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>;
196
+ findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
153
197
  /**
154
198
  * 查询选项
155
199
  */
156
- findDescendantsOptions: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>;
200
+ findOptions: FindOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
157
201
  /**
158
202
  * 查询选项
159
203
  */
160
- countDescendantsOptions: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>;
204
+ findOneOptions: FindOneOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
205
+ /**
206
+ * 查询选项
207
+ */
208
+ findAllOptions: FindAllOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
161
209
  /**
162
210
  * 查询选项
163
211
  */
164
- findAncestorsOptions: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>;
212
+ findByCursorOptions: FindByCursorOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>;
165
213
  /**
166
214
  * 查询选项
167
215
  */
168
- countAncestorsOptions: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>;
216
+ countOptions: CountOptions<typeof RxDBMigration, RxDBMigrationRuleGroup>;
217
+ }
218
+ /**
219
+ * 初始化数据
220
+ */
221
+ export interface RxDBMigrationInitData {
222
+ /**
223
+ * id
224
+ */
225
+ id?: number;
226
+ /**
227
+ * name
228
+ */
229
+ name?: string;
230
+ /**
231
+ * executedAt
232
+ * @default new Date()
233
+ */
234
+ executedAt?: Date;
169
235
  }
170
236
  /**
171
237
  * 静态类型
172
238
  */
173
- export interface RxDBBranchStaticTypes {
239
+ export interface RxDBChangeStaticTypes {
174
240
  /**
175
241
  * id 类型
176
242
  */
177
- idType: string;
243
+ idType: number;
178
244
  /**
179
245
  * 查询选项
180
246
  */
181
- getOptions: string;
247
+ getOptions: number;
182
248
  /**
183
249
  * 查询选项
184
250
  */
185
- findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
251
+ findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
186
252
  /**
187
253
  * 查询选项
188
254
  */
189
- findOptions: FindOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
255
+ findOptions: FindOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
190
256
  /**
191
257
  * 查询选项
192
258
  */
193
- findOneOptions: FindOneOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
259
+ findOneOptions: FindOneOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
194
260
  /**
195
261
  * 查询选项
196
262
  */
197
- findAllOptions: FindAllOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
263
+ findAllOptions: FindAllOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
198
264
  /**
199
265
  * 查询选项
200
266
  */
201
- countOptions: CountOptions<typeof RxDBBranch, RxDBBranchRuleGroup>;
267
+ findByCursorOptions: FindByCursorOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>;
268
+ /**
269
+ * 查询选项
270
+ */
271
+ countOptions: CountOptions<typeof RxDBChange, RxDBChangeRuleGroup>;
202
272
  }
203
273
  /**
204
- * RxDBMigration
274
+ * 初始化数据
205
275
  */
206
- export interface RxDBMigrationRepository {
207
- count(options: CountOptions<typeof RxDBMigration, RxDBMigrationRuleGroup>): Observable<number>;
276
+ export interface RxDBChangeInitData {
277
+ /**
278
+ * id
279
+ */
280
+ id?: number;
281
+ /**
282
+ * remoteId
283
+ */
284
+ remoteId?: number | null;
285
+ /**
286
+ * type
287
+ */
288
+ type?: string;
289
+ /**
290
+ * transactionId
291
+ */
292
+ transactionId?: UUID | null;
293
+ /**
294
+ * namespace
295
+ */
296
+ namespace?: string;
297
+ /**
298
+ * entity
299
+ */
300
+ entity?: string;
301
+ /**
302
+ * entityId
303
+ */
304
+ entityId?: UUID;
305
+ /**
306
+ * inversePatch
307
+ */
308
+ inversePatch?: Record<string, any> | null;
309
+ /**
310
+ * patch
311
+ */
312
+ patch?: Record<string, any> | null;
208
313
  /**
209
- * find 查询
210
- * @param options 查询选项
314
+ * createdAt
315
+ * @default new Date()
211
316
  */
212
- find(options: FindOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
317
+ createdAt?: Date;
213
318
  /**
214
- * findAll 查询
215
- * @param options 查询选项
319
+ * updatedAt
320
+ * @default new Date()
216
321
  */
217
- findAll(options: FindAllOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
322
+ updatedAt?: Date;
218
323
  /**
219
- * findOne 查询
220
- * @param options 查询选项
324
+ * revertChangedAt
221
325
  */
222
- findOne(options: FindOneOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>): Observable<RxDBMigration | undefined>;
326
+ revertChangedAt?: Date | null;
223
327
  /**
224
- * findOneOrFail 查询
225
- * @param options 查询选项
328
+ * revertChangeId
226
329
  */
227
- findOneOrFail(options: FindOneOrFailOptions<typeof RxDBMigration, RxDBMigrationRuleGroup, RxDBMigrationOrderByField>): Observable<RxDBMigration>;
330
+ revertChangeId?: number | null;
228
331
  /**
229
- * get 查询
230
- * @param options 查询选项
332
+ * redoInvalidatedAt
231
333
  */
232
- get(options: number): Observable<RxDBMigration>;
334
+ redoInvalidatedAt?: Date | null;
233
335
  }
234
336
  /**
235
- * RxDBChange
337
+ * 静态类型
236
338
  */
237
- export interface RxDBChangeRepository {
339
+ export interface RxDBBranchStaticTypes {
238
340
  /**
239
- * count 查询
240
- * @param options 查询选项
341
+ * id 类型
241
342
  */
242
- count(options: CountOptions<typeof RxDBChange, RxDBChangeRuleGroup>): Observable<number>;
343
+ idType: string;
243
344
  /**
244
- * 查询祖先实体数量
245
- * @param options 查询选项
345
+ * 查询选项
246
346
  */
247
- countAncestors(options?: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>): Observable<number>;
347
+ getOptions: string;
248
348
  /**
249
- * 查询子孙实体数量
250
- * @param options 查询选项
349
+ * 查询选项
251
350
  */
252
- countDescendants(options?: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>): Observable<number>;
351
+ findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
253
352
  /**
254
- * 查询子孙实体数量
255
- * @param options 查询选项
353
+ * 查询选项
256
354
  */
257
- countRoot(options?: FindTreeRootOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>): Observable<number>;
355
+ findOptions: FindOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
258
356
  /**
259
- * find 查询
260
- * @param options 查询选项
357
+ * 查询选项
261
358
  */
262
- find(options: FindOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>): Observable<RxDBChange[]>;
359
+ findOneOptions: FindOneOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
263
360
  /**
264
- * findAll 查询
265
- * @param options 查询选项
361
+ * 查询选项
266
362
  */
267
- findAll(options: FindAllOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>): Observable<RxDBChange[]>;
363
+ findAllOptions: FindAllOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
268
364
  /**
269
- * 查询祖先实体
270
- * @param options 查询选项
365
+ * 查询选项
271
366
  */
272
- findAncestors(options?: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>): Observable<RxDBChange[]>;
367
+ findByCursorOptions: FindByCursorOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>;
273
368
  /**
274
- * 查询子孙实体
275
- * @param options 查询选项
369
+ * 查询选项
276
370
  */
277
- findDescendants(options?: FindTreeOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>): Observable<RxDBChange[]>;
371
+ countOptions: CountOptions<typeof RxDBBranch, RxDBBranchRuleGroup>;
278
372
  /**
279
- * findOne 查询
280
- * @param options 查询选项
373
+ * 查询的实体
281
374
  */
282
- findOne(options: FindOneOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>): Observable<RxDBChange | undefined>;
375
+ entity: RxDBBranch;
283
376
  /**
284
- * findOneOrFail 查询
285
- * @param options 查询选项
377
+ * 查询选项
378
+ */
379
+ findDescendantsOptions: FindTreeOptions<typeof RxDBBranch, RxDBBranchTreeRuleGroup>;
380
+ /**
381
+ * 查询选项
286
382
  */
287
- findOneOrFail(options: FindOneOrFailOptions<typeof RxDBChange, RxDBChangeRuleGroup, RxDBChangeOrderByField>): Observable<RxDBChange>;
383
+ countDescendantsOptions: FindTreeOptions<typeof RxDBBranch, RxDBBranchTreeRuleGroup>;
288
384
  /**
289
- * 查询子孙实体
290
- * @param options 查询选项
385
+ * 查询选项
291
386
  */
292
- findRoot(options?: FindTreeRootOptions<typeof RxDBChange, RxDBChangeTreeRuleGroup>): Observable<RxDBChange[]>;
387
+ findAncestorsOptions: FindTreeOptions<typeof RxDBBranch, RxDBBranchTreeRuleGroup>;
293
388
  /**
294
- * get 查询
295
- * @param options 查询选项
389
+ * 查询选项
296
390
  */
297
- get(options: number): Observable<RxDBChange>;
391
+ countAncestorsOptions: FindTreeOptions<typeof RxDBBranch, RxDBBranchTreeRuleGroup>;
298
392
  }
299
393
  /**
300
- * RxDBBranch
394
+ * 初始化数据
301
395
  */
302
- export interface RxDBBranchRepository {
396
+ export interface RxDBBranchInitData {
397
+ /**
398
+ * id
399
+ */
400
+ id?: string;
303
401
  /**
304
- * count 查询
305
- * @param options 查询选项
402
+ * activated
306
403
  */
307
- count(options: CountOptions<typeof RxDBBranch, RxDBBranchRuleGroup>): Observable<number>;
404
+ activated?: boolean;
308
405
  /**
309
- * find 查询
310
- * @param options 查询选项
406
+ * fromChangeId
311
407
  */
312
- find(options: FindOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>): Observable<RxDBBranch[]>;
408
+ fromChangeId?: number | null;
313
409
  /**
314
- * findAll 查询
315
- * @param options 查询选项
410
+ * local
316
411
  */
317
- findAll(options: FindAllOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>): Observable<RxDBBranch[]>;
412
+ local?: boolean;
318
413
  /**
319
- * findOne 查询
320
- * @param options 查询选项
414
+ * remote
321
415
  */
322
- findOne(options: FindOneOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>): Observable<RxDBBranch | undefined>;
416
+ remote?: boolean;
323
417
  /**
324
- * findOneOrFail 查询
325
- * @param options 查询选项
418
+ * createdAt
419
+ * @default new Date()
326
420
  */
327
- findOneOrFail(options: FindOneOrFailOptions<typeof RxDBBranch, RxDBBranchRuleGroup, RxDBBranchOrderByField>): Observable<RxDBBranch>;
421
+ createdAt?: Date | null;
328
422
  /**
329
- * get 查询
330
- * @param options 查询选项
423
+ * updatedAt
424
+ * @default new Date()
331
425
  */
332
- get(options: string): Observable<RxDBBranch>;
426
+ updatedAt?: Date | null;
333
427
  }
428
+ export declare const ENTITIES: EntityType[];
334
429
  export {};
335
430
  //# sourceMappingURL=types.d.ts.map