@rocicorp/zero 0.5.2024110200 → 0.6.2024111700

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 (333) hide show
  1. package/out/{internal.js → advanced.js} +2 -2
  2. package/out/{chunk-YCMA66NH.js → chunk-5UY46OAF.js} +5 -2
  3. package/out/{chunk-YCMA66NH.js.map → chunk-5UY46OAF.js.map} +2 -2
  4. package/out/{chunk-INJ4WJHS.js → chunk-PIFWXXO2.js} +1209 -586
  5. package/out/chunk-PIFWXXO2.js.map +7 -0
  6. package/out/react.js.map +2 -2
  7. package/out/shared/src/browser-env.d.ts +17 -0
  8. package/out/shared/src/browser-env.d.ts.map +1 -1
  9. package/out/shared/src/expand.d.ts +7 -0
  10. package/out/shared/src/expand.d.ts.map +1 -0
  11. package/out/solid.js +5 -5
  12. package/out/solid.js.map +2 -2
  13. package/out/zero-cache/src/auth/load-authorization.d.ts +3 -0
  14. package/out/zero-cache/src/auth/load-authorization.d.ts.map +1 -0
  15. package/out/zero-cache/src/auth/load-authorization.js +21 -0
  16. package/out/zero-cache/src/auth/load-authorization.js.map +1 -0
  17. package/out/zero-cache/src/config/config.d.ts +112 -0
  18. package/out/zero-cache/src/config/config.d.ts.map +1 -0
  19. package/out/zero-cache/src/config/config.js +246 -0
  20. package/out/zero-cache/src/config/config.js.map +1 -0
  21. package/out/zero-cache/src/config/zero-config.d.ts +145 -964
  22. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  23. package/out/zero-cache/src/config/zero-config.js +242 -115
  24. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  25. package/out/zero-cache/src/db/delete-lite-db.d.ts +2 -0
  26. package/out/zero-cache/src/db/delete-lite-db.d.ts.map +1 -0
  27. package/out/zero-cache/src/db/delete-lite-db.js +7 -0
  28. package/out/zero-cache/src/db/delete-lite-db.js.map +1 -0
  29. package/out/zero-cache/src/db/migration.d.ts +1 -0
  30. package/out/zero-cache/src/db/migration.d.ts.map +1 -1
  31. package/out/zero-cache/src/db/migration.js +17 -7
  32. package/out/zero-cache/src/db/migration.js.map +1 -1
  33. package/out/zero-cache/src/db/pg-to-lite.d.ts +1 -1
  34. package/out/zero-cache/src/db/pg-to-lite.d.ts.map +1 -1
  35. package/out/zero-cache/src/db/pg-to-lite.js +7 -3
  36. package/out/zero-cache/src/db/pg-to-lite.js.map +1 -1
  37. package/out/zero-cache/src/db/short-lived-client.d.ts +16 -0
  38. package/out/zero-cache/src/db/short-lived-client.d.ts.map +1 -0
  39. package/out/zero-cache/src/db/short-lived-client.js +50 -0
  40. package/out/zero-cache/src/db/short-lived-client.js.map +1 -0
  41. package/out/zero-cache/src/db/specs.d.ts +12 -3
  42. package/out/zero-cache/src/db/specs.d.ts.map +1 -1
  43. package/out/zero-cache/src/db/specs.js +6 -1
  44. package/out/zero-cache/src/db/specs.js.map +1 -1
  45. package/out/zero-cache/src/db/transaction-pool.d.ts +8 -2
  46. package/out/zero-cache/src/db/transaction-pool.d.ts.map +1 -1
  47. package/out/zero-cache/src/db/transaction-pool.js +43 -9
  48. package/out/zero-cache/src/db/transaction-pool.js.map +1 -1
  49. package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
  50. package/out/zero-cache/src/server/change-streamer.js +34 -9
  51. package/out/zero-cache/src/server/change-streamer.js.map +1 -1
  52. package/out/zero-cache/src/server/life-cycle.d.ts +1 -1
  53. package/out/zero-cache/src/server/life-cycle.d.ts.map +1 -1
  54. package/out/zero-cache/src/server/life-cycle.js +2 -3
  55. package/out/zero-cache/src/server/life-cycle.js.map +1 -1
  56. package/out/zero-cache/src/server/logging.d.ts.map +1 -1
  57. package/out/zero-cache/src/server/logging.js +2 -15
  58. package/out/zero-cache/src/server/logging.js.map +1 -1
  59. package/out/zero-cache/src/server/main.js +28 -10
  60. package/out/zero-cache/src/server/main.js.map +1 -1
  61. package/out/zero-cache/src/server/replicator.d.ts.map +1 -1
  62. package/out/zero-cache/src/server/replicator.js +6 -5
  63. package/out/zero-cache/src/server/replicator.js.map +1 -1
  64. package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
  65. package/out/zero-cache/src/server/syncer.js +16 -12
  66. package/out/zero-cache/src/server/syncer.js.map +1 -1
  67. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +2 -3
  68. package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
  69. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +2 -3
  70. package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
  71. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +153 -2
  72. package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts.map +1 -1
  73. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +136 -19
  74. package/out/zero-cache/src/services/change-streamer/change-streamer-service.js.map +1 -1
  75. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts +17 -9
  76. package/out/zero-cache/src/services/change-streamer/change-streamer.d.ts.map +1 -1
  77. package/out/zero-cache/src/services/change-streamer/change-streamer.js +4 -2
  78. package/out/zero-cache/src/services/change-streamer/change-streamer.js.map +1 -1
  79. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts +1 -0
  80. package/out/zero-cache/src/services/change-streamer/forwarder.d.ts.map +1 -1
  81. package/out/zero-cache/src/services/change-streamer/forwarder.js +9 -2
  82. package/out/zero-cache/src/services/change-streamer/forwarder.js.map +1 -1
  83. package/out/zero-cache/src/services/change-streamer/pg/change-source.d.ts +10 -0
  84. package/out/zero-cache/src/services/change-streamer/pg/change-source.d.ts.map +1 -1
  85. package/out/zero-cache/src/services/change-streamer/pg/change-source.js +171 -24
  86. package/out/zero-cache/src/services/change-streamer/pg/change-source.js.map +1 -1
  87. package/out/zero-cache/src/services/change-streamer/pg/initial-sync.d.ts.map +1 -1
  88. package/out/zero-cache/src/services/change-streamer/pg/initial-sync.js +33 -19
  89. package/out/zero-cache/src/services/change-streamer/pg/initial-sync.js.map +1 -1
  90. package/out/zero-cache/src/services/change-streamer/pg/schema/ddl.d.ts +62 -39
  91. package/out/zero-cache/src/services/change-streamer/pg/schema/ddl.d.ts.map +1 -1
  92. package/out/zero-cache/src/services/change-streamer/pg/schema/ddl.js +8 -40
  93. package/out/zero-cache/src/services/change-streamer/pg/schema/ddl.js.map +1 -1
  94. package/out/zero-cache/src/services/change-streamer/pg/schema/init.d.ts +8 -0
  95. package/out/zero-cache/src/services/change-streamer/pg/schema/init.d.ts.map +1 -1
  96. package/out/zero-cache/src/services/change-streamer/pg/schema/init.js +41 -8
  97. package/out/zero-cache/src/services/change-streamer/pg/schema/init.js.map +1 -1
  98. package/out/zero-cache/src/services/change-streamer/pg/schema/published.d.ts +83 -13
  99. package/out/zero-cache/src/services/change-streamer/pg/schema/published.d.ts.map +1 -1
  100. package/out/zero-cache/src/services/change-streamer/pg/schema/published.js +15 -5
  101. package/out/zero-cache/src/services/change-streamer/pg/schema/published.js.map +1 -1
  102. package/out/zero-cache/src/services/change-streamer/pg/schema/shard.d.ts +39 -3
  103. package/out/zero-cache/src/services/change-streamer/pg/schema/shard.d.ts.map +1 -1
  104. package/out/zero-cache/src/services/change-streamer/pg/schema/shard.js +67 -36
  105. package/out/zero-cache/src/services/change-streamer/pg/schema/shard.js.map +1 -1
  106. package/out/zero-cache/src/services/change-streamer/pg/schema/validation.d.ts +8 -0
  107. package/out/zero-cache/src/services/change-streamer/pg/schema/validation.d.ts.map +1 -0
  108. package/out/zero-cache/src/services/change-streamer/pg/schema/validation.js +33 -0
  109. package/out/zero-cache/src/services/change-streamer/pg/schema/validation.js.map +1 -0
  110. package/out/zero-cache/src/services/change-streamer/schema/change.d.ts +5 -1
  111. package/out/zero-cache/src/services/change-streamer/schema/change.d.ts.map +1 -1
  112. package/out/zero-cache/src/services/change-streamer/schema/change.js +3 -0
  113. package/out/zero-cache/src/services/change-streamer/schema/change.js.map +1 -1
  114. package/out/zero-cache/src/services/change-streamer/schema/init.d.ts.map +1 -1
  115. package/out/zero-cache/src/services/change-streamer/schema/init.js +4 -6
  116. package/out/zero-cache/src/services/change-streamer/schema/init.js.map +1 -1
  117. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +6 -1
  118. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts.map +1 -1
  119. package/out/zero-cache/src/services/change-streamer/schema/tables.js +19 -4
  120. package/out/zero-cache/src/services/change-streamer/schema/tables.js.map +1 -1
  121. package/out/zero-cache/src/services/change-streamer/storer.d.ts +29 -2
  122. package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
  123. package/out/zero-cache/src/services/change-streamer/storer.js +90 -8
  124. package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
  125. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts +1 -0
  126. package/out/zero-cache/src/services/change-streamer/subscriber.d.ts.map +1 -1
  127. package/out/zero-cache/src/services/change-streamer/subscriber.js +18 -3
  128. package/out/zero-cache/src/services/change-streamer/subscriber.js.map +1 -1
  129. package/out/zero-cache/src/services/dispatcher/dispatcher.d.ts +5 -3
  130. package/out/zero-cache/src/services/dispatcher/dispatcher.d.ts.map +1 -1
  131. package/out/zero-cache/src/services/dispatcher/dispatcher.js +20 -5
  132. package/out/zero-cache/src/services/dispatcher/dispatcher.js.map +1 -1
  133. package/out/zero-cache/src/services/mutagen/mutagen.d.ts +6 -5
  134. package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
  135. package/out/zero-cache/src/services/mutagen/mutagen.js +26 -20
  136. package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
  137. package/out/zero-cache/src/services/mutagen/write-authorizer.d.ts +7 -6
  138. package/out/zero-cache/src/services/mutagen/write-authorizer.d.ts.map +1 -1
  139. package/out/zero-cache/src/services/mutagen/write-authorizer.js +10 -18
  140. package/out/zero-cache/src/services/mutagen/write-authorizer.js.map +1 -1
  141. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts +1 -1
  142. package/out/zero-cache/src/services/replicator/incremental-sync.d.ts.map +1 -1
  143. package/out/zero-cache/src/services/replicator/incremental-sync.js +8 -8
  144. package/out/zero-cache/src/services/replicator/incremental-sync.js.map +1 -1
  145. package/out/zero-cache/src/services/replicator/schema/replication-state.d.ts.map +1 -1
  146. package/out/zero-cache/src/services/replicator/schema/replication-state.js +1 -10
  147. package/out/zero-cache/src/services/replicator/schema/replication-state.js.map +1 -1
  148. package/out/zero-cache/src/services/running-state.d.ts +6 -1
  149. package/out/zero-cache/src/services/running-state.d.ts.map +1 -1
  150. package/out/zero-cache/src/services/running-state.js +23 -5
  151. package/out/zero-cache/src/services/running-state.js.map +1 -1
  152. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts +49 -29
  153. package/out/zero-cache/src/services/view-syncer/schema/types.d.ts.map +1 -1
  154. package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
  155. package/out/zero-cache/src/services/view-syncer/view-syncer.js +2 -1
  156. package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
  157. package/out/zero-cache/src/types/lexi-version.d.ts +3 -2
  158. package/out/zero-cache/src/types/lexi-version.d.ts.map +1 -1
  159. package/out/zero-cache/src/types/lexi-version.js +8 -6
  160. package/out/zero-cache/src/types/lexi-version.js.map +1 -1
  161. package/out/zero-cache/src/types/processes.d.ts.map +1 -1
  162. package/out/zero-cache/src/types/processes.js +1 -0
  163. package/out/zero-cache/src/types/processes.js.map +1 -1
  164. package/out/zero-cache/src/workers/replicator.d.ts.map +1 -1
  165. package/out/zero-cache/src/workers/replicator.js +2 -4
  166. package/out/zero-cache/src/workers/replicator.js.map +1 -1
  167. package/out/zero-cache/src/workers/syncer.js +1 -1
  168. package/out/zero-cache/src/workers/syncer.js.map +1 -1
  169. package/out/zero-client/src/client/crud.d.ts +56 -25
  170. package/out/zero-client/src/client/crud.d.ts.map +1 -1
  171. package/out/zero-client/src/client/http-string.d.ts +1 -0
  172. package/out/zero-client/src/client/http-string.d.ts.map +1 -1
  173. package/out/zero-client/src/client/log-options.d.ts +2 -1
  174. package/out/zero-client/src/client/log-options.d.ts.map +1 -1
  175. package/out/zero-client/src/client/options.d.ts +8 -8
  176. package/out/zero-client/src/client/options.d.ts.map +1 -1
  177. package/out/zero-client/src/client/protocol-version.d.ts +2 -0
  178. package/out/zero-client/src/client/protocol-version.d.ts.map +1 -0
  179. package/out/zero-client/src/client/server-option.d.ts.map +1 -1
  180. package/out/zero-client/src/client/zero-poke-handler.d.ts +1 -1
  181. package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
  182. package/out/zero-client/src/client/zero.d.ts +26 -14
  183. package/out/zero-client/src/client/zero.d.ts.map +1 -1
  184. package/out/zero-client/src/mod.d.ts +4 -2
  185. package/out/zero-client/src/mod.d.ts.map +1 -1
  186. package/out/zero-protocol/src/ast.d.ts +37 -21
  187. package/out/zero-protocol/src/ast.d.ts.map +1 -1
  188. package/out/zero-protocol/src/ast.js +21 -6
  189. package/out/zero-protocol/src/ast.js.map +1 -1
  190. package/out/zero-protocol/src/change-desired-queries.d.ts +16 -8
  191. package/out/zero-protocol/src/change-desired-queries.d.ts.map +1 -1
  192. package/out/zero-protocol/src/connect.d.ts +16 -8
  193. package/out/zero-protocol/src/connect.d.ts.map +1 -1
  194. package/out/zero-protocol/src/down.d.ts +16 -8
  195. package/out/zero-protocol/src/down.d.ts.map +1 -1
  196. package/out/zero-protocol/src/poke.d.ts +32 -16
  197. package/out/zero-protocol/src/poke.d.ts.map +1 -1
  198. package/out/zero-protocol/src/push.d.ts +18 -18
  199. package/out/zero-protocol/src/push.d.ts.map +1 -1
  200. package/out/zero-protocol/src/push.js +5 -5
  201. package/out/zero-protocol/src/push.js.map +1 -1
  202. package/out/zero-protocol/src/queries-patch.d.ts +24 -12
  203. package/out/zero-protocol/src/queries-patch.d.ts.map +1 -1
  204. package/out/zero-protocol/src/up.d.ts +18 -10
  205. package/out/zero-protocol/src/up.d.ts.map +1 -1
  206. package/out/zero-react/src/use-zero.d.ts.map +1 -1
  207. package/out/zero-schema/src/authorization.d.ts +25 -0
  208. package/out/zero-schema/src/authorization.d.ts.map +1 -0
  209. package/out/zero-schema/src/compiled-authorization.d.ts +379 -0
  210. package/out/zero-schema/src/compiled-authorization.d.ts.map +1 -0
  211. package/out/zero-schema/src/compiled-authorization.js +15 -0
  212. package/out/zero-schema/src/compiled-authorization.js.map +1 -0
  213. package/out/zero-schema/src/mod.d.ts +1 -0
  214. package/out/zero-schema/src/mod.d.ts.map +1 -1
  215. package/out/{zero-client/src/client → zero-schema/src}/normalized-schema.d.ts +2 -2
  216. package/out/zero-schema/src/normalized-schema.d.ts.map +1 -0
  217. package/out/zero-schema/src/table-schema.d.ts +15 -7
  218. package/out/zero-schema/src/table-schema.d.ts.map +1 -1
  219. package/out/zero-schema/src/table-schema.js.map +1 -1
  220. package/out/zero.js +10 -14
  221. package/out/zql/src/builder/builder.d.ts +1 -1
  222. package/out/zql/src/builder/builder.d.ts.map +1 -1
  223. package/out/zql/src/builder/builder.js +136 -30
  224. package/out/zql/src/builder/builder.js.map +1 -1
  225. package/out/zql/src/builder/filter.d.ts +2 -1
  226. package/out/zql/src/builder/filter.d.ts.map +1 -1
  227. package/out/zql/src/builder/filter.js +18 -0
  228. package/out/zql/src/builder/filter.js.map +1 -1
  229. package/out/zql/src/builder/like.d.ts +2 -2
  230. package/out/zql/src/builder/like.d.ts.map +1 -1
  231. package/out/zql/src/ivm/change.d.ts +1 -0
  232. package/out/zql/src/ivm/change.d.ts.map +1 -1
  233. package/out/zql/src/ivm/change.js +4 -1
  234. package/out/zql/src/ivm/change.js.map +1 -1
  235. package/out/zql/src/ivm/exists.d.ts +18 -0
  236. package/out/zql/src/ivm/exists.d.ts.map +1 -0
  237. package/out/zql/src/ivm/exists.js +186 -0
  238. package/out/zql/src/ivm/exists.js.map +1 -0
  239. package/out/zql/src/ivm/fan-in.d.ts +1 -1
  240. package/out/zql/src/ivm/fan-in.d.ts.map +1 -1
  241. package/out/zql/src/ivm/fan-in.js +3 -3
  242. package/out/zql/src/ivm/fan-in.js.map +1 -1
  243. package/out/zql/src/ivm/fan-out.d.ts.map +1 -1
  244. package/out/zql/src/ivm/fan-out.js +4 -7
  245. package/out/zql/src/ivm/fan-out.js.map +1 -1
  246. package/out/zql/src/ivm/filter.js +1 -1
  247. package/out/zql/src/ivm/filter.js.map +1 -1
  248. package/out/zql/src/ivm/memory-source.d.ts +10 -6
  249. package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
  250. package/out/zql/src/ivm/memory-source.js +60 -75
  251. package/out/zql/src/ivm/memory-source.js.map +1 -1
  252. package/out/zql/src/ivm/skip.js +1 -1
  253. package/out/zql/src/ivm/skip.js.map +1 -1
  254. package/out/zql/src/ivm/take.d.ts +1 -1
  255. package/out/zql/src/ivm/take.d.ts.map +1 -1
  256. package/out/zql/src/ivm/take.js +11 -7
  257. package/out/zql/src/ivm/take.js.map +1 -1
  258. package/out/zql/src/ivm/view-apply-change.d.ts.map +1 -1
  259. package/out/zql/src/query/auth-query.d.ts +7 -3
  260. package/out/zql/src/query/auth-query.d.ts.map +1 -1
  261. package/out/zql/src/query/dnf.d.ts +10 -0
  262. package/out/zql/src/query/dnf.d.ts.map +1 -0
  263. package/out/zql/src/query/expression.d.ts +40 -23
  264. package/out/zql/src/query/expression.d.ts.map +1 -1
  265. package/out/zql/src/query/query-impl.d.ts +7 -6
  266. package/out/zql/src/query/query-impl.d.ts.map +1 -1
  267. package/out/zql/src/query/query.d.ts +17 -46
  268. package/out/zql/src/query/query.d.ts.map +1 -1
  269. package/out/zqlite/src/db.d.ts.map +1 -1
  270. package/out/zqlite/src/db.js +19 -6
  271. package/out/zqlite/src/db.js.map +1 -1
  272. package/out/zqlite/src/table-source.d.ts +12 -3
  273. package/out/zqlite/src/table-source.d.ts.map +1 -1
  274. package/out/zqlite/src/table-source.js +81 -2
  275. package/out/zqlite/src/table-source.js.map +1 -1
  276. package/package.json +7 -11
  277. package/out/chunk-INJ4WJHS.js.map +0 -7
  278. package/out/datadog/src/datadog-log-sink.js +0 -231
  279. package/out/datadog/src/datadog-log-sink.js.map +0 -1
  280. package/out/datadog/src/mod.js +0 -2
  281. package/out/datadog/src/mod.js.map +0 -1
  282. package/out/shared/src/immutable.js +0 -2
  283. package/out/shared/src/immutable.js.map +0 -1
  284. package/out/shared/src/sorted-entries.js +0 -6
  285. package/out/shared/src/sorted-entries.js.map +0 -1
  286. package/out/shared/src/writable.js +0 -2
  287. package/out/shared/src/writable.js.map +0 -1
  288. package/out/zero/src/config.d.ts +0 -2
  289. package/out/zero/src/config.d.ts.map +0 -1
  290. package/out/zero/src/config.js +0 -2
  291. package/out/zero/src/config.js.map +0 -1
  292. package/out/zero-cache/src/config/config-query.d.ts +0 -19
  293. package/out/zero-cache/src/config/config-query.d.ts.map +0 -1
  294. package/out/zero-cache/src/config/config-query.js +0 -22
  295. package/out/zero-cache/src/config/config-query.js.map +0 -1
  296. package/out/zero-cache/src/config/define-config.d.ts +0 -43
  297. package/out/zero-cache/src/config/define-config.d.ts.map +0 -1
  298. package/out/zero-cache/src/config/define-config.js +0 -121
  299. package/out/zero-cache/src/config/define-config.js.map +0 -1
  300. package/out/zero-cache/src/config/refs.d.ts +0 -3
  301. package/out/zero-cache/src/config/refs.d.ts.map +0 -1
  302. package/out/zero-cache/src/config/refs.js +0 -14
  303. package/out/zero-cache/src/config/refs.js.map +0 -1
  304. package/out/zero-client/src/client/normalized-schema.d.ts.map +0 -1
  305. package/out/zero-client/src/client/normalized-schema.js +0 -31
  306. package/out/zero-client/src/client/normalized-schema.js.map +0 -1
  307. package/out/zero-protocol/src/ast-hash.js +0 -14
  308. package/out/zero-protocol/src/ast-hash.js.map +0 -1
  309. package/out/zero-schema/src/mod.js +0 -4
  310. package/out/zero-schema/src/mod.js.map +0 -1
  311. package/out/zero-schema/src/normalize-table-schema.js +0 -116
  312. package/out/zero-schema/src/normalize-table-schema.js.map +0 -1
  313. package/out/zero-schema/src/schema.js +0 -4
  314. package/out/zero-schema/src/schema.js.map +0 -1
  315. package/out/zql/src/ivm/array-view.js +0 -70
  316. package/out/zql/src/ivm/array-view.js.map +0 -1
  317. package/out/zql/src/ivm/view-apply-change.js +0 -156
  318. package/out/zql/src/ivm/view-apply-change.js.map +0 -1
  319. package/out/zql/src/ivm/view.js +0 -2
  320. package/out/zql/src/ivm/view.js.map +0 -1
  321. package/out/zql/src/query/auth-query.js +0 -26
  322. package/out/zql/src/query/auth-query.js.map +0 -1
  323. package/out/zql/src/query/expression.js +0 -121
  324. package/out/zql/src/query/expression.js.map +0 -1
  325. package/out/zql/src/query/query-impl.js +0 -291
  326. package/out/zql/src/query/query-impl.js.map +0 -1
  327. package/out/zql/src/query/query-internal.js +0 -2
  328. package/out/zql/src/query/query-internal.js.map +0 -1
  329. package/out/zql/src/query/query.js +0 -3
  330. package/out/zql/src/query/query.js.map +0 -1
  331. package/out/zql/src/query/typed-view.js +0 -2
  332. package/out/zql/src/query/typed-view.js.map +0 -1
  333. /package/out/{internal.js.map → advanced.js.map} +0 -0
@@ -2,973 +2,154 @@
2
2
  * These types represent the _compiled_ config whereas `define-config` types represent the _source_ config.
3
3
  */
4
4
  import * as v from '../../../shared/src/valita.js';
5
- export type Action = 'select' | 'insert' | 'update' | 'delete';
6
- declare const ruleSchema: v.TupleType<[v.Type<"allow">, v.ObjectType<{
7
- schema: v.Optional<string>;
8
- table: v.Type<string>;
9
- alias: v.Optional<string>;
10
- where: v.Optional<{
11
- type: "simple";
12
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
13
- field: string;
14
- value: string | number | boolean | readonly (string | number | boolean)[] | {
15
- type: "static";
16
- anchor: "authData" | "preMutationRow";
17
- field: string;
5
+ import { type Config } from './config.js';
6
+ /**
7
+ * Configures the view of the upstream database replicated to this zero-cache.
8
+ */
9
+ declare const shardOptions: {
10
+ id: {
11
+ type: v.Type<string>;
12
+ desc: string[];
13
+ allCaps: boolean;
14
+ };
15
+ publications: {
16
+ type: v.Type<string[]>;
17
+ desc: string[];
18
+ };
19
+ };
20
+ export type ShardConfig = Config<typeof shardOptions>;
21
+ declare const logOptions: {
22
+ level: v.Type<"error" | "debug" | "info" | "warn">;
23
+ format: {
24
+ type: v.Type<"text" | "json">;
25
+ desc: string[];
26
+ };
27
+ };
28
+ export type LogConfig = Config<typeof logOptions>;
29
+ declare const perUserMutationLimit: {
30
+ max: {
31
+ type: v.Optional<number>;
32
+ desc: string[];
33
+ };
34
+ windowMs: {
35
+ type: v.Type<number>;
36
+ desc: string[];
37
+ };
38
+ };
39
+ export type RateLimit = Config<typeof perUserMutationLimit>;
40
+ export declare const zeroOptions: {
41
+ upstream: {
42
+ db: {
43
+ type: v.Type<string>;
44
+ desc: string[];
45
+ };
46
+ maxConns: {
47
+ type: v.Type<number>;
48
+ desc: string[];
49
+ };
50
+ maxConnsPerWorker: {
51
+ type: v.Optional<number>;
52
+ hidden: boolean;
53
+ };
54
+ };
55
+ cvr: {
56
+ db: {
57
+ type: v.Type<string>;
58
+ desc: string[];
59
+ };
60
+ maxConns: {
61
+ type: v.Type<number>;
62
+ desc: string[];
63
+ };
64
+ maxConnsPerWorker: {
65
+ type: v.Optional<number>;
66
+ hidden: boolean;
67
+ };
68
+ };
69
+ change: {
70
+ db: {
71
+ type: v.Type<string>;
72
+ desc: string[];
73
+ };
74
+ maxConns: {
75
+ type: v.Type<number>;
76
+ desc: string[];
77
+ };
78
+ };
79
+ replicaFile: {
80
+ type: v.Type<string>;
81
+ desc: string[];
82
+ };
83
+ log: {
84
+ level: v.Type<"error" | "debug" | "info" | "warn">;
85
+ format: {
86
+ type: v.Type<"text" | "json">;
87
+ desc: string[];
88
+ };
89
+ };
90
+ shard: {
91
+ id: {
92
+ type: v.Type<string>;
93
+ desc: string[];
94
+ allCaps: boolean;
18
95
  };
19
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction>;
20
- related: v.Optional<readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[]>;
21
- limit: v.Optional<number>;
22
- orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
23
- start: v.Optional<{
24
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
25
- exclusive: boolean;
26
- }>;
27
- }, undefined>]>;
28
- export type Rule = v.Infer<typeof ruleSchema>;
29
- declare const policySchema: v.ArrayType<v.TupleType<[v.Type<"allow">, v.ObjectType<{
30
- schema: v.Optional<string>;
31
- table: v.Type<string>;
32
- alias: v.Optional<string>;
33
- where: v.Optional<{
34
- type: "simple";
35
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
36
- field: string;
37
- value: string | number | boolean | readonly (string | number | boolean)[] | {
38
- type: "static";
39
- anchor: "authData" | "preMutationRow";
40
- field: string;
96
+ publications: {
97
+ type: v.Type<string[]>;
98
+ desc: string[];
41
99
  };
42
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction>;
43
- related: v.Optional<readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[]>;
44
- limit: v.Optional<number>;
45
- orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
46
- start: v.Optional<{
47
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
48
- exclusive: boolean;
49
- }>;
50
- }, undefined>]>>;
51
- export type Policy = v.Infer<typeof policySchema>;
52
- declare const assetSchema: v.ObjectType<{
53
- select: v.Optional<["allow", {
54
- schema?: string | undefined;
55
- alias?: string | undefined;
56
- where?: {
57
- type: "simple";
58
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
59
- field: string;
60
- value: string | number | boolean | readonly (string | number | boolean)[] | {
61
- type: "static";
62
- anchor: "authData" | "preMutationRow";
63
- field: string;
64
- };
65
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
66
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
67
- limit?: number | undefined;
68
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
69
- start?: {
70
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
71
- exclusive: boolean;
72
- } | undefined;
73
- table: string;
74
- }][]>;
75
- insert: v.Optional<["allow", {
76
- schema?: string | undefined;
77
- alias?: string | undefined;
78
- where?: {
79
- type: "simple";
80
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
81
- field: string;
82
- value: string | number | boolean | readonly (string | number | boolean)[] | {
83
- type: "static";
84
- anchor: "authData" | "preMutationRow";
85
- field: string;
86
- };
87
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
88
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
89
- limit?: number | undefined;
90
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
91
- start?: {
92
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
93
- exclusive: boolean;
94
- } | undefined;
95
- table: string;
96
- }][]>;
97
- update: v.Optional<["allow", {
98
- schema?: string | undefined;
99
- alias?: string | undefined;
100
- where?: {
101
- type: "simple";
102
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
103
- field: string;
104
- value: string | number | boolean | readonly (string | number | boolean)[] | {
105
- type: "static";
106
- anchor: "authData" | "preMutationRow";
107
- field: string;
108
- };
109
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
110
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
111
- limit?: number | undefined;
112
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
113
- start?: {
114
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
115
- exclusive: boolean;
116
- } | undefined;
117
- table: string;
118
- }][]>;
119
- delete: v.Optional<["allow", {
120
- schema?: string | undefined;
121
- alias?: string | undefined;
122
- where?: {
123
- type: "simple";
124
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
125
- field: string;
126
- value: string | number | boolean | readonly (string | number | boolean)[] | {
127
- type: "static";
128
- anchor: "authData" | "preMutationRow";
129
- field: string;
130
- };
131
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
132
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
133
- limit?: number | undefined;
134
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
135
- start?: {
136
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
137
- exclusive: boolean;
138
- } | undefined;
139
- table: string;
140
- }][]>;
141
- }, undefined>;
142
- export type AssetAuthorization = v.Infer<typeof assetSchema>;
143
- declare const authorizationConfigSchema: v.Type<Record<string, {
144
- table?: {
145
- select?: ["allow", {
146
- schema?: string | undefined;
147
- alias?: string | undefined;
148
- where?: {
149
- type: "simple";
150
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
151
- field: string;
152
- value: string | number | boolean | readonly (string | number | boolean)[] | {
153
- type: "static";
154
- anchor: "authData" | "preMutationRow";
155
- field: string;
156
- };
157
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
158
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
159
- limit?: number | undefined;
160
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
161
- start?: {
162
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
163
- exclusive: boolean;
164
- } | undefined;
165
- table: string;
166
- }][] | undefined;
167
- insert?: ["allow", {
168
- schema?: string | undefined;
169
- alias?: string | undefined;
170
- where?: {
171
- type: "simple";
172
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
173
- field: string;
174
- value: string | number | boolean | readonly (string | number | boolean)[] | {
175
- type: "static";
176
- anchor: "authData" | "preMutationRow";
177
- field: string;
178
- };
179
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
180
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
181
- limit?: number | undefined;
182
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
183
- start?: {
184
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
185
- exclusive: boolean;
186
- } | undefined;
187
- table: string;
188
- }][] | undefined;
189
- update?: ["allow", {
190
- schema?: string | undefined;
191
- alias?: string | undefined;
192
- where?: {
193
- type: "simple";
194
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
195
- field: string;
196
- value: string | number | boolean | readonly (string | number | boolean)[] | {
197
- type: "static";
198
- anchor: "authData" | "preMutationRow";
199
- field: string;
200
- };
201
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
202
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
203
- limit?: number | undefined;
204
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
205
- start?: {
206
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
207
- exclusive: boolean;
208
- } | undefined;
209
- table: string;
210
- }][] | undefined;
211
- delete?: ["allow", {
212
- schema?: string | undefined;
213
- alias?: string | undefined;
214
- where?: {
215
- type: "simple";
216
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
217
- field: string;
218
- value: string | number | boolean | readonly (string | number | boolean)[] | {
219
- type: "static";
220
- anchor: "authData" | "preMutationRow";
221
- field: string;
222
- };
223
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
224
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
225
- limit?: number | undefined;
226
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
227
- start?: {
228
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
229
- exclusive: boolean;
230
- } | undefined;
231
- table: string;
232
- }][] | undefined;
233
- } | undefined;
234
- column?: Record<string, {
235
- select?: ["allow", {
236
- schema?: string | undefined;
237
- alias?: string | undefined;
238
- where?: {
239
- type: "simple";
240
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
241
- field: string;
242
- value: string | number | boolean | readonly (string | number | boolean)[] | {
243
- type: "static";
244
- anchor: "authData" | "preMutationRow";
245
- field: string;
246
- };
247
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
248
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
249
- limit?: number | undefined;
250
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
251
- start?: {
252
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
253
- exclusive: boolean;
254
- } | undefined;
255
- table: string;
256
- }][] | undefined;
257
- insert?: ["allow", {
258
- schema?: string | undefined;
259
- alias?: string | undefined;
260
- where?: {
261
- type: "simple";
262
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
263
- field: string;
264
- value: string | number | boolean | readonly (string | number | boolean)[] | {
265
- type: "static";
266
- anchor: "authData" | "preMutationRow";
267
- field: string;
268
- };
269
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
270
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
271
- limit?: number | undefined;
272
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
273
- start?: {
274
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
275
- exclusive: boolean;
276
- } | undefined;
277
- table: string;
278
- }][] | undefined;
279
- update?: ["allow", {
280
- schema?: string | undefined;
281
- alias?: string | undefined;
282
- where?: {
283
- type: "simple";
284
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
285
- field: string;
286
- value: string | number | boolean | readonly (string | number | boolean)[] | {
287
- type: "static";
288
- anchor: "authData" | "preMutationRow";
289
- field: string;
290
- };
291
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
292
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
293
- limit?: number | undefined;
294
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
295
- start?: {
296
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
297
- exclusive: boolean;
298
- } | undefined;
299
- table: string;
300
- }][] | undefined;
301
- delete?: ["allow", {
302
- schema?: string | undefined;
303
- alias?: string | undefined;
304
- where?: {
305
- type: "simple";
306
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
307
- field: string;
308
- value: string | number | boolean | readonly (string | number | boolean)[] | {
309
- type: "static";
310
- anchor: "authData" | "preMutationRow";
311
- field: string;
312
- };
313
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
314
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
315
- limit?: number | undefined;
316
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
317
- start?: {
318
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
319
- exclusive: boolean;
320
- } | undefined;
321
- table: string;
322
- }][] | undefined;
323
- }> | undefined;
324
- row?: {
325
- select?: ["allow", {
326
- schema?: string | undefined;
327
- alias?: string | undefined;
328
- where?: {
329
- type: "simple";
330
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
331
- field: string;
332
- value: string | number | boolean | readonly (string | number | boolean)[] | {
333
- type: "static";
334
- anchor: "authData" | "preMutationRow";
335
- field: string;
336
- };
337
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
338
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
339
- limit?: number | undefined;
340
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
341
- start?: {
342
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
343
- exclusive: boolean;
344
- } | undefined;
345
- table: string;
346
- }][] | undefined;
347
- insert?: ["allow", {
348
- schema?: string | undefined;
349
- alias?: string | undefined;
350
- where?: {
351
- type: "simple";
352
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
353
- field: string;
354
- value: string | number | boolean | readonly (string | number | boolean)[] | {
355
- type: "static";
356
- anchor: "authData" | "preMutationRow";
357
- field: string;
358
- };
359
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
360
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
361
- limit?: number | undefined;
362
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
363
- start?: {
364
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
365
- exclusive: boolean;
366
- } | undefined;
367
- table: string;
368
- }][] | undefined;
369
- update?: ["allow", {
370
- schema?: string | undefined;
371
- alias?: string | undefined;
372
- where?: {
373
- type: "simple";
374
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
375
- field: string;
376
- value: string | number | boolean | readonly (string | number | boolean)[] | {
377
- type: "static";
378
- anchor: "authData" | "preMutationRow";
379
- field: string;
380
- };
381
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
382
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
383
- limit?: number | undefined;
384
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
385
- start?: {
386
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
387
- exclusive: boolean;
388
- } | undefined;
389
- table: string;
390
- }][] | undefined;
391
- delete?: ["allow", {
392
- schema?: string | undefined;
393
- alias?: string | undefined;
394
- where?: {
395
- type: "simple";
396
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
397
- field: string;
398
- value: string | number | boolean | readonly (string | number | boolean)[] | {
399
- type: "static";
400
- anchor: "authData" | "preMutationRow";
401
- field: string;
402
- };
403
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
404
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
405
- limit?: number | undefined;
406
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
407
- start?: {
408
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
409
- exclusive: boolean;
410
- } | undefined;
411
- table: string;
412
- }][] | undefined;
413
- } | undefined;
414
- cell?: Record<string, {
415
- select?: ["allow", {
416
- schema?: string | undefined;
417
- alias?: string | undefined;
418
- where?: {
419
- type: "simple";
420
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
421
- field: string;
422
- value: string | number | boolean | readonly (string | number | boolean)[] | {
423
- type: "static";
424
- anchor: "authData" | "preMutationRow";
425
- field: string;
426
- };
427
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
428
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
429
- limit?: number | undefined;
430
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
431
- start?: {
432
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
433
- exclusive: boolean;
434
- } | undefined;
435
- table: string;
436
- }][] | undefined;
437
- insert?: ["allow", {
438
- schema?: string | undefined;
439
- alias?: string | undefined;
440
- where?: {
441
- type: "simple";
442
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
443
- field: string;
444
- value: string | number | boolean | readonly (string | number | boolean)[] | {
445
- type: "static";
446
- anchor: "authData" | "preMutationRow";
447
- field: string;
448
- };
449
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
450
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
451
- limit?: number | undefined;
452
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
453
- start?: {
454
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
455
- exclusive: boolean;
456
- } | undefined;
457
- table: string;
458
- }][] | undefined;
459
- update?: ["allow", {
460
- schema?: string | undefined;
461
- alias?: string | undefined;
462
- where?: {
463
- type: "simple";
464
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
465
- field: string;
466
- value: string | number | boolean | readonly (string | number | boolean)[] | {
467
- type: "static";
468
- anchor: "authData" | "preMutationRow";
469
- field: string;
470
- };
471
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
472
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
473
- limit?: number | undefined;
474
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
475
- start?: {
476
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
477
- exclusive: boolean;
478
- } | undefined;
479
- table: string;
480
- }][] | undefined;
481
- delete?: ["allow", {
482
- schema?: string | undefined;
483
- alias?: string | undefined;
484
- where?: {
485
- type: "simple";
486
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
487
- field: string;
488
- value: string | number | boolean | readonly (string | number | boolean)[] | {
489
- type: "static";
490
- anchor: "authData" | "preMutationRow";
491
- field: string;
492
- };
493
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
494
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
495
- limit?: number | undefined;
496
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
497
- start?: {
498
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
499
- exclusive: boolean;
500
- } | undefined;
501
- table: string;
502
- }][] | undefined;
503
- }> | undefined;
504
- }>>;
505
- export type AuthorizationConfig = v.Infer<typeof authorizationConfigSchema>;
506
- declare const logConfigSchema: v.ObjectType<{
507
- /**
508
- * `debug`, `info`, `warn`, or `error`.
509
- * Defaults to `info`.
510
- */
511
- level: v.Optional<"error" | "debug" | "info" | "warn">;
512
- /**
513
- * Defaults to `text` for developer-friendly console logging.
514
- * Also supports `json` for consumption by structured-logging services.
515
- */
516
- format: v.Optional<"text" | "json">;
517
- datadogLogsApiKey: v.Optional<string>;
518
- datadogServiceLabel: v.Optional<string>;
519
- }, undefined>;
520
- export type LogConfig = v.Infer<typeof logConfigSchema>;
521
- declare const zeroConfigBase: v.ObjectType<{
522
- upstreamDBConnStr: v.Type<string>;
523
- cvrDBConnStr: v.Type<string>;
524
- changeDBConnStr: v.Type<string>;
525
- taskId: v.Optional<string>;
526
- replicaDBFile: v.Type<string>;
527
- storageDBTmpDir: v.Optional<string>;
528
- warmWebsocket: v.Optional<number>;
529
- numSyncWorkers: v.Optional<number>;
530
- changeStreamerConnStr: v.Optional<string>;
531
- litestream: v.Optional<boolean>;
532
- jwtSecret: v.Optional<string>;
533
- rateLimit: v.Optional<{
534
- mutationTransactions: {
535
- algorithm: "sliding-window";
536
- windowMs: number;
537
- maxTransactions: number;
100
+ };
101
+ port: {
102
+ type: v.Type<number>;
103
+ desc: string[];
104
+ };
105
+ changeStreamerPort: {
106
+ type: v.Optional<number>;
107
+ desc: string[];
108
+ };
109
+ heartbeatMonitorPort: {
110
+ type: v.Optional<number>;
111
+ desc: string[];
112
+ };
113
+ jwtSecret: {
114
+ type: v.Optional<string>;
115
+ desc: string[];
116
+ };
117
+ perUserMutationLimit: {
118
+ max: {
119
+ type: v.Optional<number>;
120
+ desc: string[];
538
121
  };
539
- }>;
540
- }, undefined>;
541
- export type ZeroConfigBase = v.Infer<typeof zeroConfigBase>;
542
- export declare const zeroConfigSchema: v.ObjectType<Omit<{
543
- upstreamDBConnStr: v.Type<string>;
544
- cvrDBConnStr: v.Type<string>;
545
- changeDBConnStr: v.Type<string>;
546
- taskId: v.Optional<string>;
547
- replicaDBFile: v.Type<string>;
548
- storageDBTmpDir: v.Optional<string>;
549
- warmWebsocket: v.Optional<number>;
550
- numSyncWorkers: v.Optional<number>;
551
- changeStreamerConnStr: v.Optional<string>;
552
- litestream: v.Optional<boolean>;
553
- jwtSecret: v.Optional<string>;
554
- rateLimit: v.Optional<{
555
- mutationTransactions: {
556
- algorithm: "sliding-window";
557
- windowMs: number;
558
- maxTransactions: number;
122
+ windowMs: {
123
+ type: v.Type<number>;
124
+ desc: string[];
559
125
  };
560
- }>;
561
- }, "authorization" | "shard" | "log"> & {
562
- authorization: v.Optional<Record<string, {
563
- table?: {
564
- select?: ["allow", {
565
- schema?: string | undefined;
566
- alias?: string | undefined;
567
- where?: {
568
- type: "simple";
569
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
570
- field: string;
571
- value: string | number | boolean | readonly (string | number | boolean)[] | {
572
- type: "static";
573
- anchor: "authData" | "preMutationRow";
574
- field: string;
575
- };
576
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
577
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
578
- limit?: number | undefined;
579
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
580
- start?: {
581
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
582
- exclusive: boolean;
583
- } | undefined;
584
- table: string;
585
- }][] | undefined;
586
- insert?: ["allow", {
587
- schema?: string | undefined;
588
- alias?: string | undefined;
589
- where?: {
590
- type: "simple";
591
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
592
- field: string;
593
- value: string | number | boolean | readonly (string | number | boolean)[] | {
594
- type: "static";
595
- anchor: "authData" | "preMutationRow";
596
- field: string;
597
- };
598
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
599
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
600
- limit?: number | undefined;
601
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
602
- start?: {
603
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
604
- exclusive: boolean;
605
- } | undefined;
606
- table: string;
607
- }][] | undefined;
608
- update?: ["allow", {
609
- schema?: string | undefined;
610
- alias?: string | undefined;
611
- where?: {
612
- type: "simple";
613
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
614
- field: string;
615
- value: string | number | boolean | readonly (string | number | boolean)[] | {
616
- type: "static";
617
- anchor: "authData" | "preMutationRow";
618
- field: string;
619
- };
620
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
621
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
622
- limit?: number | undefined;
623
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
624
- start?: {
625
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
626
- exclusive: boolean;
627
- } | undefined;
628
- table: string;
629
- }][] | undefined;
630
- delete?: ["allow", {
631
- schema?: string | undefined;
632
- alias?: string | undefined;
633
- where?: {
634
- type: "simple";
635
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
636
- field: string;
637
- value: string | number | boolean | readonly (string | number | boolean)[] | {
638
- type: "static";
639
- anchor: "authData" | "preMutationRow";
640
- field: string;
641
- };
642
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
643
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
644
- limit?: number | undefined;
645
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
646
- start?: {
647
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
648
- exclusive: boolean;
649
- } | undefined;
650
- table: string;
651
- }][] | undefined;
652
- } | undefined;
653
- column?: Record<string, {
654
- select?: ["allow", {
655
- schema?: string | undefined;
656
- alias?: string | undefined;
657
- where?: {
658
- type: "simple";
659
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
660
- field: string;
661
- value: string | number | boolean | readonly (string | number | boolean)[] | {
662
- type: "static";
663
- anchor: "authData" | "preMutationRow";
664
- field: string;
665
- };
666
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
667
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
668
- limit?: number | undefined;
669
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
670
- start?: {
671
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
672
- exclusive: boolean;
673
- } | undefined;
674
- table: string;
675
- }][] | undefined;
676
- insert?: ["allow", {
677
- schema?: string | undefined;
678
- alias?: string | undefined;
679
- where?: {
680
- type: "simple";
681
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
682
- field: string;
683
- value: string | number | boolean | readonly (string | number | boolean)[] | {
684
- type: "static";
685
- anchor: "authData" | "preMutationRow";
686
- field: string;
687
- };
688
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
689
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
690
- limit?: number | undefined;
691
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
692
- start?: {
693
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
694
- exclusive: boolean;
695
- } | undefined;
696
- table: string;
697
- }][] | undefined;
698
- update?: ["allow", {
699
- schema?: string | undefined;
700
- alias?: string | undefined;
701
- where?: {
702
- type: "simple";
703
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
704
- field: string;
705
- value: string | number | boolean | readonly (string | number | boolean)[] | {
706
- type: "static";
707
- anchor: "authData" | "preMutationRow";
708
- field: string;
709
- };
710
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
711
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
712
- limit?: number | undefined;
713
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
714
- start?: {
715
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
716
- exclusive: boolean;
717
- } | undefined;
718
- table: string;
719
- }][] | undefined;
720
- delete?: ["allow", {
721
- schema?: string | undefined;
722
- alias?: string | undefined;
723
- where?: {
724
- type: "simple";
725
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
726
- field: string;
727
- value: string | number | boolean | readonly (string | number | boolean)[] | {
728
- type: "static";
729
- anchor: "authData" | "preMutationRow";
730
- field: string;
731
- };
732
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
733
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
734
- limit?: number | undefined;
735
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
736
- start?: {
737
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
738
- exclusive: boolean;
739
- } | undefined;
740
- table: string;
741
- }][] | undefined;
742
- }> | undefined;
743
- row?: {
744
- select?: ["allow", {
745
- schema?: string | undefined;
746
- alias?: string | undefined;
747
- where?: {
748
- type: "simple";
749
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
750
- field: string;
751
- value: string | number | boolean | readonly (string | number | boolean)[] | {
752
- type: "static";
753
- anchor: "authData" | "preMutationRow";
754
- field: string;
755
- };
756
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
757
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
758
- limit?: number | undefined;
759
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
760
- start?: {
761
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
762
- exclusive: boolean;
763
- } | undefined;
764
- table: string;
765
- }][] | undefined;
766
- insert?: ["allow", {
767
- schema?: string | undefined;
768
- alias?: string | undefined;
769
- where?: {
770
- type: "simple";
771
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
772
- field: string;
773
- value: string | number | boolean | readonly (string | number | boolean)[] | {
774
- type: "static";
775
- anchor: "authData" | "preMutationRow";
776
- field: string;
777
- };
778
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
779
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
780
- limit?: number | undefined;
781
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
782
- start?: {
783
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
784
- exclusive: boolean;
785
- } | undefined;
786
- table: string;
787
- }][] | undefined;
788
- update?: ["allow", {
789
- schema?: string | undefined;
790
- alias?: string | undefined;
791
- where?: {
792
- type: "simple";
793
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
794
- field: string;
795
- value: string | number | boolean | readonly (string | number | boolean)[] | {
796
- type: "static";
797
- anchor: "authData" | "preMutationRow";
798
- field: string;
799
- };
800
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
801
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
802
- limit?: number | undefined;
803
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
804
- start?: {
805
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
806
- exclusive: boolean;
807
- } | undefined;
808
- table: string;
809
- }][] | undefined;
810
- delete?: ["allow", {
811
- schema?: string | undefined;
812
- alias?: string | undefined;
813
- where?: {
814
- type: "simple";
815
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
816
- field: string;
817
- value: string | number | boolean | readonly (string | number | boolean)[] | {
818
- type: "static";
819
- anchor: "authData" | "preMutationRow";
820
- field: string;
821
- };
822
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
823
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
824
- limit?: number | undefined;
825
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
826
- start?: {
827
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
828
- exclusive: boolean;
829
- } | undefined;
830
- table: string;
831
- }][] | undefined;
832
- } | undefined;
833
- cell?: Record<string, {
834
- select?: ["allow", {
835
- schema?: string | undefined;
836
- alias?: string | undefined;
837
- where?: {
838
- type: "simple";
839
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
840
- field: string;
841
- value: string | number | boolean | readonly (string | number | boolean)[] | {
842
- type: "static";
843
- anchor: "authData" | "preMutationRow";
844
- field: string;
845
- };
846
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
847
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
848
- limit?: number | undefined;
849
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
850
- start?: {
851
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
852
- exclusive: boolean;
853
- } | undefined;
854
- table: string;
855
- }][] | undefined;
856
- insert?: ["allow", {
857
- schema?: string | undefined;
858
- alias?: string | undefined;
859
- where?: {
860
- type: "simple";
861
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
862
- field: string;
863
- value: string | number | boolean | readonly (string | number | boolean)[] | {
864
- type: "static";
865
- anchor: "authData" | "preMutationRow";
866
- field: string;
867
- };
868
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
869
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
870
- limit?: number | undefined;
871
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
872
- start?: {
873
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
874
- exclusive: boolean;
875
- } | undefined;
876
- table: string;
877
- }][] | undefined;
878
- update?: ["allow", {
879
- schema?: string | undefined;
880
- alias?: string | undefined;
881
- where?: {
882
- type: "simple";
883
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
884
- field: string;
885
- value: string | number | boolean | readonly (string | number | boolean)[] | {
886
- type: "static";
887
- anchor: "authData" | "preMutationRow";
888
- field: string;
889
- };
890
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
891
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
892
- limit?: number | undefined;
893
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
894
- start?: {
895
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
896
- exclusive: boolean;
897
- } | undefined;
898
- table: string;
899
- }][] | undefined;
900
- delete?: ["allow", {
901
- schema?: string | undefined;
902
- alias?: string | undefined;
903
- where?: {
904
- type: "simple";
905
- op: "=" | "!=" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
906
- field: string;
907
- value: string | number | boolean | readonly (string | number | boolean)[] | {
908
- type: "static";
909
- anchor: "authData" | "preMutationRow";
910
- field: string;
911
- };
912
- } | import("../../../zero-protocol/src/ast.js").Conjunction | import("../../../zero-protocol/src/ast.js").Disjunction | undefined;
913
- related?: readonly import("../../../zero-protocol/src/ast.js").CorrelatedSubQuery[] | undefined;
914
- limit?: number | undefined;
915
- orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
916
- start?: {
917
- row: Record<string, import("../../../shared/src/json.js").ReadonlyJSONValue | undefined>;
918
- exclusive: boolean;
919
- } | undefined;
920
- table: string;
921
- }][] | undefined;
922
- }> | undefined;
923
- }>>;
924
- shard: v.ObjectType<{
925
- /**
926
- * Unique identifier for the zero-cache shard. This is used to partition
927
- * shardable tables such as `zero.clients`, as well as reserve a name for
928
- * the replication slot.
929
- *
930
- * The shard `id` value is written to the `shardID` column when updating
931
- * the `lastMutationID` for clients in the `zero.clients` table.
932
- *
933
- * Defaults to "0".
934
- */
935
- id: v.Type<string>;
936
- /**
937
- * Optional (comma-separated) list of of Postgres `PUBLICATION`s that the
938
- * shard subscribes to. All publication names must begin with the prefix
939
- * `"zero_"`, and all tables must be in the `"public"` Postgres schema.
940
- *
941
- * If unspecified, zero will create and use a `"zero_public"` publication that
942
- * publishes all tables in the `"public"` schema.
943
- *
944
- * ```sql
945
- * CREATE PUBLICATION zero_public FOR TABLES IN SCHEMA public;
946
- * ```
947
- *
948
- * Note that once a shard has begun syncing data, this list of publications
949
- * cannot be changed, and zero-cache will refuse to start if a specified
950
- * value differs from what it originally synced.
951
- *
952
- * To use a different set of publications, a new shard should be created.
953
- */
954
- publications: v.ArrayType<v.Type<string>>;
955
- }, undefined>;
956
- log: v.ObjectType<{
957
- /**
958
- * `debug`, `info`, `warn`, or `error`.
959
- * Defaults to `info`.
960
- */
961
- level: v.Optional<"error" | "debug" | "info" | "warn">;
962
- /**
963
- * Defaults to `text` for developer-friendly console logging.
964
- * Also supports `json` for consumption by structured-logging services.
965
- */
966
- format: v.Optional<"text" | "json">;
967
- datadogLogsApiKey: v.Optional<string>;
968
- datadogServiceLabel: v.Optional<string>;
969
- }, undefined>;
970
- }, undefined>;
971
- export type ZeroConfig = v.Infer<typeof zeroConfigSchema>;
972
- export declare function getZeroConfig(): Promise<ZeroConfig>;
126
+ };
127
+ numSyncWorkers: {
128
+ type: v.Optional<number>;
129
+ desc: string[];
130
+ };
131
+ changeStreamerURI: {
132
+ type: v.Optional<string>;
133
+ desc: string[];
134
+ };
135
+ autoReset: {
136
+ type: v.Optional<boolean>;
137
+ desc: string[];
138
+ };
139
+ litestream: {
140
+ type: v.Optional<boolean>;
141
+ desc: string[];
142
+ };
143
+ storageDBTmpDir: {
144
+ type: v.Optional<string>;
145
+ desc: string[];
146
+ };
147
+ warmWebsocket: {
148
+ type: v.Optional<number>;
149
+ hidden: boolean;
150
+ };
151
+ };
152
+ export type ZeroConfig = Config<typeof zeroOptions>;
153
+ export declare function getZeroConfig(argv?: string[]): ZeroConfig;
973
154
  export {};
974
155
  //# sourceMappingURL=zero-config.d.ts.map