@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,607 @@
1
+ import { BackendRelaySchemaDef, BackendRelayUnknownSchema, ResolveAttrs } from '@backendrelay/core';
2
+ type Config<Schema extends BackendRelaySchemaDef<any, any, any>> = {
3
+ appId?: string | null | undefined;
4
+ adminToken?: string | null | undefined;
5
+ token?: string | null | undefined;
6
+ apiURI?: string | null | undefined;
7
+ schema?: Schema | null | undefined;
8
+ /**
9
+ * Optional hook used by {@link WebhooksManager} to obtain the bearer token
10
+ * for each management request. Lets callers (e.g. the platform SDK) wrap
11
+ * the operation in token-refresh / retry logic.
12
+ *
13
+ * If omitted, the manager uses the static `adminToken`/`token` from this
14
+ * config.
15
+ */
16
+ withAuth?: WithAuth;
17
+ };
18
+ type JsonFetch = (input: RequestInfo, init?: RequestInit | undefined) => Promise<any>;
19
+ /**
20
+ * Runs a webhook management operation that needs a bearer token. The runner
21
+ * is responsible for supplying the token, and may retry the operation with a
22
+ * fresh token if the first attempt fails with an auth error.
23
+ */
24
+ export type WithAuth = <T>(operation: (token: string) => Promise<T>) => Promise<T>;
25
+ export type WebhookBody = {
26
+ payloadUrl: string;
27
+ token: string;
28
+ };
29
+ export type WebhookEntity<Schema extends BackendRelaySchemaDef<any, any, any>, NamespaceName extends keyof Schema['entities'] & string> = {
30
+ id: string;
31
+ } & ResolveAttrs<Schema['entities'], NamespaceName, false>;
32
+ export type WebhookPayloadRecord<Schema extends BackendRelaySchemaDef<any, any, any>> = {
33
+ [NamespaceName in keyof Schema['entities'] & string]: {
34
+ namespace: NamespaceName;
35
+ id: string;
36
+ action: 'create';
37
+ before: null;
38
+ after: WebhookEntity<Schema, NamespaceName>;
39
+ idempotencyKey: string;
40
+ } | {
41
+ namespace: NamespaceName;
42
+ id: string;
43
+ action: 'update';
44
+ before: WebhookEntity<Schema, NamespaceName>;
45
+ after: WebhookEntity<Schema, NamespaceName>;
46
+ idempotencyKey: string;
47
+ } | {
48
+ namespace: NamespaceName;
49
+ id: string;
50
+ action: 'delete';
51
+ before: WebhookEntity<Schema, NamespaceName>;
52
+ after: null;
53
+ idempotencyKey: string;
54
+ };
55
+ }[keyof Schema['entities'] & string];
56
+ export type WebhookPayload<Schema extends BackendRelaySchemaDef<any, any, any>> = {
57
+ data: WebhookPayloadRecord<Schema>[];
58
+ idempotencyKey: string;
59
+ /** Correlation ID recorded on the transaction that produced this event. */
60
+ requestId?: string | null;
61
+ };
62
+ /**
63
+ * Every webhook record shape for a schema, keyed by namespace and action.
64
+ *
65
+ * Derive concrete handler types without hand-writing entity shapes:
66
+ *
67
+ * ```ts
68
+ * type PostCreated = WebhookPayloadByNamespace<Schema>['posts']['create'];
69
+ * ```
70
+ */
71
+ export type WebhookPayloadByNamespace<Schema extends BackendRelaySchemaDef<any, any, any>> = {
72
+ [NamespaceName in keyof Schema['entities'] & string]: {
73
+ create: WebhookPayloadRecordFor<Schema, NamespaceName, 'create'>;
74
+ update: WebhookPayloadRecordFor<Schema, NamespaceName, 'update'>;
75
+ delete: WebhookPayloadRecordFor<Schema, NamespaceName, 'delete'>;
76
+ };
77
+ };
78
+ export type WebhookAction = 'create' | 'update' | 'delete';
79
+ /**
80
+ * Whether BackendRelay will currently deliver events for a webhook.
81
+ * `disabled` webhooks remain configured but no new events are queued.
82
+ */
83
+ export type WebhookStatus = 'active' | 'disabled';
84
+ /**
85
+ * Stage in the delivery lifecycle of a single webhook event.
86
+ *
87
+ * - `pending`: queued, not yet picked up for delivery
88
+ * - `processing`: a sender is actively attempting delivery
89
+ * - `success`: the receiver acknowledged with a 2xx response
90
+ * - `error`: an attempt failed; another retry is scheduled
91
+ * - `failed`: all retries exhausted; will not be retried automatically
92
+ * (use {@link WebhooksManager.resendEvent} to retry manually)
93
+ */
94
+ export type WebhookEventStatus = 'pending' | 'processing' | 'success' | 'error' | 'failed';
95
+ export type WebhookInfo = {
96
+ /** Unique identifier for the webhook. */
97
+ id: string;
98
+ /** Where BackendRelay POSTs event payloads to. */
99
+ sink: {
100
+ /** HTTPS endpoint that BackendRelay POSTs to. */
101
+ url: string;
102
+ };
103
+ /** The namespaces this webhook listens to. */
104
+ namespaces: string[];
105
+ /** Which write actions trigger delivery. */
106
+ actions: WebhookAction[];
107
+ /** Whether the webhook is currently delivering events. */
108
+ status: WebhookStatus;
109
+ /**
110
+ * Human-readable reason the webhook is disabled. Set automatically when
111
+ * BackendRelay disables the webhook (e.g. after repeated delivery failures) or
112
+ * supplied by the caller via {@link WebhooksManager.disable}. `null` when
113
+ * `status` is `'active'`.
114
+ */
115
+ disabledReason: string | null;
116
+ /** When the webhook was created. */
117
+ createdAt: Date;
118
+ /** When the webhook's config was last changed. */
119
+ updatedAt: Date;
120
+ };
121
+ /**
122
+ * Record of a single HTTP delivery attempt for a webhook event.
123
+ * Stored in attempt order (oldest first) on the event's `attempts` array.
124
+ */
125
+ export type WebhookAttempt = {
126
+ /** When the attempt started. */
127
+ attemptAt: Date | null;
128
+ /** Time from request start to response received (or error), in milliseconds. */
129
+ durationMs: number | null;
130
+ /** `true` if the receiver returned a 2xx response. */
131
+ success: boolean | null;
132
+ /** HTTP status code returned by the receiver, if a response was received. */
133
+ statusCode: number | null;
134
+ /**
135
+ * First 256 bytes of the response body, for debugging. `null` if no
136
+ * response was received (e.g. on a network error).
137
+ */
138
+ responseText: string | null;
139
+ /**
140
+ * Short tag classifying a delivery failure. One of `timeout`, `dns`,
141
+ * `connect`, `tls`, `protocol`, `network`, or `unknown`. `null` on success.
142
+ */
143
+ errorType: string | null;
144
+ /** Free-form description of the failure. `null` on success. */
145
+ errorMessage: string | null;
146
+ };
147
+ export type WebhookEventInfo = {
148
+ /**
149
+ * BackendRelay Sequence Number — a stable, totally ordered identifier for the
150
+ * event.
151
+ */
152
+ isn: string;
153
+ /** Current stage in the delivery lifecycle. */
154
+ status: WebhookEventStatus;
155
+ /**
156
+ * Per-attempt records, in attempt order (oldest first). `null` if the
157
+ * event has not been attempted yet.
158
+ */
159
+ attempts: WebhookAttempt[] | null;
160
+ /**
161
+ * The next retry will not happen before this time. `null` once the event
162
+ * reaches a terminal status (`success` or `failed`).
163
+ */
164
+ nextAttemptAfter: Date | null;
165
+ /** When the event was queued. */
166
+ createdAt: Date;
167
+ /** When the event last transitioned status. */
168
+ updatedAt: Date;
169
+ };
170
+ export type WebhookEventsPage = {
171
+ /** The events on this page, newest first. */
172
+ events: WebhookEventInfo[];
173
+ pageInfo: {
174
+ /** Cursor pointing to the first event on this page. */
175
+ startCursor: string | null;
176
+ /**
177
+ * Cursor pointing to the last event on this page. Pass as
178
+ * {@link WebhooksManager.listEvents}'s `after` option to fetch the next page.
179
+ */
180
+ endCursor: string | null;
181
+ /** Whether more events are available after `endCursor`. */
182
+ hasNextPage: boolean;
183
+ };
184
+ };
185
+ export type CreateWebhookParams<Schema extends BackendRelaySchemaDef<any, any, any>> = {
186
+ /**
187
+ * HTTPS endpoint BackendRelay will POST events to. Must use the `https` scheme
188
+ * and resolve to a public host.
189
+ */
190
+ url: string;
191
+ /**
192
+ * Namespaces the webhook will listen to. Must reference at least one entity
193
+ * in the app's schema.
194
+ */
195
+ namespaces: (keyof Schema['entities'] & string)[];
196
+ /** Write actions that should trigger delivery. Must contain at least one. */
197
+ actions: WebhookAction[];
198
+ };
199
+ export type UpdateWebhookParams<Schema extends BackendRelaySchemaDef<any, any, any>> = {
200
+ /** New delivery URL. Omit to leave unchanged. */
201
+ url?: string;
202
+ /** New set of namespaces. Omit to leave unchanged. */
203
+ namespaces?: (keyof Schema['entities'] & string)[];
204
+ /** New set of actions. Omit to leave unchanged. */
205
+ actions?: WebhookAction[];
206
+ };
207
+ export type WebhookPayloadRecordFor<Schema extends BackendRelaySchemaDef<any, any, any>, NamespaceName extends keyof Schema['entities'] & string, Action extends WebhookAction> = Action extends 'create' ? {
208
+ namespace: NamespaceName;
209
+ id: string;
210
+ action: 'create';
211
+ before: null;
212
+ after: WebhookEntity<Schema, NamespaceName>;
213
+ idempotencyKey: string;
214
+ } : Action extends 'update' ? {
215
+ namespace: NamespaceName;
216
+ id: string;
217
+ action: 'update';
218
+ before: WebhookEntity<Schema, NamespaceName>;
219
+ after: WebhookEntity<Schema, NamespaceName>;
220
+ idempotencyKey: string;
221
+ } : Action extends 'delete' ? {
222
+ namespace: NamespaceName;
223
+ id: string;
224
+ action: 'delete';
225
+ before: WebhookEntity<Schema, NamespaceName>;
226
+ after: null;
227
+ idempotencyKey: string;
228
+ } : never;
229
+ export type WebhookHandlerFn<Schema extends BackendRelaySchemaDef<any, any, any>, NamespaceName extends keyof Schema['entities'] & string, Action extends WebhookAction, Result = any> = (record: WebhookPayloadRecordFor<Schema, NamespaceName, Action>) => Result | Promise<Result>;
230
+ export type DefaultKey = '$default';
231
+ export type ResolveHandlerAction<Action> = Action extends DefaultKey ? WebhookAction : Action extends WebhookAction ? Action : never;
232
+ export type WebhookHandlers<Schema extends BackendRelaySchemaDef<any, any, any>> = {
233
+ [NamespaceName in keyof Schema['entities'] & string]?: {
234
+ [Action in WebhookAction | DefaultKey]?: WebhookHandlerFn<Schema, NamespaceName, ResolveHandlerAction<Action>, any>;
235
+ };
236
+ } & {
237
+ $default?: WebhookHandlerFn<Schema, keyof Schema['entities'] & string, WebhookAction, any>;
238
+ };
239
+ export type TypedHandlerEntry<Schema extends BackendRelaySchemaDef<any, any, any>, NamespaceName extends keyof Schema['entities'] & string, Action extends WebhookAction | DefaultKey> = {
240
+ [N in NamespaceName]: {
241
+ [A in Action]: WebhookHandlerFn<Schema, NamespaceName, ResolveHandlerAction<Action>, any>;
242
+ };
243
+ };
244
+ export type TypedDefaultEntry<Schema extends BackendRelaySchemaDef<any, any, any>> = {
245
+ $default: WebhookHandlerFn<Schema, keyof Schema['entities'] & string, WebhookAction, any>;
246
+ };
247
+ export type WebhookHelpers<Schema extends BackendRelaySchemaDef<any, any, any>> = {
248
+ typedHandlers: {
249
+ (namespace: DefaultKey, handler: WebhookHandlerFn<Schema, keyof Schema['entities'] & string, WebhookAction, any>): TypedDefaultEntry<Schema>;
250
+ <NamespaceName extends keyof Schema['entities'] & string, Action extends WebhookAction | DefaultKey>(namespace: NamespaceName, action: Action, handler: WebhookHandlerFn<Schema, NamespaceName, ResolveHandlerAction<Action>, any>): TypedHandlerEntry<Schema, NamespaceName, Action>;
251
+ };
252
+ combineHandlers: (...entries: Array<TypedHandlerEntry<Schema, any, any> | TypedDefaultEntry<Schema> | WebhookHandlers<Schema>>) => WebhookHandlers<Schema>;
253
+ };
254
+ type ImportAlgorithm = AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams;
255
+ export declare class WebhooksManager<Schema extends BackendRelaySchemaDef<any, any, any>> {
256
+ #private;
257
+ constructor(opts: {
258
+ appId: string | null | undefined;
259
+ apiURI: string;
260
+ token: string | null | undefined;
261
+ withAuth?: WithAuth;
262
+ jsonFetch: JsonFetch;
263
+ });
264
+ /**
265
+ * Returns every webhook configured on the app, newest first. Includes both
266
+ * active and disabled webhooks.
267
+ */
268
+ list(): Promise<WebhookInfo[]>;
269
+ /**
270
+ * Creates a new webhook. The webhook is created in the `active` state and
271
+ * starts receiving matching events immediately.
272
+ *
273
+ * The server rejects the request if `url` is not an HTTPS URL pointing at a
274
+ * public host, if `namespaces` doesn't reference any entity in the app's
275
+ * schema, if `actions` is empty, or if the app has hit its webhook limit.
276
+ *
277
+ * An app may have at most **100 active webhooks** at a time; {@link delete}
278
+ * a webhook to free up a slot before creating another.
279
+ *
280
+ * @example
281
+ * const webhook = await db.webhooks.manager.create({
282
+ * url: 'https://example.com/instant',
283
+ * namespaces: ['posts', 'comments'],
284
+ * actions: ['create', 'update'],
285
+ * });
286
+ */
287
+ create(params: CreateWebhookParams<Schema>): Promise<WebhookInfo>;
288
+ /**
289
+ * Updates a webhook's `url`, `namespaces`, and/or `actions`. Pass only the
290
+ * fields you want to change; omitted fields keep their current value.
291
+ *
292
+ * Does not affect the webhook's status — use {@link enable} or
293
+ * {@link disable} for that.
294
+ */
295
+ update(webhookId: string, params: UpdateWebhookParams<Schema>): Promise<WebhookInfo>;
296
+ /**
297
+ * Deletes a webhook. No further events will be queued for it. Returns the
298
+ * webhook as it looked just before deletion.
299
+ */
300
+ delete(webhookId: string): Promise<WebhookInfo>;
301
+ /**
302
+ * Re-enables a disabled webhook. Clears `disabledReason` and resumes
303
+ * delivery for new events. Has no effect if the webhook is already active.
304
+ *
305
+ * Events that occurred while the webhook was disabled are not retroactively
306
+ * delivered.
307
+ */
308
+ enable(webhookId: string): Promise<WebhookInfo>;
309
+ /**
310
+ * Disables a webhook. No new events will be queued until it is re-enabled
311
+ * via {@link enable}. In-flight events already being processed will still
312
+ * complete.
313
+ *
314
+ * @param opts.reason Optional human-readable note stored on the webhook
315
+ * and surfaced in the dashboard.
316
+ */
317
+ disable(webhookId: string, opts?: {
318
+ reason?: string | null | undefined;
319
+ } | null | undefined): Promise<WebhookInfo>;
320
+ /**
321
+ * Returns a page of events for a webhook, newest first.
322
+ *
323
+ * Events are retained for ~60 days. To paginate, pass the previous page's
324
+ * `pageInfo.endCursor` as `opts.after`; stop when `pageInfo.hasNextPage`
325
+ * is `false`.
326
+ */
327
+ listEvents(webhookId: string, opts?: {
328
+ after?: string | null | undefined;
329
+ } | null | undefined): Promise<WebhookEventsPage>;
330
+ /**
331
+ * Fetches a single webhook event by its `isn`.
332
+ */
333
+ getEvent(webhookId: string, isn: string): Promise<WebhookEventInfo>;
334
+ /** Returns the full payload for an event. */
335
+ getPayload(webhookId: string, isn: string): Promise<WebhookPayload<Schema>>;
336
+ /**
337
+ * Re-queues an event for delivery, regardless of its current status. Use
338
+ * this to retry a `failed` event or force a redelivery of a `success` one.
339
+ *
340
+ * The server rate-limits resends; if the event was queued or resent very
341
+ * recently the call will fail with a validation error asking you to try
342
+ * again in about a minute.
343
+ */
344
+ resendEvent(webhookId: string, isn: string): Promise<WebhookEventInfo>;
345
+ }
346
+ /**
347
+ * Verify incoming webhook requests from BackendRelay, dispatch their records to
348
+ * typed handlers, and manage webhook subscriptions (via {@link manager}).
349
+ *
350
+ * Usually accessed as `db.webhooks` on the admin or platform SDK rather than
351
+ * constructed directly.
352
+ */
353
+ export declare class Webhooks<Schema extends BackendRelaySchemaDef<any, any, any>> {
354
+ #private;
355
+ /** App this instance is bound to. */
356
+ appId: string | null | undefined;
357
+ /** Schema used to type webhook payloads and handler records. */
358
+ schema: Schema | null | undefined;
359
+ /** Base URL for the BackendRelay API. */
360
+ apiURI: string;
361
+ /** Manage webhook subscriptions and inspect delivery events. */
362
+ manager: WebhooksManager<Schema>;
363
+ /**
364
+ * Schema-bound helpers for building typed handler maps.
365
+ *
366
+ * - `typedHandlers(namespace, action, handler)` builds a single typed entry.
367
+ * Pass `'$default'` for `namespace` to register a catch-all handler.
368
+ * - `combineHandlers(...entries)` merges entries into a
369
+ * {@link WebhookHandlers} object suitable for {@link processPayload} and
370
+ * {@link processRequest}.
371
+ *
372
+ * If you already have a {@link Webhooks} instance, prefer the instance
373
+ * form (`db.webhooks.helpers()`) — it infers `Schema` automatically.
374
+ *
375
+ * @example
376
+ * const { typedHandlers, combineHandlers } = Webhooks.helpers<typeof schema>();
377
+ * const handlers = combineHandlers(
378
+ * typedHandlers('posts', 'create', (record) => { ... }),
379
+ * typedHandlers('comments', '$default', (record) => { ... }),
380
+ * typedHandlers('$default', (record) => { ... }),
381
+ * );
382
+ */
383
+ static helpers<Schema extends BackendRelaySchemaDef<any, any, any> = BackendRelayUnknownSchema>(): WebhookHelpers<Schema>;
384
+ /**
385
+ * Instance form of {@link Webhooks.helpers} that infers `Schema` from this
386
+ * instance — no `<typeof schema>` type argument required.
387
+ *
388
+ * @example
389
+ * const { typedHandlers, combineHandlers } = db.webhooks.helpers();
390
+ */
391
+ helpers(): WebhookHelpers<Schema>;
392
+ constructor(config: Config<Schema>, jsonFetch?: JsonFetch);
393
+ /** Fetches BackendRelay's JWK set for verifying webhook signatures. */
394
+ fetchJwks(): Promise<any>;
395
+ /**
396
+ * Resolves a `kid` to an imported {@link CryptoKey}, hitting a
397
+ * process-wide cache on repeat calls. Falls back to {@link fetchJwks} if
398
+ * the key isn't already known; per issuer the fetch is cached for
399
+ * `jwksCacheTtlMs` (see {@link issuerState}).
400
+ */
401
+ keyOfKid(kid: string): Promise<{
402
+ alg: ImportAlgorithm;
403
+ key: CryptoKey;
404
+ }>;
405
+ /**
406
+ * Verifies an `BackendRelay-Signature` header against a body and returns the
407
+ * parsed {@link WebhookBody} (containing the `payloadUrl` and a JWT
408
+ * `token` for fetching the records).
409
+ *
410
+ * Throws if the signature doesn't validate, the signature is older than
411
+ * `opts.tolerance` (default 300 seconds), or the body doesn't decode to
412
+ * the expected shape.
413
+ *
414
+ * @param body Either the raw body string, or a function returning it.
415
+ * Use a function to defer reading the body until after the
416
+ * header has been parsed.
417
+ */
418
+ validate(signatureHeader: string, body: string | (() => Promise<string>), opts?: {
419
+ receivedAt?: Date | null | undefined;
420
+ tolerance?: number | null | undefined;
421
+ } | null | undefined): Promise<WebhookBody>;
422
+ /**
423
+ * Pulls the `BackendRelay-Signature` header and body from a `Request` and
424
+ * delegates to {@link validate}. Throws if the header is missing.
425
+ */
426
+ validateRequest(req: Request, opts?: {
427
+ tolerance?: number | null | undefined;
428
+ receivedAt?: Date | null | undefined;
429
+ } | null | undefined): Promise<WebhookBody>;
430
+ /**
431
+ * Fetches the records and `idempotencyKey` for a validated
432
+ * {@link WebhookBody}, authenticating with the JWT `token` it carries.
433
+ */
434
+ fetchPayloads({ payloadUrl, token, }: WebhookBody): Promise<WebhookPayload<Schema>>;
435
+ /**
436
+ * Dispatches each record in `payload` to its matching handler in
437
+ * `handlers`. Resolution order per record: exact `namespace` + `action` →
438
+ * `namespace`'s `$default` → top-level `$default`. Records with no matching
439
+ * handler are skipped.
440
+ *
441
+ * Handlers run concurrently. If any handler rejects, the call rejects so
442
+ * the caller (e.g. {@link processRequest}) can return a non-2xx response
443
+ * and let BackendRelay retry the event.
444
+ */
445
+ processPayload(handlers: WebhookHandlers<Schema>, payload: WebhookPayload<Schema>): Promise<void>;
446
+ /**
447
+ * The one-liner for handling webhooks. Hand it your handlers and the
448
+ * incoming `Request` — it verifies the signature, fetches the records, and
449
+ * dispatches each one to your code.
450
+ *
451
+ * Async handlers are executed in parallel, the return promise will resolve once
452
+ * all handlers complete and will reject if any of the handlers fails.
453
+ *
454
+ * @example
455
+ * const { typedHandlers, combineHandlers } = db.webhooks.helpers();
456
+ *
457
+ * const handlers = combineHandlers(
458
+ * typedHandlers('posts', 'create', async (record) => {
459
+ * await sendNewPostEmail(record.after);
460
+ * }),
461
+ * typedHandlers('$default', (record) => {
462
+ * console.log('webhook event', record);
463
+ * }),
464
+ * );
465
+ *
466
+ * export async function POST(req: Request) {
467
+ * await db.webhooks.processRequest(handlers, req);
468
+ * return new Response('ok');
469
+ * }
470
+ */
471
+ processRequest(handlers: WebhookHandlers<Schema>, req: Request, opts?: {
472
+ tolerance?: number | null | undefined;
473
+ receivedAt?: Date | null | undefined;
474
+ } | null | undefined): Promise<void>;
475
+ /**
476
+ * Adapter for frameworks that hand you a Node-style `http.IncomingMessage`
477
+ * (Next.js Pages Router, Express, Koa, etc.) instead of a Web `Request`.
478
+ * Wraps the request in a Web `Request` and delegates to
479
+ * {@link processRequest}. You still send the HTTP response yourself.
480
+ *
481
+ * The raw body is required for signature verification. The adapter picks
482
+ * it up from one of:
483
+ *
484
+ * - `req.body` if it's a `Buffer` or `Uint8Array` (set by middleware like
485
+ * `express.raw({ type: 'application/json' })`)
486
+ * - `req.body` if it's a string (set by middleware like `express.text()`)
487
+ * - otherwise the unconsumed request stream
488
+ *
489
+ * Don't use a JSON body parser on this route — `express.json()` and
490
+ * `bodyParser: true` in Next.js both parse the body into an object,
491
+ * destroying the raw bytes the signature was computed over.
492
+ *
493
+ * @example
494
+ * // Next.js Pages Router (`pages/api/webhooks.ts`)
495
+ * import type { NextApiRequest, NextApiResponse } from 'next';
496
+ *
497
+ * export const config = { api: { bodyParser: false } };
498
+ *
499
+ * const { typedHandlers, combineHandlers } = db.webhooks.helpers();
500
+ *
501
+ * const handlers = combineHandlers(
502
+ * typedHandlers('posts', 'create', async (record) => {
503
+ * await sendNewPostEmail(record.after);
504
+ * }),
505
+ * typedHandlers('$default', (record) => {
506
+ * console.log('unhandled record', record);
507
+ * }),
508
+ * );
509
+ *
510
+ * export default async function handler(
511
+ * req: NextApiRequest,
512
+ * res: NextApiResponse,
513
+ * ) {
514
+ * try {
515
+ * await db.webhooks.processNodeRequest(handlers, req);
516
+ * res.status(200).end();
517
+ * } catch (e) {
518
+ * res.status(400).json({ error: String(e) });
519
+ * }
520
+ * }
521
+ *
522
+ * @example
523
+ * // Express — skip the JSON body parser on the webhook route and use
524
+ * // `express.raw()` so `req.body` arrives as a Buffer.
525
+ * import express from 'express';
526
+ *
527
+ * const app = express();
528
+ *
529
+ * app.use((req, res, next) => {
530
+ * if (req.originalUrl === '/webhooks/backendrelay') return next();
531
+ * express.json()(req, res, next);
532
+ * });
533
+ *
534
+ * app.post(
535
+ * '/webhooks/backendrelay',
536
+ * express.raw({ type: 'application/json' }),
537
+ * async (req, res) => {
538
+ * try {
539
+ * await db.webhooks.processNodeRequest(handlers, req);
540
+ * res.status(200).end();
541
+ * } catch (e) {
542
+ * res.status(400).json({ error: String(e) });
543
+ * }
544
+ * },
545
+ * );
546
+ *
547
+ * @example
548
+ * // Koa — `ctx.req` is the raw IncomingMessage. If `koa-bodyparser` (or
549
+ * // similar) runs on this route it consumes the stream, so either skip it
550
+ * // here or pull the raw body yourself and shim it onto the request:
551
+ * import Koa from 'koa';
552
+ * import Router from '@koa/router';
553
+ * import rawBody from 'raw-body';
554
+ *
555
+ * const router = new Router();
556
+ *
557
+ * router.post('/webhooks/backendrelay', async (ctx) => {
558
+ * try {
559
+ * await db.webhooks.processNodeRequest(handlers, ctx.req, {
560
+ * body: rawBody(ctx.req), // adapter awaits the Promise
561
+ * });
562
+ * ctx.status = 200;
563
+ * } catch (e) {
564
+ * ctx.status = 400;
565
+ * ctx.body = { error: String(e) };
566
+ * }
567
+ * });
568
+ *
569
+ * @example
570
+ * // NestJS (Express adapter). With `rawBody: true` on the factory, Nest
571
+ * // populates `req.rawBody` itself — just pass `req`.
572
+ * import { Controller, Post, Req, HttpCode } from '@nestjs/common';
573
+ * import type { Request } from 'express';
574
+ *
575
+ * @Controller('webhooks')
576
+ * export class WebhooksController {
577
+ * @Post('instant')
578
+ * @HttpCode(200)
579
+ * async handle(@Req() req: Request) {
580
+ * await db.webhooks.processNodeRequest(handlers, req);
581
+ * }
582
+ * }
583
+ *
584
+ * // (Pair with `NestFactory.create(AppModule, { rawBody: true })` in main.ts.)
585
+ */
586
+ processNodeRequest(handlers: WebhookHandlers<Schema>, req: {
587
+ url?: string;
588
+ method?: string;
589
+ headers: Record<string, string | string[] | undefined>;
590
+ body?: unknown;
591
+ rawBody?: unknown;
592
+ [Symbol.asyncIterator]?: () => AsyncIterableIterator<Uint8Array | string>;
593
+ }, opts?: {
594
+ /**
595
+ * Raw body to use instead of reading from `req`. Useful for
596
+ * frameworks that hand you the body separately from the request
597
+ * object (e.g. NestJS `@RawBody()`, Koa with `raw-body`).
598
+ * Accepts a `Buffer` / `Uint8Array`, a string, or a Promise of
599
+ * either.
600
+ */
601
+ body?: unknown;
602
+ tolerance?: number | null | undefined;
603
+ receivedAt?: Date | null | undefined;
604
+ } | null | undefined): Promise<void>;
605
+ }
606
+ export {};
607
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EACrB,yBAAyB,EACzB,YAAY,EAGb,MAAM,oBAAoB,CAAC;AAE5B,KAAK,MAAM,CAAC,MAAM,SAAS,qBAAqB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,KAAK,SAAS,GAAG,CACf,KAAK,EAAE,WAAW,EAClB,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,KAC3B,OAAO,CA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