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