@ibgib/core-gib 0.0.4

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 (330) hide show
  1. package/.vscode/core-gib-snippets.code-snippets +189 -0
  2. package/.vscode/launch.json +24 -0
  3. package/.vscode/settings.json +56 -0
  4. package/.vscode/tasks.json +37 -0
  5. package/CHANGELOG.md +11 -0
  6. package/README.md +215 -0
  7. package/dist/common/aws-constants.d.mts +7 -0
  8. package/dist/common/aws-constants.d.mts.map +1 -0
  9. package/dist/common/aws-constants.mjs +7 -0
  10. package/dist/common/aws-constants.mjs.map +1 -0
  11. package/dist/common/bin/bin-types.d.mts +17 -0
  12. package/dist/common/bin/bin-types.d.mts.map +1 -0
  13. package/dist/common/bin/bin-types.mjs +3 -0
  14. package/dist/common/bin/bin-types.mjs.map +1 -0
  15. package/dist/common/cache/cache-types.d.mts +57 -0
  16. package/dist/common/cache/cache-types.d.mts.map +1 -0
  17. package/dist/common/cache/cache-types.mjs +2 -0
  18. package/dist/common/cache/cache-types.mjs.map +1 -0
  19. package/dist/common/comment/comment-constants.d.mts +11 -0
  20. package/dist/common/comment/comment-constants.d.mts.map +1 -0
  21. package/dist/common/comment/comment-constants.mjs +11 -0
  22. package/dist/common/comment/comment-constants.mjs.map +1 -0
  23. package/dist/common/comment/comment-helper.d.mts +59 -0
  24. package/dist/common/comment/comment-helper.d.mts.map +1 -0
  25. package/dist/common/comment/comment-helper.mjs +173 -0
  26. package/dist/common/comment/comment-helper.mjs.map +1 -0
  27. package/dist/common/comment/comment-types.d.mts +16 -0
  28. package/dist/common/comment/comment-types.d.mts.map +1 -0
  29. package/dist/common/comment/comment-types.mjs +2 -0
  30. package/dist/common/comment/comment-types.mjs.map +1 -0
  31. package/dist/common/display/display-helper.d.mts +19 -0
  32. package/dist/common/display/display-helper.d.mts.map +1 -0
  33. package/dist/common/display/display-helper.mjs +68 -0
  34. package/dist/common/display/display-helper.mjs.map +1 -0
  35. package/dist/common/display/display-types.d.mts +97 -0
  36. package/dist/common/display/display-types.d.mts.map +1 -0
  37. package/dist/common/display/display-types.mjs +37 -0
  38. package/dist/common/display/display-types.mjs.map +1 -0
  39. package/dist/common/encrypt/encrypt-constants.d.mts +27 -0
  40. package/dist/common/encrypt/encrypt-constants.d.mts.map +1 -0
  41. package/dist/common/encrypt/encrypt-constants.mjs +27 -0
  42. package/dist/common/encrypt/encrypt-constants.mjs.map +1 -0
  43. package/dist/common/encrypt/encrypt-types.d.mts +116 -0
  44. package/dist/common/encrypt/encrypt-types.d.mts.map +1 -0
  45. package/dist/common/encrypt/encrypt-types.mjs +9 -0
  46. package/dist/common/encrypt/encrypt-types.mjs.map +1 -0
  47. package/dist/common/error/error-constants.d.mts +9 -0
  48. package/dist/common/error/error-constants.d.mts.map +1 -0
  49. package/dist/common/error/error-constants.mjs +9 -0
  50. package/dist/common/error/error-constants.mjs.map +1 -0
  51. package/dist/common/error/error-helper.d.mts +43 -0
  52. package/dist/common/error/error-helper.d.mts.map +1 -0
  53. package/dist/common/error/error-helper.mjs +167 -0
  54. package/dist/common/error/error-helper.mjs.map +1 -0
  55. package/dist/common/error/error-types.d.mts +58 -0
  56. package/dist/common/error/error-types.d.mts.map +1 -0
  57. package/dist/common/error/error-types.mjs +2 -0
  58. package/dist/common/error/error-types.mjs.map +1 -0
  59. package/dist/common/form/form-helper.d.mts +97 -0
  60. package/dist/common/form/form-helper.d.mts.map +1 -0
  61. package/dist/common/form/form-helper.mjs +185 -0
  62. package/dist/common/form/form-helper.mjs.map +1 -0
  63. package/dist/common/form/form-items.d.mts +229 -0
  64. package/dist/common/form/form-items.d.mts.map +1 -0
  65. package/dist/common/form/form-items.mjs +63 -0
  66. package/dist/common/form/form-items.mjs.map +1 -0
  67. package/dist/common/import-export/import-export-types.d.mts +18 -0
  68. package/dist/common/import-export/import-export-types.d.mts.map +1 -0
  69. package/dist/common/import-export/import-export-types.mjs +2 -0
  70. package/dist/common/import-export/import-export-types.mjs.map +1 -0
  71. package/dist/common/legacy/legacy-types.d.mts +2 -0
  72. package/dist/common/legacy/legacy-types.d.mts.map +1 -0
  73. package/dist/common/legacy/legacy-types.mjs +2 -0
  74. package/dist/common/legacy/legacy-types.mjs.map +1 -0
  75. package/dist/common/link/link-constants.d.mts +2 -0
  76. package/dist/common/link/link-constants.d.mts.map +1 -0
  77. package/dist/common/link/link-constants.mjs +2 -0
  78. package/dist/common/link/link-constants.mjs.map +1 -0
  79. package/dist/common/link/link-helper.d.mts +37 -0
  80. package/dist/common/link/link-helper.d.mts.map +1 -0
  81. package/dist/common/link/link-helper.mjs +143 -0
  82. package/dist/common/link/link-helper.mjs.map +1 -0
  83. package/dist/common/link/link-types.d.mts +14 -0
  84. package/dist/common/link/link-types.d.mts.map +1 -0
  85. package/dist/common/link/link-types.mjs +2 -0
  86. package/dist/common/link/link-types.mjs.map +1 -0
  87. package/dist/common/other/graph-helper.d.mts +166 -0
  88. package/dist/common/other/graph-helper.d.mts.map +1 -0
  89. package/dist/common/other/graph-helper.mjs +710 -0
  90. package/dist/common/other/graph-helper.mjs.map +1 -0
  91. package/dist/common/other/ibgib-helper.d.mts +245 -0
  92. package/dist/common/other/ibgib-helper.d.mts.map +1 -0
  93. package/dist/common/other/ibgib-helper.mjs +641 -0
  94. package/dist/common/other/ibgib-helper.mjs.map +1 -0
  95. package/dist/common/other/other-constants.d.mts +53 -0
  96. package/dist/common/other/other-constants.d.mts.map +1 -0
  97. package/dist/common/other/other-constants.mjs +67 -0
  98. package/dist/common/other/other-constants.mjs.map +1 -0
  99. package/dist/common/other/other-types.d.mts +166 -0
  100. package/dist/common/other/other-types.d.mts.map +1 -0
  101. package/dist/common/other/other-types.mjs +30 -0
  102. package/dist/common/other/other-types.mjs.map +1 -0
  103. package/dist/common/other/svg-constants.d.mts +2 -0
  104. package/dist/common/other/svg-constants.d.mts.map +1 -0
  105. package/dist/common/other/svg-constants.mjs +2 -0
  106. package/dist/common/other/svg-constants.mjs.map +1 -0
  107. package/dist/common/other/svg-helper.d.mts +54 -0
  108. package/dist/common/other/svg-helper.d.mts.map +1 -0
  109. package/dist/common/other/svg-helper.mjs +170 -0
  110. package/dist/common/other/svg-helper.mjs.map +1 -0
  111. package/dist/common/pic/pic-constants.d.mts +13 -0
  112. package/dist/common/pic/pic-constants.d.mts.map +1 -0
  113. package/dist/common/pic/pic-constants.mjs +13 -0
  114. package/dist/common/pic/pic-constants.mjs.map +1 -0
  115. package/dist/common/pic/pic-helper.d.mts +70 -0
  116. package/dist/common/pic/pic-helper.d.mts.map +1 -0
  117. package/dist/common/pic/pic-helper.mjs +235 -0
  118. package/dist/common/pic/pic-helper.mjs.map +1 -0
  119. package/dist/common/pic/pic-types.d.mts +23 -0
  120. package/dist/common/pic/pic-types.d.mts.map +1 -0
  121. package/dist/common/pic/pic-types.mjs +2 -0
  122. package/dist/common/pic/pic-types.mjs.map +1 -0
  123. package/dist/common/root/root-constants.d.mts +40 -0
  124. package/dist/common/root/root-constants.d.mts.map +1 -0
  125. package/dist/common/root/root-constants.mjs +40 -0
  126. package/dist/common/root/root-constants.mjs.map +1 -0
  127. package/dist/common/root/root-types.d.mts +9 -0
  128. package/dist/common/root/root-types.d.mts.map +1 -0
  129. package/dist/common/root/root-types.mjs +2 -0
  130. package/dist/common/root/root-types.mjs.map +1 -0
  131. package/dist/common/tag/tag-constants.d.mts +21 -0
  132. package/dist/common/tag/tag-constants.d.mts.map +1 -0
  133. package/dist/common/tag/tag-constants.mjs +28 -0
  134. package/dist/common/tag/tag-constants.mjs.map +1 -0
  135. package/dist/common/tag/tag-types.d.mts +14 -0
  136. package/dist/common/tag/tag-types.d.mts.map +1 -0
  137. package/dist/common/tag/tag-types.mjs +2 -0
  138. package/dist/common/tag/tag-types.mjs.map +1 -0
  139. package/dist/core-constants.d.mts +89 -0
  140. package/dist/core-constants.d.mts.map +1 -0
  141. package/dist/core-constants.mjs +484 -0
  142. package/dist/core-constants.mjs.map +1 -0
  143. package/dist/core-helper.d.mts +6 -0
  144. package/dist/core-helper.d.mts.map +1 -0
  145. package/dist/core-helper.mjs +28 -0
  146. package/dist/core-helper.mjs.map +1 -0
  147. package/dist/core-types.d.mts +520 -0
  148. package/dist/core-types.d.mts.map +1 -0
  149. package/dist/core-types.mjs +2 -0
  150. package/dist/core-types.mjs.map +1 -0
  151. package/dist/index.d.mts +2 -0
  152. package/dist/index.d.mts.map +1 -0
  153. package/dist/index.mjs +3 -0
  154. package/dist/index.mjs.map +1 -0
  155. package/dist/witness/app/app-base-v1.d.mts +130 -0
  156. package/dist/witness/app/app-base-v1.d.mts.map +1 -0
  157. package/dist/witness/app/app-base-v1.mjs +462 -0
  158. package/dist/witness/app/app-base-v1.mjs.map +1 -0
  159. package/dist/witness/app/app-constants.d.mts +10 -0
  160. package/dist/witness/app/app-constants.d.mts.map +1 -0
  161. package/dist/witness/app/app-constants.mjs +13 -0
  162. package/dist/witness/app/app-constants.mjs.map +1 -0
  163. package/dist/witness/app/app-helper.d.mts +85 -0
  164. package/dist/witness/app/app-helper.d.mts.map +1 -0
  165. package/dist/witness/app/app-helper.mjs +258 -0
  166. package/dist/witness/app/app-helper.mjs.map +1 -0
  167. package/dist/witness/app/app-types.d.mts +211 -0
  168. package/dist/witness/app/app-types.d.mts.map +1 -0
  169. package/dist/witness/app/app-types.mjs +49 -0
  170. package/dist/witness/app/app-types.mjs.map +1 -0
  171. package/dist/witness/app/chat-app/chat-app-types.d.mts +18 -0
  172. package/dist/witness/app/chat-app/chat-app-types.d.mts.map +1 -0
  173. package/dist/witness/app/chat-app/chat-app-types.mjs +25 -0
  174. package/dist/witness/app/chat-app/chat-app-types.mjs.map +1 -0
  175. package/dist/witness/app/flash-app/flash-app-types.d.mts +16 -0
  176. package/dist/witness/app/flash-app/flash-app-types.d.mts.map +1 -0
  177. package/dist/witness/app/flash-app/flash-app-types.mjs +23 -0
  178. package/dist/witness/app/flash-app/flash-app-types.mjs.map +1 -0
  179. package/dist/witness/app/raw-app/raw-app-types.d.mts +18 -0
  180. package/dist/witness/app/raw-app/raw-app-types.d.mts.map +1 -0
  181. package/dist/witness/app/raw-app/raw-app-types.mjs +25 -0
  182. package/dist/witness/app/raw-app/raw-app-types.mjs.map +1 -0
  183. package/dist/witness/app/todo-app/todo-app-types.d.ts +33 -0
  184. package/dist/witness/app/todo-app/todo-app-types.d.ts.map +1 -0
  185. package/dist/witness/app/todo-app/todo-app-types.js +31 -0
  186. package/dist/witness/app/todo-app/todo-app-types.js.map +1 -0
  187. package/dist/witness/robbot/robbot-base-v1.d.ts +432 -0
  188. package/dist/witness/robbot/robbot-base-v1.d.ts.map +1 -0
  189. package/dist/witness/robbot/robbot-base-v1.js +1407 -0
  190. package/dist/witness/robbot/robbot-base-v1.js.map +1 -0
  191. package/dist/witness/robbot/robbot-constants.d.mts +24 -0
  192. package/dist/witness/robbot/robbot-constants.d.mts.map +1 -0
  193. package/dist/witness/robbot/robbot-constants.mjs +24 -0
  194. package/dist/witness/robbot/robbot-constants.mjs.map +1 -0
  195. package/dist/witness/robbot/robbot-helper.d.mts +152 -0
  196. package/dist/witness/robbot/robbot-helper.d.mts.map +1 -0
  197. package/dist/witness/robbot/robbot-helper.mjs +609 -0
  198. package/dist/witness/robbot/robbot-helper.mjs.map +1 -0
  199. package/dist/witness/robbot/robbot-types.d.mts +539 -0
  200. package/dist/witness/robbot/robbot-types.d.mts.map +1 -0
  201. package/dist/witness/robbot/robbot-types.mjs +294 -0
  202. package/dist/witness/robbot/robbot-types.mjs.map +1 -0
  203. package/dist/witness/space/bootstrap/bootstrap-constants.d.mts +14 -0
  204. package/dist/witness/space/bootstrap/bootstrap-constants.d.mts.map +1 -0
  205. package/dist/witness/space/bootstrap/bootstrap-constants.mjs +15 -0
  206. package/dist/witness/space/bootstrap/bootstrap-constants.mjs.map +1 -0
  207. package/dist/witness/space/inner-space-v1.d.ts +63 -0
  208. package/dist/witness/space/inner-space-v1.d.ts.map +1 -0
  209. package/dist/witness/space/inner-space-v1.js +356 -0
  210. package/dist/witness/space/inner-space-v1.js.map +1 -0
  211. package/dist/witness/space/outer-space/outer-space-constants.d.mts +2 -0
  212. package/dist/witness/space/outer-space/outer-space-constants.d.mts.map +1 -0
  213. package/dist/witness/space/outer-space/outer-space-constants.mjs +2 -0
  214. package/dist/witness/space/outer-space/outer-space-constants.mjs.map +1 -0
  215. package/dist/witness/space/outer-space/outer-space-helper.d.mts +28 -0
  216. package/dist/witness/space/outer-space/outer-space-helper.d.mts.map +1 -0
  217. package/dist/witness/space/outer-space/outer-space-helper.mjs +87 -0
  218. package/dist/witness/space/outer-space/outer-space-helper.mjs.map +1 -0
  219. package/dist/witness/space/outer-space/outer-space-types.d.mts +548 -0
  220. package/dist/witness/space/outer-space/outer-space-types.d.mts.map +1 -0
  221. package/dist/witness/space/outer-space/outer-space-types.mjs +118 -0
  222. package/dist/witness/space/outer-space/outer-space-types.mjs.map +1 -0
  223. package/dist/witness/space/space-base-v1.d.mts +147 -0
  224. package/dist/witness/space/space-base-v1.d.mts.map +1 -0
  225. package/dist/witness/space/space-base-v1.mjs +350 -0
  226. package/dist/witness/space/space-base-v1.mjs.map +1 -0
  227. package/dist/witness/space/space-constants.d.mts +181 -0
  228. package/dist/witness/space/space-constants.d.mts.map +1 -0
  229. package/dist/witness/space/space-constants.mjs +192 -0
  230. package/dist/witness/space/space-constants.mjs.map +1 -0
  231. package/dist/witness/space/space-helper.d.mts +666 -0
  232. package/dist/witness/space/space-helper.d.mts.map +1 -0
  233. package/dist/witness/space/space-helper.mjs +2830 -0
  234. package/dist/witness/space/space-helper.mjs.map +1 -0
  235. package/dist/witness/space/space-types.d.mts +422 -0
  236. package/dist/witness/space/space-types.d.mts.map +1 -0
  237. package/dist/witness/space/space-types.mjs +52 -0
  238. package/dist/witness/space/space-types.mjs.map +1 -0
  239. package/dist/witness/witness-base-v1.d.ts +144 -0
  240. package/dist/witness/witness-base-v1.d.ts.map +1 -0
  241. package/dist/witness/witness-base-v1.js +300 -0
  242. package/dist/witness/witness-base-v1.js.map +1 -0
  243. package/dist/witness/witness-constants.d.mts +3 -0
  244. package/dist/witness/witness-constants.d.mts.map +1 -0
  245. package/dist/witness/witness-constants.mjs +3 -0
  246. package/dist/witness/witness-constants.mjs.map +1 -0
  247. package/dist/witness/witness-form-builder.d.mts +45 -0
  248. package/dist/witness/witness-form-builder.d.mts.map +1 -0
  249. package/dist/witness/witness-form-builder.mjs +95 -0
  250. package/dist/witness/witness-form-builder.mjs.map +1 -0
  251. package/dist/witness/witness-helper.d.mts +89 -0
  252. package/dist/witness/witness-helper.d.mts.map +1 -0
  253. package/dist/witness/witness-helper.mjs +229 -0
  254. package/dist/witness/witness-helper.mjs.map +1 -0
  255. package/dist/witness/witness-types.d.mts +211 -0
  256. package/dist/witness/witness-types.d.mts.map +1 -0
  257. package/dist/witness/witness-types.mjs +2 -0
  258. package/dist/witness/witness-types.mjs.map +1 -0
  259. package/jasmine-browser.json +18 -0
  260. package/jasmine.json +6 -0
  261. package/package.json +67 -0
  262. package/src/assumptions.spec.mts +45 -0
  263. package/src/common/aws-constants.mts +5 -0
  264. package/src/common/bin/bin-types.mts +17 -0
  265. package/src/common/cache/cache-types.mts +53 -0
  266. package/src/common/comment/comment-constants.mts +10 -0
  267. package/src/common/comment/comment-helper.mts +211 -0
  268. package/src/common/comment/comment-types.mts +19 -0
  269. package/src/common/display/display-helper.mts +88 -0
  270. package/src/common/display/display-types.mts +108 -0
  271. package/src/common/encrypt/encrypt-constants.mts +28 -0
  272. package/src/common/encrypt/encrypt-types.mts +130 -0
  273. package/src/common/error/error-constants.mts +8 -0
  274. package/src/common/error/error-helper.mts +155 -0
  275. package/src/common/error/error-types.mts +62 -0
  276. package/src/common/form/form-helper.mts +253 -0
  277. package/src/common/form/form-items.mts +236 -0
  278. package/src/common/import-export/import-export-types.mts +18 -0
  279. package/src/common/legacy/about-legacy.md +0 -0
  280. package/src/common/legacy/legacy-types.mts +0 -0
  281. package/src/common/link/link-constants.mts +1 -0
  282. package/src/common/link/link-helper.mts +155 -0
  283. package/src/common/link/link-types.mts +16 -0
  284. package/src/common/other/graph-helper.mts +853 -0
  285. package/src/common/other/ibgib-helper.mts +671 -0
  286. package/src/common/other/other-constants.mts +76 -0
  287. package/src/common/other/other-types.mts +186 -0
  288. package/src/common/other/svg-constants.mts +1 -0
  289. package/src/common/other/svg-helper.mts +238 -0
  290. package/src/common/pic/pic-constants.mts +13 -0
  291. package/src/common/pic/pic-helper.mts +295 -0
  292. package/src/common/pic/pic-types.mts +29 -0
  293. package/src/common/root/root-constants.mts +41 -0
  294. package/src/common/root/root-types.mts +8 -0
  295. package/src/common/tag/tag-constants.mts +34 -0
  296. package/src/common/tag/tag-types.mts +19 -0
  297. package/src/core-constants.mts +506 -0
  298. package/src/core-helper.mts +33 -0
  299. package/src/core-types.mts +519 -0
  300. package/src/helper.spec.mts +64 -0
  301. package/src/index.mts +1 -0
  302. package/src/witness/app/app-base-v1.mts +584 -0
  303. package/src/witness/app/app-constants.mts +16 -0
  304. package/src/witness/app/app-helper.mts +322 -0
  305. package/src/witness/app/app-types.mts +252 -0
  306. package/src/witness/app/chat-app/chat-app-types.mts +40 -0
  307. package/src/witness/app/flash-app/flash-app-types.mts +38 -0
  308. package/src/witness/app/raw-app/raw-app-types.mts +40 -0
  309. package/src/witness/app/todo-app/todo-app-types.ts +59 -0
  310. package/src/witness/robbot/robbot-base-v1.ts +1531 -0
  311. package/src/witness/robbot/robbot-constants.mts +25 -0
  312. package/src/witness/robbot/robbot-helper.mts +676 -0
  313. package/src/witness/robbot/robbot-helper.spec.mts +135 -0
  314. package/src/witness/robbot/robbot-types.mts +797 -0
  315. package/src/witness/space/bootstrap/bootstrap-constants.mts +15 -0
  316. package/src/witness/space/inner-space-v1.ts +372 -0
  317. package/src/witness/space/outer-space/outer-space-constants.mts +1 -0
  318. package/src/witness/space/outer-space/outer-space-helper.mts +91 -0
  319. package/src/witness/space/outer-space/outer-space-types.mts +627 -0
  320. package/src/witness/space/space-base-v1.mts +414 -0
  321. package/src/witness/space/space-constants.mts +208 -0
  322. package/src/witness/space/space-helper.mts +3242 -0
  323. package/src/witness/space/space-types.mts +476 -0
  324. package/src/witness/witness-base-v1.ts +325 -0
  325. package/src/witness/witness-constants.mts +2 -0
  326. package/src/witness/witness-form-builder.mts +128 -0
  327. package/src/witness/witness-helper.mts +256 -0
  328. package/src/witness/witness-types.mts +249 -0
  329. package/tsconfig.json +15 -0
  330. package/tsconfig.test.json +10 -0
@@ -0,0 +1,548 @@
1
+ /**
2
+ * @module outer-space
3
+ * Outer spaces are spaces connecting local inner spaces.
4
+ * ATOW there is just sync spaces, but definitely just the beginning.
5
+ *
6
+ * ## on future implementations, CRDT-like behavior
7
+ *
8
+ * I just realized that when merging, I can actually create a meta transform
9
+ * ibgib to maintain the order of transforms.
10
+ */
11
+ import { ReplaySubject, Subscription } from 'rxjs';
12
+ import { IbGibRel8ns_V1, IbGib_V1 } from '@ibgib/ts-gib/dist/V1/index.mjs';
13
+ import { IbGibAddr, IbGib, Gib } from '@ibgib/ts-gib';
14
+ import { IbGibSpaceData, IbGibSpaceRel8ns, IbGibSpaceOptionsData, IbGibSpaceOptionsRel8ns, IbGibSpaceOptionsIbGib, IbGibSpaceOptionsCmdModifier, IbGibSpaceResultData, IbGibSpaceResultRel8ns, IbGibSpaceResultIbGib } from '../space-types.mjs';
15
+ import { IbGibSpaceAny } from '../space-base-v1.mjs';
16
+ import { CIPHERTEXT_REL8N_NAME } from '../../../common/encrypt/encrypt-constants.mjs';
17
+ import { CONSENSUS_REL8N_NAME } from '../../../common/other/other-constants.mjs';
18
+ /**
19
+ * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
20
+ *
21
+ * ## driving use case
22
+ *
23
+ * I'm adding this for tracking status for longer-running inter-spatial
24
+ * communications. Specifically, I'm working on the first aws dynamo db
25
+ * sync space.
26
+ *
27
+ * ## notes
28
+ *
29
+ * * I think http status codes do a pretty good job of protocol information
30
+ * exchange.
31
+ * * The only non-standard status code I'm doing ATOW is 0 meaning "undefined".
32
+ * * I'm adding (whitelisting) codes as I use them.
33
+ * * Note that sections of code check for validation of membership here and
34
+ * will error if not present.
35
+ */
36
+ export type StatusCode = 'undefined' | 'preparing' | 'started' | 'inserted' | 'updated' | 'merged_dna' | 'merged_state' | 'already_synced' | 'completed';
37
+ export declare const StatusCode: {
38
+ /**
39
+ * Using this as the code for the parent primitive.
40
+ */
41
+ undefined: StatusCode;
42
+ /**
43
+ * gt
44
+ */
45
+ preparing: StatusCode;
46
+ /**
47
+ * Communication between spaces has just started, but no evaluation as to
48
+ * intrinsic ibgibs shared has been made.
49
+ *
50
+ * Using this for the start of the sync process, meaning the ball has begun
51
+ * rolling, a metadata ibgib to track the operation has been created (but
52
+ * not necessarily yet stored), but no intrinsic (non-meta) data has been
53
+ * exchanged.
54
+ */
55
+ started: StatusCode;
56
+ /**
57
+ * New insertion of ibgib(s) into the outerspace.
58
+ *
59
+ * The outerspace did not have the timeline or ibgib(s) at all, so this is
60
+ * the first time.
61
+ */
62
+ inserted: StatusCode;
63
+ /**
64
+ * Updated outerspace with local ibgib(s).
65
+ *
66
+ * The outerspace had the same timeline as the local space, just not as
67
+ * recent.
68
+ */
69
+ updated: StatusCode;
70
+ /**
71
+ * When syncing, this means that we've created new ibgib to merge into an
72
+ * existing timeline in the sync space BY APPLYING ALL UN-APPLIED LOCAL
73
+ * TRANSFORMS to the latest ibgib in the store.
74
+ *
75
+ * Note that in this case, we've created new ibgib to fulfill the operation
76
+ * (besides the derivative metadata ibgibs created in the communication).
77
+ */
78
+ merged_dna: StatusCode;
79
+ /**
80
+ * When syncing, this means that we've created new ibgib to merge into an
81
+ * existing timeline in the sync space BY MANUALLY SYNCHRONIZING ALL
82
+ * DATA AND REL8NS with the latest ibgib in the store.
83
+ *
84
+ * Note that in this case, we've created new ibgib to fulfill the operation
85
+ * (besides the derivative metadata ibgibs created in the communication).
86
+ */
87
+ merged_state: StatusCode;
88
+ /**
89
+ * The operation has completed, but there were no intrinsic changes.
90
+ *
91
+ * For example, if we were to sync an ibGib but it's already up-to-date in a
92
+ * space, then we have generated metadata ibgibs. But *intrinsically* we have
93
+ * not altered any timeline ibgibs or added any stone ibgibs.
94
+ */
95
+ already_synced: StatusCode;
96
+ /**
97
+ * Inter-spatial communication complete.
98
+ *
99
+ * * There should be no more status updates after this.
100
+ * * syncStatus$ observable should be completed just after this.
101
+ * * subscribers should unsubscribe if not already done.
102
+ * * I think this happens at the publishing end also, but always good
103
+ * to take care of your own cleanup if possible.
104
+ *
105
+ */
106
+ completed: StatusCode;
107
+ };
108
+ export type OuterSpaceType = "sync";
109
+ export declare const OuterSpaceType: {
110
+ sync: "sync";
111
+ };
112
+ export declare const VALID_OUTER_SPACE_TYPES: "sync"[];
113
+ export type SyncSpaceSubtype = 'aws-dynamodb';
114
+ export declare const SyncSpaceSubtype: {
115
+ aws_dynamodb: "aws-dynamodb";
116
+ };
117
+ export type OuterSpaceSubtype = 'tbd' | SyncSpaceSubtype;
118
+ export declare const OuterSpaceSubtype: {
119
+ aws_dynamodb: "aws-dynamodb";
120
+ tbd: OuterSpaceSubtype;
121
+ };
122
+ export declare const VALID_OUTER_SPACE_SUBTYPES: OuterSpaceSubtype[];
123
+ export interface OuterSpaceData extends IbGibSpaceData {
124
+ type: OuterSpaceType;
125
+ subtype: OuterSpaceSubtype;
126
+ }
127
+ export interface OuterSpaceRel8ns extends IbGibSpaceRel8ns {
128
+ [CIPHERTEXT_REL8N_NAME]?: IbGibAddr[];
129
+ /**
130
+ * ATOW this will only be CONSENSUS_ADDR_SYNC_NAIVE_PUT_MERGE
131
+ */
132
+ [CONSENSUS_REL8N_NAME]?: IbGibAddr[];
133
+ }
134
+ export interface OuterSpaceIbGib extends IbGib_V1<OuterSpaceData, OuterSpaceRel8ns> {
135
+ }
136
+ export interface SyncSpaceData extends OuterSpaceData {
137
+ type: 'sync';
138
+ subtype: SyncSpaceSubtype;
139
+ }
140
+ export interface SyncSpaceRel8ns extends OuterSpaceRel8ns {
141
+ }
142
+ export interface ParticipantInfo {
143
+ id: string;
144
+ gib: Gib;
145
+ s_d: 'src' | 'dest';
146
+ }
147
+ /**
148
+ * Options shape specific to OuterSpaces.
149
+ * Marker interface only atm.
150
+ */
151
+ export interface OuterSpaceOptionsData extends IbGibSpaceOptionsData {
152
+ /**
153
+ * Operation id across multiple spaces.
154
+ *
155
+ * ## notes
156
+ *
157
+ * If src/local space is communicating with more than one
158
+ * other space, then this can be used to coordinate among
159
+ * all of them. If there are only two spaces, then the
160
+ * gib of the individual status ibgib is just as uniquely
161
+ * identifying.
162
+ */
163
+ multiSpaceOpId?: string;
164
+ /**
165
+ * Modifying flags for cmd routing for the associated cmd ibGib.
166
+ */
167
+ cmdModifiers?: (OuterSpaceOptionsCmdModifier | string)[];
168
+ /**
169
+ * This id is used when communicating between two spaces. During that
170
+ * communication, multiple ibgibs will be passed back and forth, and this
171
+ * `sagaId` will be common among those messages.
172
+ *
173
+ * There is also an id that is common to operations that
174
+ * refer to multiple spaces. {@see multiSpaceOpId}
175
+ */
176
+ sagaId?: string;
177
+ /**
178
+ * Info of the participating spaces (as endpoints) in the communication.
179
+ */
180
+ participants?: ParticipantInfo[];
181
+ }
182
+ export interface OuterSpaceOptionsRel8ns extends IbGibSpaceOptionsRel8ns {
183
+ }
184
+ export interface OuterSpaceOptionsIbGib<TIbGib extends IbGib = IbGib_V1, TOptsData extends OuterSpaceOptionsData = OuterSpaceOptionsData, TOptsRel8ns extends OuterSpaceOptionsRel8ns = OuterSpaceOptionsRel8ns> extends IbGibSpaceOptionsIbGib<TIbGib, TOptsData, TOptsRel8ns> {
185
+ }
186
+ export interface OuterSpaceResultData extends IbGibSpaceResultData {
187
+ /**
188
+ * If the space operation involves a saga, this is the id.
189
+ */
190
+ sagaId?: string;
191
+ }
192
+ export interface OuterSpaceResultRel8ns extends IbGibSpaceResultRel8ns {
193
+ }
194
+ export interface OuterSpaceResultIbGib<TIbGib extends IbGib, TResultData extends OuterSpaceResultData, TResultRel8ns extends OuterSpaceResultRel8ns> extends IbGibSpaceResultIbGib<TIbGib, TResultData, TResultRel8ns> {
195
+ }
196
+ /**
197
+ * Marker atm.
198
+ *
199
+ * {@see IbGibSpaceOptionsCmdModifier}
200
+ */
201
+ export type OuterSpaceOptionsCmdModifier = IbGibSpaceOptionsCmdModifier;
202
+ /**
203
+ * Marker atm.
204
+ *
205
+ * {@see IbGibSpaceOptionsCmdModifier}
206
+ */
207
+ export declare const OuterSpaceOptionsCmdModifier: {
208
+ can: IbGibSpaceOptionsCmdModifier;
209
+ addrs: IbGibSpaceOptionsCmdModifier;
210
+ latest: IbGibSpaceOptionsCmdModifier;
211
+ watch: IbGibSpaceOptionsCmdModifier;
212
+ unwatch: IbGibSpaceOptionsCmdModifier;
213
+ tjps: IbGibSpaceOptionsCmdModifier;
214
+ };
215
+ /**
216
+ * Extends basic ibgib space options cmd modifiers to include sync specific ones.
217
+ *
218
+ * {@see IbGibSpaceOptionsCmdModifier}
219
+ * {@see OuterSpaceOptionsCmdModifier}
220
+ */
221
+ export type SyncSpaceOptionsCmdModifier = OuterSpaceOptionsCmdModifier | 'sync';
222
+ /**
223
+ * Flags to affect the command's interpretation.
224
+ *
225
+ * {@see IbGibSpaceOptionsCmdModifier}
226
+ * {@see OuterSpaceOptionsCmdModifier}
227
+ */
228
+ export declare const SyncSpaceOptionsCmdModifier: {
229
+ /**
230
+ * special type of 'put' operation that will start a sync process.
231
+ */
232
+ sync: SyncSpaceOptionsCmdModifier;
233
+ can: IbGibSpaceOptionsCmdModifier;
234
+ addrs: IbGibSpaceOptionsCmdModifier;
235
+ latest: IbGibSpaceOptionsCmdModifier;
236
+ watch: IbGibSpaceOptionsCmdModifier;
237
+ unwatch: IbGibSpaceOptionsCmdModifier;
238
+ tjps: IbGibSpaceOptionsCmdModifier;
239
+ };
240
+ export interface SyncSpaceOptionsData extends OuterSpaceOptionsData {
241
+ /**
242
+ * Extends inherited
243
+ */
244
+ cmdModifiers?: (SyncSpaceOptionsCmdModifier | string)[];
245
+ /**
246
+ * Each Sync has a status ibGib that tracks the progress of the
247
+ * overall sync operation (saga).
248
+ *
249
+ *
250
+ * If this is specified, then it means the sync cmd is associated with
251
+ * an existing/ongoing operation.
252
+ */
253
+ tjpGib?: Gib;
254
+ ibGibAddrs_All_Tjps?: IbGibAddr[];
255
+ ibGibAddrs_All_NonTjps?: IbGibAddr[];
256
+ }
257
+ export interface SyncSpaceOptionsRel8ns extends OuterSpaceOptionsRel8ns {
258
+ }
259
+ export interface SyncSpaceOptionsIbGib<TIbGib extends IbGib = IbGib_V1, TOptsData extends SyncSpaceOptionsData = SyncSpaceOptionsData, TOptsRel8ns extends SyncSpaceOptionsRel8ns = SyncSpaceOptionsRel8ns> extends OuterSpaceOptionsIbGib<TIbGib, TOptsData, TOptsRel8ns> {
260
+ /**
261
+ * Produces status ibgibs or error strings.
262
+ */
263
+ syncSagaInfo: SyncSagaInfo;
264
+ }
265
+ export interface SyncSpaceResultData extends OuterSpaceResultData {
266
+ statusTjpAddr?: IbGibAddr;
267
+ }
268
+ export interface SyncSpaceResultRel8ns extends OuterSpaceResultRel8ns {
269
+ }
270
+ export interface SyncSpaceResultIbGib<TIbGib extends IbGib = IbGib_V1, TResultData extends SyncSpaceResultData = SyncSpaceResultData, TResultRel8ns extends SyncSpaceResultRel8ns = SyncSpaceResultRel8ns> extends OuterSpaceResultIbGib<TIbGib, TResultData, TResultRel8ns> {
271
+ /**
272
+ * Produces status ibgibs or error strings.
273
+ */
274
+ syncSagaInfo: SyncSagaInfo;
275
+ }
276
+ export interface SyncStatusData {
277
+ /**
278
+ * Status code for this status update.
279
+ *
280
+ * Note that this is also in the ib, which will be in each of the
281
+ * statuses' `past` rel8n. This way, callers can easily tell which
282
+ * kinds of actions were required.
283
+ */
284
+ statusCode: StatusCode;
285
+ syncGib: string;
286
+ participants: ParticipantInfo[];
287
+ /**
288
+ * Explicit re-declaration from base data, just to remind us...I guess...
289
+ *
290
+ * This indicates if this status ibgib is the tjp for the status line.
291
+ */
292
+ isTjp?: boolean;
293
+ /**
294
+ * When putting, this is the list of ibGibs to send.
295
+ *
296
+ * ## notes
297
+ *
298
+ * Maybe the receiver needs all of these, maybe it doesn't.
299
+ */
300
+ toTx?: IbGibAddr[];
301
+ /**
302
+ * When putting, this is the list of ibGibs we don't need/want (or refuse)
303
+ * to send.
304
+ *
305
+ * IGNORED ATOW
306
+ *
307
+ * ## notes
308
+ *
309
+ * Not really sure about this atow, since the aws-dynamo space is not a true
310
+ * communication between two separate nodes. Just figure someone will have a
311
+ * reason for it in the future.
312
+ */
313
+ notToTx?: IbGibAddr[];
314
+ /**
315
+ * When communicating, the receiver is asking the sender for
316
+ * these ibGibs.
317
+ *
318
+ * ## notes
319
+ *
320
+ * ATOW this indicates only that the receiver does not have
321
+ * these addresses.
322
+ */
323
+ toRx?: IbGibAddr[];
324
+ /**
325
+ * A receiving space can set this to indicate to the transmitter that it
326
+ * does not need/want these, possibly because they already have them or just
327
+ * are not interested in them.
328
+ *
329
+ * ## notes
330
+ *
331
+ * ATOW this will only be because the receiver already has these addresses.
332
+ */
333
+ notToRx?: IbGibAddr[];
334
+ /**
335
+ * Flag to indicate that THIS STEP in communication (part of a saga) had no
336
+ * errors.
337
+ */
338
+ success?: boolean;
339
+ /**
340
+ * If this is true, then the tx/rx inter-space saga is marked
341
+ * as complete and this status ibgib should be the last one.
342
+ */
343
+ complete?: boolean;
344
+ /**
345
+ * List of warnings for THIS STEP in the inter-spatial communication.
346
+ *
347
+ * Should NOT be an accumulating list of warnings, i.e., if a warning
348
+ * happens early on in a tx/rx, then it stays on that ibGib.
349
+ */
350
+ warnings?: string[];
351
+ /**
352
+ * List of errors for THIS STEP in the inter-spatial communication.
353
+ *
354
+ * Should NOT be an accumulating list of errors, i.e., if an error happens
355
+ * early on in a tx/rx, then it stays on that ibGib.
356
+ *
357
+ * ## notes
358
+ *
359
+ * atow my error workflow is pretty minimal. So I think if any error happens
360
+ * the entire saga gets nixed...
361
+ *
362
+ * But it should be that this type of behavior should be determined by
363
+ * on-chain ibgibs that correspond to consensus behavior contracts (with a
364
+ * default behavior ultimately existing hard-coded in source).
365
+ */
366
+ errors?: string[];
367
+ /**
368
+ * List of ibgib addrs that were newly created specifically for this
369
+ * space operation.
370
+ *
371
+ * ATOW, this means that there was a merged timeline event and
372
+ * the receiving space dynamically applied dna to its existing
373
+ * timeline.
374
+ *
375
+ * ## notes
376
+ *
377
+ * * This should not include status metadata ibgibs, as this is
378
+ * already captured in the `past` rel8n.
379
+ */
380
+ didCreate?: IbGibAddr[];
381
+ /**
382
+ * List of ibgib addrs that were merged in the rx space instead of stored
383
+ * directly.
384
+ *
385
+ * Tx space may choose to somehow mark these as orphaned or whatever seems
386
+ * best per use case. (i.e. I haven't coded that yet even in this naive
387
+ * first implementation)
388
+ */
389
+ didMergeMap?: {
390
+ [oldAddr: string]: IbGibAddr;
391
+ };
392
+ /**
393
+ * List of ibgibs that were actively transmitted to the receiving
394
+ * space.
395
+ *
396
+ * ## notes
397
+ *
398
+ * * It could be that the receiving space received the ibgib,
399
+ * but that it already had it. It may have been unsure if it
400
+ * had it based on the algorithms in play.
401
+ * * An empty array upon completion of a communication saga
402
+ * indicates that the receiving space already had all of the
403
+ * ibgibs attempted to be sent, i.e., it was already up-to-date.
404
+ *
405
+ */
406
+ didRx?: IbGibAddr[];
407
+ /**
408
+ * List of ibgibs that were actively transmitted from the receiving
409
+ * space to the sending space.
410
+ *
411
+ * ## notes
412
+ *
413
+ * * During a sync operation, any ibgibs that start in the sync space
414
+ * and are "sent" to the local space during the sync operation that
415
+ * did not originate from the local space will be here.
416
+ */
417
+ didTx?: IbGibAddr[];
418
+ }
419
+ export interface SyncStatusRel8ns extends IbGibRel8ns_V1 {
420
+ created?: IbGibAddr[];
421
+ final?: IbGibAddr[];
422
+ }
423
+ /**
424
+ * IbGib that tracks/logs the entire syncing process.
425
+ *
426
+ * Since this is created with a tjp, it includes the tjp.gib in
427
+ * each status frame ibgib.gib. This tjp.gib acts as the "saga id"
428
+ * or "status stream id".
429
+ *
430
+ * ## stages
431
+ *
432
+ * ### starting - (code 102)
433
+ *
434
+ * Gets the ball rolling with creating the first status ibgib.
435
+ *
436
+ * ###
437
+ *
438
+ */
439
+ export interface SyncStatusIbGib extends IbGib_V1<SyncStatusData, SyncStatusRel8ns> {
440
+ statusIbGibGraph: IbGib_V1[];
441
+ /**
442
+ * Ibgibs that were created as side effects from a merge.
443
+ *
444
+ * ## notes
445
+ *
446
+ * This happens when you apply one or more local transforms to
447
+ * a timeline in the store that has already been changed by some
448
+ * other space (other than local that is).
449
+ */
450
+ createdIbGibs?: IbGib_V1[];
451
+ /**
452
+ * Ibgibs that are only found in the store and not locally.
453
+ *
454
+ * ## notes
455
+ *
456
+ * This happens when ibgibs were created in some other space.
457
+ */
458
+ storeOnlyIbGibs?: IbGib_V1[];
459
+ /**
460
+ * This is a map of the local space "oldAddr" to the ultimately
461
+ * most recent ibgib address in the outer/sync space.
462
+ *
463
+ * ## notes
464
+ *
465
+ * You will need to also download the createdIbGibs and/or storeOnlyIbGibs
466
+ * which will contain the dependency graph between these two endpoints in
467
+ * each map entry here from old addr -> new addr.
468
+ *
469
+ * It is assumed that the local address already has all of the rest of the
470
+ * dependencies for `oldAddr`.
471
+ */
472
+ ibGibsMergeMap?: {
473
+ [oldAddr: string]: IbGib_V1;
474
+ };
475
+ }
476
+ /**
477
+ * A saga atow refers only to the saga across a single space.
478
+ */
479
+ export interface SagaInfo<TIbGib extends IbGib_V1, TSpaceOptionsData extends OuterSpaceOptionsData, TSpaceOptionsRel8ns extends OuterSpaceOptionsRel8ns, TSpaceOptionsIbGib extends OuterSpaceOptionsIbGib<TIbGib, TSpaceOptionsData, TSpaceOptionsRel8ns>, TSpaceResultData extends OuterSpaceResultData, TSpaceResultRel8ns extends OuterSpaceResultRel8ns, TSpaceResultIbGib extends OuterSpaceResultIbGib<TIbGib, TSpaceResultData, TSpaceResultRel8ns>, TStatusIbGib extends TIbGib> {
480
+ /**
481
+ * UUID generated at the beginning of a multi-space operation that is common
482
+ * across all spaces.
483
+ *
484
+ * This is in contrast with a `sagaId`, which only pertains to a saga within
485
+ * a single space.
486
+ */
487
+ multiSpaceOpId: string;
488
+ /**
489
+ * UUID generated at the beginning of a sync saga for a single space.
490
+ *
491
+ * This is in contrast with the `syncId`, which pertains to a sync operation
492
+ * across all spaces.
493
+ */
494
+ sagaId: string;
495
+ /**
496
+ * Reference to the space with which we're communicating.
497
+ */
498
+ outerSpace: IbGibSpaceAny;
499
+ spaceId: string;
500
+ participants: ParticipantInfo[];
501
+ complete?: boolean;
502
+ /**
503
+ * Only publishes values after subscribed.
504
+ */
505
+ syncStatus$: ReplaySubject<TStatusIbGib>;
506
+ syncStatusSubscriptions: Subscription[];
507
+ /**
508
+ * For each communication saga, there will be one or more calls to each
509
+ * space's `witness` function. This will produce arg & result ibgibs. This
510
+ * is the observable stream/subject of those witness calls.
511
+ */
512
+ witnessFnArgsAndResults$: ReplaySubject<TSpaceOptionsIbGib | TSpaceResultIbGib>;
513
+ syncIbGibs_All: IbGib_V1[];
514
+ syncAddrs_All: IbGibAddr[];
515
+ syncAddrs_All_AreTjps: IbGibAddr[];
516
+ syncAddrs_All_WithTjps: IbGibAddr[];
517
+ syncAddrs_All_WithoutTjps: IbGibAddr[];
518
+ syncAddrs_Skipped: IbGibAddr[];
519
+ syncAddrs_ToDo: IbGibAddr[];
520
+ syncAddrs_InProgress: IbGibAddr[];
521
+ syncAddrs_Failed: IbGibAddr[];
522
+ }
523
+ /**
524
+ * Information about a sync operation over its entirety.
525
+ *
526
+ * ## notes
527
+ *
528
+ * This will be attached to each space arg/result ibgib, but this info object
529
+ * WILL NOT be part of the internal `data` of either arg or result ibGib.
530
+ */
531
+ export interface SyncSagaInfo extends SagaInfo<IbGib_V1, SyncSpaceOptionsData, SyncSpaceOptionsRel8ns, SyncSpaceOptionsIbGib, SyncSpaceResultData, SyncSpaceResultRel8ns, SyncSpaceResultIbGib, SyncStatusIbGib> {
532
+ }
533
+ /**
534
+ * AWS-specific outerspace type
535
+ */
536
+ export type AWSRegion = 'us-east-1' | string;
537
+ export interface StatusIbInfo {
538
+ /**
539
+ * Code for the given status.
540
+ *
541
+ */
542
+ statusCode: StatusCode;
543
+ spaceType: OuterSpaceType;
544
+ spaceSubtype: OuterSpaceSubtype;
545
+ sagaId: string;
546
+ delimiter?: string;
547
+ }
548
+ //# sourceMappingURL=outer-space-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outer-space-types.d.mts","sourceRoot":"","sources":["../../../../src/witness/space/outer-space/outer-space-types.mts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAO,MAAM,eAAe,CAAC;AAI3D,OAAO,EACH,cAAc,EAAE,gBAAgB,EAChC,qBAAqB,EAAE,uBAAuB,EAAE,sBAAsB,EACtE,4BAA4B,EAC5B,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,EACtE,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,WAAW,GACX,SAAS,GACT,UAAU,GAAG,SAAS,GACtB,YAAY,GAAG,cAAc,GAC7B,gBAAgB,GAChB,WAAW,CAAC;AAChB,eAAO,MAAM,UAAU;IACnB;;OAEG;;IAEH;;OAEG;;IAEH;;;;;;;;OAQG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;IAEH;;;;;;;OAOG;;IAEH;;;;;;;OAOG;;IAEH;;;;;;OAMG;;IAEH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IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * @module outer-space
3
+ * Outer spaces are spaces connecting local inner spaces.
4
+ * ATOW there is just sync spaces, but definitely just the beginning.
5
+ *
6
+ * ## on future implementations, CRDT-like behavior
7
+ *
8
+ * I just realized that when merging, I can actually create a meta transform
9
+ * ibgib to maintain the order of transforms.
10
+ */
11
+ import { IbGibSpaceOptionsCmdModifier, } from '../space-types.mjs';
12
+ import { CIPHERTEXT_REL8N_NAME } from '../../../common/encrypt/encrypt-constants.mjs';
13
+ import { CONSENSUS_REL8N_NAME } from '../../../common/other/other-constants.mjs';
14
+ export const StatusCode = {
15
+ /**
16
+ * Using this as the code for the parent primitive.
17
+ */
18
+ undefined: 'undefined',
19
+ /**
20
+ * gt
21
+ */
22
+ preparing: 'preparing',
23
+ /**
24
+ * Communication between spaces has just started, but no evaluation as to
25
+ * intrinsic ibgibs shared has been made.
26
+ *
27
+ * Using this for the start of the sync process, meaning the ball has begun
28
+ * rolling, a metadata ibgib to track the operation has been created (but
29
+ * not necessarily yet stored), but no intrinsic (non-meta) data has been
30
+ * exchanged.
31
+ */
32
+ started: 'started',
33
+ /**
34
+ * New insertion of ibgib(s) into the outerspace.
35
+ *
36
+ * The outerspace did not have the timeline or ibgib(s) at all, so this is
37
+ * the first time.
38
+ */
39
+ inserted: 'inserted',
40
+ /**
41
+ * Updated outerspace with local ibgib(s).
42
+ *
43
+ * The outerspace had the same timeline as the local space, just not as
44
+ * recent.
45
+ */
46
+ updated: 'updated',
47
+ /**
48
+ * When syncing, this means that we've created new ibgib to merge into an
49
+ * existing timeline in the sync space BY APPLYING ALL UN-APPLIED LOCAL
50
+ * TRANSFORMS to the latest ibgib in the store.
51
+ *
52
+ * Note that in this case, we've created new ibgib to fulfill the operation
53
+ * (besides the derivative metadata ibgibs created in the communication).
54
+ */
55
+ merged_dna: 'merged_dna',
56
+ /**
57
+ * When syncing, this means that we've created new ibgib to merge into an
58
+ * existing timeline in the sync space BY MANUALLY SYNCHRONIZING ALL
59
+ * DATA AND REL8NS with the latest ibgib in the store.
60
+ *
61
+ * Note that in this case, we've created new ibgib to fulfill the operation
62
+ * (besides the derivative metadata ibgibs created in the communication).
63
+ */
64
+ merged_state: 'merged_state',
65
+ /**
66
+ * The operation has completed, but there were no intrinsic changes.
67
+ *
68
+ * For example, if we were to sync an ibGib but it's already up-to-date in a
69
+ * space, then we have generated metadata ibgibs. But *intrinsically* we have
70
+ * not altered any timeline ibgibs or added any stone ibgibs.
71
+ */
72
+ already_synced: 'already_synced',
73
+ /**
74
+ * Inter-spatial communication complete.
75
+ *
76
+ * * There should be no more status updates after this.
77
+ * * syncStatus$ observable should be completed just after this.
78
+ * * subscribers should unsubscribe if not already done.
79
+ * * I think this happens at the publishing end also, but always good
80
+ * to take care of your own cleanup if possible.
81
+ *
82
+ */
83
+ completed: 'completed',
84
+ };
85
+ export const OuterSpaceType = {
86
+ sync: 'sync',
87
+ };
88
+ export const VALID_OUTER_SPACE_TYPES = Object.values(OuterSpaceType).concat();
89
+ export const SyncSpaceSubtype = {
90
+ aws_dynamodb: 'aws-dynamodb',
91
+ };
92
+ export const OuterSpaceSubtype = {
93
+ tbd: 'tbd',
94
+ ...SyncSpaceSubtype,
95
+ };
96
+ export const VALID_OUTER_SPACE_SUBTYPES = Object.values(OuterSpaceSubtype).concat();
97
+ /**
98
+ * Marker atm.
99
+ *
100
+ * {@see IbGibSpaceOptionsCmdModifier}
101
+ */
102
+ export const OuterSpaceOptionsCmdModifier = {
103
+ ...IbGibSpaceOptionsCmdModifier,
104
+ };
105
+ /**
106
+ * Flags to affect the command's interpretation.
107
+ *
108
+ * {@see IbGibSpaceOptionsCmdModifier}
109
+ * {@see OuterSpaceOptionsCmdModifier}
110
+ */
111
+ export const SyncSpaceOptionsCmdModifier = {
112
+ ...OuterSpaceOptionsCmdModifier,
113
+ /**
114
+ * special type of 'put' operation that will start a sync process.
115
+ */
116
+ sync: 'sync',
117
+ };
118
+ //# sourceMappingURL=outer-space-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outer-space-types.mjs","sourceRoot":"","sources":["../../../../src/witness/space/outer-space/outer-space-types.mts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,OAAO,EAGH,4BAA4B,GAE/B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AA4BjF,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB;;OAEG;IACH,SAAS,EAAE,WAAyB;IACpC;;OAEG;IACH,SAAS,EAAE,WAAyB;IACpC;;;;;;;;OAQG;IACH,OAAO,EAAE,SAAuB;IAChC;;;;;OAKG;IACH,QAAQ,EAAE,UAAwB;IAClC;;;;;OAKG;IACH,OAAO,EAAE,SAAuB;IAChC;;;;;;;OAOG;IACH,UAAU,EAAE,YAA0B;IACtC;;;;;;;OAOG;IACH,YAAY,EAAE,cAA4B;IAC1C;;;;;;OAMG;IACH,cAAc,EAAE,gBAA8B;IAC9C;;;;;;;;;OASG;IACH,SAAS,EAAE,WAAyB;CACvC,CAAA;AAGD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,MAAwB;CACjC,CAAA;AACD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC;AAG9E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,YAAY,EAAE,cAAkC;CACnD,CAAA;AAGD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,GAAG,EAAE,KAA0B;IAC/B,GAAG,gBAAgB;CACtB,CAAA;AACD,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,EAAE,CAAC;AAmGpF;;;;GAIG;AACH,M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