@backendrelay/core 1.1.0 → 2.0.0

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 (598) hide show
  1. package/dist/standalone/index.js +1 -1
  2. package/dist/standalone/index.umd.cjs +1 -1
  3. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.d.ts +20 -0
  4. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
  5. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.js +5 -0
  6. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typeUtils.js.map +1 -0
  7. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.d.ts +2 -0
  8. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
  9. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.js +88 -0
  10. package/node_modules/@backendrelay/admin/dist/commonjs/__types__/typesTests.js.map +1 -0
  11. package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.d.ts +2 -0
  12. package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.d.ts.map +1 -0
  13. package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.js +131 -0
  14. package/node_modules/@backendrelay/admin/dist/commonjs/byop.live.e2e.test.js.map +1 -0
  15. package/node_modules/@backendrelay/admin/dist/commonjs/config.test.d.ts +2 -0
  16. package/node_modules/@backendrelay/admin/dist/commonjs/config.test.d.ts.map +1 -0
  17. package/node_modules/@backendrelay/admin/dist/commonjs/config.test.js +65 -0
  18. package/node_modules/@backendrelay/admin/dist/commonjs/config.test.js.map +1 -0
  19. package/node_modules/@backendrelay/admin/dist/commonjs/index.d.ts +725 -0
  20. package/node_modules/@backendrelay/admin/dist/commonjs/index.d.ts.map +1 -0
  21. package/node_modules/@backendrelay/admin/dist/commonjs/index.js +1159 -0
  22. package/node_modules/@backendrelay/admin/dist/commonjs/index.js.map +1 -0
  23. package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.d.ts +2 -0
  24. package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.d.ts.map +1 -0
  25. package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.js +91 -0
  26. package/node_modules/@backendrelay/admin/dist/commonjs/live.e2e.test.js.map +1 -0
  27. package/node_modules/@backendrelay/admin/dist/commonjs/package.json +3 -0
  28. package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.d.ts +17 -0
  29. package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.d.ts.map +1 -0
  30. package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.js +26 -0
  31. package/node_modules/@backendrelay/admin/dist/commonjs/polyfill.js.map +1 -0
  32. package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.d.ts +2 -0
  33. package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.d.ts.map +1 -0
  34. package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.js +50 -0
  35. package/node_modules/@backendrelay/admin/dist/commonjs/removed-features.test.js.map +1 -0
  36. package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.d.ts +2 -0
  37. package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.d.ts.map +1 -0
  38. package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.js +33 -0
  39. package/node_modules/@backendrelay/admin/dist/commonjs/storage-upload.test.js.map +1 -0
  40. package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.d.ts +39 -0
  41. package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.d.ts.map +1 -0
  42. package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.js +306 -0
  43. package/node_modules/@backendrelay/admin/dist/commonjs/subscribe.js.map +1 -0
  44. package/node_modules/@backendrelay/admin/dist/commonjs/version.d.ts +3 -0
  45. package/node_modules/@backendrelay/admin/dist/commonjs/version.d.ts.map +1 -0
  46. package/node_modules/@backendrelay/admin/dist/commonjs/version.js +5 -0
  47. package/node_modules/@backendrelay/admin/dist/commonjs/version.js.map +1 -0
  48. package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.d.ts +20 -0
  49. package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.d.ts.map +1 -0
  50. package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.js +4 -0
  51. package/node_modules/@backendrelay/admin/dist/esm/__types__/typeUtils.js.map +1 -0
  52. package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.d.ts +2 -0
  53. package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.d.ts.map +1 -0
  54. package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.js +86 -0
  55. package/node_modules/@backendrelay/admin/dist/esm/__types__/typesTests.js.map +1 -0
  56. package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.d.ts +2 -0
  57. package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.d.ts.map +1 -0
  58. package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.js +129 -0
  59. package/node_modules/@backendrelay/admin/dist/esm/byop.live.e2e.test.js.map +1 -0
  60. package/node_modules/@backendrelay/admin/dist/esm/config.test.d.ts +2 -0
  61. package/node_modules/@backendrelay/admin/dist/esm/config.test.d.ts.map +1 -0
  62. package/node_modules/@backendrelay/admin/dist/esm/config.test.js +63 -0
  63. package/node_modules/@backendrelay/admin/dist/esm/config.test.js.map +1 -0
  64. package/node_modules/@backendrelay/admin/dist/esm/index.d.ts +725 -0
  65. package/node_modules/@backendrelay/admin/dist/esm/index.d.ts.map +1 -0
  66. package/node_modules/@backendrelay/admin/dist/esm/index.js +1146 -0
  67. package/node_modules/@backendrelay/admin/dist/esm/index.js.map +1 -0
  68. package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.d.ts +2 -0
  69. package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.d.ts.map +1 -0
  70. package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.js +89 -0
  71. package/node_modules/@backendrelay/admin/dist/esm/live.e2e.test.js.map +1 -0
  72. package/node_modules/@backendrelay/admin/dist/esm/package.json +3 -0
  73. package/node_modules/@backendrelay/admin/dist/esm/polyfill.d.ts +17 -0
  74. package/node_modules/@backendrelay/admin/dist/esm/polyfill.d.ts.map +1 -0
  75. package/node_modules/@backendrelay/admin/dist/esm/polyfill.js +22 -0
  76. package/node_modules/@backendrelay/admin/dist/esm/polyfill.js.map +1 -0
  77. package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.d.ts +2 -0
  78. package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.d.ts.map +1 -0
  79. package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.js +48 -0
  80. package/node_modules/@backendrelay/admin/dist/esm/removed-features.test.js.map +1 -0
  81. package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.d.ts +2 -0
  82. package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.d.ts.map +1 -0
  83. package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.js +31 -0
  84. package/node_modules/@backendrelay/admin/dist/esm/storage-upload.test.js.map +1 -0
  85. package/node_modules/@backendrelay/admin/dist/esm/subscribe.d.ts +39 -0
  86. package/node_modules/@backendrelay/admin/dist/esm/subscribe.d.ts.map +1 -0
  87. package/node_modules/@backendrelay/admin/dist/esm/subscribe.js +300 -0
  88. package/node_modules/@backendrelay/admin/dist/esm/subscribe.js.map +1 -0
  89. package/node_modules/@backendrelay/admin/dist/esm/version.d.ts +3 -0
  90. package/node_modules/@backendrelay/admin/dist/esm/version.d.ts.map +1 -0
  91. package/{src/version.ts → node_modules/@backendrelay/admin/dist/esm/version.js} +1 -1
  92. package/node_modules/@backendrelay/admin/dist/esm/version.js.map +1 -0
  93. package/node_modules/@backendrelay/admin/package.json +52 -0
  94. package/node_modules/@backendrelay/functions/README.md +131 -0
  95. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.d.ts +3 -0
  96. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
  97. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.js +3 -0
  98. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typeUtils.js.map +1 -0
  99. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.d.ts +2 -0
  100. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
  101. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.js +51 -0
  102. package/node_modules/@backendrelay/functions/dist/commonjs/__types__/typesTests.js.map +1 -0
  103. package/node_modules/@backendrelay/functions/dist/commonjs/index.d.ts +230 -0
  104. package/node_modules/@backendrelay/functions/dist/commonjs/index.d.ts.map +1 -0
  105. package/node_modules/@backendrelay/functions/dist/commonjs/index.js +415 -0
  106. package/node_modules/@backendrelay/functions/dist/commonjs/index.js.map +1 -0
  107. package/node_modules/@backendrelay/functions/dist/commonjs/package.json +3 -0
  108. package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.d.ts +3 -0
  109. package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.d.ts.map +1 -0
  110. package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.js +2 -0
  111. package/node_modules/@backendrelay/functions/dist/esm/__types__/typeUtils.js.map +1 -0
  112. package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.d.ts +2 -0
  113. package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.d.ts.map +1 -0
  114. package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.js +49 -0
  115. package/node_modules/@backendrelay/functions/dist/esm/__types__/typesTests.js.map +1 -0
  116. package/node_modules/@backendrelay/functions/dist/esm/index.d.ts +230 -0
  117. package/node_modules/@backendrelay/functions/dist/esm/index.d.ts.map +1 -0
  118. package/node_modules/@backendrelay/functions/dist/esm/index.js +403 -0
  119. package/node_modules/@backendrelay/functions/dist/esm/index.js.map +1 -0
  120. package/node_modules/@backendrelay/functions/dist/esm/package.json +3 -0
  121. package/node_modules/@backendrelay/functions/package.json +49 -0
  122. package/node_modules/@backendrelay/hatchet/dist/commonjs/index.d.ts +43 -0
  123. package/node_modules/@backendrelay/hatchet/dist/commonjs/index.d.ts.map +1 -0
  124. package/node_modules/@backendrelay/hatchet/dist/commonjs/index.js +63 -0
  125. package/node_modules/@backendrelay/hatchet/dist/commonjs/index.js.map +1 -0
  126. package/node_modules/@backendrelay/hatchet/dist/commonjs/package.json +3 -0
  127. package/node_modules/@backendrelay/hatchet/dist/esm/index.d.ts +43 -0
  128. package/node_modules/@backendrelay/hatchet/dist/esm/index.d.ts.map +1 -0
  129. package/node_modules/@backendrelay/hatchet/dist/esm/index.js +59 -0
  130. package/node_modules/@backendrelay/hatchet/dist/esm/index.js.map +1 -0
  131. package/node_modules/@backendrelay/hatchet/dist/esm/package.json +3 -0
  132. package/node_modules/@backendrelay/hatchet/package.json +46 -0
  133. package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.d.ts +18 -0
  134. package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.d.ts.map +1 -0
  135. package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.js +77 -0
  136. package/node_modules/@backendrelay/platform/dist/commonjs/ProgressPromise.js.map +1 -0
  137. package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.d.ts +99 -0
  138. package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.d.ts.map +1 -0
  139. package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.js +177 -0
  140. package/node_modules/@backendrelay/platform/dist/commonjs/api/apps.js.map +1 -0
  141. package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.d.ts +7 -0
  142. package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.d.ts.map +1 -0
  143. package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.js +15 -0
  144. package/node_modules/@backendrelay/platform/dist/commonjs/api/auth.js.map +1 -0
  145. package/node_modules/@backendrelay/platform/dist/commonjs/api/http.d.ts +3 -0
  146. package/node_modules/@backendrelay/platform/dist/commonjs/api/http.d.ts.map +1 -0
  147. package/node_modules/@backendrelay/platform/dist/commonjs/api/http.js +46 -0
  148. package/node_modules/@backendrelay/platform/dist/commonjs/api/http.js.map +1 -0
  149. package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.d.ts +13 -0
  150. package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.d.ts.map +1 -0
  151. package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.js +25 -0
  152. package/node_modules/@backendrelay/platform/dist/commonjs/api/perms.js.map +1 -0
  153. package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.d.ts +285 -0
  154. package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.d.ts.map +1 -0
  155. package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.js +426 -0
  156. package/node_modules/@backendrelay/platform/dist/commonjs/api/platform-api.js.map +1 -0
  157. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.d.ts +24 -0
  158. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.d.ts.map +1 -0
  159. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.js +108 -0
  160. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema-coerce.js.map +1 -0
  161. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.d.ts +188 -0
  162. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.d.ts.map +1 -0
  163. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.js +412 -0
  164. package/node_modules/@backendrelay/platform/dist/commonjs/api/schema.js.map +1 -0
  165. package/node_modules/@backendrelay/platform/dist/commonjs/api.d.ts +9 -0
  166. package/node_modules/@backendrelay/platform/dist/commonjs/api.d.ts.map +1 -0
  167. package/node_modules/@backendrelay/platform/dist/commonjs/api.js +12 -0
  168. package/node_modules/@backendrelay/platform/dist/commonjs/api.js.map +1 -0
  169. package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.d.ts +89 -0
  170. package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.d.ts.map +1 -0
  171. package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.js +357 -0
  172. package/node_modules/@backendrelay/platform/dist/commonjs/backupDownload.js.map +1 -0
  173. package/node_modules/@backendrelay/platform/dist/commonjs/backups.d.ts +146 -0
  174. package/node_modules/@backendrelay/platform/dist/commonjs/backups.d.ts.map +1 -0
  175. package/node_modules/@backendrelay/platform/dist/commonjs/backups.js +251 -0
  176. package/node_modules/@backendrelay/platform/dist/commonjs/backups.js.map +1 -0
  177. package/node_modules/@backendrelay/platform/dist/commonjs/clerk.d.ts +2 -0
  178. package/node_modules/@backendrelay/platform/dist/commonjs/clerk.d.ts.map +1 -0
  179. package/node_modules/@backendrelay/platform/dist/commonjs/clerk.js +29 -0
  180. package/node_modules/@backendrelay/platform/dist/commonjs/clerk.js.map +1 -0
  181. package/node_modules/@backendrelay/platform/dist/commonjs/consts.d.ts +11 -0
  182. package/node_modules/@backendrelay/platform/dist/commonjs/consts.d.ts.map +1 -0
  183. package/node_modules/@backendrelay/platform/dist/commonjs/consts.js +17 -0
  184. package/node_modules/@backendrelay/platform/dist/commonjs/consts.js.map +1 -0
  185. package/node_modules/@backendrelay/platform/dist/commonjs/crypto.d.ts +4 -0
  186. package/node_modules/@backendrelay/platform/dist/commonjs/crypto.d.ts.map +1 -0
  187. package/node_modules/@backendrelay/platform/dist/commonjs/crypto.js +26 -0
  188. package/node_modules/@backendrelay/platform/dist/commonjs/crypto.js.map +1 -0
  189. package/node_modules/@backendrelay/platform/dist/commonjs/index.d.ts +19 -0
  190. package/node_modules/@backendrelay/platform/dist/commonjs/index.d.ts.map +1 -0
  191. package/node_modules/@backendrelay/platform/dist/commonjs/index.js +76 -0
  192. package/node_modules/@backendrelay/platform/dist/commonjs/index.js.map +1 -0
  193. package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.d.ts +4 -0
  194. package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.d.ts.map +1 -0
  195. package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.js +52 -0
  196. package/node_modules/@backendrelay/platform/dist/commonjs/migrationUtils.js.map +1 -0
  197. package/node_modules/@backendrelay/platform/dist/commonjs/migrations.d.ts +99 -0
  198. package/node_modules/@backendrelay/platform/dist/commonjs/migrations.d.ts.map +1 -0
  199. package/node_modules/@backendrelay/platform/dist/commonjs/migrations.js +597 -0
  200. package/node_modules/@backendrelay/platform/dist/commonjs/migrations.js.map +1 -0
  201. package/node_modules/@backendrelay/platform/dist/commonjs/oauth.d.ts +98 -0
  202. package/node_modules/@backendrelay/platform/dist/commonjs/oauth.d.ts.map +1 -0
  203. package/node_modules/@backendrelay/platform/dist/commonjs/oauth.js +275 -0
  204. package/node_modules/@backendrelay/platform/dist/commonjs/oauth.js.map +1 -0
  205. package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.d.ts +12 -0
  206. package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.d.ts.map +1 -0
  207. package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.js +26 -0
  208. package/node_modules/@backendrelay/platform/dist/commonjs/oauthCommon.js.map +1 -0
  209. package/node_modules/@backendrelay/platform/dist/commonjs/package.json +3 -0
  210. package/node_modules/@backendrelay/platform/dist/commonjs/perms.d.ts +3 -0
  211. package/node_modules/@backendrelay/platform/dist/commonjs/perms.d.ts.map +1 -0
  212. package/node_modules/@backendrelay/platform/dist/commonjs/perms.js +66 -0
  213. package/node_modules/@backendrelay/platform/dist/commonjs/perms.js.map +1 -0
  214. package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.d.ts +13 -0
  215. package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.d.ts.map +1 -0
  216. package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.js +31 -0
  217. package/node_modules/@backendrelay/platform/dist/commonjs/privateFields.js.map +1 -0
  218. package/node_modules/@backendrelay/platform/dist/commonjs/relationships.d.ts +7 -0
  219. package/node_modules/@backendrelay/platform/dist/commonjs/relationships.d.ts.map +1 -0
  220. package/node_modules/@backendrelay/platform/dist/commonjs/relationships.js +46 -0
  221. package/node_modules/@backendrelay/platform/dist/commonjs/relationships.js.map +1 -0
  222. package/node_modules/@backendrelay/platform/dist/commonjs/schema.d.ts +161 -0
  223. package/node_modules/@backendrelay/platform/dist/commonjs/schema.d.ts.map +1 -0
  224. package/node_modules/@backendrelay/platform/dist/commonjs/schema.js +174 -0
  225. package/node_modules/@backendrelay/platform/dist/commonjs/schema.js.map +1 -0
  226. package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.d.ts +25 -0
  227. package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.d.ts.map +1 -0
  228. package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.js +68 -0
  229. package/node_modules/@backendrelay/platform/dist/commonjs/serverOAuth.js.map +1 -0
  230. package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.d.ts +17 -0
  231. package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.d.ts.map +1 -0
  232. package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.js +314 -0
  233. package/node_modules/@backendrelay/platform/dist/commonjs/typescript-schema.js.map +1 -0
  234. package/node_modules/@backendrelay/platform/dist/commonjs/util.d.ts +13 -0
  235. package/node_modules/@backendrelay/platform/dist/commonjs/util.d.ts.map +1 -0
  236. package/node_modules/@backendrelay/platform/dist/commonjs/util.js +55 -0
  237. package/node_modules/@backendrelay/platform/dist/commonjs/util.js.map +1 -0
  238. package/node_modules/@backendrelay/platform/dist/commonjs/version.d.ts +3 -0
  239. package/node_modules/@backendrelay/platform/dist/commonjs/version.d.ts.map +1 -0
  240. package/node_modules/@backendrelay/platform/dist/commonjs/version.js +5 -0
  241. package/node_modules/@backendrelay/platform/dist/commonjs/version.js.map +1 -0
  242. package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.d.ts +18 -0
  243. package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.d.ts.map +1 -0
  244. package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.js +73 -0
  245. package/node_modules/@backendrelay/platform/dist/esm/ProgressPromise.js.map +1 -0
  246. package/node_modules/@backendrelay/platform/dist/esm/api/apps.d.ts +99 -0
  247. package/node_modules/@backendrelay/platform/dist/esm/api/apps.d.ts.map +1 -0
  248. package/node_modules/@backendrelay/platform/dist/esm/api/apps.js +165 -0
  249. package/node_modules/@backendrelay/platform/dist/esm/api/apps.js.map +1 -0
  250. package/node_modules/@backendrelay/platform/dist/esm/api/auth.d.ts +7 -0
  251. package/node_modules/@backendrelay/platform/dist/esm/api/auth.d.ts.map +1 -0
  252. package/node_modules/@backendrelay/platform/dist/esm/api/auth.js +12 -0
  253. package/node_modules/@backendrelay/platform/dist/esm/api/auth.js.map +1 -0
  254. package/node_modules/@backendrelay/platform/dist/esm/api/http.d.ts +3 -0
  255. package/node_modules/@backendrelay/platform/dist/esm/api/http.d.ts.map +1 -0
  256. package/node_modules/@backendrelay/platform/dist/esm/api/http.js +39 -0
  257. package/node_modules/@backendrelay/platform/dist/esm/api/http.js.map +1 -0
  258. package/node_modules/@backendrelay/platform/dist/esm/api/perms.d.ts +13 -0
  259. package/node_modules/@backendrelay/platform/dist/esm/api/perms.d.ts.map +1 -0
  260. package/node_modules/@backendrelay/platform/dist/esm/api/perms.js +21 -0
  261. package/node_modules/@backendrelay/platform/dist/esm/api/perms.js.map +1 -0
  262. package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.d.ts +285 -0
  263. package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.d.ts.map +1 -0
  264. package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.js +421 -0
  265. package/node_modules/@backendrelay/platform/dist/esm/api/platform-api.js.map +1 -0
  266. package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.d.ts +24 -0
  267. package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.d.ts.map +1 -0
  268. package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.js +99 -0
  269. package/node_modules/@backendrelay/platform/dist/esm/api/schema-coerce.js.map +1 -0
  270. package/node_modules/@backendrelay/platform/dist/esm/api/schema.d.ts +188 -0
  271. package/node_modules/@backendrelay/platform/dist/esm/api/schema.d.ts.map +1 -0
  272. package/node_modules/@backendrelay/platform/dist/esm/api/schema.js +393 -0
  273. package/node_modules/@backendrelay/platform/dist/esm/api/schema.js.map +1 -0
  274. package/node_modules/@backendrelay/platform/dist/esm/api.d.ts +9 -0
  275. package/node_modules/@backendrelay/platform/dist/esm/api.d.ts.map +1 -0
  276. package/node_modules/@backendrelay/platform/dist/esm/api.js +4 -0
  277. package/node_modules/@backendrelay/platform/dist/esm/api.js.map +1 -0
  278. package/node_modules/@backendrelay/platform/dist/esm/backupDownload.d.ts +89 -0
  279. package/node_modules/@backendrelay/platform/dist/esm/backupDownload.d.ts.map +1 -0
  280. package/node_modules/@backendrelay/platform/dist/esm/backupDownload.js +354 -0
  281. package/node_modules/@backendrelay/platform/dist/esm/backupDownload.js.map +1 -0
  282. package/node_modules/@backendrelay/platform/dist/esm/backups.d.ts +146 -0
  283. package/node_modules/@backendrelay/platform/dist/esm/backups.d.ts.map +1 -0
  284. package/node_modules/@backendrelay/platform/dist/esm/backups.js +240 -0
  285. package/node_modules/@backendrelay/platform/dist/esm/backups.js.map +1 -0
  286. package/node_modules/@backendrelay/platform/dist/esm/clerk.d.ts +2 -0
  287. package/node_modules/@backendrelay/platform/dist/esm/clerk.d.ts.map +1 -0
  288. package/node_modules/@backendrelay/platform/dist/esm/clerk.js +26 -0
  289. package/node_modules/@backendrelay/platform/dist/esm/clerk.js.map +1 -0
  290. package/node_modules/@backendrelay/platform/dist/esm/consts.d.ts +11 -0
  291. package/node_modules/@backendrelay/platform/dist/esm/consts.d.ts.map +1 -0
  292. package/node_modules/@backendrelay/platform/dist/esm/consts.js +13 -0
  293. package/node_modules/@backendrelay/platform/dist/esm/consts.js.map +1 -0
  294. package/node_modules/@backendrelay/platform/dist/esm/crypto.d.ts +4 -0
  295. package/node_modules/@backendrelay/platform/dist/esm/crypto.d.ts.map +1 -0
  296. package/node_modules/@backendrelay/platform/dist/esm/crypto.js +21 -0
  297. package/node_modules/@backendrelay/platform/dist/esm/crypto.js.map +1 -0
  298. package/node_modules/@backendrelay/platform/dist/esm/index.d.ts +19 -0
  299. package/node_modules/@backendrelay/platform/dist/esm/index.d.ts.map +1 -0
  300. package/node_modules/@backendrelay/platform/dist/esm/index.js +18 -0
  301. package/node_modules/@backendrelay/platform/dist/esm/index.js.map +1 -0
  302. package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.d.ts +4 -0
  303. package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.d.ts.map +1 -0
  304. package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.js +47 -0
  305. package/node_modules/@backendrelay/platform/dist/esm/migrationUtils.js.map +1 -0
  306. package/node_modules/@backendrelay/platform/dist/esm/migrations.d.ts +99 -0
  307. package/node_modules/@backendrelay/platform/dist/esm/migrations.d.ts.map +1 -0
  308. package/node_modules/@backendrelay/platform/dist/esm/migrations.js +588 -0
  309. package/node_modules/@backendrelay/platform/dist/esm/migrations.js.map +1 -0
  310. package/node_modules/@backendrelay/platform/dist/esm/oauth.d.ts +98 -0
  311. package/node_modules/@backendrelay/platform/dist/esm/oauth.d.ts.map +1 -0
  312. package/node_modules/@backendrelay/platform/dist/esm/oauth.js +266 -0
  313. package/node_modules/@backendrelay/platform/dist/esm/oauth.js.map +1 -0
  314. package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.d.ts +12 -0
  315. package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.d.ts.map +1 -0
  316. package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.js +22 -0
  317. package/node_modules/@backendrelay/platform/dist/esm/oauthCommon.js.map +1 -0
  318. package/node_modules/@backendrelay/platform/dist/esm/package.json +3 -0
  319. package/node_modules/@backendrelay/platform/dist/esm/perms.d.ts +3 -0
  320. package/node_modules/@backendrelay/platform/dist/esm/perms.d.ts.map +1 -0
  321. package/node_modules/@backendrelay/platform/dist/esm/perms.js +62 -0
  322. package/node_modules/@backendrelay/platform/dist/esm/perms.js.map +1 -0
  323. package/node_modules/@backendrelay/platform/dist/esm/privateFields.d.ts +13 -0
  324. package/node_modules/@backendrelay/platform/dist/esm/privateFields.d.ts.map +1 -0
  325. package/node_modules/@backendrelay/platform/dist/esm/privateFields.js +28 -0
  326. package/node_modules/@backendrelay/platform/dist/esm/privateFields.js.map +1 -0
  327. package/node_modules/@backendrelay/platform/dist/esm/relationships.d.ts +7 -0
  328. package/node_modules/@backendrelay/platform/dist/esm/relationships.d.ts.map +1 -0
  329. package/node_modules/@backendrelay/platform/dist/esm/relationships.js +43 -0
  330. package/node_modules/@backendrelay/platform/dist/esm/relationships.js.map +1 -0
  331. package/node_modules/@backendrelay/platform/dist/esm/schema.d.ts +161 -0
  332. package/node_modules/@backendrelay/platform/dist/esm/schema.d.ts.map +1 -0
  333. package/node_modules/@backendrelay/platform/dist/esm/schema.js +158 -0
  334. package/node_modules/@backendrelay/platform/dist/esm/schema.js.map +1 -0
  335. package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.d.ts +25 -0
  336. package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.d.ts.map +1 -0
  337. package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.js +64 -0
  338. package/node_modules/@backendrelay/platform/dist/esm/serverOAuth.js.map +1 -0
  339. package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.d.ts +17 -0
  340. package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.d.ts.map +1 -0
  341. package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.js +310 -0
  342. package/node_modules/@backendrelay/platform/dist/esm/typescript-schema.js.map +1 -0
  343. package/node_modules/@backendrelay/platform/dist/esm/util.d.ts +13 -0
  344. package/node_modules/@backendrelay/platform/dist/esm/util.d.ts.map +1 -0
  345. package/node_modules/@backendrelay/platform/dist/esm/util.js +46 -0
  346. package/node_modules/@backendrelay/platform/dist/esm/util.js.map +1 -0
  347. package/node_modules/@backendrelay/platform/dist/esm/version.d.ts +3 -0
  348. package/node_modules/@backendrelay/platform/dist/esm/version.d.ts.map +1 -0
  349. package/node_modules/@backendrelay/platform/dist/esm/version.js +3 -0
  350. package/node_modules/@backendrelay/platform/dist/esm/version.js.map +1 -0
  351. package/node_modules/@backendrelay/platform/dist/standalone/index.js +13738 -0
  352. package/node_modules/@backendrelay/platform/dist/standalone/index.umd.cjs +72 -0
  353. package/node_modules/@backendrelay/platform/package.json +51 -0
  354. package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.d.ts +67 -0
  355. package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.d.ts.map +1 -0
  356. package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.js +129 -0
  357. package/node_modules/@backendrelay/resumable-stream/dist/commonjs/index.js.map +1 -0
  358. package/node_modules/@backendrelay/resumable-stream/dist/commonjs/package.json +3 -0
  359. package/node_modules/@backendrelay/resumable-stream/dist/esm/index.d.ts +67 -0
  360. package/node_modules/@backendrelay/resumable-stream/dist/esm/index.d.ts.map +1 -0
  361. package/node_modules/@backendrelay/resumable-stream/dist/esm/index.js +126 -0
  362. package/node_modules/@backendrelay/resumable-stream/dist/esm/index.js.map +1 -0
  363. package/node_modules/@backendrelay/resumable-stream/dist/esm/package.json +3 -0
  364. package/node_modules/@backendrelay/resumable-stream/dist/standalone/index.js +4354 -0
  365. package/node_modules/@backendrelay/resumable-stream/dist/standalone/index.umd.cjs +6 -0
  366. package/node_modules/@backendrelay/resumable-stream/package.json +47 -0
  367. package/node_modules/@backendrelay/rules/README.md +34 -0
  368. package/node_modules/@backendrelay/rules/dist/commonjs/index.d.ts +117 -0
  369. package/node_modules/@backendrelay/rules/dist/commonjs/index.d.ts.map +1 -0
  370. package/node_modules/@backendrelay/rules/dist/commonjs/index.js +68 -0
  371. package/node_modules/@backendrelay/rules/dist/commonjs/index.js.map +1 -0
  372. package/node_modules/@backendrelay/rules/dist/commonjs/package.json +3 -0
  373. package/node_modules/@backendrelay/rules/dist/esm/index.d.ts +117 -0
  374. package/node_modules/@backendrelay/rules/dist/esm/index.d.ts.map +1 -0
  375. package/node_modules/@backendrelay/rules/dist/esm/index.js +64 -0
  376. package/node_modules/@backendrelay/rules/dist/esm/index.js.map +1 -0
  377. package/node_modules/@backendrelay/rules/dist/esm/package.json +3 -0
  378. package/node_modules/@backendrelay/rules/package.json +46 -0
  379. package/node_modules/@backendrelay/test/README.md +75 -0
  380. package/node_modules/@backendrelay/test/dist/commonjs/index.d.ts +74 -0
  381. package/node_modules/@backendrelay/test/dist/commonjs/index.d.ts.map +1 -0
  382. package/node_modules/@backendrelay/test/dist/commonjs/index.js +197 -0
  383. package/node_modules/@backendrelay/test/dist/commonjs/index.js.map +1 -0
  384. package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.d.ts +2 -0
  385. package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.d.ts.map +1 -0
  386. package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.js +45 -0
  387. package/node_modules/@backendrelay/test/dist/commonjs/live.e2e.test.js.map +1 -0
  388. package/node_modules/@backendrelay/test/dist/commonjs/package.json +3 -0
  389. package/node_modules/@backendrelay/test/dist/esm/index.d.ts +74 -0
  390. package/node_modules/@backendrelay/test/dist/esm/index.d.ts.map +1 -0
  391. package/node_modules/@backendrelay/test/dist/esm/index.js +192 -0
  392. package/node_modules/@backendrelay/test/dist/esm/index.js.map +1 -0
  393. package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.d.ts +2 -0
  394. package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.d.ts.map +1 -0
  395. package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.js +43 -0
  396. package/node_modules/@backendrelay/test/dist/esm/live.e2e.test.js.map +1 -0
  397. package/node_modules/@backendrelay/test/dist/esm/package.json +3 -0
  398. package/node_modules/@backendrelay/test/package.json +49 -0
  399. package/node_modules/@backendrelay/version/dist/commonjs/index.d.ts +3 -0
  400. package/node_modules/@backendrelay/version/dist/commonjs/index.d.ts.map +1 -0
  401. package/node_modules/@backendrelay/version/dist/commonjs/index.js +6 -0
  402. package/node_modules/@backendrelay/version/dist/commonjs/index.js.map +1 -0
  403. package/node_modules/@backendrelay/version/dist/commonjs/package.json +3 -0
  404. package/node_modules/@backendrelay/version/dist/commonjs/version.d.ts +3 -0
  405. package/node_modules/@backendrelay/version/dist/commonjs/version.d.ts.map +1 -0
  406. package/node_modules/@backendrelay/version/dist/commonjs/version.js +10 -0
  407. package/node_modules/@backendrelay/version/dist/commonjs/version.js.map +1 -0
  408. package/node_modules/@backendrelay/version/dist/esm/index.d.ts +3 -0
  409. package/node_modules/@backendrelay/version/dist/esm/index.d.ts.map +1 -0
  410. package/node_modules/@backendrelay/version/dist/esm/index.js +3 -0
  411. package/node_modules/@backendrelay/version/dist/esm/index.js.map +1 -0
  412. package/node_modules/@backendrelay/version/dist/esm/package.json +3 -0
  413. package/node_modules/@backendrelay/version/dist/esm/version.d.ts +3 -0
  414. package/node_modules/@backendrelay/version/dist/esm/version.d.ts.map +1 -0
  415. package/node_modules/@backendrelay/version/dist/esm/version.js +7 -0
  416. package/node_modules/@backendrelay/version/dist/esm/version.js.map +1 -0
  417. package/node_modules/@backendrelay/version/dist/standalone/index.js +4 -0
  418. package/node_modules/@backendrelay/version/dist/standalone/index.umd.cjs +1 -0
  419. package/node_modules/@backendrelay/version/package.json +44 -0
  420. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.d.ts +12 -0
  421. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.d.ts.map +1 -0
  422. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.js +5 -0
  423. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typeUtils.js.map +1 -0
  424. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.d.ts +2 -0
  425. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.d.ts.map +1 -0
  426. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.js +82 -0
  427. package/node_modules/@backendrelay/webhooks/dist/commonjs/__types__/typesTests.js.map +1 -0
  428. package/node_modules/@backendrelay/webhooks/dist/commonjs/index.d.ts +607 -0
  429. package/node_modules/@backendrelay/webhooks/dist/commonjs/index.d.ts.map +1 -0
  430. package/node_modules/@backendrelay/webhooks/dist/commonjs/index.js +830 -0
  431. package/node_modules/@backendrelay/webhooks/dist/commonjs/index.js.map +1 -0
  432. package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.d.ts +2 -0
  433. package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.d.ts.map +1 -0
  434. package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.js +139 -0
  435. package/node_modules/@backendrelay/webhooks/dist/commonjs/live.e2e.test.js.map +1 -0
  436. package/node_modules/@backendrelay/webhooks/dist/commonjs/package.json +3 -0
  437. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.d.ts +12 -0
  438. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.d.ts.map +1 -0
  439. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.js +4 -0
  440. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typeUtils.js.map +1 -0
  441. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.d.ts +2 -0
  442. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.d.ts.map +1 -0
  443. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.js +80 -0
  444. package/node_modules/@backendrelay/webhooks/dist/esm/__types__/typesTests.js.map +1 -0
  445. package/node_modules/@backendrelay/webhooks/dist/esm/index.d.ts +607 -0
  446. package/node_modules/@backendrelay/webhooks/dist/esm/index.d.ts.map +1 -0
  447. package/node_modules/@backendrelay/webhooks/dist/esm/index.js +825 -0
  448. package/node_modules/@backendrelay/webhooks/dist/esm/index.js.map +1 -0
  449. package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.d.ts +2 -0
  450. package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.d.ts.map +1 -0
  451. package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.js +137 -0
  452. package/node_modules/@backendrelay/webhooks/dist/esm/live.e2e.test.js.map +1 -0
  453. package/node_modules/@backendrelay/webhooks/dist/esm/package.json +3 -0
  454. package/node_modules/@backendrelay/webhooks/package.json +46 -0
  455. package/package.json +129 -56
  456. package/subpaths/admin/index.cjs +1 -0
  457. package/subpaths/admin/index.d.ts +1 -0
  458. package/subpaths/admin/index.mjs +3 -0
  459. package/subpaths/functions/index.cjs +1 -0
  460. package/subpaths/functions/index.d.ts +1 -0
  461. package/subpaths/functions/index.mjs +3 -0
  462. package/subpaths/hatchet/index.cjs +1 -0
  463. package/subpaths/hatchet/index.d.ts +1 -0
  464. package/subpaths/hatchet/index.mjs +3 -0
  465. package/subpaths/platform/index.cjs +1 -0
  466. package/subpaths/platform/index.d.ts +1 -0
  467. package/subpaths/platform/index.mjs +3 -0
  468. package/subpaths/resumable-stream/index.cjs +1 -0
  469. package/subpaths/resumable-stream/index.d.ts +1 -0
  470. package/subpaths/resumable-stream/index.mjs +3 -0
  471. package/subpaths/rules/index.cjs +1 -0
  472. package/subpaths/rules/index.d.ts +1 -0
  473. package/subpaths/rules/index.mjs +3 -0
  474. package/subpaths/test/index.cjs +1 -0
  475. package/subpaths/test/index.d.ts +1 -0
  476. package/subpaths/test/index.mjs +3 -0
  477. package/subpaths/version/index.cjs +1 -0
  478. package/subpaths/version/index.d.ts +1 -0
  479. package/subpaths/version/index.mjs +3 -0
  480. package/subpaths/webhooks/index.cjs +1 -0
  481. package/subpaths/webhooks/index.d.ts +1 -0
  482. package/subpaths/webhooks/index.mjs +3 -0
  483. package/.tshy/build.json +0 -8
  484. package/.tshy/commonjs.json +0 -16
  485. package/.tshy/esm.json +0 -15
  486. package/__example__/standalone.esm.html +0 -23
  487. package/__example__/standalone.umd.html +0 -21
  488. package/__tests__/src/Connection.test.ts +0 -292
  489. package/__tests__/src/IndexedDBStorage.test.ts +0 -96
  490. package/__tests__/src/Reactor.test.ts +0 -1179
  491. package/__tests__/src/auth-extra-fields.e2e.test.ts +0 -160
  492. package/__tests__/src/byop.e2e.test.ts +0 -762
  493. package/__tests__/src/config.test.ts +0 -85
  494. package/__tests__/src/cookieSync.e2e.test.ts +0 -163
  495. package/__tests__/src/data/movies/attrs.json +0 -145
  496. package/__tests__/src/data/movies/triples.json +0 -1507
  497. package/__tests__/src/data/zeneca/attrs.json +0 -251
  498. package/__tests__/src/data/zeneca/triples.json +0 -15854
  499. package/__tests__/src/datalog.test.ts +0 -175
  500. package/__tests__/src/devtool.test.ts +0 -23
  501. package/__tests__/src/framework.test.ts +0 -173
  502. package/__tests__/src/infiniteQuery.e2e.test.ts +0 -467
  503. package/__tests__/src/instaml.test.ts +0 -1593
  504. package/__tests__/src/instaql.bench.ts +0 -34
  505. package/__tests__/src/instaql.test.ts +0 -1497
  506. package/__tests__/src/instaqlInference.test.ts +0 -243
  507. package/__tests__/src/presence.test.ts +0 -49
  508. package/__tests__/src/queryValidation.test.ts +0 -1101
  509. package/__tests__/src/schema.test.ts +0 -653
  510. package/__tests__/src/serializeSchema.test.ts +0 -123
  511. package/__tests__/src/simple.e2e.test.ts +0 -133
  512. package/__tests__/src/storage-upload.test.ts +0 -37
  513. package/__tests__/src/store.test.ts +0 -960
  514. package/__tests__/src/syncTable.e2e.test.ts +0 -245
  515. package/__tests__/src/syncTable.test.ts +0 -235
  516. package/__tests__/src/transactionValidation.test.ts +0 -450
  517. package/__tests__/src/typeUtils.ts +0 -39
  518. package/__tests__/src/upstream-improvements.e2e.test.ts +0 -54
  519. package/__tests__/src/utils/MutationStorage.test.ts +0 -77
  520. package/__tests__/src/utils/PersistedObject.test.ts +0 -569
  521. package/__tests__/src/utils/dates.test.ts +0 -111
  522. package/__tests__/src/utils/e2e.ts +0 -100
  523. package/__tests__/src/utils/msw.ts +0 -3
  524. package/__tests__/src/utils/object.test.ts +0 -78
  525. package/__tests__/src/utils/weakHash.test.ts +0 -68
  526. package/__tests__/src/utils/weakHashLegacy.test.ts +0 -22
  527. package/__tests__/src/vite.env.d.ts +0 -1
  528. package/src/BackendRelayError.ts +0 -50
  529. package/src/Connection.ts +0 -361
  530. package/src/InMemoryStorage.ts +0 -34
  531. package/src/IndexedDBStorage.ts +0 -398
  532. package/src/Reactor.js +0 -1541
  533. package/src/StorageAPI.ts +0 -147
  534. package/src/Stream.ts +0 -1252
  535. package/src/SyncTable.ts +0 -750
  536. package/src/WindowNetworkListener.js +0 -19
  537. package/src/__types__/fieldsTypeTest.ts +0 -111
  538. package/src/__types__/typeUtils.ts +0 -39
  539. package/src/__types__/useDatesTypeTest.ts +0 -66
  540. package/src/attrTypes.ts +0 -37
  541. package/src/authAPI.ts +0 -205
  542. package/src/clientTypes.ts +0 -28
  543. package/src/coreTypes.ts +0 -58
  544. package/src/createRouteHandler.ts +0 -68
  545. package/src/datalog.js +0 -116
  546. package/src/devtool.ts +0 -179
  547. package/src/framework.ts +0 -450
  548. package/src/helperTypes.ts +0 -117
  549. package/src/index.ts +0 -1293
  550. package/src/infiniteQuery.ts +0 -599
  551. package/src/instaml.ts +0 -676
  552. package/src/instaql.ts +0 -999
  553. package/src/instatx.ts +0 -265
  554. package/src/model/instaqlResult.js +0 -25
  555. package/src/parseSchemaFromJSON.ts +0 -176
  556. package/src/presence.ts +0 -123
  557. package/src/presenceTypes.ts +0 -19
  558. package/src/queryTypes.ts +0 -749
  559. package/src/queryValidation.ts +0 -598
  560. package/src/reactorAuth.js +0 -236
  561. package/src/reactorEvents.js +0 -414
  562. package/src/reactorMutations.js +0 -354
  563. package/src/reactorRooms.js +0 -297
  564. package/src/reactorStorage.js +0 -180
  565. package/src/reactorSubs.js +0 -275
  566. package/src/reactorTransport.js +0 -391
  567. package/src/reactorTypes.ts +0 -41
  568. package/src/routeHandlerProtocol.ts +0 -25
  569. package/src/rulesTypes.ts +0 -132
  570. package/src/sanityCheckQueries.ts +0 -191
  571. package/src/schema.ts +0 -206
  572. package/src/schemaTypes.ts +0 -664
  573. package/src/store.ts +0 -1165
  574. package/src/transactionValidation.ts +0 -204
  575. package/src/urls.ts +0 -50
  576. package/src/utils/Deferred.ts +0 -20
  577. package/src/utils/MutationStorage.ts +0 -89
  578. package/src/utils/PersistedObject.ts +0 -612
  579. package/src/utils/dates.ts +0 -269
  580. package/src/utils/error.ts +0 -9
  581. package/src/utils/fetch.ts +0 -131
  582. package/src/utils/flags.ts +0 -14
  583. package/src/utils/id.ts +0 -28
  584. package/src/utils/linkIndex.ts +0 -33
  585. package/src/utils/log.ts +0 -23
  586. package/src/utils/object.js +0 -180
  587. package/src/utils/pgtime.ts +0 -199
  588. package/src/utils/pick.js +0 -9
  589. package/src/utils/strings.ts +0 -19
  590. package/src/utils/weakHash.ts +0 -77
  591. package/src/utils/weakHashLegacy.ts +0 -75
  592. package/src/warningToggle.ts +0 -5
  593. package/tsconfig.cjs.dev.json +0 -15
  594. package/tsconfig.dev.json +0 -14
  595. package/tsconfig.json +0 -13
  596. package/tsconfig.test.json +0 -5
  597. package/vite.config.ts +0 -19
  598. package/vitest.config.ts +0 -54
@@ -0,0 +1,188 @@
1
+ import { BackendRelaySchemaDef, EntitiesDef, LinksDef, RoomsDef, BackendRelayDBAttr, BackendRelayDBIdent, BackendRelayDBCheckedDataType } from '@backendrelay/core';
2
+ import { BackendRelayAPIPlatformSchema, BackendRelayAPISchemaPlanStep, BackendRelayAPISchemaPushStep } from '../schema.ts';
3
+ import { ProgressPromise } from '../ProgressPromise.ts';
4
+ import { RenameCommand } from '../migrations.ts';
5
+ export type BackendRelayAPIGetAppSchemaResponse = {
6
+ schema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
7
+ };
8
+ export type BackendRelayAPISchemaPushBody = {
9
+ schema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
10
+ overwrite?: false;
11
+ } | {
12
+ schema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
13
+ overwrite: true;
14
+ renames?: RenameCommand[];
15
+ };
16
+ export type PlanStep = ['add-attr', BackendRelayDBAttr] | ['update-attr', Partial<BackendRelayDBAttr>] | ['index', {
17
+ 'attr-id': string;
18
+ 'forward-identity': BackendRelayDBIdent;
19
+ }] | [
20
+ 'remove-index',
21
+ {
22
+ 'attr-id': string;
23
+ 'forward-identity': BackendRelayDBIdent;
24
+ }
25
+ ] | ['unique', {
26
+ 'attr-id': string;
27
+ 'forward-identity': BackendRelayDBIdent;
28
+ }] | [
29
+ 'remove-unique',
30
+ {
31
+ 'attr-id': string;
32
+ 'forward-identity': BackendRelayDBIdent;
33
+ }
34
+ ] | ['required', {
35
+ 'attr-id': string;
36
+ 'forward-identity': BackendRelayDBIdent;
37
+ }] | [
38
+ 'remove-required',
39
+ {
40
+ 'attr-id': string;
41
+ 'forward-identity': BackendRelayDBIdent;
42
+ }
43
+ ] | [
44
+ 'check-data-type',
45
+ {
46
+ 'attr-id': string;
47
+ 'forward-identity': BackendRelayDBIdent;
48
+ 'checked-data-type': BackendRelayDBCheckedDataType;
49
+ }
50
+ ] | [
51
+ 'remove-data-type',
52
+ {
53
+ 'attr-id': string;
54
+ 'forward-identity': BackendRelayDBIdent;
55
+ }
56
+ ] | ['delete-attr', string];
57
+ export type PlanReponseJSON = {
58
+ 'new-schema': BackendRelayAPIPlatformSchema;
59
+ 'current-schema': BackendRelayAPIPlatformSchema;
60
+ 'current-attrs': BackendRelayDBAttr[];
61
+ steps: PlanStep[];
62
+ };
63
+ export type StepWithJobId<T> = T extends ['add-attr', infer P] ? ['add-attr', P] : T extends ['update-attr', infer P] ? ['update-attr', P] : T extends [infer K, infer P] ? [K, P & {
64
+ 'job-id': string;
65
+ }] : never;
66
+ export type PushStep = StepWithJobId<PlanStep>;
67
+ export type IndexingJobJSON = {
68
+ id: string;
69
+ app_id: string;
70
+ group_id: string;
71
+ attr_id: string;
72
+ attr_name: string;
73
+ job_type: 'check-data-type' | 'remove-data-type' | 'index' | 'remove-index' | 'unique' | 'remove-unique' | 'required' | 'remove-required';
74
+ job_status: 'waiting' | 'processing' | 'completed' | 'errored';
75
+ work_estimate: number | null;
76
+ work_completed: number | null;
77
+ error: 'invalid-triple-error' | 'invalid-attr-state-error' | 'triple-not-unique-error' | 'triple-too-large-error' | 'missing-required-error' | 'unexpected-error';
78
+ checked_data_type?: BackendRelayDBCheckedDataType;
79
+ created_at: string;
80
+ updated_at: string;
81
+ done_at: string;
82
+ invalid_unique_value: any;
83
+ invalid_triples_sample: {
84
+ entity_id: string;
85
+ value: any;
86
+ json_type: 'string' | 'number' | 'boolean' | 'null' | 'object' | 'array' | 'date';
87
+ }[];
88
+ error_data: any;
89
+ };
90
+ export type SchemaPushResponseJSON = {
91
+ 'indexing-jobs'?: {
92
+ 'group-id': string;
93
+ jobs: IndexingJobJSON[];
94
+ } | null;
95
+ steps: PushStep[];
96
+ };
97
+ export type BackendRelayAPIPlanSchemaPushResponse = {
98
+ newSchema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
99
+ currentSchema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
100
+ steps: BackendRelayAPISchemaPlanStep[];
101
+ };
102
+ export type InProgressStepsSummary = {
103
+ friendlyDescription: string;
104
+ totalCount: number;
105
+ inProgressCount: number;
106
+ completedCount: number;
107
+ errorCount: number;
108
+ steps: BackendRelayAPISchemaPushStep[];
109
+ inProgressSteps: BackendRelayAPISchemaPushStep[];
110
+ completedSteps: BackendRelayAPISchemaPushStep[];
111
+ erroredSteps: BackendRelayAPISchemaPushStep[];
112
+ };
113
+ export type BackendRelayAPISchemaPushResponse = {
114
+ newSchema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
115
+ steps: BackendRelayAPISchemaPushStep[];
116
+ summary: InProgressStepsSummary;
117
+ };
118
+ export declare function getAppAPISchema(apiURI: string, token: string, appId: string): Promise<BackendRelayAPIPlatformSchema>;
119
+ export declare function getAppSchema(apiURI: string, token: string, appId: string): Promise<BackendRelayAPIGetAppSchemaResponse>;
120
+ export declare function translatePlanStep(apiStep: PlanStep, currentAttrs: BackendRelayDBAttr[]): BackendRelayAPISchemaPlanStep;
121
+ export declare function translatePlanSteps(apiSteps: PlanStep[], currentAttrs: BackendRelayDBAttr[]): BackendRelayAPISchemaPlanStep[];
122
+ export type PushObjOf<S extends PushStep> = Extract<BackendRelayAPISchemaPushStep, {
123
+ type: S[0];
124
+ }>;
125
+ export declare function translatePushStep<S extends PushStep>(apiStep: S, jobs: IndexingJobJSON[], currentAttrs: BackendRelayDBAttr[]): PushObjOf<S>;
126
+ export declare function translatePushSteps(apiSteps: PushStep[], jobs: IndexingJobJSON[], currentAttrs: BackendRelayDBAttr[]): BackendRelayAPISchemaPushStep[];
127
+ export declare function shouldOverwrite(body: BackendRelayAPISchemaPushBody): body is {
128
+ schema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
129
+ overwrite: true;
130
+ renames?: RenameCommand[];
131
+ };
132
+ export declare function planSchemaPush(apiURI: string, token: string, appId: string, body: BackendRelayAPISchemaPushBody): Promise<BackendRelayAPIPlanSchemaPushResponse>;
133
+ export declare function planSchemaPushOverwriteInternal(apiURI: string, token: string, appId: string, body: BackendRelayAPISchemaPushBody): Promise<{
134
+ currentSchema: BackendRelaySchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
135
+ currentAttrs: BackendRelayDBAttr[];
136
+ txSteps: PlanStep[];
137
+ steps: BackendRelayAPISchemaPlanStep[];
138
+ }>;
139
+ export declare function planSchemaPushOverwrite(apiURI: string, token: string, appId: string, body: BackendRelayAPISchemaPushBody): Promise<BackendRelayAPIPlanSchemaPushResponse>;
140
+ export declare function allJobsComplete(jobs: IndexingJobJSON[]): boolean;
141
+ export declare function latestJobUpdate(jobs: IndexingJobJSON[]): Date | null;
142
+ export declare function jobFetchLoop(apiURI: string, token: string, appId: string, groupId: string, startingJobs: IndexingJobJSON[], onFetch: (jobs: IndexingJobJSON[]) => void): Promise<IndexingJobJSON[]>;
143
+ export type BackendRelayBackgroundSchemaBaseJob = {
144
+ id: string;
145
+ createdAt: Date;
146
+ updatedAt: Date;
147
+ status: 'completed' | 'waiting' | 'processing' | 'errored';
148
+ workEstimate: number | null;
149
+ workCompleted: number | null;
150
+ error?: 'invalid-triple-error' | 'invalid-attr-state-error' | 'triple-not-unique-error' | 'triple-too-large-error' | 'missing-required-error' | 'unexpected-error';
151
+ invalidTriplesSample?: {
152
+ entityId: string;
153
+ value: any;
154
+ jsonType: 'string' | 'number' | 'boolean' | 'null' | 'object' | 'array' | 'date';
155
+ }[];
156
+ };
157
+ export interface BackendRelayBackgroundSchemaRemoveDataTypeJob extends BackendRelayBackgroundSchemaBaseJob {
158
+ type: 'remove-data-type';
159
+ }
160
+ export interface BackendRelayBackgroundSchemaCheckDataTypeJob extends BackendRelayBackgroundSchemaBaseJob {
161
+ type: 'check-data-type';
162
+ checkedDataType: BackendRelayDBCheckedDataType;
163
+ }
164
+ export interface BackendRelayBackgroundSchemaAddIndexJob extends BackendRelayBackgroundSchemaBaseJob {
165
+ type: 'index';
166
+ }
167
+ export interface BackendRelayBackgroundSchemaRemoveIndexJob extends BackendRelayBackgroundSchemaBaseJob {
168
+ type: 'remove-index';
169
+ }
170
+ export interface BackendRelayBackgroundSchemaAddUniqueJob extends BackendRelayBackgroundSchemaBaseJob {
171
+ type: 'unique';
172
+ invalidUniqueValue?: any;
173
+ }
174
+ export interface BackendRelayBackgroundSchemaRemoveUniqueJob extends BackendRelayBackgroundSchemaBaseJob {
175
+ type: 'remove-unique';
176
+ }
177
+ export interface BackendRelayBackgroundSchemaAddRequiredJob extends BackendRelayBackgroundSchemaBaseJob {
178
+ type: 'required';
179
+ }
180
+ export interface BackendRelayBackgroundSchemaRemoveRequiredJob extends BackendRelayBackgroundSchemaBaseJob {
181
+ type: 'remove-required';
182
+ }
183
+ export type BackendRelayBackgroundSchemaJob = BackendRelayBackgroundSchemaRemoveDataTypeJob | BackendRelayBackgroundSchemaCheckDataTypeJob | BackendRelayBackgroundSchemaAddIndexJob | BackendRelayBackgroundSchemaRemoveIndexJob | BackendRelayBackgroundSchemaAddUniqueJob | BackendRelayBackgroundSchemaRemoveUniqueJob | BackendRelayBackgroundSchemaAddRequiredJob | BackendRelayBackgroundSchemaRemoveRequiredJob;
184
+ export declare function formatJob(job: IndexingJobJSON): BackendRelayBackgroundSchemaJob;
185
+ export declare function stepSummary(steps: BackendRelayAPISchemaPushStep[]): InProgressStepsSummary;
186
+ export declare function schemaPush(apiURI: string, token: string, appId: string, body: BackendRelayAPISchemaPushBody): ProgressPromise<InProgressStepsSummary, BackendRelayAPISchemaPushResponse>;
187
+ export declare function schemaPushOverwrite(apiURI: string, token: string, appId: string, body: BackendRelayAPISchemaPushBody): ProgressPromise<InProgressStepsSummary, BackendRelayAPISchemaPushResponse>;
188
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/api/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EACrB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,EAE9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAML,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAE9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC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,MAAM,MAAM,+BAA+B,GACvC,6CAA6C,GAC7C,4CAA4C,GAC5C,uCAAuC,GACvC,0CAA0C,GAC1C,wCAAwC,GACxC,2CAA2C,GAC3C,0CAA0C,GAC1C,6CAA6C,CAAC;AAElD,wBAAgB,SAAS,CACvB,GAAG,EAAE,eAAe,GACnB,+BAA+B,CAyCjC;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,6BAA6B,EAAE,GACrC,sBAAsB,CA8BxB;AAED,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,6BAA6B,GAClC,eAAe,CAAC,sBAAsB,EAAE,iCAAiC,CAAC,CAmD5E;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,6BAA6B,GAClC,eAAe,CAAC,sBAAsB,EAAE,iCAAiC,CAAC,CAqD5E"}
@@ -0,0 +1,393 @@
1
+ import { attrFwdLabel, attrFwdName, attrRevName, collectSystemCatalogIdentNames, identName, validateSchema, } from "../schema.js";
2
+ import { ProgressPromise } from "../ProgressPromise.js";
3
+ import { buildAutoRenameSelector, convertTxSteps, diffSchemas, } from "../migrations.js";
4
+ import { jsonFetch } from "./http.js";
5
+ import { apiSchemaToAttrs, apiSchemaToBackendRelaySchemaDef, } from "./schema-coerce.js";
6
+ export async function getAppAPISchema(apiURI, token, appId) {
7
+ const { schema: apiSchema } = await jsonFetch(`${apiURI}/superadmin/apps/${appId}/schema`, {
8
+ method: 'GET',
9
+ headers: {
10
+ Authorization: `Bearer ${token}`,
11
+ },
12
+ });
13
+ return apiSchema;
14
+ }
15
+ export async function getAppSchema(apiURI, token, appId) {
16
+ const apiSchema = await getAppAPISchema(apiURI, token, appId);
17
+ return { schema: apiSchemaToBackendRelaySchemaDef(apiSchema) };
18
+ }
19
+ export function translatePlanStep(apiStep, currentAttrs) {
20
+ const [stepType, stepParams] = apiStep;
21
+ switch (stepType) {
22
+ case 'add-attr': {
23
+ const attr = stepParams;
24
+ const attrName = attrFwdName(attr);
25
+ const friendlyDescription = attr['value-type'] === 'blob'
26
+ ? attrFwdLabel(attr) === 'id'
27
+ ? `Create new entity ${attrName}.`
28
+ : `Add attribute ${attrName}.`
29
+ : `Link ${attrName} to ${attrRevName(attr)}.`;
30
+ return { type: 'add-attr', friendlyDescription, attr };
31
+ }
32
+ case 'update-attr': {
33
+ const attr = stepParams;
34
+ return {
35
+ type: 'update-attr',
36
+ friendlyDescription: `Update attribute ${attrFwdName(attr)}.`,
37
+ attr,
38
+ };
39
+ }
40
+ case 'index': {
41
+ return {
42
+ type: 'index',
43
+ friendlyDescription: `Add index to ${identName(stepParams['forward-identity'])}.`,
44
+ attrId: stepParams['attr-id'],
45
+ forwardIdentity: stepParams['forward-identity'],
46
+ };
47
+ }
48
+ case 'remove-index': {
49
+ return {
50
+ type: 'remove-index',
51
+ friendlyDescription: `Remove index from ${identName(stepParams['forward-identity'])}.`,
52
+ attrId: stepParams['attr-id'],
53
+ forwardIdentity: stepParams['forward-identity'],
54
+ };
55
+ }
56
+ case 'unique': {
57
+ return {
58
+ type: 'unique',
59
+ friendlyDescription: `Ensure that ${identName(stepParams['forward-identity'])} is unique.`,
60
+ attrId: stepParams['attr-id'],
61
+ forwardIdentity: stepParams['forward-identity'],
62
+ };
63
+ }
64
+ case 'remove-unique': {
65
+ return {
66
+ type: 'remove-unique',
67
+ friendlyDescription: `Remove uniqueness constraint from ${identName(stepParams['forward-identity'])}.`,
68
+ attrId: stepParams['attr-id'],
69
+ forwardIdentity: stepParams['forward-identity'],
70
+ };
71
+ }
72
+ case 'required': {
73
+ return {
74
+ type: 'required',
75
+ friendlyDescription: `Make ${identName(stepParams['forward-identity'])} a required attribute.`,
76
+ attrId: stepParams['attr-id'],
77
+ forwardIdentity: stepParams['forward-identity'],
78
+ };
79
+ }
80
+ case 'remove-required': {
81
+ return {
82
+ type: 'remove-required',
83
+ friendlyDescription: `Allow ${identName(stepParams['forward-identity'])} to be missing or null.`,
84
+ attrId: stepParams['attr-id'],
85
+ forwardIdentity: stepParams['forward-identity'],
86
+ };
87
+ }
88
+ case 'check-data-type': {
89
+ const forwardIdentity = stepParams['forward-identity'];
90
+ const dataType = stepParams['checked-data-type'];
91
+ return {
92
+ type: 'check-data-type',
93
+ friendlyDescription: `Enforce data type of ${identName(forwardIdentity)} as type ${dataType}.`,
94
+ attrId: stepParams['attr-id'],
95
+ forwardIdentity,
96
+ checkedDataType: dataType,
97
+ };
98
+ }
99
+ case 'remove-data-type': {
100
+ const forwardIdentity = stepParams['forward-identity'];
101
+ return {
102
+ type: 'remove-data-type',
103
+ friendlyDescription: `Stop enforcing data type of ${identName(forwardIdentity)}.`,
104
+ attrId: stepParams['attr-id'],
105
+ forwardIdentity: stepParams['forward-identity'],
106
+ };
107
+ }
108
+ case 'delete-attr': {
109
+ const attrId = stepParams;
110
+ const attr = currentAttrs.find((a) => a.id === attrId);
111
+ const friendlyName = attr ? identName(attr['forward-identity']) : attrId;
112
+ return {
113
+ type: 'delete-attr',
114
+ attrId: stepParams,
115
+ friendlyDescription: `Delete attribute ${friendlyName}.`,
116
+ };
117
+ }
118
+ default: {
119
+ // Get a type error if we ignore a case
120
+ const unknownType = stepType;
121
+ throw new Error(`Unknown schema operation ${unknownType}.`);
122
+ }
123
+ }
124
+ }
125
+ export function translatePlanSteps(apiSteps, currentAttrs) {
126
+ return apiSteps.map((step) => translatePlanStep(step, currentAttrs));
127
+ }
128
+ export function translatePushStep(apiStep, jobs, currentAttrs) {
129
+ const [stepType, stepParams] = apiStep;
130
+ if (stepType === 'add-attr' ||
131
+ stepType === 'update-attr' ||
132
+ stepType === 'delete-attr') {
133
+ const planStep = translatePlanStep(apiStep, currentAttrs);
134
+ if (planStep.type !== 'add-attr' &&
135
+ planStep.type !== 'update-attr' &&
136
+ planStep.type !== 'delete-attr') {
137
+ // This is just here for typescript
138
+ throw new Error('Invalid step.');
139
+ }
140
+ return planStep;
141
+ }
142
+ const jobId = stepParams['job-id'];
143
+ const job = jobs.find((j) => j.id === jobId);
144
+ const planStep = translatePlanStep(apiStep, currentAttrs);
145
+ const backgroundJob = formatJob(job);
146
+ if (planStep.type !== backgroundJob.type) {
147
+ throw new Error('Invalid type');
148
+ }
149
+ return { ...planStep, backgroundJob };
150
+ }
151
+ export function translatePushSteps(apiSteps, jobs, currentAttrs) {
152
+ return apiSteps.map((step) => translatePushStep(step, jobs, currentAttrs));
153
+ }
154
+ export function shouldOverwrite(body) {
155
+ if ('renames' in body && !body.overwrite) {
156
+ throw new Error('If you pass in `renames`, you _must_ pass in `overwrite: true`');
157
+ }
158
+ return !!body.overwrite;
159
+ }
160
+ export async function planSchemaPush(apiURI, token, appId, body) {
161
+ const resp = await jsonFetch(`${apiURI}/superadmin/apps/${appId}/schema/push/plan`, {
162
+ method: 'POST',
163
+ headers: {
164
+ 'Content-Type': 'application/json',
165
+ Authorization: `Bearer ${token}`,
166
+ },
167
+ body: JSON.stringify({
168
+ ...body,
169
+ check_types: true,
170
+ supports_background_updates: true,
171
+ }),
172
+ });
173
+ const currentAttrs = resp['current-attrs'];
174
+ return {
175
+ newSchema: apiSchemaToBackendRelaySchemaDef(resp['new-schema']),
176
+ currentSchema: apiSchemaToBackendRelaySchemaDef(resp['current-schema']),
177
+ steps: translatePlanSteps(resp['steps'], currentAttrs),
178
+ };
179
+ }
180
+ export async function planSchemaPushOverwriteInternal(apiURI, token, appId, body) {
181
+ const apiSchema = await getAppAPISchema(apiURI, token, appId);
182
+ const currentSchema = apiSchemaToBackendRelaySchemaDef(apiSchema);
183
+ const currentAttrs = apiSchemaToAttrs(apiSchema);
184
+ const systemCatalogIdentNames = collectSystemCatalogIdentNames(currentAttrs);
185
+ const newSchema = body.schema;
186
+ validateSchema(newSchema, systemCatalogIdentNames);
187
+ const renames = ('renames' in body ? body.renames : null) || [];
188
+ const renameSelector = buildAutoRenameSelector(renames);
189
+ const diffResult = await diffSchemas(currentSchema, newSchema, renameSelector, systemCatalogIdentNames);
190
+ const txSteps = convertTxSteps(diffResult, currentAttrs);
191
+ return {
192
+ currentSchema,
193
+ currentAttrs,
194
+ txSteps: txSteps,
195
+ steps: translatePlanSteps(txSteps, currentAttrs),
196
+ };
197
+ }
198
+ export async function planSchemaPushOverwrite(apiURI, token, appId, body) {
199
+ const { currentSchema, steps } = await planSchemaPushOverwriteInternal(apiURI, token, appId, body);
200
+ return {
201
+ newSchema: body.schema,
202
+ currentSchema: currentSchema,
203
+ steps: steps,
204
+ };
205
+ }
206
+ export function allJobsComplete(jobs) {
207
+ if (jobs.length === 0) {
208
+ return true;
209
+ }
210
+ return jobs.every((j) => j.job_status === 'completed' || j.job_status === 'errored');
211
+ }
212
+ export function latestJobUpdate(jobs) {
213
+ const res = jobs.reduce((acc, job) => {
214
+ if (job.updated_at) {
215
+ const d = new Date(job.updated_at);
216
+ if (!acc || d > acc) {
217
+ return d;
218
+ }
219
+ }
220
+ return acc;
221
+ }, null);
222
+ return res;
223
+ }
224
+ export async function jobFetchLoop(apiURI, token, appId, groupId, startingJobs, onFetch) {
225
+ let interval = 100;
226
+ let lastJobs = startingJobs;
227
+ let errorCount = 0;
228
+ while (!allJobsComplete(lastJobs)) {
229
+ await new Promise((resolve) => setTimeout(resolve, interval));
230
+ try {
231
+ const nextJobs = (await jsonFetch(`${apiURI}/dash/apps/${appId}/indexing-jobs/group/${groupId}`, {
232
+ method: 'GET',
233
+ headers: {
234
+ Authorization: `Bearer ${token}`,
235
+ },
236
+ })).jobs;
237
+ onFetch(nextJobs);
238
+ if (allJobsComplete(nextJobs)) {
239
+ return nextJobs;
240
+ }
241
+ errorCount = 0;
242
+ const lastUpdate = latestJobUpdate(lastJobs);
243
+ const thisUpdate = latestJobUpdate(nextJobs);
244
+ lastJobs = nextJobs;
245
+ interval =
246
+ thisUpdate === null || (lastUpdate && lastUpdate >= thisUpdate)
247
+ ? Math.min(interval * 2, 10000)
248
+ : 100;
249
+ }
250
+ catch (e) {
251
+ if (errorCount > 3) {
252
+ throw e;
253
+ }
254
+ else {
255
+ errorCount++;
256
+ interval = Math.min(interval * 2, 10000);
257
+ }
258
+ }
259
+ }
260
+ return lastJobs;
261
+ }
262
+ export function formatJob(job) {
263
+ const baseJob = {
264
+ id: job.id,
265
+ createdAt: new Date(job.created_at),
266
+ updatedAt: new Date(job.updated_at),
267
+ status: job.job_status,
268
+ workEstimate: job.work_estimate,
269
+ workCompleted: job.work_completed,
270
+ error: job.error,
271
+ invalidTriplesSample: job.invalid_triples_sample?.map((s) => {
272
+ return { entityId: s.entity_id, value: s.value, jsonType: s.json_type };
273
+ }),
274
+ };
275
+ switch (job.job_type) {
276
+ case 'remove-data-type':
277
+ case 'index':
278
+ case 'remove-index':
279
+ case 'required':
280
+ case 'remove-required':
281
+ case 'remove-unique': {
282
+ return { ...baseJob, type: job.job_type };
283
+ }
284
+ case 'check-data-type': {
285
+ return {
286
+ ...baseJob,
287
+ type: job.job_type,
288
+ checkedDataType: job.checked_data_type,
289
+ };
290
+ }
291
+ case 'unique': {
292
+ return {
293
+ ...baseJob,
294
+ type: job.job_type,
295
+ invalidUniqueValue: job.invalid_unique_value,
296
+ };
297
+ }
298
+ default: {
299
+ const neverType = job.job_type;
300
+ throw new Error(`Unknown job type: ${neverType}.`);
301
+ }
302
+ }
303
+ }
304
+ export function stepSummary(steps) {
305
+ const inProgress = steps.filter((s) => 'backgroundJob' in s &&
306
+ (s.backgroundJob.status === 'processing' ||
307
+ s.backgroundJob.status === 'waiting'));
308
+ const completed = steps.filter((s) => !('backgroundJob' in s) || s.backgroundJob.status === 'completed');
309
+ const errored = steps.filter((s) => 'backgroundJob' in s && s.backgroundJob.status === 'errored');
310
+ return {
311
+ friendlyDescription: inProgress.length
312
+ ? `Completing ${inProgress.length} of ${steps.length} schema operations.`
313
+ : `Finished ${steps.length} schema operation${steps.length === 1 ? '' : 's'}${errored.length
314
+ ? `, with ${errored.length} error${errored.length > 1 ? 's' : ''}`
315
+ : '.'}`,
316
+ totalCount: steps.length,
317
+ inProgressCount: inProgress.length,
318
+ completedCount: completed.length,
319
+ errorCount: errored.length,
320
+ steps,
321
+ inProgressSteps: inProgress,
322
+ completedSteps: completed,
323
+ erroredSteps: errored,
324
+ };
325
+ }
326
+ export function schemaPush(apiURI, token, appId, body) {
327
+ return new ProgressPromise(async (progress, resolve, reject) => {
328
+ try {
329
+ const currentAPISchema = await getAppAPISchema(apiURI, token, appId);
330
+ const currentAttrs = apiSchemaToAttrs(currentAPISchema);
331
+ const resp = await jsonFetch(`${apiURI}/superadmin/apps/${appId}/schema/push/apply`, {
332
+ method: 'POST',
333
+ headers: {
334
+ 'Content-Type': 'application/json',
335
+ Authorization: `Bearer ${token}`,
336
+ },
337
+ body: JSON.stringify({
338
+ ...body,
339
+ check_types: true,
340
+ supports_background_updates: true,
341
+ }),
342
+ });
343
+ const indexingJobs = resp['indexing-jobs'];
344
+ const jobs = !indexingJobs
345
+ ? []
346
+ : await jobFetchLoop(apiURI, token, appId, indexingJobs['group-id'], indexingJobs['jobs'], (jobs) => {
347
+ progress(stepSummary(translatePushSteps(resp.steps, jobs, currentAttrs)));
348
+ });
349
+ const schemaRes = await getAppSchema(apiURI, token, appId);
350
+ resolve({
351
+ newSchema: schemaRes.schema,
352
+ steps: translatePushSteps(resp.steps, jobs, currentAttrs),
353
+ summary: stepSummary(translatePushSteps(resp.steps, jobs, currentAttrs)),
354
+ });
355
+ }
356
+ catch (e) {
357
+ reject(e);
358
+ }
359
+ });
360
+ }
361
+ export function schemaPushOverwrite(apiURI, token, appId, body) {
362
+ return new ProgressPromise(async (progress, resolve, reject) => {
363
+ try {
364
+ const { currentAttrs, txSteps } = await planSchemaPushOverwriteInternal(apiURI, token, appId, body);
365
+ const resp = await jsonFetch(`${apiURI}/dash/apps/${appId}/schema/steps/apply`, {
366
+ method: 'POST',
367
+ headers: {
368
+ 'Content-Type': 'application/json',
369
+ Authorization: `Bearer ${token}`,
370
+ },
371
+ body: JSON.stringify({
372
+ steps: txSteps,
373
+ }),
374
+ });
375
+ const indexingJobs = resp['indexing-jobs'];
376
+ const jobs = !indexingJobs
377
+ ? []
378
+ : await jobFetchLoop(apiURI, token, appId, indexingJobs['group-id'], indexingJobs['jobs'], (jobs) => {
379
+ progress(stepSummary(translatePushSteps(resp.steps, jobs, currentAttrs)));
380
+ });
381
+ const schemaRes = await getAppSchema(apiURI, token, appId);
382
+ resolve({
383
+ newSchema: schemaRes.schema,
384
+ steps: translatePushSteps(resp.steps, jobs, currentAttrs),
385
+ summary: stepSummary(translatePushSteps(resp.steps, jobs, currentAttrs)),
386
+ });
387
+ }
388
+ catch (e) {
389
+ reject(e);
390
+ }
391
+ });
392
+ }
393
+ //# sourceMappingURL=schema.js.map