@contember/binding-legacy 2.0.0-alpha.17

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 (461) hide show
  1. package/api-extractor.json +3 -0
  2. package/dist/development/index.cjs +34 -0
  3. package/dist/development/index.cjs.map +1 -0
  4. package/dist/development/index.js +28 -0
  5. package/dist/development/index.js.map +1 -0
  6. package/dist/development/src/accessorTree/NormalizedPersistedData.cjs +10 -0
  7. package/dist/development/src/accessorTree/NormalizedPersistedData.cjs.map +1 -0
  8. package/dist/development/src/accessorTree/NormalizedPersistedData.js +10 -0
  9. package/dist/development/src/accessorTree/NormalizedPersistedData.js.map +1 -0
  10. package/dist/development/src/accessors/EntityAccessorImpl.cjs +172 -0
  11. package/dist/development/src/accessors/EntityAccessorImpl.cjs.map +1 -0
  12. package/dist/development/src/accessors/EntityAccessorImpl.js +172 -0
  13. package/dist/development/src/accessors/EntityAccessorImpl.js.map +1 -0
  14. package/dist/development/src/accessors/EntityListAccessorImpl.cjs +112 -0
  15. package/dist/development/src/accessors/EntityListAccessorImpl.cjs.map +1 -0
  16. package/dist/development/src/accessors/EntityListAccessorImpl.js +112 -0
  17. package/dist/development/src/accessors/EntityListAccessorImpl.js.map +1 -0
  18. package/dist/development/src/accessors/FieldAccessorImpl.cjs +54 -0
  19. package/dist/development/src/accessors/FieldAccessorImpl.cjs.map +1 -0
  20. package/dist/development/src/accessors/FieldAccessorImpl.js +54 -0
  21. package/dist/development/src/accessors/FieldAccessorImpl.js.map +1 -0
  22. package/dist/development/src/core/AccessorErrorManager.cjs +203 -0
  23. package/dist/development/src/core/AccessorErrorManager.cjs.map +1 -0
  24. package/dist/development/src/core/AccessorErrorManager.js +203 -0
  25. package/dist/development/src/core/AccessorErrorManager.js.map +1 -0
  26. package/dist/development/src/core/Config.cjs +29 -0
  27. package/dist/development/src/core/Config.cjs.map +1 -0
  28. package/dist/development/src/core/Config.js +29 -0
  29. package/dist/development/src/core/Config.js.map +1 -0
  30. package/dist/development/src/core/DataBinding.cjs +355 -0
  31. package/dist/development/src/core/DataBinding.cjs.map +1 -0
  32. package/dist/development/src/core/DataBinding.js +355 -0
  33. package/dist/development/src/core/DataBinding.js.map +1 -0
  34. package/dist/development/src/core/DirtinessTracker.cjs +26 -0
  35. package/dist/development/src/core/DirtinessTracker.cjs.map +1 -0
  36. package/dist/development/src/core/DirtinessTracker.js +26 -0
  37. package/dist/development/src/core/DirtinessTracker.js.map +1 -0
  38. package/dist/development/src/core/ErrorsPreprocessor.cjs +180 -0
  39. package/dist/development/src/core/ErrorsPreprocessor.cjs.map +1 -0
  40. package/dist/development/src/core/ErrorsPreprocessor.js +180 -0
  41. package/dist/development/src/core/ErrorsPreprocessor.js.map +1 -0
  42. package/dist/development/src/core/EventManager.cjs +433 -0
  43. package/dist/development/src/core/EventManager.cjs.map +1 -0
  44. package/dist/development/src/core/EventManager.js +433 -0
  45. package/dist/development/src/core/EventManager.js.map +1 -0
  46. package/dist/development/src/core/MutationGenerator.cjs +660 -0
  47. package/dist/development/src/core/MutationGenerator.cjs.map +1 -0
  48. package/dist/development/src/core/MutationGenerator.js +660 -0
  49. package/dist/development/src/core/MutationGenerator.js.map +1 -0
  50. package/dist/development/src/core/QueryGenerator.cjs +107 -0
  51. package/dist/development/src/core/QueryGenerator.cjs.map +1 -0
  52. package/dist/development/src/core/QueryGenerator.js +107 -0
  53. package/dist/development/src/core/QueryGenerator.js.map +1 -0
  54. package/dist/development/src/core/RealmKeyGenerator.cjs +42 -0
  55. package/dist/development/src/core/RealmKeyGenerator.cjs.map +1 -0
  56. package/dist/development/src/core/RealmKeyGenerator.js +42 -0
  57. package/dist/development/src/core/RealmKeyGenerator.js.map +1 -0
  58. package/dist/development/src/core/RequestResponseNormalizer.cjs +120 -0
  59. package/dist/development/src/core/RequestResponseNormalizer.cjs.map +1 -0
  60. package/dist/development/src/core/RequestResponseNormalizer.js +120 -0
  61. package/dist/development/src/core/RequestResponseNormalizer.js.map +1 -0
  62. package/dist/development/src/core/StateInitializer.cjs +379 -0
  63. package/dist/development/src/core/StateInitializer.cjs.map +1 -0
  64. package/dist/development/src/core/StateInitializer.js +379 -0
  65. package/dist/development/src/core/StateInitializer.js.map +1 -0
  66. package/dist/development/src/core/TreeAugmenter.cjs +214 -0
  67. package/dist/development/src/core/TreeAugmenter.cjs.map +1 -0
  68. package/dist/development/src/core/TreeAugmenter.js +214 -0
  69. package/dist/development/src/core/TreeAugmenter.js.map +1 -0
  70. package/dist/development/src/core/TreeFilterGenerator.cjs +79 -0
  71. package/dist/development/src/core/TreeFilterGenerator.cjs.map +1 -0
  72. package/dist/development/src/core/TreeFilterGenerator.js +79 -0
  73. package/dist/development/src/core/TreeFilterGenerator.js.map +1 -0
  74. package/dist/development/src/core/TreeStore.cjs +172 -0
  75. package/dist/development/src/core/TreeStore.cjs.map +1 -0
  76. package/dist/development/src/core/TreeStore.js +172 -0
  77. package/dist/development/src/core/TreeStore.js.map +1 -0
  78. package/dist/development/src/core/exceptions/ErrorLocator.cjs +59 -0
  79. package/dist/development/src/core/exceptions/ErrorLocator.cjs.map +1 -0
  80. package/dist/development/src/core/exceptions/ErrorLocator.js +59 -0
  81. package/dist/development/src/core/exceptions/ErrorLocator.js.map +1 -0
  82. package/dist/development/src/core/exceptions/MarkerSugarer.cjs +51 -0
  83. package/dist/development/src/core/exceptions/MarkerSugarer.cjs.map +1 -0
  84. package/dist/development/src/core/exceptions/MarkerSugarer.js +51 -0
  85. package/dist/development/src/core/exceptions/MarkerSugarer.js.map +1 -0
  86. package/dist/development/src/core/exceptions/TreeParameterSugarer.cjs +33 -0
  87. package/dist/development/src/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
  88. package/dist/development/src/core/exceptions/TreeParameterSugarer.js +33 -0
  89. package/dist/development/src/core/exceptions/TreeParameterSugarer.js.map +1 -0
  90. package/dist/development/src/core/factories/createBatchUpdatesOptions.cjs +23 -0
  91. package/dist/development/src/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
  92. package/dist/development/src/core/factories/createBatchUpdatesOptions.js +23 -0
  93. package/dist/development/src/core/factories/createBatchUpdatesOptions.js.map +1 -0
  94. package/dist/development/src/core/operations/EntityOperations.cjs +226 -0
  95. package/dist/development/src/core/operations/EntityOperations.cjs.map +1 -0
  96. package/dist/development/src/core/operations/EntityOperations.js +226 -0
  97. package/dist/development/src/core/operations/EntityOperations.js.map +1 -0
  98. package/dist/development/src/core/operations/FieldOperations.cjs +92 -0
  99. package/dist/development/src/core/operations/FieldOperations.cjs.map +1 -0
  100. package/dist/development/src/core/operations/FieldOperations.js +92 -0
  101. package/dist/development/src/core/operations/FieldOperations.js.map +1 -0
  102. package/dist/development/src/core/operations/ListOperations.cjs +155 -0
  103. package/dist/development/src/core/operations/ListOperations.cjs.map +1 -0
  104. package/dist/development/src/core/operations/ListOperations.js +155 -0
  105. package/dist/development/src/core/operations/ListOperations.js.map +1 -0
  106. package/dist/development/src/core/operations/OperationsHelpers.cjs +87 -0
  107. package/dist/development/src/core/operations/OperationsHelpers.cjs.map +1 -0
  108. package/dist/development/src/core/operations/OperationsHelpers.js +87 -0
  109. package/dist/development/src/core/operations/OperationsHelpers.js.map +1 -0
  110. package/dist/development/src/core/requestAliases/MutationAlias.cjs +14 -0
  111. package/dist/development/src/core/requestAliases/MutationAlias.cjs.map +1 -0
  112. package/dist/development/src/core/requestAliases/MutationAlias.js +14 -0
  113. package/dist/development/src/core/requestAliases/MutationAlias.js.map +1 -0
  114. package/dist/development/src/core/state/StateIterator.cjs +100 -0
  115. package/dist/development/src/core/state/StateIterator.cjs.map +1 -0
  116. package/dist/development/src/core/state/StateIterator.js +100 -0
  117. package/dist/development/src/core/state/StateIterator.js.map +1 -0
  118. package/dist/development/src/core/state/getEntityMarker.cjs +5 -0
  119. package/dist/development/src/core/state/getEntityMarker.cjs.map +1 -0
  120. package/dist/development/src/core/state/getEntityMarker.js +5 -0
  121. package/dist/development/src/core/state/getEntityMarker.js.map +1 -0
  122. package/dist/development/src/core/utils/getCombinedSignal.cjs +33 -0
  123. package/dist/development/src/core/utils/getCombinedSignal.cjs.map +1 -0
  124. package/dist/development/src/core/utils/getCombinedSignal.js +33 -0
  125. package/dist/development/src/core/utils/getCombinedSignal.js.map +1 -0
  126. package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs +13 -0
  127. package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
  128. package/dist/development/src/fieldHelpers/helpers/FieldHelper.js +13 -0
  129. package/dist/development/src/fieldHelpers/helpers/FieldHelper.js.map +1 -0
  130. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.cjs +18 -0
  131. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
  132. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.js +18 -0
  133. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -0
  134. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.cjs +16 -0
  135. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
  136. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.js +16 -0
  137. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -0
  138. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.cjs +7 -0
  139. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
  140. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.js +7 -0
  141. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.js.map +1 -0
  142. package/dist/development/src/utils/isEmptyObject.cjs +12 -0
  143. package/dist/development/src/utils/isEmptyObject.cjs.map +1 -0
  144. package/dist/development/src/utils/isEmptyObject.js +12 -0
  145. package/dist/development/src/utils/isEmptyObject.js.map +1 -0
  146. package/dist/production/index.cjs +34 -0
  147. package/dist/production/index.cjs.map +1 -0
  148. package/dist/production/index.js +28 -0
  149. package/dist/production/index.js.map +1 -0
  150. package/dist/production/src/accessorTree/NormalizedPersistedData.cjs +10 -0
  151. package/dist/production/src/accessorTree/NormalizedPersistedData.cjs.map +1 -0
  152. package/dist/production/src/accessorTree/NormalizedPersistedData.js +10 -0
  153. package/dist/production/src/accessorTree/NormalizedPersistedData.js.map +1 -0
  154. package/dist/production/src/accessors/EntityAccessorImpl.cjs +172 -0
  155. package/dist/production/src/accessors/EntityAccessorImpl.cjs.map +1 -0
  156. package/dist/production/src/accessors/EntityAccessorImpl.js +172 -0
  157. package/dist/production/src/accessors/EntityAccessorImpl.js.map +1 -0
  158. package/dist/production/src/accessors/EntityListAccessorImpl.cjs +112 -0
  159. package/dist/production/src/accessors/EntityListAccessorImpl.cjs.map +1 -0
  160. package/dist/production/src/accessors/EntityListAccessorImpl.js +112 -0
  161. package/dist/production/src/accessors/EntityListAccessorImpl.js.map +1 -0
  162. package/dist/production/src/accessors/FieldAccessorImpl.cjs +54 -0
  163. package/dist/production/src/accessors/FieldAccessorImpl.cjs.map +1 -0
  164. package/dist/production/src/accessors/FieldAccessorImpl.js +54 -0
  165. package/dist/production/src/accessors/FieldAccessorImpl.js.map +1 -0
  166. package/dist/production/src/core/AccessorErrorManager.cjs +203 -0
  167. package/dist/production/src/core/AccessorErrorManager.cjs.map +1 -0
  168. package/dist/production/src/core/AccessorErrorManager.js +203 -0
  169. package/dist/production/src/core/AccessorErrorManager.js.map +1 -0
  170. package/dist/production/src/core/Config.cjs +29 -0
  171. package/dist/production/src/core/Config.cjs.map +1 -0
  172. package/dist/production/src/core/Config.js +29 -0
  173. package/dist/production/src/core/Config.js.map +1 -0
  174. package/dist/production/src/core/DataBinding.cjs +355 -0
  175. package/dist/production/src/core/DataBinding.cjs.map +1 -0
  176. package/dist/production/src/core/DataBinding.js +355 -0
  177. package/dist/production/src/core/DataBinding.js.map +1 -0
  178. package/dist/production/src/core/DirtinessTracker.cjs +26 -0
  179. package/dist/production/src/core/DirtinessTracker.cjs.map +1 -0
  180. package/dist/production/src/core/DirtinessTracker.js +26 -0
  181. package/dist/production/src/core/DirtinessTracker.js.map +1 -0
  182. package/dist/production/src/core/ErrorsPreprocessor.cjs +180 -0
  183. package/dist/production/src/core/ErrorsPreprocessor.cjs.map +1 -0
  184. package/dist/production/src/core/ErrorsPreprocessor.js +180 -0
  185. package/dist/production/src/core/ErrorsPreprocessor.js.map +1 -0
  186. package/dist/production/src/core/EventManager.cjs +407 -0
  187. package/dist/production/src/core/EventManager.cjs.map +1 -0
  188. package/dist/production/src/core/EventManager.js +407 -0
  189. package/dist/production/src/core/EventManager.js.map +1 -0
  190. package/dist/production/src/core/MutationGenerator.cjs +660 -0
  191. package/dist/production/src/core/MutationGenerator.cjs.map +1 -0
  192. package/dist/production/src/core/MutationGenerator.js +660 -0
  193. package/dist/production/src/core/MutationGenerator.js.map +1 -0
  194. package/dist/production/src/core/QueryGenerator.cjs +107 -0
  195. package/dist/production/src/core/QueryGenerator.cjs.map +1 -0
  196. package/dist/production/src/core/QueryGenerator.js +107 -0
  197. package/dist/production/src/core/QueryGenerator.js.map +1 -0
  198. package/dist/production/src/core/RealmKeyGenerator.cjs +42 -0
  199. package/dist/production/src/core/RealmKeyGenerator.cjs.map +1 -0
  200. package/dist/production/src/core/RealmKeyGenerator.js +42 -0
  201. package/dist/production/src/core/RealmKeyGenerator.js.map +1 -0
  202. package/dist/production/src/core/RequestResponseNormalizer.cjs +120 -0
  203. package/dist/production/src/core/RequestResponseNormalizer.cjs.map +1 -0
  204. package/dist/production/src/core/RequestResponseNormalizer.js +120 -0
  205. package/dist/production/src/core/RequestResponseNormalizer.js.map +1 -0
  206. package/dist/production/src/core/StateInitializer.cjs +379 -0
  207. package/dist/production/src/core/StateInitializer.cjs.map +1 -0
  208. package/dist/production/src/core/StateInitializer.js +379 -0
  209. package/dist/production/src/core/StateInitializer.js.map +1 -0
  210. package/dist/production/src/core/TreeAugmenter.cjs +214 -0
  211. package/dist/production/src/core/TreeAugmenter.cjs.map +1 -0
  212. package/dist/production/src/core/TreeAugmenter.js +214 -0
  213. package/dist/production/src/core/TreeAugmenter.js.map +1 -0
  214. package/dist/production/src/core/TreeFilterGenerator.cjs +79 -0
  215. package/dist/production/src/core/TreeFilterGenerator.cjs.map +1 -0
  216. package/dist/production/src/core/TreeFilterGenerator.js +79 -0
  217. package/dist/production/src/core/TreeFilterGenerator.js.map +1 -0
  218. package/dist/production/src/core/TreeStore.cjs +172 -0
  219. package/dist/production/src/core/TreeStore.cjs.map +1 -0
  220. package/dist/production/src/core/TreeStore.js +172 -0
  221. package/dist/production/src/core/TreeStore.js.map +1 -0
  222. package/dist/production/src/core/exceptions/ErrorLocator.cjs +59 -0
  223. package/dist/production/src/core/exceptions/ErrorLocator.cjs.map +1 -0
  224. package/dist/production/src/core/exceptions/ErrorLocator.js +59 -0
  225. package/dist/production/src/core/exceptions/ErrorLocator.js.map +1 -0
  226. package/dist/production/src/core/exceptions/MarkerSugarer.cjs +51 -0
  227. package/dist/production/src/core/exceptions/MarkerSugarer.cjs.map +1 -0
  228. package/dist/production/src/core/exceptions/MarkerSugarer.js +51 -0
  229. package/dist/production/src/core/exceptions/MarkerSugarer.js.map +1 -0
  230. package/dist/production/src/core/exceptions/TreeParameterSugarer.cjs +33 -0
  231. package/dist/production/src/core/exceptions/TreeParameterSugarer.cjs.map +1 -0
  232. package/dist/production/src/core/exceptions/TreeParameterSugarer.js +33 -0
  233. package/dist/production/src/core/exceptions/TreeParameterSugarer.js.map +1 -0
  234. package/dist/production/src/core/factories/createBatchUpdatesOptions.cjs +23 -0
  235. package/dist/production/src/core/factories/createBatchUpdatesOptions.cjs.map +1 -0
  236. package/dist/production/src/core/factories/createBatchUpdatesOptions.js +23 -0
  237. package/dist/production/src/core/factories/createBatchUpdatesOptions.js.map +1 -0
  238. package/dist/production/src/core/operations/EntityOperations.cjs +226 -0
  239. package/dist/production/src/core/operations/EntityOperations.cjs.map +1 -0
  240. package/dist/production/src/core/operations/EntityOperations.js +226 -0
  241. package/dist/production/src/core/operations/EntityOperations.js.map +1 -0
  242. package/dist/production/src/core/operations/FieldOperations.cjs +73 -0
  243. package/dist/production/src/core/operations/FieldOperations.cjs.map +1 -0
  244. package/dist/production/src/core/operations/FieldOperations.js +73 -0
  245. package/dist/production/src/core/operations/FieldOperations.js.map +1 -0
  246. package/dist/production/src/core/operations/ListOperations.cjs +155 -0
  247. package/dist/production/src/core/operations/ListOperations.cjs.map +1 -0
  248. package/dist/production/src/core/operations/ListOperations.js +155 -0
  249. package/dist/production/src/core/operations/ListOperations.js.map +1 -0
  250. package/dist/production/src/core/operations/OperationsHelpers.cjs +87 -0
  251. package/dist/production/src/core/operations/OperationsHelpers.cjs.map +1 -0
  252. package/dist/production/src/core/operations/OperationsHelpers.js +87 -0
  253. package/dist/production/src/core/operations/OperationsHelpers.js.map +1 -0
  254. package/dist/production/src/core/requestAliases/MutationAlias.cjs +14 -0
  255. package/dist/production/src/core/requestAliases/MutationAlias.cjs.map +1 -0
  256. package/dist/production/src/core/requestAliases/MutationAlias.js +14 -0
  257. package/dist/production/src/core/requestAliases/MutationAlias.js.map +1 -0
  258. package/dist/production/src/core/state/StateIterator.cjs +100 -0
  259. package/dist/production/src/core/state/StateIterator.cjs.map +1 -0
  260. package/dist/production/src/core/state/StateIterator.js +100 -0
  261. package/dist/production/src/core/state/StateIterator.js.map +1 -0
  262. package/dist/production/src/core/state/getEntityMarker.cjs +5 -0
  263. package/dist/production/src/core/state/getEntityMarker.cjs.map +1 -0
  264. package/dist/production/src/core/state/getEntityMarker.js +5 -0
  265. package/dist/production/src/core/state/getEntityMarker.js.map +1 -0
  266. package/dist/production/src/core/utils/getCombinedSignal.cjs +33 -0
  267. package/dist/production/src/core/utils/getCombinedSignal.cjs.map +1 -0
  268. package/dist/production/src/core/utils/getCombinedSignal.js +33 -0
  269. package/dist/production/src/core/utils/getCombinedSignal.js.map +1 -0
  270. package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs +13 -0
  271. package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs.map +1 -0
  272. package/dist/production/src/fieldHelpers/helpers/FieldHelper.js +13 -0
  273. package/dist/production/src/fieldHelpers/helpers/FieldHelper.js.map +1 -0
  274. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.cjs +18 -0
  275. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +1 -0
  276. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.js +18 -0
  277. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +1 -0
  278. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.cjs +16 -0
  279. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +1 -0
  280. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.js +16 -0
  281. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.js.map +1 -0
  282. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.cjs +7 -0
  283. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +1 -0
  284. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.js +7 -0
  285. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.js.map +1 -0
  286. package/dist/production/src/utils/isEmptyObject.cjs +12 -0
  287. package/dist/production/src/utils/isEmptyObject.cjs.map +1 -0
  288. package/dist/production/src/utils/isEmptyObject.js +12 -0
  289. package/dist/production/src/utils/isEmptyObject.js.map +1 -0
  290. package/dist/types/accessorTree/NormalizedPersistedData.d.ts +13 -0
  291. package/dist/types/accessorTree/NormalizedPersistedData.d.ts.map +1 -0
  292. package/dist/types/accessorTree/index.d.ts +2 -0
  293. package/dist/types/accessorTree/index.d.ts.map +1 -0
  294. package/dist/types/accessors/BindingConfig.d.ts +6 -0
  295. package/dist/types/accessors/BindingConfig.d.ts.map +1 -0
  296. package/dist/types/accessors/EntityAccessorImpl.d.ts +52 -0
  297. package/dist/types/accessors/EntityAccessorImpl.d.ts.map +1 -0
  298. package/dist/types/accessors/EntityListAccessorImpl.d.ts +57 -0
  299. package/dist/types/accessors/EntityListAccessorImpl.d.ts.map +1 -0
  300. package/dist/types/accessors/FieldAccessorImpl.d.ts +32 -0
  301. package/dist/types/accessors/FieldAccessorImpl.d.ts.map +1 -0
  302. package/dist/types/accessors/index.d.ts +5 -0
  303. package/dist/types/accessors/index.d.ts.map +1 -0
  304. package/dist/types/core/AccessorErrorManager.d.ts +25 -0
  305. package/dist/types/core/AccessorErrorManager.d.ts.map +1 -0
  306. package/dist/types/core/Config.d.ts +9 -0
  307. package/dist/types/core/Config.d.ts.map +1 -0
  308. package/dist/types/core/DataBinding.d.ts +52 -0
  309. package/dist/types/core/DataBinding.d.ts.map +1 -0
  310. package/dist/types/core/DirtinessTracker.d.ts +9 -0
  311. package/dist/types/core/DirtinessTracker.d.ts.map +1 -0
  312. package/dist/types/core/ErrorsPreprocessor.d.ts +34 -0
  313. package/dist/types/core/ErrorsPreprocessor.d.ts.map +1 -0
  314. package/dist/types/core/EventManager.d.ts +57 -0
  315. package/dist/types/core/EventManager.d.ts.map +1 -0
  316. package/dist/types/core/MutationGenerator.d.ts +46 -0
  317. package/dist/types/core/MutationGenerator.d.ts.map +1 -0
  318. package/dist/types/core/QueryGenerator.d.ts +12 -0
  319. package/dist/types/core/QueryGenerator.d.ts.map +1 -0
  320. package/dist/types/core/RealmKeyGenerator.d.ts +10 -0
  321. package/dist/types/core/RealmKeyGenerator.d.ts.map +1 -0
  322. package/dist/types/core/RequestResponseNormalizer.d.ts +11 -0
  323. package/dist/types/core/RequestResponseNormalizer.d.ts.map +1 -0
  324. package/dist/types/core/StateInitializer.d.ts +34 -0
  325. package/dist/types/core/StateInitializer.d.ts.map +1 -0
  326. package/dist/types/core/TreeAugmenter.d.ts +22 -0
  327. package/dist/types/core/TreeAugmenter.d.ts.map +1 -0
  328. package/dist/types/core/TreeFilterGenerator.d.ts +13 -0
  329. package/dist/types/core/TreeFilterGenerator.d.ts.map +1 -0
  330. package/dist/types/core/TreeStore.d.ts +30 -0
  331. package/dist/types/core/TreeStore.d.ts.map +1 -0
  332. package/dist/types/core/UpdateMetadata.d.ts +4 -0
  333. package/dist/types/core/UpdateMetadata.d.ts.map +1 -0
  334. package/dist/types/core/exceptions/ErrorLocator.d.ts +8 -0
  335. package/dist/types/core/exceptions/ErrorLocator.d.ts.map +1 -0
  336. package/dist/types/core/exceptions/MarkerSugarer.d.ts +10 -0
  337. package/dist/types/core/exceptions/MarkerSugarer.d.ts.map +1 -0
  338. package/dist/types/core/exceptions/TreeParameterSugarer.d.ts +11 -0
  339. package/dist/types/core/exceptions/TreeParameterSugarer.d.ts.map +1 -0
  340. package/dist/types/core/factories/createBatchUpdatesOptions.d.ts +5 -0
  341. package/dist/types/core/factories/createBatchUpdatesOptions.d.ts.map +1 -0
  342. package/dist/types/core/factories/index.d.ts +2 -0
  343. package/dist/types/core/factories/index.d.ts.map +1 -0
  344. package/dist/types/core/index.d.ts +9 -0
  345. package/dist/types/core/index.d.ts.map +1 -0
  346. package/dist/types/core/operations/EntityOperations.d.ts +26 -0
  347. package/dist/types/core/operations/EntityOperations.d.ts.map +1 -0
  348. package/dist/types/core/operations/FieldOperations.d.ts +22 -0
  349. package/dist/types/core/operations/FieldOperations.d.ts.map +1 -0
  350. package/dist/types/core/operations/ListOperations.d.ts +32 -0
  351. package/dist/types/core/operations/ListOperations.d.ts.map +1 -0
  352. package/dist/types/core/operations/OperationsHelpers.d.ts +14 -0
  353. package/dist/types/core/operations/OperationsHelpers.d.ts.map +1 -0
  354. package/dist/types/core/operations/index.d.ts +4 -0
  355. package/dist/types/core/operations/index.d.ts.map +1 -0
  356. package/dist/types/core/requestAliases/MutationAlias.d.ts +6 -0
  357. package/dist/types/core/requestAliases/MutationAlias.d.ts.map +1 -0
  358. package/dist/types/core/requestAliases/index.d.ts +2 -0
  359. package/dist/types/core/requestAliases/index.d.ts.map +1 -0
  360. package/dist/types/core/state/EntityListState.d.ts +29 -0
  361. package/dist/types/core/state/EntityListState.d.ts.map +1 -0
  362. package/dist/types/core/state/EntityRealmState.d.ts +44 -0
  363. package/dist/types/core/state/EntityRealmState.d.ts.map +1 -0
  364. package/dist/types/core/state/EntityState.d.ts +11 -0
  365. package/dist/types/core/state/EntityState.d.ts.map +1 -0
  366. package/dist/types/core/state/FieldState.d.ts +19 -0
  367. package/dist/types/core/state/FieldState.d.ts.map +1 -0
  368. package/dist/types/core/state/StateIterator.d.ts +14 -0
  369. package/dist/types/core/state/StateIterator.d.ts.map +1 -0
  370. package/dist/types/core/state/StateNode.d.ts +8 -0
  371. package/dist/types/core/state/StateNode.d.ts.map +1 -0
  372. package/dist/types/core/state/getEntityMarker.d.ts +3 -0
  373. package/dist/types/core/state/getEntityMarker.d.ts.map +1 -0
  374. package/dist/types/core/state/index.d.ts +8 -0
  375. package/dist/types/core/state/index.d.ts.map +1 -0
  376. package/dist/types/core/utils/getCombinedSignal.d.ts +2 -0
  377. package/dist/types/core/utils/getCombinedSignal.d.ts.map +1 -0
  378. package/dist/types/core/utils/index.d.ts +2 -0
  379. package/dist/types/core/utils/index.d.ts.map +1 -0
  380. package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts +7 -0
  381. package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts.map +1 -0
  382. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts +10 -0
  383. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +1 -0
  384. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts +10 -0
  385. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +1 -0
  386. package/dist/types/fieldHelpers/helpers/index.d.ts +3 -0
  387. package/dist/types/fieldHelpers/helpers/index.d.ts.map +1 -0
  388. package/dist/types/fieldHelpers/index.d.ts +2 -0
  389. package/dist/types/fieldHelpers/index.d.ts.map +1 -0
  390. package/dist/types/index.d.ts +5 -0
  391. package/dist/types/index.d.ts.map +1 -0
  392. package/dist/types/tsconfig.tsbuildinfo +1 -0
  393. package/dist/types/utils/assertNever.d.ts +2 -0
  394. package/dist/types/utils/assertNever.d.ts.map +1 -0
  395. package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts +2 -0
  396. package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts.map +1 -0
  397. package/dist/types/utils/index.d.ts +4 -0
  398. package/dist/types/utils/index.d.ts.map +1 -0
  399. package/dist/types/utils/isEmptyObject.d.ts +2 -0
  400. package/dist/types/utils/isEmptyObject.d.ts.map +1 -0
  401. package/package.json +40 -0
  402. package/src/accessorTree/NormalizedPersistedData.ts +23 -0
  403. package/src/accessorTree/index.ts +1 -0
  404. package/src/accessors/BindingConfig.ts +5 -0
  405. package/src/accessors/EntityAccessorImpl.ts +247 -0
  406. package/src/accessors/EntityListAccessorImpl.ts +138 -0
  407. package/src/accessors/FieldAccessorImpl.ts +64 -0
  408. package/src/accessors/index.ts +4 -0
  409. package/src/core/AccessorErrorManager.ts +243 -0
  410. package/src/core/Config.ts +27 -0
  411. package/src/core/DataBinding.ts +442 -0
  412. package/src/core/DirtinessTracker.ts +21 -0
  413. package/src/core/ErrorsPreprocessor.ts +238 -0
  414. package/src/core/EventManager.ts +589 -0
  415. package/src/core/MutationGenerator.ts +828 -0
  416. package/src/core/QueryGenerator.ts +128 -0
  417. package/src/core/RealmKeyGenerator.ts +52 -0
  418. package/src/core/RequestResponseNormalizer.ts +165 -0
  419. package/src/core/StateInitializer.ts +559 -0
  420. package/src/core/TreeAugmenter.ts +270 -0
  421. package/src/core/TreeFilterGenerator.ts +117 -0
  422. package/src/core/TreeStore.ts +249 -0
  423. package/src/core/UpdateMetadata.ts +3 -0
  424. package/src/core/exceptions/ErrorLocator.ts +58 -0
  425. package/src/core/exceptions/MarkerSugarer.ts +61 -0
  426. package/src/core/exceptions/TreeParameterSugarer.ts +41 -0
  427. package/src/core/factories/createBatchUpdatesOptions.ts +41 -0
  428. package/src/core/factories/index.ts +1 -0
  429. package/src/core/index.ts +8 -0
  430. package/src/core/operations/EntityOperations.ts +311 -0
  431. package/src/core/operations/FieldOperations.ts +131 -0
  432. package/src/core/operations/ListOperations.ts +213 -0
  433. package/src/core/operations/OperationsHelpers.ts +153 -0
  434. package/src/core/operations/index.ts +3 -0
  435. package/src/core/requestAliases/MutationAlias.ts +13 -0
  436. package/src/core/requestAliases/index.ts +1 -0
  437. package/src/core/state/EntityListState.ts +39 -0
  438. package/src/core/state/EntityRealmState.ts +63 -0
  439. package/src/core/state/EntityState.ts +11 -0
  440. package/src/core/state/FieldState.ts +20 -0
  441. package/src/core/state/StateIterator.ts +121 -0
  442. package/src/core/state/StateNode.ts +8 -0
  443. package/src/core/state/getEntityMarker.ts +4 -0
  444. package/src/core/state/index.ts +7 -0
  445. package/src/core/utils/getCombinedSignal.ts +36 -0
  446. package/src/core/utils/index.ts +1 -0
  447. package/src/fieldHelpers/helpers/FieldHelper.ts +10 -0
  448. package/src/fieldHelpers/helpers/TemporalFieldHelper.ts +21 -0
  449. package/src/fieldHelpers/helpers/UuidFieldHelper.ts +18 -0
  450. package/src/fieldHelpers/helpers/index.ts +2 -0
  451. package/src/fieldHelpers/index.ts +1 -0
  452. package/src/index.ts +7 -0
  453. package/src/tsconfig.json +14 -0
  454. package/src/utils/assertNever.ts +10 -0
  455. package/src/utils/generateEnumerabilityPreventingEntropy.ts +3 -0
  456. package/src/utils/index.ts +3 -0
  457. package/src/utils/isEmptyObject.ts +9 -0
  458. package/tests/example.test.ts +5 -0
  459. package/tests/tsconfig.json +10 -0
  460. package/tsconfig.json +8 -0
  461. package/tsdoc.json +6 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutationGenerator.cjs","sources":["../../../../../packages/binding-legacy/src/core/MutationGenerator.ts"],"sourcesContent":["import { ContentMutation, ContentQueryBuilder, GraphQlLiteral, Input, replaceGraphQlLiteral } from '@contember/client'\nimport { ClientGeneratedUuid, ReceivedEntityData, ServerId } from '@contember/binding-common'\nimport { BindingError } from '@contember/binding-common'\nimport { PRIMARY_KEY_NAME, TYPENAME_KEY_NAME } from '@contember/binding-common'\nimport { EntityFieldMarkers, FieldMarker, HasManyRelationMarker, HasOneRelationMarker } from '@contember/binding-common'\nimport type { EntityId, EntityName, PlaceholderName, UniqueWhere } from '@contember/binding-common'\nimport { isEmptyObject } from '../utils'\nimport { assertNever } from '@contember/binding-common'\nimport { QueryGenerator } from './QueryGenerator'\nimport { MutationAlias } from './requestAliases'\nimport { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, FieldState, getEntityMarker, StateIterator } from './state'\nimport type { TreeStore } from './TreeStore'\nimport { EntityFieldPersistedData } from '../accessorTree'\n\n\ntype ProcessedPlaceholdersByEntity = Map<EntityState, Set<PlaceholderName>>\n\nexport type SubMutationOperation =\n\t& {\n\t\talias: string\n\t\tsubTreePlaceholder: PlaceholderName\n\t\tsubTreeType: 'list' | 'single'\n\t}\n\t& (\n\t\t| { type: 'delete'; id: EntityId }\n\t\t| { type: 'update'; markers: EntityFieldMarkers; id: EntityId }\n\t\t| { type: 'create'; markers: EntityFieldMarkers; id: EntityId }\n\t)\n\nexport type PersistMutationResult = {\n\tmutations: Record<string, ContentMutation<ReceivedEntityData>>\n\toperations: SubMutationOperation[]\n}\n\n// TODO enforce correct expected mutations in dev mode.\nexport class MutationGenerator {\n\n\tprivate aliasCounter = 1\n\n\tpublic constructor(\n\t\tprivate readonly treeStore: TreeStore,\n\t\tprivate readonly qb: ContentQueryBuilder,\n\t) {\n\t}\n\n\tpublic getPersistMutation(): PersistMutationResult {\n\t\tconst mutations: Record<string, ContentMutation<any>> = {}\n\t\tconst operations: SubMutationOperation[] = []\n\t\tconst processedPlaceholdersByEntity: ProcessedPlaceholdersByEntity = new Map()\n\t\tconst processedDeletes = new Set<string>()\n\n\t\tfor (const [treeRootId, rootStates] of this.treeStore.subTreeStatesByRoot.entries()) {\n\t\t\tfor (const [placeholderName, subTreeState] of Array.from(rootStates.entries()).reverse()) {\n\t\t\t\tif (subTreeState.unpersistedChangesCount <= 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (subTreeState.type === 'entityRealm') {\n\t\t\t\t\tif (subTreeState.blueprint.type === 'subTree' && subTreeState.blueprint.marker.parameters.isCreating && subTreeState.blueprint.marker.parameters.isUnpersisted) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst subMutation = this.createMutation(\n\t\t\t\t\t\tprocessedPlaceholdersByEntity,\n\t\t\t\t\t\tplaceholderName,\n\t\t\t\t\t\t'single',\n\t\t\t\t\t\tsubTreeState.entity.id.value,\n\t\t\t\t\t\tsubTreeState,\n\t\t\t\t\t)\n\t\t\t\t\tif (subMutation) {\n\t\t\t\t\t\tmutations[subMutation[1].alias] = subMutation[0]\n\t\t\t\t\t\toperations.push(subMutation[1])\n\t\t\t\t\t}\n\t\t\t\t} else if (subTreeState.type === 'entityList') {\n\t\t\t\t\tif (subTreeState.blueprint.type === 'subTree' && subTreeState.blueprint.marker.parameters.isCreating && subTreeState.blueprint.marker.parameters.isUnpersisted) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tfor (const childState of subTreeState.children.values()) {\n\t\t\t\t\t\tif (childState.type === 'entityRealmStub') {\n\t\t\t\t\t\t\t// TODO there can be a forceCreate somewhere in there that we're hereby ignoring.\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst subMutation = this.createMutation(\n\t\t\t\t\t\t\tprocessedPlaceholdersByEntity,\n\t\t\t\t\t\t\tplaceholderName,\n\t\t\t\t\t\t\t'list',\n\t\t\t\t\t\t\tchildState.entity.id.value,\n\t\t\t\t\t\t\tchildState,\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (subMutation) {\n\t\t\t\t\t\t\tmutations[subMutation[1].alias] = subMutation[0]\n\t\t\t\t\t\t\toperations.push(subMutation[1])\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (subTreeState.plannedRemovals) {\n\t\t\t\t\t\tfor (const [removedId, removalType] of subTreeState.plannedRemovals) {\n\t\t\t\t\t\t\tif (removalType === 'disconnect') {\n\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (removalType === 'delete') {\n\t\t\t\t\t\t\t\tconst key = `${subTreeState.entityName}#${removedId}`\n\t\t\t\t\t\t\t\tif (processedDeletes.has(key)) {\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tprocessedDeletes.add(key)\n\t\t\t\t\t\t\t\tconst alias = this.createAlias()\n\t\t\t\t\t\t\t\tmutations[alias] = this.createDeleteMutation(\n\t\t\t\t\t\t\t\t\tsubTreeState.entityName,\n\t\t\t\t\t\t\t\t\tremovedId,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\toperations.push({ alias, subTreePlaceholder: placeholderName, subTreeType: 'list', type: 'delete', id: removedId })\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tassertNever(removalType)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tassertNever(subTreeState)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { mutations, operations }\n\t}\n\n\tprivate createMutation(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tsubTreePlaceholder: PlaceholderName,\n\t\tsubTreeType: 'list' | 'single',\n\t\tentityId: EntityId,\n\t\trealmState: EntityRealmState,\n\t): [ContentMutation<any>, SubMutationOperation] | undefined {\n\t\tif (realmState.unpersistedChangesCount === 0) {\n\t\t\t// Bail out early\n\t\t\treturn undefined\n\t\t}\n\t\tconst fieldMarkers = getEntityMarker(realmState).fields.markers\n\n\t\tconst alias = this.createAlias()\n\n\t\tif (realmState.entity.isScheduledForDeletion) {\n\t\t\tconst mutation = this.createDeleteMutation(\n\t\t\t\trealmState.entity.entityName,\n\t\t\t\tentityId,\n\t\t\t)\n\t\t\treturn [\n\t\t\t\tmutation,\n\t\t\t\t{\n\t\t\t\t\talias,\n\t\t\t\t\tsubTreePlaceholder,\n\t\t\t\t\tsubTreeType,\n\t\t\t\t\ttype: 'delete',\n\t\t\t\t\tid: entityId,\n\t\t\t\t},\n\t\t\t]\n\t\t} else if (!realmState.entity.id.existsOnServer) {\n\t\t\tconst builder = this.createCreateMutation(\n\t\t\t\tprocessedPlaceholdersByEntity,\n\t\t\t\trealmState,\n\t\t\t\tfieldMarkers,\n\t\t\t)\n\t\t\tif (!builder) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tbuilder,\n\t\t\t\t{\n\t\t\t\t\talias,\n\t\t\t\t\tsubTreePlaceholder,\n\t\t\t\t\tsubTreeType,\n\t\t\t\t\ttype: 'create',\n\t\t\t\t\tmarkers: fieldMarkers,\n\t\t\t\t\tid: entityId,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t\tconst builder = this.createUpdateMutation(\n\t\t\tprocessedPlaceholdersByEntity,\n\t\t\trealmState,\n\t\t\tfieldMarkers,\n\t\t)\n\t\tif (!builder) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn [\n\t\t\tbuilder,\n\t\t\t{\n\t\t\t\talias,\n\t\t\t\tsubTreePlaceholder,\n\t\t\t\tsubTreeType,\n\t\t\t\ttype: 'update',\n\t\t\t\tid: entityId,\n\t\t\t\tmarkers: fieldMarkers,\n\t\t\t},\n\t\t]\n\t}\n\n\tprivate createDeleteMutation(\n\t\tentityName: EntityName,\n\t\tdeletedId: EntityId,\n\t): ContentMutation<any> {\n\t\treturn this.qb.delete(entityName, {\n\t\t\tby: { [PRIMARY_KEY_NAME]: deletedId },\n\t\t}, it => it.$(PRIMARY_KEY_NAME).$('__typename'))\n\t}\n\n\tprivate createUpdateMutation(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tentityRealm: EntityRealmState,\n\t\tfieldMarkers: EntityFieldMarkers,\n\t): ContentMutation<any> | undefined {\n\t\tconst input = this.getUpdateDataInput(processedPlaceholdersByEntity, entityRealm)\n\n\t\tif (input === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\tconst runtimeId = entityRealm.entity.id\n\n\t\tif (!runtimeId.existsOnServer) {\n\t\t\treturn undefined\n\t\t}\n\n\t\treturn this.qb.update(entityRealm.entity.entityName, {\n\t\t\tby: {\n\t\t\t\t[PRIMARY_KEY_NAME]: runtimeId.value,\n\t\t\t},\n\t\t\tdata: input,\n\t\t}, it => QueryGenerator.registerQueryPart(fieldMarkers, it).$(PRIMARY_KEY_NAME).$('__typename'))\n\t}\n\n\tprivate createCreateMutation(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tentityRealm: EntityRealmState,\n\t\tfieldMarkers: EntityFieldMarkers,\n\t): ContentMutation<any> | undefined {\n\t\tconst input = this.getCreateDataInput(\n\t\t\tprocessedPlaceholdersByEntity,\n\t\t\tentityRealm,\n\t\t)\n\t\tif (input === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\treturn this.qb.create(entityRealm.entity.entityName, {\n\t\t\tdata: input,\n\t\t}, it => QueryGenerator.registerQueryPart(fieldMarkers, it).$(PRIMARY_KEY_NAME).$('__typename'))\n\t}\n\n\tprivate getCreateDataInput(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tcurrentState: EntityRealmState | EntityRealmStateStub,\n\t): Input.CreateDataInput | undefined {\n\t\tlet processedPlaceholders = processedPlaceholdersByEntity.get(currentState.entity)\n\n\t\tif (processedPlaceholders === undefined) {\n\t\t\tprocessedPlaceholdersByEntity.set(currentState.entity, (processedPlaceholders = new Set()))\n\t\t}\n\n\t\tif (currentState.type === 'entityRealmStub') {\n\t\t\t// TODO If there's a forceCreate, this is wrong.\n\t\t\treturn undefined\n\t\t}\n\n\t\tconst result: Input.CreateDataInput = {}\n\t\tfor (const siblingState of StateIterator.eachSiblingRealm(currentState)) {\n\n\t\t\tconst pathBack = this.treeStore.getPathBackToParent(siblingState)\n\n\t\t\tconst nonbearingFields: Array<| { type: 'field'; marker: FieldMarker; fieldState: FieldState }\n\t\t\t| { type: 'hasOne'; marker: HasOneRelationMarker; fieldState: EntityRealmState | EntityRealmStateStub }\n\t\t\t| { type: 'hasMany'; marker: HasManyRelationMarker; fieldState: EntityListState }> = []\n\n\t\t\tfor (const [placeholderName, fieldState] of siblingState.children) {\n\t\t\t\tif (processedPlaceholders.has(placeholderName)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tprocessedPlaceholders.add(placeholderName)\n\n\t\t\t\tswitch (fieldState.type) {\n\t\t\t\t\tcase 'field': {\n\t\t\t\t\t\tconst marker = fieldState.fieldMarker\n\t\t\t\t\t\tconst placeholderName = marker.placeholderName\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tplaceholderName === TYPENAME_KEY_NAME ||\n\t\t\t\t\t\t\t(placeholderName === PRIMARY_KEY_NAME && !(siblingState.entity.id instanceof ClientGeneratedUuid))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (marker.isNonbearing) {\n\t\t\t\t\t\t\tnonbearingFields.push({\n\t\t\t\t\t\t\t\ttype: 'field',\n\t\t\t\t\t\t\t\tmarker,\n\t\t\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst accessor = fieldState.getAccessor()\n\t\t\t\t\t\tconst value = accessor.value ?? accessor.defaultValue ?? null\n\t\t\t\t\t\tif (value !== undefined && value !== null) {\n\t\t\t\t\t\t\tresult[marker.fieldName] = value\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityRealmStub':\n\t\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\t\tconst marker = getEntityMarker(fieldState)\n\t\t\t\t\t\tif (!(marker instanceof HasOneRelationMarker)) {\n\t\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (marker.parameters.isNonbearing) {\n\t\t\t\t\t\t\tnonbearingFields.push({\n\t\t\t\t\t\t\t\ttype: 'hasOne',\n\t\t\t\t\t\t\t\tmarker,\n\t\t\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst input = this.getCreateOneRelationInput(processedPlaceholdersByEntity, fieldState, marker)\n\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\t\tif (Array.isArray(input) && Array.isArray(current)) {\n\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresult[marker.parameters.field] = input\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tconst marker = fieldState.blueprint.marker\n\t\t\t\t\t\tif (!(marker instanceof HasManyRelationMarker)) {\n\t\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (marker.parameters.isNonbearing) {\n\t\t\t\t\t\t\tnonbearingFields.push({\n\t\t\t\t\t\t\t\ttype: 'hasMany',\n\t\t\t\t\t\t\t\tmarker,\n\t\t\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst input = this.getCreateManyRelationInput(processedPlaceholdersByEntity, fieldState)\n\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresult[marker.parameters.field] = input\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn assertNever(fieldState)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((!isEmptyObject(result)) || !getEntityMarker(siblingState).fields.hasAtLeastOneBearingField) {\n\t\t\t\tfor (const field of nonbearingFields) {\n\t\t\t\t\tswitch (field.type) {\n\t\t\t\t\t\tcase 'field': {\n\t\t\t\t\t\t\tconst accessor = field.fieldState.getAccessor()\n\t\t\t\t\t\t\tconst value = accessor.value ?? accessor.defaultValue ?? null\n\t\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\t\tresult[field.marker.fieldName] = value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'hasOne': {\n\t\t\t\t\t\t\tconst input = this.getCreateOneRelationInput(\n\t\t\t\t\t\t\t\tprocessedPlaceholdersByEntity,\n\t\t\t\t\t\t\t\tfield.fieldState,\n\t\t\t\t\t\t\t\tfield.marker,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\t\tconst current = result[field.marker.parameters.field]\n\t\t\t\t\t\t\t\tif (Array.isArray(input) && Array.isArray(current)) {\n\t\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult[field.marker.parameters.field] = input\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'hasMany': {\n\t\t\t\t\t\t\tconst input = this.getCreateManyRelationInput(\n\t\t\t\t\t\t\t\tprocessedPlaceholdersByEntity,\n\t\t\t\t\t\t\t\tfield.fieldState,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\t\tconst current = result[field.marker.parameters.field]\n\t\t\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult[field.marker.parameters.field] = input\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tassertNever(field)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst setOnCreate = getEntityMarker(siblingState).parameters.setOnCreate\n\t\t\tif (setOnCreate && !isEmptyObject(result)) {\n\t\t\t\tfor (const key in setOnCreate) {\n\t\t\t\t\tconst field = setOnCreate[key]\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof field === 'string' ||\n\t\t\t\t\t\ttypeof field === 'number' ||\n\t\t\t\t\t\tfield === null ||\n\t\t\t\t\t\tfield instanceof GraphQlLiteral\n\t\t\t\t\t) {\n\t\t\t\t\t\tresult[key] = field instanceof GraphQlLiteral ? field.value : field\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult[key] = { connect: replaceGraphQlLiteral(field) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn isEmptyObject(result) ? undefined : result\n\t}\n\n\tprivate getCreateOneRelationInput(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tfieldState: EntityRealmState | EntityRealmStateStub,\n\t\tmarker: HasOneRelationMarker,\n\t): Input.CreateOneRelationInput | Input.CreateManyRelationInput | undefined {\n\t\tconst reducedBy = marker.parameters.reducedBy\n\t\tconst runtimeId = fieldState.entity.id\n\n\t\tif (reducedBy === undefined) {\n\t\t\tif (this.shouldConnectInsteadOfCreate(processedPlaceholdersByEntity, fieldState)) {\n\t\t\t\treturn { connect: { [PRIMARY_KEY_NAME]: runtimeId.value } }\n\t\t\t}\n\n\t\t\tconst createData = this.getCreateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\t\tif (createData === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn { create: createData }\n\t\t}\n\n\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\t\tif (this.shouldConnectInsteadOfCreate(processedPlaceholdersByEntity, fieldState)) {\n\t\t\t// TODO also potentially update\n\t\t\treturn [{ connect: { [PRIMARY_KEY_NAME]: runtimeId.value }, alias }]\n\t\t}\n\t\tconst createData = this.getCreateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\tif (createData === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn [{ create: createData, alias }]\n\t}\n\n\tprivate getCreateManyRelationInput(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tfieldState: EntityListState,\n\t): Input.CreateManyRelationInput | undefined {\n\t\tconst result: Input.CreateManyRelationInput = []\n\t\tfor (const entityRealm of fieldState.children.values()) {\n\t\t\tconst runtimeId = entityRealm.entity.id\n\t\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\t\t\tif (this.shouldConnectInsteadOfCreate(processedPlaceholdersByEntity, entityRealm)) {\n\t\t\t\tresult.push({\n\t\t\t\t\talias,\n\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tconst createData = this.getCreateDataInput(processedPlaceholdersByEntity, entityRealm)\n\t\t\t\tif (createData === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tresult.push({\n\t\t\t\t\talias,\n\t\t\t\t\tcreate: createData,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn result.length === 0 ? undefined : result\n\t}\n\n\tprivate shouldConnectInsteadOfCreate(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tcurrentState: EntityRealmState | EntityRealmStateStub,\n\t): boolean {\n\t\tconst runtimeId = currentState.entity.id\n\t\tconst processedPlaceholders = processedPlaceholdersByEntity.get(currentState.entity)\n\n\t\treturn runtimeId.existsOnServer || (runtimeId instanceof ClientGeneratedUuid && (processedPlaceholders?.has(PRIMARY_KEY_NAME) ?? false))\n\t}\n\n\tprivate getUpdateDataInput(\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tcurrentState: EntityRealmState,\n\t): Input.UpdateDataInput | undefined {\n\t\tlet processedPlaceholders = processedPlaceholdersByEntity.get(currentState.entity)\n\n\t\tif (processedPlaceholders === undefined) {\n\t\t\tprocessedPlaceholdersByEntity.set(currentState.entity, (processedPlaceholders = new Set()))\n\t\t}\n\n\t\tconst pathBack = this.treeStore.getPathBackToParent(currentState)\n\t\tconst entityData = this.treeStore.persistedEntityData.get(currentState.entity.id.uniqueValue)\n\n\t\tconst result: Input.UpdateDataInput = {}\n\n\t\tfor (const [placeholderName, fieldState] of currentState.children) {\n\t\t\tif (placeholderName === PRIMARY_KEY_NAME || placeholderName === TYPENAME_KEY_NAME) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (processedPlaceholders.has(placeholderName)) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tprocessedPlaceholders.add(placeholderName)\n\n\t\t\tswitch (fieldState.type) {\n\t\t\t\tcase 'field': {\n\t\t\t\t\tif (fieldState.persistedValue !== undefined) {\n\t\t\t\t\t\tconst accessor = fieldState.getAccessor()\n\t\t\t\t\t\tconst resolvedValue = accessor.value ?? accessor.defaultValue ?? null\n\t\t\t\t\t\tif (fieldState.persistedValue !== resolvedValue) {\n\t\t\t\t\t\t\tresult[placeholderName] = resolvedValue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase 'entityRealmStub':\n\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\tconst marker = getEntityMarker(fieldState)\n\t\t\t\t\tif (!(marker instanceof HasOneRelationMarker)) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst reducedBy = marker.parameters.reducedBy\n\n\t\t\t\t\tconst persistedValue = entityData?.get?.(placeholderName)\n\t\t\t\t\tif (reducedBy === undefined) {\n\n\t\t\t\t\t\tconst relationData = this.getUpdateOneRelationInput(currentState, fieldState, persistedValue, processedPlaceholdersByEntity, placeholderName)\n\t\t\t\t\t\tif (relationData !== undefined) {\n\t\t\t\t\t\t\tresult[marker.parameters.field] = relationData\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst relationData = this.getUpdateManyRelationForReducedInput(currentState, fieldState, persistedValue, processedPlaceholdersByEntity, placeholderName, reducedBy)\n\t\t\t\t\t\tif (relationData !== undefined) {\n\t\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\t\tcurrent.push(...relationData)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresult[marker.parameters.field] = relationData\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase 'entityList': {\n\t\t\t\t\tconst marker = fieldState.blueprint.marker\n\t\t\t\t\tif (!(marker instanceof HasManyRelationMarker)) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst persistedEntityIds = entityData?.get?.(placeholderName) ?? new Set()\n\n\t\t\t\t\tif (!(persistedEntityIds instanceof Set)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst relationData = this.getUpdateManyRelationInput(fieldState, persistedEntityIds, processedPlaceholdersByEntity)\n\t\t\t\t\tif (relationData !== undefined) {\n\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\tcurrent.push(...relationData)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult[marker.parameters.field] = relationData\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn assertNever(fieldState)\n\t\t\t}\n\t\t}\n\n\t\treturn isEmptyObject(result) ? undefined : result\n\t}\n\n\tprivate getUpdateOneRelationInput(\n\t\tcurrentState: EntityRealmState,\n\t\tfieldState: EntityRealmState | EntityRealmStateStub,\n\t\tpersistedValue: EntityFieldPersistedData | undefined,\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tplaceholderName: PlaceholderName,\n\t): Input.UpdateOneRelationInput | undefined {\n\t\tconst runtimeId = fieldState.entity.id\n\t\tif (persistedValue instanceof ServerId) {\n\t\t\tif (persistedValue.value === runtimeId.value) {\n\t\t\t\t// The persisted and currently referenced ids match, and so this is an update.\n\t\t\t\tif (fieldState.type === 'entityRealmStub') {\n\t\t\t\t\treturn undefined// …unless we're dealing with a stub. There cannot be any updates there.\n\t\t\t\t}\n\t\t\t\tconst input = this.getUpdateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\t\t\tif (input === undefined) {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tupdate: input,\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// There was a referenced entity but currently, there is a different one. Let's investigate:\n\n\t\t\tconst plannedDeletion = currentState.plannedHasOneDeletions?.get(placeholderName)\n\t\t\tif (plannedDeletion !== undefined) {\n\t\t\t\t// It's planned for deletion.\n\t\t\t\t// TODO also potentially do something about the current entity\n\t\t\t\treturn {\n\t\t\t\t\tdelete: true,\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (runtimeId.existsOnServer) {\n\t\t\t\t// This isn't the persisted entity but it does exist on the server. Thus this is a connect.\n\t\t\t\t// TODO also potentially update\n\t\t\t\treturn {\n\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// The currently present entity doesn't exist on the server. Try if creating yields anything…\n\t\t\tconst createInput = this.getCreateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\t\tif (createInput !== undefined) {\n\t\t\t\treturn {\n\t\t\t\t\tcreate: createInput,\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// …but if it doesn't, we just disconnect.\n\t\t\t\treturn {\n\t\t\t\t\tdisconnect: true,\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (runtimeId.existsOnServer) {\n\t\t\t// There isn't a linked entity on the server but we're seeing one that exists there.\n\t\t\t// Thus this is a connect.\n\t\t\t// TODO also potentially update\n\t\t\treturn {\n\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t}\n\t\t} else {\n\t\t\tconst input = this.getCreateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\t\tif (input === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcreate: input,\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate getUpdateManyRelationForReducedInput(\n\t\tcurrentState: EntityRealmState,\n\t\tfieldState: EntityRealmState | EntityRealmStateStub,\n\t\tpersistedValue: EntityFieldPersistedData | undefined,\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t\tplaceholderName: PlaceholderName,\n\t\treducedBy: UniqueWhere,\n\t): Input.UpdateManyRelationInput | undefined {\n\n\t\tconst runtimeId = fieldState.entity.id\n\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\n\t\tif (persistedValue instanceof ServerId) {\n\t\t\tif (persistedValue.value === runtimeId.value) {\n\t\t\t\tif (fieldState.type === 'entityRealmStub') {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\tconst updateData = this.getUpdateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\t\t\tif (updateData === undefined) {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\treturn [{\n\t\t\t\t\talias,\n\t\t\t\t\tupdate: {\n\t\t\t\t\t\tby: replaceGraphQlLiteral(reducedBy),\n\t\t\t\t\t\tdata: updateData,\n\t\t\t\t\t},\n\t\t\t\t}]\n\t\t\t}\n\t\t\tconst plannedDeletion = currentState.plannedHasOneDeletions?.get(placeholderName)\n\t\t\tif (plannedDeletion !== undefined) {\n\t\t\t\t// TODO also potentially do something about the current entity\n\t\t\t\treturn [{\n\t\t\t\t\talias,\n\t\t\t\t\tdelete: replaceGraphQlLiteral(reducedBy),\n\t\t\t\t}]\n\t\t\t}\n\t\t\tif (runtimeId.existsOnServer) {\n\t\t\t\t// TODO will re-using the alias like this work?\n\t\t\t\t// TODO also potentially update\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tdisconnect: replaceGraphQlLiteral(reducedBy),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t}\n\t\t\tconst createInput = this.getCreateDataInput(processedPlaceholdersByEntity, fieldState)\n\n\t\t\tif (createInput === undefined) {\n\t\t\t\treturn [{\n\t\t\t\t\talias,\n\t\t\t\t\tdisconnect: replaceGraphQlLiteral(reducedBy),\n\t\t\t\t}]\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\talias,\n\t\t\t\tcreate: createInput,\n\t\t\t}]\n\t\t} else if (runtimeId.existsOnServer) {\n\t\t\treturn [{\n\t\t\t\talias,\n\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t}]\n\t\t} else {\n\t\t\tconst createInput = this.getCreateDataInput(processedPlaceholdersByEntity, fieldState)\n\t\t\tif (createInput === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\talias,\n\t\t\t\tcreate: createInput,\n\t\t\t}]\n\t\t}\n\t}\n\n\tprivate getUpdateManyRelationInput(\n\t\tfieldState: EntityListState,\n\t\tpersistedEntityIds: Set<EntityId>,\n\t\tprocessedPlaceholdersByEntity: ProcessedPlaceholdersByEntity,\n\t): Input.UpdateManyRelationInput | undefined {\n\n\t\tconst input: Input.UpdateManyRelationInput = []\n\t\tfor (const childState of fieldState.children.values()) {\n\t\t\tconst runtimeId = childState.entity.id\n\t\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\n\t\t\tif (runtimeId.existsOnServer) {\n\t\t\t\tif (persistedEntityIds.has(runtimeId.value)) {\n\t\t\t\t\tif (childState.type !== 'entityRealmStub') {\n\t\t\t\t\t\tconst dataInput = this.getUpdateDataInput(processedPlaceholdersByEntity, childState)\n\n\t\t\t\t\t\tif (dataInput !== undefined) {\n\t\t\t\t\t\t\tinput.push({\n\t\t\t\t\t\t\t\talias,\n\t\t\t\t\t\t\t\tupdate: {\n\t\t\t\t\t\t\t\t\tby: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t\t\t\t\t\tdata: dataInput,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst dataInput = this.getCreateDataInput(processedPlaceholdersByEntity, childState)\n\t\t\t\tif (dataInput !== undefined) {\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tcreate: dataInput,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (fieldState.plannedRemovals) {\n\t\t\tfor (const [removedId, removalType] of fieldState.plannedRemovals) {\n\t\t\t\tconst alias = MutationAlias.encodeEntityId(new ServerId(removedId, fieldState.entityName))\n\t\t\t\tif (removalType === 'delete') {\n\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tdelete: { [PRIMARY_KEY_NAME]: removedId },\n\t\t\t\t\t})\n\n\t\t\t\t} else if (removalType === 'disconnect') {\n\t\t\t\t\t// TODO also potentially update\n\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tdisconnect: { [PRIMARY_KEY_NAME]: removedId },\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tassertNever(removalType)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn input.length === 0 ? undefined : input\n\t}\n\n\n\tprivate createAlias(): string {\n\t\treturn `op_${this.aliasCounter++}`\n\t}\n}\n"],"names":["assertNever","getEntityMarker","builder","PRIMARY_KEY_NAME","QueryGenerator","StateIterator","placeholderName","TYPENAME_KEY_NAME","ClientGeneratedUuid","HasOneRelationMarker","BindingError","HasManyRelationMarker","isEmptyObject","GraphQlLiteral","replaceGraphQlLiteral","createData","MutationAlias","ServerId"],"mappings":";;;;;;;;;;;;AAmCO,MAAM,kBAAkB;AAAA,EAIvB,YACW,WACA,IAChB;AAFgB,SAAA,YAAA;AACA,SAAA,KAAA;AAJlB,kBAAA,MAAQ,gBAAe,CAAA;AAAA,E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